From patchwork Wed May 5 01:42:32 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 1474061 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=gcc.gnu.org (client-ip=2620:52:3:1:0:246e:9693:128c; helo=sourceware.org; envelope-from=gcc-patches-bounces@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.a=rsa-sha256 header.s=default header.b=yyXdk4ox; dkim-atps=neutral Received: from sourceware.org (server2.sourceware.org [IPv6:2620:52:3:1:0:246e:9693:128c]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4FZfbq5Cqsz9sCD for ; Wed, 5 May 2021 11:42:47 +1000 (AEST) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D64D43968C0F; Wed, 5 May 2021 01:42:40 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D64D43968C0F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1620178960; bh=JhyUXNKHY0wvN+ckcgpdOg0K94SK9Ig8y9i53sYz7Mk=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:Cc:From; b=yyXdk4oxV7ba11CHHtdL1tLpFUEpbB0nHQYfqQ/usNv9/DHRqw8nwjJCE0/zP2dfi FALaJcRcZ3zGl76g371n7cSm5IbKRPndwx8ELzPd1B3zyIS2UR64fJ7Vu+zQl5iYy6 uW6UYMH+SFbl92U0pO3+XvAPNagQK7A4FPsuJwaY= X-Original-To: gcc-patches@gcc.gnu.org Delivered-To: gcc-patches@gcc.gnu.org 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 71E69395C41D for ; Wed, 5 May 2021 01:42:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 71E69395C41D Received: from mail-qt1-f198.google.com (mail-qt1-f198.google.com [209.85.160.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-577-hc5NU4D5MaKUorSgJ3XJYw-1; Tue, 04 May 2021 21:42:36 -0400 X-MC-Unique: hc5NU4D5MaKUorSgJ3XJYw-1 Received: by mail-qt1-f198.google.com with SMTP id e28-20020ac84b5c0000b02901cd9b2b2170so67551qts.13 for ; Tue, 04 May 2021 18:42:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=JhyUXNKHY0wvN+ckcgpdOg0K94SK9Ig8y9i53sYz7Mk=; b=O1Nibl3WR0+a5QDXuft3V+gPao70bKwztj+B4PiMqpP+OHnCpbUDy/0A/w2suIOLGB enDrDMSNOldNy3gvJoPZF+H0rK7huN5sGtG4pYpTcvj3ybS/v2BlquReYpyyEFYWsHLR W4TWgHatroI2UAZpYbxYGs32XBp4+frfSe9umpVhCAsK9TNgJs4sX6ivL4qhUzPLrKZK S+r2g966+dMwWd9ztaqaXzfGA89YIotpEDYfHhVZJ43ffgbydwzW8IN4F51KlLuM1HmJ P3OWjL3ilF3d6zUoW1/TvLw+Sv6qH76ozjkxjlDgAtZjlkuDxzLyLVHEQWG8GpqE1pHn Qa+g== X-Gm-Message-State: AOAM5338PnneMyWPTyhQ3ySSgpTtuyu1fIp+4cO0b4RYQzXL/knApY77 85lVV1eg4XyXitzAbTti9QnQPPsuOzG8cgWSVrrTbHbEmdqIp1wDcHxu+5OOWLBFmHLih0MbaXk LAzTSfbefzQcK599Wp2GhJ8CtAHeRBovYjSaopbKNe+t/jvDh5tKppqcqPr2CrlnKZPQ= X-Received: by 2002:a37:4147:: with SMTP id o68mr28771169qka.56.1620178955129; Tue, 04 May 2021 18:42:35 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwZG4nQq9v4T+Q4xII8lceocDnqBM2EdgaNWUK36YEQWWZy/Ge+zDCGnKBdNHB6tzJrUamieA== X-Received: by 2002:a37:4147:: with SMTP id o68mr28771152qka.56.1620178954858; Tue, 04 May 2021 18:42:34 -0700 (PDT) Received: from localhost.localdomain (ool-457d493a.dyn.optonline.net. [69.125.73.58]) by smtp.gmail.com with ESMTPSA id a19sm4205462qtn.97.2021.05.04.18.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 04 May 2021 18:42:34 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH] libstdc++: Implement LWG 3517 and 3520 for transform_view/join_view Date: Tue, 4 May 2021 21:42:32 -0400 Message-Id: <20210505014232.1216839-1-ppalka@redhat.com> X-Mailer: git-send-email 2.31.1.442.g7e39198978 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-15.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_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: gcc-patches@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-patches mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Patrick Palka via Gcc-patches From: Patrick Palka Reply-To: Patrick Palka Cc: libstdc++@gcc.gnu.org Errors-To: gcc-patches-bounces@gcc.gnu.org Sender: "Gcc-patches" Tested on x86_64-pc-linux-gnu, does this look OK for trunk and perhaps 10/11? libstdc++-v3/ChangeLog: * include/std/ranges (transform_view::_Iterator::iter_swap): Remove as per LWG 3520. (join_view::_Iterator::iter_swap): Add indirectly_swappable constraint as per LWG 3517. --- libstdc++-v3/include/std/ranges | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges index 4a7ca49b45d..f21e08a36e3 100644 --- a/libstdc++-v3/include/std/ranges +++ b/libstdc++-v3/include/std/ranges @@ -1581,12 +1581,6 @@ namespace views::__adaptor return *__i; } - friend constexpr void - iter_swap(const _Iterator& __x, const _Iterator& __y) - noexcept(noexcept(ranges::iter_swap(__x._M_current, __y._M_current))) - requires indirectly_swappable<_Base_iter> - { return ranges::iter_swap(__x._M_current, __y._M_current); } - friend _Iterator; template friend struct _Sentinel; }; @@ -2520,6 +2514,7 @@ namespace views::__adaptor friend constexpr void iter_swap(const _Iterator& __x, const _Iterator& __y) noexcept(noexcept(ranges::iter_swap(__x._M_inner, __y._M_inner))) + requires indirectly_swappable<_Inner_iter> { return ranges::iter_swap(__x._M_inner, __y._M_inner); } friend _Iterator;