System::Text::Json::Serialization::Metadata::UnboxRef method

System::Text::Json::Serialization::Metadata::UnboxRef(const SmartPtr<Object>&) method

Unboxes a boxed value type to a mutable reference allowing in-place modification of the boxed value. Supports BoxedValue wrappers only, for value types not derived from Object.

template<class T> std::enable_if<!std::is_enum<T>::value &&IsBoxable<T>::value &&!std::is_base_of<Object, T>::value, T &>::type System::Text::Json::Serialization::Metadata::UnboxRef(const SmartPtr<Object> &obj)
ParameterDescription
TValue type not derived from Object.
ParameterTypeDescription
objconst SmartPtr<Object>&Object to unbox.

ReturnValue

Mutable reference to the stored value.

See Also

System::Text::Json::Serialization::Metadata::UnboxRef(const SmartPtr<Object>&) method

Unboxes a boxed value type to a mutable reference allowing in-place modification of the boxed value. Supports both BoxedValue wrappers and raw T instances.

template<class T> std::enable_if<!std::is_enum<T>::value &&IsBoxable<T>::value &&std::is_base_of<Object, T>::value, T &>::type System::Text::Json::Serialization::Metadata::UnboxRef(const SmartPtr<Object> &obj)
ParameterDescription
TValue type derived from Object.
ParameterTypeDescription
objconst SmartPtr<Object>&Object to unbox.

ReturnValue

Mutable reference to the stored value.

See Also