public inbox for gcc-prs@sourceware.org help / color / mirror / Atom feed
From: bartoschek@gmx.de To: gcc-gnats@gcc.gnu.org Subject: c++/10477: Function call not recognized as template Date: Thu, 24 Apr 2003 08:36:00 -0000 [thread overview] Message-ID: <20030424083059.29997.qmail@sources.redhat.com> (raw) >Number: 10477 >Category: c++ >Synopsis: Function call not recognized as template >Confidential: no >Severity: non-critical >Priority: medium >Responsible: unassigned >State: open >Class: rejects-legal >Submitter-Id: net >Arrival-Date: Thu Apr 24 08:36:01 UTC 2003 >Closed-Date: >Last-Modified: >Originator: bartoschek@gmx.de >Release: 3.2.3 >Organization: >Environment: RedHat 9 and Suse Linux 8.2 >Description: The attached code does not compile. And gives the error error.C: In member function `void B::f(int)': error.C:15: parse error before `>' token The fist < is recognized as operator< and not as the beginning of template arguments. If you delete Line 11: class C {}; the code compiles fine. Class C should not affect in any way the behaviour of void B::f(int). If you delete Class A and use Class C as a template argument: void B::f(int a) { f<C>(); } it still does not compile. (class C has to be defined between class B and void B::f(int a)) >How-To-Repeat: g++ -c error.C >Fix: >Release-Note: >Audit-Trail: >Unformatted: ----gnatsweb-attachment---- Content-Type: text/x-c++src; name="error.C" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="error.C" Y2xhc3MgQSB7fTsKCmNsYXNzIEIKewpwdWJsaWM6CiAgIHRlbXBsYXRlPHR5cGVuYW1lIFQ+CiAg IGlubGluZSB2b2lkIGYoKSB7fQogICBpbmxpbmUgdm9pZCBmKGludCBhKTsKfTsKCmNsYXNzIEMg e307Cgp2b2lkIEI6OmYoaW50IGEpCnsKICAgZjxBPigpOwp9Cg==
next reply other threads:[~2003-04-24 8:36 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2003-04-24 8:36 bartoschek [this message] 2003-04-24 13:21 bangerth
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=20030424083059.29997.qmail@sources.redhat.com \ --to=bartoschek@gmx.de \ --cc=gcc-gnats@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).