http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58590
--- Comment #2 from Daniel Krügler <daniel.kruegler at googlemail dot com> --- (In reply to Paolo Carlini from comment #1) > Not having investigated this issue at all, I doubt that it should be > considered a SFINAE proper issue, Well, the actual programmer problem occurred in this context of sfinae situation. > that is I think it should be possible to > demonstrate it in an even smaller testcase, not using the usual > SFINAE-exploiting structure (+ very minor nit: the definition of main is > totally redundant and certainly will not be in an eventual testcase) If you replace the current main definition, gcc accepts: int main() { f<S, typename S::member>(0); // OK } which it clearly shouldn't. Especially if you extend to int main() { f<S, typename S::member>(0); // OK f<S, S::member>(0); // Error } where the second line is rejected (as expected).