mirror of
https://github.com/wichtounet/thor-os.git
synced 2025-09-16 16:11:42 -04:00
Add std::make_unique
This commit is contained in:
parent
06ae438bc7
commit
102696511a
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user