Index: detail/operator_bool.hpp =================================================================== --- detail/operator_bool.hpp (revision 81354) +++ detail/operator_bool.hpp (working copy) @@ -8,7 +8,7 @@ #if ( defined(__SUNPRO_CC) && BOOST_WORKAROUND(__SUNPRO_CC, < 0x570) ) || defined(__CINT__) - operator bool () const + operator bool () const BOOST_NOEXCEPT { return px != 0; } @@ -21,7 +21,7 @@ typedef void (*unspecified_bool_type)( this_type*** ); - operator unspecified_bool_type() const // never throws + operator unspecified_bool_type() const BOOST_NOEXCEPT { return px == 0? 0: unspecified_bool; } @@ -33,7 +33,7 @@ typedef element_type * (this_type::*unspecified_bool_type)() const; - operator unspecified_bool_type() const // never throws + operator unspecified_bool_type() const BOOST_NOEXCEPT { return px == 0? 0: &this_type::get; } @@ -42,7 +42,7 @@ typedef element_type * this_type::*unspecified_bool_type; - operator unspecified_bool_type() const // never throws + operator unspecified_bool_type() const BOOST_NOEXCEPT { return px == 0? 0: &this_type::px; } @@ -50,7 +50,7 @@ #endif // operator! is redundant, but some compilers need it - bool operator! () const // never throws + bool operator! () const BOOST_NOEXCEPT { return px == 0; } Index: weak_ptr.hpp =================================================================== --- weak_ptr.hpp (revision 81354) +++ weak_ptr.hpp (working copy) @@ -31,7 +31,7 @@ typedef typename boost::detail::sp_element< T >::type element_type; - weak_ptr(): px(0), pn() // never throws in 1.30+ + weak_ptr() BOOST_NOEXCEPT : px(0), pn() // never throws in 1.30+ { } @@ -41,11 +41,11 @@ // ... except in C++0x, move disables the implicit copy - weak_ptr( weak_ptr const & r ): px( r.px ), pn( r.pn ) // never throws + weak_ptr( weak_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) { } - weak_ptr & operator=( weak_ptr const & r ) // never throws + weak_ptr & operator=( weak_ptr const & r ) BOOST_NOEXCEPT { px = r.px; pn = r.pn; @@ -81,7 +81,7 @@ weak_ptr( weak_ptr const & r ) #endif - : px(r.lock().get()), pn(r.pn) // never throws + BOOST_NOEXCEPT : px(r.lock().get()), pn(r.pn) { boost::detail::sp_assert_convertible< Y, T >(); } @@ -98,20 +98,21 @@ weak_ptr( weak_ptr && r ) #endif - : px( r.lock().get() ), pn( static_cast< boost::detail::weak_count && >( r.pn ) ) // never throws + BOOST_NOEXCEPT : px( r.lock().get() ), pn( static_cast< boost::detail::weak_count && >( r.pn ) ) { boost::detail::sp_assert_convertible< Y, T >(); r.px = 0; } // for better efficiency in the T == Y case - weak_ptr( weak_ptr && r ): px( r.px ), pn( static_cast< boost::detail::weak_count && >( r.pn ) ) // never throws + weak_ptr( weak_ptr && r ) + BOOST_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 ) // never throws + weak_ptr & operator=( weak_ptr && r ) BOOST_NOEXCEPT { this_type( static_cast< weak_ptr && >( r ) ).swap( *this ); return *this; @@ -130,7 +131,7 @@ weak_ptr( shared_ptr const & r ) #endif - : px( r.px ), pn( r.pn ) // never throws + BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) { boost::detail::sp_assert_convertible< Y, T >(); } @@ -138,7 +139,7 @@ #if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1300) template - weak_ptr & operator=( weak_ptr const & r ) // never throws + weak_ptr & operator=( weak_ptr const & r ) BOOST_NOEXCEPT { boost::detail::sp_assert_convertible< Y, T >(); @@ -151,7 +152,7 @@ #if defined( BOOST_HAS_RVALUE_REFS ) template - weak_ptr & operator=( weak_ptr && r ) + weak_ptr & operator=( weak_ptr && r ) BOOST_NOEXCEPT { this_type( static_cast< weak_ptr && >( r ) ).swap( *this ); return *this; @@ -160,7 +161,7 @@ #endif template - weak_ptr & operator=( shared_ptr const & r ) // never throws + weak_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT { boost::detail::sp_assert_convertible< Y, T >(); @@ -172,17 +173,17 @@ #endif - shared_ptr lock() const // never throws + shared_ptr lock() const BOOST_NOEXCEPT { return shared_ptr( *this, boost::detail::sp_nothrow_tag() ); } - long use_count() const // never throws + long use_count() const BOOST_NOEXCEPT { return pn.use_count(); } - bool expired() const // never throws + bool expired() const BOOST_NOEXCEPT { return pn.use_count() == 0; } @@ -192,12 +193,12 @@ return pn.empty(); } - void reset() // never throws in 1.30+ + void reset() BOOST_NOEXCEPT // never throws in 1.30+ { this_type().swap(*this); } - void swap(this_type & other) // never throws + void swap(this_type & other) BOOST_NOEXCEPT { std::swap(px, other.px); pn.swap(other.pn); @@ -210,12 +211,12 @@ pn = r.pn; } - template bool owner_before( weak_ptr const & rhs ) const + template bool owner_before( weak_ptr const & rhs ) const BOOST_NOEXCEPT { return pn < rhs.pn; } - template bool owner_before( shared_ptr const & rhs ) const + template bool owner_before( shared_ptr const & rhs ) const BOOST_NOEXCEPT { return pn < rhs.pn; } @@ -237,12 +238,12 @@ }; // weak_ptr -template inline bool operator<(weak_ptr const & a, weak_ptr const & b) +template inline bool operator<(weak_ptr const & a, weak_ptr const & b) BOOST_NOEXCEPT { return a.owner_before( b ); } -template void swap(weak_ptr & a, weak_ptr & b) +template void swap(weak_ptr & a, weak_ptr & b) BOOST_NOEXCEPT { a.swap(b); } Index: intrusive_ptr.hpp =================================================================== --- intrusive_ptr.hpp (revision 81354) +++ intrusive_ptr.hpp (working copy) @@ -58,7 +58,7 @@ typedef T element_type; - intrusive_ptr(): px( 0 ) + intrusive_ptr() BOOST_NOEXCEPT : px( 0 ) { } @@ -110,12 +110,12 @@ #if defined( BOOST_HAS_RVALUE_REFS ) - intrusive_ptr(intrusive_ptr && rhs): px( rhs.px ) + intrusive_ptr(intrusive_ptr && rhs) BOOST_NOEXCEPT : px( rhs.px ) { rhs.px = 0; } - intrusive_ptr & operator=(intrusive_ptr && rhs) + intrusive_ptr & operator=(intrusive_ptr && rhs) BOOST_NOEXCEPT { this_type( static_cast< intrusive_ptr && >( rhs ) ).swap(*this); return *this; @@ -135,7 +135,7 @@ return *this; } - void reset() + void reset() BOOST_NOEXCEPT { this_type().swap( *this ); } @@ -145,7 +145,7 @@ this_type( rhs ).swap( *this ); } - T * get() const + T * get() const BOOST_NOEXCEPT { return px; } @@ -165,7 +165,7 @@ // implicit conversion to "bool" #include - void swap(intrusive_ptr & rhs) + void swap(intrusive_ptr & rhs) BOOST_NOEXCEPT { T * tmp = px; px = rhs.px; Index: enable_shared_from_this.hpp =================================================================== --- enable_shared_from_this.hpp (revision 81354) +++ enable_shared_from_this.hpp (working copy) @@ -25,20 +25,20 @@ { protected: - enable_shared_from_this() + enable_shared_from_this() BOOST_NOEXCEPT { } - enable_shared_from_this(enable_shared_from_this const &) + enable_shared_from_this(enable_shared_from_this const &) BOOST_NOEXCEPT { } - enable_shared_from_this & operator=(enable_shared_from_this const &) + enable_shared_from_this & operator=(enable_shared_from_this const &) BOOST_NOEXCEPT { return *this; } - ~enable_shared_from_this() + ~enable_shared_from_this() BOOST_NOEXCEPT // ~weak_ptr newer throws, so this call also must not throw { } Index: make_shared_object.hpp =================================================================== --- make_shared_object.hpp (revision 81354) +++ make_shared_object.hpp (working copy) @@ -67,12 +67,12 @@ public: - sp_ms_deleter(): initialized_( false ) + sp_ms_deleter() BOOST_NOEXCEPT : initialized_( false ) { } // optimization: do not copy storage_ - sp_ms_deleter( sp_ms_deleter const & ): initialized_( false ) + sp_ms_deleter( sp_ms_deleter const & ) BOOST_NOEXCEPT : initialized_( false ) { } @@ -86,12 +86,12 @@ destroy(); } - void * address() + void * address() BOOST_NOEXCEPT { return storage_.data_; } - void set_initialized() + void set_initialized() BOOST_NOEXCEPT { initialized_ = true; } @@ -99,7 +99,7 @@ #if defined( BOOST_HAS_RVALUE_REFS ) -template< class T > T&& sp_forward( T & t ) +template< class T > T&& sp_forward( T & t ) BOOST_NOEXCEPT { return static_cast< T&& >( t ); } Index: shared_ptr.hpp =================================================================== --- shared_ptr.hpp (revision 81354) +++ shared_ptr.hpp (working copy) @@ -324,7 +324,7 @@ typedef typename boost::detail::sp_element< T >::type element_type; - shared_ptr(): px( 0 ), pn() // never throws in 1.30+ + shared_ptr() BOOST_NOEXCEPT : px( 0 ), pn() // never throws in 1.30+ { } @@ -358,7 +358,7 @@ // ... except in C++0x, move disables the implicit copy - shared_ptr( shared_ptr const & r ): px( r.px ), pn( r.pn ) // never throws + shared_ptr( shared_ptr const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) { } @@ -374,7 +374,8 @@ } template - shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag ): px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) // never throws + shared_ptr( weak_ptr const & r, boost::detail::sp_nothrow_tag ) + BOOST_NOEXCEPT : px( 0 ), pn( r.pn, boost::detail::sp_nothrow_tag() ) { if( !pn.empty() ) { @@ -392,24 +393,26 @@ shared_ptr( shared_ptr const & r ) #endif - : px( r.px ), pn( r.pn ) // never throws + BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) { boost::detail::sp_assert_convertible< Y, T >(); } // aliasing template< class Y > - shared_ptr( shared_ptr const & r, element_type * p ): px( p ), pn( r.pn ) // never throws + shared_ptr( shared_ptr const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn ) { } template - shared_ptr(shared_ptr const & r, boost::detail::static_cast_tag): px(static_cast(r.px)), pn(r.pn) + shared_ptr(shared_ptr const & r, boost::detail::static_cast_tag) + BOOST_NOEXCEPT : px(static_cast(r.px)), pn(r.pn) { } template - shared_ptr(shared_ptr const & r, boost::detail::const_cast_tag): px(const_cast(r.px)), pn(r.pn) + shared_ptr(shared_ptr const & r, boost::detail::const_cast_tag) + BOOST_NOEXCEPT : px(const_cast(r.px)), pn(r.pn) { } @@ -480,7 +483,7 @@ // assignment - shared_ptr & operator=( shared_ptr const & r ) // never throws + shared_ptr & operator=( shared_ptr const & r ) BOOST_NOEXCEPT { this_type(r).swap(*this); return *this; @@ -489,7 +492,7 @@ #if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400) template - shared_ptr & operator=(shared_ptr const & r) // never throws + shared_ptr & operator=(shared_ptr const & r) BOOST_NOEXCEPT { this_type(r).swap(*this); return *this; @@ -523,7 +526,7 @@ #if defined( BOOST_HAS_RVALUE_REFS ) - shared_ptr( shared_ptr && r ): px( r.px ), pn() // never throws + shared_ptr( shared_ptr && r ) BOOST_NOEXCEPT : px( r.px ), pn() { pn.swap( r.pn ); r.px = 0; @@ -539,7 +542,7 @@ shared_ptr( shared_ptr && r ) #endif - : px( r.px ), pn() // never throws + BOOST_NOEXCEPT : px( r.px ), pn() { boost::detail::sp_assert_convertible< Y, T >(); @@ -547,14 +550,14 @@ r.px = 0; } - shared_ptr & operator=( shared_ptr && r ) // never throws + shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT { this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); return *this; } template - shared_ptr & operator=( shared_ptr && r ) // never throws + shared_ptr & operator=( shared_ptr && r ) BOOST_NOEXCEPT { this_type( static_cast< shared_ptr && >( r ) ).swap( *this ); return *this; @@ -562,7 +565,7 @@ #endif - void reset() // never throws in 1.30+ + void reset() BOOST_NOEXCEPT // never throws in 1.30+ { this_type().swap(*this); } @@ -587,20 +590,23 @@ { this_type( r, p ).swap( *this ); } - - typename boost::detail::sp_dereference< T >::type operator* () const // never throws + + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + typename boost::detail::sp_dereference< T >::type operator* () const { BOOST_ASSERT( px != 0 ); return *px; } - - typename boost::detail::sp_member_access< T >::type operator-> () const // never throws + + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + typename boost::detail::sp_member_access< T >::type operator-> () const { BOOST_ASSERT( px != 0 ); return px; } - - typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const // never throws + + // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + typename boost::detail::sp_array_access< T >::type operator[] ( std::ptrdiff_t i ) const { BOOST_ASSERT( px != 0 ); BOOST_ASSERT( i >= 0 && ( i < boost::detail::sp_extent< T >::value || boost::detail::sp_extent< T >::value == 0 ) ); @@ -608,7 +614,7 @@ return px[ i ]; } - element_type * get() const // never throws + element_type * get() const BOOST_NOEXCEPT { return px; } @@ -616,28 +622,28 @@ // implicit conversion to "bool" #include - bool unique() const // never throws + bool unique() const BOOST_NOEXCEPT { return pn.unique(); } - long use_count() const // never throws + long use_count() const BOOST_NOEXCEPT { return pn.use_count(); } - void swap( shared_ptr & other ) // never throws + void swap( shared_ptr & other ) BOOST_NOEXCEPT { std::swap(px, other.px); pn.swap(other.pn); } - template bool owner_before( shared_ptr const & rhs ) const + template bool owner_before( shared_ptr const & rhs ) const BOOST_NOEXCEPT { return pn < rhs.pn; } - template bool owner_before( weak_ptr const & rhs ) const + template bool owner_before( weak_ptr const & rhs ) const BOOST_NOEXCEPT { return pn < rhs.pn; } @@ -647,7 +653,7 @@ return pn.get_deleter( ti ); } - bool _internal_equiv( shared_ptr const & r ) const + bool _internal_equiv( shared_ptr const & r ) const BOOST_NOEXCEPT { return px == r.px && pn == r.pn; } @@ -670,12 +676,12 @@ }; // shared_ptr -template inline bool operator==(shared_ptr const & a, shared_ptr const & b) +template inline bool operator==(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT { return a.get() == b.get(); } -template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) +template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT { return a.get() != b.get(); } @@ -684,19 +690,19 @@ // Resolve the ambiguity between our op!= and the one in rel_ops -template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) +template inline bool operator!=(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT { return a.get() != b.get(); } #endif -template inline bool operator<(shared_ptr const & a, shared_ptr const & b) +template inline bool operator<(shared_ptr const & a, shared_ptr const & b) BOOST_NOEXCEPT { return a.owner_before( b ); } -template inline void swap(shared_ptr & a, shared_ptr & b) +template inline void swap(shared_ptr & a, shared_ptr & b) BOOST_NOEXCEPT { a.swap(b); } @@ -741,7 +747,7 @@ // get_pointer() enables boost::mem_fn to recognize shared_ptr -template inline T * get_pointer(shared_ptr const & p) +template inline T * get_pointer(shared_ptr const & p) BOOST_NOEXCEPT { return p.get(); } @@ -854,7 +860,7 @@ #if !defined(BOOST_SP_NO_ATOMIC_ACCESS) -template inline bool atomic_is_lock_free( shared_ptr const * /*p*/ ) +template inline bool atomic_is_lock_free( shared_ptr const * /*p*/ ) BOOST_NOEXCEPT { return false; } @@ -933,7 +939,7 @@ template< class T > struct hash; -template< class T > std::size_t hash_value( boost::shared_ptr const & p ) +template< class T > std::size_t hash_value( boost::shared_ptr const & p ) BOOST_NOEXCEPT { return boost::hash< T* >()( p.get() ); } Index: scoped_ptr.hpp =================================================================== --- scoped_ptr.hpp (revision 81354) +++ scoped_ptr.hpp (working copy) @@ -63,7 +63,7 @@ #ifndef BOOST_NO_AUTO_PTR - explicit scoped_ptr( std::auto_ptr p ): px( p.release() ) // never throws + explicit scoped_ptr( std::auto_ptr p ) BOOST_NOEXCEPT : px( p.release() ) { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_scalar_constructor_hook( px ); @@ -98,7 +98,7 @@ return px; } - T * get() const // never throws + T * get() const BOOST_NOEXCEPT { return px; } @@ -106,7 +106,7 @@ // implicit conversion to "bool" #include - void swap(scoped_ptr & b) // never throws + void swap(scoped_ptr & b) BOOST_NOEXCEPT { T * tmp = b.px; b.px = px; @@ -114,14 +114,14 @@ } }; -template inline void swap(scoped_ptr & a, scoped_ptr & b) // never throws +template inline void swap(scoped_ptr & a, scoped_ptr & b) BOOST_NOEXCEPT { a.swap(b); } // get_pointer(p) is a generic way to say p.get() -template inline T * get_pointer(scoped_ptr const & p) +template inline T * get_pointer(scoped_ptr const & p) BOOST_NOEXCEPT { return p.get(); } Index: shared_array.hpp =================================================================== --- shared_array.hpp (revision 81354) +++ shared_array.hpp (working copy) @@ -56,7 +56,7 @@ typedef T element_type; - shared_array(): px( 0 ), pn() // never throws + shared_array() BOOST_NOEXCEPT : px( 0 ), pn() { } @@ -90,11 +90,11 @@ // ... except in C++0x, move disables the implicit copy - shared_array( shared_array const & r ): px( r.px ), pn( r.pn ) // never throws + shared_array( shared_array const & r ) BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) { } - shared_array( shared_array && r ): px( r.px ), pn() // never throws + shared_array( shared_array && r ) BOOST_NOEXCEPT : px( r.px ), pn() { pn.swap( r.pn ); r.px = 0; @@ -114,7 +114,7 @@ shared_array( shared_array const & r ) #endif - : px( r.px ), pn( r.pn ) // never throws + BOOST_NOEXCEPT : px( r.px ), pn( r.pn ) // never throws { boost::detail::sp_assert_convertible< Y[], T[] >(); } @@ -122,13 +122,13 @@ // aliasing template< class Y > - shared_array( shared_array const & r, element_type * p ): px( p ), pn( r.pn ) // never throws + shared_array( shared_array const & r, element_type * p ) BOOST_NOEXCEPT : px( p ), pn( r.pn ) { } // assignment - shared_array & operator=( shared_array const & r ) // never throws + shared_array & operator=( shared_array const & r ) BOOST_NOEXCEPT { this_type( r ).swap( *this ); return *this; @@ -137,7 +137,7 @@ #if !defined(BOOST_MSVC) || (BOOST_MSVC >= 1400) template - shared_array & operator=( shared_array const & r ) // never throws + shared_array & operator=( shared_array const & r ) BOOST_NOEXCEPT { this_type( r ).swap( *this ); return *this; @@ -147,14 +147,14 @@ #if defined( BOOST_HAS_RVALUE_REFS ) - shared_array & operator=( shared_array && r ) // never throws + shared_array & operator=( shared_array && r ) BOOST_NOEXCEPT { this_type( static_cast< shared_array && >( r ) ).swap( *this ); return *this; } template - shared_array & operator=( shared_array && r ) // never throws + shared_array & operator=( shared_array && r ) BOOST_NOEXCEPT { this_type( static_cast< shared_array && >( r ) ).swap( *this ); return *this; @@ -162,7 +162,7 @@ #endif - void reset() // never throws + void reset() BOOST_NOEXCEPT { this_type().swap( *this ); } @@ -188,14 +188,14 @@ this_type( r, p ).swap( *this ); } - T & operator[] (std::ptrdiff_t i) const // never throws + T & operator[] (std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) { BOOST_ASSERT(px != 0); BOOST_ASSERT(i >= 0); return px[i]; } - T * get() const // never throws + T * get() const BOOST_NOEXCEPT { return px; } @@ -203,17 +203,17 @@ // implicit conversion to "bool" #include - bool unique() const // never throws + bool unique() const BOOST_NOEXCEPT { return pn.unique(); } - long use_count() const // never throws + long use_count() const BOOST_NOEXCEPT { return pn.use_count(); } - void swap(shared_array & other) // never throws + void swap(shared_array & other) BOOST_NOEXCEPT { std::swap(px, other.px); pn.swap(other.pn); @@ -233,22 +233,22 @@ }; // shared_array -template inline bool operator==(shared_array const & a, shared_array const & b) // never throws +template inline bool operator==(shared_array const & a, shared_array const & b) BOOST_NOEXCEPT { return a.get() == b.get(); } -template inline bool operator!=(shared_array const & a, shared_array const & b) // never throws +template inline bool operator!=(shared_array const & a, shared_array const & b) BOOST_NOEXCEPT { return a.get() != b.get(); } -template inline bool operator<(shared_array const & a, shared_array const & b) // never throws +template inline bool operator<(shared_array const & a, shared_array const & b) BOOST_NOEXCEPT { return std::less()(a.get(), b.get()); } -template void swap(shared_array & a, shared_array & b) // never throws +template void swap(shared_array & a, shared_array & b) BOOST_NOEXCEPT { a.swap(b); } Index: scoped_array.hpp =================================================================== --- scoped_array.hpp (revision 81354) +++ scoped_array.hpp (working copy) @@ -53,7 +53,7 @@ typedef T element_type; - explicit scoped_array( T * p = 0 ) : px( p ) // never throws + explicit scoped_array( T * p = 0 ) BOOST_NOEXCEPT : px( p ) { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_array_constructor_hook( px ); @@ -68,20 +68,20 @@ boost::checked_array_delete( px ); } - void reset(T * p = 0) // never throws + void reset(T * p = 0) // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) { BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors this_type(p).swap(*this); } - T & operator[](std::ptrdiff_t i) const // never throws + T & operator[](std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) { BOOST_ASSERT( px != 0 ); BOOST_ASSERT( i >= 0 ); return px[i]; } - T * get() const // never throws + T * get() const BOOST_NOEXCEPT { return px; } @@ -89,7 +89,7 @@ // implicit conversion to "bool" #include - void swap(scoped_array & b) // never throws + void swap(scoped_array & b) BOOST_NOEXCEPT { T * tmp = b.px; b.px = px; @@ -97,7 +97,7 @@ } }; -template inline void swap(scoped_array & a, scoped_array & b) // never throws +template inline void swap(scoped_array & a, scoped_array & b) BOOST_NOEXCEPT { a.swap(b); }