Ticket #4072: result_of_msvc10.patch

File result_of_msvc10.patch, 1.2 KB (added by Eric Niebler, 13 years ago)

patch for result_of on trunk

  • detail/result_of_iterate.hpp

     
    1010# error Boost result_of - do not include this file!
    1111#endif
    1212
    13 #if !defined(BOOST_NO_DECLTYPE)
     13#if !defined(BOOST_RESULT_OF_NO_DECLTYPE)
    1414
    1515// As of N2588, C++0x result_of only supports function call
    1616// expressions of the form f(x). This precludes support for member
     
    7676
    7777#undef BOOST_RESULT_OF_ARGS
    7878
    79 #endif // defined(BOOST_NO_DECLTYPE)
     79#endif // defined(BOOST_RESULT_OF_NO_DECLTYPE)
    8080
    8181#if BOOST_PP_ITERATION() >= 1
    8282
  • result_of.hpp

     
    2727#  define BOOST_RESULT_OF_NUM_ARGS 10
    2828#endif
    2929
     30// On msvc-10, the decltype implementation of result_of causes
     31// spurious template instantiations in some cases, leading to
     32// errors.
     33#if defined(BOOST_NO_DECLTYPE) || BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1600))
     34#  define BOOST_RESULT_OF_NO_DECLTYPE
     35#endif
     36
    3037namespace boost {
    3138
    3239template<typename F> struct result_of;