MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / shared_count

Function shared_count

extern/boost/boost/smart_ptr/detail/shared_count.hpp:141–169  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

139 }
140
141 template<class Y> explicit shared_count( Y * p ): pi_( 0 )
142#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
143 , id_(shared_count_id)
144#endif
145 {
146#ifndef BOOST_NO_EXCEPTIONS
147
148 try
149 {
150 pi_ = new sp_counted_impl_p<Y>( p );
151 }
152 catch(...)
153 {
154 boost::checked_delete( p );
155 throw;
156 }
157
158#else
159
160 pi_ = new sp_counted_impl_p<Y>( p );
161
162 if( pi_ == 0 )
163 {
164 boost::checked_delete( p );
165 boost::throw_exception( std::bad_alloc() );
166 }
167
168#endif
169 }
170
171#if defined( BOOST_MSVC ) && BOOST_WORKAROUND( BOOST_MSVC, <= 1200 )
172 template<class Y, class D> shared_count( Y * p, D d ): pi_(0)

Callers 5

allocate_sharedFunction · 0.85
sp_pointer_constructFunction · 0.85
shared_ptrFunction · 0.85
shared_ptr.hppFile · 0.85

Calls 5

checked_deleteFunction · 0.85
get_deleterMethod · 0.80
throw_exceptionFunction · 0.50
getMethod · 0.45
releaseMethod · 0.45

Tested by

no test coverage detected