diff options
Diffstat (limited to 'compat/make-unique.hpp')
-rw-r--r-- | compat/make-unique.hpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/compat/make-unique.hpp b/compat/make-unique.hpp index bb5315c5..64c647b1 100644 --- a/compat/make-unique.hpp +++ b/compat/make-unique.hpp @@ -8,7 +8,7 @@ #include <utility> #include <cstddef> -namespace detail { +namespace raii_detail { template<class T> struct Unique_if { typedef std::unique_ptr<T> Single_object; @@ -26,18 +26,19 @@ template<class T, size_t N> struct Unique_if<T[N]> } template<class T, class... Args> - typename detail::Unique_if<T>::Single_object + typename ::raii_detail::Unique_if<T>::Single_object make_unique(Args&&... args) { return std::unique_ptr<T>(new T(std::forward<Args>(args)...)); } template<class T> - typename detail::Unique_if<T>::Unknown_bound + typename ::raii_detail::Unique_if<T>::Unknown_bound make_unique(std::size_t n) { typedef typename std::remove_extent<T>::type U; return std::unique_ptr<T>(new U[n]()); } template<class T, class... Args> - typename detail::Unique_if<T>::Known_bound + typename ::raii_detail::Unique_if<T>::Known_bound make_unique(Args&&...) = delete; + |