Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r55316 - sandbox/fmhess/libs/generic_ptr/test
From: fmhess_at_[hidden]
Date: 2009-07-31 13:48:44


Author: fmhess
Date: 2009-07-31 13:48:42 EDT (Fri, 31 Jul 2009)
New Revision: 55316
URL: http://svn.boost.org/trac/boost/changeset/55316

Log:
Avoid any cloning leaks through temporaries with null deleters.

Text files modified:
   sandbox/fmhess/libs/generic_ptr/test/cloning_test.cpp | 2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)

Modified: sandbox/fmhess/libs/generic_ptr/test/cloning_test.cpp
==============================================================================
--- sandbox/fmhess/libs/generic_ptr/test/cloning_test.cpp (original)
+++ sandbox/fmhess/libs/generic_ptr/test/cloning_test.cpp 2009-07-31 13:48:42 EDT (Fri, 31 Jul 2009)
@@ -113,7 +113,7 @@
     boost::generic_ptr::cloning<X*> cp0(x0, boost::generic_ptr::null_deleter());
     BOOST_TEST(X::instances == 1);
     {
- boost::generic_ptr::cloning<X*> cp1 = cp0;
+ boost::generic_ptr::cloning<X*> cp1(cp0);
       BOOST_TEST(X::instances == 2);
       x1 = get_plain_old_pointer(cp1);
     }


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk