1 #ifndef BOOSTER_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED 2 #define BOOSTER_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED 15 #include <booster/config.h> 17 #include <booster/checked_delete.h> 18 #include <booster/smart_ptr/sp_counted_base.h> 20 #if defined(BOOSTER_SP_USE_STD_ALLOCATOR) 21 #include <booster/auto_ptr_inc.h> 49 virtual void dispose()
51 booster::checked_delete( px_ );
54 virtual void * get_deleter( detail::sp_typeinfo
const & )
59 void *
operator new( std::size_t )
61 return std::allocator<this_type>().allocate( 1, static_cast<this_type *>(0) );
64 void operator delete(
void * p )
66 std::allocator<this_type>().deallocate( static_cast<this_type *>(p), 1 );
74 # pragma option push -Vx- 97 virtual void dispose()
102 virtual void * get_deleter( detail::sp_typeinfo
const & ti )
104 return ti == BOOSTER_SP_TYPEID(D)? &
reinterpret_cast<char&
>( del ): 0;
107 void *
operator new( std::size_t )
109 return std::allocator<this_type>().allocate( 1, static_cast<this_type *>(0) );
112 void operator delete(
void * p )
114 std::allocator<this_type>().deallocate( static_cast<this_type *>(p), 1 );
140 virtual void dispose()
145 virtual void destroy()
147 typedef typename A::template rebind< this_type >::other A2;
152 a2.deallocate(
this, 1 );
155 virtual void * get_deleter( detail::sp_typeinfo
const & ti )
157 return ti == BOOSTER_SP_TYPEID( D )? &
reinterpret_cast<char&
>( d_ ): 0;
169 #endif // #ifndef BOOST_SMART_PTR_DETAIL_SP_COUNTED_IMPL_HPP_INCLUDED Definition: sp_counted_base.h:39
Definition: sp_counted_impl.h:77
Definition: sp_counted_impl.h:32
Definition: sp_counted_impl.h:119
Booster library namespace. The library that implements Boost Like API in ABI backward compatible way...
Definition: application.h:23