mirror of
https://git.suyu.dev/suyu/ext-boost.git
synced 2026-01-08 15:38:13 +01:00
Update to boost v1.63.0
This commit is contained in:
parent
f005c955f8
commit
25db91d480
535 changed files with 20797 additions and 37185 deletions
|
|
@ -22,9 +22,8 @@
|
|||
|
||||
//Based on Boost.Core's swap.
|
||||
//Many thanks to Steven Watanabe, Joseph Gauterin and Niels Dekker.
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <cstddef> //for std::size_t
|
||||
#include <boost/move/detail/workaround.hpp> //forceinline
|
||||
|
||||
//Try to avoid including <algorithm>, as it's quite big
|
||||
#if defined(_MSC_VER) && defined(BOOST_DINKUMWARE_STDLIB)
|
||||
|
|
@ -156,7 +155,7 @@ struct and_op_not
|
|||
{};
|
||||
|
||||
template<class T>
|
||||
void swap_proxy(T& x, T& y, typename boost::move_detail::enable_if_c<!boost::move_detail::has_move_emulation_enabled_impl<T>::value>::type* = 0)
|
||||
BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y, typename boost::move_detail::enable_if_c<!boost::move_detail::has_move_emulation_enabled_impl<T>::value>::type* = 0)
|
||||
{
|
||||
//use std::swap if argument dependent lookup fails
|
||||
//Use using directive ("using namespace xxx;") instead as some older compilers
|
||||
|
|
@ -166,14 +165,14 @@ void swap_proxy(T& x, T& y, typename boost::move_detail::enable_if_c<!boost::mov
|
|||
}
|
||||
|
||||
template<class T>
|
||||
void swap_proxy(T& x, T& y
|
||||
BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y
|
||||
, typename boost::move_detail::enable_if< and_op_not_impl<boost::move_detail::has_move_emulation_enabled_impl<T>
|
||||
, boost_move_member_swap::has_member_swap<T> >
|
||||
>::type* = 0)
|
||||
{ T t(::boost::move(x)); x = ::boost::move(y); y = ::boost::move(t); }
|
||||
|
||||
template<class T>
|
||||
void swap_proxy(T& x, T& y
|
||||
BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y
|
||||
, typename boost::move_detail::enable_if< and_op_impl< boost::move_detail::has_move_emulation_enabled_impl<T>
|
||||
, boost_move_member_swap::has_member_swap<T> >
|
||||
>::type* = 0)
|
||||
|
|
@ -186,7 +185,7 @@ void swap_proxy(T& x, T& y
|
|||
namespace boost_move_adl_swap{
|
||||
|
||||
template<class T>
|
||||
void swap_proxy(T& x, T& y)
|
||||
BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y)
|
||||
{
|
||||
using std::swap;
|
||||
swap(x, y);
|
||||
|
|
@ -223,11 +222,45 @@ namespace boost{
|
|||
//! - Otherwise a move-based swap is called, equivalent to:
|
||||
//! <code>T t(::boost::move(x)); x = ::boost::move(y); y = ::boost::move(t);</code>.
|
||||
template<class T>
|
||||
void adl_move_swap(T& x, T& y)
|
||||
BOOST_MOVE_FORCEINLINE void adl_move_swap(T& x, T& y)
|
||||
{
|
||||
::boost_move_adl_swap::swap_proxy(x, y);
|
||||
}
|
||||
|
||||
//! Exchanges elements between range [first1, last1) and another range starting at first2
|
||||
//! using boost::adl_move_swap.
|
||||
//!
|
||||
//! Parameters:
|
||||
//! first1, last1 - the first range of elements to swap
|
||||
//! first2 - beginning of the second range of elements to swap
|
||||
//!
|
||||
//! Type requirements:
|
||||
//! - ForwardIt1, ForwardIt2 must meet the requirements of ForwardIterator.
|
||||
//! - The types of dereferenced ForwardIt1 and ForwardIt2 must meet the
|
||||
//! requirements of Swappable
|
||||
//!
|
||||
//! Return value: Iterator to the element past the last element exchanged in the range
|
||||
//! beginning with first2.
|
||||
template<class ForwardIt1, class ForwardIt2>
|
||||
ForwardIt2 adl_move_swap_ranges(ForwardIt1 first1, ForwardIt1 last1, ForwardIt2 first2)
|
||||
{
|
||||
while (first1 != last1) {
|
||||
::boost::adl_move_swap(*first1, *first2);
|
||||
++first1;
|
||||
++first2;
|
||||
}
|
||||
return first2;
|
||||
}
|
||||
|
||||
template<class BidirIt1, class BidirIt2>
|
||||
BidirIt2 adl_move_swap_ranges_backward(BidirIt1 first1, BidirIt1 last1, BidirIt2 last2)
|
||||
{
|
||||
while (first1 != last1) {
|
||||
::boost::adl_move_swap(*(--last1), *(--last2));
|
||||
}
|
||||
return last2;
|
||||
}
|
||||
|
||||
} //namespace boost{
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_ADL_MOVE_SWAP_HPP
|
||||
|
|
|
|||
155
boost/move/algo/move.hpp
Normal file
155
boost/move/algo/move.hpp
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2012-2016.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
// See http://www.boost.org/libs/move for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BOOST_MOVE_ALGO_MOVE_HPP
|
||||
#define BOOST_MOVE_ALGO_MOVE_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/move/detail/iterator_traits.hpp>
|
||||
#include <boost/detail/no_exceptions_support.hpp>
|
||||
|
||||
namespace boost {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// move
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
|
||||
|
||||
//! <b>Effects</b>: Moves elements in the range [first,last) into the range [result,result + (last -
|
||||
//! first)) starting from first and proceeding to last. For each non-negative integer n < (last-first),
|
||||
//! performs *(result + n) = ::boost::move (*(first + n)).
|
||||
//!
|
||||
//! <b>Effects</b>: result + (last - first).
|
||||
//!
|
||||
//! <b>Requires</b>: result shall not be in the range [first,last).
|
||||
//!
|
||||
//! <b>Complexity</b>: Exactly last - first move assignments.
|
||||
template <typename I, // I models InputIterator
|
||||
typename O> // O models OutputIterator
|
||||
O move(I f, I l, O result)
|
||||
{
|
||||
while (f != l) {
|
||||
*result = ::boost::move(*f);
|
||||
++f; ++result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// move_backward
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! <b>Effects</b>: Moves elements in the range [first,last) into the range
|
||||
//! [result - (last-first),result) starting from last - 1 and proceeding to
|
||||
//! first. For each positive integer n <= (last - first),
|
||||
//! performs *(result - n) = ::boost::move(*(last - n)).
|
||||
//!
|
||||
//! <b>Requires</b>: result shall not be in the range [first,last).
|
||||
//!
|
||||
//! <b>Returns</b>: result - (last - first).
|
||||
//!
|
||||
//! <b>Complexity</b>: Exactly last - first assignments.
|
||||
template <typename I, // I models BidirectionalIterator
|
||||
typename O> // O models BidirectionalIterator
|
||||
O move_backward(I f, I l, O result)
|
||||
{
|
||||
while (f != l) {
|
||||
--l; --result;
|
||||
*result = ::boost::move(*l);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
using ::std::move_backward;
|
||||
|
||||
#endif //!defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// uninitialized_move
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! <b>Effects</b>:
|
||||
//! \code
|
||||
//! for (; first != last; ++result, ++first)
|
||||
//! new (static_cast<void*>(&*result))
|
||||
//! typename iterator_traits<ForwardIterator>::value_type(boost::move(*first));
|
||||
//! \endcode
|
||||
//!
|
||||
//! <b>Returns</b>: result
|
||||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
F uninitialized_move(I f, I l, F r
|
||||
/// @cond
|
||||
// ,typename ::boost::move_detail::enable_if<has_move_emulation_enabled<typename boost::movelib::iterator_traits<I>::value_type> >::type* = 0
|
||||
/// @endcond
|
||||
)
|
||||
{
|
||||
typedef typename boost::movelib::iterator_traits<I>::value_type input_value_type;
|
||||
|
||||
F back = r;
|
||||
BOOST_TRY{
|
||||
while (f != l) {
|
||||
void * const addr = static_cast<void*>(::boost::move_detail::addressof(*r));
|
||||
::new(addr) input_value_type(::boost::move(*f));
|
||||
++f; ++r;
|
||||
}
|
||||
}
|
||||
BOOST_CATCH(...){
|
||||
for (; back != r; ++back){
|
||||
back->~input_value_type();
|
||||
}
|
||||
BOOST_RETHROW;
|
||||
}
|
||||
BOOST_CATCH_END
|
||||
return r;
|
||||
}
|
||||
|
||||
/// @cond
|
||||
/*
|
||||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
F uninitialized_move(I f, I l, F r,
|
||||
typename ::boost::move_detail::disable_if<has_move_emulation_enabled<typename boost::movelib::iterator_traits<I>::value_type> >::type* = 0)
|
||||
{
|
||||
return std::uninitialized_copy(f, l, r);
|
||||
}
|
||||
*/
|
||||
|
||||
/// @endcond
|
||||
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_ALGO_MOVE_HPP
|
||||
|
|
@ -26,6 +26,7 @@
|
|||
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/move/iterator.hpp>
|
||||
#include <boost/move/algo/move.hpp>
|
||||
#include <boost/detail/no_exceptions_support.hpp>
|
||||
|
||||
#include <algorithm> //copy, copy_backward
|
||||
|
|
@ -33,122 +34,6 @@
|
|||
|
||||
namespace boost {
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// move
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#if !defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
|
||||
|
||||
//! <b>Effects</b>: Moves elements in the range [first,last) into the range [result,result + (last -
|
||||
//! first)) starting from first and proceeding to last. For each non-negative integer n < (last-first),
|
||||
//! performs *(result + n) = ::boost::move (*(first + n)).
|
||||
//!
|
||||
//! <b>Effects</b>: result + (last - first).
|
||||
//!
|
||||
//! <b>Requires</b>: result shall not be in the range [first,last).
|
||||
//!
|
||||
//! <b>Complexity</b>: Exactly last - first move assignments.
|
||||
template <typename I, // I models InputIterator
|
||||
typename O> // O models OutputIterator
|
||||
O move(I f, I l, O result)
|
||||
{
|
||||
while (f != l) {
|
||||
*result = ::boost::move(*f);
|
||||
++f; ++result;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// move_backward
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! <b>Effects</b>: Moves elements in the range [first,last) into the range
|
||||
//! [result - (last-first),result) starting from last - 1 and proceeding to
|
||||
//! first. For each positive integer n <= (last - first),
|
||||
//! performs *(result - n) = ::boost::move(*(last - n)).
|
||||
//!
|
||||
//! <b>Requires</b>: result shall not be in the range [first,last).
|
||||
//!
|
||||
//! <b>Returns</b>: result - (last - first).
|
||||
//!
|
||||
//! <b>Complexity</b>: Exactly last - first assignments.
|
||||
template <typename I, // I models BidirectionalIterator
|
||||
typename O> // O models BidirectionalIterator
|
||||
O move_backward(I f, I l, O result)
|
||||
{
|
||||
while (f != l) {
|
||||
--l; --result;
|
||||
*result = ::boost::move(*l);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
using ::std::move_backward;
|
||||
|
||||
#endif //!defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// uninitialized_move
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! <b>Effects</b>:
|
||||
//! \code
|
||||
//! for (; first != last; ++result, ++first)
|
||||
//! new (static_cast<void*>(&*result))
|
||||
//! typename iterator_traits<ForwardIterator>::value_type(boost::move(*first));
|
||||
//! \endcode
|
||||
//!
|
||||
//! <b>Returns</b>: result
|
||||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
F uninitialized_move(I f, I l, F r
|
||||
/// @cond
|
||||
// ,typename ::boost::move_detail::enable_if<has_move_emulation_enabled<typename std::iterator_traits<I>::value_type> >::type* = 0
|
||||
/// @endcond
|
||||
)
|
||||
{
|
||||
typedef typename std::iterator_traits<I>::value_type input_value_type;
|
||||
|
||||
F back = r;
|
||||
BOOST_TRY{
|
||||
while (f != l) {
|
||||
void * const addr = static_cast<void*>(::boost::move_detail::addressof(*r));
|
||||
::new(addr) input_value_type(::boost::move(*f));
|
||||
++f; ++r;
|
||||
}
|
||||
}
|
||||
BOOST_CATCH(...){
|
||||
for (; back != r; ++back){
|
||||
back->~input_value_type();
|
||||
}
|
||||
BOOST_RETHROW;
|
||||
}
|
||||
BOOST_CATCH_END
|
||||
return r;
|
||||
}
|
||||
|
||||
/// @cond
|
||||
/*
|
||||
template
|
||||
<typename I, // I models InputIterator
|
||||
typename F> // F models ForwardIterator
|
||||
F uninitialized_move(I f, I l, F r,
|
||||
typename ::boost::move_detail::disable_if<has_move_emulation_enabled<typename std::iterator_traits<I>::value_type> >::type* = 0)
|
||||
{
|
||||
return std::uninitialized_copy(f, l, r);
|
||||
}
|
||||
*/
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// uninitialized_copy_or_move
|
||||
|
|
|
|||
|
|
@ -27,6 +27,8 @@
|
|||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/move/detail/workaround.hpp>
|
||||
|
||||
// @cond
|
||||
|
||||
//boost_move_no_copy_constructor_or_assign typedef
|
||||
//used to detect noncopyable types for other Boost libraries.
|
||||
#if defined(BOOST_NO_CXX11_DELETED_FUNCTIONS) || defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
|
|
@ -49,6 +51,8 @@
|
|||
//
|
||||
#endif //BOOST_NO_CXX11_DELETED_FUNCTIONS
|
||||
|
||||
// @endcond
|
||||
|
||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_MOVE_DOXYGEN_INVOKED)
|
||||
|
||||
#include <boost/move/detail/type_traits.hpp>
|
||||
|
|
@ -193,7 +197,7 @@
|
|||
namespace move_detail {
|
||||
|
||||
template <class Ret, class T>
|
||||
inline typename ::boost::move_detail::enable_if_c
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
|
||||
< ::boost::move_detail::is_lvalue_reference<Ret>::value ||
|
||||
!::boost::has_move_emulation_enabled<T>::value
|
||||
, T&>::type
|
||||
|
|
@ -203,7 +207,7 @@
|
|||
}
|
||||
|
||||
template <class Ret, class T>
|
||||
inline typename ::boost::move_detail::enable_if_c
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
|
||||
< !::boost::move_detail::is_lvalue_reference<Ret>::value &&
|
||||
::boost::has_move_emulation_enabled<T>::value
|
||||
, ::boost::rv<T>&>::type
|
||||
|
|
@ -213,7 +217,7 @@
|
|||
}
|
||||
|
||||
template <class Ret, class T>
|
||||
inline typename ::boost::move_detail::enable_if_c
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
|
||||
< !::boost::move_detail::is_lvalue_reference<Ret>::value &&
|
||||
::boost::has_move_emulation_enabled<T>::value
|
||||
, ::boost::rv<T>&>::type
|
||||
|
|
@ -241,9 +245,9 @@
|
|||
#define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\
|
||||
BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\
|
||||
public:\
|
||||
operator ::boost::rv<TYPE>&() \
|
||||
BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
|
||||
{ return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
|
||||
operator const ::boost::rv<TYPE>&() const \
|
||||
BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
|
||||
{ return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\
|
||||
private:\
|
||||
//
|
||||
|
|
@ -256,21 +260,21 @@
|
|||
|
||||
#define BOOST_COPYABLE_AND_MOVABLE(TYPE)\
|
||||
public:\
|
||||
TYPE& operator=(TYPE &t)\
|
||||
{ this->operator=(const_cast<const TYPE &>(t)); return *this;}\
|
||||
BOOST_MOVE_FORCEINLINE TYPE& operator=(TYPE &t)\
|
||||
{ this->operator=(const_cast<const TYPE&>(t)); return *this;}\
|
||||
public:\
|
||||
operator ::boost::rv<TYPE>&() \
|
||||
BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
|
||||
{ return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
|
||||
operator const ::boost::rv<TYPE>&() const \
|
||||
BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
|
||||
{ return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\
|
||||
private:\
|
||||
//
|
||||
|
||||
#define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\
|
||||
public:\
|
||||
operator ::boost::rv<TYPE>&() \
|
||||
BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
|
||||
{ return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
|
||||
operator const ::boost::rv<TYPE>&() const \
|
||||
BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
|
||||
{ return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\
|
||||
private:\
|
||||
//
|
||||
|
|
@ -297,6 +301,7 @@
|
|||
BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\
|
||||
public:\
|
||||
typedef int boost_move_emulation_t;\
|
||||
private:\
|
||||
//
|
||||
|
||||
//! This macro marks a type as copyable and movable.
|
||||
|
|
@ -446,7 +451,7 @@
|
|||
namespace move_detail {
|
||||
|
||||
template <class Ret, class T>
|
||||
inline typename ::boost::move_detail::enable_if_c
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
|
||||
< ::boost::move_detail::is_lvalue_reference<Ret>::value
|
||||
, T&>::type
|
||||
move_return(T& x) BOOST_NOEXCEPT
|
||||
|
|
@ -455,7 +460,7 @@
|
|||
}
|
||||
|
||||
template <class Ret, class T>
|
||||
inline typename ::boost::move_detail::enable_if_c
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
|
||||
< !::boost::move_detail::is_lvalue_reference<Ret>::value
|
||||
, Ret && >::type
|
||||
move_return(T&& t) BOOST_NOEXCEPT
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@
|
|||
//! Describes the default deleter (destruction policy) of <tt>unique_ptr</tt>: <tt>default_delete</tt>.
|
||||
|
||||
namespace boost{
|
||||
// @cond
|
||||
namespace move_upd {
|
||||
|
||||
namespace bmupmu = ::boost::move_upmu;
|
||||
|
|
@ -96,6 +97,7 @@ typedef int bool_conversion::* explicit_bool_arg;
|
|||
#endif
|
||||
|
||||
} //namespace move_upd {
|
||||
// @endcond
|
||||
|
||||
namespace movelib {
|
||||
|
||||
|
|
@ -123,7 +125,11 @@ struct default_delete
|
|||
#endif
|
||||
|
||||
#if defined(BOOST_MOVE_DOXYGEN_INVOKED)
|
||||
//! Trivial copy constructor
|
||||
//!
|
||||
default_delete(const default_delete&) BOOST_NOEXCEPT = default;
|
||||
//! Trivial assignment
|
||||
//!
|
||||
default_delete &operator=(const default_delete&) BOOST_NOEXCEPT = default;
|
||||
#else
|
||||
typedef typename bmupmu::remove_extent<T>::type element_type;
|
||||
|
|
|
|||
|
|
@ -16,4 +16,6 @@
|
|||
# pragma warning (disable : 4324) // structure was padded due to __declspec(align())
|
||||
# pragma warning (disable : 4675) // "function": resolved overload was found by argument-dependent lookup
|
||||
# pragma warning (disable : 4996) // "function": was declared deprecated (_CRT_SECURE_NO_DEPRECATE/_SCL_SECURE_NO_WARNINGS)
|
||||
# pragma warning (disable : 4714) // "function": marked as __forceinline not inlined
|
||||
# pragma warning (disable : 4127) // conditional expression is constant
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -64,20 +64,26 @@ namespace move_detail {
|
|||
#endif //!defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
|
||||
//BOOST_MOVE_REPEATN(MACRO)
|
||||
#define BOOST_MOVE_REPEAT(x, MACRO) BOOST_MOVE_REPEAT_I(x,MACRO)
|
||||
#define BOOST_MOVE_REPEAT_I(x, MACRO) BOOST_MOVE_REPEAT##x(MACRO)
|
||||
#define BOOST_MOVE_REPEAT0(MACRO)
|
||||
#define BOOST_MOVE_REPEAT1(MACRO) MACRO
|
||||
#define BOOST_MOVE_REPEAT2(MACRO) BOOST_MOVE_REPEAT1(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT3(MACRO) BOOST_MOVE_REPEAT2(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT4(MACRO) BOOST_MOVE_REPEAT3(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT5(MACRO) BOOST_MOVE_REPEAT4(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT6(MACRO) BOOST_MOVE_REPEAT5(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT7(MACRO) BOOST_MOVE_REPEAT6(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT8(MACRO) BOOST_MOVE_REPEAT7(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT9(MACRO) BOOST_MOVE_REPEAT8(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT1(MACRO) MACRO
|
||||
#define BOOST_MOVE_REPEAT2(MACRO) BOOST_MOVE_REPEAT1(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT3(MACRO) BOOST_MOVE_REPEAT2(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT4(MACRO) BOOST_MOVE_REPEAT3(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT5(MACRO) BOOST_MOVE_REPEAT4(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT6(MACRO) BOOST_MOVE_REPEAT5(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT7(MACRO) BOOST_MOVE_REPEAT6(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT8(MACRO) BOOST_MOVE_REPEAT7(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT9(MACRO) BOOST_MOVE_REPEAT8(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT10(MACRO) BOOST_MOVE_REPEAT9(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT11(MACRO) BOOST_MOVE_REPEAT10(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT12(MACRO) BOOST_MOVE_REPEAT11(MACRO), MACRO
|
||||
#define BOOST_MOVE_REPEAT13(MACRO) BOOST_MOVE_REPEAT12(MACRO), MACRO
|
||||
|
||||
//BOOST_MOVE_FWDN
|
||||
#define BOOST_MOVE_FWD0
|
||||
#define BOOST_MOVE_FWD1 ::boost::forward<P0>(p0)
|
||||
#define BOOST_MOVE_FWD1 ::boost::forward<P0>(p0)
|
||||
#define BOOST_MOVE_FWD2 BOOST_MOVE_FWD1, ::boost::forward<P1>(p1)
|
||||
#define BOOST_MOVE_FWD3 BOOST_MOVE_FWD2, ::boost::forward<P2>(p2)
|
||||
#define BOOST_MOVE_FWD4 BOOST_MOVE_FWD3, ::boost::forward<P3>(p3)
|
||||
|
|
@ -89,7 +95,7 @@ namespace move_detail {
|
|||
|
||||
//BOOST_MOVE_FWDQN
|
||||
#define BOOST_MOVE_FWDQ0
|
||||
#define BOOST_MOVE_FWDQ1 ::boost::forward<Q0>(q0)
|
||||
#define BOOST_MOVE_FWDQ1 ::boost::forward<Q0>(q0)
|
||||
#define BOOST_MOVE_FWDQ2 BOOST_MOVE_FWDQ1, ::boost::forward<Q1>(q1)
|
||||
#define BOOST_MOVE_FWDQ3 BOOST_MOVE_FWDQ2, ::boost::forward<Q2>(q2)
|
||||
#define BOOST_MOVE_FWDQ4 BOOST_MOVE_FWDQ3, ::boost::forward<Q3>(q3)
|
||||
|
|
@ -99,9 +105,57 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_FWDQ8 BOOST_MOVE_FWDQ7, ::boost::forward<Q7>(q7)
|
||||
#define BOOST_MOVE_FWDQ9 BOOST_MOVE_FWDQ8, ::boost::forward<Q8>(q8)
|
||||
|
||||
//BOOST_MOVE_TMPL_GETN
|
||||
#define BOOST_MOVE_TMPL_GET0
|
||||
#define BOOST_MOVE_TMPL_GET1 p.template get<0>()
|
||||
#define BOOST_MOVE_TMPL_GET2 BOOST_MOVE_TMPL_GET1, p.template get<1>()
|
||||
#define BOOST_MOVE_TMPL_GET3 BOOST_MOVE_TMPL_GET2, p.template get<2>()
|
||||
#define BOOST_MOVE_TMPL_GET4 BOOST_MOVE_TMPL_GET3, p.template get<3>()
|
||||
#define BOOST_MOVE_TMPL_GET5 BOOST_MOVE_TMPL_GET4, p.template get<4>()
|
||||
#define BOOST_MOVE_TMPL_GET6 BOOST_MOVE_TMPL_GET5, p.template get<5>()
|
||||
#define BOOST_MOVE_TMPL_GET7 BOOST_MOVE_TMPL_GET6, p.template get<6>()
|
||||
#define BOOST_MOVE_TMPL_GET8 BOOST_MOVE_TMPL_GET7, p.template get<7>()
|
||||
#define BOOST_MOVE_TMPL_GET9 BOOST_MOVE_TMPL_GET8, p.template get<8>()
|
||||
|
||||
//BOOST_MOVE_TMPL_GETQN
|
||||
#define BOOST_MOVE_TMPL_GETQ0
|
||||
#define BOOST_MOVE_TMPL_GETQ1 q.template get<0>()
|
||||
#define BOOST_MOVE_TMPL_GETQ2 BOOST_MOVE_TMPL_GETQ1, q.template get<1>()
|
||||
#define BOOST_MOVE_TMPL_GETQ3 BOOST_MOVE_TMPL_GETQ2, q.template get<2>()
|
||||
#define BOOST_MOVE_TMPL_GETQ4 BOOST_MOVE_TMPL_GETQ3, q.template get<3>()
|
||||
#define BOOST_MOVE_TMPL_GETQ5 BOOST_MOVE_TMPL_GETQ4, q.template get<4>()
|
||||
#define BOOST_MOVE_TMPL_GETQ6 BOOST_MOVE_TMPL_GETQ5, q.template get<5>()
|
||||
#define BOOST_MOVE_TMPL_GETQ7 BOOST_MOVE_TMPL_GETQ6, q.template get<6>()
|
||||
#define BOOST_MOVE_TMPL_GETQ8 BOOST_MOVE_TMPL_GETQ7, q.template get<7>()
|
||||
#define BOOST_MOVE_TMPL_GETQ9 BOOST_MOVE_TMPL_GETQ8, q.template get<8>()
|
||||
|
||||
//BOOST_MOVE_GET_IDXN
|
||||
#define BOOST_MOVE_GET_IDX0
|
||||
#define BOOST_MOVE_GET_IDX1 get<0>(p)
|
||||
#define BOOST_MOVE_GET_IDX2 BOOST_MOVE_GET_IDX1, get<1>(p)
|
||||
#define BOOST_MOVE_GET_IDX3 BOOST_MOVE_GET_IDX2, get<2>(p)
|
||||
#define BOOST_MOVE_GET_IDX4 BOOST_MOVE_GET_IDX3, get<3>(p)
|
||||
#define BOOST_MOVE_GET_IDX5 BOOST_MOVE_GET_IDX4, get<4>(p)
|
||||
#define BOOST_MOVE_GET_IDX6 BOOST_MOVE_GET_IDX5, get<5>(p)
|
||||
#define BOOST_MOVE_GET_IDX7 BOOST_MOVE_GET_IDX6, get<6>(p)
|
||||
#define BOOST_MOVE_GET_IDX8 BOOST_MOVE_GET_IDX7, get<7>(p)
|
||||
#define BOOST_MOVE_GET_IDX9 BOOST_MOVE_GET_IDX8, get<8>(p)
|
||||
|
||||
//BOOST_MOVE_GET_IDXQN
|
||||
#define BOOST_MOVE_GET_IDXQ0
|
||||
#define BOOST_MOVE_GET_IDXQ1 get<0>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ2 BOOST_MOVE_GET_IDXQ1, get<1>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ3 BOOST_MOVE_GET_IDXQ2, get<2>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ4 BOOST_MOVE_GET_IDXQ3, get<3>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ5 BOOST_MOVE_GET_IDXQ4, get<4>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ6 BOOST_MOVE_GET_IDXQ5, get<5>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ7 BOOST_MOVE_GET_IDXQ6, get<6>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ8 BOOST_MOVE_GET_IDXQ7, get<7>(q)
|
||||
#define BOOST_MOVE_GET_IDXQ9 BOOST_MOVE_GET_IDXQ8, get<8>(q)
|
||||
|
||||
//BOOST_MOVE_ARGN
|
||||
#define BOOST_MOVE_ARG0
|
||||
#define BOOST_MOVE_ARG1 p0
|
||||
#define BOOST_MOVE_ARG1 p0
|
||||
#define BOOST_MOVE_ARG2 BOOST_MOVE_ARG1, p1
|
||||
#define BOOST_MOVE_ARG3 BOOST_MOVE_ARG2, p2
|
||||
#define BOOST_MOVE_ARG4 BOOST_MOVE_ARG3, p3
|
||||
|
|
@ -111,9 +165,21 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_ARG8 BOOST_MOVE_ARG7, p7
|
||||
#define BOOST_MOVE_ARG9 BOOST_MOVE_ARG8, p8
|
||||
|
||||
//BOOST_MOVE_ARGQN
|
||||
#define BOOST_MOVE_ARGQ0
|
||||
#define BOOST_MOVE_ARGQ1 q0
|
||||
#define BOOST_MOVE_ARGQ2 BOOST_MOVE_ARGQ1, q1
|
||||
#define BOOST_MOVE_ARGQ3 BOOST_MOVE_ARGQ2, q2
|
||||
#define BOOST_MOVE_ARGQ4 BOOST_MOVE_ARGQ3, q3
|
||||
#define BOOST_MOVE_ARGQ5 BOOST_MOVE_ARGQ4, q4
|
||||
#define BOOST_MOVE_ARGQ6 BOOST_MOVE_ARGQ5, q5
|
||||
#define BOOST_MOVE_ARGQ7 BOOST_MOVE_ARGQ6, q6
|
||||
#define BOOST_MOVE_ARGQ8 BOOST_MOVE_ARGQ7, q7
|
||||
#define BOOST_MOVE_ARGQ9 BOOST_MOVE_ARGQ8, q8
|
||||
|
||||
//BOOST_MOVE_DECLVALN
|
||||
#define BOOST_MOVE_DECLVAL0
|
||||
#define BOOST_MOVE_DECLVAL1 ::boost::move_detail::declval<P0>()
|
||||
#define BOOST_MOVE_DECLVAL1 ::boost::move_detail::declval<P0>()
|
||||
#define BOOST_MOVE_DECLVAL2 BOOST_MOVE_DECLVAL1, ::boost::move_detail::declval<P1>()
|
||||
#define BOOST_MOVE_DECLVAL3 BOOST_MOVE_DECLVAL2, ::boost::move_detail::declval<P2>()
|
||||
#define BOOST_MOVE_DECLVAL4 BOOST_MOVE_DECLVAL3, ::boost::move_detail::declval<P3>()
|
||||
|
|
@ -123,19 +189,36 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_DECLVAL8 BOOST_MOVE_DECLVAL7, ::boost::move_detail::declval<P7>()
|
||||
#define BOOST_MOVE_DECLVAL9 BOOST_MOVE_DECLVAL8, ::boost::move_detail::declval<P8>()
|
||||
|
||||
//BOOST_MOVE_DECLVALQN
|
||||
#define BOOST_MOVE_DECLVALQ0
|
||||
#define BOOST_MOVE_DECLVALQ1 ::boost::move_detail::declval<Q0>()
|
||||
#define BOOST_MOVE_DECLVALQ2 BOOST_MOVE_DECLVALQ1, ::boost::move_detail::declval<Q1>()
|
||||
#define BOOST_MOVE_DECLVALQ3 BOOST_MOVE_DECLVALQ2, ::boost::move_detail::declval<Q2>()
|
||||
#define BOOST_MOVE_DECLVALQ4 BOOST_MOVE_DECLVALQ3, ::boost::move_detail::declval<Q3>()
|
||||
#define BOOST_MOVE_DECLVALQ5 BOOST_MOVE_DECLVALQ4, ::boost::move_detail::declval<Q4>()
|
||||
#define BOOST_MOVE_DECLVALQ6 BOOST_MOVE_DECLVALQ5, ::boost::move_detail::declval<Q5>()
|
||||
#define BOOST_MOVE_DECLVALQ7 BOOST_MOVE_DECLVALQ6, ::boost::move_detail::declval<Q6>()
|
||||
#define BOOST_MOVE_DECLVALQ8 BOOST_MOVE_DECLVALQ7, ::boost::move_detail::declval<Q7>()
|
||||
#define BOOST_MOVE_DECLVALQ9 BOOST_MOVE_DECLVALQ8, ::boost::move_detail::declval<Q8>()
|
||||
|
||||
#ifdef BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
|
||||
#define BOOST_MOVE_MREF(T) ::boost::move_detail::mref<T>
|
||||
#define BOOST_MOVE_MFWD(N) ::boost::forward<P##N>(this->m_p##N.get())
|
||||
#define BOOST_MOVE_MFWDQ(N) ::boost::forward<Q##N>(this->m_q##N.get())
|
||||
#else
|
||||
#define BOOST_MOVE_MREF(T) BOOST_FWD_REF(T)
|
||||
#define BOOST_MOVE_MFWD(N) ::boost::forward<P##N>(this->m_p##N)
|
||||
#define BOOST_MOVE_MFWDQ(N) ::boost::forward<Q##N>(this->m_q##N)
|
||||
#endif
|
||||
#define BOOST_MOVE_MITFWD(N) *this->m_p##N
|
||||
#define BOOST_MOVE_MINC(N) ++this->m_p##N
|
||||
#define BOOST_MOVE_MITFWDQ(N) *this->m_q##N
|
||||
#define BOOST_MOVE_MINCQ(N) ++this->m_q##N
|
||||
|
||||
|
||||
//BOOST_MOVE_MFWDN
|
||||
#define BOOST_MOVE_MFWD0
|
||||
#define BOOST_MOVE_MFWD1 BOOST_MOVE_MFWD(0)
|
||||
#define BOOST_MOVE_MFWD1 BOOST_MOVE_MFWD(0)
|
||||
#define BOOST_MOVE_MFWD2 BOOST_MOVE_MFWD1, BOOST_MOVE_MFWD(1)
|
||||
#define BOOST_MOVE_MFWD3 BOOST_MOVE_MFWD2, BOOST_MOVE_MFWD(2)
|
||||
#define BOOST_MOVE_MFWD4 BOOST_MOVE_MFWD3, BOOST_MOVE_MFWD(3)
|
||||
|
|
@ -145,9 +228,21 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_MFWD8 BOOST_MOVE_MFWD7, BOOST_MOVE_MFWD(7)
|
||||
#define BOOST_MOVE_MFWD9 BOOST_MOVE_MFWD8, BOOST_MOVE_MFWD(8)
|
||||
|
||||
//BOOST_MOVE_MFWDN
|
||||
#define BOOST_MOVE_MFWDQ0
|
||||
#define BOOST_MOVE_MFWDQ1 BOOST_MOVE_MFWDQ(0)
|
||||
#define BOOST_MOVE_MFWDQ2 BOOST_MOVE_MFWDQ1, BOOST_MOVE_MFWDQ(1)
|
||||
#define BOOST_MOVE_MFWDQ3 BOOST_MOVE_MFWDQ2, BOOST_MOVE_MFWDQ(2)
|
||||
#define BOOST_MOVE_MFWDQ4 BOOST_MOVE_MFWDQ3, BOOST_MOVE_MFWDQ(3)
|
||||
#define BOOST_MOVE_MFWDQ5 BOOST_MOVE_MFWDQ4, BOOST_MOVE_MFWDQ(4)
|
||||
#define BOOST_MOVE_MFWDQ6 BOOST_MOVE_MFWDQ5, BOOST_MOVE_MFWDQ(5)
|
||||
#define BOOST_MOVE_MFWDQ7 BOOST_MOVE_MFWDQ6, BOOST_MOVE_MFWDQ(6)
|
||||
#define BOOST_MOVE_MFWDQ8 BOOST_MOVE_MFWDQ7, BOOST_MOVE_MFWDQ(7)
|
||||
#define BOOST_MOVE_MFWDQ9 BOOST_MOVE_MFWDQ8, BOOST_MOVE_MFWDQ(8)
|
||||
|
||||
//BOOST_MOVE_MINCN
|
||||
#define BOOST_MOVE_MINC0
|
||||
#define BOOST_MOVE_MINC1 BOOST_MOVE_MINC(0)
|
||||
#define BOOST_MOVE_MINC1 BOOST_MOVE_MINC(0)
|
||||
#define BOOST_MOVE_MINC2 BOOST_MOVE_MINC1, BOOST_MOVE_MINC(1)
|
||||
#define BOOST_MOVE_MINC3 BOOST_MOVE_MINC2, BOOST_MOVE_MINC(2)
|
||||
#define BOOST_MOVE_MINC4 BOOST_MOVE_MINC3, BOOST_MOVE_MINC(3)
|
||||
|
|
@ -157,9 +252,21 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_MINC8 BOOST_MOVE_MINC7, BOOST_MOVE_MINC(7)
|
||||
#define BOOST_MOVE_MINC9 BOOST_MOVE_MINC8, BOOST_MOVE_MINC(8)
|
||||
|
||||
//BOOST_MOVE_MINCQN
|
||||
#define BOOST_MOVE_MINCQ0
|
||||
#define BOOST_MOVE_MINCQ1 BOOST_MOVE_MINCQ(0)
|
||||
#define BOOST_MOVE_MINCQ2 BOOST_MOVE_MINCQ1, BOOST_MOVE_MINCQ(1)
|
||||
#define BOOST_MOVE_MINCQ3 BOOST_MOVE_MINCQ2, BOOST_MOVE_MINCQ(2)
|
||||
#define BOOST_MOVE_MINCQ4 BOOST_MOVE_MINCQ3, BOOST_MOVE_MINCQ(3)
|
||||
#define BOOST_MOVE_MINCQ5 BOOST_MOVE_MINCQ4, BOOST_MOVE_MINCQ(4)
|
||||
#define BOOST_MOVE_MINCQ6 BOOST_MOVE_MINCQ5, BOOST_MOVE_MINCQ(5)
|
||||
#define BOOST_MOVE_MINCQ7 BOOST_MOVE_MINCQ6, BOOST_MOVE_MINCQ(6)
|
||||
#define BOOST_MOVE_MINCQ8 BOOST_MOVE_MINCQ7, BOOST_MOVE_MINCQ(7)
|
||||
#define BOOST_MOVE_MINCQ9 BOOST_MOVE_MINCQ8, BOOST_MOVE_MINCQ(8)
|
||||
|
||||
//BOOST_MOVE_MITFWDN
|
||||
#define BOOST_MOVE_MITFWD0
|
||||
#define BOOST_MOVE_MITFWD1 BOOST_MOVE_MITFWD(0)
|
||||
#define BOOST_MOVE_MITFWD1 BOOST_MOVE_MITFWD(0)
|
||||
#define BOOST_MOVE_MITFWD2 BOOST_MOVE_MITFWD1, BOOST_MOVE_MITFWD(1)
|
||||
#define BOOST_MOVE_MITFWD3 BOOST_MOVE_MITFWD2, BOOST_MOVE_MITFWD(2)
|
||||
#define BOOST_MOVE_MITFWD4 BOOST_MOVE_MITFWD3, BOOST_MOVE_MITFWD(3)
|
||||
|
|
@ -169,10 +276,21 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_MITFWD8 BOOST_MOVE_MITFWD7, BOOST_MOVE_MITFWD(7)
|
||||
#define BOOST_MOVE_MITFWD9 BOOST_MOVE_MITFWD8, BOOST_MOVE_MITFWD(8)
|
||||
|
||||
//BOOST_MOVE_MITFWDQN
|
||||
#define BOOST_MOVE_MITFWDQ0
|
||||
#define BOOST_MOVE_MITFWDQ1 BOOST_MOVE_MITFWDQ(0)
|
||||
#define BOOST_MOVE_MITFWDQ2 BOOST_MOVE_MITFWDQ1, BOOST_MOVE_MITFWDQ(1)
|
||||
#define BOOST_MOVE_MITFWDQ3 BOOST_MOVE_MITFWDQ2, BOOST_MOVE_MITFWDQ(2)
|
||||
#define BOOST_MOVE_MITFWDQ4 BOOST_MOVE_MITFWDQ3, BOOST_MOVE_MITFWDQ(3)
|
||||
#define BOOST_MOVE_MITFWDQ5 BOOST_MOVE_MITFWDQ4, BOOST_MOVE_MITFWDQ(4)
|
||||
#define BOOST_MOVE_MITFWDQ6 BOOST_MOVE_MITFWDQ5, BOOST_MOVE_MITFWDQ(5)
|
||||
#define BOOST_MOVE_MITFWDQ7 BOOST_MOVE_MITFWDQ6, BOOST_MOVE_MITFWDQ(6)
|
||||
#define BOOST_MOVE_MITFWDQ8 BOOST_MOVE_MITFWDQ7, BOOST_MOVE_MITFWDQ(7)
|
||||
#define BOOST_MOVE_MITFWDQ9 BOOST_MOVE_MITFWDQ8, BOOST_MOVE_MITFWDQ(8)
|
||||
|
||||
//BOOST_MOVE_FWD_INITN
|
||||
#define BOOST_MOVE_FWD_INIT0
|
||||
#define BOOST_MOVE_FWD_INIT1 m_p0(::boost::forward<P0>(p0))
|
||||
#define BOOST_MOVE_FWD_INIT1 m_p0(::boost::forward<P0>(p0))
|
||||
#define BOOST_MOVE_FWD_INIT2 BOOST_MOVE_FWD_INIT1, m_p1(::boost::forward<P1>(p1))
|
||||
#define BOOST_MOVE_FWD_INIT3 BOOST_MOVE_FWD_INIT2, m_p2(::boost::forward<P2>(p2))
|
||||
#define BOOST_MOVE_FWD_INIT4 BOOST_MOVE_FWD_INIT3, m_p3(::boost::forward<P3>(p3))
|
||||
|
|
@ -182,9 +300,21 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_FWD_INIT8 BOOST_MOVE_FWD_INIT7, m_p7(::boost::forward<P7>(p7))
|
||||
#define BOOST_MOVE_FWD_INIT9 BOOST_MOVE_FWD_INIT8, m_p8(::boost::forward<P8>(p8))
|
||||
|
||||
//BOOST_MOVE_FWD_INITQN
|
||||
#define BOOST_MOVE_FWD_INITQ0
|
||||
#define BOOST_MOVE_FWD_INITQ1 m_q0(::boost::forward<Q0>(q0))
|
||||
#define BOOST_MOVE_FWD_INITQ2 BOOST_MOVE_FWD_INITQ1, m_q1(::boost::forward<Q1>(q1))
|
||||
#define BOOST_MOVE_FWD_INITQ3 BOOST_MOVE_FWD_INITQ2, m_q2(::boost::forward<Q2>(q2))
|
||||
#define BOOST_MOVE_FWD_INITQ4 BOOST_MOVE_FWD_INITQ3, m_q3(::boost::forward<Q3>(q3))
|
||||
#define BOOST_MOVE_FWD_INITQ5 BOOST_MOVE_FWD_INITQ4, m_q4(::boost::forward<Q4>(q4))
|
||||
#define BOOST_MOVE_FWD_INITQ6 BOOST_MOVE_FWD_INITQ5, m_q5(::boost::forward<Q5>(q5))
|
||||
#define BOOST_MOVE_FWD_INITQ7 BOOST_MOVE_FWD_INITQ6, m_q6(::boost::forward<Q6>(q6))
|
||||
#define BOOST_MOVE_FWD_INITQ8 BOOST_MOVE_FWD_INITQ7, m_q7(::boost::forward<Q7>(q7))
|
||||
#define BOOST_MOVE_FWD_INITQ9 BOOST_MOVE_FWD_INITQ8, m_q8(::boost::forward<Q8>(q8))
|
||||
|
||||
//BOOST_MOVE_VAL_INITN
|
||||
#define BOOST_MOVE_VAL_INIT0
|
||||
#define BOOST_MOVE_VAL_INIT1 m_p0(p0)
|
||||
#define BOOST_MOVE_VAL_INIT1 m_p0(p0)
|
||||
#define BOOST_MOVE_VAL_INIT2 BOOST_MOVE_VAL_INIT1, m_p1(p1)
|
||||
#define BOOST_MOVE_VAL_INIT3 BOOST_MOVE_VAL_INIT2, m_p2(p2)
|
||||
#define BOOST_MOVE_VAL_INIT4 BOOST_MOVE_VAL_INIT3, m_p3(p3)
|
||||
|
|
@ -194,9 +324,21 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_VAL_INIT8 BOOST_MOVE_VAL_INIT7, m_p7(p7)
|
||||
#define BOOST_MOVE_VAL_INIT9 BOOST_MOVE_VAL_INIT8, m_p8(p8)
|
||||
|
||||
//BOOST_MOVE_VAL_INITQN
|
||||
#define BOOST_MOVE_VAL_INITQ0
|
||||
#define BOOST_MOVE_VAL_INITQ1 m_q0(q0)
|
||||
#define BOOST_MOVE_VAL_INITQ2 BOOST_MOVE_VAL_INITQ1, m_q1(q1)
|
||||
#define BOOST_MOVE_VAL_INITQ3 BOOST_MOVE_VAL_INITQ2, m_q2(q2)
|
||||
#define BOOST_MOVE_VAL_INITQ4 BOOST_MOVE_VAL_INITQ3, m_q3(q3)
|
||||
#define BOOST_MOVE_VAL_INITQ5 BOOST_MOVE_VAL_INITQ4, m_q4(q4)
|
||||
#define BOOST_MOVE_VAL_INITQ6 BOOST_MOVE_VAL_INITQ5, m_q5(q5)
|
||||
#define BOOST_MOVE_VAL_INITQ7 BOOST_MOVE_VAL_INITQ6, m_q6(q6)
|
||||
#define BOOST_MOVE_VAL_INITQ8 BOOST_MOVE_VAL_INITQ7, m_q7(q7)
|
||||
#define BOOST_MOVE_VAL_INITQ9 BOOST_MOVE_VAL_INITQ8, m_q8(q8)
|
||||
|
||||
//BOOST_MOVE_UREFN
|
||||
#define BOOST_MOVE_UREF0
|
||||
#define BOOST_MOVE_UREF1 BOOST_FWD_REF(P0) p0
|
||||
#define BOOST_MOVE_UREF1 BOOST_FWD_REF(P0) p0
|
||||
#define BOOST_MOVE_UREF2 BOOST_MOVE_UREF1, BOOST_FWD_REF(P1) p1
|
||||
#define BOOST_MOVE_UREF3 BOOST_MOVE_UREF2, BOOST_FWD_REF(P2) p2
|
||||
#define BOOST_MOVE_UREF4 BOOST_MOVE_UREF3, BOOST_FWD_REF(P3) p3
|
||||
|
|
@ -206,21 +348,9 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_UREF8 BOOST_MOVE_UREF7, BOOST_FWD_REF(P7) p7
|
||||
#define BOOST_MOVE_UREF9 BOOST_MOVE_UREF8, BOOST_FWD_REF(P8) p8
|
||||
|
||||
//BOOST_MOVE_VALN
|
||||
#define BOOST_MOVE_VAL0
|
||||
#define BOOST_MOVE_VAL1 P0 p0
|
||||
#define BOOST_MOVE_VAL2 BOOST_MOVE_VAL1, BOOST_FWD_REF(P1) p1
|
||||
#define BOOST_MOVE_VAL3 BOOST_MOVE_VAL2, BOOST_FWD_REF(P2) p2
|
||||
#define BOOST_MOVE_VAL4 BOOST_MOVE_VAL3, BOOST_FWD_REF(P3) p3
|
||||
#define BOOST_MOVE_VAL5 BOOST_MOVE_VAL4, BOOST_FWD_REF(P4) p4
|
||||
#define BOOST_MOVE_VAL6 BOOST_MOVE_VAL5, BOOST_FWD_REF(P5) p5
|
||||
#define BOOST_MOVE_VAL7 BOOST_MOVE_VAL6, BOOST_FWD_REF(P6) p6
|
||||
#define BOOST_MOVE_VAL8 BOOST_MOVE_VAL7, BOOST_FWD_REF(P7) p7
|
||||
#define BOOST_MOVE_VAL9 BOOST_MOVE_VAL8, BOOST_FWD_REF(P8) p8
|
||||
|
||||
//BOOST_MOVE_UREFQN
|
||||
#define BOOST_MOVE_UREFQ0
|
||||
#define BOOST_MOVE_UREFQ1 BOOST_FWD_REF(Q0) q0
|
||||
#define BOOST_MOVE_UREFQ1 BOOST_FWD_REF(Q0) q0
|
||||
#define BOOST_MOVE_UREFQ2 BOOST_MOVE_UREFQ1, BOOST_FWD_REF(Q1) q1
|
||||
#define BOOST_MOVE_UREFQ3 BOOST_MOVE_UREFQ2, BOOST_FWD_REF(Q2) q2
|
||||
#define BOOST_MOVE_UREFQ4 BOOST_MOVE_UREFQ3, BOOST_FWD_REF(Q3) q3
|
||||
|
|
@ -230,10 +360,35 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_UREFQ8 BOOST_MOVE_UREFQ7, BOOST_FWD_REF(Q7) q7
|
||||
#define BOOST_MOVE_UREFQ9 BOOST_MOVE_UREFQ8, BOOST_FWD_REF(Q8) q8
|
||||
|
||||
//BOOST_MOVE_CREFN
|
||||
//BOOST_MOVE_VALN
|
||||
#define BOOST_MOVE_VAL0
|
||||
#define BOOST_MOVE_VAL1 BOOST_FWD_REF(P0) p0
|
||||
#define BOOST_MOVE_VAL2 BOOST_MOVE_VAL1, BOOST_FWD_REF(P1) p1
|
||||
#define BOOST_MOVE_VAL3 BOOST_MOVE_VAL2, BOOST_FWD_REF(P2) p2
|
||||
#define BOOST_MOVE_VAL4 BOOST_MOVE_VAL3, BOOST_FWD_REF(P3) p3
|
||||
#define BOOST_MOVE_VAL5 BOOST_MOVE_VAL4, BOOST_FWD_REF(P4) p4
|
||||
#define BOOST_MOVE_VAL6 BOOST_MOVE_VAL5, BOOST_FWD_REF(P5) p5
|
||||
#define BOOST_MOVE_VAL7 BOOST_MOVE_VAL6, BOOST_FWD_REF(P6) p6
|
||||
#define BOOST_MOVE_VAL8 BOOST_MOVE_VAL7, BOOST_FWD_REF(P7) p7
|
||||
#define BOOST_MOVE_VAL9 BOOST_MOVE_VAL8, BOOST_FWD_REF(P8) p8
|
||||
|
||||
//BOOST_MOVE_VALQN
|
||||
#define BOOST_MOVE_VALQ0
|
||||
#define BOOST_MOVE_VALQ1 BOOST_FWD_REF(Q0) q0
|
||||
#define BOOST_MOVE_VALQ2 BOOST_MOVE_VALQ1, BOOST_FWD_REF(Q1) q1
|
||||
#define BOOST_MOVE_VALQ3 BOOST_MOVE_VALQ2, BOOST_FWD_REF(Q2) q2
|
||||
#define BOOST_MOVE_VALQ4 BOOST_MOVE_VALQ3, BOOST_FWD_REF(Q3) q3
|
||||
#define BOOST_MOVE_VALQ5 BOOST_MOVE_VALQ4, BOOST_FWD_REF(Q4) q4
|
||||
#define BOOST_MOVE_VALQ6 BOOST_MOVE_VALQ5, BOOST_FWD_REF(Q5) q5
|
||||
#define BOOST_MOVE_VALQ7 BOOST_MOVE_VALQ6, BOOST_FWD_REF(Q6) q6
|
||||
#define BOOST_MOVE_VALQ8 BOOST_MOVE_VALQ7, BOOST_FWD_REF(Q7) q7
|
||||
#define BOOST_MOVE_VALQ9 BOOST_MOVE_VALQ8, BOOST_FWD_REF(Q8) q8
|
||||
|
||||
|
||||
#define BOOST_MOVE_UNVOIDCREF(T) const typename boost::move_detail::unvoid<T>::type&
|
||||
//BOOST_MOVE_CREFN
|
||||
#define BOOST_MOVE_CREF0
|
||||
#define BOOST_MOVE_CREF1 BOOST_MOVE_UNVOIDCREF(P0) p0
|
||||
#define BOOST_MOVE_CREF1 BOOST_MOVE_UNVOIDCREF(P0) p0
|
||||
#define BOOST_MOVE_CREF2 BOOST_MOVE_CREF1, BOOST_MOVE_UNVOIDCREF(P1) p1
|
||||
#define BOOST_MOVE_CREF3 BOOST_MOVE_CREF2, BOOST_MOVE_UNVOIDCREF(P2) p2
|
||||
#define BOOST_MOVE_CREF4 BOOST_MOVE_CREF3, BOOST_MOVE_UNVOIDCREF(P3) p3
|
||||
|
|
@ -243,9 +398,21 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_CREF8 BOOST_MOVE_CREF7, BOOST_MOVE_UNVOIDCREF(P7) p7
|
||||
#define BOOST_MOVE_CREF9 BOOST_MOVE_CREF8, BOOST_MOVE_UNVOIDCREF(P8) p8
|
||||
|
||||
//BOOST_MOVE_CREFQN
|
||||
#define BOOST_MOVE_CREFQ0
|
||||
#define BOOST_MOVE_CREFQ1 BOOST_MOVE_UNVOIDCREF(Q0) q0
|
||||
#define BOOST_MOVE_CREFQ2 BOOST_MOVE_CREFQ1, BOOST_MOVE_UNVOIDCREF(Q1) q1
|
||||
#define BOOST_MOVE_CREFQ3 BOOST_MOVE_CREFQ2, BOOST_MOVE_UNVOIDCREF(Q2) q2
|
||||
#define BOOST_MOVE_CREFQ4 BOOST_MOVE_CREFQ3, BOOST_MOVE_UNVOIDCREF(Q3) q3
|
||||
#define BOOST_MOVE_CREFQ5 BOOST_MOVE_CREFQ4, BOOST_MOVE_UNVOIDCREF(Q4) q4
|
||||
#define BOOST_MOVE_CREFQ6 BOOST_MOVE_CREFQ5, BOOST_MOVE_UNVOIDCREF(Q5) q5
|
||||
#define BOOST_MOVE_CREFQ7 BOOST_MOVE_CREFQ6, BOOST_MOVE_UNVOIDCREF(Q6) q6
|
||||
#define BOOST_MOVE_CREFQ8 BOOST_MOVE_CREFQ7, BOOST_MOVE_UNVOIDCREF(Q7) q7
|
||||
#define BOOST_MOVE_CREFQ9 BOOST_MOVE_CREFQ8, BOOST_MOVE_UNVOIDCREF(Q8) q8
|
||||
|
||||
//BOOST_MOVE_CLASSN
|
||||
#define BOOST_MOVE_CLASS0
|
||||
#define BOOST_MOVE_CLASS1 class P0
|
||||
#define BOOST_MOVE_CLASS1 class P0
|
||||
#define BOOST_MOVE_CLASS2 BOOST_MOVE_CLASS1, class P1
|
||||
#define BOOST_MOVE_CLASS3 BOOST_MOVE_CLASS2, class P2
|
||||
#define BOOST_MOVE_CLASS4 BOOST_MOVE_CLASS3, class P3
|
||||
|
|
@ -257,7 +424,7 @@ namespace move_detail {
|
|||
|
||||
//BOOST_MOVE_CLASSQN
|
||||
#define BOOST_MOVE_CLASSQ0
|
||||
#define BOOST_MOVE_CLASSQ1 class Q0
|
||||
#define BOOST_MOVE_CLASSQ1 class Q0
|
||||
#define BOOST_MOVE_CLASSQ2 BOOST_MOVE_CLASSQ1, class Q1
|
||||
#define BOOST_MOVE_CLASSQ3 BOOST_MOVE_CLASSQ2, class Q2
|
||||
#define BOOST_MOVE_CLASSQ4 BOOST_MOVE_CLASSQ3, class Q3
|
||||
|
|
@ -269,7 +436,7 @@ namespace move_detail {
|
|||
|
||||
//BOOST_MOVE_CLASSDFLTN
|
||||
#define BOOST_MOVE_CLASSDFLT0
|
||||
#define BOOST_MOVE_CLASSDFLT1 class P0 = void
|
||||
#define BOOST_MOVE_CLASSDFLT1 class P0 = void
|
||||
#define BOOST_MOVE_CLASSDFLT2 BOOST_MOVE_CLASSDFLT1, class P1 = void
|
||||
#define BOOST_MOVE_CLASSDFLT3 BOOST_MOVE_CLASSDFLT2, class P2 = void
|
||||
#define BOOST_MOVE_CLASSDFLT4 BOOST_MOVE_CLASSDFLT3, class P3 = void
|
||||
|
|
@ -279,9 +446,21 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_CLASSDFLT8 BOOST_MOVE_CLASSDFLT7, class P7 = void
|
||||
#define BOOST_MOVE_CLASSDFLT9 BOOST_MOVE_CLASSDFLT8, class P8 = void
|
||||
|
||||
//BOOST_MOVE_CLASSDFLTQN
|
||||
#define BOOST_MOVE_CLASSDFLTQ0
|
||||
#define BOOST_MOVE_CLASSDFLTQ1 class Q0 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ2 BOOST_MOVE_CLASSDFLTQ1, class Q1 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ3 BOOST_MOVE_CLASSDFLTQ2, class Q2 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ4 BOOST_MOVE_CLASSDFLTQ3, class Q3 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ5 BOOST_MOVE_CLASSDFLTQ4, class Q4 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ6 BOOST_MOVE_CLASSDFLTQ5, class Q5 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ7 BOOST_MOVE_CLASSDFLTQ6, class Q6 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ8 BOOST_MOVE_CLASSDFLTQ7, class Q7 = void
|
||||
#define BOOST_MOVE_CLASSDFLTQ9 BOOST_MOVE_CLASSDFLTQ8, class Q8 = void
|
||||
|
||||
//BOOST_MOVE_TARGN
|
||||
#define BOOST_MOVE_TARG0
|
||||
#define BOOST_MOVE_TARG1 P0
|
||||
#define BOOST_MOVE_TARG1 P0
|
||||
#define BOOST_MOVE_TARG2 BOOST_MOVE_TARG1, P1
|
||||
#define BOOST_MOVE_TARG3 BOOST_MOVE_TARG2, P2
|
||||
#define BOOST_MOVE_TARG4 BOOST_MOVE_TARG3, P3
|
||||
|
|
@ -291,9 +470,21 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_TARG8 BOOST_MOVE_TARG7, P7
|
||||
#define BOOST_MOVE_TARG9 BOOST_MOVE_TARG8, P8
|
||||
|
||||
//BOOST_MOVE_TARGQN
|
||||
#define BOOST_MOVE_TARGQ0
|
||||
#define BOOST_MOVE_TARGQ1 Q0
|
||||
#define BOOST_MOVE_TARGQ2 BOOST_MOVE_TARGQ1, Q1
|
||||
#define BOOST_MOVE_TARGQ3 BOOST_MOVE_TARGQ2, Q2
|
||||
#define BOOST_MOVE_TARGQ4 BOOST_MOVE_TARGQ3, Q3
|
||||
#define BOOST_MOVE_TARGQ5 BOOST_MOVE_TARGQ4, Q4
|
||||
#define BOOST_MOVE_TARGQ6 BOOST_MOVE_TARGQ5, Q5
|
||||
#define BOOST_MOVE_TARGQ7 BOOST_MOVE_TARGQ6, Q6
|
||||
#define BOOST_MOVE_TARGQ8 BOOST_MOVE_TARGQ7, Q7
|
||||
#define BOOST_MOVE_TARGQ9 BOOST_MOVE_TARGQ8, Q8
|
||||
|
||||
//BOOST_MOVE_FWD_TN
|
||||
#define BOOST_MOVE_FWD_T0
|
||||
#define BOOST_MOVE_FWD_T1 typename ::boost::move_detail::forward_type<P0>::type
|
||||
#define BOOST_MOVE_FWD_T1 typename ::boost::move_detail::forward_type<P0>::type
|
||||
#define BOOST_MOVE_FWD_T2 BOOST_MOVE_FWD_T1, typename ::boost::move_detail::forward_type<P1>::type
|
||||
#define BOOST_MOVE_FWD_T3 BOOST_MOVE_FWD_T2, typename ::boost::move_detail::forward_type<P2>::type
|
||||
#define BOOST_MOVE_FWD_T4 BOOST_MOVE_FWD_T3, typename ::boost::move_detail::forward_type<P3>::type
|
||||
|
|
@ -303,9 +494,21 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_FWD_T8 BOOST_MOVE_FWD_T7, typename ::boost::move_detail::forward_type<P7>::type
|
||||
#define BOOST_MOVE_FWD_T9 BOOST_MOVE_FWD_T8, typename ::boost::move_detail::forward_type<P8>::type
|
||||
|
||||
//BOOST_MOVE_FWD_TQN
|
||||
#define BOOST_MOVE_FWD_TQ0
|
||||
#define BOOST_MOVE_FWD_TQ1 typename ::boost::move_detail::forward_type<Q0>::type
|
||||
#define BOOST_MOVE_FWD_TQ2 BOOST_MOVE_FWD_TQ1, typename ::boost::move_detail::forward_type<Q1>::type
|
||||
#define BOOST_MOVE_FWD_TQ3 BOOST_MOVE_FWD_TQ2, typename ::boost::move_detail::forward_type<Q2>::type
|
||||
#define BOOST_MOVE_FWD_TQ4 BOOST_MOVE_FWD_TQ3, typename ::boost::move_detail::forward_type<Q3>::type
|
||||
#define BOOST_MOVE_FWD_TQ5 BOOST_MOVE_FWD_TQ4, typename ::boost::move_detail::forward_type<Q4>::type
|
||||
#define BOOST_MOVE_FWD_TQ6 BOOST_MOVE_FWD_TQ5, typename ::boost::move_detail::forward_type<Q5>::type
|
||||
#define BOOST_MOVE_FWD_TQ7 BOOST_MOVE_FWD_TQ6, typename ::boost::move_detail::forward_type<Q6>::type
|
||||
#define BOOST_MOVE_FWD_TQ8 BOOST_MOVE_FWD_TQ7, typename ::boost::move_detail::forward_type<Q7>::type
|
||||
#define BOOST_MOVE_FWD_TQ9 BOOST_MOVE_FWD_TQ8, typename ::boost::move_detail::forward_type<Q8>::type
|
||||
|
||||
//BOOST_MOVE_MREFX
|
||||
#define BOOST_MOVE_MREF0
|
||||
#define BOOST_MOVE_MREF1 BOOST_MOVE_MREF(P0) m_p0;
|
||||
#define BOOST_MOVE_MREF1 BOOST_MOVE_MREF(P0) m_p0;
|
||||
#define BOOST_MOVE_MREF2 BOOST_MOVE_MREF1 BOOST_MOVE_MREF(P1) m_p1;
|
||||
#define BOOST_MOVE_MREF3 BOOST_MOVE_MREF2 BOOST_MOVE_MREF(P2) m_p2;
|
||||
#define BOOST_MOVE_MREF4 BOOST_MOVE_MREF3 BOOST_MOVE_MREF(P3) m_p3;
|
||||
|
|
@ -315,9 +518,21 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_MREF8 BOOST_MOVE_MREF7 BOOST_MOVE_MREF(P7) m_p7;
|
||||
#define BOOST_MOVE_MREF9 BOOST_MOVE_MREF8 BOOST_MOVE_MREF(P8) m_p8;
|
||||
|
||||
//BOOST_MOVE_MREFQX
|
||||
#define BOOST_MOVE_MREFQ0
|
||||
#define BOOST_MOVE_MREFQ1 BOOST_MOVE_MREFQ(Q0) m_q0;
|
||||
#define BOOST_MOVE_MREFQ2 BOOST_MOVE_MREFQ1 BOOST_MOVE_MREFQ(Q1) m_q1;
|
||||
#define BOOST_MOVE_MREFQ3 BOOST_MOVE_MREFQ2 BOOST_MOVE_MREFQ(Q2) m_q2;
|
||||
#define BOOST_MOVE_MREFQ4 BOOST_MOVE_MREFQ3 BOOST_MOVE_MREFQ(Q3) m_q3;
|
||||
#define BOOST_MOVE_MREFQ5 BOOST_MOVE_MREFQ4 BOOST_MOVE_MREFQ(Q4) m_q4;
|
||||
#define BOOST_MOVE_MREFQ6 BOOST_MOVE_MREFQ5 BOOST_MOVE_MREFQ(Q5) m_q5;
|
||||
#define BOOST_MOVE_MREFQ7 BOOST_MOVE_MREFQ6 BOOST_MOVE_MREFQ(Q6) m_q6;
|
||||
#define BOOST_MOVE_MREFQ8 BOOST_MOVE_MREFQ7 BOOST_MOVE_MREFQ(Q7) m_q7;
|
||||
#define BOOST_MOVE_MREFQ9 BOOST_MOVE_MREFQ8 BOOST_MOVE_MREFQ(Q8) m_q8;
|
||||
|
||||
//BOOST_MOVE_MEMBX
|
||||
#define BOOST_MOVE_MEMB0
|
||||
#define BOOST_MOVE_MEMB1 P0 m_p0;
|
||||
#define BOOST_MOVE_MEMB1 P0 m_p0;
|
||||
#define BOOST_MOVE_MEMB2 BOOST_MOVE_MEMB1 P1 m_p1;
|
||||
#define BOOST_MOVE_MEMB3 BOOST_MOVE_MEMB2 P2 m_p2;
|
||||
#define BOOST_MOVE_MEMB4 BOOST_MOVE_MEMB3 P3 m_p3;
|
||||
|
|
@ -327,6 +542,18 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_MEMB8 BOOST_MOVE_MEMB7 P7 m_p7;
|
||||
#define BOOST_MOVE_MEMB9 BOOST_MOVE_MEMB8 P8 m_p8;
|
||||
|
||||
//BOOST_MOVE_MEMBQX
|
||||
#define BOOST_MOVE_MEMBQ0
|
||||
#define BOOST_MOVE_MEMBQ1 Q0 m_q0;
|
||||
#define BOOST_MOVE_MEMBQ2 BOOST_MOVE_MEMBQ1 Q1 m_q1;
|
||||
#define BOOST_MOVE_MEMBQ3 BOOST_MOVE_MEMBQ2 Q2 m_q2;
|
||||
#define BOOST_MOVE_MEMBQ4 BOOST_MOVE_MEMBQ3 Q3 m_q3;
|
||||
#define BOOST_MOVE_MEMBQ5 BOOST_MOVE_MEMBQ4 Q4 m_q4;
|
||||
#define BOOST_MOVE_MEMBQ6 BOOST_MOVE_MEMBQ5 Q5 m_q5;
|
||||
#define BOOST_MOVE_MEMBQ7 BOOST_MOVE_MEMBQ6 Q6 m_q6;
|
||||
#define BOOST_MOVE_MEMBQ8 BOOST_MOVE_MEMBQ7 Q7 m_q7;
|
||||
#define BOOST_MOVE_MEMBQ9 BOOST_MOVE_MEMBQ8 Q8 m_q8;
|
||||
|
||||
//BOOST_MOVE_TMPL_LTN
|
||||
#define BOOST_MOVE_TMPL_LT0
|
||||
#define BOOST_MOVE_TMPL_LT1 template<
|
||||
|
|
@ -399,6 +626,45 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_I8 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I9 BOOST_MOVE_I1
|
||||
|
||||
//BOOST_MOVE_BOOL
|
||||
# define BOOST_MOVE_BOOL(x) BOOST_MOVE_BOOL_I(x)
|
||||
# define BOOST_MOVE_BOOL_I(x) BOOST_MOVE_BOOL##x
|
||||
# define BOOST_MOVE_BOOL0 0
|
||||
# define BOOST_MOVE_BOOL1 1
|
||||
# define BOOST_MOVE_BOOL2 1
|
||||
# define BOOST_MOVE_BOOL3 1
|
||||
# define BOOST_MOVE_BOOL4 1
|
||||
# define BOOST_MOVE_BOOL5 1
|
||||
# define BOOST_MOVE_BOOL6 1
|
||||
# define BOOST_MOVE_BOOL7 1
|
||||
# define BOOST_MOVE_BOOL8 1
|
||||
# define BOOST_MOVE_BOOL9 1
|
||||
|
||||
//BOOST_MOVE_I_IF
|
||||
#define BOOST_MOVE_I_IF(x) BOOST_MOVE_I_IF_I (BOOST_MOVE_BOOL(x))
|
||||
#define BOOST_MOVE_I_IF_I(x) BOOST_MOVE_I_IF_I2(x)
|
||||
#define BOOST_MOVE_I_IF_I2(x) BOOST_MOVE_IF_I_##x
|
||||
#define BOOST_MOVE_IF_I_0
|
||||
#define BOOST_MOVE_IF_I_1 ,
|
||||
|
||||
//BOOST_MOVE_IF
|
||||
#define BOOST_MOVE_IF(cond, t, f) BOOST_MOVE_IF_I(cond, t, f)
|
||||
#define BOOST_MOVE_IF_I(cond, t, f) BOOST_MOVE_IIF(BOOST_MOVE_BOOL(cond), t, f)
|
||||
|
||||
#define BOOST_MOVE_IIF(bit, t, f) BOOST_MOVE_IIF_I(bit, t, f)
|
||||
#define BOOST_MOVE_IIF_I(bit, t, f) BOOST_MOVE_IIF_##bit(t, f)
|
||||
#define BOOST_MOVE_IIF_0(t, f) f
|
||||
#define BOOST_MOVE_IIF_1(t, f) t
|
||||
|
||||
/*
|
||||
#define BOOST_MOVE_IIF(bit, t, f) BOOST_MOVE_IIF_OO((bit, t, f))
|
||||
#define BOOST_MOVE_IIF_OO(par) BOOST_MOVE_IIF_I ## par
|
||||
#define BOOST_MOVE_IIF_I(bit, t, f) BOOST_MOVE_IIF_II(BOOST_MOVE_IIF_ ## bit(t, f))
|
||||
#define BOOST_MOVE_IIF_II(id) id
|
||||
#define BOOST_MOVE_IIF_0(t, f) f
|
||||
#define BOOST_MOVE_IIF_1(t, f) t
|
||||
*/
|
||||
|
||||
//BOOST_MOVE_COLON
|
||||
#define BOOST_MOVE_COLON0
|
||||
#define BOOST_MOVE_COLON1 :
|
||||
|
|
@ -411,8 +677,105 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_COLON8 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON9 BOOST_MOVE_COLON1
|
||||
|
||||
//BOOST_MOVE_BITOR
|
||||
#define BOOST_MOVE_BITOR(x,y) BOOST_MOVE_BITOR_I(x,y)
|
||||
#define BOOST_MOVE_BITOR_I(x,y) BOOST_MOVE_BITOR##x##y
|
||||
#define BOOST_MOVE_BITOR00 0
|
||||
#define BOOST_MOVE_BITOR01 1
|
||||
#define BOOST_MOVE_BITOR10 1
|
||||
#define BOOST_MOVE_BITOR11 1
|
||||
|
||||
//BOOST_MOVE_OR
|
||||
#define BOOST_MOVE_OR(x, y) BOOST_MOVE_OR_I(x, y)
|
||||
#define BOOST_MOVE_OR_I(x, y) BOOST_MOVE_BITOR(BOOST_MOVE_BOOL(x), BOOST_MOVE_BOOL(y))
|
||||
|
||||
//BOOST_MOVE_BITAND
|
||||
#define BOOST_MOVE_BITAND(x,y) BOOST_MOVE_BITAND_I(x,y)
|
||||
#define BOOST_MOVE_BITAND_I(x,y) BOOST_MOVE_BITAND##x##y
|
||||
#define BOOST_MOVE_BITAND00 0
|
||||
#define BOOST_MOVE_BITAND01 0
|
||||
#define BOOST_MOVE_BITAND10 0
|
||||
#define BOOST_MOVE_BITAND11 1
|
||||
|
||||
//BOOST_MOVE_AND
|
||||
#define BOOST_MOVE_AND(x, y) BOOST_MOVE_AND_I(x, y)
|
||||
#define BOOST_MOVE_AND_I(x, y) BOOST_MOVE_BITAND(BOOST_MOVE_BOOL(x), BOOST_MOVE_BOOL(y))
|
||||
|
||||
//BOOST_MOVE_DEC
|
||||
#define BOOST_MOVE_DEC(x) BOOST_MOVE_DEC_I(x)
|
||||
#define BOOST_MOVE_DEC_I(x) BOOST_MOVE_DEC##x
|
||||
#define BOOST_MOVE_DEC1 0
|
||||
#define BOOST_MOVE_DEC2 1
|
||||
#define BOOST_MOVE_DEC3 2
|
||||
#define BOOST_MOVE_DEC4 3
|
||||
#define BOOST_MOVE_DEC5 4
|
||||
#define BOOST_MOVE_DEC6 5
|
||||
#define BOOST_MOVE_DEC7 6
|
||||
#define BOOST_MOVE_DEC8 7
|
||||
#define BOOST_MOVE_DEC9 8
|
||||
#define BOOST_MOVE_DEC10 9
|
||||
#define BOOST_MOVE_DEC11 10
|
||||
#define BOOST_MOVE_DEC12 11
|
||||
#define BOOST_MOVE_DEC13 12
|
||||
#define BOOST_MOVE_DEC14 13
|
||||
|
||||
//BOOST_MOVE_SUB
|
||||
#define BOOST_MOVE_SUB(x, y) BOOST_MOVE_SUB_I(x,y)
|
||||
#define BOOST_MOVE_SUB_I(x, y) BOOST_MOVE_SUB##y(x)
|
||||
#define BOOST_MOVE_SUB0(x) x
|
||||
#define BOOST_MOVE_SUB1(x) BOOST_MOVE_DEC(x)
|
||||
#define BOOST_MOVE_SUB2(x) BOOST_MOVE_SUB1(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB3(x) BOOST_MOVE_SUB2(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB4(x) BOOST_MOVE_SUB3(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB5(x) BOOST_MOVE_SUB4(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB6(x) BOOST_MOVE_SUB5(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB7(x) BOOST_MOVE_SUB6(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB8(x) BOOST_MOVE_SUB7(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB9(x) BOOST_MOVE_SUB8(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB10(x) BOOST_MOVE_SUB9(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB11(x) BOOST_MOVE_SUB10(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB12(x) BOOST_MOVE_SUB11(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB13(x) BOOST_MOVE_SUB12(BOOST_MOVE_DEC(x))
|
||||
#define BOOST_MOVE_SUB14(x) BOOST_MOVE_SUB13(BOOST_MOVE_DEC(x))
|
||||
|
||||
//BOOST_MOVE_INC
|
||||
#define BOOST_MOVE_INC(x) BOOST_MOVE_INC_I(x)
|
||||
#define BOOST_MOVE_INC_I(x) BOOST_MOVE_INC##x
|
||||
#define BOOST_MOVE_INC0 1
|
||||
#define BOOST_MOVE_INC1 2
|
||||
#define BOOST_MOVE_INC2 3
|
||||
#define BOOST_MOVE_INC3 4
|
||||
#define BOOST_MOVE_INC4 5
|
||||
#define BOOST_MOVE_INC5 6
|
||||
#define BOOST_MOVE_INC6 7
|
||||
#define BOOST_MOVE_INC7 8
|
||||
#define BOOST_MOVE_INC8 9
|
||||
#define BOOST_MOVE_INC9 10
|
||||
#define BOOST_MOVE_INC10 11
|
||||
#define BOOST_MOVE_INC11 12
|
||||
#define BOOST_MOVE_INC12 13
|
||||
#define BOOST_MOVE_INC13 14
|
||||
|
||||
//BOOST_MOVE_ADD
|
||||
#define BOOST_MOVE_ADD(x, y) BOOST_MOVE_ADD_I(x,y)
|
||||
#define BOOST_MOVE_ADD_I(x, y) BOOST_MOVE_ADD##y(x)
|
||||
#define BOOST_MOVE_ADD0(x) x
|
||||
#define BOOST_MOVE_ADD1(x) BOOST_MOVE_INC(x)
|
||||
#define BOOST_MOVE_ADD2(x) BOOST_MOVE_ADD1(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD3(x) BOOST_MOVE_ADD2(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD4(x) BOOST_MOVE_ADD3(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD5(x) BOOST_MOVE_ADD4(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD6(x) BOOST_MOVE_ADD5(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD7(x) BOOST_MOVE_ADD6(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD8(x) BOOST_MOVE_ADD7(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD9(x) BOOST_MOVE_ADD8(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD10(x) BOOST_MOVE_ADD9(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD11(x) BOOST_MOVE_ADD10(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD12(x) BOOST_MOVE_ADD11(BOOST_MOVE_INC(x))
|
||||
#define BOOST_MOVE_ADD13(x) BOOST_MOVE_ADD12(BOOST_MOVE_INC(x))
|
||||
|
||||
//BOOST_MOVE_ITERATE_2TON
|
||||
#define BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_2TO3(MACROFUNC) BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(3)
|
||||
#define BOOST_MOVE_ITERATE_2TO4(MACROFUNC) BOOST_MOVE_ITERATE_2TO3(MACROFUNC) MACROFUNC(4)
|
||||
#define BOOST_MOVE_ITERATE_2TO5(MACROFUNC) BOOST_MOVE_ITERATE_2TO4(MACROFUNC) MACROFUNC(5)
|
||||
|
|
@ -422,7 +785,7 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_ITERATE_2TO9(MACROFUNC) BOOST_MOVE_ITERATE_2TO8(MACROFUNC) MACROFUNC(9)
|
||||
|
||||
//BOOST_MOVE_ITERATE_1TON
|
||||
#define BOOST_MOVE_ITERATE_1TO1(MACROFUNC) MACROFUNC(1)
|
||||
#define BOOST_MOVE_ITERATE_1TO1(MACROFUNC) MACROFUNC(1)
|
||||
#define BOOST_MOVE_ITERATE_1TO2(MACROFUNC) BOOST_MOVE_ITERATE_1TO1(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_1TO3(MACROFUNC) BOOST_MOVE_ITERATE_1TO2(MACROFUNC) MACROFUNC(3)
|
||||
#define BOOST_MOVE_ITERATE_1TO4(MACROFUNC) BOOST_MOVE_ITERATE_1TO3(MACROFUNC) MACROFUNC(4)
|
||||
|
|
@ -433,7 +796,7 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_ITERATE_1TO9(MACROFUNC) BOOST_MOVE_ITERATE_1TO8(MACROFUNC) MACROFUNC(9)
|
||||
|
||||
//BOOST_MOVE_ITERATE_0TON
|
||||
#define BOOST_MOVE_ITERATE_0TO0(MACROFUNC) MACROFUNC(0)
|
||||
#define BOOST_MOVE_ITERATE_0TO0(MACROFUNC) MACROFUNC(0)
|
||||
#define BOOST_MOVE_ITERATE_0TO1(MACROFUNC) BOOST_MOVE_ITERATE_0TO0(MACROFUNC) MACROFUNC(1)
|
||||
#define BOOST_MOVE_ITERATE_0TO2(MACROFUNC) BOOST_MOVE_ITERATE_0TO1(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_0TO3(MACROFUNC) BOOST_MOVE_ITERATE_0TO2(MACROFUNC) MACROFUNC(3)
|
||||
|
|
@ -445,7 +808,6 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_ITERATE_0TO9(MACROFUNC) BOOST_MOVE_ITERATE_0TO8(MACROFUNC) MACROFUNC(9)
|
||||
|
||||
//BOOST_MOVE_ITERATE_NTON
|
||||
#define BOOST_MOVE_ITERATE_0TO0(MACROFUNC) MACROFUNC(0)
|
||||
#define BOOST_MOVE_ITERATE_1TO1(MACROFUNC) MACROFUNC(1)
|
||||
#define BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_3TO3(MACROFUNC) MACROFUNC(3)
|
||||
|
|
@ -456,6 +818,35 @@ namespace move_detail {
|
|||
#define BOOST_MOVE_ITERATE_8TO8(MACROFUNC) MACROFUNC(8)
|
||||
#define BOOST_MOVE_ITERATE_9TO9(MACROFUNC) MACROFUNC(9)
|
||||
|
||||
//BOOST_MOVE_ITER2D_0TOMAX
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX0(MACROFUNC2D, M) MACROFUNC2D(M, 0)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX1(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX0(MACROFUNC2D, M) MACROFUNC2D(M, 1)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX2(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX1(MACROFUNC2D, M) MACROFUNC2D(M, 2)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX3(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX2(MACROFUNC2D, M) MACROFUNC2D(M, 3)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX4(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX3(MACROFUNC2D, M) MACROFUNC2D(M, 4)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX5(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX4(MACROFUNC2D, M) MACROFUNC2D(M, 5)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX6(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX5(MACROFUNC2D, M) MACROFUNC2D(M, 6)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX7(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX6(MACROFUNC2D, M) MACROFUNC2D(M, 7)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX8(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX7(MACROFUNC2D, M) MACROFUNC2D(M, 8)
|
||||
#define BOOST_MOVE_ITER2DLOW_0TOMAX9(MACROFUNC2D, M) BOOST_MOVE_ITER2DLOW_0TOMAX8(MACROFUNC2D, M) MACROFUNC2D(M, 9)
|
||||
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX0(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 0)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX1(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX0(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 1)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX2(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX1(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 2)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX3(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX2(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 3)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX4(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX3(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 4)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX5(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX4(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 5)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX6(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX5(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 6)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX7(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX6(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 7)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX8(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX7(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 8)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX9(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX8(MAX, MACROFUNC2D) BOOST_MOVE_ITER2DLOW_0TOMAX##MAX(MACROFUNC2D, 9)
|
||||
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX_I (MAX, MACROFUNC2D)
|
||||
#define BOOST_MOVE_ITER2D_0TOMAX_I(MAX, MACROFUNC2D) BOOST_MOVE_ITER2D_0TOMAX##MAX(MAX, MACROFUNC2D)
|
||||
|
||||
|
||||
|
||||
|
||||
//BOOST_MOVE_CAT
|
||||
#define BOOST_MOVE_CAT(a, b) BOOST_MOVE_CAT_I(a, b)
|
||||
#define BOOST_MOVE_CAT_I(a, b) a ## b
|
||||
|
|
|
|||
|
|
@ -23,18 +23,9 @@
|
|||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/move/detail/type_traits.hpp>
|
||||
|
||||
#if defined(__clang__) && defined(_LIBCPP_VERSION)
|
||||
#define BOOST_MOVE_CLANG_INLINE_STD_NS
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wc++11-extensions"
|
||||
#define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
#define BOOST_MOVE_STD_NS_END _LIBCPP_END_NAMESPACE_STD
|
||||
#else
|
||||
#define BOOST_MOVE_STD_NS_BEG namespace std{
|
||||
#define BOOST_MOVE_STD_NS_END }
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/std_ns_begin.hpp>
|
||||
BOOST_MOVE_STD_NS_BEG
|
||||
|
||||
struct input_iterator_tag;
|
||||
|
|
@ -44,11 +35,7 @@ struct random_access_iterator_tag;
|
|||
struct output_iterator_tag;
|
||||
|
||||
BOOST_MOVE_STD_NS_END
|
||||
|
||||
#ifdef BOOST_MOVE_CLANG_INLINE_STD_NS
|
||||
#pragma GCC diagnostic pop
|
||||
#undef BOOST_MOVE_CLANG_INLINE_STD_NS
|
||||
#endif //BOOST_MOVE_CLANG_INLINE_STD_NS
|
||||
#include <boost/move/detail/std_ns_end.hpp>
|
||||
|
||||
namespace boost{ namespace movelib{
|
||||
|
||||
|
|
@ -60,6 +47,7 @@ struct iterator_traits
|
|||
typedef typename Iterator::pointer pointer;
|
||||
typedef typename Iterator::reference reference;
|
||||
typedef typename Iterator::iterator_category iterator_category;
|
||||
typedef typename boost::move_detail::make_unsigned<difference_type>::type size_type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
|
|
@ -70,6 +58,7 @@ struct iterator_traits<T*>
|
|||
typedef T* pointer;
|
||||
typedef T& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
typedef typename boost::move_detail::make_unsigned<difference_type>::type size_type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
|
|
@ -80,6 +69,7 @@ struct iterator_traits<const T*>
|
|||
typedef const T* pointer;
|
||||
typedef const T& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
typedef typename boost::move_detail::make_unsigned<difference_type>::type size_type;
|
||||
};
|
||||
|
||||
}} //namespace boost { namespace movelib{
|
||||
|
|
|
|||
|
|
@ -14,13 +14,11 @@
|
|||
#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
|
||||
#define BOOST_MOVE_DETAIL_META_UTILS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/move/detail/workaround.hpp> //forceinline
|
||||
#include <boost/move/detail/meta_utils_core.hpp>
|
||||
#include <cstddef> //for std::size_t
|
||||
|
||||
|
|
@ -245,8 +243,8 @@ template<class T>
|
|||
struct addr_impl_ref
|
||||
{
|
||||
T & v_;
|
||||
inline addr_impl_ref( T & v ): v_( v ) {}
|
||||
inline operator T& () const { return v_; }
|
||||
BOOST_MOVE_FORCEINLINE addr_impl_ref( T & v ): v_( v ) {}
|
||||
BOOST_MOVE_FORCEINLINE operator T& () const { return v_; }
|
||||
|
||||
private:
|
||||
addr_impl_ref & operator=(const addr_impl_ref &);
|
||||
|
|
@ -255,18 +253,18 @@ struct addr_impl_ref
|
|||
template<class T>
|
||||
struct addressof_impl
|
||||
{
|
||||
static inline T * f( T & v, long )
|
||||
BOOST_MOVE_FORCEINLINE static T * f( T & v, long )
|
||||
{
|
||||
return reinterpret_cast<T*>(
|
||||
&const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
|
||||
}
|
||||
|
||||
static inline T * f( T * v, int )
|
||||
BOOST_MOVE_FORCEINLINE static T * f( T * v, int )
|
||||
{ return v; }
|
||||
};
|
||||
|
||||
template<class T>
|
||||
inline T * addressof( T & v )
|
||||
BOOST_MOVE_FORCEINLINE T * addressof( T & v )
|
||||
{
|
||||
return ::boost::move_detail::addressof_impl<T>::f
|
||||
( ::boost::move_detail::addr_impl_ref<T>( v ), 0 );
|
||||
|
|
@ -314,6 +312,17 @@ class is_convertible
|
|||
|
||||
#endif
|
||||
|
||||
template <class T, class U, bool IsSame = is_same<T, U>::value>
|
||||
struct is_same_or_convertible
|
||||
: is_convertible<T, U>
|
||||
{};
|
||||
|
||||
template <class T, class U>
|
||||
struct is_same_or_convertible<T, U, true>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template<
|
||||
bool C
|
||||
, typename F1
|
||||
|
|
@ -332,6 +341,11 @@ struct eval_if
|
|||
: if_<C,T1,T2>::type
|
||||
{};
|
||||
|
||||
|
||||
#if defined(BOOST_GCC) && (BOOST_GCC <= 40000)
|
||||
#define BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN
|
||||
#endif
|
||||
|
||||
template<class T, class U, class R = void>
|
||||
struct enable_if_convertible
|
||||
: enable_if< is_convertible<T, U>, R>
|
||||
|
|
@ -342,6 +356,16 @@ struct disable_if_convertible
|
|||
: disable_if< is_convertible<T, U>, R>
|
||||
{};
|
||||
|
||||
template<class T, class U, class R = void>
|
||||
struct enable_if_same_or_convertible
|
||||
: enable_if< is_same_or_convertible<T, U>, R>
|
||||
{};
|
||||
|
||||
template<class T, class U, class R = void>
|
||||
struct disable_if_same_or_convertible
|
||||
: disable_if< is_same_or_convertible<T, U>, R>
|
||||
{};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// and_
|
||||
|
|
@ -556,4 +580,6 @@ template< class T > struct remove_rvalue_reference { typedef T type; };
|
|||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
|
||||
|
|
|
|||
|
|
@ -114,6 +114,18 @@ struct is_same<T, T>
|
|||
static const bool value = true;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// enable_if_same
|
||||
//////////////////////////////////////
|
||||
template <class T, class U, class R = void>
|
||||
struct enable_if_same : enable_if<is_same<T, U>, R> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// disable_if_same
|
||||
//////////////////////////////////////
|
||||
template <class T, class U, class R = void>
|
||||
struct disable_if_same : disable_if<is_same<T, U>, R> {};
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2010-2012.
|
||||
// (C) Copyright Ion Gaztanaga 2010-2016.
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
// http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
|
@ -20,15 +20,16 @@
|
|||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/core.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/move/detail/meta_utils.hpp>
|
||||
#include <boost/move/detail/type_traits.hpp>
|
||||
|
||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
|
||||
#define BOOST_MOVE_CATCH_CONST(U) \
|
||||
typename ::boost::move_detail::if_< ::boost::move_detail::is_class_or_union<U>, BOOST_CATCH_CONST_RLVALUE(U), const U &>::type
|
||||
typename ::boost::move_detail::if_< ::boost::move_detail::is_class<U>, BOOST_CATCH_CONST_RLVALUE(U), const U &>::type
|
||||
#define BOOST_MOVE_CATCH_RVALUE(U)\
|
||||
typename ::boost::move_detail::if_< ::boost::move_detail::is_class_or_union<U>, BOOST_RV_REF(U), ::boost::move_detail::nat>::type
|
||||
typename ::boost::move_detail::if_< ::boost::move_detail::is_class<U>, BOOST_RV_REF(U), ::boost::move_detail::nat>::type
|
||||
#define BOOST_MOVE_CATCH_FWD(U) BOOST_FWD_REF(U)
|
||||
#else
|
||||
#define BOOST_MOVE_CATCH_CONST(U) const U &
|
||||
|
|
@ -36,142 +37,219 @@
|
|||
#define BOOST_MOVE_CATCH_FWD(U) U &&
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\
|
||||
RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(::boost::move(x)); }\
|
||||
\
|
||||
RETURN_VALUE PUB_FUNCTION(TYPE &x)\
|
||||
{ return FWD_FUNCTION(const_cast<const TYPE &>(x)); }\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
typename ::boost::move_detail::enable_if_and\
|
||||
< RETURN_VALUE \
|
||||
, ::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>\
|
||||
, ::boost::move_detail::is_class_or_union<TYPE>\
|
||||
, ::boost::has_move_emulation_disabled<BOOST_MOVE_TEMPL_PARAM>\
|
||||
>::type\
|
||||
PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||
{ return FWD_FUNCTION(u); }\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
typename ::boost::move_detail::disable_if_or\
|
||||
< RETURN_VALUE \
|
||||
, ::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM> \
|
||||
, ::boost::move_detail::and_ \
|
||||
< ::boost::move_detail::is_rv<BOOST_MOVE_TEMPL_PARAM> \
|
||||
, ::boost::move_detail::is_class_or_union<BOOST_MOVE_TEMPL_PARAM> \
|
||||
> \
|
||||
>::type\
|
||||
PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||
{\
|
||||
TYPE t(u);\
|
||||
return FWD_FUNCTION(::boost::move(t));\
|
||||
}\
|
||||
////////////////////////////////////////
|
||||
//
|
||||
|
||||
#elif (defined(_MSC_VER) && (_MSC_VER == 1600))
|
||||
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\
|
||||
RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(::boost::move(x)); }\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
typename ::boost::move_detail::enable_if_c\
|
||||
< !::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>::value\
|
||||
, RETURN_VALUE >::type\
|
||||
PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||
{\
|
||||
TYPE t(u);\
|
||||
return FWD_FUNCTION(::boost::move(t));\
|
||||
}\
|
||||
// BOOST_MOVE_CONVERSION_AWARE_CATCH
|
||||
//
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\
|
||||
RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(::boost::move(x)); }\
|
||||
//
|
||||
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////
|
||||
|
||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\
|
||||
RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(arg1, ::boost::move(x)); }\
|
||||
\
|
||||
RETURN_VALUE PUB_FUNCTION(ARG1 arg1, TYPE &x)\
|
||||
{ return FWD_FUNCTION(arg1, const_cast<const TYPE &>(x)); }\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
typename ::boost::move_detail::enable_if_and\
|
||||
< RETURN_VALUE \
|
||||
, ::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>\
|
||||
, ::boost::has_move_emulation_disabled<BOOST_MOVE_TEMPL_PARAM>\
|
||||
>::type\
|
||||
PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||
{ return FWD_FUNCTION(arg1, u); }\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
typename ::boost::move_detail::disable_if_or\
|
||||
< RETURN_VALUE \
|
||||
, ::boost::move_detail::is_rv<BOOST_MOVE_TEMPL_PARAM>\
|
||||
, ::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>\
|
||||
, ::boost::move_detail::is_convertible<BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO>\
|
||||
>::type\
|
||||
PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||
{\
|
||||
TYPE t(u);\
|
||||
return FWD_FUNCTION(arg1, ::boost::move(t));\
|
||||
}\
|
||||
template<class RETURN_VALUE, class BOOST_MOVE_TEMPL_PARAM, class TYPE>
|
||||
struct boost_move_conversion_aware_catch_1
|
||||
: public ::boost::move_detail::enable_if_and
|
||||
< RETURN_VALUE
|
||||
, ::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>
|
||||
, ::boost::move_detail::is_class<TYPE>
|
||||
, ::boost::has_move_emulation_disabled<BOOST_MOVE_TEMPL_PARAM>
|
||||
>
|
||||
{};
|
||||
|
||||
template<class RETURN_VALUE, class BOOST_MOVE_TEMPL_PARAM, class TYPE>
|
||||
struct boost_move_conversion_aware_catch_2
|
||||
: public ::boost::move_detail::disable_if_or
|
||||
< RETURN_VALUE
|
||||
, ::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>
|
||||
, ::boost::move_detail::is_rv_impl<BOOST_MOVE_TEMPL_PARAM>
|
||||
, ::boost::move_detail::and_
|
||||
< ::boost::move_detail::is_rv_impl<BOOST_MOVE_TEMPL_PARAM>
|
||||
, ::boost::move_detail::is_class<BOOST_MOVE_TEMPL_PARAM>
|
||||
>
|
||||
>
|
||||
{};
|
||||
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH_COMMON(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(::boost::move(x)); }\
|
||||
\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(TYPE &x)\
|
||||
{ return FWD_FUNCTION(const_cast<const TYPE &>(x)); }\
|
||||
//
|
||||
#if defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\
|
||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_COMMON(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u,\
|
||||
typename boost_move_conversion_aware_catch_1< ::boost::move_detail::nat, BOOST_MOVE_TEMPL_PARAM, TYPE>::type* = 0)\
|
||||
{ return FWD_FUNCTION(u); }\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u,\
|
||||
typename boost_move_conversion_aware_catch_2< ::boost::move_detail::nat, BOOST_MOVE_TEMPL_PARAM, TYPE>::type* = 0)\
|
||||
{\
|
||||
TYPE t((u));\
|
||||
return FWD_FUNCTION(::boost::move(t));\
|
||||
}\
|
||||
//
|
||||
#else
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\
|
||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_COMMON(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
BOOST_MOVE_FORCEINLINE typename boost_move_conversion_aware_catch_1<RETURN_VALUE, BOOST_MOVE_TEMPL_PARAM, TYPE>::type\
|
||||
PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||
{ return FWD_FUNCTION(u); }\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
BOOST_MOVE_FORCEINLINE typename boost_move_conversion_aware_catch_2<RETURN_VALUE, BOOST_MOVE_TEMPL_PARAM, TYPE>::type\
|
||||
PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||
{\
|
||||
TYPE t((u));\
|
||||
return FWD_FUNCTION(::boost::move(t));\
|
||||
}\
|
||||
//
|
||||
#endif
|
||||
#elif (defined(_MSC_VER) && (_MSC_VER == 1600))
|
||||
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(::boost::move(x)); }\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c\
|
||||
< !::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>::value\
|
||||
, RETURN_VALUE >::type\
|
||||
PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||
{\
|
||||
TYPE t((u));\
|
||||
return FWD_FUNCTION(::boost::move(t));\
|
||||
}\
|
||||
//
|
||||
|
||||
#else //BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(x); }\
|
||||
\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(::boost::move(x)); }\
|
||||
//
|
||||
|
||||
#endif //BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
////////////////////////////////////////
|
||||
//
|
||||
// BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG
|
||||
//
|
||||
////////////////////////////////////////
|
||||
|
||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
template<class RETURN_VALUE, class BOOST_MOVE_TEMPL_PARAM, class UNLESS_CONVERTIBLE_TO, class TYPE>
|
||||
struct boost_move_conversion_aware_catch_1arg_1
|
||||
: public ::boost::move_detail::enable_if_and
|
||||
< RETURN_VALUE
|
||||
, ::boost::move_detail::not_< ::boost::move_detail::is_same_or_convertible<BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO> >
|
||||
, ::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>
|
||||
, ::boost::has_move_emulation_disabled<BOOST_MOVE_TEMPL_PARAM>
|
||||
>
|
||||
{};
|
||||
|
||||
template<class RETURN_VALUE, class BOOST_MOVE_TEMPL_PARAM, class UNLESS_CONVERTIBLE_TO, class TYPE>
|
||||
struct boost_move_conversion_aware_catch_1arg_2
|
||||
: public ::boost::move_detail::disable_if_or
|
||||
< RETURN_VALUE
|
||||
, ::boost::move_detail::is_same_or_convertible< BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO>
|
||||
, ::boost::move_detail::is_rv_impl<BOOST_MOVE_TEMPL_PARAM>
|
||||
, ::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>
|
||||
>
|
||||
{};
|
||||
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG_COMMON(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(arg1, ::boost::move(x)); }\
|
||||
\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, TYPE &x)\
|
||||
{ return FWD_FUNCTION(arg1, const_cast<const TYPE &>(x)); }\
|
||||
//
|
||||
#if defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\
|
||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG_COMMON(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u,\
|
||||
typename boost_move_conversion_aware_catch_1arg_1<void, BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO, TYPE>::type* = 0)\
|
||||
{ return FWD_FUNCTION(arg1, u); }\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u,\
|
||||
typename boost_move_conversion_aware_catch_1arg_2<void, BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO, TYPE>::type* = 0)\
|
||||
{\
|
||||
TYPE t((u));\
|
||||
return FWD_FUNCTION(arg1, ::boost::move(t));\
|
||||
}\
|
||||
//
|
||||
#else
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\
|
||||
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG_COMMON(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
BOOST_MOVE_FORCEINLINE typename boost_move_conversion_aware_catch_1arg_1<RETURN_VALUE, BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO, TYPE>::type\
|
||||
PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||
{ return FWD_FUNCTION(arg1, u); }\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
BOOST_MOVE_FORCEINLINE typename boost_move_conversion_aware_catch_1arg_2<RETURN_VALUE, BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO, TYPE>::type\
|
||||
PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||
{\
|
||||
TYPE t((u));\
|
||||
return FWD_FUNCTION(arg1, ::boost::move(t));\
|
||||
}\
|
||||
//
|
||||
#endif
|
||||
|
||||
#elif (defined(_MSC_VER) && (_MSC_VER == 1600))
|
||||
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\
|
||||
RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(arg1, ::boost::move(x)); }\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
typename ::boost::move_detail::disable_if_or\
|
||||
< RETURN_VALUE \
|
||||
, ::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM> \
|
||||
, ::boost::move_detail::is_convertible<BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO> \
|
||||
>::type\
|
||||
PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||
{\
|
||||
TYPE t(u);\
|
||||
return FWD_FUNCTION(arg1, ::boost::move(t));\
|
||||
}\
|
||||
//
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(arg1, ::boost::move(x)); }\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::disable_if_or\
|
||||
< RETURN_VALUE \
|
||||
, ::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM> \
|
||||
, ::boost::move_detail::is_same_or_convertible<BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO> \
|
||||
>::type\
|
||||
PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u)\
|
||||
{\
|
||||
TYPE t((u));\
|
||||
return FWD_FUNCTION(arg1, ::boost::move(t));\
|
||||
}\
|
||||
//
|
||||
|
||||
#else
|
||||
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\
|
||||
RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(arg1, ::boost::move(x)); }\
|
||||
//
|
||||
#define BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(arg1, ::boost::move(x)); }\
|
||||
//
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
|||
30
boost/move/detail/std_ns_begin.hpp
Normal file
30
boost/move/detail/std_ns_begin.hpp
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
#//////////////////////////////////////////////////////////////////////////////
|
||||
#//
|
||||
#// (C) Copyright Ion Gaztanaga 2015-2015.
|
||||
#// Distributed under the Boost Software License, Version 1.0.
|
||||
#// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
#// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#//
|
||||
#// See http://www.boost.org/libs/move for documentation.
|
||||
#//
|
||||
#//////////////////////////////////////////////////////////////////////////////
|
||||
#
|
||||
#if defined(_LIBCPP_VERSION)
|
||||
#if defined(__clang__)
|
||||
#define BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH
|
||||
#pragma GCC diagnostic push
|
||||
#pragma GCC diagnostic ignored "-Wc++11-extensions"
|
||||
#endif
|
||||
#define BOOST_MOVE_STD_NS_BEG _LIBCPP_BEGIN_NAMESPACE_STD
|
||||
#define BOOST_MOVE_STD_NS_END _LIBCPP_END_NAMESPACE_STD
|
||||
#elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE_VERSION) //GCC >= 4.6
|
||||
#define BOOST_MOVE_STD_NS_BEG namespace std _GLIBCXX_VISIBILITY(default) { _GLIBCXX_BEGIN_NAMESPACE_VERSION
|
||||
#define BOOST_MOVE_STD_NS_END _GLIBCXX_END_NAMESPACE_VERSION } // namespace
|
||||
#elif defined(BOOST_GNU_STDLIB) && defined(_GLIBCXX_BEGIN_NAMESPACE) //GCC >= 4.2
|
||||
#define BOOST_MOVE_STD_NS_BEG _GLIBCXX_BEGIN_NAMESPACE(std)
|
||||
#define BOOST_MOVE_STD_NS_END _GLIBCXX_END_NAMESPACE
|
||||
#else
|
||||
#define BOOST_MOVE_STD_NS_BEG namespace std{
|
||||
#define BOOST_MOVE_STD_NS_END }
|
||||
#endif
|
||||
|
||||
14
boost/move/detail/std_ns_end.hpp
Normal file
14
boost/move/detail/std_ns_end.hpp
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
#//////////////////////////////////////////////////////////////////////////////
|
||||
#//
|
||||
#// (C) Copyright Ion Gaztanaga 2015-2015.
|
||||
#// Distributed under the Boost Software License, Version 1.0.
|
||||
#// (See accompanying file LICENSE_1_0.txt or copy at
|
||||
#// http://www.boost.org/LICENSE_1_0.txt)
|
||||
#//
|
||||
#// See http://www.boost.org/libs/move for documentation.
|
||||
#//
|
||||
#//////////////////////////////////////////////////////////////////////////////
|
||||
#ifdef BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH
|
||||
#pragma GCC diagnostic pop
|
||||
#undef BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH
|
||||
#endif //BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH
|
||||
|
|
@ -55,8 +55,10 @@
|
|||
// BOOST_MOVE_IS_POD(T) should evaluate to true if T is a POD type
|
||||
// BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
|
||||
// BOOST_MOVE_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
|
||||
// (Note: this trait does not guarantee T is copy constructible, the copy constructor could be deleted but still be trivial)
|
||||
// BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy
|
||||
// BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
|
||||
// (Note: this trait does not guarantee T is assignable , the copy assignmen could be deleted but still be trivial)
|
||||
// BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy
|
||||
// BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
|
||||
// BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw
|
||||
|
|
@ -117,9 +119,7 @@
|
|||
# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
|
||||
# endif
|
||||
# if __has_feature(has_trivial_copy)
|
||||
# //There are problems with deleted copy constructors detected as trivially copyable.
|
||||
# //http://stackoverflow.com/questions/12754886/has-trivial-copy-behaves-differently-in-clang-and-gcc-whos-right
|
||||
# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && ::boost::move_detail::is_copy_constructible<T>::value)
|
||||
# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T)
|
||||
# endif
|
||||
# if __has_feature(has_trivial_assign)
|
||||
# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) )
|
||||
|
|
@ -235,7 +235,9 @@
|
|||
#endif
|
||||
|
||||
#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY
|
||||
#define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_COPY(T)
|
||||
#define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value ||\
|
||||
(::boost::move_detail::is_copy_constructible<T>::value &&\
|
||||
BOOST_MOVE_HAS_TRIVIAL_COPY(T))
|
||||
#else
|
||||
#define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
|
||||
#endif
|
||||
|
|
@ -246,12 +248,6 @@
|
|||
#define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY
|
||||
#define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_COPY(T)
|
||||
#else
|
||||
#define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR
|
||||
#define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T)
|
||||
#else
|
||||
|
|
@ -259,7 +255,9 @@
|
|||
#endif
|
||||
|
||||
#ifdef BOOST_MOVE_HAS_TRIVIAL_ASSIGN
|
||||
#define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T)
|
||||
#define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value ||\
|
||||
( ::boost::move_detail::is_copy_assignable<T>::value &&\
|
||||
BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T))
|
||||
#else
|
||||
#define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value
|
||||
#endif
|
||||
|
|
@ -480,7 +478,7 @@ template <class T>
|
|||
struct remove_all_extents<T[]>
|
||||
{ typedef typename remove_all_extents<T>::type type; };
|
||||
|
||||
template <class T, size_t N>
|
||||
template <class T, std::size_t N>
|
||||
struct remove_all_extents<T[N]>
|
||||
{ typedef typename remove_all_extents<T>::type type;};
|
||||
|
||||
|
|
@ -821,9 +819,7 @@ struct is_trivially_copy_constructible
|
|||
{
|
||||
//In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with
|
||||
//deleted copy constructors so make sure the type is copy constructible.
|
||||
static const bool value = ::boost::move_detail::is_pod<T>::value ||
|
||||
( ::boost::move_detail::is_copy_constructible<T>::value &&
|
||||
BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) );
|
||||
static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T);
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
|
|
@ -831,7 +827,7 @@ struct is_trivially_copy_constructible
|
|||
//////////////////////////////////////
|
||||
template<class T>
|
||||
struct is_trivially_move_constructible
|
||||
{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); };
|
||||
{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); };
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_trivially_copy_assignable
|
||||
|
|
@ -841,9 +837,7 @@ struct is_trivially_copy_assignable
|
|||
{
|
||||
//In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with
|
||||
//deleted copy constructors so make sure the type is copy constructible.
|
||||
static const bool value = ::boost::move_detail::is_pod<T>::value ||
|
||||
( ::boost::move_detail::is_copy_assignable<T>::value &&
|
||||
BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) );
|
||||
static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T);
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
|
|
@ -1003,9 +997,9 @@ BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1000)
|
|||
|
||||
#else //BOOST_NO_ALIGNMENT
|
||||
|
||||
template<class T, size_t Len>
|
||||
template<class T, std::size_t Len>
|
||||
union aligned_union
|
||||
{
|
||||
{
|
||||
T aligner;
|
||||
char dummy[Len];
|
||||
};
|
||||
|
|
@ -1023,7 +1017,7 @@ struct aligned_next<Len, Align, T, true>
|
|||
//End of search defaults to max_align_t
|
||||
template<std::size_t Len, std::size_t Align>
|
||||
struct aligned_next<Len, Align, max_align_t, false>
|
||||
{ typedef aligned_union<max_align_t, Len> type; };
|
||||
{ typedef aligned_union<max_align_t, Len> type; };
|
||||
|
||||
//Now define a search list through types
|
||||
#define BOOST_MOVE_ALIGNED_NEXT_STEP(TYPE, NEXT_TYPE)\
|
||||
|
|
|
|||
|
|
@ -52,4 +52,18 @@
|
|||
#define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_MOVE_DISABLE_FORCEINLINE)
|
||||
#define BOOST_MOVE_FORCEINLINE inline
|
||||
#elif defined(BOOST_MOVE_FORCEINLINE_IS_BOOST_FORCELINE)
|
||||
#define BOOST_MOVE_FORCEINLINE BOOST_FORCEINLINE
|
||||
#elif defined(BOOST_MSVC) && defined(_DEBUG)
|
||||
//"__forceinline" and MSVC seems to have some bugs in debug mode
|
||||
#define BOOST_MOVE_FORCEINLINE inline
|
||||
#elif defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5)))
|
||||
//Older GCCs have problems with forceinline
|
||||
#define BOOST_MOVE_FORCEINLINE inline
|
||||
#else
|
||||
#define BOOST_MOVE_FORCEINLINE BOOST_FORCEINLINE
|
||||
#endif
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@
|
|||
#endif
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/move/detail/workaround.hpp> //forceinline
|
||||
#include <boost/move/detail/iterator_traits.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
||||
|
|
@ -57,22 +58,20 @@ class move_iterator
|
|||
typedef typename boost::movelib::iterator_traits<iterator_type>::difference_type difference_type;
|
||||
typedef typename boost::movelib::iterator_traits<iterator_type>::iterator_category iterator_category;
|
||||
|
||||
move_iterator()
|
||||
BOOST_MOVE_FORCEINLINE move_iterator()
|
||||
: m_it()
|
||||
{}
|
||||
|
||||
explicit move_iterator(It i)
|
||||
BOOST_MOVE_FORCEINLINE explicit move_iterator(const It &i)
|
||||
: m_it(i)
|
||||
{}
|
||||
|
||||
template <class U>
|
||||
move_iterator(const move_iterator<U>& u)
|
||||
: m_it(u.base())
|
||||
BOOST_MOVE_FORCEINLINE move_iterator(const move_iterator<U>& u)
|
||||
: m_it(u.m_it)
|
||||
{}
|
||||
|
||||
iterator_type base() const
|
||||
{ return m_it; }
|
||||
|
||||
reference operator*() const
|
||||
BOOST_MOVE_FORCEINLINE reference operator*() const
|
||||
{
|
||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)
|
||||
return *m_it;
|
||||
|
|
@ -81,34 +80,34 @@ class move_iterator
|
|||
#endif
|
||||
}
|
||||
|
||||
pointer operator->() const
|
||||
BOOST_MOVE_FORCEINLINE pointer operator->() const
|
||||
{ return m_it; }
|
||||
|
||||
move_iterator& operator++()
|
||||
BOOST_MOVE_FORCEINLINE move_iterator& operator++()
|
||||
{ ++m_it; return *this; }
|
||||
|
||||
move_iterator<iterator_type> operator++(int)
|
||||
BOOST_MOVE_FORCEINLINE move_iterator<iterator_type> operator++(int)
|
||||
{ move_iterator<iterator_type> tmp(*this); ++(*this); return tmp; }
|
||||
|
||||
move_iterator& operator--()
|
||||
BOOST_MOVE_FORCEINLINE move_iterator& operator--()
|
||||
{ --m_it; return *this; }
|
||||
|
||||
move_iterator<iterator_type> operator--(int)
|
||||
BOOST_MOVE_FORCEINLINE move_iterator<iterator_type> operator--(int)
|
||||
{ move_iterator<iterator_type> tmp(*this); --(*this); return tmp; }
|
||||
|
||||
move_iterator<iterator_type> operator+ (difference_type n) const
|
||||
{ return move_iterator<iterator_type>(m_it + n); }
|
||||
|
||||
move_iterator& operator+=(difference_type n)
|
||||
BOOST_MOVE_FORCEINLINE move_iterator& operator+=(difference_type n)
|
||||
{ m_it += n; return *this; }
|
||||
|
||||
move_iterator<iterator_type> operator- (difference_type n) const
|
||||
BOOST_MOVE_FORCEINLINE move_iterator<iterator_type> operator- (difference_type n) const
|
||||
{ return move_iterator<iterator_type>(m_it - n); }
|
||||
|
||||
move_iterator& operator-=(difference_type n)
|
||||
BOOST_MOVE_FORCEINLINE move_iterator& operator-=(difference_type n)
|
||||
{ m_it -= n; return *this; }
|
||||
|
||||
reference operator[](difference_type n) const
|
||||
BOOST_MOVE_FORCEINLINE reference operator[](difference_type n) const
|
||||
{
|
||||
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)
|
||||
return m_it[n];
|
||||
|
|
@ -117,29 +116,29 @@ class move_iterator
|
|||
#endif
|
||||
}
|
||||
|
||||
friend bool operator==(const move_iterator& x, const move_iterator& y)
|
||||
{ return x.base() == y.base(); }
|
||||
BOOST_MOVE_FORCEINLINE friend bool operator==(const move_iterator& x, const move_iterator& y)
|
||||
{ return x.m_it == y.m_it; }
|
||||
|
||||
friend bool operator!=(const move_iterator& x, const move_iterator& y)
|
||||
{ return x.base() != y.base(); }
|
||||
BOOST_MOVE_FORCEINLINE friend bool operator!=(const move_iterator& x, const move_iterator& y)
|
||||
{ return x.m_it != y.m_it; }
|
||||
|
||||
friend bool operator< (const move_iterator& x, const move_iterator& y)
|
||||
{ return x.base() < y.base(); }
|
||||
BOOST_MOVE_FORCEINLINE friend bool operator< (const move_iterator& x, const move_iterator& y)
|
||||
{ return x.m_it < y.m_it; }
|
||||
|
||||
friend bool operator<=(const move_iterator& x, const move_iterator& y)
|
||||
{ return x.base() <= y.base(); }
|
||||
BOOST_MOVE_FORCEINLINE friend bool operator<=(const move_iterator& x, const move_iterator& y)
|
||||
{ return x.m_it <= y.m_it; }
|
||||
|
||||
friend bool operator> (const move_iterator& x, const move_iterator& y)
|
||||
{ return x.base() > y.base(); }
|
||||
BOOST_MOVE_FORCEINLINE friend bool operator> (const move_iterator& x, const move_iterator& y)
|
||||
{ return x.m_it > y.m_it; }
|
||||
|
||||
friend bool operator>=(const move_iterator& x, const move_iterator& y)
|
||||
{ return x.base() >= y.base(); }
|
||||
BOOST_MOVE_FORCEINLINE friend bool operator>=(const move_iterator& x, const move_iterator& y)
|
||||
{ return x.m_it >= y.m_it; }
|
||||
|
||||
friend difference_type operator-(const move_iterator& x, const move_iterator& y)
|
||||
{ return x.base() - y.base(); }
|
||||
BOOST_MOVE_FORCEINLINE friend difference_type operator-(const move_iterator& x, const move_iterator& y)
|
||||
{ return x.m_it - y.m_it; }
|
||||
|
||||
friend move_iterator operator+(difference_type n, const move_iterator& x)
|
||||
{ return move_iterator(x.base() + n); }
|
||||
BOOST_MOVE_FORCEINLINE friend move_iterator operator+(difference_type n, const move_iterator& x)
|
||||
{ return move_iterator(x.m_it + n); }
|
||||
|
||||
private:
|
||||
It m_it;
|
||||
|
|
|
|||
|
|
@ -75,7 +75,8 @@ struct nothrow_holder
|
|||
};
|
||||
|
||||
template <int Dummy>
|
||||
std::nothrow_t *nothrow_holder<Dummy>::pnothrow;
|
||||
std::nothrow_t *nothrow_holder<Dummy>::pnothrow =
|
||||
reinterpret_cast<std::nothrow_t *>(0x1234); //Avoid reference to null errors in sanitizers
|
||||
|
||||
} //namespace move_upmu {
|
||||
} //namespace boost{
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#endif
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/move/detail/workaround.hpp>
|
||||
#include <boost/move/detail/workaround.hpp> //forceinline
|
||||
#include <boost/move/detail/unique_ptr_meta_utils.hpp>
|
||||
#include <boost/move/default_delete.hpp>
|
||||
#include <boost/move/utility_core.hpp>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
//! specially in C++03 compilers:
|
||||
//! - <tt>operator < </tt> uses pointer <tt>operator < </tt>instead of <tt>std::less<common_type></tt>.
|
||||
//! This avoids dependencies on <tt>std::common_type</tt> and <tt>std::less</tt>
|
||||
//! (<tt><type_traits>/<functional></tt> headers. In C++03 this avoid pulling Boost.Typeof and other
|
||||
//! (<tt><type_traits>/<functional></tt> headers). In C++03 this avoid pulling Boost.Typeof and other
|
||||
//! cascading dependencies. As in all Boost platforms <tt>operator <</tt> on raw pointers and
|
||||
//! other smart pointers provides strict weak ordering in practice this should not be a problem for users.
|
||||
//! - assignable from literal 0 for compilers without nullptr
|
||||
|
|
@ -46,6 +46,7 @@
|
|||
//! cv-less T and cv-less U are the same type and T is more CV qualified than U.
|
||||
|
||||
namespace boost{
|
||||
// @cond
|
||||
namespace move_upd {
|
||||
|
||||
////////////////////////////////////////////
|
||||
|
|
@ -92,25 +93,25 @@ struct unique_ptr_data
|
|||
typedef typename deleter_types<D>::del_ref del_ref;
|
||||
typedef typename deleter_types<D>::del_cref del_cref;
|
||||
|
||||
unique_ptr_data() BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE unique_ptr_data() BOOST_NOEXCEPT
|
||||
: m_p(), d()
|
||||
{}
|
||||
|
||||
explicit unique_ptr_data(P p) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE explicit unique_ptr_data(P p) BOOST_NOEXCEPT
|
||||
: m_p(p), d()
|
||||
{}
|
||||
|
||||
unique_ptr_data(P p, deleter_arg_type1 d1) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE unique_ptr_data(P p, deleter_arg_type1 d1) BOOST_NOEXCEPT
|
||||
: m_p(p), d(d1)
|
||||
{}
|
||||
|
||||
template <class U>
|
||||
unique_ptr_data(P p, BOOST_FWD_REF(U) d1) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE unique_ptr_data(P p, BOOST_FWD_REF(U) d1) BOOST_NOEXCEPT
|
||||
: m_p(p), d(::boost::forward<U>(d1))
|
||||
{}
|
||||
|
||||
del_ref deleter() { return d; }
|
||||
del_cref deleter() const{ return d; }
|
||||
BOOST_MOVE_FORCEINLINE del_ref deleter() { return d; }
|
||||
BOOST_MOVE_FORCEINLINE del_cref deleter() const{ return d; }
|
||||
|
||||
P m_p;
|
||||
D d;
|
||||
|
|
@ -128,25 +129,25 @@ struct unique_ptr_data<P, D, false>
|
|||
typedef typename deleter_types<D>::del_ref del_ref;
|
||||
typedef typename deleter_types<D>::del_cref del_cref;
|
||||
|
||||
unique_ptr_data() BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE unique_ptr_data() BOOST_NOEXCEPT
|
||||
: D(), m_p()
|
||||
{}
|
||||
|
||||
explicit unique_ptr_data(P p) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE explicit unique_ptr_data(P p) BOOST_NOEXCEPT
|
||||
: D(), m_p(p)
|
||||
{}
|
||||
|
||||
unique_ptr_data(P p, deleter_arg_type1 d1) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE unique_ptr_data(P p, deleter_arg_type1 d1) BOOST_NOEXCEPT
|
||||
: D(d1), m_p(p)
|
||||
{}
|
||||
|
||||
template <class U>
|
||||
unique_ptr_data(P p, BOOST_FWD_REF(U) d) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE unique_ptr_data(P p, BOOST_FWD_REF(U) d) BOOST_NOEXCEPT
|
||||
: D(::boost::forward<U>(d)), m_p(p)
|
||||
{}
|
||||
|
||||
del_ref deleter() BOOST_NOEXCEPT { return static_cast<del_ref>(*this); }
|
||||
del_cref deleter() const BOOST_NOEXCEPT { return static_cast<del_cref>(*this); }
|
||||
BOOST_MOVE_FORCEINLINE del_ref deleter() BOOST_NOEXCEPT { return static_cast<del_ref>(*this); }
|
||||
BOOST_MOVE_FORCEINLINE del_cref deleter() const BOOST_NOEXCEPT { return static_cast<del_cref>(*this); }
|
||||
|
||||
P m_p;
|
||||
|
||||
|
|
@ -301,6 +302,7 @@ struct enable_up_moveconv_constr
|
|||
{};
|
||||
|
||||
} //namespace move_upd {
|
||||
// @endcond
|
||||
|
||||
namespace movelib {
|
||||
|
||||
|
|
@ -387,7 +389,7 @@ class unique_ptr
|
|||
//!
|
||||
//! <b>Remarks</b>: If this constructor is instantiated with a pointer type or reference type
|
||||
//! for the template argument D, the program is ill-formed.
|
||||
BOOST_CONSTEXPR unique_ptr() BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE BOOST_CONSTEXPR unique_ptr() BOOST_NOEXCEPT
|
||||
: m_data()
|
||||
{
|
||||
//If this constructor is instantiated with a pointer type or reference type
|
||||
|
|
@ -398,7 +400,7 @@ class unique_ptr
|
|||
|
||||
//! <b>Effects</b>: Same as <tt>unique_ptr()</tt> (default constructor).
|
||||
//!
|
||||
BOOST_CONSTEXPR unique_ptr(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE BOOST_CONSTEXPR unique_ptr(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) BOOST_NOEXCEPT
|
||||
: m_data()
|
||||
{
|
||||
//If this constructor is instantiated with a pointer type or reference type
|
||||
|
|
@ -421,7 +423,7 @@ class unique_ptr
|
|||
//! - If T is not an array type and Pointer is implicitly convertible to pointer.
|
||||
//! - If T is an array type and Pointer is a more CV qualified pointer to element_type.
|
||||
template<class Pointer>
|
||||
explicit unique_ptr(Pointer p
|
||||
BOOST_MOVE_FORCEINLINE explicit unique_ptr(Pointer p
|
||||
BOOST_MOVE_DOCIGN(BOOST_MOVE_I typename bmupd::enable_up_ptr<T BOOST_MOVE_I Pointer BOOST_MOVE_I pointer>::type* =0)
|
||||
) BOOST_NOEXCEPT
|
||||
: m_data(p)
|
||||
|
|
@ -459,7 +461,7 @@ class unique_ptr
|
|||
//! - If T is not an array type and Pointer is implicitly convertible to pointer.
|
||||
//! - If T is an array type and Pointer is a more CV qualified pointer to element_type.
|
||||
template<class Pointer>
|
||||
unique_ptr(Pointer p, BOOST_MOVE_SEEDOC(deleter_arg_type1) d1
|
||||
BOOST_MOVE_FORCEINLINE unique_ptr(Pointer p, BOOST_MOVE_SEEDOC(deleter_arg_type1) d1
|
||||
BOOST_MOVE_DOCIGN(BOOST_MOVE_I typename bmupd::enable_up_ptr<T BOOST_MOVE_I Pointer BOOST_MOVE_I pointer>::type* =0)
|
||||
) BOOST_NOEXCEPT
|
||||
: m_data(p, d1)
|
||||
|
|
@ -472,7 +474,7 @@ class unique_ptr
|
|||
|
||||
//! <b>Effects</b>: Same effects as <tt>template<class Pointer> unique_ptr(Pointer p, deleter_arg_type1 d1)</tt>
|
||||
//! and additionally <tt>get() == nullptr</tt>
|
||||
unique_ptr(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), BOOST_MOVE_SEEDOC(deleter_arg_type1) d1) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE unique_ptr(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), BOOST_MOVE_SEEDOC(deleter_arg_type1) d1) BOOST_NOEXCEPT
|
||||
: m_data(pointer(), d1)
|
||||
{}
|
||||
|
||||
|
|
@ -497,7 +499,7 @@ class unique_ptr
|
|||
//! - If T is not an array type and Pointer is implicitly convertible to pointer.
|
||||
//! - If T is an array type and Pointer is a more CV qualified pointer to element_type.
|
||||
template<class Pointer>
|
||||
unique_ptr(Pointer p, BOOST_MOVE_SEEDOC(deleter_arg_type2) d2
|
||||
BOOST_MOVE_FORCEINLINE unique_ptr(Pointer p, BOOST_MOVE_SEEDOC(deleter_arg_type2) d2
|
||||
BOOST_MOVE_DOCIGN(BOOST_MOVE_I typename bmupd::enable_up_ptr<T BOOST_MOVE_I Pointer BOOST_MOVE_I pointer>::type* =0)
|
||||
) BOOST_NOEXCEPT
|
||||
: m_data(p, ::boost::move(d2))
|
||||
|
|
@ -510,7 +512,7 @@ class unique_ptr
|
|||
|
||||
//! <b>Effects</b>: Same effects as <tt>template<class Pointer> unique_ptr(Pointer p, deleter_arg_type2 d2)</tt>
|
||||
//! and additionally <tt>get() == nullptr</tt>
|
||||
unique_ptr(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), BOOST_MOVE_SEEDOC(deleter_arg_type2) d2) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE unique_ptr(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), BOOST_MOVE_SEEDOC(deleter_arg_type2) d2) BOOST_NOEXCEPT
|
||||
: m_data(pointer(), ::boost::move(d2))
|
||||
{}
|
||||
|
||||
|
|
@ -524,7 +526,7 @@ class unique_ptr
|
|||
//! <b>Postconditions</b>: <tt>get()</tt> yields the value u.get() yielded before the construction. <tt>get_deleter()</tt>
|
||||
//! returns a reference to the stored deleter that was constructed from u.get_deleter(). If D is a
|
||||
//! reference type then <tt>get_deleter()</tt> and <tt>u.get_deleter()</tt> both reference the same lvalue deleter.
|
||||
unique_ptr(BOOST_RV_REF(unique_ptr) u) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE unique_ptr(BOOST_RV_REF(unique_ptr) u) BOOST_NOEXCEPT
|
||||
: m_data(u.release(), ::boost::move_if_not_lvalue_reference<D>(u.get_deleter()))
|
||||
{}
|
||||
|
||||
|
|
@ -544,7 +546,7 @@ class unique_ptr
|
|||
//! <b>Postconditions</b>: <tt>get()</tt> yields the value <tt>u.get()</tt> yielded before the construction. <tt>get_deleter()</tt>
|
||||
//! returns a reference to the stored deleter that was constructed from <tt>u.get_deleter()</tt>.
|
||||
template <class U, class E>
|
||||
unique_ptr( BOOST_RV_REF_BEG_IF_CXX11 unique_ptr<U, E> BOOST_RV_REF_END_IF_CXX11 u
|
||||
BOOST_MOVE_FORCEINLINE unique_ptr( BOOST_RV_REF_BEG_IF_CXX11 unique_ptr<U, E> BOOST_RV_REF_END_IF_CXX11 u
|
||||
BOOST_MOVE_DOCIGN(BOOST_MOVE_I typename bmupd::enable_up_moveconv_constr<T BOOST_MOVE_I D BOOST_MOVE_I U BOOST_MOVE_I E>::type* =0)
|
||||
) BOOST_NOEXCEPT
|
||||
: m_data(u.release(), ::boost::move_if_not_lvalue_reference<E>(u.get_deleter()))
|
||||
|
|
@ -627,7 +629,7 @@ class unique_ptr
|
|||
//! <b>Returns</b>: <tt>get()[i]</tt>.
|
||||
//!
|
||||
//! <b>Remarks</b: If T is not an array type, the program is ill-formed.
|
||||
BOOST_MOVE_DOC1ST(element_type&, typename bmupmu::add_lvalue_reference<element_type>::type)
|
||||
BOOST_MOVE_FORCEINLINE BOOST_MOVE_DOC1ST(element_type&, typename bmupmu::add_lvalue_reference<element_type>::type)
|
||||
operator[](std::size_t i) const BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_ASSERT( bmupmu::extent<T>::value == 0 || i < bmupmu::extent<T>::value );
|
||||
|
|
@ -642,7 +644,7 @@ class unique_ptr
|
|||
//! <b>Note</b>: use typically requires that T be a complete type.
|
||||
//!
|
||||
//! <b>Remarks</b: If T is an array type, the program is ill-formed.
|
||||
pointer operator->() const BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT
|
||||
{
|
||||
BOOST_STATIC_ASSERT((!bmupmu::is_array<T>::value));
|
||||
BOOST_ASSERT(m_data.m_p);
|
||||
|
|
@ -651,27 +653,27 @@ class unique_ptr
|
|||
|
||||
//! <b>Returns</b>: The stored pointer.
|
||||
//!
|
||||
pointer get() const BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE pointer get() const BOOST_NOEXCEPT
|
||||
{ return m_data.m_p; }
|
||||
|
||||
//! <b>Returns</b>: A reference to the stored deleter.
|
||||
//!
|
||||
BOOST_MOVE_DOC1ST(D&, typename bmupmu::add_lvalue_reference<D>::type)
|
||||
BOOST_MOVE_FORCEINLINE BOOST_MOVE_DOC1ST(D&, typename bmupmu::add_lvalue_reference<D>::type)
|
||||
get_deleter() BOOST_NOEXCEPT
|
||||
{ return m_data.deleter(); }
|
||||
|
||||
//! <b>Returns</b>: A reference to the stored deleter.
|
||||
//!
|
||||
BOOST_MOVE_DOC1ST(const D&, typename bmupmu::add_const_lvalue_reference<D>::type)
|
||||
BOOST_MOVE_FORCEINLINE BOOST_MOVE_DOC1ST(const D&, typename bmupmu::add_const_lvalue_reference<D>::type)
|
||||
get_deleter() const BOOST_NOEXCEPT
|
||||
{ return m_data.deleter(); }
|
||||
|
||||
#ifdef BOOST_MOVE_DOXYGEN_INVOKED
|
||||
//! <b>Returns</b>: Returns: get() != nullptr.
|
||||
//!
|
||||
explicit operator bool
|
||||
BOOST_MOVE_FORCEINLINE explicit operator bool
|
||||
#else
|
||||
operator bmupd::explicit_bool_arg
|
||||
BOOST_MOVE_FORCEINLINE operator bmupd::explicit_bool_arg
|
||||
#endif
|
||||
()const BOOST_NOEXCEPT
|
||||
{
|
||||
|
|
@ -683,7 +685,7 @@ class unique_ptr
|
|||
//! <b>Postcondition</b>: <tt>get() == nullptr</tt>.
|
||||
//!
|
||||
//! <b>Returns</b>: The value <tt>get()</tt> had at the start of the call to release.
|
||||
pointer release() BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE pointer release() BOOST_NOEXCEPT
|
||||
{
|
||||
const pointer tmp = m_data.m_p;
|
||||
m_data.m_p = pointer();
|
||||
|
|
@ -746,19 +748,19 @@ class unique_ptr
|
|||
//! <b>Effects</b>: Calls <tt>x.swap(y)</tt>.
|
||||
//!
|
||||
template <class T, class D>
|
||||
inline void swap(unique_ptr<T, D> &x, unique_ptr<T, D> &y) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE void swap(unique_ptr<T, D> &x, unique_ptr<T, D> &y) BOOST_NOEXCEPT
|
||||
{ x.swap(y); }
|
||||
|
||||
//! <b>Returns</b>: <tt>x.get() == y.get()</tt>.
|
||||
//!
|
||||
template <class T1, class D1, class T2, class D2>
|
||||
inline bool operator==(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
|
||||
BOOST_MOVE_FORCEINLINE bool operator==(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
|
||||
{ return x.get() == y.get(); }
|
||||
|
||||
//! <b>Returns</b>: <tt>x.get() != y.get()</tt>.
|
||||
//!
|
||||
template <class T1, class D1, class T2, class D2>
|
||||
inline bool operator!=(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
|
||||
BOOST_MOVE_FORCEINLINE bool operator!=(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
|
||||
{ return x.get() != y.get(); }
|
||||
|
||||
//! <b>Returns</b>: x.get() < y.get().
|
||||
|
|
@ -766,99 +768,99 @@ inline bool operator!=(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
|
|||
//! <b>Remarks</b>: This comparison shall induce a
|
||||
//! strict weak ordering betwen pointers.
|
||||
template <class T1, class D1, class T2, class D2>
|
||||
inline bool operator<(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
|
||||
BOOST_MOVE_FORCEINLINE bool operator<(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
|
||||
{ return x.get() < y.get(); }
|
||||
|
||||
//! <b>Returns</b>: !(y < x).
|
||||
//!
|
||||
template <class T1, class D1, class T2, class D2>
|
||||
inline bool operator<=(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
|
||||
BOOST_MOVE_FORCEINLINE bool operator<=(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
|
||||
{ return !(y < x); }
|
||||
|
||||
//! <b>Returns</b>: y < x.
|
||||
//!
|
||||
template <class T1, class D1, class T2, class D2>
|
||||
inline bool operator>(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
|
||||
BOOST_MOVE_FORCEINLINE bool operator>(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
|
||||
{ return y < x; }
|
||||
|
||||
//! <b>Returns</b>:!(x < y).
|
||||
//!
|
||||
template <class T1, class D1, class T2, class D2>
|
||||
inline bool operator>=(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
|
||||
BOOST_MOVE_FORCEINLINE bool operator>=(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
|
||||
{ return !(x < y); }
|
||||
|
||||
//! <b>Returns</b>:!x.
|
||||
//!
|
||||
template <class T, class D>
|
||||
inline bool operator==(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE bool operator==(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) BOOST_NOEXCEPT
|
||||
{ return !x; }
|
||||
|
||||
//! <b>Returns</b>:!x.
|
||||
//!
|
||||
template <class T, class D>
|
||||
inline bool operator==(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE bool operator==(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x) BOOST_NOEXCEPT
|
||||
{ return !x; }
|
||||
|
||||
//! <b>Returns</b>: (bool)x.
|
||||
//!
|
||||
template <class T, class D>
|
||||
inline bool operator!=(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE bool operator!=(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) BOOST_NOEXCEPT
|
||||
{ return !!x; }
|
||||
|
||||
//! <b>Returns</b>: (bool)x.
|
||||
//!
|
||||
template <class T, class D>
|
||||
inline bool operator!=(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE bool operator!=(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x) BOOST_NOEXCEPT
|
||||
{ return !!x; }
|
||||
|
||||
//! <b>Requires</b>: <tt>operator </tt> shall induce a strict weak ordering on unique_ptr<T, D>::pointer values.
|
||||
//!
|
||||
//! <b>Returns</b>: Returns <tt>x.get() < pointer()</tt>.
|
||||
template <class T, class D>
|
||||
inline bool operator<(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type))
|
||||
BOOST_MOVE_FORCEINLINE bool operator<(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type))
|
||||
{ return x.get() < typename unique_ptr<T, D>::pointer(); }
|
||||
|
||||
//! <b>Requires</b>: <tt>operator </tt> shall induce a strict weak ordering on unique_ptr<T, D>::pointer values.
|
||||
//!
|
||||
//! <b>Returns</b>: Returns <tt>pointer() < x.get()</tt>.
|
||||
template <class T, class D>
|
||||
inline bool operator<(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x)
|
||||
BOOST_MOVE_FORCEINLINE bool operator<(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x)
|
||||
{ return typename unique_ptr<T, D>::pointer() < x.get(); }
|
||||
|
||||
//! <b>Returns</b>: <tt>nullptr < x</tt>.
|
||||
//!
|
||||
template <class T, class D>
|
||||
inline bool operator>(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type))
|
||||
BOOST_MOVE_FORCEINLINE bool operator>(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type))
|
||||
{ return x.get() > typename unique_ptr<T, D>::pointer(); }
|
||||
|
||||
//! <b>Returns</b>: <tt>x < nullptr</tt>.
|
||||
//!
|
||||
template <class T, class D>
|
||||
inline bool operator>(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x)
|
||||
BOOST_MOVE_FORCEINLINE bool operator>(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x)
|
||||
{ return typename unique_ptr<T, D>::pointer() > x.get(); }
|
||||
|
||||
//! <b>Returns</b>: <tt>!(nullptr < x)</tt>.
|
||||
//!
|
||||
template <class T, class D>
|
||||
inline bool operator<=(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type))
|
||||
BOOST_MOVE_FORCEINLINE bool operator<=(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type))
|
||||
{ return !(bmupd::nullptr_type() < x); }
|
||||
|
||||
//! <b>Returns</b>: <tt>!(x < nullptr)</tt>.
|
||||
//!
|
||||
template <class T, class D>
|
||||
inline bool operator<=(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x)
|
||||
BOOST_MOVE_FORCEINLINE bool operator<=(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x)
|
||||
{ return !(x < bmupd::nullptr_type()); }
|
||||
|
||||
//! <b>Returns</b>: <tt>!(x < nullptr)</tt>.
|
||||
//!
|
||||
template <class T, class D>
|
||||
inline bool operator>=(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type))
|
||||
BOOST_MOVE_FORCEINLINE bool operator>=(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type))
|
||||
{ return !(x < bmupd::nullptr_type()); }
|
||||
|
||||
//! <b>Returns</b>: <tt>!(nullptr < x)</tt>.
|
||||
//!
|
||||
template <class T, class D>
|
||||
inline bool operator>=(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x)
|
||||
BOOST_MOVE_FORCEINLINE bool operator>=(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x)
|
||||
{ return !(bmupd::nullptr_type() < x); }
|
||||
|
||||
} //namespace movelib {
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
#endif
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/move/detail/workaround.hpp> //forceinline
|
||||
#include <boost/move/utility_core.hpp>
|
||||
#include <boost/move/traits.hpp>
|
||||
|
||||
|
|
@ -39,7 +40,7 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::enable_if_c
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
|
||||
< enable_move_utility_emulation<T>::value && !has_move_emulation_enabled<T>::value
|
||||
, typename ::boost::move_detail::add_const<T>::type &
|
||||
>::type
|
||||
|
|
@ -49,7 +50,7 @@
|
|||
}
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::enable_if_c
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
|
||||
< enable_move_utility_emulation<T>::value && has_move_emulation_enabled<T>::value
|
||||
&& ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value, rv<T>&>::type
|
||||
move_if_noexcept(T& x) BOOST_NOEXCEPT
|
||||
|
|
@ -58,7 +59,7 @@
|
|||
}
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::enable_if_c
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
|
||||
< enable_move_utility_emulation<T>::value && has_move_emulation_enabled<T>::value
|
||||
&& ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value
|
||||
, rv<T>&
|
||||
|
|
@ -69,7 +70,7 @@
|
|||
}
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::enable_if_c
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
|
||||
< enable_move_utility_emulation<T>::value && has_move_emulation_enabled<T>::value
|
||||
&& !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value
|
||||
, typename ::boost::move_detail::add_const<T>::type &
|
||||
|
|
@ -80,7 +81,7 @@
|
|||
}
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::enable_if_c
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
|
||||
< enable_move_utility_emulation<T>::value && has_move_emulation_enabled<T>::value
|
||||
&& !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value
|
||||
, typename ::boost::move_detail::add_const<T>::type &
|
||||
|
|
@ -125,13 +126,13 @@
|
|||
#else //BOOST_MOVE_DOXYGEN_INVOKED
|
||||
|
||||
template <class T>
|
||||
typename ::boost::move_detail::enable_if_c
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
|
||||
< ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value, T&&>::type
|
||||
move_if_noexcept(T& x) BOOST_NOEXCEPT
|
||||
{ return ::boost::move(x); }
|
||||
|
||||
template <class T>
|
||||
typename ::boost::move_detail::enable_if_c
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
|
||||
< !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value, const T&>::type
|
||||
move_if_noexcept(T& x) BOOST_NOEXCEPT
|
||||
{ return x; }
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@
|
|||
#endif
|
||||
|
||||
#include <boost/move/detail/config_begin.hpp>
|
||||
#include <boost/move/detail/workaround.hpp> //forceinline
|
||||
#include <boost/move/core.hpp>
|
||||
#include <boost/move/detail/meta_utils.hpp>
|
||||
#include <boost/static_assert.hpp>
|
||||
|
|
@ -47,7 +48,7 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::enable_if_and
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
|
||||
< T &
|
||||
, enable_move_utility_emulation<T>
|
||||
, has_move_emulation_disabled<T>
|
||||
|
|
@ -58,7 +59,7 @@
|
|||
}
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::enable_if_and
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
|
||||
< rv<T>&
|
||||
, enable_move_utility_emulation<T>
|
||||
, has_move_emulation_enabled<T>
|
||||
|
|
@ -69,7 +70,7 @@
|
|||
}
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::enable_if_and
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
|
||||
< rv<T>&
|
||||
, enable_move_utility_emulation<T>
|
||||
, has_move_emulation_enabled<T>
|
||||
|
|
@ -86,7 +87,7 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::enable_if_and
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
|
||||
< T &
|
||||
, enable_move_utility_emulation<T>
|
||||
, ::boost::move_detail::is_rv<T>
|
||||
|
|
@ -97,7 +98,7 @@
|
|||
}
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::enable_if_and
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
|
||||
< const T &
|
||||
, enable_move_utility_emulation<T>
|
||||
, ::boost::move_detail::is_not_rv<T>
|
||||
|
|
@ -114,7 +115,7 @@
|
|||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::enable_if_and
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
|
||||
< T &
|
||||
, enable_move_utility_emulation<T>
|
||||
, ::boost::move_detail::is_rv<T>
|
||||
|
|
@ -125,7 +126,7 @@
|
|||
}
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::enable_if_and
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
|
||||
< typename ::boost::move_detail::add_lvalue_reference<T>::type
|
||||
, enable_move_utility_emulation<T>
|
||||
, ::boost::move_detail::is_not_rv<T>
|
||||
|
|
@ -140,7 +141,7 @@
|
|||
}
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::enable_if_and
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
|
||||
< rv<T>&
|
||||
, enable_move_utility_emulation<T>
|
||||
, ::boost::move_detail::is_not_rv<T>
|
||||
|
|
@ -202,13 +203,13 @@
|
|||
|
||||
//Old move approach, lvalues could bind to rvalue references
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::remove_reference<T>::type && move(T&& t) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::remove_reference<T>::type && move(T&& t) BOOST_NOEXCEPT
|
||||
{ return t; }
|
||||
|
||||
#else //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
|
||||
|
||||
template <class T>
|
||||
inline typename ::boost::move_detail::remove_reference<T>::type && move(T&& t) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::remove_reference<T>::type && move(T&& t) BOOST_NOEXCEPT
|
||||
{ return static_cast<typename ::boost::move_detail::remove_reference<T>::type &&>(t); }
|
||||
|
||||
#endif //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
|
||||
|
|
@ -238,17 +239,17 @@
|
|||
//Old move approach, lvalues could bind to rvalue references
|
||||
|
||||
template <class T>
|
||||
inline T&& forward(typename ::boost::move_detail::identity<T>::type&& t) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE T&& forward(typename ::boost::move_detail::identity<T>::type&& t) BOOST_NOEXCEPT
|
||||
{ return t; }
|
||||
|
||||
#else //Old move
|
||||
|
||||
template <class T>
|
||||
inline T&& forward(typename ::boost::move_detail::remove_reference<T>::type& t) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE T&& forward(typename ::boost::move_detail::remove_reference<T>::type& t) BOOST_NOEXCEPT
|
||||
{ return static_cast<T&&>(t); }
|
||||
|
||||
template <class T>
|
||||
inline T&& forward(typename ::boost::move_detail::remove_reference<T>::type&& t) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE T&& forward(typename ::boost::move_detail::remove_reference<T>::type&& t) BOOST_NOEXCEPT
|
||||
{
|
||||
//"boost::forward<T> error: 'T' is a lvalue reference, can't forward as rvalue.";
|
||||
BOOST_STATIC_ASSERT(!boost::move_detail::is_lvalue_reference<T>::value);
|
||||
|
|
@ -265,23 +266,25 @@
|
|||
|
||||
|
||||
#if defined(BOOST_MOVE_DOXYGEN_INVOKED)
|
||||
//! <b>Effects</b>: Calls `boost::move` if `input_reference` is not a lvalue reference.
|
||||
//! Otherwise returns the reference
|
||||
template <class T> output_reference move_if_not_lvalue_reference(input_reference) noexcept;
|
||||
#elif defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)
|
||||
|
||||
//Old move approach, lvalues could bind to rvalue references
|
||||
|
||||
template <class T>
|
||||
inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::identity<T>::type&& t) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE T&& move_if_not_lvalue_reference(typename ::boost::move_detail::identity<T>::type&& t) BOOST_NOEXCEPT
|
||||
{ return t; }
|
||||
|
||||
#else //Old move
|
||||
|
||||
template <class T>
|
||||
inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type& t) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type& t) BOOST_NOEXCEPT
|
||||
{ return static_cast<T&&>(t); }
|
||||
|
||||
template <class T>
|
||||
inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type&& t) BOOST_NOEXCEPT
|
||||
BOOST_MOVE_FORCEINLINE T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type&& t) BOOST_NOEXCEPT
|
||||
{
|
||||
//"boost::forward<T> error: 'T' is a lvalue reference, can't forward as rvalue.";
|
||||
BOOST_STATIC_ASSERT(!boost::move_detail::is_lvalue_reference<T>::value);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue