|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r61865 - branches/release/libs/ptr_container/test
From: dgregor_at_[hidden]
Date: 2010-05-08 21:24:02
Author: dgregor
Date: 2010-05-08 21:24:01 EDT (Sat, 08 May 2010)
New Revision: 61865
URL: http://svn.boost.org/trac/boost/changeset/61865
Log:
Merge standards-conformance fixes for Boost.PtrContainer
Text files modified:
branches/release/libs/ptr_container/test/associative_test_data.hpp | 5 +++--
branches/release/libs/ptr_container/test/ptr_set.cpp | 3 ++-
branches/release/libs/ptr_container/test/ptr_unordered_set.cpp | 3 ++-
branches/release/libs/ptr_container/test/sequence_test_data.hpp | 5 +++--
4 files changed, 10 insertions(+), 6 deletions(-)
Modified: branches/release/libs/ptr_container/test/associative_test_data.hpp
==============================================================================
--- branches/release/libs/ptr_container/test/associative_test_data.hpp (original)
+++ branches/release/libs/ptr_container/test/associative_test_data.hpp 2010-05-08 21:24:01 EDT (Sat, 08 May 2010)
@@ -102,7 +102,8 @@
c.insert( c.end(), t );
c.insert( c.end(), std::auto_ptr<T>( new T ) );
c.insert( new T );
- c.insert( std::auto_ptr<T>( new T ) );
+ std::auto_ptr<T> ap( new T );
+ c.insert( ap );
c3.insert( c.begin(), c.end() );
c.erase( c.begin() );
c3.erase( c3.begin(), c3.end() );
@@ -129,7 +130,7 @@
c.insert( c.end(), new T );
typename C::auto_type ptr2 = c.release( c.begin() );
- std::auto_ptr<C> ap = c.release();
+ std::auto_ptr<C> ap2 = c.release();
c = c2.clone();
BOOST_MESSAGE( "finished release/clone test" );
Modified: branches/release/libs/ptr_container/test/ptr_set.cpp
==============================================================================
--- branches/release/libs/ptr_container/test/ptr_set.cpp (original)
+++ branches/release/libs/ptr_container/test/ptr_set.cpp 2010-05-08 21:24:01 EDT (Sat, 08 May 2010)
@@ -84,7 +84,8 @@
BOOST_CHECK_THROW( set.insert( 0 ), bad_ptr_container_operation );
set.insert( new int(0) );
- set.insert( std::auto_ptr<int>( new int(1) ) );
+ std::auto_ptr<int> ap( new int(1) );
+ set.insert( ap );
BOOST_CHECK_THROW( (set.replace(set.begin(), 0 )), bad_ptr_container_operation );
BOOST_CHECK_THROW( (set.replace(set.begin(), std::auto_ptr<int>(0) )), bad_ptr_container_operation );
Modified: branches/release/libs/ptr_container/test/ptr_unordered_set.cpp
==============================================================================
--- branches/release/libs/ptr_container/test/ptr_unordered_set.cpp (original)
+++ branches/release/libs/ptr_container/test/ptr_unordered_set.cpp 2010-05-08 21:24:01 EDT (Sat, 08 May 2010)
@@ -106,7 +106,8 @@
BOOST_CHECK_THROW( set.insert( 0 ), bad_ptr_container_operation );
set.insert( new int(0) );
- set.insert( std::auto_ptr<int>( new int(1) ) );
+ std::auto_ptr<int> ap( new int(1) );
+ set.insert( ap );
BOOST_CHECK_THROW( (set.replace(set.begin(), 0 )), bad_ptr_container_operation );
BOOST_CHECK_THROW( (set.replace(set.begin(), std::auto_ptr<int>(0) )), bad_ptr_container_operation );
Modified: branches/release/libs/ptr_container/test/sequence_test_data.hpp
==============================================================================
--- branches/release/libs/ptr_container/test/sequence_test_data.hpp (original)
+++ branches/release/libs/ptr_container/test/sequence_test_data.hpp 2010-05-08 21:24:01 EDT (Sat, 08 May 2010)
@@ -103,7 +103,8 @@
c.pop_back();
BOOST_CHECK( !c.empty() );
c.insert( c.end(), new T );
- c.insert( c.end(), std::auto_ptr<T>( new T ) );
+ std::auto_ptr<T> ap(new T);
+ c.insert( c.end(), ap );
BOOST_CHECK_EQUAL( c.size(), 5u );
#if defined(BOOST_NO_SFINAE) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING)
@@ -135,7 +136,7 @@
#else
auto_type ptr = c.release( c.begin() );
#endif
- std::auto_ptr<C> ap = c.release();
+ std::auto_ptr<C> ap2 = c.release();
c = c2.clone();
BOOST_CHECK( !c.empty() );
auto_type ptr2 = c.replace( c.begin(), new T );
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