Boost logo

Boost-Commit :

From: nesotto_at_[hidden]
Date: 2007-10-27 17:52:51


Author: nesotto
Date: 2007-10-27 17:52:51 EDT (Sat, 27 Oct 2007)
New Revision: 40513
URL: http://svn.boost.org/trac/boost/changeset/40513

Log:
minor update of copying of maps
Text files modified:
   trunk/libs/ptr_container/test/ptr_map.cpp | 17 +++--------------
   trunk/libs/ptr_container/test/ptr_vector.cpp | 3 ++-
   2 files changed, 5 insertions(+), 15 deletions(-)

Modified: trunk/libs/ptr_container/test/ptr_map.cpp
==============================================================================
--- trunk/libs/ptr_container/test/ptr_map.cpp (original)
+++ trunk/libs/ptr_container/test/ptr_map.cpp 2007-10-27 17:52:51 EDT (Sat, 27 Oct 2007)
@@ -273,13 +273,9 @@
     BaseContainer base_container( derived );
     BOOST_CHECK_EQUAL( derived.size(), base_container.size() );
     base_container.clear();
- //
- // Compilers choke on this one claming that the copy-constructor
- // must be public! Go figure.
- //
- // base_container = derived;
- //BOOST_CHECK_EQUAL( derived.size(), base_container.size() );
- //
+ base_container = derived;
+ BOOST_CHECK_EQUAL( derived.size(), base_container.size() );
+
     BaseContainer base2( base_container );
     BOOST_CHECK_EQUAL( base2.size(), base_container.size() );
     base2 = base_container;
@@ -374,13 +370,6 @@
     map_type::reference a_reference = *m2.begin();
     a_reference.second->foo();
     map_type::const_reference a_creference = *const_begin(m2);
- //
- // @remark: taking the adress of an rvalue is not valid, though
- // many compilers accept it.
- //
- // map_type::pointer a_pointer = &*m2.begin();
- //a_pointer->second->foo();
- //map_type::const_pointer a_cpointer = &*const_begin(m2);
    
     //
     //

Modified: trunk/libs/ptr_container/test/ptr_vector.cpp
==============================================================================
--- trunk/libs/ptr_container/test/ptr_vector.cpp (original)
+++ trunk/libs/ptr_container/test/ptr_vector.cpp 2007-10-27 17:52:51 EDT (Sat, 27 Oct 2007)
@@ -85,7 +85,8 @@
         array[i] = new int(i);
         
     vec.transfer( vec.begin(), array, data_size );
- array = vec.c_array();
+ int** array2 = vec.c_array();
+ BOOST_CHECK( array2 != array );
     
 }
 


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