System::StaticCast メソッド

System::StaticCast(const TFrom&) method

ポインタでないオブジェクトに対して static cast を実行します。

template<typename TTo,typename TFrom> std::enable_if<!std::is_same<TFrom, System::String>::value &&!IsExceptionWrapper<TFrom>::value &&!IsSmartPtr<TFrom>::value &&!std::is_arithmetic<TFrom>::value, TTo>::type System::StaticCast(const TFrom &obj)
パラメーター説明
TTo対象型。
TFromソース型。
パラメーター説明
objconst TFrom&ソースオブジェクト。

ReturnValue

キャストが許可されている場合のキャスト結果。

Deprecated

下位互換性のために残されています。代わりに ExplicitCast を使用してください。

参照

System::StaticCast(const TFrom&) method

Exception オブジェクトに対して static cast を実行します。

template<typename TTo,typename TFrom> std::enable_if<IsExceptionWrapper<TFrom>::value &&IsExceptionWrapper<TTo>::value &&(std::is_convertible<TTo, TFrom>::value||std::is_base_of<TTo, TFrom>::value), TTo>::type System::StaticCast(const TFrom &obj)
パラメーター説明
TTo対象の Exception 型。
TFromソースの Exception 型。
パラメーター説明
objconst TFrom&ソース ポインタ。

ReturnValue

キャストが許可されている場合のキャスト結果。

Deprecated

下位互換性のために残されています。代わりに ExplicitCast を使用してください。

参照

System::StaticCast(const TFrom *) method

算術型に対する特殊化。

template<typename TTo,typename TFrom> std::enable_if<std::is_arithmetic<TFrom>::value, TTo>::type System::StaticCast(const TFrom *value)

参照

System::StaticCast(SmartPtr<TFrom> const&) method

SmartPtr オブジェクトに対して static cast を実行します。

template<typename TTo,typename TFrom> std::enable_if<!IsExceptionWrapper<TTo>::value, typenameCastResult<TTo>::type>::type System::StaticCast(SmartPtr<TFrom> const &obj)
パラメーター説明
TTo対象のポインティー型。
TFromソースのポインティー型。
パラメーター説明
objSmartPtr<TFrom> const&ソース ポインタ。

ReturnValue

キャストが許可されている場合のキャスト結果。

Deprecated

下位互換性のために残されています。代わりに ExplicitCast を使用してください。

参照

System::StaticCast(SmartPtr<TFrom>) method

Objects を Exception オブジェクトに static cast します。

template<typename TTo,typename TFrom> std::enable_if<std::is_same<System::Object, TFrom>::value &&IsExceptionWrapper<TTo>::value, TTo>::type System::StaticCast(SmartPtr<TFrom> obj) noexcept
パラメーター説明
TTo対象の Exception 型。
TFromObject 型。
パラメーター説明
objSmartPtr<TFrom>ソース ポインタ。

ReturnValue

キャストが許可されている場合のキャスト結果。

Deprecated

下位互換性のために残されています。代わりに ExplicitCast を使用してください。

参照

System::StaticCast(std::nullptr_t) method

null オブジェクトの static cast を実行します。

template<typename TTo> CastResult<TTo>::type System::StaticCast(std::nullptr_t)
パラメーター説明
TTo対象のポインティー型。

ReturnValue

nullptr。

Deprecated

下位互換性のために残されています。代わりに ExplicitCast を使用してください。

参照

System::StaticCast(TFrom) method

算術型に対する特殊化。

template<typename TTo,typename TFrom> std::enable_if<std::is_arithmetic<TFrom>::value, TTo>::type System::StaticCast(TFrom value)

参照

System::StaticCast(TTo) method

String から String へのキャストを処理します。

template<typename TTo> std::enable_if<std::is_same<TTo, System::String>::value, TTo>::type System::StaticCast(TTo value)

参照

System::StaticCast(WeakPtr<TFrom> const&) method

WeakPtr オブジェクトに対して static cast を実行します。

template<typename TTo,typename TFrom> CastResult<TTo>::type System::StaticCast(WeakPtr<TFrom> const &obj)
パラメーター説明
TTo対象のポインティー型。
TFromソースのポインティー型。
パラメーター説明
objWeakPtr<TFrom> const&ソース ポインタ。

ReturnValue

キャストが許可されている場合のキャスト結果。

Deprecated

下位互換性のために残されています。代わりに ExplicitCast を使用してください。

参照