------- Comment #9 from paolo dot carlini at oracle dot com 2009-12-08 09:53 ------- This is yet another, C++0x, in this case, testcase, as provided by Jon. I believe it's the same obnoxious mangling issue, but an additional testcase cannot hurt ;)
#include <type_traits> unsigned value = 0; struct Inc { void operator()() const { ++value; } }; template<class T> decltype( std::declval<T>()() ) f() { return T()(); } void g() { return f<Inc>(); } -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38600