This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/15538] New: Fails to recognize type name
- From: "igodard at pacbell dot net" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 19 May 2004 09:56:04 -0000
- Subject: [Bug c++/15538] New: Fails to recognize type name
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
This is the "curiously recursive template" pattern, where the derived class is a template argument to its own base class, but modified by having the argument being the template for the derived class rather than a particular derived class. When the argument is a plain class (including template instance) then the base class can refer to the public type members of the argument. However in this case it doesn't find a public type member of an instantiation of the template argument.
The standard in this area is beyond me, so maybe it really isn't supposed to recognize the member type for some reason. But if so, please change the error message from:
/home/ivan/ootbc/common/include/allocator.hh:36: error: no type named `const_pointer' in `class StdAllocator<int>'
to something that indicates what is actually wrong, because in fact there is a type with that name and it can be referenced successfully from outside the StdAllocator<int>.
--
Summary: Fails to recognize type name
Product: gcc
Version: 3.4.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: igodard at pacbell dot net
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15538