Imported Upstream version 1.64.0
[platform/upstream/boost.git] / boost / smart_ptr / weak_ptr.hpp
index e3e9ad9..f3411f7 100644 (file)
@@ -16,6 +16,7 @@
 #include <memory> // boost.TR1 include order fix
 #include <boost/smart_ptr/detail/shared_count.hpp>
 #include <boost/smart_ptr/shared_ptr.hpp>
+#include <boost/smart_ptr/detail/sp_noexcept.hpp>
 
 namespace boost
 {
@@ -31,7 +32,7 @@ public:
 
     typedef typename boost::detail::sp_element< T >::type element_type;
 
-    weak_ptr() BOOST_NOEXCEPT : px(0), pn() // never throws in 1.30+
+    weak_ptr() BOOST_SP_NOEXCEPT : px(0), pn() // never throws in 1.30+
     {
     }
 
@@ -41,11 +42,11 @@ public:
 
 // ... except in C++0x, move disables the implicit copy
 
-    weak_ptr( weak_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn )
+    weak_ptr( weak_ptr const & r ) BOOST_SP_NOEXCEPT : px( r.px ), pn( r.pn )
     {
     }
 
-    weak_ptr & operator=( weak_ptr const & r ) BOOST_NOEXCEPT
+    weak_ptr & operator=( weak_ptr const & r ) BOOST_SP_NOEXCEPT
     {
         px = r.px;
         pn = r.pn;
@@ -106,13 +107,13 @@ public:
 
     // for better efficiency in the T == Y case
     weak_ptr( weak_ptr && r )
-    BOOST_NOEXCEPT : px( r.px ), pn( static_cast< boost::detail::weak_count && >( r.pn ) )
+    BOOST_SP_NOEXCEPT : px( r.px ), pn( static_cast< boost::detail::weak_count && >( r.pn ) )
     {
         r.px = 0;
     }
 
     // for better efficiency in the T == Y case
-    weak_ptr & operator=( weak_ptr && r ) BOOST_NOEXCEPT
+    weak_ptr & operator=( weak_ptr && r ) BOOST_SP_NOEXCEPT
     {
         this_type( static_cast< weak_ptr && >( r ) ).swap( *this );
         return *this;