diff options
| -rw-r--r-- | contrib/restricted/boost/move/include/boost/move/algo/detail/adaptive_sort_merge.hpp | 6 | ||||
| -rw-r--r-- | contrib/restricted/boost/move/include/boost/move/detail/type_traits.hpp | 12 |
2 files changed, 12 insertions, 6 deletions
diff --git a/contrib/restricted/boost/move/include/boost/move/algo/detail/adaptive_sort_merge.hpp b/contrib/restricted/boost/move/include/boost/move/algo/detail/adaptive_sort_merge.hpp index 220c0b5604c..4d8675b8168 100644 --- a/contrib/restricted/boost/move/include/boost/move/algo/detail/adaptive_sort_merge.hpp +++ b/contrib/restricted/boost/move/include/boost/move/algo/detail/adaptive_sort_merge.hpp @@ -175,7 +175,8 @@ void swap_and_update_key { if(begin != with){ ::boost::adl_move_swap_ranges(begin, end, with); - ::boost::adl_move_swap(*key_next, *key_range2); + if(key_next != key_range2) //Avoid potential self-swapping + ::boost::adl_move_swap(*key_next, *key_range2); if(key_next == key_mid){ key_mid = key_range2; } @@ -217,7 +218,8 @@ RandIt2 buffer_and_update_key while(begin != end) { op(three_way_t(), begin++, with++, buffer++); } - ::boost::adl_move_swap(*key_next, *key_range2); + if (key_next != key_range2) //Avoid potential self-swapping + ::boost::adl_move_swap(*key_next, *key_range2); if (key_next == key_mid) { key_mid = key_range2; } diff --git a/contrib/restricted/boost/move/include/boost/move/detail/type_traits.hpp b/contrib/restricted/boost/move/include/boost/move/detail/type_traits.hpp index e5b7684d65c..3bf5d595b6c 100644 --- a/contrib/restricted/boost/move/include/boost/move/detail/type_traits.hpp +++ b/contrib/restricted/boost/move/include/boost/move/detail/type_traits.hpp @@ -190,33 +190,37 @@ # endif // BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR -# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_MOVE_HAS_TRAIT(is_constructible) && BOOST_MOVE_HAS_TRAIT(is_trivially_constructible) +# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) + +# if BOOST_MOVE_HAS_TRAIT(is_constructible) && BOOST_MOVE_HAS_TRAIT(is_trivially_constructible) # define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) (__is_constructible(T, T&&) && __is_trivially_constructible(T, T&&)) # elif BOOST_MOVE_HAS_TRAIT(has_trivial_move_constructor) # define BOOST_MOVE_HAS_TRIVIAL_MOVE_CONSTRUCTOR(T) __has_trivial_move_constructor(T) # endif // BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN -# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_MOVE_HAS_TRAIT(is_assignable) && BOOST_MOVE_HAS_TRAIT(is_trivially_assignable) +# if BOOST_MOVE_HAS_TRAIT(is_assignable) && BOOST_MOVE_HAS_TRAIT(is_trivially_assignable) # define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) (__is_assignable(T, T&&) && __is_trivially_assignable(T, T&&)) # elif BOOST_MOVE_HAS_TRAIT(has_trivial_move_assign) # define BOOST_MOVE_HAS_TRIVIAL_MOVE_ASSIGN(T) __has_trivial_move_assign(T) # endif // BOOST_MOVE_HAS_NOTHROW_MOVE_CONSTRUCTOR -# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_MOVE_HAS_TRAIT(is_constructible) && BOOST_MOVE_HAS_TRAIT(is_nothrow_constructible) +# if BOOST_MOVE_HAS_TRAIT(is_constructible) && BOOST_MOVE_HAS_TRAIT(is_nothrow_constructible) # define BOOST_MOVE_HAS_NOTHROW_MOVE_CONSTRUCTOR(T) (__is_constructible(T, T&&) && __is_nothrow_constructible(T, T&&)) # elif BOOST_MOVE_HAS_TRAIT(has_nothrow_move_constructor) # define BOOST_MOVE_HAS_NOTHROW_MOVE_CONSTRUCTOR(T) __has_nothrow_move_constructor(T) # endif // BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN -# if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && BOOST_MOVE_HAS_TRAIT(is_assignable) && BOOST_MOVE_HAS_TRAIT(is_nothrow_assignable) +# if BOOST_MOVE_HAS_TRAIT(is_assignable) && BOOST_MOVE_HAS_TRAIT(is_nothrow_assignable) # define BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN(T) (__is_assignable(T, T&&) && __is_nothrow_assignable(T, T&&)) # elif BOOST_MOVE_HAS_TRAIT(has_nothrow_move_assign) # define BOOST_MOVE_HAS_NOTHROW_MOVE_ASSIGN(T) __has_nothrow_move_assign(T) # endif +# endif //BOOST_NO_CXX11_RVALUE_REFERENCES + // BOOST_MOVE_ALIGNMENT_OF # define BOOST_MOVE_ALIGNMENT_OF(T) __alignof(T) |
