Esempio n. 1
0
inline shared_count::shared_count( weak_count const & r, sp_nothrow_tag ): pi_( r.pi_ )
{
    if( pi_ != 0 && !pi_->add_ref_lock() )
    {
        pi_ = 0;
    }
}
Esempio n. 2
0
inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ )
{
    if( pi_ == 0 || !pi_->add_ref_lock() )
    {
        throw trident::bad_weak_ptr();
    }
}
Esempio n. 3
0
inline shared_count::shared_count( weak_count const & r ): pi_( r.pi_ )
#if defined(SC_BOOST_SP_ENABLE_DEBUG_HOOKS)
        , id_(shared_count_id)
#endif
{
    if( pi_ == 0 || !pi_->add_ref_lock() )
    {
        sc_boost::throw_exception( sc_boost::bad_weak_ptr() );
    }
}
inline shared_count::shared_count(weak_count const & r): pi_(r.pi_)
#if defined(BOOST_SP_ENABLE_DEBUG_HOOKS)
        , id_(shared_count_id)
#endif
{
    if(pi_ != 0)
    {
        pi_->add_ref_lock();
    }
    else
    {
        boost::serialization::throw_exception(bad_weak_ptr());
    }
}
inline shared_count::shared_count(const weak_count &r): pi_(r.pi_) {
    if (pi_ != 0 && !pi_->add_ref_lock()) {
        pi_ = 0;
    }
}