diff options
Diffstat (limited to '3rdParty/Boost/src/boost/utility')
| -rw-r--r-- | 3rdParty/Boost/src/boost/utility/addressof.hpp | 107 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/utility/base_from_member.hpp | 86 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/utility/declval.hpp | 41 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/utility/detail/result_of_iterate.hpp | 23 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/utility/enable_if.hpp | 122 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/utility/in_place_factory.hpp | 6 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/utility/result_of.hpp | 41 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/utility/swap.hpp | 58 | ||||
| -rw-r--r-- | 3rdParty/Boost/src/boost/utility/value_init.hpp | 29 | 
9 files changed, 212 insertions, 301 deletions
| diff --git a/3rdParty/Boost/src/boost/utility/addressof.hpp b/3rdParty/Boost/src/boost/utility/addressof.hpp index 95cd92f..db4da80 100644 --- a/3rdParty/Boost/src/boost/utility/addressof.hpp +++ b/3rdParty/Boost/src/boost/utility/addressof.hpp @@ -1,102 +1,17 @@ -// Copyright (C) 2002 Brad King (brad.king@kitware.com)  -//                    Douglas Gregor (gregod@cs.rpi.edu) -// -// Copyright (C) 2002, 2008 Peter Dimov -// -// 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) - -// For more information, see http://www.boost.org +/* + * Copyright (c) 2014 Glen Fernandes + * + * 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) + */  #ifndef BOOST_UTILITY_ADDRESSOF_HPP -# define BOOST_UTILITY_ADDRESSOF_HPP - -# include <boost/config.hpp> -# include <boost/detail/workaround.hpp> - -namespace boost -{ - -namespace detail -{ - -template<class T> struct addr_impl_ref -{ -    T & v_; - -    inline addr_impl_ref( T & v ): v_( v ) {} -    inline operator T& () const { return v_; } - -private: -    addr_impl_ref & operator=(const addr_impl_ref &); -}; - -template<class T> struct addressof_impl -{ -    static inline 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 ) -    { -        return v; -    } -}; - -} // namespace detail - -template<class T> T * addressof( T & v ) -{ -#if defined( __BORLANDC__ ) && BOOST_WORKAROUND( __BORLANDC__, BOOST_TESTED_AT( 0x610 ) ) - -    return boost::detail::addressof_impl<T>::f( v, 0 ); +#define BOOST_UTILITY_ADDRESSOF_HPP -#else +// The header file at this path is deprecated; +// use boost/core/addressof.hpp instead. -    return boost::detail::addressof_impl<T>::f( boost::detail::addr_impl_ref<T>( v ), 0 ); +#include <boost/core/addressof.hpp>  #endif -} - -#if defined( __SUNPRO_CC ) && BOOST_WORKAROUND( __SUNPRO_CC, BOOST_TESTED_AT( 0x590 ) ) - -namespace detail -{ - -template<class T> struct addressof_addp -{ -    typedef T * type; -}; - -} // namespace detail - -template< class T, std::size_t N > -typename detail::addressof_addp< T[N] >::type addressof( T (&t)[N] ) -{ -    return &t; -} - -#endif - -// Borland doesn't like casting an array reference to a char reference -// but these overloads work around the problem. -#if defined( __BORLANDC__ ) && BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x564)) -template<typename T,std::size_t N> -T (*addressof(T (&t)[N]))[N] -{ -   return reinterpret_cast<T(*)[N]>(&t); -} - -template<typename T,std::size_t N> -const T (*addressof(const T (&t)[N]))[N] -{ -   return reinterpret_cast<const T(*)[N]>(&t); -} -#endif - -} // namespace boost - -#endif // BOOST_UTILITY_ADDRESSOF_HPP diff --git a/3rdParty/Boost/src/boost/utility/base_from_member.hpp b/3rdParty/Boost/src/boost/utility/base_from_member.hpp index 04aabb5..fc0e13c 100644 --- a/3rdParty/Boost/src/boost/utility/base_from_member.hpp +++ b/3rdParty/Boost/src/boost/utility/base_from_member.hpp @@ -1,5 +1,5 @@  //  boost utility/base_from_member.hpp header file  --------------------------// -//  Copyright 2001, 2003, 2004 Daryle Walker.  Use, modification, and +//  Copyright 2001, 2003, 2004, 2012 Daryle Walker.  Use, modification, and  //  distribution are subject to the Boost Software License, Version 1.0.  (See  //  accompanying file LICENSE_1_0.txt or a copy at @@ -11,8 +11,13 @@  #define BOOST_UTILITY_BASE_FROM_MEMBER_HPP +#include <boost/config.hpp>  #include <boost/preprocessor/arithmetic/inc.hpp>  #include <boost/preprocessor/repetition/enum_binary_params.hpp>  #include <boost/preprocessor/repetition/enum_params.hpp>  #include <boost/preprocessor/repetition/repeat_from_to.hpp> +#include <boost/type_traits/is_same.hpp> +#include <boost/type_traits/remove_cv.hpp> +#include <boost/type_traits/remove_reference.hpp> +#include <boost/utility/enable_if.hpp> @@ -54,4 +59,57 @@ namespace boost  { +namespace detail +{ + +//  Type-unmarking class template  -------------------------------------------// + +// Type-trait to get the raw type, i.e. the type without top-level reference nor +// cv-qualification, from a type expression.  Mainly for function arguments, any +// reference part is stripped first. + +// Contributed by Daryle Walker + +template < typename T > +struct remove_cv_ref +{ +    typedef typename ::boost::remove_cv<typename +     ::boost::remove_reference<T>::type>::type  type; + +};  // boost::detail::remove_cv_ref + +//  Unmarked-type comparison class template  ---------------------------------// + +// Type-trait to check if two type expressions have the same raw type. + +// Contributed by Daryle Walker, based on a work-around by Luc Danton + +template < typename T, typename U > +struct is_related +    : public ::boost::is_same< +     typename ::boost::detail::remove_cv_ref<T>::type, +     typename ::boost::detail::remove_cv_ref<U>::type > +{}; + +//  Enable-if-on-unidentical-unmarked-type class template  -------------------// + +// Enable-if on the first two type expressions NOT having the same raw type. + +// Contributed by Daryle Walker, based on a work-around by Luc Danton + +#ifndef BOOST_NO_CXX11_VARIADIC_TEMPLATES +template<typename ...T> +struct enable_if_unrelated +    : public ::boost::enable_if_c<true> +{}; + +template<typename T, typename U, typename ...U2> +struct enable_if_unrelated<T, U, U2...> +    : public ::boost::disable_if< ::boost::detail::is_related<T, U> > +{}; +#endif + +}  // namespace boost::detail + +  //  Base-from-member class template  -----------------------------------------// @@ -69,4 +127,16 @@ protected:      MemberType  member; +#if !defined(BOOST_NO_CXX11_RVALUE_REFERENCES) && \ +    !defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) && \ +    !defined(BOOST_NO_CXX11_FUNCTION_TEMPLATE_DEFAULT_ARGS) && \ +    !(defined(__GNUC__) && (__GNUC__ == 4) && (__GNUC_MINOR__ < 4)) +    template <typename ...T, typename EnableIf = typename +     ::boost::detail::enable_if_unrelated<base_from_member, T...>::type> +    explicit BOOST_CONSTEXPR base_from_member( T&& ...x ) +        BOOST_NOEXCEPT_IF( BOOST_NOEXCEPT_EXPR(::new ((void*) 0) MemberType( +         static_cast<T&&>(x)... )) )  // no std::is_nothrow_constructible... +        : member( static_cast<T&&>(x)... )     // ...nor std::forward needed +        {} +#else      base_from_member()          : member() @@ -75,4 +145,18 @@ protected:      BOOST_PP_REPEAT_FROM_TO( 1, BOOST_PP_INC(BOOST_BASE_FROM_MEMBER_MAX_ARITY),       BOOST_PRIVATE_CTR_DEF, _ ) +#endif + +};  // boost::base_from_member + +template < typename MemberType, int UniqueID > +class base_from_member<MemberType&, UniqueID> +{ +protected: +    MemberType& member; + +    explicit BOOST_CONSTEXPR base_from_member( MemberType& x ) +        BOOST_NOEXCEPT +        : member( x ) +        {}  };  // boost::base_from_member diff --git a/3rdParty/Boost/src/boost/utility/declval.hpp b/3rdParty/Boost/src/boost/utility/declval.hpp index d74610c..a4ab2c8 100644 --- a/3rdParty/Boost/src/boost/utility/declval.hpp +++ b/3rdParty/Boost/src/boost/utility/declval.hpp @@ -1,3 +1,3 @@ -//  common_type.hpp  ---------------------------------------------------------// +//  declval.hpp  -------------------------------------------------------------//  //  Copyright 2010 Vicente J. Botet Escriba @@ -6,6 +6,6 @@  //  See http://www.boost.org/LICENSE_1_0.txt -#ifndef BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP -#define BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP +#ifndef BOOST_UTILITY_DECLVAL_HPP +#define BOOST_UTILITY_DECLVAL_HPP  #include <boost/config.hpp> @@ -14,36 +14,31 @@  #include <boost/type_traits/add_rvalue_reference.hpp> -//#include <boost/type_traits/add_lvalue_reference.hpp>  //----------------------------------------------------------------------------//  //                                                                            //  //                           C++03 implementation of                          // +//                   20.2.4 Function template declval [declval]               //  //                          Written by Vicente J. Botet Escriba               // -//~ 20.3.4 Function template declval [declval] -//~ 1 The library provides the function template declval to simplify the definition of expressions which occur as -//~ unevaluated operands. -//~ 2 Remarks: If this function is used, the program is ill-formed. -//~ 3 Remarks: The template parameter T of declval may be an incomplete type. -//~ [ Example: - -//~ template <class To, class From> -//~ decltype(static_cast<To>(declval<From>())) convert(From&&); - -//~ declares a function template convert which only participats in overloading if the type From can be -//~ explicitly converted to type To. For another example see class template common_type (20.7.6.6). —end -//~ example ]  //                                                                            // +// 1 The library provides the function template declval to simplify the +// definition of expressions which occur as unevaluated operands. +// 2 Remarks: If this function is used, the program is ill-formed. +// 3 Remarks: The template parameter T of declval may be an incomplete type. +// [ Example: +// +// template <class To, class From> +// decltype(static_cast<To>(declval<From>())) convert(From&&); +// +// declares a function template convert which only participates in overloading +// if the type From can be explicitly converted to type To. For another example +// see class template common_type (20.9.7.6). -end example ]  //----------------------------------------------------------------------------//  namespace boost { -//#if !defined(BOOST_NO_RVALUE_REFERENCES)      template <typename T>      typename add_rvalue_reference<T>::type declval() BOOST_NOEXCEPT; // as unevaluated operand -//#else -//    template <typename T> -//    typename add_lvalue_reference<T>::type declval() BOOST_NOEXCEPT; // as unevaluated operand -//#endif +  }  // namespace boost -#endif  // BOOST_TYPE_TRAITS_EXT_DECLVAL__HPP +#endif  // BOOST_UTILITY_DECLVAL_HPP diff --git a/3rdParty/Boost/src/boost/utility/detail/result_of_iterate.hpp b/3rdParty/Boost/src/boost/utility/detail/result_of_iterate.hpp index 17fd4d5..5192172 100644 --- a/3rdParty/Boost/src/boost/utility/detail/result_of_iterate.hpp +++ b/3rdParty/Boost/src/boost/utility/detail/result_of_iterate.hpp @@ -39,8 +39,23 @@ struct tr1_result_of<F(BOOST_RESULT_OF_ARGS)>  #ifdef BOOST_RESULT_OF_USE_DECLTYPE +template<typename F BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)> +struct result_of<F(BOOST_RESULT_OF_ARGS)> +    : detail::cpp0x_result_of<F(BOOST_RESULT_OF_ARGS)> { }; +#endif // BOOST_RESULT_OF_USE_DECLTYPE + +#ifdef BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK +template<typename F BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)> +struct result_of<F(BOOST_RESULT_OF_ARGS)> +    : mpl::if_<mpl::or_<detail::has_result_type<F>, detail::has_result<F> >, +               tr1_result_of<F(BOOST_RESULT_OF_ARGS)>, +               detail::cpp0x_result_of<F(BOOST_RESULT_OF_ARGS)> >::type { }; +#endif // BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK + +#if defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK) + +namespace detail { -// Uses declval following N3225 20.7.7.6 when F is not a pointer.  template<typename F BOOST_PP_ENUM_TRAILING_PARAMS(BOOST_PP_ITERATION(),typename T)> -struct result_of<F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T))> +struct cpp0x_result_of<F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T))>      : mpl::if_<            is_member_function_pointer<F> @@ -55,6 +70,4 @@ struct result_of<F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T))>  {}; -namespace detail { -  #ifdef BOOST_NO_SFINAE_EXPR @@ -140,5 +153,5 @@ struct cpp0x_result_of_impl<F(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),T)),  } // namespace detail -#else // defined(BOOST_RESULT_OF_USE_DECLTYPE) +#else // defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK)  #if !BOOST_WORKAROUND(__BORLANDC__, BOOST_TESTED_AT(0x551)) diff --git a/3rdParty/Boost/src/boost/utility/enable_if.hpp b/3rdParty/Boost/src/boost/utility/enable_if.hpp index d292c6a..803bfca 100644 --- a/3rdParty/Boost/src/boost/utility/enable_if.hpp +++ b/3rdParty/Boost/src/boost/utility/enable_if.hpp @@ -1,119 +1,17 @@ -// Boost enable_if library - -// Copyright 2003 (c) The Trustees of Indiana University. - -// Use, modification, and distribution is subject to 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) - -//    Authors: Jaakko Jarvi (jajarvi at osl.iu.edu) -//             Jeremiah Willcock (jewillco at osl.iu.edu) -//             Andrew Lumsdaine (lums at osl.iu.edu) - +/* + * Copyright (c) 2014 Glen Fernandes + * + * 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) + */  #ifndef BOOST_UTILITY_ENABLE_IF_HPP  #define BOOST_UTILITY_ENABLE_IF_HPP -#include "boost/config.hpp" - -// Even the definition of enable_if causes problems on some compilers, -// so it's macroed out for all compilers that do not support SFINAE - -#ifndef BOOST_NO_SFINAE - -namespace boost -{ -  -  template <bool B, class T = void> -  struct enable_if_c { -    typedef T type; -  }; - -  template <class T> -  struct enable_if_c<false, T> {}; - -  template <class Cond, class T = void>  -  struct enable_if : public enable_if_c<Cond::value, T> {}; - -  template <bool B, class T> -  struct lazy_enable_if_c { -    typedef typename T::type type; -  }; - -  template <class T> -  struct lazy_enable_if_c<false, T> {}; - -  template <class Cond, class T>  -  struct lazy_enable_if : public lazy_enable_if_c<Cond::value, T> {}; - - -  template <bool B, class T = void> -  struct disable_if_c { -    typedef T type; -  }; - -  template <class T> -  struct disable_if_c<true, T> {}; - -  template <class Cond, class T = void>  -  struct disable_if : public disable_if_c<Cond::value, T> {}; - -  template <bool B, class T> -  struct lazy_disable_if_c { -    typedef typename T::type type; -  }; - -  template <class T> -  struct lazy_disable_if_c<true, T> {}; - -  template <class Cond, class T>  -  struct lazy_disable_if : public lazy_disable_if_c<Cond::value, T> {}; - -} // namespace boost - -#else - -namespace boost { - -  namespace detail { typedef void enable_if_default_T; } - -  template <typename T> -  struct enable_if_does_not_work_on_this_compiler; - -  template <bool B, class T = detail::enable_if_default_T> -  struct enable_if_c : enable_if_does_not_work_on_this_compiler<T> -  { }; - -  template <bool B, class T = detail::enable_if_default_T>  -  struct disable_if_c : enable_if_does_not_work_on_this_compiler<T> -  { }; - -  template <bool B, class T = detail::enable_if_default_T>  -  struct lazy_enable_if_c : enable_if_does_not_work_on_this_compiler<T> -  { }; - -  template <bool B, class T = detail::enable_if_default_T>  -  struct lazy_disable_if_c : enable_if_does_not_work_on_this_compiler<T> -  { }; - -  template <class Cond, class T = detail::enable_if_default_T>  -  struct enable_if : enable_if_does_not_work_on_this_compiler<T> -  { }; - -  template <class Cond, class T = detail::enable_if_default_T>  -  struct disable_if : enable_if_does_not_work_on_this_compiler<T> -  { }; - -  template <class Cond, class T = detail::enable_if_default_T>  -  struct lazy_enable_if : enable_if_does_not_work_on_this_compiler<T> -  { }; - -  template <class Cond, class T = detail::enable_if_default_T>  -  struct lazy_disable_if : enable_if_does_not_work_on_this_compiler<T> -  { }; - -} // namespace boost +// The header file at this path is deprecated; +// use boost/core/enable_if.hpp instead. -#endif // BOOST_NO_SFINAE +#include <boost/core/enable_if.hpp>  #endif diff --git a/3rdParty/Boost/src/boost/utility/in_place_factory.hpp b/3rdParty/Boost/src/boost/utility/in_place_factory.hpp index f84b003..1a62ace 100644 --- a/3rdParty/Boost/src/boost/utility/in_place_factory.hpp +++ b/3rdParty/Boost/src/boost/utility/in_place_factory.hpp @@ -49,6 +49,5 @@ public:    template<class T> -  void* apply(void* address -      BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) const +  void* apply(void* address) const    {      return new(address) T( BOOST_PP_ENUM_PARAMS(N, m_a) ); @@ -56,6 +55,5 @@ public:    template<class T> -  void* apply(void* address, std::size_t n -      BOOST_APPEND_EXPLICIT_TEMPLATE_TYPE(T)) const +  void* apply(void* address, std::size_t n) const    {      for(char* next = address = this->BOOST_NESTED_TEMPLATE apply<T>(address); diff --git a/3rdParty/Boost/src/boost/utility/result_of.hpp b/3rdParty/Boost/src/boost/utility/result_of.hpp index f0e084a..206ae30 100644 --- a/3rdParty/Boost/src/boost/utility/result_of.hpp +++ b/3rdParty/Boost/src/boost/utility/result_of.hpp @@ -39,16 +39,25 @@  // Use the decltype-based version of result_of by default if the compiler  // supports N3276 <http://www.open-std.org/JTC1/SC22/WG21/docs/papers/2011/n3276.pdf>. -// The user can force the choice by defining either BOOST_RESULT_OF_USE_DECLTYPE or -// BOOST_RESULT_OF_USE_TR1, but not both! -#if defined(BOOST_RESULT_OF_USE_DECLTYPE) && defined(BOOST_RESULT_OF_USE_TR1) -#  error Both BOOST_RESULT_OF_USE_DECLTYPE and BOOST_RESULT_OF_USE_TR1 cannot be defined at the same time. +// The user can force the choice by defining BOOST_RESULT_OF_USE_DECLTYPE, +// BOOST_RESULT_OF_USE_TR1, or BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK but not more than one! +#if (defined(BOOST_RESULT_OF_USE_DECLTYPE) && defined(BOOST_RESULT_OF_USE_TR1)) || \ +    (defined(BOOST_RESULT_OF_USE_DECLTYPE) && defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK)) || \ +    (defined(BOOST_RESULT_OF_USE_TR1) && defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK)) +#  error More than one of BOOST_RESULT_OF_USE_DECLTYPE, BOOST_RESULT_OF_USE_TR1 and \ +  BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK cannot be defined at the same time. +#endif + +#if defined(BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK) && defined(BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE) +#  error Cannot fallback to decltype if BOOST_MPL_CFG_NO_HAS_XXX_TEMPLATE is not defined.  #endif  #ifndef BOOST_RESULT_OF_USE_TR1  #  ifndef BOOST_RESULT_OF_USE_DECLTYPE -#    ifndef BOOST_NO_DECLTYPE_N3276 // this implies !defined(BOOST_NO_DECLTYPE) -#      define BOOST_RESULT_OF_USE_DECLTYPE -#    else -#      define BOOST_RESULT_OF_USE_TR1 +#    ifndef BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK +#      ifndef BOOST_NO_CXX11_DECLTYPE_N3276 // this implies !defined(BOOST_NO_CXX11_DECLTYPE) +#        define BOOST_RESULT_OF_USE_DECLTYPE +#      else +#        define BOOST_RESULT_OF_USE_TR1 +#      endif  #    endif  #  endif @@ -60,13 +69,27 @@ template<typename F> struct result_of;  template<typename F> struct tr1_result_of; // a TR1-style implementation of result_of -#if !defined(BOOST_NO_SFINAE) && !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) +#if !defined(BOOST_NO_SFINAE)  namespace detail {  BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type) +// Work around a nvcc bug by only defining has_result when it's needed. +#ifdef BOOST_RESULT_OF_USE_TR1_WITH_DECLTYPE_FALLBACK +BOOST_MPL_HAS_XXX_TEMPLATE_DEF(result) +#endif +  template<typename F, typename FArgs, bool HasResultType> struct tr1_result_of_impl; +template<typename F> struct cpp0x_result_of; +  #ifdef BOOST_NO_SFINAE_EXPR +// There doesn't seem to be any other way to turn this off such that the presence of +// the user-defined operator,() below doesn't cause spurious warning all over the place, +// so unconditionally turn it off. +#if BOOST_MSVC +#  pragma warning(disable: 4913) // user defined binary operator ',' exists but no overload could convert all operands, default built-in binary operator ',' used +#endif +  struct result_of_private_type {}; diff --git a/3rdParty/Boost/src/boost/utility/swap.hpp b/3rdParty/Boost/src/boost/utility/swap.hpp index 6845e79..dd9ecd9 100644 --- a/3rdParty/Boost/src/boost/utility/swap.hpp +++ b/3rdParty/Boost/src/boost/utility/swap.hpp @@ -1,55 +1,17 @@ -// Copyright (C) 2007, 2008 Steven Watanabe, Joseph Gauterin, Niels Dekker -// -// 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) -// For more information, see http://www.boost.org - +/* + * Copyright (c) 2014 Glen Fernandes + * + * 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) + */  #ifndef BOOST_UTILITY_SWAP_HPP  #define BOOST_UTILITY_SWAP_HPP -// Note: the implementation of this utility contains various workarounds: -// - swap_impl is put outside the boost namespace, to avoid infinite -// recursion (causing stack overflow) when swapping objects of a primitive -// type. -// - swap_impl has a using-directive, rather than a using-declaration, -// because some compilers (including MSVC 7.1, Borland 5.9.3, and -// Intel 8.1) don't do argument-dependent lookup when it has a -// using-declaration instead. -// - boost::swap has two template arguments, instead of one, to -// avoid ambiguity when swapping objects of a Boost type that does -// not have its own boost::swap overload. - -#include <algorithm> //for std::swap -#include <cstddef> //for std::size_t - -namespace boost_swap_impl -{ -  template<class T> -  void swap_impl(T& left, T& right) -  { -    using namespace std;//use std::swap if argument dependent lookup fails -    swap(left,right); -  } - -  template<class T, std::size_t N> -  void swap_impl(T (& left)[N], T (& right)[N]) -  { -    for (std::size_t i = 0; i < N; ++i) -    { -      ::boost_swap_impl::swap_impl(left[i], right[i]); -    } -  } -} +// The header file at this path is deprecated; +// use boost/core/swap.hpp instead. -namespace boost -{ -  template<class T1, class T2> -  void swap(T1& left, T2& right) -  { -    ::boost_swap_impl::swap_impl(left, right); -  } -} +#include <boost/core/swap.hpp>  #endif diff --git a/3rdParty/Boost/src/boost/utility/value_init.hpp b/3rdParty/Boost/src/boost/utility/value_init.hpp index 5de9585..9d8de70 100644 --- a/3rdParty/Boost/src/boost/utility/value_init.hpp +++ b/3rdParty/Boost/src/boost/utility/value_init.hpp @@ -34,5 +34,4 @@  #ifdef BOOST_MSVC  #pragma warning(push) -#if _MSC_VER >= 1310  // It is safe to ignore the following warning from MSVC 7.1 or higher:  // "warning C4351: new behavior: elements of array will be default initialized" @@ -42,5 +41,4 @@  #pragma warning(disable: 4512)  #endif -#endif  #ifdef BOOST_NO_COMPLETE_VALUE_INITIALIZATION @@ -74,4 +72,5 @@ class initialized        remove_const<T>::type data; +      BOOST_GPU_ENABLED        wrapper()        : @@ -80,4 +79,5 @@ class initialized        } +      BOOST_GPU_ENABLED        wrapper(T const & arg)        : @@ -93,4 +93,5 @@ class initialized        aligned_storage<sizeof(wrapper), alignment_of<wrapper>::value>::type x; +    BOOST_GPU_ENABLED      wrapper * wrapper_address() const      { @@ -100,4 +101,5 @@ class initialized    public : +    BOOST_GPU_ENABLED      initialized()      { @@ -108,4 +110,5 @@ class initialized      } +    BOOST_GPU_ENABLED      initialized(initialized const & arg)      { @@ -113,4 +116,5 @@ class initialized      } +    BOOST_GPU_ENABLED      explicit initialized(T const & arg)      { @@ -118,4 +122,5 @@ class initialized      } +    BOOST_GPU_ENABLED      initialized & operator=(initialized const & arg)      { @@ -126,4 +131,5 @@ class initialized      } +    BOOST_GPU_ENABLED      ~initialized()      { @@ -131,4 +137,5 @@ class initialized      } +    BOOST_GPU_ENABLED      T const & data() const      { @@ -136,4 +143,5 @@ class initialized      } +    BOOST_GPU_ENABLED      T& data()      { @@ -141,4 +149,5 @@ class initialized      } +    BOOST_GPU_ENABLED      void swap(initialized & arg)      { @@ -146,4 +155,5 @@ class initialized      } +    BOOST_GPU_ENABLED      operator T const &() const      { @@ -151,4 +161,5 @@ class initialized      } +    BOOST_GPU_ENABLED      operator T&()      { @@ -159,4 +170,5 @@ class initialized  template<class T> +BOOST_GPU_ENABLED  T const& get ( initialized<T> const& x )  { @@ -165,4 +177,5 @@ T const& get ( initialized<T> const& x )  template<class T> +BOOST_GPU_ENABLED  T& get ( initialized<T>& x )  { @@ -171,4 +184,5 @@ T& get ( initialized<T>& x )  template<class T> +BOOST_GPU_ENABLED  void swap ( initialized<T> & lhs, initialized<T> & rhs )  { @@ -186,4 +200,5 @@ class value_initialized    public : +    BOOST_GPU_ENABLED      value_initialized()      : @@ -191,4 +206,5 @@ class value_initialized      { } +    BOOST_GPU_ENABLED      T const & data() const      { @@ -196,4 +212,5 @@ class value_initialized      } +    BOOST_GPU_ENABLED      T& data()      { @@ -201,4 +218,5 @@ class value_initialized      } +    BOOST_GPU_ENABLED      void swap(value_initialized & arg)      { @@ -206,4 +224,5 @@ class value_initialized      } +    BOOST_GPU_ENABLED      operator T const &() const      { @@ -211,4 +230,5 @@ class value_initialized      } +    BOOST_GPU_ENABLED      operator T&()      { @@ -219,4 +239,5 @@ class value_initialized  template<class T> +BOOST_GPU_ENABLED  T const& get ( value_initialized<T> const& x )  { @@ -225,4 +246,5 @@ T const& get ( value_initialized<T> const& x )  template<class T> +BOOST_GPU_ENABLED  T& get ( value_initialized<T>& x )  { @@ -231,4 +253,5 @@ T& get ( value_initialized<T>& x )  template<class T> +BOOST_GPU_ENABLED  void swap ( value_initialized<T> & lhs, value_initialized<T> & rhs )  { @@ -241,5 +264,5 @@ class initialized_value_t    public : -    template <class T> operator T() const +    template <class T> BOOST_GPU_ENABLED operator T() const      {        return initialized<T>().data(); | 
 Swift
 Swift