MakeObject()

System::MakeObject(Args&&…) function

Creates object on heap and returns shared pointer to it.

template<class T,class ...> std::enable_if<!IsSmartPtr<T>::value, SmartPtr<T>>::type System::MakeObject(Args &&... args)

Template parameters

ParameterDescription
TClass to instantiate.
ArgsConstructor arguments’ types.

Arguments

ParameterTypeDescription
argsArgs&&…Constructor arguments.

Return Value

SmartPtr to newly created object, always in shared mode.

System::MakeObject(Args&&…) function

Creates object on heap and returns shared pointer to it.

template<class T,class ...> std::enable_if<IsSmartPtr<T>::value, T>::type System::MakeObject(Args &&... args)

Template parameters

ParameterDescription
TSmartPtr to class to instantiate.
ArgsConstructor arguments’ types.

Arguments

ParameterTypeDescription
argsArgs&&…Constructor arguments.

Return Value

SmartPtr to newly created object, always in shared mode.

See Also