使用std::make_shared创建对象,创建失败时返回空指针。
template<typename T, typename... Args> static std::shared_ptr<T> MakeShared(Args && ... args);
参数名 |
输入/输出 |
说明 |
---|---|---|
T |
输入 |
对象类名。 |
args |
输入 |
创建的T对象构造函数参数。 |
数据结构 |
说明 |
---|---|
APP_ERROR |
程序执行返回的错误码,请参考APP_ERROR说明。 |