[Bug c++/15538] New: Fails to recognize type name
igodard at pacbell dot net
gcc-bugzilla@gcc.gnu.org
Wed May 19 23:52:00 GMT 2004
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
More information about the Gcc-bugs
mailing list