[Bug c++/56421] Non-matching overload produces template substitution error

redi at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Fri Feb 22 10:42:00 GMT 2013


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=56421

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2013-02-22 10:42:05 UTC ---
Isn't G++ correct? Foo::type exists unconditionally, so SFINAE doesn't apply.
The invalid type is not in the immediate context of the substitution.

To make this work you would have to only define Foo::type if S::type exists.



More information about the Gcc-bugs mailing list