From 941fff4dc0894dc5c7eb678d9a87c9ae09d09fcb Mon Sep 17 00:00:00 2001 From: Daniel James Date: Sun, 8 Apr 2018 14:28:46 +0100 Subject: [PATCH] Stop using mpl binary logic classes in indirect_traits Was going to use the ice_* classes from type traits, but they're deprecated. --- include/boost/detail/indirect_traits.hpp | 80 +++++++++++------------- 1 file changed, 38 insertions(+), 42 deletions(-) diff --git a/include/boost/detail/indirect_traits.hpp b/include/boost/detail/indirect_traits.hpp index 6294e40..3eecb45 100644 --- a/include/boost/detail/indirect_traits.hpp +++ b/include/boost/detail/indirect_traits.hpp @@ -4,6 +4,7 @@ // http://www.boost.org/LICENSE_1_0.txt) #ifndef INDIRECT_TRAITS_DWA2002131_HPP # define INDIRECT_TRAITS_DWA2002131_HPP +# include # include # include # include @@ -17,12 +18,8 @@ # include # include +# include -# include -# include -# include -# include -# include # include @@ -31,24 +28,24 @@ namespace boost { namespace detail { namespace indirect_traits { template -struct is_reference_to_const : mpl::false_ +struct is_reference_to_const : boost::false_type { }; template -struct is_reference_to_const : mpl::true_ +struct is_reference_to_const : boost::true_type { }; # if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround template -struct is_reference_to_const : mpl::true_ +struct is_reference_to_const : boost::true_type { }; -# endif +# endif template -struct is_reference_to_function : mpl::false_ +struct is_reference_to_function : boost::false_type { }; @@ -58,7 +55,7 @@ struct is_reference_to_function : is_function }; template -struct is_pointer_to_function : mpl::false_ +struct is_pointer_to_function : boost::false_type { }; @@ -70,7 +67,7 @@ struct is_pointer_to_function : is_function }; template -struct is_reference_to_member_function_pointer_impl : mpl::false_ +struct is_reference_to_member_function_pointer_impl : boost::false_type { }; @@ -90,13 +87,13 @@ struct is_reference_to_member_function_pointer template struct is_reference_to_function_pointer_aux - : mpl::and_< - is_reference - , is_pointer_to_function< + : boost::integral_constant::value && + is_pointer_to_function< typename remove_cv< typename remove_reference::type >::type - > + >::value > { // There's no such thing as a pointer-to-cv-function, so we don't need specializations for those @@ -104,77 +101,76 @@ struct is_reference_to_function_pointer_aux template struct is_reference_to_function_pointer - : mpl::if_< - is_reference_to_function - , mpl::false_ + : boost::detail::if_true< + is_reference_to_function::value + >::template then< + boost::false_type , is_reference_to_function_pointer_aux - >::type + >::type { }; template struct is_reference_to_non_const - : mpl::and_< - is_reference - , mpl::not_< - is_reference_to_const - > + : boost::integral_constant::value && + !is_reference_to_const::value > { }; template -struct is_reference_to_volatile : mpl::false_ +struct is_reference_to_volatile : boost::false_type { }; template -struct is_reference_to_volatile : mpl::true_ +struct is_reference_to_volatile : boost::true_type { }; # if defined(BOOST_MSVC) && _MSC_FULL_VER <= 13102140 // vc7.01 alpha workaround template -struct is_reference_to_volatile : mpl::true_ +struct is_reference_to_volatile : boost::true_type { }; -# endif +# endif template -struct is_reference_to_pointer : mpl::false_ +struct is_reference_to_pointer : boost::false_type { }; template -struct is_reference_to_pointer : mpl::true_ +struct is_reference_to_pointer : boost::true_type { }; template -struct is_reference_to_pointer : mpl::true_ +struct is_reference_to_pointer : boost::true_type { }; template -struct is_reference_to_pointer : mpl::true_ +struct is_reference_to_pointer : boost::true_type { }; template -struct is_reference_to_pointer : mpl::true_ +struct is_reference_to_pointer : boost::true_type { }; template struct is_reference_to_class - : mpl::and_< - is_reference - , is_class< + : boost::integral_constant::value && + is_class< typename remove_cv< typename remove_reference::type >::type - > + >::value > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_reference_to_class,(T)) @@ -182,13 +178,13 @@ struct is_reference_to_class template struct is_pointer_to_class - : mpl::and_< - is_pointer - , is_class< + : boost::integral_constant::value && + is_class< typename remove_cv< typename remove_pointer::type >::type - > + >::value > { BOOST_MPL_AUX_LAMBDA_SUPPORT(1,is_pointer_to_class,(T))