public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ville Voutilainen <ville.voutilainen@gmail.com>
To: Jonathan Wakely <jwakely@redhat.com>
Cc: "libstdc++" <libstdc++@gcc.gnu.org>,
	gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: Re: [committed] libstdc++: Move attributes that follow requires-clauses [PR101782]
Date: Thu, 5 Aug 2021 17:27:29 +0300	[thread overview]
Message-ID: <CAFk2RUb6-J0-g3ovT=a5nnfZX1jBNSOoQzBeaW_D-uaeAs3xmA@mail.gmail.com> (raw)
In-Reply-To: <YQvzV/dGe+qPhbS0@redhat.com>

On Thu, 5 Aug 2021 at 17:21, Jonathan Wakely via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> On 04/08/21 12:55 +0100, Jonathan Wakely wrote:
> >This adds [[nodiscard]] throughout <iterator>, as proposed by P2377R0
> >(with some minor corrections).
> >
> >The attribute is added for all modes from C++11 up, using
> >[[__nodiscard__]] or _GLIBCXX_NODISCARD where C++17 [[nodiscard]] can't
> >be used directly.
>
> This change causes errors when -fconcepts-ts is used. Fixed like so.

But this makes the attribute appertain to the function type, not to
the function. It's also ill-formed:
"The attribute-token nodiscard may be applied to the declarator-id in
a function declaration or to the
declaration of a class or enumeration. " Your change makes nodiscard
be applied to the function declaration,
not to the declarator-id.

  reply	other threads:[~2021-08-05 14:27 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-04 11:55 [committed 1/2] libstdc++: Add [[nodiscard]] to iterators and related utilities Jonathan Wakely
2021-08-04 11:56 ` [committed 2/2] libstdc++: Add [[nodiscard]] to sequence containers Jonathan Wakely
2021-08-04 12:00   ` Jonathan Wakely
2021-08-05 12:09     ` Christophe Lyon
2021-08-05 12:13       ` Ville Voutilainen
2021-08-05 14:21         ` Jonathan Wakely
2021-08-05 14:38     ` Jonathan Wakely
2021-08-05 14:19 ` [committed] libstdc++: Move attributes that follow requires-clauses [PR101782] Jonathan Wakely
2021-08-05 14:27   ` Ville Voutilainen [this message]
2021-08-05 14:40   ` Jonathan Wakely
2021-08-05 18:02     ` Jonathan Wakely
2021-08-06 13:29       ` Jonathan Wakely

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='CAFk2RUb6-J0-g3ovT=a5nnfZX1jBNSOoQzBeaW_D-uaeAs3xmA@mail.gmail.com' \
    --to=ville.voutilainen@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jwakely@redhat.com \
    --cc=libstdc++@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).