diff --git a/alib2std/src/extensions/clone.hpp b/alib2std/src/extensions/clone.hpp index fb6787b053b860bd6ca68fcd03993582f3fea3de..6b7a106fcff67be227fb71404a67f731614958d7 100644 --- a/alib2std/src/extensions/clone.hpp +++ b/alib2std/src/extensions/clone.hpp @@ -10,7 +10,7 @@ #include "type_traits.hpp" -namespace std { +namespace ext { template<class T, typename std::enable_if< ! std::has_clone<T>::value >::type* = nullptr> T* clone(const T * const tmp) { @@ -22,6 +22,6 @@ T* clone(const T * const tmp) { return tmp->clone(); } -} /* namespace std */ +} /* namespace ext */ #endif /* __CLONE_HPP_ */ diff --git a/alib2std/src/extensions/memory.hpp b/alib2std/src/extensions/memory.hpp index 51b2b3bd117b78933023a49560482d74fcba7cc2..f8982179b1d5ffc742f87f26eebbdb503ecf6439 100644 --- a/alib2std/src/extensions/memory.hpp +++ b/alib2std/src/extensions/memory.hpp @@ -130,7 +130,7 @@ private: T * tmp = m_Data; detach ( ); - tmp = std::clone ( tmp ); + tmp = ext::clone ( tmp ); tmp->m_UseCount = 0; attach ( tmp ); } @@ -253,7 +253,7 @@ private: typename cow_shared_ptr < T >::cow_shared_ptr_data * tmp = m_Data; detach ( ); - attach ( new cow_shared_ptr_data ( std::clone ( tmp->m_Data ) ) ); + attach ( new cow_shared_ptr_data ( ext::clone ( tmp->m_Data ) ) ); } cow_shared_ptr_data * m_Data; @@ -281,7 +281,7 @@ public: smart_ptr ( smart_ptr < R > other ) : m_Data ( other.release ( ) ) { } - smart_ptr ( const smart_ptr & other ) : m_Data ( std::clone ( other.m_Data ) ) { + smart_ptr ( const smart_ptr & other ) : m_Data ( ext::clone ( other.m_Data ) ) { } smart_ptr ( smart_ptr && other ) noexcept : m_Data ( other.release ( ) ) { @@ -295,7 +295,7 @@ public: if ( this == & other ) return * this; delete m_Data; - m_Data = std::clone ( other.m_Data ); + m_Data = ext::clone ( other.m_Data ); return * this; }