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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTP id A13603892473 for ; Mon, 24 May 2021 18:59:56 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org A13603892473 Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-526-wB2Q_FiZM9-MDYhRkyvE9w-1; Mon, 24 May 2021 14:59:52 -0400 X-MC-Unique: wB2Q_FiZM9-MDYhRkyvE9w-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.13]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id F2D4718397A8; Mon, 24 May 2021 18:59:51 +0000 (UTC) Received: from localhost (unknown [10.33.37.15]) by smtp.corp.redhat.com (Postfix) with ESMTP id 81C1E60CED; Mon, 24 May 2021 18:59:51 +0000 (UTC) Date: Mon, 24 May 2021 19:59:50 +0100 From: Jonathan Wakely To: Patrick Palka Cc: Tim Song , libstdc++ , gcc-patches Subject: Re: [PATCH] libstdc++: Fix iterator caching inside range adaptors [PR100479] Message-ID: References: <20210517154302.840608-1-ppalka@redhat.com> <79bd58a5-63fd-d14c-c23b-9534f8331b3@idea> MIME-Version: 1.0 In-Reply-To: <79bd58a5-63fd-d14c-c23b-9534f8331b3@idea> X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 2.79 on 10.5.11.13 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline X-Spam-Status: No, score=-8.1 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) 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, 24 May 2021 18:59:57 -0000 On 18/05/21 00:53 -0400, Patrick Palka via Libstdc++ wrote: >On Mon, 17 May 2021, Tim Song wrote: > >> On Mon, May 17, 2021 at 2:59 PM Patrick Palka wrote: >> > >> > + constexpr _CachedPosition& >> > + operator=(_CachedPosition&& __other) noexcept >> > + { >> > + if (std::__addressof(__other) != this) >> >> I don't think we need this check - self-move-assigning the underlying >> view isn't required to be a no-op, so we should still invalidate. > >Sounds good, so like so: Looks good to me (but then so did the previous one ;-) Please push, as this is an improvement on what's on trunk now. If Tim spots any more problems they can be fixed later. Thanks both of you.