|
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:
?
-- 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