public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: "Daniel Krügler" <daniel.kruegler@gmail.com>
Cc: "libstdc++@gcc.gnu.org" <libstdc++@gcc.gnu.org>,
	gcc-patches <gcc-patches@gcc.gnu.org>
Subject: Re: [PATCH] 2/2 Remove debug/array
Date: Thu, 3 Dec 2020 17:21:57 +0000	[thread overview]
Message-ID: <20201203172157.GW2309743@redhat.com> (raw)
In-Reply-To: <CAGNvRgAjij7WRvLn+tHjdRrGgKga7Gy6dp2wGBFgEd6YjwWC-Q@mail.gmail.com>

On 03/12/20 18:14 +0100, Daniel Krügler via Libstdc++ wrote:
>Am Do., 3. Dez. 2020 um 18:10 Uhr schrieb Jonathan Wakely via
>Libstdc++ <libstdc++@gcc.gnu.org>:
>>
>[..]
>> >>Ok to commit ?
>> >
>> >Yes, this is a nice simplification, thanks.
>>
>> This broke the C++11 constexpr support in std::array. Fixed with this
>> patch. Tested x86_64-linux, committed to trunk.
>
>Wouldn't a transformation into a comma expression, such as
>
>return __glibcxx_requires_subscript(__n), _AT_Type::_S_ref(_M_elems, __n);
>
>realize the same thing but would still keep the assertion-like thing?

No, because the assertion is defined as  do { ... } while(false) so
can't be used in C++11 constexpr functions.

We could change that, or introduce new assertion macros just for this
case, but I don't care about C++11 enough to do it.


      reply	other threads:[~2020-12-03 17:22 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-08 14:27 François Dumont
2020-11-09 13:07 ` Jonathan Wakely
2020-12-03 17:09   ` Jonathan Wakely
2020-12-03 17:14     ` Daniel Krügler
2020-12-03 17:21       ` Jonathan Wakely [this message]

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=20201203172157.GW2309743@redhat.com \
    --to=jwakely@redhat.com \
    --cc=daniel.kruegler@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --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).