MakeShared

Function Usage

This function uses std::make_shared to create an object. If the object fails to be created, a null pointer is returned.

Prototype

1
2
template<typename T, typename... Args>
static std::shared_ptr<T> MakeShared(Args && ... args);

Parameters

Parameter

Input/Output

Description

T

Input

Object class name.

args

Input

Constructor parameter of the created T-type object.

Response Parameters

Data Structure

Description

std::shared_ptr

Created pointer object.