forked from boostorg/fusion
Use boost::enable_if_has_type instead.
This commit is contained in:
@ -39,9 +39,9 @@
|
|||||||
#include <boost/function_types/parameter_types.hpp>
|
#include <boost/function_types/parameter_types.hpp>
|
||||||
|
|
||||||
#include <boost/utility/result_of.hpp>
|
#include <boost/utility/result_of.hpp>
|
||||||
|
#include <boost/core/enable_if.hpp>
|
||||||
|
|
||||||
#include <boost/fusion/support/category_of.hpp>
|
#include <boost/fusion/support/category_of.hpp>
|
||||||
#include <boost/fusion/support/detail/enabler.hpp>
|
|
||||||
#include <boost/fusion/sequence/intrinsic/at.hpp>
|
#include <boost/fusion/sequence/intrinsic/at.hpp>
|
||||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||||
#include <boost/fusion/sequence/intrinsic/front.hpp>
|
#include <boost/fusion/sequence/intrinsic/front.hpp>
|
||||||
@ -148,7 +148,7 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <typename Function, class Sequence>
|
template <typename Function, class Sequence>
|
||||||
struct invoke<Function, Sequence,
|
struct invoke<Function, Sequence,
|
||||||
typename detail::enabler<
|
typename enable_if_has_type<
|
||||||
typename detail::invoke_impl<
|
typename detail::invoke_impl<
|
||||||
typename boost::remove_reference<Function>::type, Sequence
|
typename boost::remove_reference<Function>::type, Sequence
|
||||||
>::result_type
|
>::result_type
|
||||||
@ -195,7 +195,7 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <typename Function, class Sequence>
|
template <typename Function, class Sequence>
|
||||||
struct invoke_impl<Function,Sequence,N,false,true,
|
struct invoke_impl<Function,Sequence,N,false,true,
|
||||||
typename enabler<
|
typename enable_if_has_type<
|
||||||
typename boost::result_of<Function(BOOST_PP_ENUM(N,M,~)) >::type
|
typename boost::result_of<Function(BOOST_PP_ENUM(N,M,~)) >::type
|
||||||
>::type>
|
>::type>
|
||||||
{
|
{
|
||||||
@ -289,7 +289,7 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <typename Function, class Sequence>
|
template <typename Function, class Sequence>
|
||||||
struct invoke_impl<Function,Sequence,N,false,false,
|
struct invoke_impl<Function,Sequence,N,false,false,
|
||||||
typename enabler<
|
typename enable_if_has_type<
|
||||||
#define L(z,j,data) typename invoke_param_types<Sequence,N>::BOOST_PP_CAT(T, j)
|
#define L(z,j,data) typename invoke_param_types<Sequence,N>::BOOST_PP_CAT(T, j)
|
||||||
typename boost::result_of<Function(BOOST_PP_ENUM(N,L,~))>::type
|
typename boost::result_of<Function(BOOST_PP_ENUM(N,L,~))>::type
|
||||||
>::type>
|
>::type>
|
||||||
|
@ -18,14 +18,12 @@
|
|||||||
#include <boost/preprocessor/repetition/enum_params.hpp>
|
#include <boost/preprocessor/repetition/enum_params.hpp>
|
||||||
|
|
||||||
#include <boost/utility/result_of.hpp>
|
#include <boost/utility/result_of.hpp>
|
||||||
|
#include <boost/core/enable_if.hpp>
|
||||||
|
|
||||||
#include <boost/type_traits/remove_reference.hpp>
|
#include <boost/type_traits/remove_reference.hpp>
|
||||||
#include <boost/type_traits/remove_const.hpp>
|
#include <boost/type_traits/remove_const.hpp>
|
||||||
|
|
||||||
#include <boost/utility/result_of.hpp>
|
|
||||||
|
|
||||||
#include <boost/fusion/support/category_of.hpp>
|
#include <boost/fusion/support/category_of.hpp>
|
||||||
#include <boost/fusion/support/detail/enabler.hpp>
|
|
||||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||||
#include <boost/fusion/sequence/intrinsic/at.hpp>
|
#include <boost/fusion/sequence/intrinsic/at.hpp>
|
||||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||||
@ -62,7 +60,7 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <class Function, class Sequence>
|
template <class Function, class Sequence>
|
||||||
struct invoke_function_object<Function, Sequence,
|
struct invoke_function_object<Function, Sequence,
|
||||||
typename detail::enabler<
|
typename enable_if_has_type<
|
||||||
typename detail::invoke_function_object_impl<
|
typename detail::invoke_function_object_impl<
|
||||||
typename boost::remove_reference<Function>::type, Sequence
|
typename boost::remove_reference<Function>::type, Sequence
|
||||||
>::result_type
|
>::result_type
|
||||||
@ -110,7 +108,7 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <class Function, class Sequence>
|
template <class Function, class Sequence>
|
||||||
struct invoke_function_object_impl<Function,Sequence,N,true,
|
struct invoke_function_object_impl<Function,Sequence,N,true,
|
||||||
typename enabler<
|
typename enable_if_has_type<
|
||||||
typename boost::result_of<Function (BOOST_PP_ENUM(N,M,~)) >::type
|
typename boost::result_of<Function (BOOST_PP_ENUM(N,M,~)) >::type
|
||||||
>::type>
|
>::type>
|
||||||
{
|
{
|
||||||
@ -151,7 +149,7 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <class Function, class Sequence>
|
template <class Function, class Sequence>
|
||||||
struct invoke_function_object_impl<Function,Sequence,N,false,
|
struct invoke_function_object_impl<Function,Sequence,N,false,
|
||||||
typename enabler<
|
typename enable_if_has_type<
|
||||||
typename boost::result_of<Function (BOOST_PP_ENUM(N,M,~)) >::type
|
typename boost::result_of<Function (BOOST_PP_ENUM(N,M,~)) >::type
|
||||||
>::type>
|
>::type>
|
||||||
#undef M
|
#undef M
|
||||||
|
@ -20,6 +20,7 @@
|
|||||||
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
|
#include <boost/preprocessor/repetition/enum_shifted_params.hpp>
|
||||||
|
|
||||||
#include <boost/type_traits/remove_reference.hpp>
|
#include <boost/type_traits/remove_reference.hpp>
|
||||||
|
#include <boost/core/enable_if.hpp>
|
||||||
|
|
||||||
#include <boost/mpl/front.hpp>
|
#include <boost/mpl/front.hpp>
|
||||||
|
|
||||||
@ -28,7 +29,6 @@
|
|||||||
#include <boost/function_types/parameter_types.hpp>
|
#include <boost/function_types/parameter_types.hpp>
|
||||||
|
|
||||||
#include <boost/fusion/support/category_of.hpp>
|
#include <boost/fusion/support/category_of.hpp>
|
||||||
#include <boost/fusion/support/detail/enabler.hpp>
|
|
||||||
#include <boost/fusion/sequence/intrinsic/at.hpp>
|
#include <boost/fusion/sequence/intrinsic/at.hpp>
|
||||||
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
#include <boost/fusion/sequence/intrinsic/size.hpp>
|
||||||
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
#include <boost/fusion/sequence/intrinsic/begin.hpp>
|
||||||
@ -66,7 +66,7 @@ namespace boost { namespace fusion
|
|||||||
|
|
||||||
template <typename Function, class Sequence>
|
template <typename Function, class Sequence>
|
||||||
struct invoke_procedure<Function, Sequence,
|
struct invoke_procedure<Function, Sequence,
|
||||||
typename detail::enabler<
|
typename enable_if_has_type<
|
||||||
typename detail::invoke_procedure_impl<
|
typename detail::invoke_procedure_impl<
|
||||||
typename boost::remove_reference<Function>::type,Sequence
|
typename boost::remove_reference<Function>::type,Sequence
|
||||||
>::result_type
|
>::result_type
|
||||||
|
@ -1,18 +0,0 @@
|
|||||||
/*=============================================================================
|
|
||||||
Copyright (c) 2015 Kohei Takahashi
|
|
||||||
|
|
||||||
Use modification and distribution are subject to the Boost Software
|
|
||||||
License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at
|
|
||||||
http://www.boost.org/LICENSE_1_0.txt).
|
|
||||||
==============================================================================*/
|
|
||||||
#ifndef FUSION_DETAIL_ENABLER_02082015_163810
|
|
||||||
#define FUSION_DETAIL_ENABLER_02082015_163810
|
|
||||||
|
|
||||||
namespace boost { namespace fusion { namespace detail
|
|
||||||
{
|
|
||||||
template <typename, typename T = void>
|
|
||||||
struct enabler { typedef T type; };
|
|
||||||
}}}
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
@ -13,6 +13,7 @@
|
|||||||
#include <boost/mpl/bool.hpp>
|
#include <boost/mpl/bool.hpp>
|
||||||
#include <boost/mpl/assert.hpp>
|
#include <boost/mpl/assert.hpp>
|
||||||
#include <boost/utility/result_of.hpp>
|
#include <boost/utility/result_of.hpp>
|
||||||
|
#include <boost/core/enable_if.hpp>
|
||||||
|
|
||||||
#if !defined(BOOST_NO_SFINAE) && defined(BOOST_RESULT_OF_USE_DECLTYPE)
|
#if !defined(BOOST_NO_SFINAE) && defined(BOOST_RESULT_OF_USE_DECLTYPE)
|
||||||
|
|
||||||
@ -20,8 +21,6 @@
|
|||||||
|
|
||||||
namespace sfinae_friendly
|
namespace sfinae_friendly
|
||||||
{
|
{
|
||||||
template <typename, typename T = void> struct void_ { typedef T type; };
|
|
||||||
|
|
||||||
template <typename> struct arg_;
|
template <typename> struct arg_;
|
||||||
template <typename R, typename T> struct arg_<R(T)> { typedef T type; };
|
template <typename R, typename T> struct arg_<R(T)> { typedef T type; };
|
||||||
|
|
||||||
@ -30,7 +29,7 @@ namespace sfinae_friendly
|
|||||||
: boost::mpl::true_ { };
|
: boost::mpl::true_ { };
|
||||||
|
|
||||||
template <typename Traits>
|
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_ { };
|
: boost::mpl::false_ { };
|
||||||
|
|
||||||
struct unspecified {};
|
struct unspecified {};
|
||||||
|
Reference in New Issue
Block a user