public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: rodrigc@gcc.gnu.org To: gcc-bugs@gcc.gnu.org, gcc-prs@gcc.gnu.org, leonid_d@mail.ru, nobody@gcc.gnu.org Subject: Re: c++/5367: -pedantic switch causes template compilation to fail Date: Sun, 13 Jan 2002 10:40:00 -0000 [thread overview] Message-ID: <20020113184050.7818.qmail@sources.redhat.com> (raw) Synopsis: -pedantic switch causes template compilation to fail State-Changed-From-To: open->feedback State-Changed-By: rodrigc State-Changed-When: Sun Jan 13 10:40:49 2002 State-Changed-Why: With gcc 3.0.3, if I compile your test case with: g++ -pedantic -c test.cpp I get the error: test.cpp:7: warning: ISO C++ forbids declaration of `iterator' with no type test.cpp:7: cannot declare member `std::map<Key, T*, std::less<_Key>, std::allocator<std::pair<const Key, T*> > >::iterator' within `TemplateA<Key, T>' If I change the line: typedef MyMap::iterator MyMapIterator; to: typedef typename MyMap::iterator MyMapIterator; then it can compile. Can you verify if this works for you? http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=5367
next reply other threads:[~2002-01-13 18:40 UTC|newest] Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top 2002-01-13 10:40 rodrigc [this message] -- strict thread matches above, loose matches on Subject: below -- 2002-02-17 18:56 Leonid Dubinsky 2002-02-17 18:50 rodrigc 2002-01-13 4:06 leonid_d
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20020113184050.7818.qmail@sources.redhat.com \ --to=rodrigc@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ --cc=gcc-gnats@gcc.gnu.org \ --cc=gcc-prs@gcc.gnu.org \ --cc=leonid_d@mail.ru \ --cc=nobody@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).