Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r74156 - in trunk/libs/move: doc example test
From: igaztanaga_at_[hidden]
Date: 2011-08-30 08:53:05


Author: igaztanaga
Date: 2011-08-30 08:53:03 EDT (Tue, 30 Aug 2011)
New Revision: 74156
URL: http://svn.boost.org/trac/boost/changeset/74156

Log:
Updated documentation and tests to Boost.Container
Text files modified:
   trunk/libs/move/doc/move.qbk | 7 +++----
   trunk/libs/move/example/doc_file_descriptor.cpp | 6 +++---
   trunk/libs/move/example/doc_move_inserter.cpp | 4 ++--
   trunk/libs/move/example/doc_move_iterator.cpp | 4 ++--
   trunk/libs/move/test/back_move_inserter.cpp | 14 +++++++-------
   trunk/libs/move/test/move_algorithm.cpp | 8 ++++----
   trunk/libs/move/test/move_iterator.cpp | 8 ++++----
   7 files changed, 25 insertions(+), 26 deletions(-)

Modified: trunk/libs/move/doc/move.qbk
==============================================================================
--- trunk/libs/move/doc/move.qbk (original)
+++ trunk/libs/move/doc/move.qbk 2011-08-30 08:53:03 EDT (Tue, 30 Aug 2011)
@@ -18,12 +18,11 @@
     ]
 ]
 
-[important To be able to use containers of movable-only values you will need to use containers supporting move sematantics,
- like [*Boost.Interprocess] containers]
+[important To be able to use containers of movable-only values you will need to use containers
+supporting move semantics, like [*Boost.Container] containers]
 
 [note Tested compilers: MSVC-7.1, 8.0, 9.0, GCC 4.3-MinGW in C++03 and C++0x modes, Intel 10.1]
 
-
 [section:what_is_boost_move What is Boost.Move?]
 
 Rvalue references are a major C++0x feature, enabling move semantics for C++ values. However, we
@@ -285,7 +284,7 @@
 internally use move semantics instead of copy semantics.
 If the container needs to "change the location" of an element
 internally (e.g. vector reallocation) it will move the element instead of copying it.
-[*Boost.Interprocess] containers are move-aware so you can write the following:
+[*Boost.Container] containers are move-aware so you can write the following:
 
 [file_descriptor_example]
 

Modified: trunk/libs/move/example/doc_file_descriptor.cpp
==============================================================================
--- trunk/libs/move/example/doc_file_descriptor.cpp (original)
+++ trunk/libs/move/example/doc_file_descriptor.cpp 2011-08-30 08:53:03 EDT (Tue, 30 Aug 2011)
@@ -56,7 +56,7 @@
 //]
 
 //[file_descriptor_example
-#include <boost/interprocess/containers/vector.hpp>
+#include <boost/container/vector.hpp>
 #include <cassert>
 
 //Remember: 'file_descriptor' is NOT copyable, but it
@@ -72,7 +72,7 @@
    assert(!fd.empty());
 
    //Now move fd into a vector
- boost::interprocess::vector<file_descriptor> v;
+ boost::container::vector<file_descriptor> v;
    v.push_back(boost::move(fd));
 
    //Check ownership has been transferred
@@ -81,7 +81,7 @@
 
    //Compilation error if uncommented since file_descriptor is not copyable
    //and vector copy construction requires value_type's copy constructor:
- //boost::interprocess::vector<file_descriptor> v2(v);
+ //boost::container::vector<file_descriptor> v2(v);
    return 0;
 }
 //]

Modified: trunk/libs/move/example/doc_move_inserter.cpp
==============================================================================
--- trunk/libs/move/example/doc_move_inserter.cpp (original)
+++ trunk/libs/move/example/doc_move_inserter.cpp 2011-08-30 08:53:03 EDT (Tue, 30 Aug 2011)
@@ -10,11 +10,11 @@
 //////////////////////////////////////////////////////////////////////////////
 
 //[move_inserter_example
-#include <boost/interprocess/containers/list.hpp>
+#include <boost/container/list.hpp>
 #include "movable.hpp"
 #include <cassert>
 
-using namespace ::boost::interprocess;
+using namespace ::boost::container;
 
 typedef list<movable> list_t;
 typedef list_t::iterator l_iterator;

