------- Comment #2 from s dot gesemann at gmail dot com 2009-08-16 12:48 ------- This is probably a related (SFINAE<->decltype) problem:
template<typename T> struct meta { static T&& m(); // make static void s(T); // sink }; // operator()(T&,int) available ? template<typename T, typename = decltype( meta<T&>::m()(23) )> int foo(T x) { x(23); return 1; } int foo(...) { return 0; } int main() { return foo(42); } As far as I can tell it should compile with -std=c++0x and return 0. Instead, the compiler rejects the code. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40944