https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87841
--- Comment #3 from Ole Kniemeyer <o_kniemeyer at maxon dot net> --- Yes, I also tried other compilers, and all of them fail. But in [temp.local] it is explicitly stated that "the name of a member of the class template hides the name of a template-parameter of any enclosing class templates (BUT NOT A TEMPLATE-PARAMETER OF THE MEMBER IF THE MEMBER IS A CLASS OR FUNCTION TEMPLATE)". (Bold by me, that's the case of this bug.)