From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by sourceware.org (Postfix) with ESMTP id A837A385AC2E for ; Mon, 26 Jul 2021 09:48:30 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org A837A385AC2E Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-265-V2D0KKLKNcWJh7POUpbk_g-1; Mon, 26 Jul 2021 05:48:29 -0400 X-MC-Unique: V2D0KKLKNcWJh7POUpbk_g-1 Received: by mail-wm1-f69.google.com with SMTP id c2-20020a7bc8420000b0290238db573ab7so2511145wml.5 for ; Mon, 26 Jul 2021 02:48:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rG3j1WHyz+Tq2wS9aYLh6Q1yyup2P+J6/WMv6/nu0Ok=; b=l9+bF/lxKPmwu2pgQaSQ5XvbJ6SjVG8+UCWH0V0Yt9Rlu8hYPN1lzayfaiRS6/Q5/w 9tZ5dnc+f8W0mOM+sSwSkUx0bd3ccmX7Gpn6ouqSyteW82Ts7fJUrDRZy3jZcskwZxJq HvMGYZobn6+P+Wnh+c0xBI222xOyn1VfhDQB+idtaSjeOCKAEsnCDYQilqZhsZ15rrR+ M9vYYEglsqsrCPOIZqMPsPzrVMmoX1+syrukhaNEwRVj0Sses2josnBaeIthE/KcuhBc q/GrWTJCIXRcN7D8uEzQLJdutWu0XTGY6qjhP2Y8GAaoNdf2raKxnHwEcVcmgdqpOUri SyDw== X-Gm-Message-State: AOAM531kQpPp2k1AOJnIntxevKUrCk1ETr9xNgSiuXJUgErlQp1PAKtV CUsTlzu18uYHba9asjCtBE+ucTiHZ4amVz0EUtEKsJww5BbitrLiN8UHm5RNbClOvFwbEI1FOtS 9rmGt2tjn9sfu5E1EMelt42NCgv6NbsY= X-Received: by 2002:adf:e7c6:: with SMTP id e6mr18209535wrn.221.1627292907986; Mon, 26 Jul 2021 02:48:27 -0700 (PDT) X-Google-Smtp-Source: ABdhPJypCERALtW5iVrCnbXrcqFE6y/+kKmuUpORd4V+O6K7uLxtsIOpe0xryEj69o4BNqp1OOFVIffY7jIQWHPY7OE= X-Received: by 2002:adf:e7c6:: with SMTP id e6mr18209514wrn.221.1627292907741; Mon, 26 Jul 2021 02:48:27 -0700 (PDT) MIME-Version: 1.0 References: <20210723163410.3292780-1-ppalka@redhat.com> In-Reply-To: <20210723163410.3292780-1-ppalka@redhat.com> From: Jonathan Wakely Date: Mon, 26 Jul 2021 10:48:16 +0100 Message-ID: Subject: Re: [PATCH] libstdc++: Fix up implementation of LWG 3533 [PR101589] To: Patrick Palka Cc: gcc Patches , "libstdc++" X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-12.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: libstdc++@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libstdc++ mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Jul 2021 09:48:32 -0000 On Fri, 23 Jul 2021 at 17:35, Patrick Palka via Libstdc++ wrote: > > In r12-569 I accidentally applied the LWG 3533 change that > was intended for elements_view::iterator::base to > elements_view::base instead. > > This patch corrects this, and also applies the corresponding LWG 3533 > change to lazy_split_view::inner-iter::base now that we implement P2210. > > Tested on x86_64-pc-linux-gnu, does this look OK for trunk and release > branches? OK, thanks. > > PR libstdc++/101589 > > libstdc++-v3/ChangeLog: > > * include/std/ranges (lazy_split_view::_InnerIter::base): Make > the const& overload unconstrained and return a const reference > as per LWG 3533. Make unconditionally noexcept. > (elements_view::base): Revert accidental r12-569 change. > (elements_view::_Iterator::base): Make the const& overload > unconstrained and return a const reference as per LWG 3533. > Make unconditionally noexcept. > --- > libstdc++-v3/include/std/ranges | 13 ++++++------- > 1 file changed, 6 insertions(+), 7 deletions(-) > > diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges > index d791e15d096..50b414e8c8c 100644 > --- a/libstdc++-v3/include/std/ranges > +++ b/libstdc++-v3/include/std/ranges > @@ -3103,8 +3103,8 @@ namespace views::__adaptor > : _M_i(std::move(__i)) > { } > > - constexpr iterator_t<_Base> > - base() const& requires copyable> > + constexpr const iterator_t<_Base>& > + base() const& noexcept > { return _M_i_current(); } > > constexpr iterator_t<_Base> > @@ -3786,8 +3786,8 @@ namespace views::__adaptor > : _M_base(std::move(base)) > { } > > - constexpr const _Vp& > - base() const & noexcept > + constexpr _Vp > + base() const& requires copy_constructible<_Vp> > { return _M_base; } > > constexpr _Vp > @@ -3913,9 +3913,8 @@ namespace views::__adaptor > : _M_current(std::move(i._M_current)) > { } > > - constexpr iterator_t<_Base> > - base() const& > - requires copyable> > + constexpr const iterator_t<_Base>& > + base() const& noexcept > { return _M_current; } > > constexpr iterator_t<_Base> > -- > 2.32.0.349.gdaab8a564f >