diff --git a/include/boost/fusion/support/detail/result_of.hpp b/include/boost/fusion/support/detail/result_of.hpp index ff48dac9..e53ea9e3 100644 --- a/include/boost/fusion/support/detail/result_of.hpp +++ b/include/boost/fusion/support/detail/result_of.hpp @@ -7,8 +7,14 @@ #if !defined(FUSION_RESULT_OF_10272014_0654) #define FUSION_RESULT_OF_10272014_0654 +#include #include -#if !(defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES)) + +#if !defined(BOOST_RESULT_OF_USE_DECLTYPE) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#define BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF +#endif + +#if !defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF) #include #include #include @@ -21,12 +27,12 @@ namespace boost { namespace fusion { namespace detail // low level code. So far this is used only in the fold algorithm. This will // be removed once we overhaul fold. -#if defined(BOOST_NO_CXX11_DECLTYPE) || defined(BOOST_NO_CXX11_VARIADIC_TEMPLATES) +#if defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF) template struct result_of_with_decltype : boost::tr1_result_of {}; -#else +#else // defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF) BOOST_MPL_HAS_XXX_TRAIT_DEF(result_type) BOOST_MPL_HAS_XXX_TEMPLATE_DEF(result) @@ -40,7 +46,7 @@ namespace boost { namespace fusion { namespace detail boost::tr1_result_of, boost::detail::cpp0x_result_of >::type {}; -#endif +#endif // defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF) }}} diff --git a/test/algorithm/fold.cpp b/test/algorithm/fold.cpp index 510c845d..249f1bb3 100644 --- a/test/algorithm/fold.cpp +++ b/test/algorithm/fold.cpp @@ -238,7 +238,7 @@ main() } { -#if !defined(BOOST_NO_CXX11_DECLTYPE) +#if !defined(BOOST_FUSION_NO_DECLTYPE_BASED_RESULT_OF) { boost::fusion::vector container{1, 2, 3}; functor f;