public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* c++/2761: template<class c> A: public Container<c> { iterator a; } gives a syntax error with -pedantic/compiles without it
@ 2001-05-07  8:26 lachaume
  0 siblings, 0 replies; only message in thread
From: lachaume @ 2001-05-07  8:26 UTC (permalink / raw)
  To: gcc-gnats

>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:


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2001-05-07  8:26 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-05-07  8:26 c++/2761: template<class c> A: public Container<c> { iterator a; } gives a syntax error with -pedantic/compiles without it lachaume

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).