Minimize BOOST_MOVE_FORCEINLINE

This commit is contained in:
Ion Gaztañaga
2023-05-01 16:40:38 +02:00
parent cc618e1ba3
commit b6b8414cfb
13 changed files with 172 additions and 172 deletions

View File

@@ -155,7 +155,7 @@ struct and_op_not
{}; {};
template<class T> template<class T>
BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y, typename boost::move_detail::enable_if_c<!boost::move_detail::has_move_emulation_enabled_impl<T>::value>::type* = 0) inline void swap_proxy(T& x, T& y, typename boost::move_detail::enable_if_c<!boost::move_detail::has_move_emulation_enabled_impl<T>::value>::type* = 0)
{ {
//use std::swap if argument dependent lookup fails //use std::swap if argument dependent lookup fails
//Use using directive ("using namespace xxx;") instead as some older compilers //Use using directive ("using namespace xxx;") instead as some older compilers
@@ -165,14 +165,14 @@ BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y, typename boost::move_detail::
} }
template<class T> template<class T>
BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y void swap_proxy(T& x, T& y
, typename boost::move_detail::enable_if< and_op_not_impl<boost::move_detail::has_move_emulation_enabled_impl<T> , typename boost::move_detail::enable_if< and_op_not_impl<boost::move_detail::has_move_emulation_enabled_impl<T>
, boost_move_member_swap::has_member_swap<T> > , boost_move_member_swap::has_member_swap<T> >
>::type* = 0) >::type* = 0)
{ T t(::boost::move(x)); x = ::boost::move(y); y = ::boost::move(t); } { T t(::boost::move(x)); x = ::boost::move(y); y = ::boost::move(t); }
template<class T> template<class T>
BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y inline void swap_proxy(T& x, T& y
, typename boost::move_detail::enable_if< and_op_impl< boost::move_detail::has_move_emulation_enabled_impl<T> , typename boost::move_detail::enable_if< and_op_impl< boost::move_detail::has_move_emulation_enabled_impl<T>
, boost_move_member_swap::has_member_swap<T> > , boost_move_member_swap::has_member_swap<T> >
>::type* = 0) >::type* = 0)
@@ -185,7 +185,7 @@ BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y
namespace boost_move_adl_swap{ namespace boost_move_adl_swap{
template<class T> template<class T>
BOOST_MOVE_FORCEINLINE void swap_proxy(T& x, T& y) inline void swap_proxy(T& x, T& y)
{ {
using std::swap; using std::swap;
swap(x, y); swap(x, y);
@@ -222,7 +222,7 @@ namespace boost{
//! - Otherwise a move-based swap is called, equivalent to: //! - Otherwise a move-based swap is called, equivalent to:
//! <code>T t(::boost::move(x)); x = ::boost::move(y); y = ::boost::move(t);</code>. //! <code>T t(::boost::move(x)); x = ::boost::move(y); y = ::boost::move(t);</code>.
template<class T> template<class T>
BOOST_MOVE_FORCEINLINE void adl_move_swap(T& x, T& y) inline void adl_move_swap(T& x, T& y)
{ {
::boost_move_adl_swap::swap_proxy(x, y); ::boost_move_adl_swap::swap_proxy(x, y);
} }

View File

@@ -36,19 +36,19 @@ struct four_way_t{};
struct move_op struct move_op
{ {
template <class SourceIt, class DestinationIt> template <class SourceIt, class DestinationIt>
BOOST_MOVE_FORCEINLINE void operator()(SourceIt source, DestinationIt dest) inline void operator()(SourceIt source, DestinationIt dest)
{ *dest = ::boost::move(*source); } { *dest = ::boost::move(*source); }
template <class SourceIt, class DestinationIt> template <class SourceIt, class DestinationIt>
BOOST_MOVE_FORCEINLINE DestinationIt operator()(forward_t, SourceIt first, SourceIt last, DestinationIt dest_begin) inline DestinationIt operator()(forward_t, SourceIt first, SourceIt last, DestinationIt dest_begin)
{ return ::boost::move(first, last, dest_begin); } { return ::boost::move(first, last, dest_begin); }
template <class SourceIt, class DestinationIt> template <class SourceIt, class DestinationIt>
BOOST_MOVE_FORCEINLINE DestinationIt operator()(backward_t, SourceIt first, SourceIt last, DestinationIt dest_last) inline DestinationIt operator()(backward_t, SourceIt first, SourceIt last, DestinationIt dest_last)
{ return ::boost::move_backward(first, last, dest_last); } { return ::boost::move_backward(first, last, dest_last); }
template <class SourceIt, class DestinationIt1, class DestinationIt2> template <class SourceIt, class DestinationIt1, class DestinationIt2>
BOOST_MOVE_FORCEINLINE void operator()(three_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it) inline void operator()(three_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it)
{ {
*dest2it = boost::move(*dest1it); *dest2it = boost::move(*dest1it);
*dest1it = boost::move(*srcit); *dest1it = boost::move(*srcit);
@@ -65,7 +65,7 @@ struct move_op
} }
template <class SourceIt, class DestinationIt1, class DestinationIt2, class DestinationIt3> template <class SourceIt, class DestinationIt1, class DestinationIt2, class DestinationIt3>
BOOST_MOVE_FORCEINLINE void operator()(four_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it, DestinationIt3 dest3it) inline void operator()(four_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it, DestinationIt3 dest3it)
{ {
*dest3it = boost::move(*dest2it); *dest3it = boost::move(*dest2it);
*dest2it = boost::move(*dest1it); *dest2it = boost::move(*dest1it);
@@ -76,19 +76,19 @@ struct move_op
struct swap_op struct swap_op
{ {
template <class SourceIt, class DestinationIt> template <class SourceIt, class DestinationIt>
BOOST_MOVE_FORCEINLINE void operator()(SourceIt source, DestinationIt dest) inline void operator()(SourceIt source, DestinationIt dest)
{ boost::adl_move_swap(*dest, *source); } { boost::adl_move_swap(*dest, *source); }
template <class SourceIt, class DestinationIt> template <class SourceIt, class DestinationIt>
BOOST_MOVE_FORCEINLINE DestinationIt operator()(forward_t, SourceIt first, SourceIt last, DestinationIt dest_begin) inline DestinationIt operator()(forward_t, SourceIt first, SourceIt last, DestinationIt dest_begin)
{ return boost::adl_move_swap_ranges(first, last, dest_begin); } { return boost::adl_move_swap_ranges(first, last, dest_begin); }
template <class SourceIt, class DestinationIt> template <class SourceIt, class DestinationIt>
BOOST_MOVE_FORCEINLINE DestinationIt operator()(backward_t, SourceIt first, SourceIt last, DestinationIt dest_begin) inline DestinationIt operator()(backward_t, SourceIt first, SourceIt last, DestinationIt dest_begin)
{ return boost::adl_move_swap_ranges_backward(first, last, dest_begin); } { return boost::adl_move_swap_ranges_backward(first, last, dest_begin); }
template <class SourceIt, class DestinationIt1, class DestinationIt2> template <class SourceIt, class DestinationIt1, class DestinationIt2>
BOOST_MOVE_FORCEINLINE void operator()(three_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it) inline void operator()(three_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it)
{ {
typename ::boost::movelib::iterator_traits<SourceIt>::value_type tmp(boost::move(*dest2it)); typename ::boost::movelib::iterator_traits<SourceIt>::value_type tmp(boost::move(*dest2it));
*dest2it = boost::move(*dest1it); *dest2it = boost::move(*dest1it);
@@ -106,7 +106,7 @@ struct swap_op
} }
template <class SourceIt, class DestinationIt1, class DestinationIt2, class DestinationIt3> template <class SourceIt, class DestinationIt1, class DestinationIt2, class DestinationIt3>
BOOST_MOVE_FORCEINLINE void operator()(four_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it, DestinationIt3 dest3it) inline void operator()(four_way_t, SourceIt srcit, DestinationIt1 dest1it, DestinationIt2 dest2it, DestinationIt3 dest3it)
{ {
typename ::boost::movelib::iterator_traits<SourceIt>::value_type tmp(boost::move(*dest3it)); typename ::boost::movelib::iterator_traits<SourceIt>::value_type tmp(boost::move(*dest3it));
*dest3it = boost::move(*dest2it); *dest3it = boost::move(*dest2it);

View File

@@ -106,7 +106,7 @@ class heap_sort_helper
}; };
template <class RandomAccessIterator, class Compare> template <class RandomAccessIterator, class Compare>
BOOST_MOVE_FORCEINLINE void heap_sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp) inline void heap_sort(RandomAccessIterator first, RandomAccessIterator last, Compare comp)
{ {
heap_sort_helper<RandomAccessIterator, Compare>::sort(first, last, comp); heap_sort_helper<RandomAccessIterator, Compare>::sort(first, last, comp);
} }

View File

@@ -43,11 +43,11 @@ class adaptive_xbuf
typedef RandRawIt iterator; typedef RandRawIt iterator;
typedef SizeType size_type; typedef SizeType size_type;
BOOST_MOVE_FORCEINLINE adaptive_xbuf() inline adaptive_xbuf()
: m_ptr(), m_size(0), m_capacity(0) : m_ptr(), m_size(0), m_capacity(0)
{} {}
BOOST_MOVE_FORCEINLINE adaptive_xbuf(RandRawIt raw_memory, size_type cap) inline adaptive_xbuf(RandRawIt raw_memory, size_type cap)
: m_ptr(raw_memory), m_size(0), m_capacity(cap) : m_ptr(raw_memory), m_size(0), m_capacity(cap)
{} {}
@@ -102,7 +102,7 @@ class adaptive_xbuf
} }
} }
BOOST_MOVE_FORCEINLINE void set_size(size_type sz) inline void set_size(size_type sz)
{ {
m_size = sz; m_size = sz;
} }
@@ -144,12 +144,12 @@ class adaptive_xbuf
private: private:
template<class RIt> template<class RIt>
BOOST_MOVE_FORCEINLINE static bool is_raw_ptr(RIt) inline static bool is_raw_ptr(RIt)
{ {
return false; return false;
} }
BOOST_MOVE_FORCEINLINE static bool is_raw_ptr(T*) inline static bool is_raw_ptr(T*)
{ {
return true; return true;
} }
@@ -168,43 +168,43 @@ class adaptive_xbuf
} }
template<class U> template<class U>
BOOST_MOVE_FORCEINLINE U *aligned_trailing() const inline U *aligned_trailing() const
{ {
return this->aligned_trailing<U>(this->size()); return this->aligned_trailing<U>(this->size());
} }
template<class U> template<class U>
BOOST_MOVE_FORCEINLINE U *aligned_trailing(size_type pos) const inline U *aligned_trailing(size_type pos) const
{ {
uintptr_t u_addr = uintptr_t(&*(this->data()+pos)); uintptr_t u_addr = uintptr_t(&*(this->data()+pos));
u_addr = ((u_addr + sizeof(U)-1)/sizeof(U))*sizeof(U); u_addr = ((u_addr + sizeof(U)-1)/sizeof(U))*sizeof(U);
return (U*)u_addr; return (U*)u_addr;
} }
BOOST_MOVE_FORCEINLINE ~adaptive_xbuf() inline ~adaptive_xbuf()
{ {
this->clear(); this->clear();
} }
BOOST_MOVE_FORCEINLINE size_type capacity() const inline size_type capacity() const
{ return m_capacity; } { return m_capacity; }
BOOST_MOVE_FORCEINLINE iterator data() const inline iterator data() const
{ return m_ptr; } { return m_ptr; }
BOOST_MOVE_FORCEINLINE iterator begin() const inline iterator begin() const
{ return m_ptr; } { return m_ptr; }
BOOST_MOVE_FORCEINLINE iterator end() const inline iterator end() const
{ return m_ptr+m_size; } { return m_ptr+m_size; }
BOOST_MOVE_FORCEINLINE size_type size() const inline size_type size() const
{ return m_size; } { return m_size; }
BOOST_MOVE_FORCEINLINE bool empty() const inline bool empty() const
{ return !m_size; } { return !m_size; }
BOOST_MOVE_FORCEINLINE void clear() inline void clear()
{ {
this->shrink_to_fit(0u); this->shrink_to_fit(0u);
} }

View File

@@ -24,19 +24,19 @@ namespace movelib {
template<class Comp> template<class Comp>
struct antistable struct antistable
{ {
BOOST_MOVE_FORCEINLINE explicit antistable(Comp &comp) inline explicit antistable(Comp &comp)
: m_comp(comp) : m_comp(comp)
{} {}
BOOST_MOVE_FORCEINLINE antistable(const antistable & other) inline antistable(const antistable & other)
: m_comp(other.m_comp) : m_comp(other.m_comp)
{} {}
template<class U, class V> template<class U, class V>
BOOST_MOVE_FORCEINLINE bool operator()(const U &u, const V & v) inline bool operator()(const U &u, const V & v)
{ return !m_comp(v, u); } { return !m_comp(v, u); }
BOOST_MOVE_FORCEINLINE const Comp &get() const inline const Comp &get() const
{ return m_comp; } { return m_comp; }
private: private:
@@ -56,15 +56,15 @@ template <class Comp>
class negate class negate
{ {
public: public:
BOOST_MOVE_FORCEINLINE negate() inline negate()
{} {}
BOOST_MOVE_FORCEINLINE explicit negate(Comp comp) inline explicit negate(Comp comp)
: m_comp(comp) : m_comp(comp)
{} {}
template <class T1, class T2> template <class T1, class T2>
BOOST_MOVE_FORCEINLINE bool operator()(const T1& l, const T2& r) inline bool operator()(const T1& l, const T2& r)
{ {
return !m_comp(l, r); return !m_comp(l, r);
} }
@@ -78,15 +78,15 @@ template <class Comp>
class inverse class inverse
{ {
public: public:
BOOST_MOVE_FORCEINLINE inverse() inline inverse()
{} {}
BOOST_MOVE_FORCEINLINE explicit inverse(Comp comp) inline explicit inverse(Comp comp)
: m_comp(comp) : m_comp(comp)
{} {}
template <class T1, class T2> template <class T1, class T2>
BOOST_MOVE_FORCEINLINE bool operator()(const T1& l, const T2& r) inline bool operator()(const T1& l, const T2& r)
{ {
return m_comp(r, l); return m_comp(r, l);
} }

View File

@@ -262,12 +262,12 @@
#define BOOST_COPYABLE_AND_MOVABLE(TYPE)\ #define BOOST_COPYABLE_AND_MOVABLE(TYPE)\
public:\ public:\
BOOST_MOVE_FORCEINLINE TYPE& operator=(TYPE &t)\ inline TYPE& operator=(TYPE &t)\
{ this->operator=(const_cast<const TYPE&>(t)); return *this;}\ { this->operator=(const_cast<const TYPE&>(t)); return *this;}\
public:\ public:\
BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \ inline operator ::boost::rv<TYPE>&() \
{ return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\ { return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \ inline operator const ::boost::rv<TYPE>&() const \
{ return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\ { return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\
private:\ private:\
// //

View File

@@ -27,11 +27,11 @@ namespace movelib {
namespace detail { namespace detail {
template <class T> template <class T>
BOOST_MOVE_FORCEINLINE T* iterator_to_pointer(T* i) inline T* iterator_to_pointer(T* i)
{ return i; } { return i; }
template <class Iterator> template <class Iterator>
BOOST_MOVE_FORCEINLINE typename boost::movelib::iterator_traits<Iterator>::pointer inline typename boost::movelib::iterator_traits<Iterator>::pointer
iterator_to_pointer(const Iterator &i) iterator_to_pointer(const Iterator &i)
{ return i.operator->(); } { return i.operator->(); }
@@ -46,7 +46,7 @@ struct iterator_to_element_ptr
} //namespace detail { } //namespace detail {
template <class Iterator> template <class Iterator>
BOOST_MOVE_FORCEINLINE typename boost::movelib::detail::iterator_to_element_ptr<Iterator>::type inline typename boost::movelib::detail::iterator_to_element_ptr<Iterator>::type
iterator_to_raw_pointer(const Iterator &i) iterator_to_raw_pointer(const Iterator &i)
{ {
return ::boost::movelib::to_raw_pointer return ::boost::movelib::to_raw_pointer

View File

@@ -57,8 +57,8 @@ struct apply
template< bool C_ > template< bool C_ >
struct bool_ : integral_constant<bool, C_> struct bool_ : integral_constant<bool, C_>
{ {
BOOST_MOVE_FORCEINLINE operator bool() const { return C_; } inline operator bool() const { return C_; }
BOOST_MOVE_FORCEINLINE bool operator()() const { return C_; } inline bool operator()() const { return C_; }
}; };
typedef bool_<true> true_; typedef bool_<true> true_;

View File

@@ -69,13 +69,13 @@
{}; {};
#define BOOST_MOVE_CONVERSION_AWARE_CATCH_COMMON(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\ #define BOOST_MOVE_CONVERSION_AWARE_CATCH_COMMON(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\ inline RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\
{ return FWD_FUNCTION(static_cast<const TYPE&>(x)); }\ { return FWD_FUNCTION(static_cast<const TYPE&>(x)); }\
\ \
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \ inline RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
{ return FWD_FUNCTION(::boost::move(x)); }\ { return FWD_FUNCTION(::boost::move(x)); }\
\ \
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(TYPE &x)\ inline RETURN_VALUE PUB_FUNCTION(TYPE &x)\
{ return FWD_FUNCTION(const_cast<const TYPE &>(x)); }\ { return FWD_FUNCTION(const_cast<const TYPE &>(x)); }\
// //
#if defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN) #if defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
@@ -83,12 +83,12 @@
BOOST_MOVE_CONVERSION_AWARE_CATCH_COMMON(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>\ template<class BOOST_MOVE_TEMPL_PARAM>\
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u,\ 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)\ typename boost_move_conversion_aware_catch_1< ::boost::move_detail::nat, BOOST_MOVE_TEMPL_PARAM, TYPE>::type* = 0)\
{ return FWD_FUNCTION(u); }\ { return FWD_FUNCTION(u); }\
\ \
template<class BOOST_MOVE_TEMPL_PARAM>\ template<class BOOST_MOVE_TEMPL_PARAM>\
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u,\ 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)\ typename boost_move_conversion_aware_catch_2< ::boost::move_detail::nat, BOOST_MOVE_TEMPL_PARAM, TYPE>::type* = 0)\
{\ {\
TYPE t((u));\ TYPE t((u));\
@@ -100,12 +100,12 @@
BOOST_MOVE_CONVERSION_AWARE_CATCH_COMMON(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>\ template<class BOOST_MOVE_TEMPL_PARAM>\
BOOST_MOVE_FORCEINLINE typename boost_move_conversion_aware_catch_1<RETURN_VALUE, BOOST_MOVE_TEMPL_PARAM, TYPE>::type\ inline typename boost_move_conversion_aware_catch_1<RETURN_VALUE, BOOST_MOVE_TEMPL_PARAM, TYPE>::type\
PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\ PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\
{ return FWD_FUNCTION(u); }\ { return FWD_FUNCTION(u); }\
\ \
template<class BOOST_MOVE_TEMPL_PARAM>\ template<class BOOST_MOVE_TEMPL_PARAM>\
BOOST_MOVE_FORCEINLINE typename boost_move_conversion_aware_catch_2<RETURN_VALUE, BOOST_MOVE_TEMPL_PARAM, TYPE>::type\ inline typename boost_move_conversion_aware_catch_2<RETURN_VALUE, BOOST_MOVE_TEMPL_PARAM, TYPE>::type\
PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\ PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\
{\ {\
TYPE t((u));\ TYPE t((u));\
@@ -116,14 +116,14 @@
#elif (defined(_MSC_VER) && (_MSC_VER == 1600)) #elif (defined(_MSC_VER) && (_MSC_VER == 1600))
#define BOOST_MOVE_CONVERSION_AWARE_CATCH(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\ #define BOOST_MOVE_CONVERSION_AWARE_CATCH(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\ inline RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\
{ return FWD_FUNCTION(static_cast<const TYPE&>(x)); }\ { return FWD_FUNCTION(static_cast<const TYPE&>(x)); }\
\ \
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \ inline RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
{ return FWD_FUNCTION(::boost::move(x)); }\ { return FWD_FUNCTION(::boost::move(x)); }\
\ \
template<class BOOST_MOVE_TEMPL_PARAM>\ template<class BOOST_MOVE_TEMPL_PARAM>\
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c\ inline typename ::boost::move_detail::enable_if_c\
< !::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>::value\ < !::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM>::value\
, RETURN_VALUE >::type\ , RETURN_VALUE >::type\
PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\ PUB_FUNCTION(const BOOST_MOVE_TEMPL_PARAM &u)\
@@ -136,10 +136,10 @@
#else //BOOST_NO_CXX11_RVALUE_REFERENCES #else //BOOST_NO_CXX11_RVALUE_REFERENCES
#define BOOST_MOVE_CONVERSION_AWARE_CATCH(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\ #define BOOST_MOVE_CONVERSION_AWARE_CATCH(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION)\
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\ inline RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_CONST(TYPE) x)\
{ return FWD_FUNCTION(x); }\ { return FWD_FUNCTION(x); }\
\ \
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \ inline RETURN_VALUE PUB_FUNCTION(BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
{ return FWD_FUNCTION(::boost::move(x)); }\ { return FWD_FUNCTION(::boost::move(x)); }\
// //
@@ -174,13 +174,13 @@
{}; {};
#define BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG_COMMON(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\ #define BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG_COMMON(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\ inline RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\
{ return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\ { return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\
\ \
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \ inline RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
{ return FWD_FUNCTION(arg1, ::boost::move(x)); }\ { return FWD_FUNCTION(arg1, ::boost::move(x)); }\
\ \
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, TYPE &x)\ inline RETURN_VALUE PUB_FUNCTION(ARG1 arg1, TYPE &x)\
{ return FWD_FUNCTION(arg1, const_cast<const TYPE &>(x)); }\ { return FWD_FUNCTION(arg1, const_cast<const TYPE &>(x)); }\
// //
#if defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN) #if defined(BOOST_MOVE_HELPERS_RETURN_SFINAE_BROKEN)
@@ -188,12 +188,12 @@
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG_COMMON(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>\ template<class BOOST_MOVE_TEMPL_PARAM>\
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u,\ 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)\ typename boost_move_conversion_aware_catch_1arg_1<void, BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO, TYPE>::type* = 0)\
{ return FWD_FUNCTION(arg1, u); }\ { return FWD_FUNCTION(arg1, u); }\
\ \
template<class BOOST_MOVE_TEMPL_PARAM>\ template<class BOOST_MOVE_TEMPL_PARAM>\
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u,\ 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)\ typename boost_move_conversion_aware_catch_1arg_2<void, BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO, TYPE>::type* = 0)\
{\ {\
TYPE t((u));\ TYPE t((u));\
@@ -205,12 +205,12 @@
BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG_COMMON(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>\ template<class BOOST_MOVE_TEMPL_PARAM>\
BOOST_MOVE_FORCEINLINE typename boost_move_conversion_aware_catch_1arg_1<RETURN_VALUE, BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO, TYPE>::type\ 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)\ PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u)\
{ return FWD_FUNCTION(arg1, u); }\ { return FWD_FUNCTION(arg1, u); }\
\ \
template<class BOOST_MOVE_TEMPL_PARAM>\ template<class BOOST_MOVE_TEMPL_PARAM>\
BOOST_MOVE_FORCEINLINE typename boost_move_conversion_aware_catch_1arg_2<RETURN_VALUE, BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO, TYPE>::type\ 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)\ PUB_FUNCTION(ARG1 arg1, const BOOST_MOVE_TEMPL_PARAM &u)\
{\ {\
TYPE t((u));\ TYPE t((u));\
@@ -222,14 +222,14 @@
#elif (defined(_MSC_VER) && (_MSC_VER == 1600)) #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)\ #define BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\ inline RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\
{ return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\ { return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\
\ \
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \ inline RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
{ return FWD_FUNCTION(arg1, ::boost::move(x)); }\ { return FWD_FUNCTION(arg1, ::boost::move(x)); }\
\ \
template<class BOOST_MOVE_TEMPL_PARAM>\ template<class BOOST_MOVE_TEMPL_PARAM>\
BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::disable_if_or\ inline typename ::boost::move_detail::disable_if_or\
< RETURN_VALUE \ < RETURN_VALUE \
, ::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM> \ , ::boost::move_detail::is_same<TYPE, BOOST_MOVE_TEMPL_PARAM> \
, ::boost::move_detail::is_same_or_convertible<BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO> \ , ::boost::move_detail::is_same_or_convertible<BOOST_MOVE_TEMPL_PARAM, UNLESS_CONVERTIBLE_TO> \
@@ -244,10 +244,10 @@
#else #else
#define BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\ #define BOOST_MOVE_CONVERSION_AWARE_CATCH_1ARG(PUB_FUNCTION, TYPE, RETURN_VALUE, FWD_FUNCTION, ARG1, UNLESS_CONVERTIBLE_TO)\
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\ inline RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_CONST(TYPE) x)\
{ return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\ { return FWD_FUNCTION(arg1, static_cast<const TYPE&>(x)); }\
\ \
BOOST_MOVE_FORCEINLINE RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \ inline RETURN_VALUE PUB_FUNCTION(ARG1 arg1, BOOST_MOVE_CATCH_RVALUE(TYPE) x) \
{ return FWD_FUNCTION(arg1, ::boost::move(x)); }\ { return FWD_FUNCTION(arg1, ::boost::move(x)); }\
// //

View File

@@ -29,7 +29,7 @@ namespace boost {
namespace movelib { namespace movelib {
template<class I> template<class I>
BOOST_MOVE_FORCEINLINE typename iterator_traits<I>::pointer iterator_arrow_result(const I &i) inline typename iterator_traits<I>::pointer iterator_arrow_result(const I &i)
{ return i.operator->(); } { return i.operator->(); }
template<class T> template<class T>
@@ -49,38 +49,38 @@ class reverse_iterator
typedef It iterator_type; typedef It iterator_type;
BOOST_MOVE_FORCEINLINE reverse_iterator() inline reverse_iterator()
: m_current() //Value initialization to achieve "null iterators" (N3644) : m_current() //Value initialization to achieve "null iterators" (N3644)
{} {}
BOOST_MOVE_FORCEINLINE explicit reverse_iterator(It r) inline explicit reverse_iterator(It r)
: m_current(r) : m_current(r)
{} {}
BOOST_MOVE_FORCEINLINE reverse_iterator(const reverse_iterator& r) inline reverse_iterator(const reverse_iterator& r)
: m_current(r.base()) : m_current(r.base())
{} {}
template<class OtherIt> template<class OtherIt>
BOOST_MOVE_FORCEINLINE inline
reverse_iterator( const reverse_iterator<OtherIt>& r reverse_iterator( const reverse_iterator<OtherIt>& r
, typename boost::move_detail::enable_if_convertible<OtherIt, It>::type* =0 , typename boost::move_detail::enable_if_convertible<OtherIt, It>::type* =0
) )
: m_current(r.base()) : m_current(r.base())
{} {}
BOOST_MOVE_FORCEINLINE reverse_iterator & operator=( const reverse_iterator& r) inline reverse_iterator & operator=( const reverse_iterator& r)
{ m_current = r.base(); return *this; } { m_current = r.base(); return *this; }
template<class OtherIt> template<class OtherIt>
BOOST_MOVE_FORCEINLINE typename boost::move_detail::enable_if_convertible<OtherIt, It, reverse_iterator &>::type inline typename boost::move_detail::enable_if_convertible<OtherIt, It, reverse_iterator &>::type
operator=( const reverse_iterator<OtherIt>& r) operator=( const reverse_iterator<OtherIt>& r)
{ m_current = r.base(); return *this; } { m_current = r.base(); return *this; }
BOOST_MOVE_FORCEINLINE It base() const inline It base() const
{ return m_current; } { return m_current; }
BOOST_MOVE_FORCEINLINE reference operator*() const inline reference operator*() const
{ {
It temp(m_current); It temp(m_current);
--temp; --temp;
@@ -88,78 +88,78 @@ class reverse_iterator
return r; return r;
} }
BOOST_MOVE_FORCEINLINE pointer operator->() const inline pointer operator->() const
{ {
It temp(m_current); It temp(m_current);
--temp; --temp;
return (iterator_arrow_result)(temp); return (iterator_arrow_result)(temp);
} }
BOOST_MOVE_FORCEINLINE reference operator[](difference_type off) const inline reference operator[](difference_type off) const
{ {
return this->m_current[difference_type(-off - 1)]; return this->m_current[difference_type(-off - 1)];
} }
BOOST_MOVE_FORCEINLINE reverse_iterator& operator++() inline reverse_iterator& operator++()
{ {
--m_current; --m_current;
return *this; return *this;
} }
BOOST_MOVE_FORCEINLINE reverse_iterator operator++(int) inline reverse_iterator operator++(int)
{ {
reverse_iterator temp((*this)); reverse_iterator temp((*this));
--m_current; --m_current;
return temp; return temp;
} }
BOOST_MOVE_FORCEINLINE reverse_iterator& operator--() inline reverse_iterator& operator--()
{ {
++m_current; ++m_current;
return *this; return *this;
} }
BOOST_MOVE_FORCEINLINE reverse_iterator operator--(int) inline reverse_iterator operator--(int)
{ {
reverse_iterator temp((*this)); reverse_iterator temp((*this));
++m_current; ++m_current;
return temp; return temp;
} }
BOOST_MOVE_FORCEINLINE friend bool operator==(const reverse_iterator& l, const reverse_iterator& r) inline friend bool operator==(const reverse_iterator& l, const reverse_iterator& r)
{ return l.m_current == r.m_current; } { return l.m_current == r.m_current; }
BOOST_MOVE_FORCEINLINE friend bool operator!=(const reverse_iterator& l, const reverse_iterator& r) inline friend bool operator!=(const reverse_iterator& l, const reverse_iterator& r)
{ return l.m_current != r.m_current; } { return l.m_current != r.m_current; }
BOOST_MOVE_FORCEINLINE friend bool operator<(const reverse_iterator& l, const reverse_iterator& r) inline friend bool operator<(const reverse_iterator& l, const reverse_iterator& r)
{ return l.m_current > r.m_current; } { return l.m_current > r.m_current; }
BOOST_MOVE_FORCEINLINE friend bool operator<=(const reverse_iterator& l, const reverse_iterator& r) inline friend bool operator<=(const reverse_iterator& l, const reverse_iterator& r)
{ return l.m_current >= r.m_current; } { return l.m_current >= r.m_current; }
BOOST_MOVE_FORCEINLINE friend bool operator>(const reverse_iterator& l, const reverse_iterator& r) inline friend bool operator>(const reverse_iterator& l, const reverse_iterator& r)
{ return l.m_current < r.m_current; } { return l.m_current < r.m_current; }
BOOST_MOVE_FORCEINLINE friend bool operator>=(const reverse_iterator& l, const reverse_iterator& r) inline friend bool operator>=(const reverse_iterator& l, const reverse_iterator& r)
{ return l.m_current <= r.m_current; } { return l.m_current <= r.m_current; }
BOOST_MOVE_FORCEINLINE reverse_iterator& operator+=(difference_type off) inline reverse_iterator& operator+=(difference_type off)
{ m_current -= off; return *this; } { m_current -= off; return *this; }
BOOST_MOVE_FORCEINLINE reverse_iterator& operator-=(difference_type off) inline reverse_iterator& operator-=(difference_type off)
{ m_current += off; return *this; } { m_current += off; return *this; }
BOOST_MOVE_FORCEINLINE friend reverse_iterator operator+(reverse_iterator l, difference_type off) inline friend reverse_iterator operator+(reverse_iterator l, difference_type off)
{ return (l += off); } { return (l += off); }
BOOST_MOVE_FORCEINLINE friend reverse_iterator operator+(difference_type off, reverse_iterator r) inline friend reverse_iterator operator+(difference_type off, reverse_iterator r)
{ return (r += off); } { return (r += off); }
BOOST_MOVE_FORCEINLINE friend reverse_iterator operator-(reverse_iterator l, difference_type off) inline friend reverse_iterator operator-(reverse_iterator l, difference_type off)
{ return (l-= off); } { return (l-= off); }
BOOST_MOVE_FORCEINLINE friend difference_type operator-(const reverse_iterator& l, const reverse_iterator& r) inline friend difference_type operator-(const reverse_iterator& l, const reverse_iterator& r)
{ return r.m_current - l.m_current; } { return r.m_current - l.m_current; }
private: private:
@@ -167,7 +167,7 @@ class reverse_iterator
}; };
template< class Iterator > template< class Iterator >
BOOST_MOVE_FORCEINLINE reverse_iterator<Iterator> make_reverse_iterator( Iterator i ) inline reverse_iterator<Iterator> make_reverse_iterator( Iterator i )
{ return reverse_iterator<Iterator>(i); } { return reverse_iterator<Iterator>(i); }
} //namespace movelib { } //namespace movelib {

View File

@@ -33,7 +33,7 @@ BOOST_MOVE_FORCEINLINE T* to_raw_pointer(T* p)
{ return p; } { return p; }
template <class Pointer> template <class Pointer>
BOOST_MOVE_FORCEINLINE typename boost::movelib::pointer_element<Pointer>::type* inline typename boost::movelib::pointer_element<Pointer>::type*
to_raw_pointer(const Pointer &p) to_raw_pointer(const Pointer &p)
{ return ::boost::movelib::to_raw_pointer(p.operator->()); } { return ::boost::movelib::to_raw_pointer(p.operator->()); }

View File

@@ -58,20 +58,20 @@ class move_iterator
typedef typename boost::movelib::iterator_traits<iterator_type>::difference_type difference_type; typedef typename boost::movelib::iterator_traits<iterator_type>::difference_type difference_type;
typedef typename boost::movelib::iterator_traits<iterator_type>::iterator_category iterator_category; typedef typename boost::movelib::iterator_traits<iterator_type>::iterator_category iterator_category;
BOOST_MOVE_FORCEINLINE move_iterator() inline move_iterator()
: m_it() : m_it()
{} {}
BOOST_MOVE_FORCEINLINE explicit move_iterator(const It &i) inline explicit move_iterator(const It &i)
: m_it(i) : m_it(i)
{} {}
template <class U> template <class U>
BOOST_MOVE_FORCEINLINE move_iterator(const move_iterator<U>& u) inline move_iterator(const move_iterator<U>& u)
: m_it(u.m_it) : m_it(u.m_it)
{} {}
BOOST_MOVE_FORCEINLINE reference operator*() const inline reference operator*() const
{ {
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)
return *m_it; return *m_it;
@@ -80,34 +80,34 @@ class move_iterator
#endif #endif
} }
BOOST_MOVE_FORCEINLINE pointer operator->() const inline pointer operator->() const
{ return m_it; } { return m_it; }
BOOST_MOVE_FORCEINLINE move_iterator& operator++() inline move_iterator& operator++()
{ ++m_it; return *this; } { ++m_it; return *this; }
BOOST_MOVE_FORCEINLINE move_iterator<iterator_type> operator++(int) inline move_iterator<iterator_type> operator++(int)
{ move_iterator<iterator_type> tmp(*this); ++(*this); return tmp; } { move_iterator<iterator_type> tmp(*this); ++(*this); return tmp; }
BOOST_MOVE_FORCEINLINE move_iterator& operator--() inline move_iterator& operator--()
{ --m_it; return *this; } { --m_it; return *this; }
BOOST_MOVE_FORCEINLINE move_iterator<iterator_type> operator--(int) inline move_iterator<iterator_type> operator--(int)
{ move_iterator<iterator_type> tmp(*this); --(*this); return tmp; } { move_iterator<iterator_type> tmp(*this); --(*this); return tmp; }
move_iterator<iterator_type> operator+ (difference_type n) const move_iterator<iterator_type> operator+ (difference_type n) const
{ return move_iterator<iterator_type>(m_it + n); } { return move_iterator<iterator_type>(m_it + n); }
BOOST_MOVE_FORCEINLINE move_iterator& operator+=(difference_type n) inline move_iterator& operator+=(difference_type n)
{ m_it += n; return *this; } { m_it += n; return *this; }
BOOST_MOVE_FORCEINLINE move_iterator<iterator_type> operator- (difference_type n) const inline move_iterator<iterator_type> operator- (difference_type n) const
{ return move_iterator<iterator_type>(m_it - n); } { return move_iterator<iterator_type>(m_it - n); }
BOOST_MOVE_FORCEINLINE move_iterator& operator-=(difference_type n) inline move_iterator& operator-=(difference_type n)
{ m_it -= n; return *this; } { m_it -= n; return *this; }
BOOST_MOVE_FORCEINLINE reference operator[](difference_type n) const inline reference operator[](difference_type n) const
{ {
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES) #if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)
return m_it[n]; return m_it[n];
@@ -116,28 +116,28 @@ class move_iterator
#endif #endif
} }
BOOST_MOVE_FORCEINLINE friend bool operator==(const move_iterator& x, const move_iterator& y) inline friend bool operator==(const move_iterator& x, const move_iterator& y)
{ return x.m_it == y.m_it; } { return x.m_it == y.m_it; }
BOOST_MOVE_FORCEINLINE friend bool operator!=(const move_iterator& x, const move_iterator& y) inline friend bool operator!=(const move_iterator& x, const move_iterator& y)
{ return x.m_it != y.m_it; } { return x.m_it != y.m_it; }
BOOST_MOVE_FORCEINLINE friend bool operator< (const move_iterator& x, const move_iterator& y) inline friend bool operator< (const move_iterator& x, const move_iterator& y)
{ return x.m_it < y.m_it; } { return x.m_it < y.m_it; }
BOOST_MOVE_FORCEINLINE friend bool operator<=(const move_iterator& x, const move_iterator& y) inline friend bool operator<=(const move_iterator& x, const move_iterator& y)
{ return x.m_it <= y.m_it; } { return x.m_it <= y.m_it; }
BOOST_MOVE_FORCEINLINE friend bool operator> (const move_iterator& x, const move_iterator& y) inline friend bool operator> (const move_iterator& x, const move_iterator& y)
{ return x.m_it > y.m_it; } { return x.m_it > y.m_it; }
BOOST_MOVE_FORCEINLINE friend bool operator>=(const move_iterator& x, const move_iterator& y) inline friend bool operator>=(const move_iterator& x, const move_iterator& y)
{ return x.m_it >= y.m_it; } { return x.m_it >= y.m_it; }
BOOST_MOVE_FORCEINLINE friend difference_type operator-(const move_iterator& x, const move_iterator& y) inline friend difference_type operator-(const move_iterator& x, const move_iterator& y)
{ return x.m_it - y.m_it; } { return x.m_it - y.m_it; }
BOOST_MOVE_FORCEINLINE friend move_iterator operator+(difference_type n, const move_iterator& x) inline friend move_iterator operator+(difference_type n, const move_iterator& x)
{ return move_iterator(x.m_it + n); } { return move_iterator(x.m_it + n); }
private: private:
@@ -170,7 +170,7 @@ struct is_move_iterator< ::boost::move_iterator<I> >
//! //!
//! <b>Returns</b>: move_iterator<It>(i). //! <b>Returns</b>: move_iterator<It>(i).
template<class It> template<class It>
BOOST_MOVE_FORCEINLINE move_iterator<It> make_move_iterator(const It &it) inline move_iterator<It> make_move_iterator(const It &it)
{ return move_iterator<It>(it); } { return move_iterator<It>(it); }
////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////

View File

@@ -92,25 +92,25 @@ struct unique_ptr_data
typedef typename deleter_types<D>::del_ref del_ref; typedef typename deleter_types<D>::del_ref del_ref;
typedef typename deleter_types<D>::del_cref del_cref; typedef typename deleter_types<D>::del_cref del_cref;
BOOST_MOVE_FORCEINLINE unique_ptr_data() BOOST_NOEXCEPT inline unique_ptr_data() BOOST_NOEXCEPT
: m_p(), d() : m_p(), d()
{} {}
BOOST_MOVE_FORCEINLINE explicit unique_ptr_data(P p) BOOST_NOEXCEPT inline explicit unique_ptr_data(P p) BOOST_NOEXCEPT
: m_p(p), d() : m_p(p), d()
{} {}
BOOST_MOVE_FORCEINLINE unique_ptr_data(P p, deleter_arg_type1 d1) BOOST_NOEXCEPT inline unique_ptr_data(P p, deleter_arg_type1 d1) BOOST_NOEXCEPT
: m_p(p), d(d1) : m_p(p), d(d1)
{} {}
template <class U> template <class U>
BOOST_MOVE_FORCEINLINE unique_ptr_data(P p, BOOST_FWD_REF(U) d1) BOOST_NOEXCEPT inline unique_ptr_data(P p, BOOST_FWD_REF(U) d1) BOOST_NOEXCEPT
: m_p(p), d(::boost::forward<U>(d1)) : m_p(p), d(::boost::forward<U>(d1))
{} {}
BOOST_MOVE_FORCEINLINE del_ref deleter() { return d; } inline del_ref deleter() { return d; }
BOOST_MOVE_FORCEINLINE del_cref deleter() const{ return d; } inline del_cref deleter() const{ return d; }
P m_p; P m_p;
D d; D d;
@@ -128,25 +128,25 @@ struct unique_ptr_data<P, D, false>
typedef typename deleter_types<D>::del_ref del_ref; typedef typename deleter_types<D>::del_ref del_ref;
typedef typename deleter_types<D>::del_cref del_cref; typedef typename deleter_types<D>::del_cref del_cref;
BOOST_MOVE_FORCEINLINE unique_ptr_data() BOOST_NOEXCEPT inline unique_ptr_data() BOOST_NOEXCEPT
: D(), m_p() : D(), m_p()
{} {}
BOOST_MOVE_FORCEINLINE explicit unique_ptr_data(P p) BOOST_NOEXCEPT inline explicit unique_ptr_data(P p) BOOST_NOEXCEPT
: D(), m_p(p) : D(), m_p(p)
{} {}
BOOST_MOVE_FORCEINLINE unique_ptr_data(P p, deleter_arg_type1 d1) BOOST_NOEXCEPT inline unique_ptr_data(P p, deleter_arg_type1 d1) BOOST_NOEXCEPT
: D(d1), m_p(p) : D(d1), m_p(p)
{} {}
template <class U> template <class U>
BOOST_MOVE_FORCEINLINE unique_ptr_data(P p, BOOST_FWD_REF(U) d) BOOST_NOEXCEPT inline unique_ptr_data(P p, BOOST_FWD_REF(U) d) BOOST_NOEXCEPT
: D(::boost::forward<U>(d)), m_p(p) : D(::boost::forward<U>(d)), m_p(p)
{} {}
BOOST_MOVE_FORCEINLINE del_ref deleter() BOOST_NOEXCEPT { return static_cast<del_ref>(*this); } inline del_ref deleter() BOOST_NOEXCEPT { return static_cast<del_ref>(*this); }
BOOST_MOVE_FORCEINLINE del_cref deleter() const BOOST_NOEXCEPT { return static_cast<del_cref>(*this); } inline del_cref deleter() const BOOST_NOEXCEPT { return static_cast<del_cref>(*this); }
P m_p; P m_p;
@@ -388,7 +388,7 @@ class unique_ptr
//! //!
//! <b>Remarks</b>: If this constructor is instantiated with a pointer type or reference type //! <b>Remarks</b>: If this constructor is instantiated with a pointer type or reference type
//! for the template argument D, the program is ill-formed. //! for the template argument D, the program is ill-formed.
BOOST_MOVE_FORCEINLINE BOOST_CONSTEXPR unique_ptr() BOOST_NOEXCEPT inline BOOST_CONSTEXPR unique_ptr() BOOST_NOEXCEPT
: m_data() : m_data()
{ {
//If this constructor is instantiated with a pointer type or reference type //If this constructor is instantiated with a pointer type or reference type
@@ -399,7 +399,7 @@ class unique_ptr
//! <b>Effects</b>: Same as <tt>unique_ptr()</tt> (default constructor). //! <b>Effects</b>: Same as <tt>unique_ptr()</tt> (default constructor).
//! //!
BOOST_MOVE_FORCEINLINE BOOST_CONSTEXPR unique_ptr(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) BOOST_NOEXCEPT inline BOOST_CONSTEXPR unique_ptr(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) BOOST_NOEXCEPT
: m_data() : m_data()
{ {
//If this constructor is instantiated with a pointer type or reference type //If this constructor is instantiated with a pointer type or reference type
@@ -422,7 +422,7 @@ class unique_ptr
//! - If T is not an array type and Pointer is implicitly convertible to pointer. //! - If T is not an array type and Pointer is implicitly convertible to pointer.
//! - If T is an array type and Pointer is a more CV qualified pointer to element_type. //! - If T is an array type and Pointer is a more CV qualified pointer to element_type.
template<class Pointer> template<class Pointer>
BOOST_MOVE_FORCEINLINE explicit unique_ptr(Pointer p inline explicit unique_ptr(Pointer p
BOOST_MOVE_DOCIGN(BOOST_MOVE_I typename bmupd::enable_up_ptr<T BOOST_MOVE_I Pointer BOOST_MOVE_I pointer>::type* =0) BOOST_MOVE_DOCIGN(BOOST_MOVE_I typename bmupd::enable_up_ptr<T BOOST_MOVE_I Pointer BOOST_MOVE_I pointer>::type* =0)
) BOOST_NOEXCEPT ) BOOST_NOEXCEPT
: m_data(p) : m_data(p)
@@ -460,7 +460,7 @@ class unique_ptr
//! - If T is not an array type and Pointer is implicitly convertible to pointer. //! - If T is not an array type and Pointer is implicitly convertible to pointer.
//! - If T is an array type and Pointer is a more CV qualified pointer to element_type. //! - If T is an array type and Pointer is a more CV qualified pointer to element_type.
template<class Pointer> template<class Pointer>
BOOST_MOVE_FORCEINLINE unique_ptr(Pointer p, BOOST_MOVE_SEEDOC(deleter_arg_type1) d1 inline unique_ptr(Pointer p, BOOST_MOVE_SEEDOC(deleter_arg_type1) d1
BOOST_MOVE_DOCIGN(BOOST_MOVE_I typename bmupd::enable_up_ptr<T BOOST_MOVE_I Pointer BOOST_MOVE_I pointer>::type* =0) BOOST_MOVE_DOCIGN(BOOST_MOVE_I typename bmupd::enable_up_ptr<T BOOST_MOVE_I Pointer BOOST_MOVE_I pointer>::type* =0)
) BOOST_NOEXCEPT ) BOOST_NOEXCEPT
: m_data(p, d1) : m_data(p, d1)
@@ -473,7 +473,7 @@ class unique_ptr
//! <b>Effects</b>: Same effects as <tt>template<class Pointer> unique_ptr(Pointer p, deleter_arg_type1 d1)</tt> //! <b>Effects</b>: Same effects as <tt>template<class Pointer> unique_ptr(Pointer p, deleter_arg_type1 d1)</tt>
//! and additionally <tt>get() == nullptr</tt> //! and additionally <tt>get() == nullptr</tt>
BOOST_MOVE_FORCEINLINE unique_ptr(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), BOOST_MOVE_SEEDOC(deleter_arg_type1) d1) BOOST_NOEXCEPT inline unique_ptr(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), BOOST_MOVE_SEEDOC(deleter_arg_type1) d1) BOOST_NOEXCEPT
: m_data(pointer(), d1) : m_data(pointer(), d1)
{} {}
@@ -498,7 +498,7 @@ class unique_ptr
//! - If T is not an array type and Pointer is implicitly convertible to pointer. //! - If T is not an array type and Pointer is implicitly convertible to pointer.
//! - If T is an array type and Pointer is a more CV qualified pointer to element_type. //! - If T is an array type and Pointer is a more CV qualified pointer to element_type.
template<class Pointer> template<class Pointer>
BOOST_MOVE_FORCEINLINE unique_ptr(Pointer p, BOOST_MOVE_SEEDOC(deleter_arg_type2) d2 inline unique_ptr(Pointer p, BOOST_MOVE_SEEDOC(deleter_arg_type2) d2
BOOST_MOVE_DOCIGN(BOOST_MOVE_I typename bmupd::enable_up_ptr<T BOOST_MOVE_I Pointer BOOST_MOVE_I pointer>::type* =0) BOOST_MOVE_DOCIGN(BOOST_MOVE_I typename bmupd::enable_up_ptr<T BOOST_MOVE_I Pointer BOOST_MOVE_I pointer>::type* =0)
) BOOST_NOEXCEPT ) BOOST_NOEXCEPT
: m_data(p, ::boost::move(d2)) : m_data(p, ::boost::move(d2))
@@ -511,7 +511,7 @@ class unique_ptr
//! <b>Effects</b>: Same effects as <tt>template<class Pointer> unique_ptr(Pointer p, deleter_arg_type2 d2)</tt> //! <b>Effects</b>: Same effects as <tt>template<class Pointer> unique_ptr(Pointer p, deleter_arg_type2 d2)</tt>
//! and additionally <tt>get() == nullptr</tt> //! and additionally <tt>get() == nullptr</tt>
BOOST_MOVE_FORCEINLINE unique_ptr(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), BOOST_MOVE_SEEDOC(deleter_arg_type2) d2) BOOST_NOEXCEPT inline unique_ptr(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), BOOST_MOVE_SEEDOC(deleter_arg_type2) d2) BOOST_NOEXCEPT
: m_data(pointer(), ::boost::move(d2)) : m_data(pointer(), ::boost::move(d2))
{} {}
@@ -525,7 +525,7 @@ class unique_ptr
//! <b>Postconditions</b>: <tt>get()</tt> yields the value u.get() yielded before the construction. <tt>get_deleter()</tt> //! <b>Postconditions</b>: <tt>get()</tt> yields the value u.get() yielded before the construction. <tt>get_deleter()</tt>
//! returns a reference to the stored deleter that was constructed from u.get_deleter(). If D is a //! returns a reference to the stored deleter that was constructed from u.get_deleter(). If D is a
//! reference type then <tt>get_deleter()</tt> and <tt>u.get_deleter()</tt> both reference the same lvalue deleter. //! reference type then <tt>get_deleter()</tt> and <tt>u.get_deleter()</tt> both reference the same lvalue deleter.
BOOST_MOVE_FORCEINLINE unique_ptr(BOOST_RV_REF(unique_ptr) u) BOOST_NOEXCEPT inline unique_ptr(BOOST_RV_REF(unique_ptr) u) BOOST_NOEXCEPT
: m_data(u.release(), ::boost::move_if_not_lvalue_reference<D>(u.get_deleter())) : m_data(u.release(), ::boost::move_if_not_lvalue_reference<D>(u.get_deleter()))
{} {}
@@ -545,7 +545,7 @@ class unique_ptr
//! <b>Postconditions</b>: <tt>get()</tt> yields the value <tt>u.get()</tt> yielded before the construction. <tt>get_deleter()</tt> //! <b>Postconditions</b>: <tt>get()</tt> yields the value <tt>u.get()</tt> yielded before the construction. <tt>get_deleter()</tt>
//! returns a reference to the stored deleter that was constructed from <tt>u.get_deleter()</tt>. //! returns a reference to the stored deleter that was constructed from <tt>u.get_deleter()</tt>.
template <class U, class E> template <class U, class E>
BOOST_MOVE_FORCEINLINE unique_ptr( BOOST_RV_REF_BEG_IF_CXX11 unique_ptr<U, E> BOOST_RV_REF_END_IF_CXX11 u inline unique_ptr( BOOST_RV_REF_BEG_IF_CXX11 unique_ptr<U, E> BOOST_RV_REF_END_IF_CXX11 u
BOOST_MOVE_DOCIGN(BOOST_MOVE_I typename bmupd::enable_up_moveconv_constr<T BOOST_MOVE_I D BOOST_MOVE_I U BOOST_MOVE_I E>::type* =0) BOOST_MOVE_DOCIGN(BOOST_MOVE_I typename bmupd::enable_up_moveconv_constr<T BOOST_MOVE_I D BOOST_MOVE_I U BOOST_MOVE_I E>::type* =0)
) BOOST_NOEXCEPT ) BOOST_NOEXCEPT
: m_data(u.release(), ::boost::move_if_not_lvalue_reference<E>(u.get_deleter())) : m_data(u.release(), ::boost::move_if_not_lvalue_reference<E>(u.get_deleter()))
@@ -628,7 +628,7 @@ class unique_ptr
//! <b>Returns</b>: <tt>get()[i]</tt>. //! <b>Returns</b>: <tt>get()[i]</tt>.
//! //!
//! <b>Remarks</b: If T is not an array type, the program is ill-formed. //! <b>Remarks</b: If T is not an array type, the program is ill-formed.
BOOST_MOVE_FORCEINLINE BOOST_MOVE_DOC1ST(element_type&, typename bmupmu::add_lvalue_reference<element_type>::type) inline BOOST_MOVE_DOC1ST(element_type&, typename bmupmu::add_lvalue_reference<element_type>::type)
operator[](std::size_t i) const BOOST_NOEXCEPT operator[](std::size_t i) const BOOST_NOEXCEPT
{ {
assert( bmupmu::extent<T>::value == 0 || i < bmupmu::extent<T>::value ); assert( bmupmu::extent<T>::value == 0 || i < bmupmu::extent<T>::value );
@@ -643,7 +643,7 @@ class unique_ptr
//! <b>Note</b>: use typically requires that T be a complete type. //! <b>Note</b>: use typically requires that T be a complete type.
//! //!
//! <b>Remarks</b: If T is an array type, the program is ill-formed. //! <b>Remarks</b: If T is an array type, the program is ill-formed.
BOOST_MOVE_FORCEINLINE pointer operator->() const BOOST_NOEXCEPT inline pointer operator->() const BOOST_NOEXCEPT
{ {
BOOST_MOVE_STATIC_ASSERT((!bmupmu::is_array<T>::value)); BOOST_MOVE_STATIC_ASSERT((!bmupmu::is_array<T>::value));
assert(m_data.m_p); assert(m_data.m_p);
@@ -652,27 +652,27 @@ class unique_ptr
//! <b>Returns</b>: The stored pointer. //! <b>Returns</b>: The stored pointer.
//! //!
BOOST_MOVE_FORCEINLINE pointer get() const BOOST_NOEXCEPT inline pointer get() const BOOST_NOEXCEPT
{ return m_data.m_p; } { return m_data.m_p; }
//! <b>Returns</b>: A reference to the stored deleter. //! <b>Returns</b>: A reference to the stored deleter.
//! //!
BOOST_MOVE_FORCEINLINE BOOST_MOVE_DOC1ST(D&, typename bmupmu::add_lvalue_reference<D>::type) inline BOOST_MOVE_DOC1ST(D&, typename bmupmu::add_lvalue_reference<D>::type)
get_deleter() BOOST_NOEXCEPT get_deleter() BOOST_NOEXCEPT
{ return m_data.deleter(); } { return m_data.deleter(); }
//! <b>Returns</b>: A reference to the stored deleter. //! <b>Returns</b>: A reference to the stored deleter.
//! //!
BOOST_MOVE_FORCEINLINE BOOST_MOVE_DOC1ST(const D&, typename bmupmu::add_const_lvalue_reference<D>::type) inline BOOST_MOVE_DOC1ST(const D&, typename bmupmu::add_const_lvalue_reference<D>::type)
get_deleter() const BOOST_NOEXCEPT get_deleter() const BOOST_NOEXCEPT
{ return m_data.deleter(); } { return m_data.deleter(); }
#ifdef BOOST_MOVE_DOXYGEN_INVOKED #ifdef BOOST_MOVE_DOXYGEN_INVOKED
//! <b>Returns</b>: Returns: get() != nullptr. //! <b>Returns</b>: Returns: get() != nullptr.
//! //!
BOOST_MOVE_FORCEINLINE explicit operator bool inline explicit operator bool
#else #else
BOOST_MOVE_FORCEINLINE operator bmupd::explicit_bool_arg inline operator bmupd::explicit_bool_arg
#endif #endif
()const BOOST_NOEXCEPT ()const BOOST_NOEXCEPT
{ {
@@ -684,7 +684,7 @@ class unique_ptr
//! <b>Postcondition</b>: <tt>get() == nullptr</tt>. //! <b>Postcondition</b>: <tt>get() == nullptr</tt>.
//! //!
//! <b>Returns</b>: The value <tt>get()</tt> had at the start of the call to release. //! <b>Returns</b>: The value <tt>get()</tt> had at the start of the call to release.
BOOST_MOVE_FORCEINLINE pointer release() BOOST_NOEXCEPT inline pointer release() BOOST_NOEXCEPT
{ {
const pointer tmp = m_data.m_p; const pointer tmp = m_data.m_p;
m_data.m_p = pointer(); m_data.m_p = pointer();
@@ -747,19 +747,19 @@ class unique_ptr
//! <b>Effects</b>: Calls <tt>x.swap(y)</tt>. //! <b>Effects</b>: Calls <tt>x.swap(y)</tt>.
//! //!
template <class T, class D> template <class T, class D>
BOOST_MOVE_FORCEINLINE void swap(unique_ptr<T, D> &x, unique_ptr<T, D> &y) BOOST_NOEXCEPT inline void swap(unique_ptr<T, D> &x, unique_ptr<T, D> &y) BOOST_NOEXCEPT
{ x.swap(y); } { x.swap(y); }
//! <b>Returns</b>: <tt>x.get() == y.get()</tt>. //! <b>Returns</b>: <tt>x.get() == y.get()</tt>.
//! //!
template <class T1, class D1, class T2, class D2> template <class T1, class D1, class T2, class D2>
BOOST_MOVE_FORCEINLINE bool operator==(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y) inline bool operator==(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
{ return x.get() == y.get(); } { return x.get() == y.get(); }
//! <b>Returns</b>: <tt>x.get() != y.get()</tt>. //! <b>Returns</b>: <tt>x.get() != y.get()</tt>.
//! //!
template <class T1, class D1, class T2, class D2> template <class T1, class D1, class T2, class D2>
BOOST_MOVE_FORCEINLINE bool operator!=(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y) inline bool operator!=(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
{ return x.get() != y.get(); } { return x.get() != y.get(); }
//! <b>Returns</b>: x.get() < y.get(). //! <b>Returns</b>: x.get() < y.get().
@@ -767,99 +767,99 @@ BOOST_MOVE_FORCEINLINE bool operator!=(const unique_ptr<T1, D1> &x, const unique
//! <b>Remarks</b>: This comparison shall induce a //! <b>Remarks</b>: This comparison shall induce a
//! strict weak ordering betwen pointers. //! strict weak ordering betwen pointers.
template <class T1, class D1, class T2, class D2> template <class T1, class D1, class T2, class D2>
BOOST_MOVE_FORCEINLINE bool operator<(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y) inline bool operator<(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
{ return x.get() < y.get(); } { return x.get() < y.get(); }
//! <b>Returns</b>: !(y < x). //! <b>Returns</b>: !(y < x).
//! //!
template <class T1, class D1, class T2, class D2> template <class T1, class D1, class T2, class D2>
BOOST_MOVE_FORCEINLINE bool operator<=(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y) inline bool operator<=(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
{ return !(y < x); } { return !(y < x); }
//! <b>Returns</b>: y < x. //! <b>Returns</b>: y < x.
//! //!
template <class T1, class D1, class T2, class D2> template <class T1, class D1, class T2, class D2>
BOOST_MOVE_FORCEINLINE bool operator>(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y) inline bool operator>(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
{ return y < x; } { return y < x; }
//! <b>Returns</b>:!(x < y). //! <b>Returns</b>:!(x < y).
//! //!
template <class T1, class D1, class T2, class D2> template <class T1, class D1, class T2, class D2>
BOOST_MOVE_FORCEINLINE bool operator>=(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y) inline bool operator>=(const unique_ptr<T1, D1> &x, const unique_ptr<T2, D2> &y)
{ return !(x < y); } { return !(x < y); }
//! <b>Returns</b>:!x. //! <b>Returns</b>:!x.
//! //!
template <class T, class D> template <class T, class D>
BOOST_MOVE_FORCEINLINE bool operator==(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) BOOST_NOEXCEPT inline bool operator==(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) BOOST_NOEXCEPT
{ return !x; } { return !x; }
//! <b>Returns</b>:!x. //! <b>Returns</b>:!x.
//! //!
template <class T, class D> template <class T, class D>
BOOST_MOVE_FORCEINLINE bool operator==(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x) BOOST_NOEXCEPT inline bool operator==(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x) BOOST_NOEXCEPT
{ return !x; } { return !x; }
//! <b>Returns</b>: (bool)x. //! <b>Returns</b>: (bool)x.
//! //!
template <class T, class D> template <class T, class D>
BOOST_MOVE_FORCEINLINE bool operator!=(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) BOOST_NOEXCEPT inline bool operator!=(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) BOOST_NOEXCEPT
{ return !!x; } { return !!x; }
//! <b>Returns</b>: (bool)x. //! <b>Returns</b>: (bool)x.
//! //!
template <class T, class D> template <class T, class D>
BOOST_MOVE_FORCEINLINE bool operator!=(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x) BOOST_NOEXCEPT inline bool operator!=(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x) BOOST_NOEXCEPT
{ return !!x; } { return !!x; }
//! <b>Requires</b>: <tt>operator </tt> shall induce a strict weak ordering on unique_ptr<T, D>::pointer values. //! <b>Requires</b>: <tt>operator </tt> shall induce a strict weak ordering on unique_ptr<T, D>::pointer values.
//! //!
//! <b>Returns</b>: Returns <tt>x.get() < pointer()</tt>. //! <b>Returns</b>: Returns <tt>x.get() < pointer()</tt>.
template <class T, class D> template <class T, class D>
BOOST_MOVE_FORCEINLINE bool operator<(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) inline bool operator<(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type))
{ return x.get() < typename unique_ptr<T, D>::pointer(); } { return x.get() < typename unique_ptr<T, D>::pointer(); }
//! <b>Requires</b>: <tt>operator </tt> shall induce a strict weak ordering on unique_ptr<T, D>::pointer values. //! <b>Requires</b>: <tt>operator </tt> shall induce a strict weak ordering on unique_ptr<T, D>::pointer values.
//! //!
//! <b>Returns</b>: Returns <tt>pointer() < x.get()</tt>. //! <b>Returns</b>: Returns <tt>pointer() < x.get()</tt>.
template <class T, class D> template <class T, class D>
BOOST_MOVE_FORCEINLINE bool operator<(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x) inline bool operator<(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x)
{ return typename unique_ptr<T, D>::pointer() < x.get(); } { return typename unique_ptr<T, D>::pointer() < x.get(); }
//! <b>Returns</b>: <tt>nullptr < x</tt>. //! <b>Returns</b>: <tt>nullptr < x</tt>.
//! //!
template <class T, class D> template <class T, class D>
BOOST_MOVE_FORCEINLINE bool operator>(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) inline bool operator>(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type))
{ return x.get() > typename unique_ptr<T, D>::pointer(); } { return x.get() > typename unique_ptr<T, D>::pointer(); }
//! <b>Returns</b>: <tt>x < nullptr</tt>. //! <b>Returns</b>: <tt>x < nullptr</tt>.
//! //!
template <class T, class D> template <class T, class D>
BOOST_MOVE_FORCEINLINE bool operator>(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x) inline bool operator>(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x)
{ return typename unique_ptr<T, D>::pointer() > x.get(); } { return typename unique_ptr<T, D>::pointer() > x.get(); }
//! <b>Returns</b>: <tt>!(nullptr < x)</tt>. //! <b>Returns</b>: <tt>!(nullptr < x)</tt>.
//! //!
template <class T, class D> template <class T, class D>
BOOST_MOVE_FORCEINLINE bool operator<=(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) inline bool operator<=(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type))
{ return !(bmupd::nullptr_type() < x); } { return !(bmupd::nullptr_type() < x); }
//! <b>Returns</b>: <tt>!(x < nullptr)</tt>. //! <b>Returns</b>: <tt>!(x < nullptr)</tt>.
//! //!
template <class T, class D> template <class T, class D>
BOOST_MOVE_FORCEINLINE bool operator<=(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x) inline bool operator<=(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x)
{ return !(x < bmupd::nullptr_type()); } { return !(x < bmupd::nullptr_type()); }
//! <b>Returns</b>: <tt>!(x < nullptr)</tt>. //! <b>Returns</b>: <tt>!(x < nullptr)</tt>.
//! //!
template <class T, class D> template <class T, class D>
BOOST_MOVE_FORCEINLINE bool operator>=(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type)) inline bool operator>=(const unique_ptr<T, D> &x, BOOST_MOVE_DOC0PTR(bmupd::nullptr_type))
{ return !(x < bmupd::nullptr_type()); } { return !(x < bmupd::nullptr_type()); }
//! <b>Returns</b>: <tt>!(nullptr < x)</tt>. //! <b>Returns</b>: <tt>!(nullptr < x)</tt>.
//! //!
template <class T, class D> template <class T, class D>
BOOST_MOVE_FORCEINLINE bool operator>=(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x) inline bool operator>=(BOOST_MOVE_DOC0PTR(bmupd::nullptr_type), const unique_ptr<T, D> &x)
{ return !(bmupd::nullptr_type() < x); } { return !(bmupd::nullptr_type() < x); }
} //namespace movelib { } //namespace movelib {