Updated documentation and tests to Boost.Container

[SVN r74156]
This commit is contained in:
Ion Gaztañaga
2011-08-30 12:53:03 +00:00
parent 9cc7307b03
commit 664d8ba073
7 changed files with 25 additions and 26 deletions
+3 -3
View File
@@ -56,7 +56,7 @@ class file_descriptor
//]
//[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 @@ int main()
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 @@ int main()
//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;
}
//]
+2 -2
View File
@@ -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;
+2 -2
View File
@@ -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);