Index: detail/result_of_iterate.hpp =================================================================== --- detail/result_of_iterate.hpp (revision 60372) +++ detail/result_of_iterate.hpp (working copy) @@ -10,7 +10,7 @@ # error Boost result_of - do not include this file! #endif -#if !defined(BOOST_NO_DECLTYPE) +#if !defined(BOOST_RESULT_OF_NO_DECLTYPE) // As of N2588, C++0x result_of only supports function call // expressions of the form f(x). This precludes support for member @@ -76,7 +76,7 @@ #undef BOOST_RESULT_OF_ARGS -#endif // defined(BOOST_NO_DECLTYPE) +#endif // defined(BOOST_RESULT_OF_NO_DECLTYPE) #if BOOST_PP_ITERATION() >= 1 Index: result_of.hpp =================================================================== --- result_of.hpp (revision 60372) +++ result_of.hpp (working copy) @@ -27,6 +27,13 @@ # define BOOST_RESULT_OF_NUM_ARGS 10 #endif +// On msvc-10, the decltype implementation of result_of causes +// spurious template instantiations in some cases, leading to +// errors. +#if defined(BOOST_NO_DECLTYPE) || BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600)) +# define BOOST_RESULT_OF_NO_DECLTYPE +#endif + namespace boost { template struct result_of;