]> git.donarmstrong.com Git - rsem.git/blobdiff - boost/smart_ptr/detail/sp_counted_impl.hpp
Updated boost to v1.55.0
[rsem.git] / boost / smart_ptr / detail / sp_counted_impl.hpp
index 397421ae9fae05e5efa6d081333a86ed5f6e1dcf..d15cd3cf1cd38d4898e933de2931acb52e8444f8 100644 (file)
@@ -83,6 +83,11 @@ public:
         return 0;
     }
 
+    virtual void * get_untyped_deleter()
+    {
+        return 0;
+    }
+
 #if defined(BOOST_SP_USE_STD_ALLOCATOR)
 
     void * operator new( std::size_t )
@@ -135,7 +140,11 @@ public:
 
     // pre: d(p) must not throw
 
-    sp_counted_impl_pd( P p, D d ): ptr(p), del(d)
+    sp_counted_impl_pd( P p, D & d ): ptr( p ), del( d )
+    {
+    }
+
+    sp_counted_impl_pd( P p ): ptr( p ), del()
     {
     }
 
@@ -149,6 +158,11 @@ public:
         return ti == BOOST_SP_TYPEID(D)? &reinterpret_cast<char&>( del ): 0;
     }
 
+    virtual void * get_untyped_deleter()
+    {
+        return &reinterpret_cast<char&>( del );
+    }
+
 #if defined(BOOST_SP_USE_STD_ALLOCATOR)
 
     void * operator new( std::size_t )
@@ -195,7 +209,11 @@ public:
 
     // pre: d( p ) must not throw
 
-    sp_counted_impl_pda( P p, D d, A a ): p_( p ), d_( d ), a_( a )
+    sp_counted_impl_pda( P p, D & d, A a ): p_( p ), d_( d ), a_( a )
+    {
+    }
+
+    sp_counted_impl_pda( P p, A a ): p_( p ), d_(), a_( a )
     {
     }
 
@@ -218,6 +236,11 @@ public:
     {
         return ti == BOOST_SP_TYPEID( D )? &reinterpret_cast<char&>( d_ ): 0;
     }
+
+    virtual void * get_untyped_deleter()
+    {
+        return &reinterpret_cast<char&>( d_ );
+    }
 };
 
 #ifdef __CODEGUARD__