15 #ifndef dealii_cxx14_memory_h
16 #define dealii_cxx14_memory_h
22 #ifndef DEAL_II_WITH_CXX14
24 # include <type_traits>
31 #ifdef DEAL_II_WITH_CXX14
32 using std::make_unique;
39 struct is_bounded_array
41 static constexpr
bool value =
false;
44 template <
typename T, std::
size_t N>
45 struct is_bounded_array<
T[
N]>
47 static constexpr
bool value =
true;
51 template <
typename T,
typename... Args>
54 make_unique(Args &&... constructor_arguments)
56 return std::unique_ptr<T>(
57 new T(std::forward<Args>(constructor_arguments)...));
63 make_unique(std::size_t n)
66 "This function is not implemented for bounded array types.");
67 return std::unique_ptr<T>(
new typename std::remove_extent<T>::type[n]);
75 #endif // dealii_cxx14_memory_h