UnknownToObject()

ObjectExt::UnknownToObject(T) method

Converts unknown type to Object, handling both smart pointer type and value type situations.

template<typename T> static std::enable_if<IsSmartPtr<T>::value, System::SmartPtr<Object>>::type System::ObjectExt::UnknownToObject(T obj)

Template parameters

ParameterDescription
TType to convert to Object.

Arguments

ParameterTypeDescription
objTObject to convert.

Return Value

Smart pointer to Object being either converted pointer or boxed value.

ObjectExt::UnknownToObject(const T&) method

Converts unknown type to Object, handling both smart pointer type and value type situations.

template<typename T> static std::enable_if<!IsSmartPtr<T>::value, System::SmartPtr<Object>>::type System::ObjectExt::UnknownToObject(const T &obj)

Template parameters

ParameterDescription
TType to convert to Object.

Arguments

ParameterTypeDescription
objconst T&Object to convert.

Return Value

Smart pointer to Object being either converted pointer or boxed value.

See Also