public inbox for libstdc++@gcc.gnu.org
 help / color / mirror / Atom feed
From: Jonathan Wakely <jwakely@redhat.com>
To: Patrick Palka <ppalka@redhat.com>
Cc: gcc-patches@gcc.gnu.org, libstdc++@gcc.gnu.org
Subject: Re: [PATCH] libstdc++: Fix backward compatibility of P2325R3 backport [PR106320]
Date: Fri, 22 Jul 2022 17:20:55 +0100	[thread overview]
Message-ID: <CACb0b4=BsWVdyTO-HtaBcOSPF4ODKQ7=yrV5DuHpye1VzM6zqw@mail.gmail.com> (raw)
In-Reply-To: <20220722155200.1533671-1-ppalka@redhat.com>

On Fri, 22 Jul 2022 at 16:52, Patrick Palka via Libstdc++
<libstdc++@gcc.gnu.org> wrote:
>
> The 11 and 10 partial backports of P2325R3, r11-9555-g92d612cccc1eec and
> r10-10808-g22b86cdc4d7fdd, unnecessarily preserved some changes from the
> paper that made certain views no longer default constructible, changes
> which aren't required to reap the overall benefits of the paper and
> which conflicted with the goal to maximize backwards compatibility with
> pre-P2325R3 code.
>
> This patch reverts the problematic changes, specifically it relaxes
> the constraints on various views' default constructors so that they
> reflect only the requirements that were already implicitly imposed by
> the NSDMIs of the view.  Thus for example this patch retains the
> default_initializable<_Vp> constraint on transform_view's default
> constructor since its '_Vp _M_base = _Vp()' NSDMI already reflects this
> constraint, and it removes the default_initializable<_Fp> constraint
> since the corresponding member '__detail::__box<_Fp> _M_fun' doesn't
> require default initializability (specializations of __box are always
> default constructible).
>
> After reverting these changes, all static_asserts from p2325.cc that
> verify lack of default constructibility now fail as expected, matching
> the pre-P2325R3 behavior.
>
> Tested on x86_64-pc-linux-gnu, does this look OK for the 11 and 10
> branches?

OK for gcc-10 and gcc-11 (with the completed ChangeLog), thanks.


      parent reply	other threads:[~2022-07-22 16:21 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-22 15:52 Patrick Palka
2022-07-22 15:58 ` Patrick Palka
2022-07-22 16:20 ` 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='CACb0b4=BsWVdyTO-HtaBcOSPF4ODKQ7=yrV5DuHpye1VzM6zqw@mail.gmail.com' \
    --to=jwakely@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=libstdc++@gcc.gnu.org \
    --cc=ppalka@redhat.com \
    /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).