summaryrefslogtreecommitdiffstats
path: root/contrib/src/boost/move
diff options
context:
space:
mode:
authorStefan Radomski <github@mintwerk.de>2017-01-13 11:58:41 (GMT)
committerStefan Radomski <github@mintwerk.de>2017-01-13 11:58:41 (GMT)
commit0aa0fe08dc308c94379c47d0bf9745e341cb4c81 (patch)
tree514b009d3d1658af6988e059874014fc26fc0395 /contrib/src/boost/move
parent6952ce94491e4b7bc2acded0788e4609ca2c76e8 (diff)
downloaduscxml-0aa0fe08dc308c94379c47d0bf9745e341cb4c81.zip
uscxml-0aa0fe08dc308c94379c47d0bf9745e341cb4c81.tar.gz
uscxml-0aa0fe08dc308c94379c47d0bf9745e341cb4c81.tar.bz2
Updated boost headers
Diffstat (limited to 'contrib/src/boost/move')
-rw-r--r--contrib/src/boost/move/algo/move.hpp155
-rw-r--r--contrib/src/boost/move/algorithm.hpp117
-rw-r--r--contrib/src/boost/move/core.hpp27
-rw-r--r--contrib/src/boost/move/detail/config_begin.hpp2
-rw-r--r--contrib/src/boost/move/detail/iterator_traits.hpp4
-rw-r--r--contrib/src/boost/move/detail/meta_utils.hpp39
-rw-r--r--contrib/src/boost/move/detail/meta_utils_core.hpp12
-rw-r--r--contrib/src/boost/move/detail/type_traits.hpp34
-rw-r--r--contrib/src/boost/move/detail/workaround.hpp14
-rw-r--r--contrib/src/boost/move/iterator.hpp65
-rw-r--r--contrib/src/boost/move/utility.hpp15
-rw-r--r--contrib/src/boost/move/utility_core.hpp33
12 files changed, 303 insertions, 214 deletions
diff --git a/contrib/src/boost/move/algo/move.hpp b/contrib/src/boost/move/algo/move.hpp
new file mode 100644
index 0000000..d35f04a
--- /dev/null
+++ b/contrib/src/boost/move/algo/move.hpp
@@ -0,0 +1,155 @@
+//////////////////////////////////////////////////////////////////////////////
+//
+// (C) Copyright Ion Gaztanaga 2012-2016.
+// Distributed under the Boost Software License, Version 1.0.
+// (See accompanying file LICENSE_1_0.txt or copy at
+// http://www.boost.org/LICENSE_1_0.txt)
+//
+// See http://www.boost.org/libs/move for documentation.
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! \file
+
+#ifndef BOOST_MOVE_ALGO_MOVE_HPP
+#define BOOST_MOVE_ALGO_MOVE_HPP
+
+#ifndef BOOST_CONFIG_HPP
+# include <boost/config.hpp>
+#endif
+#
+#if defined(BOOST_HAS_PRAGMA_ONCE)
+# pragma once
+#endif
+
+#include <boost/move/detail/config_begin.hpp>
+
+#include <boost/move/utility_core.hpp>
+#include <boost/move/detail/iterator_traits.hpp>
+#include <boost/detail/no_exceptions_support.hpp>
+
+namespace boost {
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// move
+//
+//////////////////////////////////////////////////////////////////////////////
+
+#if !defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
+
+ //! <b>Effects</b>: Moves elements in the range [first,last) into the range [result,result + (last -
+ //! first)) starting from first and proceeding to last. For each non-negative integer n < (last-first),
+ //! performs *(result + n) = ::boost::move (*(first + n)).
+ //!
+ //! <b>Effects</b>: result + (last - first).
+ //!
+ //! <b>Requires</b>: result shall not be in the range [first,last).
+ //!
+ //! <b>Complexity</b>: Exactly last - first move assignments.
+ template <typename I, // I models InputIterator
+ typename O> // O models OutputIterator
+ O move(I f, I l, O result)
+ {
+ while (f != l) {
+ *result = ::boost::move(*f);
+ ++f; ++result;
+ }
+ return result;
+ }
+
+ //////////////////////////////////////////////////////////////////////////////
+ //
+ // move_backward
+ //
+ //////////////////////////////////////////////////////////////////////////////
+
+ //! <b>Effects</b>: Moves elements in the range [first,last) into the range
+ //! [result - (last-first),result) starting from last - 1 and proceeding to
+ //! first. For each positive integer n <= (last - first),
+ //! performs *(result - n) = ::boost::move(*(last - n)).
+ //!
+ //! <b>Requires</b>: result shall not be in the range [first,last).
+ //!
+ //! <b>Returns</b>: result - (last - first).
+ //!
+ //! <b>Complexity</b>: Exactly last - first assignments.
+ template <typename I, // I models BidirectionalIterator
+ typename O> // O models BidirectionalIterator
+ O move_backward(I f, I l, O result)
+ {
+ while (f != l) {
+ --l; --result;
+ *result = ::boost::move(*l);
+ }
+ return result;
+ }
+
+#else
+
+ using ::std::move_backward;
+
+#endif //!defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
+
+//////////////////////////////////////////////////////////////////////////////
+//
+// uninitialized_move
+//
+//////////////////////////////////////////////////////////////////////////////
+
+//! <b>Effects</b>:
+//! \code
+//! for (; first != last; ++result, ++first)
+//! new (static_cast<void*>(&*result))
+//! typename iterator_traits<ForwardIterator>::value_type(boost::move(*first));
+//! \endcode
+//!
+//! <b>Returns</b>: result
+template
+ <typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+F uninitialized_move(I f, I l, F r
+ /// @cond
+// ,typename ::boost::move_detail::enable_if<has_move_emulation_enabled<typename boost::movelib::iterator_traits<I>::value_type> >::type* = 0
+ /// @endcond
+ )
+{
+ typedef typename boost::movelib::iterator_traits<I>::value_type input_value_type;
+
+ F back = r;
+ BOOST_TRY{
+ while (f != l) {
+ void * const addr = static_cast<void*>(::boost::move_detail::addressof(*r));
+ ::new(addr) input_value_type(::boost::move(*f));
+ ++f; ++r;
+ }
+ }
+ BOOST_CATCH(...){
+ for (; back != r; ++back){
+ back->~input_value_type();
+ }
+ BOOST_RETHROW;
+ }
+ BOOST_CATCH_END
+ return r;
+}
+
+/// @cond
+/*
+template
+ <typename I, // I models InputIterator
+ typename F> // F models ForwardIterator
+F uninitialized_move(I f, I l, F r,
+ typename ::boost::move_detail::disable_if<has_move_emulation_enabled<typename boost::movelib::iterator_traits<I>::value_type> >::type* = 0)
+{
+ return std::uninitialized_copy(f, l, r);
+}
+*/
+
+/// @endcond
+
+} //namespace boost {
+
+#include <boost/move/detail/config_end.hpp>
+
+#endif //#ifndef BOOST_MOVE_ALGO_MOVE_HPP
diff --git a/contrib/src/boost/move/algorithm.hpp b/contrib/src/boost/move/algorithm.hpp
index fbda0f4..825d771 100644
--- a/contrib/src/boost/move/algorithm.hpp
+++ b/contrib/src/boost/move/algorithm.hpp
@@ -26,6 +26,7 @@
#include <boost/move/utility_core.hpp>
#include <boost/move/iterator.hpp>
+#include <boost/move/algo/move.hpp>
#include <boost/detail/no_exceptions_support.hpp>
#include <algorithm> //copy, copy_backward
@@ -35,122 +36,6 @@ namespace boost {
//////////////////////////////////////////////////////////////////////////////
//
-// move
-//
-//////////////////////////////////////////////////////////////////////////////
-
-#if !defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
-
- //! <b>Effects</b>: Moves elements in the range [first,last) into the range [result,result + (last -
- //! first)) starting from first and proceeding to last. For each non-negative integer n < (last-first),
- //! performs *(result + n) = ::boost::move (*(first + n)).
- //!
- //! <b>Effects</b>: result + (last - first).
- //!
- //! <b>Requires</b>: result shall not be in the range [first,last).
- //!
- //! <b>Complexity</b>: Exactly last - first move assignments.
- template <typename I, // I models InputIterator
- typename O> // O models OutputIterator
- O move(I f, I l, O result)
- {
- while (f != l) {
- *result = ::boost::move(*f);
- ++f; ++result;
- }
- return result;
- }
-
- //////////////////////////////////////////////////////////////////////////////
- //
- // move_backward
- //
- //////////////////////////////////////////////////////////////////////////////
-
- //! <b>Effects</b>: Moves elements in the range [first,last) into the range
- //! [result - (last-first),result) starting from last - 1 and proceeding to
- //! first. For each positive integer n <= (last - first),
- //! performs *(result - n) = ::boost::move(*(last - n)).
- //!
- //! <b>Requires</b>: result shall not be in the range [first,last).
- //!
- //! <b>Returns</b>: result - (last - first).
- //!
- //! <b>Complexity</b>: Exactly last - first assignments.
- template <typename I, // I models BidirectionalIterator
- typename O> // O models BidirectionalIterator
- O move_backward(I f, I l, O result)
- {
- while (f != l) {
- --l; --result;
- *result = ::boost::move(*l);
- }
- return result;
- }
-
-#else
-
- using ::std::move_backward;
-
-#endif //!defined(BOOST_MOVE_USE_STANDARD_LIBRARY_MOVE)
-
-//////////////////////////////////////////////////////////////////////////////
-//
-// uninitialized_move
-//
-//////////////////////////////////////////////////////////////////////////////
-
-//! <b>Effects</b>:
-//! \code
-//! for (; first != last; ++result, ++first)
-//! new (static_cast<void*>(&*result))
-//! typename iterator_traits<ForwardIterator>::value_type(boost::move(*first));
-//! \endcode
-//!
-//! <b>Returns</b>: result
-template
- <typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-F uninitialized_move(I f, I l, F r
- /// @cond
-// ,typename ::boost::move_detail::enable_if<has_move_emulation_enabled<typename std::iterator_traits<I>::value_type> >::type* = 0
- /// @endcond
- )
-{
- typedef typename std::iterator_traits<I>::value_type input_value_type;
-
- F back = r;
- BOOST_TRY{
- while (f != l) {
- void * const addr = static_cast<void*>(::boost::move_detail::addressof(*r));
- ::new(addr) input_value_type(::boost::move(*f));
- ++f; ++r;
- }
- }
- BOOST_CATCH(...){
- for (; back != r; ++back){
- back->~input_value_type();
- }
- BOOST_RETHROW;
- }
- BOOST_CATCH_END
- return r;
-}
-
-/// @cond
-/*
-template
- <typename I, // I models InputIterator
- typename F> // F models ForwardIterator
-F uninitialized_move(I f, I l, F r,
- typename ::boost::move_detail::disable_if<has_move_emulation_enabled<typename std::iterator_traits<I>::value_type> >::type* = 0)
-{
- return std::uninitialized_copy(f, l, r);
-}
-*/
-
-//////////////////////////////////////////////////////////////////////////////
-//
// uninitialized_copy_or_move
//
//////////////////////////////////////////////////////////////////////////////
diff --git a/contrib/src/boost/move/core.hpp b/contrib/src/boost/move/core.hpp
index 54aece0..1dd8a8c 100644
--- a/contrib/src/boost/move/core.hpp
+++ b/contrib/src/boost/move/core.hpp
@@ -197,7 +197,7 @@
namespace move_detail {
template <class Ret, class T>
- inline typename ::boost::move_detail::enable_if_c
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
< ::boost::move_detail::is_lvalue_reference<Ret>::value ||
!::boost::has_move_emulation_enabled<T>::value
, T&>::type
@@ -207,7 +207,7 @@
}
template <class Ret, class T>
- inline typename ::boost::move_detail::enable_if_c
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
< !::boost::move_detail::is_lvalue_reference<Ret>::value &&
::boost::has_move_emulation_enabled<T>::value
, ::boost::rv<T>&>::type
@@ -217,7 +217,7 @@
}
template <class Ret, class T>
- inline typename ::boost::move_detail::enable_if_c
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
< !::boost::move_detail::is_lvalue_reference<Ret>::value &&
::boost::has_move_emulation_enabled<T>::value
, ::boost::rv<T>&>::type
@@ -245,9 +245,9 @@
#define BOOST_MOVABLE_BUT_NOT_COPYABLE(TYPE)\
BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\
public:\
- operator ::boost::rv<TYPE>&() \
+ BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
{ return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
- operator const ::boost::rv<TYPE>&() const \
+ BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
{ return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\
private:\
//
@@ -260,21 +260,21 @@
#define BOOST_COPYABLE_AND_MOVABLE(TYPE)\
public:\
- TYPE& operator=(TYPE &t)\
- { this->operator=(const_cast<const TYPE &>(t)); return *this;}\
+ BOOST_MOVE_FORCEINLINE TYPE& operator=(TYPE &t)\
+ { this->operator=(const_cast<const TYPE&>(t)); return *this;}\
public:\
- operator ::boost::rv<TYPE>&() \
+ BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
{ return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
- operator const ::boost::rv<TYPE>&() const \
+ BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
{ return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\
private:\
//
#define BOOST_COPYABLE_AND_MOVABLE_ALT(TYPE)\
public:\
- operator ::boost::rv<TYPE>&() \
+ BOOST_MOVE_FORCEINLINE operator ::boost::rv<TYPE>&() \
{ return *BOOST_MOVE_TO_RV_CAST(::boost::rv<TYPE>*, this); }\
- operator const ::boost::rv<TYPE>&() const \
+ BOOST_MOVE_FORCEINLINE operator const ::boost::rv<TYPE>&() const \
{ return *BOOST_MOVE_TO_RV_CAST(const ::boost::rv<TYPE>*, this); }\
private:\
//
@@ -301,6 +301,7 @@
BOOST_MOVE_IMPL_NO_COPY_CTOR_OR_ASSIGN(TYPE)\
public:\
typedef int boost_move_emulation_t;\
+ private:\
//
//! This macro marks a type as copyable and movable.
@@ -450,7 +451,7 @@
namespace move_detail {
template <class Ret, class T>
- inline typename ::boost::move_detail::enable_if_c
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
< ::boost::move_detail::is_lvalue_reference<Ret>::value
, T&>::type
move_return(T& x) BOOST_NOEXCEPT
@@ -459,7 +460,7 @@
}
template <class Ret, class T>
- inline typename ::boost::move_detail::enable_if_c
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
< !::boost::move_detail::is_lvalue_reference<Ret>::value
, Ret && >::type
move_return(T&& t) BOOST_NOEXCEPT
diff --git a/contrib/src/boost/move/detail/config_begin.hpp b/contrib/src/boost/move/detail/config_begin.hpp
index 342390b..637eb15 100644
--- a/contrib/src/boost/move/detail/config_begin.hpp
+++ b/contrib/src/boost/move/detail/config_begin.hpp
@@ -16,4 +16,6 @@
# pragma warning (disable : 4324) // structure was padded due to __declspec(align())
# pragma warning (disable : 4675) // "function": resolved overload was found by argument-dependent lookup
# pragma warning (disable : 4996) // "function": was declared deprecated (_CRT_SECURE_NO_DEPRECATE/_SCL_SECURE_NO_WARNINGS)
+# pragma warning (disable : 4714) // "function": marked as __forceinline not inlined
+# pragma warning (disable : 4127) // conditional expression is constant
#endif
diff --git a/contrib/src/boost/move/detail/iterator_traits.hpp b/contrib/src/boost/move/detail/iterator_traits.hpp
index a75ee03..5ffcb2c 100644
--- a/contrib/src/boost/move/detail/iterator_traits.hpp
+++ b/contrib/src/boost/move/detail/iterator_traits.hpp
@@ -23,6 +23,7 @@
#endif
#include <cstddef>
+#include <boost/move/detail/type_traits.hpp>
#include <boost/move/detail/std_ns_begin.hpp>
BOOST_MOVE_STD_NS_BEG
@@ -46,6 +47,7 @@ struct iterator_traits
typedef typename Iterator::pointer pointer;
typedef typename Iterator::reference reference;
typedef typename Iterator::iterator_category iterator_category;
+ typedef typename boost::move_detail::make_unsigned<difference_type>::type size_type;
};
template<class T>
@@ -56,6 +58,7 @@ struct iterator_traits<T*>
typedef T* pointer;
typedef T& reference;
typedef std::random_access_iterator_tag iterator_category;
+ typedef typename boost::move_detail::make_unsigned<difference_type>::type size_type;
};
template<class T>
@@ -66,6 +69,7 @@ struct iterator_traits<const T*>
typedef const T* pointer;
typedef const T& reference;
typedef std::random_access_iterator_tag iterator_category;
+ typedef typename boost::move_detail::make_unsigned<difference_type>::type size_type;
};
}} //namespace boost { namespace movelib{
diff --git a/contrib/src/boost/move/detail/meta_utils.hpp b/contrib/src/boost/move/detail/meta_utils.hpp
index 323c13a..e45394c 100644
--- a/contrib/src/boost/move/detail/meta_utils.hpp
+++ b/contrib/src/boost/move/detail/meta_utils.hpp
@@ -14,13 +14,11 @@
#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
#define BOOST_MOVE_DETAIL_META_UTILS_HPP
-#ifndef BOOST_CONFIG_HPP
-# include <boost/config.hpp>
-#endif
-#
#if defined(BOOST_HAS_PRAGMA_ONCE)
# pragma once
#endif
+#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/workaround.hpp> //forceinline
#include <boost/move/detail/meta_utils_core.hpp>
#include <cstddef> //for std::size_t
@@ -245,8 +243,8 @@ template<class T>
struct addr_impl_ref
{
T & v_;
- inline addr_impl_ref( T & v ): v_( v ) {}
- inline operator T& () const { return v_; }
+ BOOST_MOVE_FORCEINLINE addr_impl_ref( T & v ): v_( v ) {}
+ BOOST_MOVE_FORCEINLINE operator T& () const { return v_; }
private:
addr_impl_ref & operator=(const addr_impl_ref &);
@@ -255,18 +253,18 @@ struct addr_impl_ref
template<class T>
struct addressof_impl
{
- static inline T * f( T & v, long )
+ BOOST_MOVE_FORCEINLINE static T * f( T & v, long )
{
return reinterpret_cast<T*>(
&const_cast<char&>(reinterpret_cast<const volatile char &>(v)));
}
- static inline T * f( T * v, int )
+ BOOST_MOVE_FORCEINLINE static T * f( T * v, int )
{ return v; }
};
template<class T>
-inline T * addressof( T & v )
+BOOST_MOVE_FORCEINLINE T * addressof( T & v )
{
return ::boost::move_detail::addressof_impl<T>::f
( ::boost::move_detail::addr_impl_ref<T>( v ), 0 );
@@ -314,6 +312,17 @@ class is_convertible
#endif
+template <class T, class U, bool IsSame = is_same<T, U>::value>
+struct is_same_or_convertible
+ : is_convertible<T, U>
+{};
+
+template <class T, class U>
+struct is_same_or_convertible<T, U, true>
+{
+ static const bool value = true;
+};
+
template<
bool C
, typename F1
@@ -347,6 +356,16 @@ struct disable_if_convertible
: disable_if< is_convertible<T, U>, R>
{};
+template<class T, class U, class R = void>
+struct enable_if_same_or_convertible
+ : enable_if< is_same_or_convertible<T, U>, R>
+{};
+
+template<class T, class U, class R = void>
+struct disable_if_same_or_convertible
+ : disable_if< is_same_or_convertible<T, U>, R>
+{};
+
//////////////////////////////////////////////////////////////////////////////
//
// and_
@@ -561,4 +580,6 @@ template< class T > struct remove_rvalue_reference { typedef T type; };
} //namespace move_detail {
} //namespace boost {
+#include <boost/move/detail/config_end.hpp>
+
#endif //#ifndef BOOST_MOVE_DETAIL_META_UTILS_HPP
diff --git a/contrib/src/boost/move/detail/meta_utils_core.hpp b/contrib/src/boost/move/detail/meta_utils_core.hpp
index 4d715a0..40dbb6e 100644
--- a/contrib/src/boost/move/detail/meta_utils_core.hpp
+++ b/contrib/src/boost/move/detail/meta_utils_core.hpp
@@ -114,6 +114,18 @@ struct is_same<T, T>
static const bool value = true;
};
+//////////////////////////////////////
+// enable_if_same
+//////////////////////////////////////
+template <class T, class U, class R = void>
+struct enable_if_same : enable_if<is_same<T, U>, R> {};
+
+//////////////////////////////////////
+// disable_if_same
+//////////////////////////////////////
+template <class T, class U, class R = void>
+struct disable_if_same : disable_if<is_same<T, U>, R> {};
+
} //namespace move_detail {
} //namespace boost {
diff --git a/contrib/src/boost/move/detail/type_traits.hpp b/contrib/src/boost/move/detail/type_traits.hpp
index 816fdca..1b5d838 100644
--- a/contrib/src/boost/move/detail/type_traits.hpp
+++ b/contrib/src/boost/move/detail/type_traits.hpp
@@ -55,8 +55,10 @@
// BOOST_MOVE_IS_POD(T) should evaluate to true if T is a POD type
// BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) should evaluate to true if "T x;" has no effect
// BOOST_MOVE_HAS_TRIVIAL_COPY(T) should evaluate to true if T(t) <==> memcpy
+// (Note: this trait does not guarantee T is copy constructible, the copy constructor could be deleted but still be trivial)
// BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) should evaluate to true if T(boost::move(t)) <==> memcpy
// BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) should evaluate to true if t = u <==> memcpy
+// (Note: this trait does not guarantee T is assignable , the copy assignmen could be deleted but still be trivial)
// BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) should evaluate to true if t = boost::move(u) <==> memcpy
// BOOST_MOVE_HAS_TRIVIAL_DESTRUCTOR(T) should evaluate to true if ~T() has no effect
// BOOST_MOVE_HAS_NOTHROW_CONSTRUCTOR(T) should evaluate to true if "T x;" can not throw
@@ -117,9 +119,7 @@
# define BOOST_MOVE_HAS_TRIVIAL_CONSTRUCTOR(T) __has_trivial_constructor(T)
# endif
# if __has_feature(has_trivial_copy)
-# //There are problems with deleted copy constructors detected as trivially copyable.
-# //http://stackoverflow.com/questions/12754886/has-trivial-copy-behaves-differently-in-clang-and-gcc-whos-right
-# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) (__has_trivial_copy(T) && ::boost::move_detail::is_copy_constructible<T>::value)
+# define BOOST_MOVE_HAS_TRIVIAL_COPY(T) __has_trivial_copy(T)
# endif
# if __has_feature(has_trivial_assign)
# define BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T) (__has_trivial_assign(T) )
@@ -235,7 +235,9 @@
#endif
#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY
- #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_COPY(T)
+ #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value ||\
+ (::boost::move_detail::is_copy_constructible<T>::value &&\
+ BOOST_MOVE_HAS_TRIVIAL_COPY(T))
#else
#define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
#endif
@@ -246,12 +248,6 @@
#define BOOST_MOVE_IS_TRIVIALLY_DEFAULT_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
#endif
-#ifdef BOOST_MOVE_HAS_TRIVIAL_COPY
- #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_COPY(T)
-#else
- #define BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) ::boost::move_detail::is_pod<T>::value
-#endif
-
#ifdef BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR
#define BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T) BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T)
#else
@@ -259,7 +255,9 @@
#endif
#ifdef BOOST_MOVE_HAS_TRIVIAL_ASSIGN
- #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T)
+ #define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value ||\
+ ( ::boost::move_detail::is_copy_assignable<T>::value &&\
+ BOOST_MOVE_HAS_TRIVIAL_ASSIGN(T))
#else
#define BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) ::boost::move_detail::is_pod<T>::value
#endif
@@ -821,9 +819,7 @@ struct is_trivially_copy_constructible
{
//In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with
//deleted copy constructors so make sure the type is copy constructible.
- static const bool value = ::boost::move_detail::is_pod<T>::value ||
- ( ::boost::move_detail::is_copy_constructible<T>::value &&
- BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T) );
+ static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE(T);
};
//////////////////////////////////////
@@ -831,7 +827,7 @@ struct is_trivially_copy_constructible
//////////////////////////////////////
template<class T>
struct is_trivially_move_constructible
-{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); };
+{ static const bool value = BOOST_MOVE_IS_TRIVIALLY_MOVE_CONSTRUCTIBLE(T); };
//////////////////////////////////////
// is_trivially_copy_assignable
@@ -841,9 +837,7 @@ struct is_trivially_copy_assignable
{
//In several compilers BOOST_MOVE_IS_TRIVIALLY_COPY_CONSTRUCTIBLE return true even with
//deleted copy constructors so make sure the type is copy constructible.
- static const bool value = ::boost::move_detail::is_pod<T>::value ||
- ( ::boost::move_detail::is_copy_assignable<T>::value &&
- BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T) );
+ static const bool value = BOOST_MOVE_IS_TRIVIALLY_COPY_ASSIGNABLE(T);
};
//////////////////////////////////////
@@ -1005,7 +999,7 @@ BOOST_MOVE_ALIGNED_STORAGE_WITH_BOOST_ALIGNMENT(0x1000)
template<class T, std::size_t Len>
union aligned_union
-{
+{
T aligner;
char dummy[Len];
};
@@ -1023,7 +1017,7 @@ struct aligned_next<Len, Align, T, true>
//End of search defaults to max_align_t
template<std::size_t Len, std::size_t Align>
struct aligned_next<Len, Align, max_align_t, false>
-{ typedef aligned_union<max_align_t, Len> type; };
+{ typedef aligned_union<max_align_t, Len> type; };
//Now define a search list through types
#define BOOST_MOVE_ALIGNED_NEXT_STEP(TYPE, NEXT_TYPE)\
diff --git a/contrib/src/boost/move/detail/workaround.hpp b/contrib/src/boost/move/detail/workaround.hpp
index b3f81b1..1d16f24 100644
--- a/contrib/src/boost/move/detail/workaround.hpp
+++ b/contrib/src/boost/move/detail/workaround.hpp
@@ -52,4 +52,18 @@
#define BOOST_MOVE_MSVC_AUTO_MOVE_RETURN_BUG
#endif
+#if defined(BOOST_MOVE_DISABLE_FORCEINLINE)
+ #define BOOST_MOVE_FORCEINLINE inline
+#elif defined(BOOST_MOVE_FORCEINLINE_IS_BOOST_FORCELINE)
+ #define BOOST_MOVE_FORCEINLINE BOOST_FORCEINLINE
+#elif defined(BOOST_MSVC) && defined(_DEBUG)
+ //"__forceinline" and MSVC seems to have some bugs in debug mode
+ #define BOOST_MOVE_FORCEINLINE inline
+#elif defined(__GNUC__) && ((__GNUC__ < 4) || (__GNUC__ == 4 && (__GNUC_MINOR__ < 5)))
+ //Older GCCs have problems with forceinline
+ #define BOOST_MOVE_FORCEINLINE inline
+#else
+ #define BOOST_MOVE_FORCEINLINE BOOST_FORCEINLINE
+#endif
+
#endif //#ifndef BOOST_MOVE_DETAIL_WORKAROUND_HPP
diff --git a/contrib/src/boost/move/iterator.hpp b/contrib/src/boost/move/iterator.hpp
index 1b39e26..f36df23 100644
--- a/contrib/src/boost/move/iterator.hpp
+++ b/contrib/src/boost/move/iterator.hpp
@@ -23,6 +23,7 @@
#endif
#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/workaround.hpp> //forceinline
#include <boost/move/detail/iterator_traits.hpp>
#include <boost/move/utility_core.hpp>
@@ -57,22 +58,20 @@ class move_iterator
typedef typename boost::movelib::iterator_traits<iterator_type>::difference_type difference_type;
typedef typename boost::movelib::iterator_traits<iterator_type>::iterator_category iterator_category;
- move_iterator()
+ BOOST_MOVE_FORCEINLINE move_iterator()
+ : m_it()
{}
- explicit move_iterator(It i)
+ BOOST_MOVE_FORCEINLINE explicit move_iterator(const It &i)
: m_it(i)
{}
template <class U>
- move_iterator(const move_iterator<U>& u)
- : m_it(u.base())
+ BOOST_MOVE_FORCEINLINE move_iterator(const move_iterator<U>& u)
+ : m_it(u.m_it)
{}
- iterator_type base() const
- { return m_it; }
-
- reference operator*() const
+ BOOST_MOVE_FORCEINLINE reference operator*() const
{
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)
return *m_it;
@@ -81,34 +80,34 @@ class move_iterator
#endif
}
- pointer operator->() const
+ BOOST_MOVE_FORCEINLINE pointer operator->() const
{ return m_it; }
- move_iterator& operator++()
+ BOOST_MOVE_FORCEINLINE move_iterator& operator++()
{ ++m_it; return *this; }
- move_iterator<iterator_type> operator++(int)
+ BOOST_MOVE_FORCEINLINE move_iterator<iterator_type> operator++(int)
{ move_iterator<iterator_type> tmp(*this); ++(*this); return tmp; }
- move_iterator& operator--()
+ BOOST_MOVE_FORCEINLINE move_iterator& operator--()
{ --m_it; return *this; }
- move_iterator<iterator_type> operator--(int)
+ BOOST_MOVE_FORCEINLINE move_iterator<iterator_type> operator--(int)
{ move_iterator<iterator_type> tmp(*this); --(*this); return tmp; }
move_iterator<iterator_type> operator+ (difference_type n) const
{ return move_iterator<iterator_type>(m_it + n); }
- move_iterator& operator+=(difference_type n)
+ BOOST_MOVE_FORCEINLINE move_iterator& operator+=(difference_type n)
{ m_it += n; return *this; }
- move_iterator<iterator_type> operator- (difference_type n) const
+ BOOST_MOVE_FORCEINLINE move_iterator<iterator_type> operator- (difference_type n) const
{ return move_iterator<iterator_type>(m_it - n); }
- move_iterator& operator-=(difference_type n)
+ BOOST_MOVE_FORCEINLINE move_iterator& operator-=(difference_type n)
{ m_it -= n; return *this; }
- reference operator[](difference_type n) const
+ BOOST_MOVE_FORCEINLINE reference operator[](difference_type n) const
{
#if defined(BOOST_NO_CXX11_RVALUE_REFERENCES) || defined(BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES)
return m_it[n];
@@ -117,29 +116,29 @@ class move_iterator
#endif
}
- friend bool operator==(const move_iterator& x, const move_iterator& y)
- { return x.base() == y.base(); }
+ BOOST_MOVE_FORCEINLINE friend bool operator==(const move_iterator& x, const move_iterator& y)
+ { return x.m_it == y.m_it; }
- friend bool operator!=(const move_iterator& x, const move_iterator& y)
- { return x.base() != y.base(); }
+ BOOST_MOVE_FORCEINLINE friend bool operator!=(const move_iterator& x, const move_iterator& y)
+ { return x.m_it != y.m_it; }
- friend bool operator< (const move_iterator& x, const move_iterator& y)
- { return x.base() < y.base(); }
+ BOOST_MOVE_FORCEINLINE friend bool operator< (const move_iterator& x, const move_iterator& y)
+ { return x.m_it < y.m_it; }
- friend bool operator<=(const move_iterator& x, const move_iterator& y)
- { return x.base() <= y.base(); }
+ BOOST_MOVE_FORCEINLINE friend bool operator<=(const move_iterator& x, const move_iterator& y)
+ { return x.m_it <= y.m_it; }
- friend bool operator> (const move_iterator& x, const move_iterator& y)
- { return x.base() > y.base(); }
+ BOOST_MOVE_FORCEINLINE friend bool operator> (const move_iterator& x, const move_iterator& y)
+ { return x.m_it > y.m_it; }
- friend bool operator>=(const move_iterator& x, const move_iterator& y)
- { return x.base() >= y.base(); }
+ BOOST_MOVE_FORCEINLINE friend bool operator>=(const move_iterator& x, const move_iterator& y)
+ { return x.m_it >= y.m_it; }
- friend difference_type operator-(const move_iterator& x, const move_iterator& y)
- { return x.base() - y.base(); }
+ BOOST_MOVE_FORCEINLINE friend difference_type operator-(const move_iterator& x, const move_iterator& y)
+ { return x.m_it - y.m_it; }
- friend move_iterator operator+(difference_type n, const move_iterator& x)
- { return move_iterator(x.base() + n); }
+ BOOST_MOVE_FORCEINLINE friend move_iterator operator+(difference_type n, const move_iterator& x)
+ { return move_iterator(x.m_it + n); }
private:
It m_it;
diff --git a/contrib/src/boost/move/utility.hpp b/contrib/src/boost/move/utility.hpp
index 8f9c20b..28de793 100644
--- a/contrib/src/boost/move/utility.hpp
+++ b/contrib/src/boost/move/utility.hpp
@@ -25,6 +25,7 @@
#endif
#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/workaround.hpp> //forceinline
#include <boost/move/utility_core.hpp>
#include <boost/move/traits.hpp>
@@ -39,7 +40,7 @@
//////////////////////////////////////////////////////////////////////////////
template <class T>
- inline typename ::boost::move_detail::enable_if_c
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
< enable_move_utility_emulation<T>::value && !has_move_emulation_enabled<T>::value
, typename ::boost::move_detail::add_const<T>::type &
>::type
@@ -49,7 +50,7 @@
}
template <class T>
- inline typename ::boost::move_detail::enable_if_c
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
< enable_move_utility_emulation<T>::value && has_move_emulation_enabled<T>::value
&& ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value, rv<T>&>::type
move_if_noexcept(T& x) BOOST_NOEXCEPT
@@ -58,7 +59,7 @@
}
template <class T>
- inline typename ::boost::move_detail::enable_if_c
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
< enable_move_utility_emulation<T>::value && has_move_emulation_enabled<T>::value
&& ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value
, rv<T>&
@@ -69,7 +70,7 @@
}
template <class T>
- inline typename ::boost::move_detail::enable_if_c
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
< enable_move_utility_emulation<T>::value && has_move_emulation_enabled<T>::value
&& !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value
, typename ::boost::move_detail::add_const<T>::type &
@@ -80,7 +81,7 @@
}
template <class T>
- inline typename ::boost::move_detail::enable_if_c
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
< enable_move_utility_emulation<T>::value && has_move_emulation_enabled<T>::value
&& !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value
, typename ::boost::move_detail::add_const<T>::type &
@@ -125,13 +126,13 @@
#else //BOOST_MOVE_DOXYGEN_INVOKED
template <class T>
- typename ::boost::move_detail::enable_if_c
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
< ::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value, T&&>::type
move_if_noexcept(T& x) BOOST_NOEXCEPT
{ return ::boost::move(x); }
template <class T>
- typename ::boost::move_detail::enable_if_c
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_c
< !::boost::move_detail::is_nothrow_move_constructible_or_uncopyable<T>::value, const T&>::type
move_if_noexcept(T& x) BOOST_NOEXCEPT
{ return x; }
diff --git a/contrib/src/boost/move/utility_core.hpp b/contrib/src/boost/move/utility_core.hpp
index 7fd1ea1..55042a9 100644
--- a/contrib/src/boost/move/utility_core.hpp
+++ b/contrib/src/boost/move/utility_core.hpp
@@ -26,6 +26,7 @@
#endif
#include <boost/move/detail/config_begin.hpp>
+#include <boost/move/detail/workaround.hpp> //forceinline
#include <boost/move/core.hpp>
#include <boost/move/detail/meta_utils.hpp>
#include <boost/static_assert.hpp>
@@ -47,7 +48,7 @@
//////////////////////////////////////////////////////////////////////////////
template <class T>
- inline typename ::boost::move_detail::enable_if_and
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
< T &
, enable_move_utility_emulation<T>
, has_move_emulation_disabled<T>
@@ -58,7 +59,7 @@
}
template <class T>
- inline typename ::boost::move_detail::enable_if_and
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
< rv<T>&
, enable_move_utility_emulation<T>
, has_move_emulation_enabled<T>
@@ -69,7 +70,7 @@
}
template <class T>
- inline typename ::boost::move_detail::enable_if_and
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
< rv<T>&
, enable_move_utility_emulation<T>
, has_move_emulation_enabled<T>
@@ -86,7 +87,7 @@
//////////////////////////////////////////////////////////////////////////////
template <class T>
- inline typename ::boost::move_detail::enable_if_and
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
< T &
, enable_move_utility_emulation<T>
, ::boost::move_detail::is_rv<T>
@@ -97,7 +98,7 @@
}
template <class T>
- inline typename ::boost::move_detail::enable_if_and
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
< const T &
, enable_move_utility_emulation<T>
, ::boost::move_detail::is_not_rv<T>
@@ -114,7 +115,7 @@
//////////////////////////////////////////////////////////////////////////////
template <class T>
- inline typename ::boost::move_detail::enable_if_and
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
< T &
, enable_move_utility_emulation<T>
, ::boost::move_detail::is_rv<T>
@@ -125,7 +126,7 @@
}
template <class T>
- inline typename ::boost::move_detail::enable_if_and
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
< typename ::boost::move_detail::add_lvalue_reference<T>::type
, enable_move_utility_emulation<T>
, ::boost::move_detail::is_not_rv<T>
@@ -140,7 +141,7 @@
}
template <class T>
- inline typename ::boost::move_detail::enable_if_and
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::enable_if_and
< rv<T>&
, enable_move_utility_emulation<T>
, ::boost::move_detail::is_not_rv<T>
@@ -202,13 +203,13 @@
//Old move approach, lvalues could bind to rvalue references
template <class T>
- inline typename ::boost::move_detail::remove_reference<T>::type && move(T&& t) BOOST_NOEXCEPT
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::remove_reference<T>::type && move(T&& t) BOOST_NOEXCEPT
{ return t; }
#else //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
template <class T>
- inline typename ::boost::move_detail::remove_reference<T>::type && move(T&& t) BOOST_NOEXCEPT
+ BOOST_MOVE_FORCEINLINE typename ::boost::move_detail::remove_reference<T>::type && move(T&& t) BOOST_NOEXCEPT
{ return static_cast<typename ::boost::move_detail::remove_reference<T>::type &&>(t); }
#endif //BOOST_MOVE_OLD_RVALUE_REF_BINDING_RULES
@@ -238,17 +239,17 @@
//Old move approach, lvalues could bind to rvalue references
template <class T>
- inline T&& forward(typename ::boost::move_detail::identity<T>::type&& t) BOOST_NOEXCEPT
+ BOOST_MOVE_FORCEINLINE T&& forward(typename ::boost::move_detail::identity<T>::type&& t) BOOST_NOEXCEPT
{ return t; }
#else //Old move
template <class T>
- inline T&& forward(typename ::boost::move_detail::remove_reference<T>::type& t) BOOST_NOEXCEPT
+ BOOST_MOVE_FORCEINLINE T&& forward(typename ::boost::move_detail::remove_reference<T>::type& t) BOOST_NOEXCEPT
{ return static_cast<T&&>(t); }
template <class T>
- inline T&& forward(typename ::boost::move_detail::remove_reference<T>::type&& t) BOOST_NOEXCEPT
+ BOOST_MOVE_FORCEINLINE T&& forward(typename ::boost::move_detail::remove_reference<T>::type&& t) BOOST_NOEXCEPT
{
//"boost::forward<T> error: 'T' is a lvalue reference, can't forward as rvalue.";
BOOST_STATIC_ASSERT(!boost::move_detail::is_lvalue_reference<T>::value);
@@ -273,17 +274,17 @@
//Old move approach, lvalues could bind to rvalue references
template <class T>
- inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::identity<T>::type&& t) BOOST_NOEXCEPT
+ BOOST_MOVE_FORCEINLINE T&& move_if_not_lvalue_reference(typename ::boost::move_detail::identity<T>::type&& t) BOOST_NOEXCEPT
{ return t; }
#else //Old move
template <class T>
- inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type& t) BOOST_NOEXCEPT
+ BOOST_MOVE_FORCEINLINE T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type& t) BOOST_NOEXCEPT
{ return static_cast<T&&>(t); }
template <class T>
- inline T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type&& t) BOOST_NOEXCEPT
+ BOOST_MOVE_FORCEINLINE T&& move_if_not_lvalue_reference(typename ::boost::move_detail::remove_reference<T>::type&& t) BOOST_NOEXCEPT
{
//"boost::forward<T> error: 'T' is a lvalue reference, can't forward as rvalue.";
BOOST_STATIC_ASSERT(!boost::move_detail::is_lvalue_reference<T>::value);