libki/include/ki/util/unique.h

17 lines
268 B
C
Raw Normal View History

2018-12-13 22:12:04 +00:00
#pragma once
#include <utility>
#include <memory>
#if __cplusplus <= 201103L
namespace ki
{
template<typename T, typename... Args>
std::unique_ptr<T> make_unique(Args&&... args)
{
return std::unique_ptr<T>(
new T(std::forward<Args>(args)...)
);
}
}
#endif