From 812e9e379e13c75c0955fc7ca68ddabf6ecc252d Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Wed, 22 Oct 2014 01:02:39 +0900 Subject: [PATCH 1/2] Fix wrong partial specializations. Signed-off-by: Kohei Takahashi --- include/boost/fusion/functional/invocation/invoke.hpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/boost/fusion/functional/invocation/invoke.hpp b/include/boost/fusion/functional/invocation/invoke.hpp index 6e64d1d2..a3ddd4a2 100644 --- a/include/boost/fusion/functional/invocation/invoke.hpp +++ b/include/boost/fusion/functional/invocation/invoke.hpp @@ -107,7 +107,7 @@ namespace boost { namespace fusion { }; template - struct invoke_impl + struct invoke_impl : mpl::if_< ft::is_member_function_pointer, invoke_mem_fn, invoke_nonmember_builtin @@ -115,7 +115,7 @@ namespace boost { namespace fusion { }; template - struct invoke_impl + struct invoke_impl : mpl::eval_if< ft::is_member_pointer, mpl::if_< ft::is_member_function_pointer, invoke_mem_fn, From e014a1d1737994310634fc5f459f0e3dc62bf22b Mon Sep 17 00:00:00 2001 From: Kohei Takahashi Date: Wed, 22 Oct 2014 19:42:48 +0900 Subject: [PATCH 2/2] Fix #10443 completely. Signed-off-by: Kohei Takahashi --- .../fusion/functional/invocation/invoke.hpp | 42 +++++++++++-------- 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/include/boost/fusion/functional/invocation/invoke.hpp b/include/boost/fusion/functional/invocation/invoke.hpp index a3ddd4a2..2de4fced 100644 --- a/include/boost/fusion/functional/invocation/invoke.hpp +++ b/include/boost/fusion/functional/invocation/invoke.hpp @@ -52,11 +52,12 @@ namespace boost { namespace fusion { - namespace result_of - { - template - struct invoke; - } + //~ namespace result_of + //~ { + //~ template + //~ struct invoke; + //~ } //~ template //~ inline typename result_of::invoke::type @@ -72,6 +73,8 @@ namespace boost { namespace fusion { namespace ft = function_types; + template struct always_void_ { typedef T type; }; + template< typename Function, class Sequence, int N = result_of::size::value, @@ -158,18 +161,14 @@ namespace boost { namespace fusion namespace result_of { - template - struct invoke; - - template - struct invoke::type, Sequence - >::result_type> + template ::type, Sequence + >::result_type> + struct invoke { - typedef typename detail::invoke_impl< - typename boost::remove_reference::type, Sequence - >::result_type type; + typedef Enable type; }; } @@ -208,7 +207,9 @@ namespace boost { namespace fusion template struct invoke_impl::type> + typename always_void_< + typename boost::result_of::type + >::type> { public: @@ -299,7 +300,12 @@ namespace boost { namespace fusion fusion::next(BOOST_PP_CAT(i,BOOST_PP_DEC(j))); template - struct invoke_impl + struct invoke_impl::BOOST_PP_CAT(T, j) + typename boost::result_of::type + >::type> +#undef L { private: typedef invoke_param_types seq;