diff options
| author | Tobias Markmann <tm@ayena.de> | 2014-10-19 20:22:58 (GMT) | 
|---|---|---|
| committer | Tobias Markmann <tm@ayena.de> | 2014-10-20 13:49:33 (GMT) | 
| commit | 6b22dfcf59474dd016a0355a3102a1dd3692d92c (patch) | |
| tree | 2b1fd33be433a91e81fee84fdc2bf1b52575d934 /3rdParty/Boost/src/boost/variant/detail/move.hpp | |
| parent | 38b0cb785fea8eae5e48fae56440695fdfd10ee1 (diff) | |
| download | swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.zip swift-contrib-6b22dfcf59474dd016a0355a3102a1dd3692d92c.tar.bz2 | |
Update Boost in 3rdParty to version 1.56.0.
This updates Boost in our 3rdParty directory to version 1.56.0.
Updated our update.sh script to stop on error.
Changed error reporting in SwiftTools/CrashReporter.cpp to SWIFT_LOG due to
missing include of <iostream> with newer Boost.
Change-Id: I4b35c77de951333979a524097f35f5f83d325edc
Diffstat (limited to '3rdParty/Boost/src/boost/variant/detail/move.hpp')
| -rw-r--r-- | 3rdParty/Boost/src/boost/variant/detail/move.hpp | 127 | 
1 files changed, 15 insertions, 112 deletions
| diff --git a/3rdParty/Boost/src/boost/variant/detail/move.hpp b/3rdParty/Boost/src/boost/variant/detail/move.hpp index 572cfbb..24f8310 100644 --- a/3rdParty/Boost/src/boost/variant/detail/move.hpp +++ b/3rdParty/Boost/src/boost/variant/detail/move.hpp @@ -6,4 +6,5 @@  //  Copyright (c) 2002-2003 Eric Friedman  //  Copyright (c) 2002 by Andrei Alexandrescu +//  Copyright (c) 2013 Antony Polukhin  //  //  Use, modification and distribution are subject to the @@ -25,90 +26,9 @@  #include "boost/config.hpp"  #include "boost/detail/workaround.hpp" -#include "boost/mpl/if.hpp" -#include "boost/type_traits/is_base_and_derived.hpp" +#include "boost/move/move.hpp" -namespace boost { -namespace detail { namespace variant { +namespace boost { namespace detail { namespace variant { -////////////////////////////////////////////////////////////////////////// -// forward declares -// -// NOTE: Incomplete until (if?) Boost.Move becomes part of Boost. -// -template <typename Deriving> class moveable; -template <typename T>        class move_source; -template <typename T>        class move_return; - -namespace detail { - -// (detail) moveable_tag -// -// Concrete type from which moveable<T> derives. -// -// TODO: Move into moveable_fwd.hpp and define has_move_constructor. -// -template <typename Deriving> -struct moveable_tag -{ -}; - -} // namespace detail - -////////////////////////////////////////////////////////////////////////// -// function template move -// -// Takes a T& and returns, if T derives moveable<T>, a move_source<T> for -// the object; else, returns the T&. -// - -namespace detail { - -// (detail) class template move_type -// -// Metafunction that, given moveable T, provides move_source<T>, else T&. -// -template <typename T> -struct move_type -{ -public: // metafunction result - -    typedef typename mpl::if_< -          is_base_and_derived<detail::moveable_tag<T>, T> -        , move_source<T> -        , T& -        >::type type; - -}; - -} // namespace detail - -template <typename T> -inline -    typename detail::move_type<T>::type -move(T& source) -{ -    typedef typename detail::move_type<T>::type -        move_t; - -    return move_t(source); -} - -////////////////////////////////////////////////////////////////////////// -// class template return_t -// -// Metafunction that, given moveable T, provides move_return<T>, else T. -// -template <typename T> -struct return_t -{ -public: // metafunction result - -    typedef typename mpl::if_< -          is_base_and_derived<moveable<T>, T> -        , move_return<T> -        , T -        >::type type; - -}; +using boost::move;  ////////////////////////////////////////////////////////////////////////// @@ -119,45 +39,28 @@ public: // metafunction result  // -#if   defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP)   \ - ||   BOOST_WORKAROUND(__GNUC__, BOOST_TESTED_AT(2)) - -// [Indicate that move_swap by overload is disabled...] -#define BOOST_NO_MOVE_SWAP_BY_OVERLOAD +namespace move_swap_fallback { -// [...and provide straight swap-by-move implementation:] -template <typename T> -inline void move_swap(T& lhs, T& rhs) -{ -    T tmp( boost::detail::variant::move(lhs) ); -    lhs = boost::detail::variant::move(rhs); -    rhs = boost::detail::variant::move(tmp); -} - -#else// !workaround - -namespace detail { namespace move_swap { - -template <typename T> -inline void swap(T& lhs, T& rhs) +template <typename T1, typename T2> +inline void swap(T1& lhs, T2& rhs)  { -    T tmp( boost::detail::variant::move(lhs) ); +    T1 tmp( boost::detail::variant::move(lhs) );      lhs = boost::detail::variant::move(rhs);      rhs = boost::detail::variant::move(tmp);  } -}} // namespace detail::move_swap +} // namespace move_swap_fallback  template <typename T>  inline void move_swap(T& lhs, T& rhs)  { -    using detail::move_swap::swap; - +#if defined(BOOST_NO_ARGUMENT_DEPENDENT_LOOKUP) +    move_swap_fallback::swap(lhs, rhs); +#else +    using move_swap_fallback::swap;      swap(lhs, rhs); +#endif  } -#endif // workaround - -}} // namespace detail::variant -} // namespace boost +}}} // namespace boost::detail::variant  #endif // BOOST_VARIANT_DETAIL_MOVE_HPP | 
 Swift
 Swift