35 template <
class T,
class ...Args>
36 auto make_unique(Args&& ...args)
37 -> estd::enable_if_t<!std::is_array<T>::value,
40 return std::unique_ptr<T> {
41 new T(std::forward<Args>(args)...) };
45 auto make_unique(std::size_t size)
46 -> estd::enable_if_t<std::is_array<T>::value,
49 return std::unique_ptr<T> {
50 new typename std::remove_extent<T>::type[size]() };
C++ amazing templates and reusable implementations awesomeness.