summaryrefslogtreecommitdiff
path: root/boost/smart_ptr/detail/sp_counted_impl.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'boost/smart_ptr/detail/sp_counted_impl.hpp')
-rw-r--r--boost/smart_ptr/detail/sp_counted_impl.hpp31
1 files changed, 16 insertions, 15 deletions
diff --git a/boost/smart_ptr/detail/sp_counted_impl.hpp b/boost/smart_ptr/detail/sp_counted_impl.hpp
index 3c0502a4ec..29718b6b8c 100644
--- a/boost/smart_ptr/detail/sp_counted_impl.hpp
+++ b/boost/smart_ptr/detail/sp_counted_impl.hpp
@@ -26,6 +26,7 @@
#include <boost/checked_delete.hpp>
#include <boost/smart_ptr/detail/sp_counted_base.hpp>
+#include <boost/smart_ptr/detail/sp_noexcept.hpp>
#include <boost/core/addressof.hpp>
#if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
@@ -55,12 +56,12 @@ namespace detail
template<class D> class local_sp_deleter;
-template<class D> D * get_local_deleter( D * /*p*/ )
+template<class D> D * get_local_deleter( D * /*p*/ ) BOOST_SP_NOEXCEPT
{
return 0;
}
-template<class D> D * get_local_deleter( local_sp_deleter<D> * p );
+template<class D> D * get_local_deleter( local_sp_deleter<D> * p ) BOOST_SP_NOEXCEPT;
//
@@ -84,7 +85,7 @@ public:
#endif
}
- virtual void dispose() // nothrow
+ virtual void dispose() BOOST_SP_NOEXCEPT
{
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
boost::sp_scalar_destructor_hook( px_, sizeof(X), this );
@@ -92,17 +93,17 @@ public:
boost::checked_delete( px_ );
}
- virtual void * get_deleter( sp_typeinfo const & )
+ virtual void * get_deleter( sp_typeinfo const & ) BOOST_SP_NOEXCEPT
{
return 0;
}
- virtual void * get_local_deleter( sp_typeinfo const & )
+ virtual void * get_local_deleter( sp_typeinfo const & ) BOOST_SP_NOEXCEPT
{
return 0;
}
- virtual void * get_untyped_deleter()
+ virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT
{
return 0;
}
@@ -167,22 +168,22 @@ public:
{
}
- virtual void dispose() // nothrow
+ virtual void dispose() BOOST_SP_NOEXCEPT
{
del( ptr );
}
- virtual void * get_deleter( sp_typeinfo const & ti )
+ virtual void * get_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT
{
return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast<char&>( del ): 0;
}
- virtual void * get_local_deleter( sp_typeinfo const & ti )
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT
{
return ti == BOOST_SP_TYPEID(D)? boost::detail::get_local_deleter( boost::addressof( del ) ): 0;
}
- virtual void * get_untyped_deleter()
+ virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT
{
return &reinterpret_cast<char&>( del );
}
@@ -241,12 +242,12 @@ public:
{
}
- virtual void dispose() // nothrow
+ virtual void dispose() BOOST_SP_NOEXCEPT
{
d_( p_ );
}
- virtual void destroy() // nothrow
+ virtual void destroy() BOOST_SP_NOEXCEPT
{
#if !defined( BOOST_NO_CXX11_ALLOCATOR )
@@ -265,17 +266,17 @@ public:
a2.deallocate( this, 1 );
}
- virtual void * get_deleter( sp_typeinfo const & ti )
+ virtual void * get_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT
{
return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast<char&>( d_ ): 0;
}
- virtual void * get_local_deleter( sp_typeinfo const & ti )
+ virtual void * get_local_deleter( sp_typeinfo const & ti ) BOOST_SP_NOEXCEPT
{
return ti == BOOST_SP_TYPEID(D)? boost::detail::get_local_deleter( boost::addressof( d_ ) ): 0;
}
- virtual void * get_untyped_deleter()
+ virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT
{
return &reinterpret_cast<char&>( d_ );
}