Use boost::enable_if_has_type instead.

This commit is contained in:
Kohei Takahashi
2015-11-01 11:10:11 +09:00
parent f88dbb6876
commit 981f71d04f
5 changed files with 12 additions and 33 deletions

View File

@ -13,6 +13,7 @@
#include <boost/mpl/bool.hpp>
#include <boost/mpl/assert.hpp>
#include <boost/utility/result_of.hpp>
#include <boost/core/enable_if.hpp>
#if !defined(BOOST_NO_SFINAE) && defined(BOOST_RESULT_OF_USE_DECLTYPE)
@ -20,8 +21,6 @@
namespace sfinae_friendly
{
template <typename, typename T = void> struct void_ { typedef T type; };
template <typename> struct arg_;
template <typename R, typename T> struct arg_<R(T)> { typedef T type; };
@ -30,7 +29,7 @@ namespace sfinae_friendly
: boost::mpl::true_ { };
template <typename Traits>
struct check<Traits, typename void_<typename Traits::type>::type>
struct check<Traits, typename boost::enable_if_has_type<typename Traits::type>::type>
: boost::mpl::false_ { };
struct unspecified {};