https://gcc.gnu.org/bugzilla/show_bug.cgi?id=48920 --- Comment #6 from Johannes Schaub <schaub.johannes at googlemail dot com> --- Well then you can replace the class with a nameepace, I think, to remove the class-scope complication. I think GCC would still incorrectly apply typename lookup.