8#include <system/boxable_traits.h>
9#include <system/boxed_value.h>
10#include <system/exceptions.h>
11#include <system/object.h>
36inline typename std::enable_if<!std::is_enum<T>::value && IsBoxable<T>::value && std::is_base_of<Object, T>::value,
T&>::type
40 throw NullReferenceException();
43 return const_cast<T&
>(boxed->unbox());
45 return *obj.template Cast<T, std::true_type>();
56inline typename std::enable_if<!std::is_enum<T>::value &&
IsBoxable<T>::value && !std::is_base_of<Object, T>::value, T&>::type
60 throw NullReferenceException();
63 return const_cast<T&
>(boxed->unbox());
65 throw InvalidCastException();
Represents a boxed value. Objects of this class should only be allocated using System::MakeObject() f...
Definition: boxed_value.h:218
@ Text
Defines color adjustment information for text.
std::enable_if<!std::is_enum< T >::value &&IsBoxable< T >::value &&std::is_base_of< Object, T >::value, T & >::type UnboxRef(const SmartPtr< Object > &obj)
Unboxes a boxed value type to a mutable reference allowing in-place modification of the boxed value....
Definition: json_unbox_ref.h:37
Definition: db_command.h:9
std::enable_if<!IsExceptionWrapper< TTo >::value, typenameCastResult< TTo >::type >::type Cast(SmartPtr< TFrom > const &obj)
Performs cast on SmartPtr objects.
Definition: object.h:416
Template predicate that checks if boxing of the specified type is supported.
Definition: boxable_traits.h:16