Skip to content

Commit

Permalink
Remove uses of BOOST_SP_NOEXCEPT from scoped_array.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
pdimov committed Oct 2, 2024
1 parent e19c2b1 commit 8a68e56
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions include/boost/smart_ptr/scoped_array.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ template<class T> class scoped_array // noncopyable

typedef T element_type;

explicit scoped_array( T * p = 0 ) BOOST_SP_NOEXCEPT : px( p )
explicit scoped_array( T * p = 0 ) noexcept : px( p )
{
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
boost::sp_array_constructor_hook( px );
#endif
}

~scoped_array() BOOST_SP_NOEXCEPT
~scoped_array() noexcept
{
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
boost::sp_array_destructor_hook( px );
Expand All @@ -81,45 +81,45 @@ template<class T> class scoped_array // noncopyable
return px[i];
}

T * get() const BOOST_SP_NOEXCEPT
T * get() const noexcept
{
return px;
}

explicit operator bool () const BOOST_SP_NOEXCEPT
explicit operator bool () const noexcept
{
return px != 0;
}

void swap(scoped_array & b) BOOST_SP_NOEXCEPT
void swap(scoped_array & b) noexcept
{
T * tmp = b.px;
b.px = px;
px = tmp;
}
};

template<class T> inline bool operator==( scoped_array<T> const & p, std::nullptr_t ) BOOST_SP_NOEXCEPT
template<class T> inline bool operator==( scoped_array<T> const & p, std::nullptr_t ) noexcept
{
return p.get() == 0;
}

template<class T> inline bool operator==( std::nullptr_t, scoped_array<T> const & p ) BOOST_SP_NOEXCEPT
template<class T> inline bool operator==( std::nullptr_t, scoped_array<T> const & p ) noexcept
{
return p.get() == 0;
}

template<class T> inline bool operator!=( scoped_array<T> const & p, std::nullptr_t ) BOOST_SP_NOEXCEPT
template<class T> inline bool operator!=( scoped_array<T> const & p, std::nullptr_t ) noexcept
{
return p.get() != 0;
}

template<class T> inline bool operator!=( std::nullptr_t, scoped_array<T> const & p ) BOOST_SP_NOEXCEPT
template<class T> inline bool operator!=( std::nullptr_t, scoped_array<T> const & p ) noexcept
{
return p.get() != 0;
}

template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) BOOST_SP_NOEXCEPT
template<class T> inline void swap(scoped_array<T> & a, scoped_array<T> & b) noexcept
{
a.swap(b);
}
Expand Down

0 comments on commit 8a68e56

Please sign in to comment.