DynamicCast_noexcept()

System::DynamicCast_noexcept(const TFrom&) function

Old obsolete casts. Will be removed in future versions.

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::DynamicCast_noexcept(const TFrom &obj) noexcept

Template parameters

ParameterDescription
TToTarget Exception type.
TFromSource Exception type.

Arguments

ParameterTypeDescription
objconst TFrom&Source pointer.

Return Value

Cast result if cast is allowed or nullptr otherwise.

Remarks

Performs dynamic cast on Exception objects. Deprecated
Left for backwards compatibility. Use AsCast instead.

System::DynamicCast_noexcept(SmartPtr<TFrom> const&) function

Performs dynamic cast on SmartPtr objects.

template<typename TTo,typename TFrom> std::enable_if<!IsExceptionWrapper<TTo>::value, typenameCastResult<TTo>::type>::type System::DynamicCast_noexcept(SmartPtr<TFrom> const &obj) noexcept

Template parameters

ParameterDescription
TToTarget pointee type.
TFromSource pointee type.

Arguments

ParameterTypeDescription
objSmartPtr<TFrom> const&Source pointer.

Return Value

Cast result if cast is allowed or nullptr otherwise.

Deprecated
Left for backwards compatibility. Use AsCast instead.

System::DynamicCast_noexcept(SmartPtr<TFrom>) function

Performs dynamic cast on Objects to Exception objects.

template<typename TTo,typename TFrom> std::enable_if<std::is_same<System::Object, TFrom>::value &&IsExceptionWrapper<TTo>::value, TTo>::type System::DynamicCast_noexcept(SmartPtr<TFrom> obj) noexcept

Template parameters

ParameterDescription
TToTarget Exception type.
TFromObject type.

Arguments

ParameterTypeDescription
objSmartPtr<TFrom>Source pointer.

Return Value

Cast result if cast is allowed or nullptr otherwise.

Deprecated
Left for backwards compatibility. Use AsCast instead.

See Also