diff options
Diffstat (limited to 'boost/smart_ptr/weak_ptr.hpp')
-rw-r--r-- | boost/smart_ptr/weak_ptr.hpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/boost/smart_ptr/weak_ptr.hpp b/boost/smart_ptr/weak_ptr.hpp index e3e9ad9bde..f3411f7225 100644 --- a/boost/smart_ptr/weak_ptr.hpp +++ b/boost/smart_ptr/weak_ptr.hpp @@ -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; |