17 #ifndef CARTOGRAPHER_COMMON_MAKE_UNIQUE_H_ 18 #define CARTOGRAPHER_COMMON_MAKE_UNIQUE_H_ 22 #include <type_traits> 40 template <
class T,
size_t N>
45 template <
class T,
class... Args>
47 return std::unique_ptr<T>(
new T(std::forward<Args>(args)...));
52 typedef typename std::remove_extent<T>::type U;
53 return std::unique_ptr<T>(
new U[n]());
56 template <
class T,
class... Args>
62 #endif // CARTOGRAPHER_COMMON_MAKE_UNIQUE_H_ std::unique_ptr< T[]> _Unknown_bound
_Unique_if< T >::_Single_object make_unique(Args &&...args)
std::unique_ptr< T > _Single_object