System::MakeObject 方法

System::MakeObject(Args&&…) method

在堆上创建对象并返回指向它的共享指针。

template<class T,class ...> std::enable_if<!IsSmartPtr<T>::value, SmartPtr<T>>::type System::MakeObject(Args &&... args)
Parameter描述
T要实例化的类。
参数构造函数参数的类型。
ParameterType描述
argsArgs&&…构造函数参数。

ReturnValue

SmartPtr to newly created object, always in shared mode.

另见

System::MakeObject(Args&&…) method

在堆上创建对象并返回指向它的共享指针。

template<class T,class ...> std::enable_if<IsSmartPtr<T>::value, T>::type System::MakeObject(Args &&... args)
Parameter描述
TSmartPtr 用于要实例化的类。
参数构造函数参数的类型。
ParameterType描述
argsArgs&&…构造函数参数。

ReturnValue

SmartPtr to newly created object, always in shared mode.

另见