http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48113
Jason Merrill <jason at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |jason at gcc dot gnu.org
|gnu.org |
--- Comment #4 from Jason Merrill <jason at gcc dot gnu.org> 2011-03-14
17:24:36 UTC ---
SFINAE is not removing an overload; it doesn't work like that. SFINAE only
applies to function templates, not non-template member functions of class
templates. It's just that for some reason we aren't complaining about the
functor case. Reduced further:
struct A { };
volatile A& f();
struct F1
{
void operator()(A);
};
typedef void (*F2)(A);
typedef decltype (F1()(f())) t1;
typedef decltype (F2()(f())) t2;
The inconsistency is odd. I would expect both lines to give an error.