diff options
Diffstat (limited to 'cutl/details/boost/smart_ptr/detail/sp_counted_impl.hpp')
-rw-r--r-- | cutl/details/boost/smart_ptr/detail/sp_counted_impl.hpp | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/cutl/details/boost/smart_ptr/detail/sp_counted_impl.hpp b/cutl/details/boost/smart_ptr/detail/sp_counted_impl.hpp index 5707803..d958544 100644 --- a/cutl/details/boost/smart_ptr/detail/sp_counted_impl.hpp +++ b/cutl/details/boost/smart_ptr/detail/sp_counted_impl.hpp @@ -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__ |