Boost logo

Boost :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2005-05-10 16:42:13


Any ideas why the three use_count() tests:

    {
        boost::shared_ptr<int> pi(new int);
        boost::shared_ptr<void> pv(pi);

        boost::shared_ptr<int> pi2 = boost::static_pointer_cast<int>(pv);
        BOOST_TEST(pi.get() == pi2.get());
        BOOST_TEST(!(pi < pi2 || pi2 < pi));
        BOOST_TEST(pi.use_count() == 3);
        BOOST_TEST(pv.use_count() == 3);
        BOOST_TEST(pi2.use_count() == 3);
    }

fail as described here:

http://www.meta-comm.com/engineering/boost-regression/cvs-head/developer/output/RSI-SoL-bin-boost-libs-smart_ptr-test-shared_ptr_test-test-gcc-4_0_0-linux-i686-release-release.html

http://tinyurl.com/cq7qy

?

--
Peter Dimov
http://www.pdimov.com 

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk