forked from boostorg/smart_ptr
Merged revision(s) 82188 from trunk: Untabify.
[SVN r82189]
This commit is contained in:
@ -30,7 +30,7 @@ namespace detail
|
|||||||
|
|
||||||
inline uint32_t compare_and_swap( uint32_t * dest_, uint32_t compare_, uint32_t swap_ )
|
inline uint32_t compare_and_swap( uint32_t * dest_, uint32_t compare_, uint32_t swap_ )
|
||||||
{
|
{
|
||||||
return __builtin_cellAtomicCompareAndSwap32(dest_,compare_,swap_);
|
return __builtin_cellAtomicCompareAndSwap32(dest_,compare_,swap_);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline uint32_t atomic_fetch_and_add( uint32_t * pw, uint32_t dv )
|
inline uint32_t atomic_fetch_and_add( uint32_t * pw, uint32_t dv )
|
||||||
|
@ -910,12 +910,12 @@ public:
|
|||||||
deleter_ = deleter;
|
deleter_ = deleter;
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename D> D* get_deleter() const BOOST_NOEXCEPT
|
template<typename D> D* get_deleter() const BOOST_NOEXCEPT
|
||||||
{
|
{
|
||||||
return boost::detail::basic_get_deleter<D>( deleter_ );
|
return boost::detail::basic_get_deleter<D>( deleter_ );
|
||||||
}
|
}
|
||||||
|
|
||||||
template< class T> void operator()( T* )
|
template< class T> void operator()( T* )
|
||||||
{
|
{
|
||||||
BOOST_ASSERT( deleter_.use_count() <= 1 );
|
BOOST_ASSERT( deleter_.use_count() <= 1 );
|
||||||
deleter_.reset();
|
deleter_.reset();
|
||||||
@ -928,7 +928,7 @@ template<class D, class T> D * get_deleter( shared_ptr<T> const & p ) BOOST_NOEX
|
|||||||
{
|
{
|
||||||
D *del = boost::detail::basic_get_deleter<D>(p);
|
D *del = boost::detail::basic_get_deleter<D>(p);
|
||||||
|
|
||||||
if(del == 0)
|
if(del == 0)
|
||||||
{
|
{
|
||||||
boost::detail::esft2_deleter_wrapper *del_wrapper = boost::detail::basic_get_deleter<boost::detail::esft2_deleter_wrapper>(p);
|
boost::detail::esft2_deleter_wrapper *del_wrapper = boost::detail::basic_get_deleter<boost::detail::esft2_deleter_wrapper>(p);
|
||||||
// The following get_deleter method call is fully qualified because
|
// The following get_deleter method call is fully qualified because
|
||||||
@ -936,7 +936,7 @@ template<class D, class T> D * get_deleter( shared_ptr<T> const & p ) BOOST_NOEX
|
|||||||
if(del_wrapper) del = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter<D>();
|
if(del_wrapper) del = del_wrapper->::boost::detail::esft2_deleter_wrapper::get_deleter<D>();
|
||||||
}
|
}
|
||||||
|
|
||||||
return del;
|
return del;
|
||||||
}
|
}
|
||||||
|
|
||||||
// atomic access
|
// atomic access
|
||||||
|
@ -15,6 +15,6 @@ struct X
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
std::unique_ptr<X[]> px;
|
std::unique_ptr<X[]> px;
|
||||||
boost::shared_ptr<X> px2; px2 = px;
|
boost::shared_ptr<X> px2; px2 = px;
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,6 @@ struct X
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
std::unique_ptr<X[]> px;
|
std::unique_ptr<X[]> px;
|
||||||
boost::shared_ptr<X> px2( px );
|
boost::shared_ptr<X> px2( px );
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user