System::Collections::Generic::Details::CastRules::CastType< Source, Result > Struct Template Reference

Contains the functions to determine the cast type. More...

Static Public Attributes

static constexpr bool None = std::is_same<Source, Result>::value
 
static constexpr bool Static = IsSmartPtr<Source>::value && IsSmartPtr<Result>::value && Constraints::IsBaseOf<Result, Source>::value && !None
 
static constexpr bool Dynamic = IsSmartPtr<Source>::value && IsSmartPtr<Result>::value && !None && !Static
 
static constexpr bool NullableBoxing = std::is_same<Result, Nullable<Source>>::value
 
static constexpr bool NullableUnboxing = std::is_same<Source, Nullable<Result>>::value
 
static constexpr bool Boxing = IsBoxable<Source>::value && std::is_same<Result, SmartPtr<Object>>::value
 
static constexpr bool Unboxing = std::is_same<Source, SmartPtr<Object>>::value && IsBoxable<Result>::value
 
static constexpr bool Invalid = !(None || Static || Dynamic || NullableBoxing || NullableUnboxing || Boxing || Unboxing)
 

Detailed Description

template<typename Source, typename Result>
struct System::Collections::Generic::Details::CastRules::CastType< Source, Result >

Contains the functions to determine the cast type.

Template Parameters
SourceThe source type.
ResultThe result type.

Member Data Documentation

◆ Boxing

template<typename Source , typename Result >
constexpr bool System::Collections::Generic::Details::CastRules::CastType< Source, Result >::Boxing = IsBoxable<Source>::value && std::is_same<Result, SmartPtr<Object>>::value
staticconstexpr

◆ Dynamic

template<typename Source , typename Result >
constexpr bool System::Collections::Generic::Details::CastRules::CastType< Source, Result >::Dynamic = IsSmartPtr<Source>::value && IsSmartPtr<Result>::value && !None && !Static
staticconstexpr

◆ Invalid

template<typename Source , typename Result >
constexpr bool System::Collections::Generic::Details::CastRules::CastType< Source, Result >::Invalid = !(None || Static || Dynamic || NullableBoxing || NullableUnboxing || Boxing || Unboxing)
staticconstexpr

◆ None

template<typename Source , typename Result >
constexpr bool System::Collections::Generic::Details::CastRules::CastType< Source, Result >::None = std::is_same<Source, Result>::value
staticconstexpr

◆ NullableBoxing

template<typename Source , typename Result >
constexpr bool System::Collections::Generic::Details::CastRules::CastType< Source, Result >::NullableBoxing = std::is_same<Result, Nullable<Source>>::value
staticconstexpr

◆ NullableUnboxing

template<typename Source , typename Result >
constexpr bool System::Collections::Generic::Details::CastRules::CastType< Source, Result >::NullableUnboxing = std::is_same<Source, Nullable<Result>>::value
staticconstexpr

◆ Static

template<typename Source , typename Result >
constexpr bool System::Collections::Generic::Details::CastRules::CastType< Source, Result >::Static = IsSmartPtr<Source>::value && IsSmartPtr<Result>::value && Constraints::IsBaseOf<Result, Source>::value && !None
staticconstexpr

◆ Unboxing

template<typename Source , typename Result >
constexpr bool System::Collections::Generic::Details::CastRules::CastType< Source, Result >::Unboxing = std::is_same<Source, SmartPtr<Object>>::value && IsBoxable<Result>::value
staticconstexpr