Ticket #4174: ptr_container_const_ref_fixes.patch
File ptr_container_const_ref_fixes.patch, 2.8 KB (added by , 12 years ago) |
---|
-
sequence_test_data.hpp
103 103 c.pop_back(); 104 104 BOOST_CHECK( !c.empty() ); 105 105 c.insert( c.end(), new T ); 106 c.insert( c.end(), std::auto_ptr<T>( new T ) ); 106 std::auto_ptr<T> ap(new T); 107 c.insert( c.end(), ap ); 107 108 BOOST_CHECK_EQUAL( c.size(), 5u ); 108 109 109 110 #if defined(BOOST_NO_SFINAE) || defined(BOOST_NO_FUNCTION_TEMPLATE_ORDERING) … … 135 136 #else 136 137 auto_type ptr = c.release( c.begin() ); 137 138 #endif 138 std::auto_ptr<C> ap = c.release();139 std::auto_ptr<C> ap2 = c.release(); 139 140 c = c2.clone(); 140 141 BOOST_CHECK( !c.empty() ); 141 142 auto_type ptr2 = c.replace( c.begin(), new T ); -
associative_test_data.hpp
102 102 c.insert( c.end(), t ); 103 103 c.insert( c.end(), std::auto_ptr<T>( new T ) ); 104 104 c.insert( new T ); 105 c.insert( std::auto_ptr<T>( new T ) ); 105 std::auto_ptr<T> ap( new T ); 106 c.insert( ap ); 106 107 c3.insert( c.begin(), c.end() ); 107 108 c.erase( c.begin() ); 108 109 c3.erase( c3.begin(), c3.end() ); … … 129 130 130 131 c.insert( c.end(), new T ); 131 132 typename C::auto_type ptr2 = c.release( c.begin() ); 132 std::auto_ptr<C> ap = c.release();133 std::auto_ptr<C> ap2 = c.release(); 133 134 c = c2.clone(); 134 135 BOOST_MESSAGE( "finished release/clone test" ); 135 136 -
ptr_set.cpp
84 84 85 85 BOOST_CHECK_THROW( set.insert( 0 ), bad_ptr_container_operation ); 86 86 set.insert( new int(0) ); 87 set.insert( std::auto_ptr<int>( new int(1) ) ); 87 std::auto_ptr<int> ap( new int(1) ); 88 set.insert( ap ); 88 89 BOOST_CHECK_THROW( (set.replace(set.begin(), 0 )), bad_ptr_container_operation ); 89 90 BOOST_CHECK_THROW( (set.replace(set.begin(), std::auto_ptr<int>(0) )), bad_ptr_container_operation ); 90 91 -
ptr_unordered_set.cpp
106 106 107 107 BOOST_CHECK_THROW( set.insert( 0 ), bad_ptr_container_operation ); 108 108 set.insert( new int(0) ); 109 set.insert( std::auto_ptr<int>( new int(1) ) ); 109 std::auto_ptr<int> ap( new int(1) ); 110 set.insert( ap ); 110 111 BOOST_CHECK_THROW( (set.replace(set.begin(), 0 )), bad_ptr_container_operation ); 111 112 BOOST_CHECK_THROW( (set.replace(set.begin(), std::auto_ptr<int>(0) )), bad_ptr_container_operation ); 112 113