c++/2761: template<class c> A: public Container<c> { iterator a; } gives a syntax error with -pedantic/compiles without it
lachaume@gagax6.obs.ujf-grenoble.fr
lachaume@gagax6.obs.ujf-grenoble.fr
Mon May 7 08:26:00 GMT 2001
>Number: 2761
>Category: c++
>Synopsis: template<class c> A: public Container<c> { iterator a; } gives a syntax error with -pedantic/compiles without it
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: rejects-legal
>Submitter-Id: net
>Arrival-Date: Mon May 07 08:26:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator: Regis Lachaume
>Release: last night snapshot (May, the 7th)
>Organization:
>Environment:
linux i386
>Description:
In a template class publicly derivated from a container
that has one of the template parameters as basetype,
iterator and const_iterator give a syntax error when
gcc compiles with -pedantic + any option and compile well
whithout that option. Example
#include <vector>
template<class vt>
class B: public std::vector<vt> { iterator a; };
int main() { }
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list