Bug 26904 - A template named the same as its member confuses lookup through inheritance
Summary: A template named the same as its member confuses lookup through inheritance
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: c++ (show other bugs)
Version: 4.0.2
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-28 15:16 UTC by Dave Abrahams
Modified: 2016-05-09 09:41 UTC (History)
3 users (show)

See Also:
Host:
Target:
Build:
Known to work: 4.9.3, 5.3.0, 6.1.0
Known to fail:
Last reconfirmed:


Attachments
Preprocessed C++ source (13.70 KB, text/plain)
2006-03-28 15:16 UTC, Dave Abrahams
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dave Abrahams 2006-03-28 15:16:03 UTC
The enclosed demonstrates.  define either SUPPRESS_BUG or SUPPRESS_BUG2 to show that either not using inheritance or using a template called typer instead of type will suppress the bug.
Comment 1 Dave Abrahams 2006-03-28 15:16:58 UTC
Created attachment 11136 [details]
Preprocessed C++ source
Comment 2 Andrew Pinski 2006-05-01 02:28:43 UTC
Do you have a shorter testcase?  It is hard to figure out if this is valid code (though it does look like it is).
Comment 3 Dave Abrahams 2006-05-01 02:43:29 UTC
I'm afraid I don't.
Comment 4 Martin Sebor 2016-05-07 00:55:57 UTC
The test case compiles with today's trunk (7.0) as well all supported versions (all the way back to 4.9.3).  Resolving as Fixed.
Comment 5 Jonathan Wakely 2016-05-09 09:41:24 UTC
For the record, it seems to have first been fixed for GCC 4.5