System::StaticCast methode

System::StaticCast(const TFrom&) method

Voert een statische cast uit op niet‑pointerobjecten.

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)
ParameterBeschrijving
TToDoeltype.
TFromBrontype.
ParameterTypeBeschrijving
objconst TFrom&Bronobject.

ReturnValue

Cast‑resultaat als de cast is toegestaan.

Deprecated

Behoudens voor achterwaartse compatibiliteit. Gebruik ExplicitCast in plaats daarvan.

Zie ook

System::StaticCast(const TFrom&) method

Voert een static cast uit op Exception objecten.

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)
ParameterBeschrijving
TToDoel Exception type.
TFromBron Exception type.
ParameterTypeBeschrijving
objconst TFrom&Bron‑pointer.

ReturnValue

Cast‑resultaat als de cast is toegestaan.

Deprecated

Behoudens voor achterwaartse compatibiliteit. Gebruik ExplicitCast in plaats daarvan.

Zie ook

System::StaticCast(const TFrom *) method

Specialisatie voor rekenkundige types.

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

Zie ook

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

Voert een static cast uit op SmartPtr objecten.

template<typename TTo,typename TFrom> std::enable_if<!IsExceptionWrapper<TTo>::value, typenameCastResult<TTo>::type>::type System::StaticCast(SmartPtr<TFrom> const &obj)
ParameterBeschrijving
TToDoel‑pointee type.
TFromBron‑pointee type.
ParameterTypeBeschrijving
objSmartPtr<TFrom> const&Bron‑pointer.

ReturnValue

Cast‑resultaat als de cast is toegestaan.

Deprecated

Behoudens voor achterwaartse compatibiliteit. Gebruik ExplicitCast in plaats daarvan.

Zie ook

System::StaticCast(SmartPtr<TFrom>) method

Voert een statische cast uit op Objects naar Exception objecten.

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
ParameterBeschrijving
TToDoel Exception type.
TFromObject type.
ParameterTypeBeschrijving
objSmartPtr<TFrom>Bron‑pointer.

ReturnValue

Cast‑resultaat als de cast is toegestaan.

Deprecated

Behoudens voor achterwaartse compatibiliteit. Gebruik ExplicitCast in plaats daarvan.

Zie ook

System::StaticCast(std::nullptr_t) method

Voert een statische cast uit van null-objecten.

template<typename TTo> CastResult<TTo>::type System::StaticCast(std::nullptr_t)
ParameterBeschrijving
TToDoel‑pointee type.

ReturnValue

nullptr.

Deprecated

Behoudens voor achterwaartse compatibiliteit. Gebruik ExplicitCast in plaats daarvan.

Zie ook

System::StaticCast(TFrom) method

Specialisatie voor rekenkundige types.

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

Zie ook

System::StaticCast(TTo) method

Voer een cast uit van String naar String.

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

Zie ook

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

Voert een statische cast uit op WeakPtr objecten.

template<typename TTo,typename TFrom> CastResult<TTo>::type System::StaticCast(WeakPtr<TFrom> const &obj)
ParameterBeschrijving
TToDoel‑pointee type.
TFromBron‑pointee type.
ParameterTypeBeschrijving
objWeakPtr<TFrom> const&Bron‑pointer.

ReturnValue

Cast‑resultaat als de cast is toegestaan.

Deprecated

Behoudens voor achterwaartse compatibiliteit. Gebruik ExplicitCast in plaats daarvan.

Zie ook