This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug c++/13967] A warning could be emitted if a template parameter of a member template is begin shadowed by another member of the class


------- Additional Comments From gcc-bugs at michaelmellor dot com  2004-02-02 20:44 -------
Gabriel Dos Reis writes:
|Well, I don't think GCC is in error.  When you define a function (or a
|class) in a class, it gets rewritten as if it where defined outside of
|the class (which is why we get the reevaluation rule I pointed you to
|in a different PR).  Now, when you reevaluate the member template
|outside of the class, name lookup is required to find X::C -- see 
|14.6.1/5 and 14.6.1/7

14.6.1/5 and 14.6.1/7 refer to "In the definition of a member of a class 
template..." and "In the definition of a class template or in the definition 
of a member of such a template..." respectively. The example does not have a 
class template, it is a member-template.

So AFAICS GCC is wrong.



-- 


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]