From 74c9cc968086e25b6b63342528dd8f3e7f13fa2d Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Mon, 30 Mar 2015 01:47:08 -0400 Subject: [PATCH] Remove dependency on deprecated type_traits headers. --- include/boost/function/function_base.hpp | 11 +++--- include/boost/function/function_template.hpp | 36 ++++++++++---------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/include/boost/function/function_base.hpp b/include/boost/function/function_base.hpp index 9e01ef9..200da07 100644 --- a/include/boost/function/function_base.hpp +++ b/include/boost/function/function_base.hpp @@ -25,9 +25,10 @@ #include #include #include -#include #include #include +#include +#include #include #include #ifndef BOOST_NO_SFINAE @@ -74,15 +75,15 @@ #if !BOOST_WORKAROUND(__BORLANDC__, < 0x5A0) # define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \ - typename ::boost::enable_if_c<(::boost::type_traits::ice_not< \ - (::boost::is_integral::value)>::value), \ + typename ::boost::enable_if >::type, \ Type>::type #else // BCC doesn't recognize this depends on a template argument and complains // about the use of 'typename' # define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \ - ::boost::enable_if_c<(::boost::type_traits::ice_not< \ - (::boost::is_integral::value)>::value), \ + ::boost::enable_if<::boost::mpl::not_< \ + ::boost::is_integral >::type, \ Type>::type #endif diff --git a/include/boost/function/function_template.hpp b/include/boost/function/function_template.hpp index ab7abc5..3d5fdab 100644 --- a/include/boost/function/function_template.hpp +++ b/include/boost/function/function_template.hpp @@ -717,9 +717,9 @@ namespace boost { template BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f #ifndef BOOST_NO_SFINAE - ,typename enable_if_c< - (boost::type_traits::ice_not< - (is_integral::value)>::value), + ,typename enable_if< + typename boost::mpl::not_< + is_integral >::type, int>::type = 0 #endif // BOOST_NO_SFINAE ) : @@ -730,9 +730,9 @@ namespace boost { template BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a #ifndef BOOST_NO_SFINAE - ,typename enable_if_c< - (boost::type_traits::ice_not< - (is_integral::value)>::value), + ,typename enable_if< + typename boost::mpl::not_< + is_integral >::type, int>::type = 0 #endif // BOOST_NO_SFINAE ) : @@ -780,9 +780,9 @@ namespace boost { // construct. template #ifndef BOOST_NO_SFINAE - typename enable_if_c< - (boost::type_traits::ice_not< - (is_integral::value)>::value), + typename enable_if< + typename boost::mpl::not_< + is_integral >::type, BOOST_FUNCTION_FUNCTION&>::type #else BOOST_FUNCTION_FUNCTION& @@ -1068,9 +1068,9 @@ public: template function(Functor f #ifndef BOOST_NO_SFINAE - ,typename enable_if_c< - (boost::type_traits::ice_not< - (is_integral::value)>::value), + ,typename enable_if< + typename boost::mpl::not_< + is_integral >::type, int>::type = 0 #endif ) : @@ -1080,9 +1080,9 @@ public: template function(Functor f, Allocator a #ifndef BOOST_NO_SFINAE - ,typename enable_if_c< - (boost::type_traits::ice_not< - (is_integral::value)>::value), + ,typename enable_if< + typename boost::mpl::not_< + is_integral >::type, int>::type = 0 #endif ) : @@ -1120,9 +1120,9 @@ public: template #ifndef BOOST_NO_SFINAE - typename enable_if_c< - (boost::type_traits::ice_not< - (is_integral::value)>::value), + typename enable_if< + typename boost::mpl::not_< + is_integral >::type, self_type&>::type #else self_type&