Modified: trunk/libs/move/example/doc_move_iterator.cpp
==============================================================================
--- trunk/libs/move/example/doc_move_iterator.cpp (original)
+++ trunk/libs/move/example/doc_move_iterator.cpp 2011-08-30 08:53:03 EDT (Tue, 30 Aug 2011)
@@ -10,13 +10,13 @@
 //////////////////////////////////////////////////////////////////////////////
 
 //[move_iterator_example
-#include <boost/interprocess/containers/vector.hpp>
+#include <boost/container/vector.hpp>
 #include "movable.hpp"
 #include <cassert>
 
 int main()
 {
- using namespace ::boost::interprocess;
+ using namespace ::boost::container;
 
    //Create a vector with 10 default constructed objects
    vector<movable> v(10);

Modified: trunk/libs/move/test/back_move_inserter.cpp
==============================================================================
--- trunk/libs/move/test/back_move_inserter.cpp (original)
+++ trunk/libs/move/test/back_move_inserter.cpp 2011-08-30 08:53:03 EDT (Tue, 30 Aug 2011)
@@ -9,9 +9,9 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 #include <boost/move/move.hpp>
-#include <boost/interprocess/containers/vector.hpp>
-#include <boost/interprocess/containers/list.hpp>
-#include <boost/interprocess/containers/stable_vector.hpp>
+#include <boost/container/deque.hpp>
+#include <boost/container/list.hpp>
+#include <boost/container/stable_vector.hpp>
 #include "../example/movable.hpp"
 
 template<class Container>
@@ -46,15 +46,15 @@
 
 int main()
 {
- namespace bi = ::boost::interprocess;
+ namespace bc = ::boost::container;
 
- if(move_test< bi::vector<movable> >()){
+ if(move_test< bc::vector<movable> >()){
       return 1;
    }
- if(move_test< bi::list<movable> >()){
+ if(move_test< bc::list<movable> >()){
       return 1;
    }
- if(move_test< bi::stable_vector<movable> >()){
+ if(move_test< bc::stable_vector<movable> >()){
       return 1;
    }
    return 0;

Modified: trunk/libs/move/test/move_algorithm.cpp
==============================================================================
--- trunk/libs/move/test/move_algorithm.cpp (original)
+++ trunk/libs/move/test/move_algorithm.cpp 2011-08-30 08:53:03 EDT (Tue, 30 Aug 2011)
@@ -9,15 +9,15 @@
 //
 //////////////////////////////////////////////////////////////////////////////
 #include <boost/move/move.hpp>
-#include <boost/interprocess/containers/vector.hpp>
+#include <boost/container/vector.hpp>
 #include "../example/movable.hpp"
 
 int main()
 {
- namespace bi = ::boost::interprocess;
+ namespace bc = ::boost::container;
    //Default construct 10 movable objects
- bi::vector<movable> v(10);
- bi::vector<movable> v2(10);
+ bc::vector<movable> v(10);
+ bc::vector<movable> v2(10);
 
    //Move to v2
    boost::move(v.begin(), v.end(), v2.begin());

Modified: trunk/libs/move/test/move_iterator.cpp
==============================================================================
--- trunk/libs/move/test/move_iterator.cpp (original)
+++ trunk/libs/move/test/move_iterator.cpp 2011-08-30 08:53:03 EDT (Tue, 30 Aug 2011)
@@ -10,14 +10,14 @@
 //////////////////////////////////////////////////////////////////////////////
 
 #include <boost/move/move.hpp>
-#include <boost/interprocess/containers/vector.hpp>
+#include <boost/container/vector.hpp>
 #include "../example/movable.hpp"
 
 int main()
 {
- namespace bi = ::boost::interprocess;
+ namespace bc = ::boost::container;
    //Default construct 10 movable objects
- bi::vector<movable> v(10);
+ bc::vector<movable> v(10);
 
    //Test default constructed value
    if(v[0].moved()){
@@ -25,7 +25,7 @@
    }
 
    //Move values
- bi::vector<movable> v2
+ bc::vector<movable> v2
       (boost::make_move_iterator(v.begin()), boost::make_move_iterator(v.end()));
 
    //Test values have been moved


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