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 ESMTPS id E3B7D3858020 for ; Wed, 20 Oct 2021 16:59:47 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E3B7D3858020 Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-46-r8rsjvpuOr-NSELtpBp5nA-1; Wed, 20 Oct 2021 12:59:46 -0400 X-MC-Unique: r8rsjvpuOr-NSELtpBp5nA-1 Received: by mail-qk1-f197.google.com with SMTP id e3-20020a37ac03000000b0045fbe6aef34so2597805qkm.18 for ; Wed, 20 Oct 2021 09:59:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=lqmlmDmrs/FU67ZjbIQwijcfRgCNbeAaUkQHnHw+1FE=; b=TrU6m0Rsw5Q9wWuh+3zppxv7QHznTuYAbOQvu7SrfD28DrU8CIRNPvEr8qxQbjGkc0 lmqr+FHGrTGw3EGzwB1XBq+QirinYTwN9t1FR8J0T0/WPlvrz9TveMxFOY8tHTtJOnVd 751vcX4B83NGHzRlOUtXwCyFXuXp8BXNNF5xUsV6hi7D2AQrgqtJ1Qzn0rHd3ZAlNVrn Z4MDClQb/p/YolpsYGGImFXi9WaI0QQ02ammOgIs/hGui89UrgsDx57Sp/7lgc3Yf2nS /pUhhfy/nutXuwHQB1reaneM4mTt+PX8ByTpRbkWP1jeCdTMn/hGb/nhHL+quF/FzZ5Z ShVw== X-Gm-Message-State: AOAM532c7QPkHwFlEy29nVypbKUqI4aylEn8BH0mYoArRrB7D7o6p4/+ Bl1vR1U2NcJTIH7XUBMvmqs+BX/2OhzplqVwBm/842iOThaNpcTSauzUjosyKStfFcSQJcVxdZd z+J40nOM95zYYAzY= X-Received: by 2002:a37:4050:: with SMTP id n77mr184253qka.267.1634749186053; Wed, 20 Oct 2021 09:59:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx/33Y8G3IxRWwyH2I1iTt3VIwEVzTilc2mx9PbPZCGqghUclBzE+ijy+jP4XvDbB0zrrZG2Q== X-Received: by 2002:a37:4050:: with SMTP id n77mr184243qka.267.1634749185898; Wed, 20 Oct 2021 09:59:45 -0700 (PDT) Received: from localhost.localdomain (ool-457d493a.dyn.optonline.net. [69.125.73.58]) by smtp.gmail.com with ESMTPSA id r186sm1206802qkf.128.2021.10.20.09.59.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 20 Oct 2021 09:59:45 -0700 (PDT) From: Patrick Palka To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, Patrick Palka Subject: [PATCH] libstdc++: Implement LWG 3535 changes to ranges::join_view Date: Wed, 20 Oct 2021 12:59:42 -0400 Message-Id: <20211020165942.1827062-1-ppalka@redhat.com> X-Mailer: git-send-email 2.33.1.711.g9d530dc002 MIME-Version: 1.0 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="US-ASCII" X-Spam-Status: No, score=-15.7 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_H2, 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: Wed, 20 Oct 2021 16:59:48 -0000 Tested on x86_64-pc-linux-gnu, does this look OK for trunk, and branches after a while? libstdc++-v3/ChangeLog: * include/std/ranges (join_view::__iter_cat::_S_iter_cat): Adjust criteria for returning bidirectional_iterator_tag as per LWG3535. (join_view::_Iterator::_S_iter_concept): Likewise. --- libstdc++-v3/include/std/ranges | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges index 273699aa790..c1519c7dbd5 100644 --- a/libstdc++-v3/include/std/ranges +++ b/libstdc++-v3/include/std/ranges @@ -2523,7 +2523,8 @@ namespace views::__adaptor using _OuterCat = typename iterator_traits<_Outer_iter>::iterator_category; using _InnerCat = typename iterator_traits<_Inner_iter>::iterator_category; if constexpr (derived_from<_OuterCat, bidirectional_iterator_tag> - && derived_from<_InnerCat, bidirectional_iterator_tag>) + && derived_from<_InnerCat, bidirectional_iterator_tag> + && common_range>>) return bidirectional_iterator_tag{}; else if constexpr (derived_from<_OuterCat, forward_iterator_tag> && derived_from<_InnerCat, forward_iterator_tag>) @@ -2575,7 +2576,8 @@ namespace views::__adaptor { if constexpr (_S_ref_is_glvalue && bidirectional_range<_Base> - && bidirectional_range>) + && bidirectional_range> + && common_range>) return bidirectional_iterator_tag{}; else if constexpr (_S_ref_is_glvalue && forward_range<_Base> -- 2.33.1.711.g9d530dc002