Replaced <boost/move/utility.hpp> with <boost/move/utility_core.hpp> when possible to minimize dependencies.

This commit is contained in:
Ion Gaztañaga
2014-09-25 16:15:36 +02:00
parent 4115ecc45a
commit 4e7a046df2
12 changed files with 31 additions and 23 deletions

View File

@ -9,7 +9,7 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/move/detail/config_begin.hpp>
#include <boost/move/utility.hpp>
#include <boost/move/utility_core.hpp>
//[clone_ptr_base_derived
class Base

View File

@ -12,7 +12,7 @@
#include <boost/move/detail/config_begin.hpp>
//[construct_forward_example
#include <boost/move/utility.hpp>
#include <boost/move/utility_core.hpp>
#include <iostream>
class copyable_only_tester

View File

@ -14,7 +14,7 @@
//[file_descriptor_def
#include <boost/move/utility.hpp>
#include <boost/move/utility_core.hpp>
#include <stdexcept>
class file_descriptor

View File

@ -16,7 +16,7 @@
#include <boost/move/detail/config_begin.hpp>
#include <boost/move/utility.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/move/iterator.hpp>
#include <boost/detail/no_exceptions_support.hpp>

View File

@ -7,7 +7,9 @@
// See http://www.boost.org/libs/move for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#ifndef BOOST_CONFIG_HPP
#include <boost/config.hpp>
#endif
#ifdef BOOST_MSVC
#pragma warning (push)

View File

@ -12,7 +12,7 @@
#ifndef BOOST_MOVE_MOVE_HELPERS_HPP
#define BOOST_MOVE_MOVE_HELPERS_HPP
#include <boost/move/utility.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/move/detail/meta_utils.hpp>
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)

View File

@ -15,7 +15,7 @@
#define BOOST_MOVE_ITERATOR_HPP
#include <boost/move/detail/config_begin.hpp>
#include <boost/move/utility.hpp>
#include <boost/move/utility_core.hpp>
#include <iterator> //std::iterator
namespace boost {
@ -177,14 +177,16 @@ inline move_iterator<It> make_move_iterator(const It &it)
//! back of a container
template <typename C> // C models Container
class back_move_insert_iterator
: public std::iterator<std::output_iterator_tag, void, void, void, void>
{
C* container_m;
public:
typedef C container_type;
typedef typename C::value_type value_type;
typedef typename C::reference reference;
typedef C container_type;
typedef typename C::value_type value_type;
typedef typename C::reference reference;
typedef typename C::pointer pointer;
typedef typename C::difference_type difference_type;
typedef std::output_iterator_tag iterator_category;
explicit back_move_insert_iterator(C& x) : container_m(&x) { }
@ -217,14 +219,16 @@ inline back_move_insert_iterator<C> back_move_inserter(C& x)
//! front of a container
template <typename C> // C models Container
class front_move_insert_iterator
: public std::iterator<std::output_iterator_tag, void, void, void, void>
{
C* container_m;
public:
typedef C container_type;
typedef typename C::value_type value_type;
typedef typename C::reference reference;
typedef C container_type;
typedef typename C::value_type value_type;
typedef typename C::reference reference;
typedef typename C::pointer pointer;
typedef typename C::difference_type difference_type;
typedef std::output_iterator_tag iterator_category;
explicit front_move_insert_iterator(C& x) : container_m(&x) { }
@ -254,15 +258,17 @@ inline front_move_insert_iterator<C> front_move_inserter(C& x)
//////////////////////////////////////////////////////////////////////////////
template <typename C> // C models Container
class move_insert_iterator
: public std::iterator<std::output_iterator_tag, void, void, void, void>
{
C* container_m;
typename C::iterator pos_;
public:
typedef C container_type;
typedef typename C::value_type value_type;
typedef typename C::reference reference;
typedef C container_type;
typedef typename C::value_type value_type;
typedef typename C::reference reference;
typedef typename C::pointer pointer;
typedef typename C::difference_type difference_type;
typedef std::output_iterator_tag iterator_category;
explicit move_insert_iterator(C& x, typename C::iterator pos)
: container_m(&x), pos_(pos)

View File

@ -9,7 +9,7 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/move/detail/config_begin.hpp>
#include <boost/move/utility.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/utility/enable_if.hpp>
#include "../example/movable.hpp"
#include "../example/copymovable.hpp"

View File

@ -8,7 +8,7 @@
// See http://www.boost.org/libs/move for documentation.
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/move/utility.hpp>
#include <boost/move/utility_core.hpp>
#include <boost/move/detail/meta_utils.hpp>
#include <cassert>
#include <new>

View File

@ -12,7 +12,7 @@
# define BOOST_COPYABLE_AND_MOVABLE(X)
# define MOVE(x) (x)
#else
#include <boost/move/utility.hpp>
#include <boost/move/utility_core.hpp>
# define MOVE(x) boost::move(x)
#endif

View File

@ -9,7 +9,7 @@
//Since RVO is better than move-construction,
//avoid copy constructor overloading.
#include <boost/move/detail/config_begin.hpp>
#include <boost/move/utility.hpp>
#include <boost/move/utility_core.hpp>
#include <iostream>
bool moved = false;

View File

@ -10,7 +10,7 @@
//
//////////////////////////////////////////////////////////////////////////////
#include <boost/move/detail/config_begin.hpp>
#include <boost/move/utility.hpp>
#include <boost/move/utility_core.hpp>
#include "../example/movable.hpp"
#include "../example/copymovable.hpp"
#include <boost/static_assert.hpp>