diff --git a/include/boost/lambda/detail/lambda_functors.hpp b/include/boost/lambda/detail/lambda_functors.hpp index 9b1b082..db229ec 100644 --- a/include/boost/lambda/detail/lambda_functors.hpp +++ b/include/boost/lambda/detail/lambda_functors.hpp @@ -15,6 +15,7 @@ #include #include +#include #if BOOST_WORKAROUND(BOOST_MSVC, == 1310) @@ -297,6 +298,26 @@ public: } // namespace lambda } // namespace boost +namespace boost { + +#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_DECLTYPE) + +template +struct result_of()> +{ + typedef typename boost::lambda::lambda_functor::nullary_return_type type; +}; + +#endif + +template +struct tr1_result_of()> +{ + typedef typename boost::lambda::lambda_functor::nullary_return_type type; +}; + +} + // is_placeholder #include diff --git a/test/result_of_tests.cpp b/test/result_of_tests.cpp index 9047f5b..c8da329 100644 --- a/test/result_of_tests.cpp +++ b/test/result_of_tests.cpp @@ -299,7 +299,7 @@ int test_main(int, char *[]) { BOOST_CHECK(boost::lambda::bind(with_result_template_reference(), var(one), var(two), var(three), var(four), var(five), var(six), var(seven), var(eight), var(nine))() == 9); // Check using result_of with lambda functors - //BOOST_CHECK(apply0(constant(0)) == 0); + BOOST_CHECK(apply0(constant(0)) == 0); BOOST_CHECK(apply1(_1, one) == 1); BOOST_CHECK(apply1(_1, one) == 1); BOOST_CHECK(apply1(_1, one) == 1);