mirror of
https://github.com/boostorg/move.git
synced 2025-07-30 12:27:14 +02:00
Replaced <boost/move/utility.hpp> with <boost/move/utility_core.hpp> when possible to minimize dependencies.
This commit is contained in:
@ -9,7 +9,7 @@
|
|||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
#include <boost/move/detail/config_begin.hpp>
|
#include <boost/move/detail/config_begin.hpp>
|
||||||
#include <boost/move/utility.hpp>
|
#include <boost/move/utility_core.hpp>
|
||||||
|
|
||||||
//[clone_ptr_base_derived
|
//[clone_ptr_base_derived
|
||||||
class Base
|
class Base
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#include <boost/move/detail/config_begin.hpp>
|
#include <boost/move/detail/config_begin.hpp>
|
||||||
|
|
||||||
//[construct_forward_example
|
//[construct_forward_example
|
||||||
#include <boost/move/utility.hpp>
|
#include <boost/move/utility_core.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
class copyable_only_tester
|
class copyable_only_tester
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
//[file_descriptor_def
|
//[file_descriptor_def
|
||||||
|
|
||||||
#include <boost/move/utility.hpp>
|
#include <boost/move/utility_core.hpp>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
|
|
||||||
class file_descriptor
|
class file_descriptor
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
#include <boost/move/detail/config_begin.hpp>
|
#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/move/iterator.hpp>
|
||||||
#include <boost/detail/no_exceptions_support.hpp>
|
#include <boost/detail/no_exceptions_support.hpp>
|
||||||
|
|
||||||
|
@ -7,7 +7,9 @@
|
|||||||
// See http://www.boost.org/libs/move for documentation.
|
// See http://www.boost.org/libs/move for documentation.
|
||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
|
#ifndef BOOST_CONFIG_HPP
|
||||||
#include <boost/config.hpp>
|
#include <boost/config.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef BOOST_MSVC
|
#ifdef BOOST_MSVC
|
||||||
#pragma warning (push)
|
#pragma warning (push)
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#ifndef BOOST_MOVE_MOVE_HELPERS_HPP
|
#ifndef BOOST_MOVE_MOVE_HELPERS_HPP
|
||||||
#define 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>
|
#include <boost/move/detail/meta_utils.hpp>
|
||||||
|
|
||||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
#define BOOST_MOVE_ITERATOR_HPP
|
#define BOOST_MOVE_ITERATOR_HPP
|
||||||
|
|
||||||
#include <boost/move/detail/config_begin.hpp>
|
#include <boost/move/detail/config_begin.hpp>
|
||||||
#include <boost/move/utility.hpp>
|
#include <boost/move/utility_core.hpp>
|
||||||
#include <iterator> //std::iterator
|
#include <iterator> //std::iterator
|
||||||
|
|
||||||
namespace boost {
|
namespace boost {
|
||||||
@ -177,14 +177,16 @@ inline move_iterator<It> make_move_iterator(const It &it)
|
|||||||
//! back of a container
|
//! back of a container
|
||||||
template <typename C> // C models Container
|
template <typename C> // C models Container
|
||||||
class back_move_insert_iterator
|
class back_move_insert_iterator
|
||||||
: public std::iterator<std::output_iterator_tag, void, void, void, void>
|
|
||||||
{
|
{
|
||||||
C* container_m;
|
C* container_m;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef C container_type;
|
typedef C container_type;
|
||||||
typedef typename C::value_type value_type;
|
typedef typename C::value_type value_type;
|
||||||
typedef typename C::reference reference;
|
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) { }
|
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
|
//! front of a container
|
||||||
template <typename C> // C models Container
|
template <typename C> // C models Container
|
||||||
class front_move_insert_iterator
|
class front_move_insert_iterator
|
||||||
: public std::iterator<std::output_iterator_tag, void, void, void, void>
|
|
||||||
{
|
{
|
||||||
C* container_m;
|
C* container_m;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef C container_type;
|
typedef C container_type;
|
||||||
typedef typename C::value_type value_type;
|
typedef typename C::value_type value_type;
|
||||||
typedef typename C::reference reference;
|
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) { }
|
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
|
template <typename C> // C models Container
|
||||||
class move_insert_iterator
|
class move_insert_iterator
|
||||||
: public std::iterator<std::output_iterator_tag, void, void, void, void>
|
|
||||||
{
|
{
|
||||||
C* container_m;
|
C* container_m;
|
||||||
typename C::iterator pos_;
|
typename C::iterator pos_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
typedef C container_type;
|
typedef C container_type;
|
||||||
typedef typename C::value_type value_type;
|
typedef typename C::value_type value_type;
|
||||||
typedef typename C::reference reference;
|
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)
|
explicit move_insert_iterator(C& x, typename C::iterator pos)
|
||||||
: container_m(&x), pos_(pos)
|
: container_m(&x), pos_(pos)
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
#include <boost/move/detail/config_begin.hpp>
|
#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 <boost/utility/enable_if.hpp>
|
||||||
#include "../example/movable.hpp"
|
#include "../example/movable.hpp"
|
||||||
#include "../example/copymovable.hpp"
|
#include "../example/copymovable.hpp"
|
||||||
|
@ -8,7 +8,7 @@
|
|||||||
// See http://www.boost.org/libs/move for documentation.
|
// 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 <boost/move/detail/meta_utils.hpp>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <new>
|
#include <new>
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# define BOOST_COPYABLE_AND_MOVABLE(X)
|
# define BOOST_COPYABLE_AND_MOVABLE(X)
|
||||||
# define MOVE(x) (x)
|
# define MOVE(x) (x)
|
||||||
#else
|
#else
|
||||||
#include <boost/move/utility.hpp>
|
#include <boost/move/utility_core.hpp>
|
||||||
# define MOVE(x) boost::move(x)
|
# define MOVE(x) boost::move(x)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
//Since RVO is better than move-construction,
|
//Since RVO is better than move-construction,
|
||||||
//avoid copy constructor overloading.
|
//avoid copy constructor overloading.
|
||||||
#include <boost/move/detail/config_begin.hpp>
|
#include <boost/move/detail/config_begin.hpp>
|
||||||
#include <boost/move/utility.hpp>
|
#include <boost/move/utility_core.hpp>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
bool moved = false;
|
bool moved = false;
|
||||||
|
@ -10,7 +10,7 @@
|
|||||||
//
|
//
|
||||||
//////////////////////////////////////////////////////////////////////////////
|
//////////////////////////////////////////////////////////////////////////////
|
||||||
#include <boost/move/detail/config_begin.hpp>
|
#include <boost/move/detail/config_begin.hpp>
|
||||||
#include <boost/move/utility.hpp>
|
#include <boost/move/utility_core.hpp>
|
||||||
#include "../example/movable.hpp"
|
#include "../example/movable.hpp"
|
||||||
#include "../example/copymovable.hpp"
|
#include "../example/copymovable.hpp"
|
||||||
#include <boost/static_assert.hpp>
|
#include <boost/static_assert.hpp>
|
||||||
|
Reference in New Issue
Block a user