forked from boostorg/move
Updated documentation and tests to Boost.Container
[SVN r74156]
This commit is contained in:
@@ -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;
|
||||
}
|
||||
//]
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user