Merged from trunk

[SVN r79561]
This commit is contained in:
Ion Gaztañaga
2012-07-16 09:08:27 +00:00
parent 8cd85f9cd3
commit bf0d7d7727
2 changed files with 39 additions and 18 deletions

View File

@@ -787,6 +787,14 @@ Many thanks to all boosters that have tested, reviewed and improved the library.
[section:release_notes Release Notes] [section:release_notes Release Notes]
[section:release_notes_boost_1_51_00 Boost 1.51 Release]
* Fixed bugs
[@https://svn.boost.org/trac/boost/ticket/7095 #7095],
[@https://svn.boost.org/trac/boost/ticket/7031 #7031].
[endsect]
[section:release_notes_boost_1_49_00 Boost 1.49 Release] [section:release_notes_boost_1_49_00 Boost 1.49 Release]
* Fixed bugs * Fixed bugs

View File

@@ -17,6 +17,9 @@
template<class Container> template<class Container>
int move_test() int move_test()
{ {
bool use_move_iterator = false;
bool done = false;
while(!done){
//Default construct 10 movable objects //Default construct 10 movable objects
Container v(10); Container v(10);
@@ -27,7 +30,14 @@ int move_test()
//Move values //Move values
Container v2; Container v2;
if(use_move_iterator){
::boost::copy_or_move( boost::make_move_iterator(v.begin())
, boost::make_move_iterator(v.end())
, boost::back_move_inserter(v2));
}
else{
std::copy(v.begin(), v.end(), boost::back_move_inserter(v2)); std::copy(v.begin(), v.end(), boost::back_move_inserter(v2));
}
//Test values have been moved //Test values have been moved
if(!v.begin()->moved()){ if(!v.begin()->moved()){
@@ -41,6 +51,9 @@ int move_test()
if(v2.begin()->moved()){ if(v2.begin()->moved()){
return 1; return 1;
} }
done = use_move_iterator;
use_move_iterator = true;
}
return 0; return 0;
} }