make_shared
This commit is contained in:
parent
29946b4b57
commit
c45171964f
@ -104,6 +104,12 @@ std::unique_ptr<T> make_unique(Args&&... args)
|
||||
return std::unique_ptr<T> (new T (std::forward<Args> (args)...));
|
||||
}
|
||||
|
||||
template<class T, class... Args>
|
||||
std::shared_ptr<T> make_shared (Args&&... args)
|
||||
{
|
||||
return std::shared_ptr<T> (new T (std::forward<Args> (args)...));
|
||||
}
|
||||
|
||||
class raii
|
||||
{
|
||||
public:
|
||||
|
Loading…
x
Reference in New Issue
Block a user