]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/boost/boost/smart_ptr/detail/sp_counted_impl.hpp
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / boost / smart_ptr / detail / sp_counted_impl.hpp
index 96c9da383070acc4a2d1f3fe87deddaf1f6a428b..56b9efacea0d77b95005f32c6ad0832b8dcdaefa 100644 (file)
 // http://www.boost.org/LICENSE_1_0.txt)
 //
 
-#include <boost/config.hpp>
-
 #if defined(BOOST_SP_USE_STD_ALLOCATOR) && defined(BOOST_SP_USE_QUICK_ALLOCATOR)
 # error BOOST_SP_USE_STD_ALLOCATOR and BOOST_SP_USE_QUICK_ALLOCATOR are incompatible.
 #endif
 
-#include <boost/checked_delete.hpp>
 #include <boost/smart_ptr/detail/sp_counted_base.hpp>
 #include <boost/smart_ptr/detail/sp_noexcept.hpp>
+#include <boost/checked_delete.hpp>
 #include <boost/core/addressof.hpp>
+#include <boost/config.hpp>
 
 #if defined(BOOST_SP_USE_QUICK_ALLOCATOR)
 #include <boost/smart_ptr/detail/quick_allocator.hpp>
 #endif
 
-#if defined(BOOST_SP_USE_STD_ALLOCATOR)
-#include <memory>           // std::allocator
-#endif
-
+#include <memory>           // std::allocator, std::allocator_traits
 #include <cstddef>          // std::size_t
 
 namespace boost
@@ -85,7 +81,7 @@ public:
 #endif
     }
 
-    virtual void dispose() BOOST_SP_NOEXCEPT
+    void dispose() BOOST_SP_NOEXCEPT BOOST_OVERRIDE
     {
 #if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
         boost::sp_scalar_destructor_hook( px_, sizeof(X), this );
@@ -93,17 +89,17 @@ public:
         boost::checked_delete( px_ );
     }
 
-    virtual void * get_deleter( sp_typeinfo_ const & ) BOOST_SP_NOEXCEPT
+    void * get_deleter( sp_typeinfo_ const & ) BOOST_SP_NOEXCEPT BOOST_OVERRIDE
     {
         return 0;
     }
 
-    virtual void * get_local_deleter( sp_typeinfo_ const & ) BOOST_SP_NOEXCEPT
+    void * get_local_deleter( sp_typeinfo_ const & ) BOOST_SP_NOEXCEPT BOOST_OVERRIDE
     {
         return 0;
     }
 
-    virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT
+    void * get_untyped_deleter() BOOST_SP_NOEXCEPT BOOST_OVERRIDE
     {
         return 0;
     }
@@ -168,22 +164,22 @@ public:
     {
     }
 
-    virtual void dispose() BOOST_SP_NOEXCEPT
+    void dispose() BOOST_SP_NOEXCEPT BOOST_OVERRIDE
     {
         del( ptr );
     }
 
-    virtual void * get_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT
+    void * get_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT BOOST_OVERRIDE
     {
         return ti == BOOST_SP_TYPEID_(D)? &reinterpret_cast<char&>( del ): 0;
     }
 
-    virtual void * get_local_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT
+    void * get_local_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT BOOST_OVERRIDE
     {
         return ti == BOOST_SP_TYPEID_(D)? boost::detail::get_local_deleter( boost::addressof( del ) ): 0;
     }
 
-    virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT
+    void * get_untyped_deleter() BOOST_SP_NOEXCEPT BOOST_OVERRIDE
     {
         return &reinterpret_cast<char&>( del );
     }
@@ -242,12 +238,12 @@ public:
     {
     }
 
-    virtual void dispose() BOOST_SP_NOEXCEPT
+    void dispose() BOOST_SP_NOEXCEPT BOOST_OVERRIDE
     {
         d_( p_ );
     }
 
-    virtual void destroy() BOOST_SP_NOEXCEPT
+    void destroy() BOOST_SP_NOEXCEPT BOOST_OVERRIDE
     {
 #if !defined( BOOST_NO_CXX11_ALLOCATOR )
 
@@ -266,17 +262,17 @@ public:
         a2.deallocate( this, 1 );
     }
 
-    virtual void * get_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT
+    void * get_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT BOOST_OVERRIDE
     {
         return ti == BOOST_SP_TYPEID_( D )? &reinterpret_cast<char&>( d_ ): 0;
     }
 
-    virtual void * get_local_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT
+    void * get_local_deleter( sp_typeinfo_ const & ti ) BOOST_SP_NOEXCEPT BOOST_OVERRIDE
     {
         return ti == BOOST_SP_TYPEID_( D )? boost::detail::get_local_deleter( boost::addressof( d_ ) ): 0;
     }
 
-    virtual void * get_untyped_deleter() BOOST_SP_NOEXCEPT
+    void * get_untyped_deleter() BOOST_SP_NOEXCEPT BOOST_OVERRIDE
     {
         return &reinterpret_cast<char&>( d_ );
     }