diff options
Diffstat (limited to 'boost/spirit/home/x3/support/utility/is_callable.hpp')
-rw-r--r-- | boost/spirit/home/x3/support/utility/is_callable.hpp | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/boost/spirit/home/x3/support/utility/is_callable.hpp b/boost/spirit/home/x3/support/utility/is_callable.hpp index 17f86822b8..5e116de410 100644 --- a/boost/spirit/home/x3/support/utility/is_callable.hpp +++ b/boost/spirit/home/x3/support/utility/is_callable.hpp @@ -7,25 +7,17 @@ #ifndef BOOST_SPIRIT_X3_IS_CALLABLE_HPP_INCLUDED #define BOOST_SPIRIT_X3_IS_CALLABLE_HPP_INCLUDED -#if defined(_MSC_VER) -#pragma once -#endif - -#include <boost/utility/result_of.hpp> #include <boost/mpl/bool.hpp> #include <boost/spirit/home/x3/support/utility/sfinae.hpp> - namespace boost { namespace spirit { namespace x3 { namespace detail { template <typename Sig, typename Enable = void> - struct is_callable_impl - : mpl::false_ - {}; + struct is_callable_impl : mpl::false_ {}; template <typename F, typename... A> struct is_callable_impl<F(A...), typename disable_if_substitution_failure< - typename result_of<F(A...)>::type>::type> + decltype(std::declval<F>()(std::declval<A>()...))>::type> : mpl::true_ {}; }}}} @@ -36,9 +28,7 @@ namespace boost { namespace spirit { namespace x3 struct is_callable; template <typename F, typename... A> - struct is_callable<F(A...)> - : detail::is_callable_impl<F(A...)> - {}; + struct is_callable<F(A...)> : detail::is_callable_impl<F(A...)> {}; }}} |