Skip to content

Commit

Permalink
Use enable_if from TypeTraits
Browse files Browse the repository at this point in the history
  • Loading branch information
glenfe committed Sep 22, 2018
1 parent b1fa00f commit d1ad114
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions include/boost/function/function_base.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
#include <boost/config/workaround.hpp>
#include <boost/type_traits/alignment_of.hpp>
#ifndef BOOST_NO_SFINAE
# include "boost/utility/enable_if.hpp"
#include <boost/type_traits/enable_if.hpp>
#else
# include "boost/mpl/bool.hpp"
#endif
Expand All @@ -50,7 +50,7 @@
#endif // __ICL etc

# define BOOST_FUNCTION_ENABLE_IF_NOT_INTEGRAL(Functor,Type) \
typename ::boost::enable_if_c< \
typename ::boost::enable_if_< \
!(::boost::is_integral<Functor>::value), \
Type>::type

Expand Down
12 changes: 6 additions & 6 deletions include/boost/function/function_template.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -715,7 +715,7 @@ namespace boost {
template<typename Functor>
BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f
#ifndef BOOST_NO_SFINAE
,typename boost::enable_if_c<
,typename boost::enable_if_<
!(is_integral<Functor>::value),
int>::type = 0
#endif // BOOST_NO_SFINAE
Expand All @@ -727,7 +727,7 @@ namespace boost {
template<typename Functor,typename Allocator>
BOOST_FUNCTION_FUNCTION(Functor BOOST_FUNCTION_TARGET_FIX(const &) f, Allocator a
#ifndef BOOST_NO_SFINAE
,typename boost::enable_if_c<
,typename boost::enable_if_<
!(is_integral<Functor>::value),
int>::type = 0
#endif // BOOST_NO_SFINAE
Expand Down Expand Up @@ -776,7 +776,7 @@ namespace boost {
// construct.
template<typename Functor>
#ifndef BOOST_NO_SFINAE
typename boost::enable_if_c<
typename boost::enable_if_<
!(is_integral<Functor>::value),
BOOST_FUNCTION_FUNCTION&>::type
#else
Expand Down Expand Up @@ -1066,7 +1066,7 @@ class function<BOOST_FUNCTION_PARTIAL_SPEC>
template<typename Functor>
function(Functor f
#ifndef BOOST_NO_SFINAE
,typename boost::enable_if_c<
,typename boost::enable_if_<
!(is_integral<Functor>::value),
int>::type = 0
#endif
Expand All @@ -1077,7 +1077,7 @@ class function<BOOST_FUNCTION_PARTIAL_SPEC>
template<typename Functor,typename Allocator>
function(Functor f, Allocator a
#ifndef BOOST_NO_SFINAE
,typename boost::enable_if_c<
,typename boost::enable_if_<
!(is_integral<Functor>::value),
int>::type = 0
#endif
Expand Down Expand Up @@ -1116,7 +1116,7 @@ class function<BOOST_FUNCTION_PARTIAL_SPEC>

template<typename Functor>
#ifndef BOOST_NO_SFINAE
typename boost::enable_if_c<
typename boost::enable_if_<
!(is_integral<Functor>::value),
self_type&>::type
#else
Expand Down

0 comments on commit d1ad114

Please sign in to comment.