mirror of
https://github.com/boostorg/smart_ptr.git
synced 2025-08-01 05:34:36 +02:00
Remove uses of BOOST_SP_NOEXCEPT from scoped_array.hpp
This commit is contained in:
@@ -53,14 +53,14 @@ public:
|
|||||||
|
|
||||||
typedef T element_type;
|
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)
|
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
||||||
boost::sp_array_constructor_hook( px );
|
boost::sp_array_constructor_hook( px );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
~scoped_array() BOOST_SP_NOEXCEPT
|
~scoped_array() noexcept
|
||||||
{
|
{
|
||||||
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
|
||||||
boost::sp_array_destructor_hook( px );
|
boost::sp_array_destructor_hook( px );
|
||||||
@@ -81,17 +81,17 @@ public:
|
|||||||
return px[i];
|
return px[i];
|
||||||
}
|
}
|
||||||
|
|
||||||
T * get() const BOOST_SP_NOEXCEPT
|
T * get() const noexcept
|
||||||
{
|
{
|
||||||
return px;
|
return px;
|
||||||
}
|
}
|
||||||
|
|
||||||
explicit operator bool () const BOOST_SP_NOEXCEPT
|
explicit operator bool () const noexcept
|
||||||
{
|
{
|
||||||
return px != 0;
|
return px != 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
void swap(scoped_array & b) BOOST_SP_NOEXCEPT
|
void swap(scoped_array & b) noexcept
|
||||||
{
|
{
|
||||||
T * tmp = b.px;
|
T * tmp = b.px;
|
||||||
b.px = px;
|
b.px = px;
|
||||||
@@ -99,27 +99,27 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
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;
|
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;
|
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;
|
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;
|
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);
|
a.swap(b);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user