System::StaticCast_noexcept method

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

Performs static cast on SmartPtr objects.

template<typename TTo,typename TFrom> std::enable_if<!IsExceptionWrapper<TTo>::value, typenameCastResult<TTo>::type>::type System::StaticCast_noexcept(SmartPtr<TFrom> const &obj)
ParameterDescription
TToTarget pointee type.
TFromSource pointee type.
ParameterTypeDescription
objSmartPtr<TFrom> const&Source pointer.

ReturnValue

Cast result if cast is allowed or nullptr otherwise.

Deprecated

Left for backwards compatibility. Use AsCast instead.

See Also

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

Performs static cast on WeakPtr objects.

template<typename TTo,typename TFrom> CastResult<TTo>::type System::StaticCast_noexcept(WeakPtr<TFrom> const &obj)
ParameterDescription
TToTarget pointee type.
TFromSource pointee type.
ParameterTypeDescription
objWeakPtr<TFrom> const&Source pointer.

ReturnValue

Cast result if cast is allowed or nullptr otherwise.

Deprecated

Left for backwards compatibility. Use AsCast instead.

See Also

System::StaticCast_noexcept(const TFrom&) method

Performs static cast on Exception objects.

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_noexcept(const TFrom &obj)
ParameterDescription
TToTarget Exception type.
TFromSource Exception type.
ParameterTypeDescription
objconst TFrom&Source pointer.

ReturnValue

Cast result if cast is allowed or nullptr otherwise.

Deprecated

Left for backwards compatibility. Use AsCast instead.

See Also

System::StaticCast_noexcept(SmartPtr<TFrom>) method

Performs static 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::StaticCast_noexcept(SmartPtr<TFrom> obj) noexcept
ParameterDescription
TToTarget Exception type.
TFromObject type.
ParameterTypeDescription
objSmartPtr<TFrom>Source pointer.

ReturnValue

Cast result if cast is allowed or nullptr otherwise.

Deprecated

Left for backwards compatibility. Use AsCast instead.

See Also