Index: boost/utility/detail/result_of_iterate.hpp =================================================================== --- boost/utility/detail/result_of_iterate.hpp (revision 68315) +++ boost/utility/detail/result_of_iterate.hpp (working copy) @@ -56,18 +56,18 @@ namespace detail { -# define BOOST_RESULT_OF_STATIC_MEMBERS(z, n, _) \ - static T ## n t ## n; \ - /**/ - template class cpp0x_result_of_impl { - static F f; - BOOST_PP_REPEAT(BOOST_PP_ITERATION(), BOOST_RESULT_OF_STATIC_MEMBERS, _) + template + static typename add_rvalue_reference::type declval(); public: - typedef decltype(f(BOOST_PP_ENUM_PARAMS(BOOST_PP_ITERATION(),t))) type; + typedef decltype( + declval()( + BOOST_PP_ENUM_BINARY_PARAMS(BOOST_PP_ITERATION(), declval() BOOST_PP_INTERCEPT) + ) + ) type; }; } // namespace detail Index: boost/utility/result_of.hpp =================================================================== --- boost/utility/result_of.hpp (revision 68315) +++ boost/utility/result_of.hpp (working copy) @@ -13,7 +13,9 @@ #include #include #include +#include #include +#include #include #include #include @@ -22,6 +24,7 @@ #include #include #include +#include #ifndef BOOST_RESULT_OF_NUM_ARGS # define BOOST_RESULT_OF_NUM_ARGS 10