整理
This commit is contained in:
61
include/boost/move/detail/addressof.hpp
Normal file
61
include/boost/move/detail/addressof.hpp
Normal file
@@ -0,0 +1,61 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef BOOST_MOVE_DETAIL_ADDRESSOF_HPP
|
||||
#define BOOST_MOVE_DETAIL_ADDRESSOF_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/workaround.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
#if defined(BOOST_MSVC_FULL_VER) && BOOST_MSVC_FULL_VER >= 190024215
|
||||
#define BOOST_MOVE_HAS_BUILTIN_ADDRESSOF
|
||||
#elif defined(BOOST_GCC) && BOOST_GCC >= 70000
|
||||
#define BOOST_MOVE_HAS_BUILTIN_ADDRESSOF
|
||||
#elif defined(__has_builtin)
|
||||
#if __has_builtin(__builtin_addressof)
|
||||
#define BOOST_MOVE_HAS_BUILTIN_ADDRESSOF
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MOVE_HAS_BUILTIN_ADDRESSOF
|
||||
|
||||
template<class T>
|
||||
BOOST_MOVE_FORCEINLINE T *addressof( T & v ) BOOST_NOEXCEPT
|
||||
{
|
||||
return __builtin_addressof(v);
|
||||
}
|
||||
|
||||
#else //BOOST_MOVE_HAS_BUILTIN_ADDRESSOF
|
||||
|
||||
template <typename T>
|
||||
BOOST_MOVE_FORCEINLINE T* addressof(T& obj)
|
||||
{
|
||||
return static_cast<T*>(
|
||||
static_cast<void*>(
|
||||
const_cast<char*>(
|
||||
&reinterpret_cast<const volatile char&>(obj)
|
||||
)));
|
||||
}
|
||||
|
||||
#endif //BOOST_MOVE_HAS_BUILTIN_ADDRESSOF
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_ADDRESSOF_HPP
|
||||
21
include/boost/move/detail/config_begin.hpp
Normal file
21
include/boost/move/detail/config_begin.hpp
Normal file
@@ -0,0 +1,21 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2012-2012. 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.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
#include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MSVC
|
||||
# pragma warning (push)
|
||||
# pragma warning (disable : 4619) // there is no warning number 'XXXX'
|
||||
# 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 : 4714) // "function": marked as __forceinline not inlined
|
||||
# pragma warning (disable : 4127) // conditional expression is constant
|
||||
#endif
|
||||
12
include/boost/move/detail/config_end.hpp
Normal file
12
include/boost/move/detail/config_end.hpp
Normal file
@@ -0,0 +1,12 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2012-2012. 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 BOOST_MSVC
|
||||
# pragma warning (pop)
|
||||
#endif
|
||||
66
include/boost/move/detail/destruct_n.hpp
Normal file
66
include/boost/move/detail/destruct_n.hpp
Normal file
@@ -0,0 +1,66 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2015-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_DETAIL_DESTRUCT_N_HPP
|
||||
#define BOOST_MOVE_DETAIL_DESTRUCT_N_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
namespace boost {
|
||||
namespace movelib{
|
||||
|
||||
template<class T, class RandItUninit>
|
||||
class destruct_n
|
||||
{
|
||||
public:
|
||||
explicit destruct_n(RandItUninit raw)
|
||||
: m_ptr(raw), m_size()
|
||||
{}
|
||||
|
||||
void incr()
|
||||
{
|
||||
++m_size;
|
||||
}
|
||||
|
||||
void incr(std::size_t n)
|
||||
{
|
||||
m_size += n;
|
||||
}
|
||||
|
||||
void release()
|
||||
{
|
||||
m_size = 0u;
|
||||
}
|
||||
|
||||
~destruct_n()
|
||||
{
|
||||
while(m_size--){
|
||||
m_ptr[m_size].~T();
|
||||
}
|
||||
}
|
||||
private:
|
||||
RandItUninit m_ptr;
|
||||
std::size_t m_size;
|
||||
};
|
||||
|
||||
}} //namespace boost { namespace movelib{
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_DESTRUCT_N_HPP
|
||||
36
include/boost/move/detail/force_ptr.hpp
Normal file
36
include/boost/move/detail/force_ptr.hpp
Normal file
@@ -0,0 +1,36 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef BOOST_MOVE_DETAIL_FORCE_CAST_HPP
|
||||
#define BOOST_MOVE_DETAIL_FORCE_CAST_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/workaround.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
|
||||
template <typename T>
|
||||
BOOST_MOVE_FORCEINLINE T force_ptr(const volatile void *p)
|
||||
{
|
||||
return static_cast<T>(const_cast<void*>(p));
|
||||
}
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_FORCE_CAST_HPP
|
||||
893
include/boost/move/detail/fwd_macros.hpp
Normal file
893
include/boost/move/detail/fwd_macros.hpp
Normal file
@@ -0,0 +1,893 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014. 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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_MOVE_DETAIL_FWD_MACROS_HPP
|
||||
#define BOOST_MOVE_DETAIL_FWD_MACROS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/workaround.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
template <typename T> struct unvoid { typedef T type; };
|
||||
template <> struct unvoid<void> { struct type { }; };
|
||||
template <> struct unvoid<const void> { struct type { }; };
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES)
|
||||
|
||||
#if defined(BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG)
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
template<class T>
|
||||
struct mref;
|
||||
|
||||
template<class T>
|
||||
struct mref<T &>
|
||||
{
|
||||
explicit mref(T &t) : t_(t){}
|
||||
T &t_;
|
||||
T & get() { return t_; }
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct mref
|
||||
{
|
||||
explicit mref(T &&t) : t_(t) {}
|
||||
T &t_;
|
||||
T &&get() { return ::boost::move(t_); }
|
||||
};
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
|
||||
#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_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_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)
|
||||
#define BOOST_MOVE_FWD5 BOOST_MOVE_FWD4, ::boost::forward<P4>(p4)
|
||||
#define BOOST_MOVE_FWD6 BOOST_MOVE_FWD5, ::boost::forward<P5>(p5)
|
||||
#define BOOST_MOVE_FWD7 BOOST_MOVE_FWD6, ::boost::forward<P6>(p6)
|
||||
#define BOOST_MOVE_FWD8 BOOST_MOVE_FWD7, ::boost::forward<P7>(p7)
|
||||
#define BOOST_MOVE_FWD9 BOOST_MOVE_FWD8, ::boost::forward<P8>(p8)
|
||||
|
||||
//BOOST_MOVE_FWDQN
|
||||
#define BOOST_MOVE_FWDQ0
|
||||
#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)
|
||||
#define BOOST_MOVE_FWDQ5 BOOST_MOVE_FWDQ4, ::boost::forward<Q4>(q4)
|
||||
#define BOOST_MOVE_FWDQ6 BOOST_MOVE_FWDQ5, ::boost::forward<Q5>(q5)
|
||||
#define BOOST_MOVE_FWDQ7 BOOST_MOVE_FWDQ6, ::boost::forward<Q6>(q6)
|
||||
#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_ARG2 BOOST_MOVE_ARG1, p1
|
||||
#define BOOST_MOVE_ARG3 BOOST_MOVE_ARG2, p2
|
||||
#define BOOST_MOVE_ARG4 BOOST_MOVE_ARG3, p3
|
||||
#define BOOST_MOVE_ARG5 BOOST_MOVE_ARG4, p4
|
||||
#define BOOST_MOVE_ARG6 BOOST_MOVE_ARG5, p5
|
||||
#define BOOST_MOVE_ARG7 BOOST_MOVE_ARG6, p6
|
||||
#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_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>()
|
||||
#define BOOST_MOVE_DECLVAL5 BOOST_MOVE_DECLVAL4, ::boost::move_detail::declval<P4>()
|
||||
#define BOOST_MOVE_DECLVAL6 BOOST_MOVE_DECLVAL5, ::boost::move_detail::declval<P5>()
|
||||
#define BOOST_MOVE_DECLVAL7 BOOST_MOVE_DECLVAL6, ::boost::move_detail::declval<P6>()
|
||||
#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_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)
|
||||
#define BOOST_MOVE_MFWD5 BOOST_MOVE_MFWD4, BOOST_MOVE_MFWD(4)
|
||||
#define BOOST_MOVE_MFWD6 BOOST_MOVE_MFWD5, BOOST_MOVE_MFWD(5)
|
||||
#define BOOST_MOVE_MFWD7 BOOST_MOVE_MFWD6, BOOST_MOVE_MFWD(6)
|
||||
#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_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)
|
||||
#define BOOST_MOVE_MINC5 BOOST_MOVE_MINC4, BOOST_MOVE_MINC(4)
|
||||
#define BOOST_MOVE_MINC6 BOOST_MOVE_MINC5, BOOST_MOVE_MINC(5)
|
||||
#define BOOST_MOVE_MINC7 BOOST_MOVE_MINC6, BOOST_MOVE_MINC(6)
|
||||
#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_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)
|
||||
#define BOOST_MOVE_MITFWD5 BOOST_MOVE_MITFWD4, BOOST_MOVE_MITFWD(4)
|
||||
#define BOOST_MOVE_MITFWD6 BOOST_MOVE_MITFWD5, BOOST_MOVE_MITFWD(5)
|
||||
#define BOOST_MOVE_MITFWD7 BOOST_MOVE_MITFWD6, BOOST_MOVE_MITFWD(6)
|
||||
#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_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))
|
||||
#define BOOST_MOVE_FWD_INIT5 BOOST_MOVE_FWD_INIT4, m_p4(::boost::forward<P4>(p4))
|
||||
#define BOOST_MOVE_FWD_INIT6 BOOST_MOVE_FWD_INIT5, m_p5(::boost::forward<P5>(p5))
|
||||
#define BOOST_MOVE_FWD_INIT7 BOOST_MOVE_FWD_INIT6, m_p6(::boost::forward<P6>(p6))
|
||||
#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_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)
|
||||
#define BOOST_MOVE_VAL_INIT5 BOOST_MOVE_VAL_INIT4, m_p4(p4)
|
||||
#define BOOST_MOVE_VAL_INIT6 BOOST_MOVE_VAL_INIT5, m_p5(p5)
|
||||
#define BOOST_MOVE_VAL_INIT7 BOOST_MOVE_VAL_INIT6, m_p6(p6)
|
||||
#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_UREFANONN
|
||||
#define BOOST_MOVE_UREFANON0
|
||||
#define BOOST_MOVE_UREFANON1 BOOST_FWD_REF(P0)
|
||||
#define BOOST_MOVE_UREFANON2 BOOST_MOVE_UREFANON1, BOOST_FWD_REF(P1)
|
||||
#define BOOST_MOVE_UREFANON3 BOOST_MOVE_UREFANON2, BOOST_FWD_REF(P2)
|
||||
#define BOOST_MOVE_UREFANON4 BOOST_MOVE_UREFANON3, BOOST_FWD_REF(P3)
|
||||
#define BOOST_MOVE_UREFANON5 BOOST_MOVE_UREFANON4, BOOST_FWD_REF(P4)
|
||||
#define BOOST_MOVE_UREFANON6 BOOST_MOVE_UREFANON5, BOOST_FWD_REF(P5)
|
||||
#define BOOST_MOVE_UREFANON7 BOOST_MOVE_UREFANON6, BOOST_FWD_REF(P6)
|
||||
#define BOOST_MOVE_UREFANON8 BOOST_MOVE_UREFANON7, BOOST_FWD_REF(P7)
|
||||
#define BOOST_MOVE_UREFANON9 BOOST_MOVE_UREFANON8, BOOST_FWD_REF(P8)
|
||||
|
||||
//BOOST_MOVE_UREFN
|
||||
#define BOOST_MOVE_UREF0
|
||||
#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
|
||||
#define BOOST_MOVE_UREF5 BOOST_MOVE_UREF4, BOOST_FWD_REF(P4) p4
|
||||
#define BOOST_MOVE_UREF6 BOOST_MOVE_UREF5, BOOST_FWD_REF(P5) p5
|
||||
#define BOOST_MOVE_UREF7 BOOST_MOVE_UREF6, BOOST_FWD_REF(P6) p6
|
||||
#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_UREFQN
|
||||
#define BOOST_MOVE_UREFQ0
|
||||
#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
|
||||
#define BOOST_MOVE_UREFQ5 BOOST_MOVE_UREFQ4, BOOST_FWD_REF(Q4) q4
|
||||
#define BOOST_MOVE_UREFQ6 BOOST_MOVE_UREFQ5, BOOST_FWD_REF(Q5) q5
|
||||
#define BOOST_MOVE_UREFQ7 BOOST_MOVE_UREFQ6, BOOST_FWD_REF(Q6) q6
|
||||
#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_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_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
|
||||
#define BOOST_MOVE_CREF5 BOOST_MOVE_CREF4, BOOST_MOVE_UNVOIDCREF(P4) p4
|
||||
#define BOOST_MOVE_CREF6 BOOST_MOVE_CREF5, BOOST_MOVE_UNVOIDCREF(P5) p5
|
||||
#define BOOST_MOVE_CREF7 BOOST_MOVE_CREF6, BOOST_MOVE_UNVOIDCREF(P6) p6
|
||||
#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_CLASS2 BOOST_MOVE_CLASS1, class P1
|
||||
#define BOOST_MOVE_CLASS3 BOOST_MOVE_CLASS2, class P2
|
||||
#define BOOST_MOVE_CLASS4 BOOST_MOVE_CLASS3, class P3
|
||||
#define BOOST_MOVE_CLASS5 BOOST_MOVE_CLASS4, class P4
|
||||
#define BOOST_MOVE_CLASS6 BOOST_MOVE_CLASS5, class P5
|
||||
#define BOOST_MOVE_CLASS7 BOOST_MOVE_CLASS6, class P6
|
||||
#define BOOST_MOVE_CLASS8 BOOST_MOVE_CLASS7, class P7
|
||||
#define BOOST_MOVE_CLASS9 BOOST_MOVE_CLASS8, class P8
|
||||
|
||||
//BOOST_MOVE_CLASSQN
|
||||
#define BOOST_MOVE_CLASSQ0
|
||||
#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
|
||||
#define BOOST_MOVE_CLASSQ5 BOOST_MOVE_CLASSQ4, class Q4
|
||||
#define BOOST_MOVE_CLASSQ6 BOOST_MOVE_CLASSQ5, class Q5
|
||||
#define BOOST_MOVE_CLASSQ7 BOOST_MOVE_CLASSQ6, class Q6
|
||||
#define BOOST_MOVE_CLASSQ8 BOOST_MOVE_CLASSQ7, class Q7
|
||||
#define BOOST_MOVE_CLASSQ9 BOOST_MOVE_CLASSQ8, class Q8
|
||||
|
||||
//BOOST_MOVE_CLASSDFLTN
|
||||
#define BOOST_MOVE_CLASSDFLT0
|
||||
#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
|
||||
#define BOOST_MOVE_CLASSDFLT5 BOOST_MOVE_CLASSDFLT4, class P4 = void
|
||||
#define BOOST_MOVE_CLASSDFLT6 BOOST_MOVE_CLASSDFLT5, class P5 = void
|
||||
#define BOOST_MOVE_CLASSDFLT7 BOOST_MOVE_CLASSDFLT6, class P6 = void
|
||||
#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_LAST_TARGN
|
||||
#define BOOST_MOVE_LAST_TARG0 void
|
||||
#define BOOST_MOVE_LAST_TARG1 P0
|
||||
#define BOOST_MOVE_LAST_TARG2 P1
|
||||
#define BOOST_MOVE_LAST_TARG3 P2
|
||||
#define BOOST_MOVE_LAST_TARG4 P3
|
||||
#define BOOST_MOVE_LAST_TARG5 P4
|
||||
#define BOOST_MOVE_LAST_TARG6 P5
|
||||
#define BOOST_MOVE_LAST_TARG7 P6
|
||||
#define BOOST_MOVE_LAST_TARG8 P7
|
||||
#define BOOST_MOVE_LAST_TARG9 P8
|
||||
|
||||
//BOOST_MOVE_LAST_TARGQN
|
||||
#define BOOST_MOVE_LAST_TARGQ0 void
|
||||
#define BOOST_MOVE_LAST_TARGQ1 Q0
|
||||
#define BOOST_MOVE_LAST_TARGQ2 Q1
|
||||
#define BOOST_MOVE_LAST_TARGQ3 Q2
|
||||
#define BOOST_MOVE_LAST_TARGQ4 Q3
|
||||
#define BOOST_MOVE_LAST_TARGQ5 Q4
|
||||
#define BOOST_MOVE_LAST_TARGQ6 Q5
|
||||
#define BOOST_MOVE_LAST_TARGQ7 Q6
|
||||
#define BOOST_MOVE_LAST_TARGQ8 Q7
|
||||
#define BOOST_MOVE_LAST_TARGQ9 Q8
|
||||
|
||||
|
||||
//BOOST_MOVE_TARGN
|
||||
#define BOOST_MOVE_TARG0
|
||||
#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
|
||||
#define BOOST_MOVE_TARG5 BOOST_MOVE_TARG4, P4
|
||||
#define BOOST_MOVE_TARG6 BOOST_MOVE_TARG5, P5
|
||||
#define BOOST_MOVE_TARG7 BOOST_MOVE_TARG6, P6
|
||||
#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_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
|
||||
#define BOOST_MOVE_FWD_T5 BOOST_MOVE_FWD_T4, typename ::boost::move_detail::forward_type<P4>::type
|
||||
#define BOOST_MOVE_FWD_T6 BOOST_MOVE_FWD_T5, typename ::boost::move_detail::forward_type<P5>::type
|
||||
#define BOOST_MOVE_FWD_T7 BOOST_MOVE_FWD_T6, typename ::boost::move_detail::forward_type<P6>::type
|
||||
#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_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;
|
||||
#define BOOST_MOVE_MREF5 BOOST_MOVE_MREF4 BOOST_MOVE_MREF(P4) m_p4;
|
||||
#define BOOST_MOVE_MREF6 BOOST_MOVE_MREF5 BOOST_MOVE_MREF(P5) m_p5;
|
||||
#define BOOST_MOVE_MREF7 BOOST_MOVE_MREF6 BOOST_MOVE_MREF(P6) m_p6;
|
||||
#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_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;
|
||||
#define BOOST_MOVE_MEMB5 BOOST_MOVE_MEMB4 P4 m_p4;
|
||||
#define BOOST_MOVE_MEMB6 BOOST_MOVE_MEMB5 P5 m_p5;
|
||||
#define BOOST_MOVE_MEMB7 BOOST_MOVE_MEMB6 P6 m_p6;
|
||||
#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<
|
||||
#define BOOST_MOVE_TMPL_LT2 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT3 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT4 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT5 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT6 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT7 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT8 BOOST_MOVE_TMPL_LT1
|
||||
#define BOOST_MOVE_TMPL_LT9 BOOST_MOVE_TMPL_LT1
|
||||
|
||||
//BOOST_MOVE_LTN
|
||||
#define BOOST_MOVE_LT0
|
||||
#define BOOST_MOVE_LT1 <
|
||||
#define BOOST_MOVE_LT2 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT3 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT4 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT5 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT6 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT7 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT8 BOOST_MOVE_LT1
|
||||
#define BOOST_MOVE_LT9 BOOST_MOVE_LT1
|
||||
|
||||
//BOOST_MOVE_GTN
|
||||
#define BOOST_MOVE_GT0
|
||||
#define BOOST_MOVE_GT1 >
|
||||
#define BOOST_MOVE_GT2 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT3 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT4 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT5 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT6 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT7 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT8 BOOST_MOVE_GT1
|
||||
#define BOOST_MOVE_GT9 BOOST_MOVE_GT1
|
||||
|
||||
//BOOST_MOVE_LPN
|
||||
#define BOOST_MOVE_LP0
|
||||
#define BOOST_MOVE_LP1 (
|
||||
#define BOOST_MOVE_LP2 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP3 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP4 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP5 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP6 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP7 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP8 BOOST_MOVE_LP1
|
||||
#define BOOST_MOVE_LP9 BOOST_MOVE_LP1
|
||||
|
||||
//BOOST_MOVE_RPN
|
||||
#define BOOST_MOVE_RP0
|
||||
#define BOOST_MOVE_RP1 )
|
||||
#define BOOST_MOVE_RP2 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP3 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP4 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP5 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP6 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP7 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP8 BOOST_MOVE_RP1
|
||||
#define BOOST_MOVE_RP9 BOOST_MOVE_RP1
|
||||
|
||||
//BOOST_MOVE_IN
|
||||
#define BOOST_MOVE_I0
|
||||
#define BOOST_MOVE_I1 ,
|
||||
#define BOOST_MOVE_I2 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I3 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I4 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I5 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I6 BOOST_MOVE_I1
|
||||
#define BOOST_MOVE_I7 BOOST_MOVE_I1
|
||||
#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 :
|
||||
#define BOOST_MOVE_COLON2 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON3 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON4 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON5 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON6 BOOST_MOVE_COLON1
|
||||
#define BOOST_MOVE_COLON7 BOOST_MOVE_COLON1
|
||||
#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_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)
|
||||
#define BOOST_MOVE_ITERATE_2TO6(MACROFUNC) BOOST_MOVE_ITERATE_2TO5(MACROFUNC) MACROFUNC(6)
|
||||
#define BOOST_MOVE_ITERATE_2TO7(MACROFUNC) BOOST_MOVE_ITERATE_2TO6(MACROFUNC) MACROFUNC(7)
|
||||
#define BOOST_MOVE_ITERATE_2TO8(MACROFUNC) BOOST_MOVE_ITERATE_2TO7(MACROFUNC) MACROFUNC(8)
|
||||
#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_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)
|
||||
#define BOOST_MOVE_ITERATE_1TO5(MACROFUNC) BOOST_MOVE_ITERATE_1TO4(MACROFUNC) MACROFUNC(5)
|
||||
#define BOOST_MOVE_ITERATE_1TO6(MACROFUNC) BOOST_MOVE_ITERATE_1TO5(MACROFUNC) MACROFUNC(6)
|
||||
#define BOOST_MOVE_ITERATE_1TO7(MACROFUNC) BOOST_MOVE_ITERATE_1TO6(MACROFUNC) MACROFUNC(7)
|
||||
#define BOOST_MOVE_ITERATE_1TO8(MACROFUNC) BOOST_MOVE_ITERATE_1TO7(MACROFUNC) MACROFUNC(8)
|
||||
#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_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)
|
||||
#define BOOST_MOVE_ITERATE_0TO4(MACROFUNC) BOOST_MOVE_ITERATE_0TO3(MACROFUNC) MACROFUNC(4)
|
||||
#define BOOST_MOVE_ITERATE_0TO5(MACROFUNC) BOOST_MOVE_ITERATE_0TO4(MACROFUNC) MACROFUNC(5)
|
||||
#define BOOST_MOVE_ITERATE_0TO6(MACROFUNC) BOOST_MOVE_ITERATE_0TO5(MACROFUNC) MACROFUNC(6)
|
||||
#define BOOST_MOVE_ITERATE_0TO7(MACROFUNC) BOOST_MOVE_ITERATE_0TO6(MACROFUNC) MACROFUNC(7)
|
||||
#define BOOST_MOVE_ITERATE_0TO8(MACROFUNC) BOOST_MOVE_ITERATE_0TO7(MACROFUNC) MACROFUNC(8)
|
||||
#define BOOST_MOVE_ITERATE_0TO9(MACROFUNC) BOOST_MOVE_ITERATE_0TO8(MACROFUNC) MACROFUNC(9)
|
||||
|
||||
//BOOST_MOVE_ITERATE_NTON
|
||||
#define BOOST_MOVE_ITERATE_1TO1(MACROFUNC) MACROFUNC(1)
|
||||
#define BOOST_MOVE_ITERATE_2TO2(MACROFUNC) MACROFUNC(2)
|
||||
#define BOOST_MOVE_ITERATE_3TO3(MACROFUNC) MACROFUNC(3)
|
||||
#define BOOST_MOVE_ITERATE_4TO4(MACROFUNC) MACROFUNC(4)
|
||||
#define BOOST_MOVE_ITERATE_5TO5(MACROFUNC) MACROFUNC(5)
|
||||
#define BOOST_MOVE_ITERATE_6TO6(MACROFUNC) MACROFUNC(6)
|
||||
#define BOOST_MOVE_ITERATE_7TO7(MACROFUNC) MACROFUNC(7)
|
||||
#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
|
||||
//# define BOOST_MOVE_CAT_I(a, b) BOOST_MOVE_CAT_II(~, a ## b)
|
||||
//# define BOOST_MOVE_CAT_II(p, res) res
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_FWD_MACROS_HPP
|
||||
59
include/boost/move/detail/iterator_to_raw_pointer.hpp
Normal file
59
include/boost/move/detail/iterator_to_raw_pointer.hpp
Normal file
@@ -0,0 +1,59 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef BOOST_MOVE_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
|
||||
#define BOOST_MOVE_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/iterator_traits.hpp>
|
||||
#include <boost/move/detail/to_raw_pointer.hpp>
|
||||
#include <boost/move/detail/pointer_element.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace movelib {
|
||||
namespace detail {
|
||||
|
||||
template <class T>
|
||||
BOOST_MOVE_FORCEINLINE T* iterator_to_pointer(T* i)
|
||||
{ return i; }
|
||||
|
||||
template <class Iterator>
|
||||
inline typename boost::movelib::iterator_traits<Iterator>::pointer
|
||||
iterator_to_pointer(const Iterator &i)
|
||||
{ return i.operator->(); }
|
||||
|
||||
template <class Iterator>
|
||||
struct iterator_to_element_ptr
|
||||
{
|
||||
typedef typename boost::movelib::iterator_traits<Iterator>::pointer pointer;
|
||||
typedef typename boost::movelib::pointer_element<pointer>::type element_type;
|
||||
typedef element_type* type;
|
||||
};
|
||||
|
||||
} //namespace detail {
|
||||
|
||||
template <class Iterator>
|
||||
inline typename boost::movelib::detail::iterator_to_element_ptr<Iterator>::type
|
||||
iterator_to_raw_pointer(const Iterator &i)
|
||||
{
|
||||
return ::boost::movelib::to_raw_pointer
|
||||
( ::boost::movelib::detail::iterator_to_pointer(i) );
|
||||
}
|
||||
|
||||
} //namespace movelib {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_ITERATOR_TO_RAW_POINTER_HPP
|
||||
177
include/boost/move/detail/iterator_traits.hpp
Normal file
177
include/boost/move/detail/iterator_traits.hpp
Normal file
@@ -0,0 +1,177 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014.
|
||||
// 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_DETAIL_ITERATOR_TRAITS_HPP
|
||||
#define BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#if (BOOST_CXX_VERSION > 201703L) && defined(__cpp_lib_concepts)
|
||||
|
||||
#include <iterator>
|
||||
|
||||
#define BOOST_MOVE_CONTIGUOUS_ITERATOR_TAG
|
||||
|
||||
namespace boost {
|
||||
namespace movelib {
|
||||
|
||||
using std::iterator_traits;
|
||||
|
||||
template<class T>
|
||||
struct iter_difference
|
||||
{
|
||||
typedef typename std::iterator_traits<T>::difference_type type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct iter_value
|
||||
{
|
||||
typedef typename std::iterator_traits<T>::value_type type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct iter_category
|
||||
{
|
||||
typedef typename std::iterator_traits<T>::iterator_category type;
|
||||
};
|
||||
|
||||
}} //namespace boost::movelib
|
||||
|
||||
#else
|
||||
|
||||
#include <cstddef>
|
||||
#include <boost/move/detail/type_traits.hpp>
|
||||
|
||||
#include <boost/move/detail/std_ns_begin.hpp>
|
||||
|
||||
BOOST_MOVE_STD_NS_BEG
|
||||
|
||||
struct input_iterator_tag;
|
||||
struct forward_iterator_tag;
|
||||
struct bidirectional_iterator_tag;
|
||||
struct random_access_iterator_tag;
|
||||
struct output_iterator_tag;
|
||||
|
||||
#if ( (defined(BOOST_GNU_STDLIB) && (__cplusplus > 201703L))\
|
||||
|| (defined(_LIBCPP_VERSION) && (_LIBCPP_STD_VER > 17))\
|
||||
|| (defined(_YVALS) && defined(_CPPLIB_VER) && defined(__cpp_lib_concepts))\
|
||||
|| (__cplusplus >= 202002L)\
|
||||
)
|
||||
# define BOOST_MOVE_CONTIGUOUS_ITERATOR_TAG
|
||||
struct contiguous_iterator_tag;
|
||||
|
||||
#endif
|
||||
|
||||
BOOST_MOVE_STD_NS_END
|
||||
|
||||
#include <boost/move/detail/std_ns_end.hpp>
|
||||
|
||||
namespace boost{ namespace movelib{
|
||||
|
||||
template<class T>
|
||||
struct iter_difference
|
||||
{
|
||||
typedef typename T::difference_type type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct iter_difference<T*>
|
||||
{
|
||||
typedef std::ptrdiff_t type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct iter_value
|
||||
{
|
||||
typedef typename T::value_type type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct iter_value<T*>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct iter_value<const T*>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct iter_category
|
||||
{
|
||||
typedef typename T::iterator_category type;
|
||||
};
|
||||
|
||||
|
||||
template<class T>
|
||||
struct iter_category<T*>
|
||||
{
|
||||
typedef std::random_access_iterator_tag type;
|
||||
};
|
||||
|
||||
template<class Iterator>
|
||||
struct iterator_traits
|
||||
{
|
||||
typedef typename iter_difference<Iterator>::type difference_type;
|
||||
typedef typename iter_value<Iterator>::type value_type;
|
||||
typedef typename Iterator::pointer pointer;
|
||||
typedef typename Iterator::reference reference;
|
||||
typedef typename iter_category<Iterator>::type iterator_category;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct iterator_traits<T*>
|
||||
{
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef T value_type;
|
||||
typedef T* pointer;
|
||||
typedef T& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct iterator_traits<const T*>
|
||||
{
|
||||
typedef std::ptrdiff_t difference_type;
|
||||
typedef T value_type;
|
||||
typedef const T* pointer;
|
||||
typedef const T& reference;
|
||||
typedef std::random_access_iterator_tag iterator_category;
|
||||
};
|
||||
|
||||
}} //namespace boost::movelib
|
||||
|
||||
#endif //
|
||||
|
||||
#include <boost/move/detail/type_traits.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace movelib {
|
||||
|
||||
template<class T>
|
||||
struct iter_size
|
||||
: boost::move_detail::
|
||||
make_unsigned<typename iter_difference<T>::type >
|
||||
{};
|
||||
|
||||
}} //namespace boost move_detail {
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_ITERATOR_TRAITS_HPP
|
||||
53
include/boost/move/detail/launder.hpp
Normal file
53
include/boost/move/detail/launder.hpp
Normal file
@@ -0,0 +1,53 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-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/container for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
#ifndef BOOST_MOVE_DETAIL_LAUNDER_HPP
|
||||
#define BOOST_MOVE_DETAIL_LAUNDER_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/workaround.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
#if defined(BOOST_MOVE_HAS_BUILTIN_LAUNDER)
|
||||
|
||||
template<class T>
|
||||
BOOST_MOVE_FORCEINLINE T* launder(T* p)
|
||||
{
|
||||
return __builtin_launder( p );
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
template<class T>
|
||||
BOOST_MOVE_FORCEINLINE T* launder(T* p)
|
||||
{
|
||||
return p;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
template<class T>
|
||||
BOOST_MOVE_FORCEINLINE T launder_cast(const volatile void* p)
|
||||
{
|
||||
return (launder)(static_cast<T>(const_cast<void*>(p)));
|
||||
}
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_LAUNDER_HPP
|
||||
544
include/boost/move/detail/meta_utils.hpp
Normal file
544
include/boost/move/detail/meta_utils.hpp
Normal file
@@ -0,0 +1,544 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2012-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.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
|
||||
#define BOOST_MOVE_DETAIL_META_UTILS_HPP
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/detail/workaround.hpp> //forceinline
|
||||
#include <boost/move/detail/meta_utils_core.hpp>
|
||||
#include <boost/move/detail/addressof.hpp>
|
||||
|
||||
//Small meta-typetraits to support move
|
||||
|
||||
namespace boost {
|
||||
|
||||
//Forward declare boost::rv
|
||||
template <class T> class rv;
|
||||
|
||||
namespace move_detail {
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_different
|
||||
//////////////////////////////////////
|
||||
template<class T, class U>
|
||||
struct is_different
|
||||
{
|
||||
static const bool value = !is_same<T, U>::value;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// apply
|
||||
//////////////////////////////////////
|
||||
template<class F, class Param>
|
||||
struct apply
|
||||
{
|
||||
typedef typename F::template apply<Param>::type type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// bool_
|
||||
//////////////////////////////////////
|
||||
|
||||
template< bool C_ >
|
||||
struct bool_ : integral_constant<bool, C_>
|
||||
{
|
||||
inline operator bool() const { return C_; }
|
||||
inline bool operator()() const { return C_; }
|
||||
};
|
||||
|
||||
typedef bool_<true> true_;
|
||||
typedef bool_<false> false_;
|
||||
|
||||
//////////////////////////////////////
|
||||
// nat
|
||||
//////////////////////////////////////
|
||||
struct nat{};
|
||||
struct nat2{};
|
||||
struct nat3{};
|
||||
|
||||
template <unsigned N>
|
||||
struct natN
|
||||
{};
|
||||
|
||||
//////////////////////////////////////
|
||||
// yes_type/no_type
|
||||
//////////////////////////////////////
|
||||
typedef char yes_type;
|
||||
|
||||
struct no_type
|
||||
{
|
||||
char _[2];
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// natify
|
||||
//////////////////////////////////////
|
||||
template <class T> struct natify{};
|
||||
|
||||
//////////////////////////////////////
|
||||
// remove_reference
|
||||
//////////////////////////////////////
|
||||
template<class T>
|
||||
struct remove_reference
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_reference<T&>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
template<class T>
|
||||
struct remove_reference<T&&>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template<class T>
|
||||
struct remove_reference< rv<T> >
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_reference< rv<T> &>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_reference< const rv<T> &>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////
|
||||
// remove_pointer
|
||||
//////////////////////////////////////
|
||||
|
||||
template< class T > struct remove_pointer { typedef T type; };
|
||||
template< class T > struct remove_pointer<T*> { typedef T type; };
|
||||
template< class T > struct remove_pointer<T* const> { typedef T type; };
|
||||
template< class T > struct remove_pointer<T* volatile> { typedef T type; };
|
||||
template< class T > struct remove_pointer<T* const volatile> { typedef T type; };
|
||||
|
||||
//////////////////////////////////////
|
||||
// add_pointer
|
||||
//////////////////////////////////////
|
||||
template< class T >
|
||||
struct add_pointer
|
||||
{
|
||||
typedef typename remove_reference<T>::type* type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// add_const
|
||||
//////////////////////////////////////
|
||||
template<class T>
|
||||
struct add_const
|
||||
{
|
||||
typedef const T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct add_const<T&>
|
||||
{
|
||||
typedef const T& type;
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
template<class T>
|
||||
struct add_const<T&&>
|
||||
{
|
||||
typedef T&& type;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////
|
||||
// add_lvalue_reference
|
||||
//////////////////////////////////////
|
||||
template<class T>
|
||||
struct add_lvalue_reference
|
||||
{ typedef T& type; };
|
||||
|
||||
template<class T> struct add_lvalue_reference<T&> { typedef T& type; };
|
||||
template<> struct add_lvalue_reference<void> { typedef void type; };
|
||||
template<> struct add_lvalue_reference<const void> { typedef const void type; };
|
||||
template<> struct add_lvalue_reference<volatile void> { typedef volatile void type; };
|
||||
template<> struct add_lvalue_reference<const volatile void>{ typedef const volatile void type; };
|
||||
|
||||
template<class T>
|
||||
struct add_const_lvalue_reference
|
||||
{
|
||||
typedef typename remove_reference<T>::type t_unreferenced;
|
||||
typedef typename add_const<t_unreferenced>::type t_unreferenced_const;
|
||||
typedef typename add_lvalue_reference
|
||||
<t_unreferenced_const>::type type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// identity
|
||||
//////////////////////////////////////
|
||||
template <class T>
|
||||
struct identity
|
||||
{
|
||||
typedef T type;
|
||||
typedef typename add_const_lvalue_reference<T>::type reference;
|
||||
BOOST_MOVE_FORCEINLINE reference operator()(reference t) const
|
||||
{ return t; }
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_class_or_union
|
||||
//////////////////////////////////////
|
||||
template<class T>
|
||||
struct is_class_or_union
|
||||
{
|
||||
struct twochar { char dummy[2]; };
|
||||
template <class U>
|
||||
static char is_class_or_union_tester(void(U::*)(void));
|
||||
template <class U>
|
||||
static twochar is_class_or_union_tester(...);
|
||||
static const bool value = sizeof(is_class_or_union_tester<T>(0)) == sizeof(char);
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// addressof
|
||||
//////////////////////////////////////
|
||||
|
||||
|
||||
//////////////////////////////////////
|
||||
// has_pointer_type
|
||||
//////////////////////////////////////
|
||||
template <class T>
|
||||
struct has_pointer_type
|
||||
{
|
||||
struct two { char c[2]; };
|
||||
template <class U> static two test(...);
|
||||
template <class U> static char test(typename U::pointer* = 0);
|
||||
static const bool value = sizeof(test<T>(0)) == 1;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_convertible
|
||||
//////////////////////////////////////
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
|
||||
//use intrinsic since in MSVC
|
||||
//overaligned types can't go through ellipsis
|
||||
template <class T, class U>
|
||||
struct is_convertible
|
||||
{
|
||||
static const bool value = __is_convertible_to(T, U);
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template <class T, class U>
|
||||
class is_convertible
|
||||
{
|
||||
typedef typename add_lvalue_reference<T>::type t_reference;
|
||||
typedef char true_t;
|
||||
class false_t { char dummy[2]; };
|
||||
static false_t dispatch(...);
|
||||
static true_t dispatch(U);
|
||||
static t_reference trigger();
|
||||
public:
|
||||
static const bool value = sizeof(dispatch(trigger())) == sizeof(true_t);
|
||||
};
|
||||
|
||||
#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
|
||||
, typename F2
|
||||
>
|
||||
struct eval_if_c
|
||||
: if_c<C,F1,F2>::type
|
||||
{};
|
||||
|
||||
template<
|
||||
typename C
|
||||
, typename T1
|
||||
, typename T2
|
||||
>
|
||||
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>
|
||||
{};
|
||||
|
||||
template<class T, class U, class R = void>
|
||||
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_
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
template<bool, class B = true_, class C = true_, class D = true_>
|
||||
struct and_impl
|
||||
: and_impl<B::value, C, D>
|
||||
{};
|
||||
|
||||
template<>
|
||||
struct and_impl<true, true_, true_, true_>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template<class B, class C, class D>
|
||||
struct and_impl<false, B, C, D>
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template<class A, class B, class C = true_, class D = true_>
|
||||
struct and_
|
||||
: and_impl<A::value, B, C, D>
|
||||
{};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// or_
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
template<bool, class B = false_, class C = false_, class D = false_>
|
||||
struct or_impl
|
||||
: or_impl<B::value, C, D>
|
||||
{};
|
||||
|
||||
template<>
|
||||
struct or_impl<false, false_, false_, false_>
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template<class B, class C, class D>
|
||||
struct or_impl<true, B, C, D>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template<class A, class B, class C = false_, class D = false_>
|
||||
struct or_
|
||||
: or_impl<A::value, B, C, D>
|
||||
{};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// not_
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
template<class T>
|
||||
struct not_
|
||||
{
|
||||
static const bool value = !T::value;
|
||||
};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// enable_if_and / disable_if_and / enable_if_or / disable_if_or
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template<class R, class A, class B, class C = true_, class D = true_>
|
||||
struct enable_if_and
|
||||
: enable_if_c< and_<A, B, C, D>::value, R>
|
||||
{};
|
||||
|
||||
template<class R, class A, class B, class C = true_, class D = true_>
|
||||
struct disable_if_and
|
||||
: disable_if_c< and_<A, B, C, D>::value, R>
|
||||
{};
|
||||
|
||||
template<class R, class A, class B, class C = false_, class D = false_>
|
||||
struct enable_if_or
|
||||
: enable_if_c< or_<A, B, C, D>::value, R>
|
||||
{};
|
||||
|
||||
template<class R, class A, class B, class C = false_, class D = false_>
|
||||
struct disable_if_or
|
||||
: disable_if_c< or_<A, B, C, D>::value, R>
|
||||
{};
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// has_move_emulation_enabled_impl
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
template<class T>
|
||||
struct has_move_emulation_enabled_impl
|
||||
: is_convertible< T, ::boost::rv<T>& >
|
||||
{};
|
||||
|
||||
template<class T>
|
||||
struct has_move_emulation_enabled_impl<T&>
|
||||
{ static const bool value = false; };
|
||||
|
||||
template<class T>
|
||||
struct has_move_emulation_enabled_impl< ::boost::rv<T> >
|
||||
{ static const bool value = false; };
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// is_rv_impl
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
template <class T>
|
||||
struct is_rv_impl
|
||||
{ static const bool value = false; };
|
||||
|
||||
template <class T>
|
||||
struct is_rv_impl< rv<T> >
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <class T>
|
||||
struct is_rv_impl< const rv<T> >
|
||||
{ static const bool value = true; };
|
||||
|
||||
// Code from Jeffrey Lee Hellrung, many thanks
|
||||
|
||||
template< class T >
|
||||
struct is_rvalue_reference
|
||||
{ static const bool value = false; };
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
template< class T >
|
||||
struct is_rvalue_reference< T&& >
|
||||
{ static const bool value = true; };
|
||||
|
||||
#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
template< class T >
|
||||
struct is_rvalue_reference< boost::rv<T>& >
|
||||
{ static const bool value = true; };
|
||||
|
||||
template< class T >
|
||||
struct is_rvalue_reference< const boost::rv<T>& >
|
||||
{ static const bool value = true; };
|
||||
|
||||
#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
template< class T >
|
||||
struct add_rvalue_reference
|
||||
{ typedef T&& type; };
|
||||
|
||||
#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
namespace detail_add_rvalue_reference
|
||||
{
|
||||
template< class T
|
||||
, bool emulation = has_move_emulation_enabled_impl<T>::value
|
||||
, bool rv = is_rv_impl<T>::value >
|
||||
struct add_rvalue_reference_impl { typedef T type; };
|
||||
|
||||
template< class T, bool emulation>
|
||||
struct add_rvalue_reference_impl< T, emulation, true > { typedef T & type; };
|
||||
|
||||
template< class T, bool rv >
|
||||
struct add_rvalue_reference_impl< T, true, rv > { typedef ::boost::rv<T>& type; };
|
||||
} // namespace detail_add_rvalue_reference
|
||||
|
||||
template< class T >
|
||||
struct add_rvalue_reference
|
||||
: detail_add_rvalue_reference::add_rvalue_reference_impl<T>
|
||||
{ };
|
||||
|
||||
template< class T >
|
||||
struct add_rvalue_reference<T &>
|
||||
{ typedef T & type; };
|
||||
|
||||
#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
template< class T > struct remove_rvalue_reference { typedef T type; };
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template< class T > struct remove_rvalue_reference< T&& > { typedef T type; };
|
||||
#else // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
template< class T > struct remove_rvalue_reference< rv<T> > { typedef T type; };
|
||||
template< class T > struct remove_rvalue_reference< const rv<T> > { typedef T type; };
|
||||
template< class T > struct remove_rvalue_reference< volatile rv<T> > { typedef T type; };
|
||||
template< class T > struct remove_rvalue_reference< const volatile rv<T> > { typedef T type; };
|
||||
template< class T > struct remove_rvalue_reference< rv<T>& > { typedef T type; };
|
||||
template< class T > struct remove_rvalue_reference< const rv<T>& > { typedef T type; };
|
||||
template< class T > struct remove_rvalue_reference< volatile rv<T>& > { typedef T type; };
|
||||
template< class T > struct remove_rvalue_reference< const volatile rv<T>& >{ typedef T type; };
|
||||
#endif // #ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
// Ideas from Boost.Move review, Jeffrey Lee Hellrung:
|
||||
//
|
||||
//- TypeTraits metafunctions is_lvalue_reference, add_lvalue_reference, and remove_lvalue_reference ?
|
||||
// Perhaps add_reference and remove_reference can be modified so that they behave wrt emulated rvalue
|
||||
// references the same as wrt real rvalue references, i.e., add_reference< rv<T>& > -> T& rather than
|
||||
// rv<T>& (since T&& & -> T&).
|
||||
//
|
||||
//- Add'l TypeTraits has_[trivial_]move_{constructor,assign}...?
|
||||
//
|
||||
//- An as_lvalue(T& x) function, which amounts to an identity operation in C++0x, but strips emulated
|
||||
// rvalue references in C++03. This may be necessary to prevent "accidental moves".
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
|
||||
152
include/boost/move/detail/meta_utils_core.hpp
Normal file
152
include/boost/move/detail/meta_utils_core.hpp
Normal file
@@ -0,0 +1,152 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (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.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
//! \file
|
||||
|
||||
#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
|
||||
#define BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
//Small meta-typetraits to support move
|
||||
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
template<typename T>
|
||||
struct voider { typedef void type; };
|
||||
|
||||
//////////////////////////////////////
|
||||
// if_c
|
||||
//////////////////////////////////////
|
||||
template<bool C, typename T1, typename T2>
|
||||
struct if_c
|
||||
{
|
||||
typedef T1 type;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
struct if_c<false,T1,T2>
|
||||
{
|
||||
typedef T2 type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// if_
|
||||
//////////////////////////////////////
|
||||
template<typename T1, typename T2, typename T3>
|
||||
struct if_ : if_c<0 != T1::value, T2, T3>
|
||||
{};
|
||||
|
||||
//////////////////////////////////////
|
||||
// enable_if_c
|
||||
//////////////////////////////////////
|
||||
struct enable_if_nat{};
|
||||
|
||||
template <bool B, class T = enable_if_nat>
|
||||
struct enable_if_c
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template <class T>
|
||||
struct enable_if_c<false, T> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// enable_if
|
||||
//////////////////////////////////////
|
||||
template <class Cond, class T = enable_if_nat>
|
||||
struct enable_if : enable_if_c<Cond::value, T> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// disable_if_c
|
||||
//////////////////////////////////////
|
||||
template <bool B, class T = enable_if_nat>
|
||||
struct disable_if_c
|
||||
: enable_if_c<!B, T>
|
||||
{};
|
||||
|
||||
//////////////////////////////////////
|
||||
// disable_if
|
||||
//////////////////////////////////////
|
||||
template <class Cond, class T = enable_if_nat>
|
||||
struct disable_if : enable_if_c<!Cond::value, T> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// integral_constant
|
||||
//////////////////////////////////////
|
||||
template<class T, T v>
|
||||
struct integral_constant
|
||||
{
|
||||
static const T value = v;
|
||||
typedef T value_type;
|
||||
typedef integral_constant<T, v> type;
|
||||
|
||||
operator T() const { return value; }
|
||||
T operator()() const { return value; }
|
||||
};
|
||||
|
||||
typedef integral_constant<bool, true > true_type;
|
||||
typedef integral_constant<bool, false > false_type;
|
||||
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_same
|
||||
//////////////////////////////////////
|
||||
template<class T, class U>
|
||||
struct is_same
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// enable_if_same
|
||||
//////////////////////////////////////
|
||||
template <class T, class U, class R = enable_if_nat>
|
||||
struct enable_if_same : enable_if<is_same<T, U>, R> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// disable_if_same
|
||||
//////////////////////////////////////
|
||||
template <class T, class U, class R = enable_if_nat>
|
||||
struct disable_if_same : disable_if<is_same<T, U>, R> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_lvalue_reference
|
||||
//////////////////////////////////////
|
||||
template<class T>
|
||||
struct is_lvalue_reference
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_lvalue_reference<T&>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
} //namespace move_detail {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_CORE_HPP
|
||||
256
include/boost/move/detail/move_helpers.hpp
Normal file
256
include/boost/move/detail/move_helpers.hpp
Normal file
@@ -0,0 +1,256 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (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)
|
||||
//
|
||||
// See http://www.boost.org/libs/move for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_MOVE_MOVE_HELPERS_HPP
|
||||
#define BOOST_MOVE_MOVE_HELPERS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <boost/move/core.hpp>
|
||||
#include <boost/move/utility_core.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<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<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 &
|
||||
#define BOOST_MOVE_CATCH_RVALUE(U) U &&
|
||||
#define BOOST_MOVE_CATCH_FWD(U) U &&
|
||||
#endif
|
||||
|
||||
////////////////////////////////////////
|
||||
//
|
||||
// BOOST_MOVE_CONVERSION_AWARE_CATCH
|
||||
//
|
||||
////////////////////////////////////////
|
||||
|
||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
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)\
|
||||
inline RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
inline RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(::boost::move(x)); }\
|
||||
\
|
||||
inline 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>\
|
||||
inline 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>\
|
||||
inline 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>\
|
||||
inline 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>\
|
||||
inline 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)\
|
||||
inline RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
inline RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(::boost::move(x)); }\
|
||||
\
|
||||
template<class BOOST_MOVE_TEMPL_PARAM>\
|
||||
inline 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)\
|
||||
inline RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(x); }\
|
||||
\
|
||||
inline 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)\
|
||||
inline RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
inline RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(arg1, ::boost::move(x)); }\
|
||||
\
|
||||
inline 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>\
|
||||
inline 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>\
|
||||
inline 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>\
|
||||
inline 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>\
|
||||
inline 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)\
|
||||
inline RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
inline 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>\
|
||||
inline 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)\
|
||||
inline RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\
|
||||
{ return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\
|
||||
\
|
||||
inline RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
|
||||
{ return FWD_FUNCTION(arg1, ::boost::move(x)); }\
|
||||
//
|
||||
|
||||
#endif
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_MOVE_HELPERS_HPP
|
||||
268
include/boost/move/detail/nsec_clock.hpp
Normal file
268
include/boost/move/detail/nsec_clock.hpp
Normal file
@@ -0,0 +1,268 @@
|
||||
// This code is based on Timer and Chrono code. Thanks to authors:
|
||||
//
|
||||
// Boost.Timer:
|
||||
// Copyright Beman Dawes 1994-2007, 2011
|
||||
//
|
||||
// Boost.Chrono:
|
||||
// Copyright Beman Dawes 2008
|
||||
// Copyright 2009-2010 Vicente J. Botet Escriba
|
||||
//
|
||||
// Simplified and modified to be able to support exceptionless (-fno-exceptions).
|
||||
// Boost.Timer depends on Boost.Chorno wich uses boost::throw_exception.
|
||||
// And Boost.Chrono DLLs don't build in Win32 as there is no
|
||||
// boost::throw_exception(std::exception const&) implementation
|
||||
// in Boost.Chrono:
|
||||
//
|
||||
// Copyright 2020 Ion Gaztanaga
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
// See http://www.boost.org/LICENSE_1_0.txt
|
||||
|
||||
//----------------------------------------------------------------------------//
|
||||
// Windows //
|
||||
//----------------------------------------------------------------------------//
|
||||
#ifndef BOOST_MOVE_DETAIL_NSEC_CLOCK_HPP
|
||||
#define BOOST_MOVE_DETAIL_NSEC_CLOCK_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
#include <boost/cstdint.hpp>
|
||||
#include <boost/move/detail/workaround.hpp>
|
||||
#include <cstdlib>
|
||||
|
||||
|
||||
# if (defined(_WIN32) || defined(__WIN32__) || defined(WIN32))
|
||||
# define BOOST_MOVE_DETAIL_WINDOWS_API
|
||||
# elif defined(macintosh) || defined(__APPLE__) || defined(__APPLE_CC__)
|
||||
# define BOOST_MOVE_DETAIL_MAC_API
|
||||
# else
|
||||
# define BOOST_MOVE_DETAIL_POSIX_API
|
||||
# endif
|
||||
|
||||
#if defined(BOOST_MOVE_DETAIL_WINDOWS_API)
|
||||
|
||||
#include <cassert>
|
||||
|
||||
#if defined( BOOST_USE_WINDOWS_H )
|
||||
#include <windows.h>
|
||||
#else
|
||||
|
||||
#if defined (WIN32_PLATFORM_PSPC)
|
||||
#define BOOST_MOVE_WINAPI_IMPORT BOOST_SYMBOL_IMPORT
|
||||
#define BOOST_MOVE_WINAPI_IMPORT_EXCEPT_WM
|
||||
#elif defined (_WIN32_WCE)
|
||||
#define BOOST_MOVE_WINAPI_IMPORT
|
||||
#define BOOST_MOVE_WINAPI_IMPORT_EXCEPT_WM
|
||||
#else
|
||||
#define BOOST_MOVE_WINAPI_IMPORT BOOST_SYMBOL_IMPORT
|
||||
#define BOOST_MOVE_WINAPI_IMPORT_EXCEPT_WM BOOST_SYMBOL_IMPORT
|
||||
#endif
|
||||
|
||||
#if defined(WINAPI)
|
||||
#define BOOST_MOVE_WINAPI_CC WINAPI
|
||||
#else
|
||||
#if defined(_M_IX86) || defined(__i386__)
|
||||
#define BOOST_MOVE_WINAPI_CC __stdcall
|
||||
#else
|
||||
// On architectures other than 32-bit x86 __stdcall is ignored. Clang also issues a warning.
|
||||
#define BOOST_MOVE_WINAPI_CC
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
extern "C" {
|
||||
|
||||
union _LARGE_INTEGER;
|
||||
typedef long long QuadPart;
|
||||
|
||||
BOOST_MOVE_WINAPI_IMPORT_EXCEPT_WM int BOOST_MOVE_WINAPI_CC
|
||||
QueryPerformanceCounter(::_LARGE_INTEGER* lpPerformanceCount);
|
||||
|
||||
BOOST_MOVE_WINAPI_IMPORT_EXCEPT_WM int BOOST_MOVE_WINAPI_CC
|
||||
QueryPerformanceFrequency(::_LARGE_INTEGER* lpFrequency);
|
||||
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
||||
|
||||
namespace boost { namespace move_detail {
|
||||
|
||||
BOOST_FORCEINLINE int QueryPerformanceCounter(long long* lpPerformanceCount)
|
||||
{
|
||||
return ::QueryPerformanceCounter(reinterpret_cast< ::_LARGE_INTEGER* >(lpPerformanceCount));
|
||||
}
|
||||
|
||||
BOOST_FORCEINLINE int QueryPerformanceFrequency(long long* lpFrequency)
|
||||
{
|
||||
return ::QueryPerformanceFrequency(reinterpret_cast< ::_LARGE_INTEGER* >(lpFrequency));
|
||||
}
|
||||
|
||||
|
||||
template<int Dummy>
|
||||
struct QPFHolder
|
||||
{
|
||||
static inline double get_nsec_per_tic()
|
||||
{
|
||||
long long freq;
|
||||
//According to MS documentation:
|
||||
//"On systems that run Windows XP or later, the function will always succeed and will thus never return zero"
|
||||
(void)boost::move_detail::QueryPerformanceFrequency(&freq);
|
||||
return double(1000000000.0L / double(freq));
|
||||
}
|
||||
|
||||
static const double nanosecs_per_tic;
|
||||
};
|
||||
|
||||
template<int Dummy>
|
||||
const double QPFHolder<Dummy>::nanosecs_per_tic = get_nsec_per_tic();
|
||||
|
||||
inline boost::uint64_t nsec_clock() BOOST_NOEXCEPT
|
||||
{
|
||||
double nanosecs_per_tic = QPFHolder<0>::nanosecs_per_tic;
|
||||
|
||||
long long pcount;
|
||||
//According to MS documentation:
|
||||
//"On systems that run Windows XP or later, the function will always succeed and will thus never return zero"
|
||||
(void)boost::move_detail::QueryPerformanceCounter( &pcount );
|
||||
return static_cast<boost::uint64_t>(nanosecs_per_tic * double(pcount));
|
||||
}
|
||||
|
||||
}} //namespace boost { namespace move_detail {
|
||||
|
||||
#elif defined(BOOST_MOVE_DETAIL_MAC_API)
|
||||
|
||||
#include <mach/mach_time.h> // mach_absolute_time, mach_timebase_info_data_t
|
||||
|
||||
inline boost::uint64_t nsec_clock() BOOST_NOEXCEPT
|
||||
{
|
||||
boost::uint64_t count = ::mach_absolute_time();
|
||||
|
||||
mach_timebase_info_data_t info;
|
||||
mach_timebase_info(&info);
|
||||
return static_cast<boost::uint64_t>
|
||||
( static_cast<double>(count)*(static_cast<double>(info.numer) / info.denom) );
|
||||
}
|
||||
|
||||
#elif defined(BOOST_MOVE_DETAIL_POSIX_API)
|
||||
|
||||
#include <time.h>
|
||||
|
||||
# if defined(CLOCK_MONOTONIC_PRECISE) //BSD
|
||||
# define BOOST_MOVE_DETAIL_CLOCK_MONOTONIC CLOCK_MONOTONIC_PRECISE
|
||||
# elif defined(CLOCK_MONOTONIC_RAW) //Linux
|
||||
# define BOOST_MOVE_DETAIL_CLOCK_MONOTONIC CLOCK_MONOTONIC_RAW
|
||||
# elif defined(CLOCK_HIGHRES) //Solaris
|
||||
# define BOOST_MOVE_DETAIL_CLOCK_MONOTONIC CLOCK_HIGHRES
|
||||
# elif defined(CLOCK_MONOTONIC) //POSIX (AIX, BSD, Linux, Solaris)
|
||||
# define BOOST_MOVE_DETAIL_CLOCK_MONOTONIC CLOCK_MONOTONIC
|
||||
# else
|
||||
# error "No high resolution steady clock in your system, please provide a patch"
|
||||
# endif
|
||||
|
||||
inline boost::uint64_t nsec_clock() BOOST_NOEXCEPT
|
||||
{
|
||||
struct timespec count;
|
||||
::clock_gettime(BOOST_MOVE_DETAIL_CLOCK_MONOTONIC, &count);
|
||||
boost::uint64_t r = static_cast<boost::uint64_t>(count.tv_sec);
|
||||
r *= 1000000000U;
|
||||
r += static_cast<boost::uint64_t>(count.tv_nsec);
|
||||
return r;
|
||||
}
|
||||
|
||||
#endif // POSIX
|
||||
|
||||
namespace boost { namespace move_detail {
|
||||
|
||||
typedef boost::uint64_t nanosecond_type;
|
||||
|
||||
struct cpu_times
|
||||
{
|
||||
nanosecond_type wall;
|
||||
nanosecond_type user;
|
||||
nanosecond_type system;
|
||||
|
||||
void clear() { wall = user = system = 0; }
|
||||
|
||||
cpu_times()
|
||||
{ this->clear(); }
|
||||
};
|
||||
|
||||
|
||||
inline void get_cpu_times(boost::move_detail::cpu_times& current)
|
||||
{
|
||||
current.wall = nsec_clock();
|
||||
}
|
||||
|
||||
|
||||
class cpu_timer
|
||||
{
|
||||
public:
|
||||
|
||||
// constructor
|
||||
cpu_timer() BOOST_NOEXCEPT { start(); }
|
||||
|
||||
// observers
|
||||
bool is_stopped() const BOOST_NOEXCEPT { return m_is_stopped; }
|
||||
cpu_times elapsed() const BOOST_NOEXCEPT; // does not stop()
|
||||
|
||||
// actions
|
||||
void start() BOOST_NOEXCEPT;
|
||||
void stop() BOOST_NOEXCEPT;
|
||||
void resume() BOOST_NOEXCEPT;
|
||||
|
||||
private:
|
||||
cpu_times m_times;
|
||||
bool m_is_stopped;
|
||||
};
|
||||
|
||||
|
||||
// cpu_timer ---------------------------------------------------------------------//
|
||||
|
||||
inline void cpu_timer::start() BOOST_NOEXCEPT
|
||||
{
|
||||
m_is_stopped = false;
|
||||
get_cpu_times(m_times);
|
||||
}
|
||||
|
||||
inline void cpu_timer::stop() BOOST_NOEXCEPT
|
||||
{
|
||||
if (is_stopped())
|
||||
return;
|
||||
m_is_stopped = true;
|
||||
|
||||
cpu_times current;
|
||||
get_cpu_times(current);
|
||||
m_times.wall = (current.wall - m_times.wall);
|
||||
m_times.user = (current.user - m_times.user);
|
||||
m_times.system = (current.system - m_times.system);
|
||||
}
|
||||
|
||||
inline cpu_times cpu_timer::elapsed() const BOOST_NOEXCEPT
|
||||
{
|
||||
if (is_stopped())
|
||||
return m_times;
|
||||
cpu_times current;
|
||||
get_cpu_times(current);
|
||||
current.wall -= m_times.wall;
|
||||
current.user -= m_times.user;
|
||||
current.system -= m_times.system;
|
||||
return current;
|
||||
}
|
||||
|
||||
inline void cpu_timer::resume() BOOST_NOEXCEPT
|
||||
{
|
||||
if (is_stopped())
|
||||
{
|
||||
cpu_times current (m_times);
|
||||
start();
|
||||
m_times.wall -= current.wall;
|
||||
m_times.user -= current.user;
|
||||
m_times.system -= current.system;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
} // namespace move_detail
|
||||
} // namespace boost
|
||||
|
||||
#endif //BOOST_MOVE_DETAIL_NSEC_CLOCK_HPP
|
||||
32
include/boost/move/detail/placement_new.hpp
Normal file
32
include/boost/move/detail/placement_new.hpp
Normal file
@@ -0,0 +1,32 @@
|
||||
#ifndef BOOST_MOVE_DETAIL_PLACEMENT_NEW_HPP
|
||||
#define BOOST_MOVE_DETAIL_PLACEMENT_NEW_HPP
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-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/container for documentation.
|
||||
//
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <cstddef>
|
||||
|
||||
struct boost_move_new_t{};
|
||||
|
||||
//avoid including <new>
|
||||
inline void *operator new(std::size_t, void *p, boost_move_new_t)
|
||||
{ return p; }
|
||||
|
||||
inline void operator delete(void *, void *, boost_move_new_t)
|
||||
{}
|
||||
|
||||
#endif //BOOST_MOVE_DETAIL_PLACEMENT_NEW_HPP
|
||||
168
include/boost/move/detail/pointer_element.hpp
Normal file
168
include/boost/move/detail/pointer_element.hpp
Normal file
@@ -0,0 +1,168 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2017. 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.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_MOVE_DETAIL_POINTER_ELEMENT_HPP
|
||||
#define BOOST_MOVE_DETAIL_POINTER_ELEMENT_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP
|
||||
#include <boost/move/detail/workaround.hpp>
|
||||
#endif //BOOST_MOVE_DETAIL_WORKAROUND_HPP
|
||||
|
||||
namespace boost {
|
||||
namespace movelib {
|
||||
namespace detail{
|
||||
|
||||
//////////////////////
|
||||
//struct first_param
|
||||
//////////////////////
|
||||
|
||||
template <typename T> struct first_param
|
||||
{ typedef void type; };
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template <template <typename, typename...> class TemplateClass, typename T, typename... Args>
|
||||
struct first_param< TemplateClass<T, Args...> >
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#else //C++03 compilers
|
||||
|
||||
template < template //0arg
|
||||
<class
|
||||
> class TemplateClass, class T
|
||||
>
|
||||
struct first_param
|
||||
< TemplateClass<T> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //1arg
|
||||
<class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //2arg
|
||||
<class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //3arg
|
||||
<class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //4arg
|
||||
<class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //5arg
|
||||
<class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //6arg
|
||||
<class,class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4, class P5>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4, P5> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //7arg
|
||||
<class,class,class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4, class P5, class P6>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4, P5, P6> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //8arg
|
||||
<class,class,class,class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4, P5, P6, P7> >
|
||||
{ typedef T type; };
|
||||
|
||||
template < template //9arg
|
||||
<class,class,class,class,class,class,class,class,class,class
|
||||
> class TemplateClass, class T
|
||||
, class P0, class P1, class P2, class P3, class P4, class P5, class P6, class P7, class P8>
|
||||
struct first_param
|
||||
< TemplateClass<T, P0, P1, P2, P3, P4, P5, P6, P7, P8> >
|
||||
{ typedef T type; };
|
||||
|
||||
#endif //!defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
|
||||
template <typename T>
|
||||
struct has_internal_pointer_element
|
||||
{
|
||||
template <typename X>
|
||||
static char test(int, typename X::element_type*);
|
||||
|
||||
template <typename X>
|
||||
static int test(...);
|
||||
|
||||
static const bool value = (1 == sizeof(test<T>(0, 0)));
|
||||
};
|
||||
|
||||
template<class Ptr, bool = has_internal_pointer_element<Ptr>::value>
|
||||
struct pointer_element_impl
|
||||
{
|
||||
typedef typename Ptr::element_type type;
|
||||
};
|
||||
|
||||
template<class Ptr>
|
||||
struct pointer_element_impl<Ptr, false>
|
||||
{
|
||||
typedef typename boost::movelib::detail::first_param<Ptr>::type type;
|
||||
};
|
||||
|
||||
} //namespace detail{
|
||||
|
||||
template <typename Ptr>
|
||||
struct pointer_element
|
||||
{
|
||||
typedef typename ::boost::movelib::detail::pointer_element_impl<Ptr>::type type;
|
||||
};
|
||||
|
||||
template <typename T>
|
||||
struct pointer_element<T*>
|
||||
{ typedef T type; };
|
||||
|
||||
} //namespace movelib {
|
||||
} //namespace boost {
|
||||
|
||||
#endif // defined(BOOST_MOVE_DETAIL_POINTER_ELEMENT_HPP)
|
||||
178
include/boost/move/detail/reverse_iterator.hpp
Normal file
178
include/boost/move/detail/reverse_iterator.hpp
Normal file
@@ -0,0 +1,178 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_MOVE_DETAIL_REVERSE_ITERATOR_HPP
|
||||
#define BOOST_MOVE_DETAIL_REVERSE_ITERATOR_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/iterator_traits.hpp>
|
||||
#include <boost/move/detail/meta_utils.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace movelib {
|
||||
|
||||
template<class I>
|
||||
inline typename iterator_traits<I>::pointer iterator_arrow_result(const I &i)
|
||||
{ return i.operator->(); }
|
||||
|
||||
template<class T>
|
||||
BOOST_MOVE_FORCEINLINE T * iterator_arrow_result(T *p)
|
||||
{ return p; }
|
||||
|
||||
template<class It>
|
||||
class reverse_iterator
|
||||
{
|
||||
public:
|
||||
typedef typename boost::movelib::iterator_traits<It>::pointer pointer;
|
||||
typedef typename boost::movelib::iterator_traits<It>::reference reference;
|
||||
typedef typename boost::movelib::iterator_traits<It>::difference_type difference_type;
|
||||
typedef typename boost::movelib::iterator_traits<It>::iterator_category iterator_category;
|
||||
typedef typename boost::movelib::iterator_traits<It>::value_type value_type;
|
||||
|
||||
|
||||
typedef It iterator_type;
|
||||
|
||||
inline reverse_iterator()
|
||||
: m_current() //Value initialization to achieve "null iterators" (N3644)
|
||||
{}
|
||||
|
||||
inline explicit reverse_iterator(It r)
|
||||
: m_current(r)
|
||||
{}
|
||||
|
||||
inline reverse_iterator(const reverse_iterator& r)
|
||||
: m_current(r.base())
|
||||
{}
|
||||
|
||||
template<class OtherIt>
|
||||
inline
|
||||
reverse_iterator( const reverse_iterator<OtherIt>& r
|
||||
, typename boost::move_detail::enable_if_convertible<OtherIt, It>::type* =0
|
||||
)
|
||||
: m_current(r.base())
|
||||
{}
|
||||
|
||||
inline reverse_iterator & operator=( const reverse_iterator& r)
|
||||
{ m_current = r.base(); return *this; }
|
||||
|
||||
template<class OtherIt>
|
||||
inline typename boost::move_detail::enable_if_convertible<OtherIt, It, reverse_iterator &>::type
|
||||
operator=( const reverse_iterator<OtherIt>& r)
|
||||
{ m_current = r.base(); return *this; }
|
||||
|
||||
inline It base() const
|
||||
{ return m_current; }
|
||||
|
||||
inline reference operator*() const
|
||||
{
|
||||
It temp(m_current);
|
||||
--temp;
|
||||
reference r = *temp;
|
||||
return r;
|
||||
}
|
||||
|
||||
inline pointer operator->() const
|
||||
{
|
||||
It temp(m_current);
|
||||
--temp;
|
||||
return (iterator_arrow_result)(temp);
|
||||
}
|
||||
|
||||
inline reference operator[](difference_type off) const
|
||||
{
|
||||
return this->m_current[difference_type(-off - 1)];
|
||||
}
|
||||
|
||||
inline reverse_iterator& operator++()
|
||||
{
|
||||
--m_current;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline reverse_iterator operator++(int)
|
||||
{
|
||||
reverse_iterator temp((*this));
|
||||
--m_current;
|
||||
return temp;
|
||||
}
|
||||
|
||||
inline reverse_iterator& operator--()
|
||||
{
|
||||
++m_current;
|
||||
return *this;
|
||||
}
|
||||
|
||||
inline reverse_iterator operator--(int)
|
||||
{
|
||||
reverse_iterator temp((*this));
|
||||
++m_current;
|
||||
return temp;
|
||||
}
|
||||
|
||||
inline friend bool operator==(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return l.m_current == r.m_current; }
|
||||
|
||||
inline friend bool operator!=(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return l.m_current != r.m_current; }
|
||||
|
||||
inline friend bool operator<(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return l.m_current > r.m_current; }
|
||||
|
||||
inline friend bool operator<=(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return l.m_current >= r.m_current; }
|
||||
|
||||
inline friend bool operator>(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return l.m_current < r.m_current; }
|
||||
|
||||
inline friend bool operator>=(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return l.m_current <= r.m_current; }
|
||||
|
||||
inline reverse_iterator& operator+=(difference_type off)
|
||||
{ m_current -= off; return *this; }
|
||||
|
||||
inline reverse_iterator& operator-=(difference_type off)
|
||||
{ m_current += off; return *this; }
|
||||
|
||||
inline friend reverse_iterator operator+(reverse_iterator l, difference_type off)
|
||||
{ return (l += off); }
|
||||
|
||||
inline friend reverse_iterator operator+(difference_type off, reverse_iterator r)
|
||||
{ return (r += off); }
|
||||
|
||||
inline friend reverse_iterator operator-(reverse_iterator l, difference_type off)
|
||||
{ return (l-= off); }
|
||||
|
||||
inline friend difference_type operator-(const reverse_iterator& l, const reverse_iterator& r)
|
||||
{ return r.m_current - l.m_current; }
|
||||
|
||||
private:
|
||||
It m_current; // the wrapped iterator
|
||||
};
|
||||
|
||||
template< class Iterator >
|
||||
inline reverse_iterator<Iterator> make_reverse_iterator( Iterator i )
|
||||
{ return reverse_iterator<Iterator>(i); }
|
||||
|
||||
} //namespace movelib {
|
||||
} //namespace boost {
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_MOVE_DETAIL_REVERSE_ITERATOR_HPP
|
||||
40
include/boost/move/detail/std_ns_begin.hpp
Normal file
40
include/boost/move/detail/std_ns_begin.hpp
Normal file
@@ -0,0 +1,40 @@
|
||||
#//////////////////////////////////////////////////////////////////////////////
|
||||
#//
|
||||
#// (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.
|
||||
#//
|
||||
#//////////////////////////////////////////////////////////////////////////////
|
||||
#
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#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
|
||||
#elif defined(BOOST_DINKUMWARE_STDLIB)
|
||||
#define BOOST_MOVE_STD_NS_BEG _STD_BEGIN
|
||||
#define BOOST_MOVE_STD_NS_END _STD_END
|
||||
#else
|
||||
#define BOOST_MOVE_STD_NS_BEG namespace std {
|
||||
#define BOOST_MOVE_STD_NS_END }
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1915)
|
||||
#pragma warning (push)
|
||||
#pragma warning (disable : 4643) // Forward declaring 'X' in namespace std is not permitted by the C++ Standard
|
||||
#endif
|
||||
19
include/boost/move/detail/std_ns_end.hpp
Normal file
19
include/boost/move/detail/std_ns_end.hpp
Normal file
@@ -0,0 +1,19 @@
|
||||
#//////////////////////////////////////////////////////////////////////////////
|
||||
#//
|
||||
#// (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
|
||||
#elif defined(_MSC_VER) && (_MSC_VER >= 1915)
|
||||
#pragma warning (pop)
|
||||
#endif //BOOST_MOVE_STD_NS_GCC_DIAGNOSTIC_PUSH
|
||||
|
||||
#undef BOOST_MOVE_STD_NS_BEG
|
||||
#undef BOOST_MOVE_STD_NS_END
|
||||
45
include/boost/move/detail/to_raw_pointer.hpp
Normal file
45
include/boost/move/detail/to_raw_pointer.hpp
Normal file
@@ -0,0 +1,45 @@
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2017-2017
|
||||
//
|
||||
// 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.
|
||||
//
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_MOVE_DETAIL_TO_RAW_POINTER_HPP
|
||||
#define BOOST_MOVE_DETAIL_TO_RAW_POINTER_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>
|
||||
#include <boost/move/detail/pointer_element.hpp>
|
||||
|
||||
namespace boost {
|
||||
namespace movelib {
|
||||
|
||||
template <class T>
|
||||
BOOST_MOVE_FORCEINLINE T* to_raw_pointer(T* p)
|
||||
{ return p; }
|
||||
|
||||
template <class Pointer>
|
||||
inline typename boost::movelib::pointer_element<Pointer>::type*
|
||||
to_raw_pointer(const Pointer &p)
|
||||
{ return ::boost::movelib::to_raw_pointer(p.operator->()); }
|
||||
|
||||
} //namespace movelib
|
||||
} //namespace boost
|
||||
|
||||
#include <boost/move/detail/config_end.hpp>
|
||||
|
||||
#endif //BOOST_MOVE_DETAIL_TO_RAW_POINTER_HPP
|
||||
1357
include/boost/move/detail/type_traits.hpp
Normal file
1357
include/boost/move/detail/type_traits.hpp
Normal file
File diff suppressed because it is too large
Load Diff
565
include/boost/move/detail/unique_ptr_meta_utils.hpp
Normal file
565
include/boost/move/detail/unique_ptr_meta_utils.hpp
Normal file
@@ -0,0 +1,565 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2012-2012.
|
||||
// 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_UNIQUE_PTR_DETAIL_META_UTILS_HPP
|
||||
#define BOOST_MOVE_UNIQUE_PTR_DETAIL_META_UTILS_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#include <cstddef> //for std::size_t
|
||||
|
||||
//Small meta-typetraits to support move
|
||||
|
||||
namespace boost {
|
||||
|
||||
namespace movelib {
|
||||
|
||||
template <class T>
|
||||
struct default_delete;
|
||||
|
||||
} //namespace movelib {
|
||||
|
||||
#ifdef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
//Forward declare boost::rv
|
||||
template <class T> class rv;
|
||||
#endif
|
||||
|
||||
namespace move_upmu {
|
||||
|
||||
//////////////////////////////////////
|
||||
// nat
|
||||
//////////////////////////////////////
|
||||
struct nat{};
|
||||
|
||||
//////////////////////////////////////
|
||||
// natify
|
||||
//////////////////////////////////////
|
||||
template <class T> struct natify{};
|
||||
|
||||
//////////////////////////////////////
|
||||
// if_c
|
||||
//////////////////////////////////////
|
||||
template<bool C, typename T1, typename T2>
|
||||
struct if_c
|
||||
{
|
||||
typedef T1 type;
|
||||
};
|
||||
|
||||
template<typename T1, typename T2>
|
||||
struct if_c<false,T1,T2>
|
||||
{
|
||||
typedef T2 type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// if_
|
||||
//////////////////////////////////////
|
||||
template<typename T1, typename T2, typename T3>
|
||||
struct if_ : if_c<0 != T1::value, T2, T3>
|
||||
{};
|
||||
|
||||
//enable_if_
|
||||
template <bool B, class T = nat>
|
||||
struct enable_if_c
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// enable_if_c
|
||||
//////////////////////////////////////
|
||||
template <class T>
|
||||
struct enable_if_c<false, T> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// enable_if
|
||||
//////////////////////////////////////
|
||||
template <class Cond, class T = nat>
|
||||
struct enable_if : public enable_if_c<Cond::value, T> {};
|
||||
|
||||
//////////////////////////////////////
|
||||
// remove_reference
|
||||
//////////////////////////////////////
|
||||
template<class T>
|
||||
struct remove_reference
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_reference<T&>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
template<class T>
|
||||
struct remove_reference<T&&>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template<class T>
|
||||
struct remove_reference< rv<T> >
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_reference< rv<T> &>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_reference< const rv<T> &>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////
|
||||
// remove_const
|
||||
//////////////////////////////////////
|
||||
template< class T >
|
||||
struct remove_const
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template< class T >
|
||||
struct remove_const<const T>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// remove_volatile
|
||||
//////////////////////////////////////
|
||||
template< class T >
|
||||
struct remove_volatile
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template< class T >
|
||||
struct remove_volatile<volatile T>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// remove_cv
|
||||
//////////////////////////////////////
|
||||
template< class T >
|
||||
struct remove_cv
|
||||
{
|
||||
typedef typename remove_volatile
|
||||
<typename remove_const<T>::type>::type type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// remove_extent
|
||||
//////////////////////////////////////
|
||||
template<class T>
|
||||
struct remove_extent
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct remove_extent<T[]>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
template<class T, std::size_t N>
|
||||
struct remove_extent<T[N]>
|
||||
{
|
||||
typedef T type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// extent
|
||||
//////////////////////////////////////
|
||||
|
||||
template<class T, unsigned N = 0>
|
||||
struct extent
|
||||
{
|
||||
static const std::size_t value = 0;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct extent<T[], 0>
|
||||
{
|
||||
static const std::size_t value = 0;
|
||||
};
|
||||
|
||||
template<class T, unsigned N>
|
||||
struct extent<T[], N>
|
||||
{
|
||||
static const std::size_t value = extent<T, N-1>::value;
|
||||
};
|
||||
|
||||
template<class T, std::size_t N>
|
||||
struct extent<T[N], 0>
|
||||
{
|
||||
static const std::size_t value = N;
|
||||
};
|
||||
|
||||
template<class T, std::size_t I, unsigned N>
|
||||
struct extent<T[I], N>
|
||||
{
|
||||
static const std::size_t value = extent<T, N-1>::value;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// add_lvalue_reference
|
||||
//////////////////////////////////////
|
||||
template<class T>
|
||||
struct add_lvalue_reference
|
||||
{
|
||||
typedef T& type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct add_lvalue_reference<T&>
|
||||
{
|
||||
typedef T& type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct add_lvalue_reference<void>
|
||||
{
|
||||
typedef void type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct add_lvalue_reference<const void>
|
||||
{
|
||||
typedef const void type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct add_lvalue_reference<volatile void>
|
||||
{
|
||||
typedef volatile void type;
|
||||
};
|
||||
|
||||
template<>
|
||||
struct add_lvalue_reference<const volatile void>
|
||||
{
|
||||
typedef const volatile void type;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct add_const_lvalue_reference
|
||||
{
|
||||
typedef typename remove_reference<T>::type t_unreferenced;
|
||||
typedef const t_unreferenced t_unreferenced_const;
|
||||
typedef typename add_lvalue_reference
|
||||
<t_unreferenced_const>::type type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_same
|
||||
//////////////////////////////////////
|
||||
template<class T, class U>
|
||||
struct is_same
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_same<T, T>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_pointer
|
||||
//////////////////////////////////////
|
||||
template< class T >
|
||||
struct is_pointer
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template< class T >
|
||||
struct is_pointer<T*>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_reference
|
||||
//////////////////////////////////////
|
||||
template< class T >
|
||||
struct is_reference
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template< class T >
|
||||
struct is_reference<T&>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
#ifndef BOOST_NO_CXX11_RVALUE_REFERENCES
|
||||
|
||||
template< class T >
|
||||
struct is_reference<T&&>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_lvalue_reference
|
||||
//////////////////////////////////////
|
||||
template<class T>
|
||||
struct is_lvalue_reference
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_lvalue_reference<T&>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_array
|
||||
//////////////////////////////////////
|
||||
template<class T>
|
||||
struct is_array
|
||||
{
|
||||
static const bool value = false;
|
||||
};
|
||||
|
||||
template<class T>
|
||||
struct is_array<T[]>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
template<class T, std::size_t N>
|
||||
struct is_array<T[N]>
|
||||
{
|
||||
static const bool value = true;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// has_pointer_type
|
||||
//////////////////////////////////////
|
||||
template <class T>
|
||||
struct has_pointer_type
|
||||
{
|
||||
struct two { char c[2]; };
|
||||
template <class U> static two test(...);
|
||||
template <class U> static char test(typename U::pointer* = 0);
|
||||
static const bool value = sizeof(test<T>(0)) == 1;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// pointer_type
|
||||
//////////////////////////////////////
|
||||
template <class T, class D, bool = has_pointer_type<D>::value>
|
||||
struct pointer_type_imp
|
||||
{
|
||||
typedef typename D::pointer type;
|
||||
};
|
||||
|
||||
template <class T, class D>
|
||||
struct pointer_type_imp<T, D, false>
|
||||
{
|
||||
typedef T* type;
|
||||
};
|
||||
|
||||
template <class T, class D>
|
||||
struct pointer_type
|
||||
{
|
||||
typedef typename pointer_type_imp
|
||||
<typename remove_extent<T>::type, typename remove_reference<D>::type>::type type;
|
||||
};
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_convertible
|
||||
//////////////////////////////////////
|
||||
#if defined(_MSC_VER) && (_MSC_VER >= 1400)
|
||||
|
||||
//use intrinsic since in MSVC
|
||||
//overaligned types can't go through ellipsis
|
||||
template <class T, class U>
|
||||
struct is_convertible
|
||||
{
|
||||
static const bool value = __is_convertible_to(T, U);
|
||||
};
|
||||
|
||||
#else
|
||||
|
||||
template <class T, class U>
|
||||
class is_convertible
|
||||
{
|
||||
typedef typename add_lvalue_reference<T>::type t_reference;
|
||||
typedef char true_t;
|
||||
class false_t { char dummy[2]; };
|
||||
static false_t dispatch(...);
|
||||
static true_t dispatch(U);
|
||||
static t_reference trigger();
|
||||
public:
|
||||
static const bool value = sizeof(dispatch(trigger())) == sizeof(true_t);
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
//////////////////////////////////////
|
||||
// is_unary_function
|
||||
//////////////////////////////////////
|
||||
#if defined(BOOST_MSVC) || defined(__BORLANDC_)
|
||||
#define BOOST_MOVE_TT_DECL __cdecl
|
||||
#else
|
||||
#define BOOST_MOVE_TT_DECL
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_EXTENSIONS) && !defined(__BORLAND__) && !defined(_WIN64) && !defined(_M_ARM) && !defined(_M_ARM64) && !defined(UNDER_CE)
|
||||
#define BOOST_MOVE_TT_TEST_MSC_FUNC_SIGS
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
struct is_unary_function_impl
|
||||
{ static const bool value = false; };
|
||||
|
||||
// avoid duplicate definitions of is_unary_function_impl
|
||||
#ifndef BOOST_MOVE_TT_TEST_MSC_FUNC_SIGS
|
||||
|
||||
template <typename R>
|
||||
struct is_unary_function_impl<R (*)()>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R>
|
||||
struct is_unary_function_impl<R (*)(...)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#else // BOOST_MOVE_TT_TEST_MSC_FUNC_SIGS
|
||||
|
||||
template <typename R>
|
||||
struct is_unary_function_impl<R (__stdcall*)()>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#ifndef _MANAGED
|
||||
|
||||
template <typename R>
|
||||
struct is_unary_function_impl<R (__fastcall*)()>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#endif
|
||||
|
||||
template <typename R>
|
||||
struct is_unary_function_impl<R (__cdecl*)()>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R>
|
||||
struct is_unary_function_impl<R (__cdecl*)(...)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#endif
|
||||
|
||||
// avoid duplicate definitions of is_unary_function_impl
|
||||
#ifndef BOOST_MOVE_TT_TEST_MSC_FUNC_SIGS
|
||||
|
||||
template <typename R, class T0>
|
||||
struct is_unary_function_impl<R (*)(T0)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R, class T0>
|
||||
struct is_unary_function_impl<R (*)(T0, ...)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#else // BOOST_MOVE_TT_TEST_MSC_FUNC_SIGS
|
||||
|
||||
template <typename R, class T0>
|
||||
struct is_unary_function_impl<R (__stdcall*)(T0)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#ifndef _MANAGED
|
||||
|
||||
template <typename R, class T0>
|
||||
struct is_unary_function_impl<R (__fastcall*)(T0)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#endif
|
||||
|
||||
template <typename R, class T0>
|
||||
struct is_unary_function_impl<R (__cdecl*)(T0)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
template <typename R, class T0>
|
||||
struct is_unary_function_impl<R (__cdecl*)(T0, ...)>
|
||||
{ static const bool value = true; };
|
||||
|
||||
#endif
|
||||
|
||||
template <typename T>
|
||||
struct is_unary_function_impl<T&>
|
||||
{ static const bool value = false; };
|
||||
|
||||
template<typename T>
|
||||
struct is_unary_function
|
||||
{ static const bool value = is_unary_function_impl<T>::value; };
|
||||
|
||||
//////////////////////////////////////
|
||||
// has_virtual_destructor
|
||||
//////////////////////////////////////
|
||||
#if (defined(BOOST_MSVC) && defined(BOOST_MSVC_FULL_VER) && (BOOST_MSVC_FULL_VER >=140050215))\
|
||||
|| (defined(BOOST_INTEL) && defined(_MSC_VER) && (_MSC_VER >= 1500))
|
||||
# define BOOST_MOVEUP_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
|
||||
#elif defined(BOOST_CLANG) && defined(__has_feature)
|
||||
# if __has_feature(has_virtual_destructor)
|
||||
# define BOOST_MOVEUP_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
|
||||
# endif
|
||||
#elif defined(__GNUC__) && ((__GNUC__ > 4) || ((__GNUC__ == 4) && (__GNUC_MINOR__ >= 3) && !defined(__GCCXML__))) && !defined(BOOST_CLANG)
|
||||
# define BOOST_MOVEUP_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
|
||||
#elif defined(__ghs__) && (__GHS_VERSION_NUMBER >= 600)
|
||||
# define BOOST_MOVEUP_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
|
||||
#elif defined(BOOST_CODEGEARC)
|
||||
# define BOOST_MOVEUP_HAS_VIRTUAL_DESTRUCTOR(T) __has_virtual_destructor(T)
|
||||
#endif
|
||||
|
||||
#ifdef BOOST_MOVEUP_HAS_VIRTUAL_DESTRUCTOR
|
||||
template<class T>
|
||||
struct has_virtual_destructor{ static const bool value = BOOST_MOVEUP_HAS_VIRTUAL_DESTRUCTOR(T); };
|
||||
#else
|
||||
//If no intrinsic is available you trust the programmer knows what is doing
|
||||
template<class T>
|
||||
struct has_virtual_destructor{ static const bool value = true; };
|
||||
#endif
|
||||
|
||||
} //namespace move_upmu {
|
||||
} //namespace boost {
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_UNIQUE_PTR_DETAIL_META_UTILS_HPP
|
||||
156
include/boost/move/detail/workaround.hpp
Normal file
156
include/boost/move/detail/workaround.hpp
Normal file
@@ -0,0 +1,156 @@
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
//
|
||||
// (C) Copyright Ion Gaztanaga 2014-2014. 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/interprocess for documentation.
|
||||
//
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP
|
||||
#define BOOST_MOVE_DETAIL_WORKAROUND_HPP
|
||||
|
||||
#ifndef BOOST_CONFIG_HPP
|
||||
# include <boost/config.hpp>
|
||||
#endif
|
||||
#
|
||||
#if defined(BOOST_HAS_PRAGMA_ONCE)
|
||||
# pragma once
|
||||
#endif
|
||||
|
||||
#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)
|
||||
#define BOOST_MOVE_PERFECT_FORWARDING
|
||||
#endif
|
||||
|
||||
#if defined(__has_feature)
|
||||
#define BOOST_MOVE_HAS_FEATURE __has_feature
|
||||
#else
|
||||
#define BOOST_MOVE_HAS_FEATURE(x) 0
|
||||
#endif
|
||||
|
||||
#if BOOST_MOVE_HAS_FEATURE(address_sanitizer) || defined(__SANITIZE_ADDRESS__)
|
||||
#define BOOST_MOVE_ADDRESS_SANITIZER_ON
|
||||
#endif
|
||||
|
||||
//Macros for documentation purposes. For code, expands to the argument
|
||||
#define BOOST_MOVE_IMPDEF(TYPE) TYPE
|
||||
#define BOOST_MOVE_SEEDOC(TYPE) TYPE
|
||||
#define BOOST_MOVE_DOC0PTR(TYPE) TYPE
|
||||
#define BOOST_MOVE_DOC1ST(TYPE1, TYPE2) TYPE2
|
||||
#define BOOST_MOVE_I ,
|
||||
#define BOOST_MOVE_DOCIGN(T1) T1
|
||||
|
||||
#if defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 5) && !defined(__clang__)
|
||||
//Pre-standard rvalue binding rules
|
||||
#define BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
|
||||
#elif defined(_MSC_VER) && (_MSC_VER == 1600)
|
||||
//Standard rvalue binding rules but with some bugs
|
||||
#define BOOST_MOVE_MSVC_10_MEMBER_RVALUE_REF_BUG
|
||||
#define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG
|
||||
#elif defined(_MSC_VER) && (_MSC_VER == 1700)
|
||||
#define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG
|
||||
#endif
|
||||
|
||||
//#define BOOST_MOVE_DISABLE_FORCEINLINE
|
||||
|
||||
#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) && (_MSC_VER < 1900 || defined(_DEBUG))
|
||||
//"__forceinline" and MSVC seems to have some bugs in old versions and in debug mode
|
||||
#define BOOST_MOVE_FORCEINLINE inline
|
||||
#elif defined(BOOST_CLANG) || (defined(BOOST_GCC) && ((__GNUC__ <= 5) || defined(__MINGW32__)))
|
||||
//Older GCCs have problems with forceinline
|
||||
//Clang can have code bloat issues with forceinline, see
|
||||
//https://lists.boost.org/boost-users/2023/04/91445.php and
|
||||
//https://github.com/llvm/llvm-project/issues/62202
|
||||
#define BOOST_MOVE_FORCEINLINE inline
|
||||
#else
|
||||
#define BOOST_MOVE_FORCEINLINE BOOST_FORCEINLINE
|
||||
#endif
|
||||
|
||||
namespace boost {
|
||||
namespace movelib {
|
||||
|
||||
template <typename T1>
|
||||
BOOST_FORCEINLINE BOOST_CXX14_CONSTEXPR void ignore(T1 const&)
|
||||
{}
|
||||
|
||||
}} //namespace boost::movelib {
|
||||
|
||||
#if !(defined BOOST_NO_EXCEPTIONS)
|
||||
# define BOOST_MOVE_TRY { try
|
||||
# define BOOST_MOVE_CATCH(x) catch(x)
|
||||
# define BOOST_MOVE_RETHROW throw;
|
||||
# define BOOST_MOVE_CATCH_END }
|
||||
#else
|
||||
# if !defined(BOOST_MSVC) || BOOST_MSVC >= 1900
|
||||
# define BOOST_MOVE_TRY { if (true)
|
||||
# define BOOST_MOVE_CATCH(x) else if (false)
|
||||
# else
|
||||
// warning C4127: conditional expression is constant
|
||||
# define BOOST_MOVE_TRY { \
|
||||
__pragma(warning(push)) \
|
||||
__pragma(warning(disable: 4127)) \
|
||||
if (true) \
|
||||
__pragma(warning(pop))
|
||||
# define BOOST_MOVE_CATCH(x) else \
|
||||
__pragma(warning(push)) \
|
||||
__pragma(warning(disable: 4127)) \
|
||||
if (false) \
|
||||
__pragma(warning(pop))
|
||||
# endif
|
||||
# define BOOST_MOVE_RETHROW
|
||||
# define BOOST_MOVE_CATCH_END }
|
||||
#endif
|
||||
|
||||
#ifndef BOOST_NO_CXX11_STATIC_ASSERT
|
||||
# ifndef BOOST_NO_CXX11_VARIADIC_MACROS
|
||||
# define BOOST_MOVE_STATIC_ASSERT( ... ) static_assert(__VA_ARGS__, #__VA_ARGS__)
|
||||
# else
|
||||
# define BOOST_MOVE_STATIC_ASSERT( B ) static_assert(B, #B)
|
||||
# endif
|
||||
#else
|
||||
namespace boost {
|
||||
namespace move_detail {
|
||||
|
||||
template<bool B>
|
||||
struct STATIC_ASSERTION_FAILURE;
|
||||
|
||||
template<>
|
||||
struct STATIC_ASSERTION_FAILURE<true>{};
|
||||
|
||||
template<unsigned> struct static_assert_test {};
|
||||
|
||||
}}
|
||||
|
||||
#define BOOST_MOVE_STATIC_ASSERT(B) \
|
||||
typedef ::boost::move_detail::static_assert_test<\
|
||||
(unsigned)sizeof(::boost::move_detail::STATIC_ASSERTION_FAILURE<bool(B)>)>\
|
||||
BOOST_JOIN(boost_move_static_assert_typedef_, __LINE__) BOOST_ATTRIBUTE_UNUSED
|
||||
|
||||
#endif
|
||||
|
||||
#if !defined(__has_cpp_attribute) || defined(__CUDACC__)
|
||||
#define BOOST_MOVE_HAS_MSVC_ATTRIBUTE(ATTR) 0
|
||||
#else
|
||||
#define BOOST_MOVE_HAS_MSVC_ATTRIBUTE(ATTR) __has_cpp_attribute(msvc::ATTR)
|
||||
#endif
|
||||
|
||||
// See https://devblogs.microsoft.com/cppblog/improving-the-state-of-debug-performance-in-c/
|
||||
// for details on how MSVC has improved debug experience, specifically for move/forward-like utilities
|
||||
#if BOOST_MOVE_HAS_MSVC_ATTRIBUTE(intrinsic)
|
||||
#define BOOST_MOVE_INTRINSIC_CAST [[msvc::intrinsic]]
|
||||
#else
|
||||
#define BOOST_MOVE_INTRINSIC_CAST BOOST_MOVE_FORCEINLINE
|
||||
#endif
|
||||
|
||||
#if defined(__has_builtin)
|
||||
#if __has_builtin(__builtin_launder)
|
||||
#define BOOST_MOVE_HAS_BUILTIN_LAUNDER
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif //#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP
|
||||
Reference in New Issue
Block a user