From 4fadd968fa12130524c8380f33fcfe25d4de79e5 Mon Sep 17 00:00:00 2001 From: DongHun Kwak Date: Wed, 13 Sep 2017 11:24:46 +0900 Subject: Imported Upstream version 1.65.0 Change-Id: Icf8400b375482cb11bcf77440a6934ba360d6ba4 Signed-off-by: DongHun Kwak --- boost/smart_ptr/scoped_array.hpp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'boost/smart_ptr/scoped_array.hpp') diff --git a/boost/smart_ptr/scoped_array.hpp b/boost/smart_ptr/scoped_array.hpp index f847c094e4..05dd05aea8 100644 --- a/boost/smart_ptr/scoped_array.hpp +++ b/boost/smart_ptr/scoped_array.hpp @@ -8,8 +8,7 @@ // accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // -// http://www.boost.org/libs/smart_ptr/scoped_array.htm -// +// See http://www.boost.org/libs/smart_ptr/ for documentation. #include #include @@ -62,7 +61,7 @@ public: #endif } - ~scoped_array() // never throws + ~scoped_array() BOOST_SP_NOEXCEPT { #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS) boost::sp_array_destructor_hook( px ); @@ -70,20 +69,20 @@ public: boost::checked_array_delete( px ); } - void reset(T * p = 0) // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + void reset(T * p = 0) BOOST_SP_NOEXCEPT_WITH_ASSERT { BOOST_ASSERT( p == 0 || p != px ); // catch self-reset errors this_type(p).swap(*this); } - T & operator[](std::ptrdiff_t i) const // never throws (but has a BOOST_ASSERT in it, so not marked with BOOST_NOEXCEPT) + T & operator[](std::ptrdiff_t i) const BOOST_SP_NOEXCEPT_WITH_ASSERT { BOOST_ASSERT( px != 0 ); BOOST_ASSERT( i >= 0 ); return px[i]; } - T * get() const BOOST_NOEXCEPT + T * get() const BOOST_SP_NOEXCEPT { return px; } @@ -91,7 +90,7 @@ public: // implicit conversion to "bool" #include - void swap(scoped_array & b) BOOST_NOEXCEPT + void swap(scoped_array & b) BOOST_SP_NOEXCEPT { T * tmp = b.px; b.px = px; @@ -101,29 +100,29 @@ public: #if !defined( BOOST_NO_CXX11_NULLPTR ) -template inline bool operator==( scoped_array const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +template inline bool operator==( scoped_array const & p, boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT { return p.get() == 0; } -template inline bool operator==( boost::detail::sp_nullptr_t, scoped_array const & p ) BOOST_NOEXCEPT +template inline bool operator==( boost::detail::sp_nullptr_t, scoped_array const & p ) BOOST_SP_NOEXCEPT { return p.get() == 0; } -template inline bool operator!=( scoped_array const & p, boost::detail::sp_nullptr_t ) BOOST_NOEXCEPT +template inline bool operator!=( scoped_array const & p, boost::detail::sp_nullptr_t ) BOOST_SP_NOEXCEPT { return p.get() != 0; } -template inline bool operator!=( boost::detail::sp_nullptr_t, scoped_array const & p ) BOOST_NOEXCEPT +template inline bool operator!=( boost::detail::sp_nullptr_t, scoped_array const & p ) BOOST_SP_NOEXCEPT { return p.get() != 0; } #endif -template inline void swap(scoped_array & a, scoped_array & b) BOOST_NOEXCEPT +template inline void swap(scoped_array & a, scoped_array & b) BOOST_SP_NOEXCEPT { a.swap(b); } -- cgit v1.2.3