diff options
author | Kevin Smith <git@kismith.co.uk> | 2012-08-02 20:41:55 (GMT) |
---|---|---|
committer | Kevin Smith <git@kismith.co.uk> | 2012-08-02 21:03:09 (GMT) |
commit | d5ace22054203c7989691ae8b3fa4e4784d1b57e (patch) | |
tree | 64d400cdb10644967df183d0f202fcbf8160a773 /3rdParty/Boost/src/boost/type_traits/detail | |
parent | 6f26d9aa86f0909af13b23b1a925b8d492e74154 (diff) | |
download | swift-contrib-d5ace22054203c7989691ae8b3fa4e4784d1b57e.zip swift-contrib-d5ace22054203c7989691ae8b3fa4e4784d1b57e.tar.bz2 |
Add two extra Boost dependencies, upgrade to 1.47.0ks/boost1.47
Diffstat (limited to '3rdParty/Boost/src/boost/type_traits/detail')
5 files changed, 85 insertions, 35 deletions
diff --git a/3rdParty/Boost/src/boost/type_traits/detail/bool_trait_def.hpp b/3rdParty/Boost/src/boost/type_traits/detail/bool_trait_def.hpp index 19bb18c..88c6899 100644 --- a/3rdParty/Boost/src/boost/type_traits/detail/bool_trait_def.hpp +++ b/3rdParty/Boost/src/boost/type_traits/detail/bool_trait_def.hpp @@ -8,8 +8,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // $Source$ -// $Date: 2006-07-12 07:10:22 -0400 (Wed, 12 Jul 2006) $ -// $Revision: 34511 $ +// $Date: 2011-04-25 08:26:48 -0400 (Mon, 25 Apr 2011) $ +// $Revision: 71481 $ #include <boost/type_traits/detail/template_arity_spec.hpp> #include <boost/type_traits/integral_constant.hpp> @@ -60,7 +60,7 @@ #endif #ifndef BOOST_TT_AUX_BOOL_C_BASE -# define BOOST_TT_AUX_BOOL_C_BASE(C) : ::boost::integral_constant<bool,C> +# define BOOST_TT_AUX_BOOL_C_BASE(C) : public ::boost::integral_constant<bool,C> #endif @@ -68,6 +68,7 @@ template< typename T > struct trait \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ }; \ @@ -80,6 +81,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ template< typename T1, typename T2 > struct trait \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(2,trait,(T1,T2)) \ }; \ @@ -91,6 +93,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(2,trait) \ template<> struct trait< sp > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(sp)) \ }; \ @@ -100,6 +103,7 @@ template<> struct trait< sp > \ template<> struct trait< sp1,sp2 > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \ }; \ @@ -108,6 +112,7 @@ template<> struct trait< sp1,sp2 > \ #define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC1(trait,sp,C) \ template<> struct trait##_impl< sp > \ { \ +public:\ BOOST_STATIC_CONSTANT(bool, value = (C)); \ }; \ /**/ @@ -115,6 +120,7 @@ template<> struct trait##_impl< sp > \ #define BOOST_TT_AUX_BOOL_TRAIT_IMPL_SPEC2(trait,sp1,sp2,C) \ template<> struct trait##_impl< sp1,sp2 > \ { \ +public:\ BOOST_STATIC_CONSTANT(bool, value = (C)); \ }; \ /**/ @@ -123,6 +129,7 @@ template<> struct trait##_impl< sp1,sp2 > \ template< param > struct trait< sp > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ }; \ /**/ @@ -131,6 +138,7 @@ template< param > struct trait< sp > \ template< param1, param2 > struct trait< sp > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ }; \ /**/ @@ -139,6 +147,7 @@ template< param1, param2 > struct trait< sp > \ template< param > struct trait< sp1,sp2 > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(2,trait,(sp1,sp2)) \ }; \ @@ -148,6 +157,7 @@ template< param > struct trait< sp1,sp2 > \ template< param1, param2 > struct trait< sp1,sp2 > \ BOOST_TT_AUX_BOOL_C_BASE(C) \ { \ +public:\ BOOST_TT_AUX_BOOL_TRAIT_VALUE_DECL(C) \ }; \ /**/ @@ -155,6 +165,7 @@ template< param1, param2 > struct trait< sp1,sp2 > \ #define BOOST_TT_AUX_BOOL_TRAIT_IMPL_PARTIAL_SPEC2_1(param,trait,sp1,sp2,C) \ template< param > struct trait##_impl< sp1,sp2 > \ { \ +public:\ BOOST_STATIC_CONSTANT(bool, value = (C)); \ }; \ /**/ diff --git a/3rdParty/Boost/src/boost/type_traits/detail/common_type_imp.hpp b/3rdParty/Boost/src/boost/type_traits/detail/common_type_imp.hpp index 9e06282..dd530ca 100644 --- a/3rdParty/Boost/src/boost/type_traits/detail/common_type_imp.hpp +++ b/3rdParty/Boost/src/boost/type_traits/detail/common_type_imp.hpp @@ -72,22 +72,46 @@ struct propagate_cv< const volatile From, To > { typedef To const volatile type; }; /******************************************************************************* - * struct is_signable_integral<T> + * struct is_integral_or_enum<T> * * This metafunction determines if T is an integral type which can be made * signed or unsigned. ******************************************************************************/ template< class T > -struct is_signable_integral - : mpl::or_< is_integral<T>, is_enum<T> > +struct is_integral_or_enum + : public mpl::or_< is_integral<T>, is_enum<T> > { }; template<> -struct is_signable_integral< bool > - : false_type +struct is_integral_or_enum< bool > + : public false_type { }; /******************************************************************************* + * struct make_unsigned_soft<T> + * struct make_signed_soft<T> + * + * These metafunction are identical to make_unsigned and make_signed, + * respetively, except for special-casing bool. + ******************************************************************************/ + +template< class T > +struct make_unsigned_soft + : public make_unsigned<T> +{ }; +template<> +struct make_unsigned_soft< bool > +{ typedef bool type; }; + +template< class T > +struct make_signed_soft + : public make_signed<T> +{ }; +template<> +struct make_signed_soft< bool > +{ typedef bool type; }; + +/******************************************************************************* * struct sizeof_t<N> * typedef ... yes_type * typedef ... no_type @@ -127,7 +151,7 @@ yes_type rvalue_test(...); template< class First, class Last, std::size_t Index > struct conversion_test_overloads_iterate - : conversion_test_overloads_iterate< + : public conversion_test_overloads_iterate< typename mpl::next< First >::type, Last, Index + 1 > { @@ -144,7 +168,7 @@ struct conversion_test_overloads_iterate< Last, Last, Index > template< class Sequence > struct conversion_test_overloads - : conversion_test_overloads_iterate< + : public conversion_test_overloads_iterate< typename mpl::begin< Sequence >::type, typename mpl::end< Sequence >::type, 0 @@ -163,7 +187,7 @@ template< int N = mpl::size< Sequence >::value > struct select - : mpl::at_c< Sequence, Index > + : public mpl::at_c< Sequence, Index > { }; template< class Sequence, int N > struct select< Sequence, N, N > @@ -185,12 +209,21 @@ struct select< Sequence, N, N > * { V*, W*, V'*, W'* } * where V' is V with whatever cv-qualifiers are on W, and W' is W * with whatever cv-qualifiers are on V - * else T' and U' are both "signable integral types" (integral and enum - * types excepting bool), then: + * else if T' and U' are both integral or enum types, then: * define the set of NominalCandidates to be - * { unsigned(T'), unsigned(U'), signed(T'), signed(U') } - * where unsigned(X) is make_unsigned<X>::type and signed(X) is - * make_signed<X>::type + * { + * unsigned_soft(T'), + * unsigned_soft(U'), + * signed_soft(T'), + * signed_soft(U'), + * T', + * U', + * unsigned int, + * int + * } + * where unsigned_soft(X) is make_unsigned_soft<X>::type and + * signed_soft(X) is make_signed_soft<X>::type (these are all + * generally necessary to cover the various integral promotion cases) * else * define the set of NominalCandidates to be * { T', U' } @@ -231,22 +264,20 @@ template< class T, class U, class V = typename remove_cv< typename remove_reference<T>::type >::type, class W = typename remove_cv< typename remove_reference<U>::type >::type, - bool = is_signable_integral<V>::value && is_signable_integral<W>::value + bool = is_integral_or_enum<V>::value && is_integral_or_enum<W>::value > -struct nominal_candidates; - -template< class T, class U, class V, class W > -struct nominal_candidates< T, U, V, W, false > +struct nominal_candidates { typedef mpl::vector2<V,W> type; }; template< class T, class U, class V, class W > struct nominal_candidates< T, U, V, W, true > { - typedef mpl::vector4< - typename make_unsigned<V>::type, - typename make_unsigned<W>::type, - typename make_signed<V>::type, - typename make_signed<W>::type + typedef boost::mpl::vector8< + typename make_unsigned_soft<V>::type, + typename make_unsigned_soft<W>::type, + typename make_signed_soft<V>::type, + typename make_signed_soft<W>::type, + V, W, unsigned int, int > type; }; @@ -262,7 +293,7 @@ struct nominal_candidates< T, U, V*, W*, false > template<class T, class U, bool b> struct common_type_dispatch_on_rvalueness - : deduce_common_type< T, U, typename nominal_candidates<T,U>::type > + : public deduce_common_type< T, U, typename nominal_candidates<T,U>::type > { }; template< class T, class U > @@ -285,7 +316,7 @@ public: template< class T, class U > struct common_type_impl - : common_type_dispatch_on_rvalueness<T,U, sizeof( ::boost::detail_type_traits_common_type::rvalue_test( + : public common_type_dispatch_on_rvalueness<T,U, sizeof( ::boost::detail_type_traits_common_type::rvalue_test( declval< bool >() ? declval<T>() : declval<U>() ) ) == sizeof( yes_type ) > { }; diff --git a/3rdParty/Boost/src/boost/type_traits/detail/cv_traits_impl.hpp b/3rdParty/Boost/src/boost/type_traits/detail/cv_traits_impl.hpp index b3fa595..ed20c9d 100644 --- a/3rdParty/Boost/src/boost/type_traits/detail/cv_traits_impl.hpp +++ b/3rdParty/Boost/src/boost/type_traits/detail/cv_traits_impl.hpp @@ -77,7 +77,7 @@ namespace detail { // Use the implementation above for non function pointers template <typename T, unsigned Select = (unsigned)sizeof(::boost::type_traits::gcc8503::mini_funcptr_tester((T)0)) > -struct cv_traits_imp : ::boost::type_traits::gcc8503::cv_traits_imp<T> { }; +struct cv_traits_imp : public ::boost::type_traits::gcc8503::cv_traits_imp<T> { }; // Functions are never cv-qualified template <typename T> struct cv_traits_imp<T*,1> diff --git a/3rdParty/Boost/src/boost/type_traits/detail/size_t_trait_def.hpp b/3rdParty/Boost/src/boost/type_traits/detail/size_t_trait_def.hpp index 472c6ac..23deeaf 100644 --- a/3rdParty/Boost/src/boost/type_traits/detail/size_t_trait_def.hpp +++ b/3rdParty/Boost/src/boost/type_traits/detail/size_t_trait_def.hpp @@ -8,8 +8,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // $Source$ -// $Date: 2005-08-25 12:27:28 -0400 (Thu, 25 Aug 2005) $ -// $Revision: 30670 $ +// $Date: 2011-04-25 08:26:48 -0400 (Mon, 25 Apr 2011) $ +// $Revision: 71481 $ #include <boost/type_traits/detail/template_arity_spec.hpp> #include <boost/type_traits/integral_constant.hpp> @@ -19,10 +19,10 @@ #include <cstddef> #if !defined(BOOST_MSVC) || BOOST_MSVC >= 1300 -# define BOOST_TT_AUX_SIZE_T_BASE(C) ::boost::integral_constant<std::size_t,C> +# define BOOST_TT_AUX_SIZE_T_BASE(C) public ::boost::integral_constant<std::size_t,C> # define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) /**/ #else -# define BOOST_TT_AUX_SIZE_T_BASE(C) ::boost::mpl::size_t<C> +# define BOOST_TT_AUX_SIZE_T_BASE(C) public ::boost::mpl::size_t<C> # define BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ typedef ::boost::mpl::size_t<C> base_; \ using base_::value; \ @@ -34,6 +34,7 @@ template< typename T > struct trait \ : BOOST_TT_AUX_SIZE_T_BASE(C) \ { \ +public:\ BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ }; \ @@ -45,6 +46,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ template<> struct trait<spec> \ : BOOST_TT_AUX_SIZE_T_BASE(C) \ { \ +public:\ BOOST_TT_AUX_SIZE_T_TRAIT_VALUE_DECL(C) \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \ }; \ diff --git a/3rdParty/Boost/src/boost/type_traits/detail/type_trait_def.hpp b/3rdParty/Boost/src/boost/type_traits/detail/type_trait_def.hpp index 644c7ac..3903f7f 100644 --- a/3rdParty/Boost/src/boost/type_traits/detail/type_trait_def.hpp +++ b/3rdParty/Boost/src/boost/type_traits/detail/type_trait_def.hpp @@ -8,8 +8,8 @@ // http://www.boost.org/LICENSE_1_0.txt) // $Source$ -// $Date: 2004-09-02 11:41:37 -0400 (Thu, 02 Sep 2004) $ -// $Revision: 24874 $ +// $Date: 2011-04-25 08:26:48 -0400 (Mon, 25 Apr 2011) $ +// $Revision: 71481 $ #include <boost/type_traits/detail/template_arity_spec.hpp> #include <boost/mpl/aux_/lambda_support.hpp> @@ -17,6 +17,7 @@ #define BOOST_TT_AUX_TYPE_TRAIT_DEF1(trait,T,result) \ template< typename T > struct trait \ { \ +public:\ typedef result type; \ BOOST_MPL_AUX_LAMBDA_SUPPORT(1,trait,(T)) \ }; \ @@ -27,6 +28,7 @@ BOOST_TT_AUX_TEMPLATE_ARITY_SPEC(1,trait) \ #define BOOST_TT_AUX_TYPE_TRAIT_SPEC1(trait,spec,result) \ template<> struct trait<spec> \ { \ +public:\ typedef result type; \ BOOST_MPL_AUX_LAMBDA_SUPPORT_SPEC(1,trait,(spec)) \ }; \ @@ -35,6 +37,7 @@ template<> struct trait<spec> \ #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_SPEC1(trait,spec,result) \ template<> struct trait##_impl<spec> \ { \ +public:\ typedef result type; \ }; \ /**/ @@ -42,6 +45,7 @@ template<> struct trait##_impl<spec> \ #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_1(param,trait,spec,result) \ template< param > struct trait<spec> \ { \ +public:\ typedef result type; \ }; \ /**/ @@ -49,6 +53,7 @@ template< param > struct trait<spec> \ #define BOOST_TT_AUX_TYPE_TRAIT_PARTIAL_SPEC1_2(param1,param2,trait,spec,result) \ template< param1, param2 > struct trait<spec> \ { \ +public:\ typedef result; \ }; \ /**/ @@ -56,6 +61,7 @@ template< param1, param2 > struct trait<spec> \ #define BOOST_TT_AUX_TYPE_TRAIT_IMPL_PARTIAL_SPEC1_1(param,trait,spec,result) \ template< param > struct trait##_impl<spec> \ { \ +public:\ typedef result type; \ }; \ /**/ |