Add std::make_unique

This commit is contained in:
Baptiste Wicht 2016-08-14 22:02:38 +02:00
parent 06ae438bc7
commit 102696511a

View File

@ -198,6 +198,11 @@ public:
static_assert(sizeof(unique_ptr<long>) == sizeof(long), "unique_ptr must have zero overhead with default deleter");
static_assert(sizeof(unique_ptr<long[]>) == sizeof(long), "unique_ptr must have zero overhead with default deleter");
template <typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args){
return std::unique_ptr<T>(std::forward<Args>(args)...);
}
} //end of namespace std
#endif