* Updated documentation to show rvalue-references funcions instead of emulation functions.

*  More non-copyable classes are now movable.
*  Move-constructor and assignments now leave moved object in default-constructed state
   instead of just swapping contents.
*  Several bugfixes (#2391, #2431, #1390, #2570, #2528).

[SVN r50258]
This commit is contained in:
Ion Gaztañaga
2008-12-13 13:47:00 +00:00
parent c1a6867856
commit 8f145becf5
15 changed files with 133 additions and 17 deletions

View File

@@ -91,6 +91,15 @@ void recursive_vector_test()//Test for recursive types
int main()
{
recursive_vector_test();
{
//Now test move semantics
vector<recursive_vector> original;
vector<recursive_vector> move_ctor(detail::move_impl(original));
vector<recursive_vector> move_assign;
move_assign = detail::move_impl(move_ctor);
move_assign.swap(detail::move_impl(original));
move_assign.swap(original);
}
typedef allocator<int, managed_shared_memory::segment_manager> ShmemAllocator;
typedef vector<int, ShmemAllocator> MyVector;