From patchwork Thu Aug 25 15:39:38 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Palka X-Patchwork-Id: 766 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:ecc5:0:0:0:0:0 with SMTP id s5csp300104wro; Thu, 25 Aug 2022 08:41:57 -0700 (PDT) X-Google-Smtp-Source: AA6agR5x79OlbzmJTE/o+57kCVuXzPRq70hc8Lf7G4yNBZVYfGY5PsCZQ5/nPHZvFfmFFwklScFh X-Received: by 2002:a05:6402:3583:b0:43d:6943:44a with SMTP id y3-20020a056402358300b0043d6943044amr3607154edc.409.1661442117411; Thu, 25 Aug 2022 08:41:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661442117; cv=none; d=google.com; s=arc-20160816; b=kdMqMdYPHFzUSrtxWCXvZDud3+2UrTJtAcVC8UBempxPbILu0UMpJGqflrY5KhcD2M JoooTwnX7cb5dZgQJCsub6t7xak48Tg7Anes0ko79VEq+F/lhGZAi6ykua71rn9YctLw sOy4DkPdt1wclIvi4Bc9dipRDsxaAqtdkLNWausqTAGKLblDWEub361jYwSBADAu6C/x qTgeI1iIW9ZCKo+pAuE8LeoAcZPB/uqq0sc4gCc3gj3Wj3L4JsO5L7esCuk7BmliRGUl La6n2/NnRjdzEtv1qpVZB6KpeadGkqo+87rdFtFTYpXAShzEdG5EpA/u5x+qhNTn2J/R OG3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:reply-to:from:list-subscribe:list-help :list-post:list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:to:dmarc-filter:delivered-to:dkim-signature :dkim-filter; bh=zRMjThG9807+WKyva0WSMVl57g7gmrZNyZ0JE2yJTxs=; b=p1Cv0BkVxeHlLOphJRKslrI3A9QaCYI6qNGzk78yoJuDuzyk/j7MA34T+AFYnSkd8D 2fk4t8CH/vOcjeasU5phnYlbDRuncbCERP3/l8TCNgKqcE1v0K/+CqZ9PsUBfwaqKaOn mHkqbWg/v/TWt20SZD4s0oHt1jZRPN3MDUpYMDvT8Eo+zB8jrPxxfvEiCIHh+Zw6xD/z oNMoYWc3a7qqS1dNuVFxuEWPAn0lu1bn4qTFwzrCvktQR2+wUKK6FROna0eOtB6mvpRf srIhFesAT14crt+aVDEJGh79QFYP9Gddsa/Etp70xIjTSETogDJP+noFbkOQl+h5Paie X8LQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Hx0MrusM; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from sourceware.org (server2.sourceware.org. [2620:52:3:1:0:246e:9693:128c]) by mx.google.com with ESMTPS id tl24-20020a170907c31800b0072af6e1fff0si3257836ejc.330.2022.08.25.08.41.57 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 08:41:57 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) client-ip=2620:52:3:1:0:246e:9693:128c; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=Hx0MrusM; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 2620:52:3:1:0:246e:9693:128c as permitted sender) smtp.mailfrom="gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gnu.org Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id 291D03851A95 for ; Thu, 25 Aug 2022 15:40:54 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 291D03851A95 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1661442054; bh=zRMjThG9807+WKyva0WSMVl57g7gmrZNyZ0JE2yJTxs=; h=To:Subject:Date:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=Hx0MrusMsBeT3gQZNR43YXtcOh7c3xGbBSsVclRjxRzYdgBibbs/dH4FTt/VVy6z1 92cmFDJ5I3LrNznbuE4jBdPEqLAXfo8/8Oh5vnRmKA+ojP0xiCwwM++KJFdBm8Rlps 5bKmh8pJqUFGdZtYKJHq4avNncA5drylxk7pkbVs= 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 [170.10.133.124]) by sourceware.org (Postfix) with ESMTPS id C985438515F3 for ; Thu, 25 Aug 2022 15:40:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org C985438515F3 Received: from mail-qk1-f199.google.com (mail-qk1-f199.google.com [209.85.222.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-346-mP1X8OIwPG6VVjJ8mABttA-1; Thu, 25 Aug 2022 11:40:05 -0400 X-MC-Unique: mP1X8OIwPG6VVjJ8mABttA-1 Received: by mail-qk1-f199.google.com with SMTP id l15-20020a05620a28cf00b006b46997c070so17777727qkp.20 for ; Thu, 25 Aug 2022 08:40:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=zRMjThG9807+WKyva0WSMVl57g7gmrZNyZ0JE2yJTxs=; b=p48C7GKP6Ji3h8IsBtDDwdML9ay1KnWQqiiGfzEyaNxexIhqNBNIW6ol6PBO0a6oio K9Yp4qocUXQntsFzpiCPzecoMS444X7k/2iK4D+9jUmGY1tO8AYUmgpKhe5aDkCwOzgs /ncE9kW6HrzUHdsZSSqeQB3Z+ISsP2olI+kMhxOu7Aj3y4wG82mWmnDKCyuPq8AdZ7Iv b+N+kLWQxPucgGJHNBJKPwUfL8I79nGWSgnBgOuHDtQXwYifrJ0IDeUZ/YxntVFdgYA5 jUTcp281vXtQ85VHWnWUvUHu2JVq1fKtB5mEkVTDUADJgIyq0GAAb0L/+gCxgy8BzkaG 3Yjg== X-Gm-Message-State: ACgBeo3yIRZZBNqCHJ2ssOLwLGshzHcWJvg8tBkmqmZ/PszxzA7s7s8y o4+UNimlx1KyEUjEX3lnHrdrfz5gxSzRTCux6Xlv7OVmoQbh2SMhR49uvJpbzLSr2ttMTiT2l3x yAfgJzfqcmvTcC4BNn38aToEGq8EPPI6KO7P8EvNznoOtRNOFg8UA9UDPmif6CHMmhAQ= X-Received: by 2002:a05:620a:450e:b0:6bb:a4cf:de01 with SMTP id t14-20020a05620a450e00b006bba4cfde01mr3532931qkp.636.1661442004631; Thu, 25 Aug 2022 08:40:04 -0700 (PDT) X-Received: by 2002:a05:620a:450e:b0:6bb:a4cf:de01 with SMTP id t14-20020a05620a450e00b006bba4cfde01mr3532920qkp.636.1661442004356; Thu, 25 Aug 2022 08:40:04 -0700 (PDT) Received: from localhost.localdomain (ool-457670bb.dyn.optonline.net. [69.118.112.187]) by smtp.gmail.com with ESMTPSA id j27-20020a05620a147b00b006ba9b2167a2sm16033677qkl.16.2022.08.25.08.40.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 25 Aug 2022 08:40:04 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/2] libstdc++: Implement LWG 3692/3702 changes to zip_/zip_transform_view Date: Thu, 25 Aug 2022 11:39:38 -0400 Message-Id: <20220825153938.2249619-2-ppalka@redhat.com> X-Mailer: git-send-email 2.37.2.382.g795ea8776b In-Reply-To: <20220825153938.2249619-1-ppalka@redhat.com> References: <20220825153938.2249619-1-ppalka@redhat.com> MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.9 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_NONE, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) 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+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1742148329519186599?= X-GMAIL-MSGID: =?utf-8?q?1742148329519186599?= Tested on x86_64-pc-linux-gnu, does this look OK for trunk? libstdc++-v3/ChangeLog: * include/std/ranges (zip_view::_Iterator::operator<): Remove. (zip_view::_Iterator::operator>): Remove. (zip_view::_Iterator::operator<=): Remove. (zip_view::_Iterator::operator>=): Remove. (zip_view::_Iterator::operator<=>): Remove three_way_comparable constraint. (zip_transform_view::_Iterator): Ditto. --- libstdc++-v3/include/std/ranges | 43 +-------------------------------- 1 file changed, 1 insertion(+), 42 deletions(-) diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges index d748cb73346..bf0ff29c38c 100644 --- a/libstdc++-v3/include/std/ranges +++ b/libstdc++-v3/include/std/ranges @@ -4616,30 +4616,9 @@ namespace views::__adaptor }(make_index_sequence{}); } - friend constexpr bool - operator<(const _Iterator& __x, const _Iterator& __y) - requires __detail::__all_random_access<_Const, _Vs...> - { return __x._M_current < __y._M_current; } - - friend constexpr bool - operator>(const _Iterator& __x, const _Iterator& __y) - requires __detail::__all_random_access<_Const, _Vs...> - { return __y < __x; } - - friend constexpr bool - operator<=(const _Iterator& __x, const _Iterator& __y) - requires __detail::__all_random_access<_Const, _Vs...> - { return !(__y < __x); } - - friend constexpr bool - operator>=(const _Iterator& __x, const _Iterator& __y) - requires __detail::__all_random_access<_Const, _Vs...> - { return !(__x < __y); } - friend constexpr auto operator<=>(const _Iterator& __x, const _Iterator& __y) requires __detail::__all_random_access<_Const, _Vs...> - && (three_way_comparable>> && ...) { return __x._M_current <=> __y._M_current; } friend constexpr _Iterator @@ -5008,29 +4987,9 @@ namespace views::__adaptor requires equality_comparable<__ziperator<_Const>> { return __x._M_inner == __y._M_inner; } - friend constexpr bool - operator<(const _Iterator& __x, const _Iterator& __y) - requires random_access_range<_Base<_Const>> - { return __x._M_inner < __y._M_inner; } - - friend constexpr bool - operator>(const _Iterator& __x, const _Iterator& __y) - requires random_access_range<_Base<_Const>> - { return __x._M_inner > __y._M_inner; } - - friend constexpr bool - operator<=(const _Iterator& __x, const _Iterator& __y) - requires random_access_range<_Base<_Const>> - { return __x._M_inner <= __y._M_inner; } - - friend constexpr bool - operator>=(const _Iterator& __x, const _Iterator& __y) - requires random_access_range<_Base<_Const>> - { return __x._M_inner >= __y._M_inner; } - friend constexpr auto operator<=>(const _Iterator& __x, const _Iterator& __y) - requires random_access_range<_Base<_Const>> && three_way_comparable<__ziperator<_Const>> + requires random_access_range<_Base<_Const>> { return __x._M_inner <=> __y._M_inner; } friend constexpr _Iterator