------- Comment #3 from dodji at gcc dot gnu dot org 2009-01-08 23:03 ------- Created an attachment (id=17059) --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=17059&action=view) candidate patch
I think what is happening is that lookup_name_real (in name-lookup.c) makes sure types defined in the class hierarchy hide template type parameters. That scheme is implemented in the outer_binding accessor function. That scheme is fine for class templates, as stated in the spec in [temp.res] and [temp.local]. Template parameters of member templates though, should hide types defined in the class scope. This patch tries to implement that. But I am not sure if it's the right approach. I'll keep working on it until it's suitable for submission to gcc-patches. -- http://gcc.gnu.org/bugzilla/show_bug.cgi?id=36019