This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
c++/2761: template<class c> A: public Container<c> { iterator a; } gives a syntax error with -pedantic/compiles without it
- To: gcc-gnats at gcc dot gnu dot org
- Subject: c++/2761: template<class c> A: public Container<c> { iterator a; } gives a syntax error with -pedantic/compiles without it
- From: lachaume at gagax6 dot obs dot ujf-grenoble dot fr
- Date: 7 May 2001 15:24:16 -0000
- Reply-To: lachaume at gagax6 dot obs dot ujf-grenoble dot fr
>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: