make_shared

This commit is contained in:
Yevgen Muntyan 2016-02-29 22:17:33 -08:00
parent 29946b4b57
commit c45171964f

View File

@ -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: