public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Florian Weimer <fw@deneb.enyo.de>
To: Mattias Karlsson <betasoft@acc.umu.se>
Cc: gcc@gcc.gnu.org
Subject: Re: Template declaration inside function
Date: Tue, 21 Jun 2005 16:44:00 -0000	[thread overview]
Message-ID: <87ll53lkwq.fsf@deneb.enyo.de> (raw)
In-Reply-To: <Pine.GSO.4.62.0506211824120.25845@shaka.acc.umu.se> (Mattias Karlsson's message of "Tue, 21 Jun 2005 18:39:27 +0200 (MEST)")

* Mattias Karlsson:

> Given:
>
> void f(void)
> {
>    template<typename T> class A
>    {
>    };
> }
>
> g++ 4.0/3.4 gives: 
> bug.cpp:4: error: expected primary-expression before 'template'
>
> Can a language lawer please confirm that this is even valid before I
> create a PR?

It's not valid (local template declarations are not allowed, see
14(2)), but it makes sense to create a PR.  The error message is very
hard to understand.

  reply	other threads:[~2005-06-21 16:44 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-21 16:39 Mattias Karlsson
2005-06-21 16:44 ` Florian Weimer [this message]
2005-06-21 17:02   ` Mattias Karlsson

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=87ll53lkwq.fsf@deneb.enyo.de \
    --to=fw@deneb.enyo.de \
    --cc=betasoft@acc.umu.se \
    --cc=gcc@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: link
Be 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).