
Eric Niebler wrote:
Another work-around is to add the following:
#if BOOST_WORKAROUND(BOOST_MSVC, BOOST_TESTED_AT(1400)) namespace boost { template<typename T> struct result_of;
template<typename T, typename A> struct result_of<Foo<T>(A)> : Foo<T>::template result<void(A)> {}; } #endif
It's also possible to provide the actual return type in the result_of specialization (which is what I use when I need to talk to result_of). No workarounds are needed in this case. template<class T, class A> struct result_of<Foo<T>(A)> { typedef ... type; }; The problem is that to stay cv-correct you need four specializations. Two if you ignore volatile function objects. template<class T, class A> struct result_of<Foo<T> const ( A )> { typedef ... type; };