From 909825a34f42654c5e0bf10c2f9dfe200342b7df Mon Sep 17 00:00:00 2001 From: Tobias Schwinger Date: Fri, 13 Jul 2007 16:26:50 +0000 Subject: [PATCH] simplifies code (minor changes) [SVN r38202] --- .../invocation/invoke_function_object.hpp | 30 ++++++++----------- 1 file changed, 12 insertions(+), 18 deletions(-) diff --git a/include/boost/fusion/functional/invocation/invoke_function_object.hpp b/include/boost/fusion/functional/invocation/invoke_function_object.hpp index e30218e2..748d5b4b 100644 --- a/include/boost/fusion/functional/invocation/invoke_function_object.hpp +++ b/include/boost/fusion/functional/invocation/invoke_function_object.hpp @@ -19,8 +19,6 @@ #include -#include - #include #include @@ -59,10 +57,7 @@ namespace boost { namespace fusion int N = result_of::size::value, bool RandomAccess = traits::is_random_access::value > - struct invoke_function_object_impl - { - typedef boost::blank result; - }; + struct invoke_function_object_impl; template struct invoke_function_object_param_types; @@ -77,10 +72,11 @@ namespace boost { namespace fusion namespace result_of { template struct invoke_function_object - : detail::invoke_function_object_impl< + { + typedef typename detail::invoke_function_object_impl< typename boost::remove_reference::type, Sequence - >::result - { }; + >::result_type type; + }; } template @@ -117,16 +113,15 @@ namespace boost { namespace fusion { public: - struct result + typedef typename boost::result_of< #define M(z,j,data) \ typename boost::remove_reference< \ typename result_of::value_at_c::type >::type - : boost::result_of< Function (BOOST_PP_ENUM(N,M,~)) > + Function (BOOST_PP_ENUM(N,M,~)) >::type result_type; #undef M - { }; template - static inline typename result::type + static inline result_type call(F & f, Sequence & s) { #define M(z,j,data) fusion::at_c(s) @@ -141,13 +136,12 @@ namespace boost { namespace fusion private: typedef invoke_function_object_param_types seq; public: - struct result - : boost::result_of< - Function (BOOST_PP_ENUM_PARAMS(N,typename seq::T)) > - { }; + typedef typename boost::result_of< + Function (BOOST_PP_ENUM_PARAMS(N,typename seq::T)) + >::type result_type; template - static inline typename result::type + static inline result_type call(F & f, Sequence & s) { #if N > 0