#ifndef TMWA_COMPAT_MEMORY_HPP #define TMWA_COMPAT_MEMORY_HPP # include "../sanity.hpp" # include template struct is_array_of_unknown_bound : std::is_same::type[]> {}; template, class... A> typename std::enable_if::value, std::unique_ptr>::type make_unique(A&&... a) { return std::unique_ptr(new T(std::forward(a)...)); } template> typename std::enable_if::value, std::unique_ptr>::type make_unique(size_t sz) { typedef typename std::remove_extent::type E; return std::unique_ptr(new E[sz]()); } #endif // TMWA_COMPAT_MEMORY_HPP