Message ID | 20220909172446.1546805-2-ppalka@redhat.com |
---|---|
State | New, archived |
Headers |
Return-Path: <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:5044:0:0:0:0:0 with SMTP id h4csp817100wrt; Fri, 9 Sep 2022 10:27:53 -0700 (PDT) X-Google-Smtp-Source: AA6agR4LTFPOi1FJ6rXY66JZInSgDFJ1tudRMxeCyGWuIME+xhBsOQ+htRkv3bCD9u8mqSEHB2M6 X-Received: by 2002:a17:907:94d0:b0:730:7a68:3093 with SMTP id dn16-20020a17090794d000b007307a683093mr10791593ejc.760.1662744473527; Fri, 09 Sep 2022 10:27:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1662744473; cv=none; d=google.com; s=arc-20160816; b=HB68Pq2ceBcxPPcvSriY8pY9pEedf2J2M6tnXXTkG0aGq1gC/auAKLCeibI0eOle3u 1guAKERHI46h9q0C1QCG05LDekxRnEYD3roujqAL6QSTE1sZzN/kv1k4MEnAFZMOAICi cjc1ap+JAf/Fjz71OEaa/em5qsu6Y+wCjydxMBrHlulh3396k4Y+oGW96B5fZBfZmNEL TaQA0jZIk1pivc1L95/w5vavqDnlVMl4/+OLlL+cPc6BS7b93EFJDXe7Ske0v3PMUHdS LdJa3SI1zac/1FCXKGMwqkznpRgXf40w/JEWWN1BBlI2QvX9qjqhDANRzCCKmZ3A8Ms9 6oUg== 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=LacF4wdjEbYMqFdNQMkcThSU/UCJy0jw326JIjtpV0Q=; b=XulC/IXp7fL9FNtl024wzpxFYowK2IhcrLKaGGWLB88wUWn9Of5SzaY5VEhRbEPrKq /+CxthOT5Tp1fg/dJuxzcK9X02mWV/6MIzBCCu+QYK3XHlyULclv4qrL+ZEIf1/tV74F O0eCjM8XGufjqj/b+HPiZvwKesAEzsHQ7dgwmKnvvVVPA5qE6GDmV5tRvoXM4LQBpuSv g+ntJNyBkxbK0n+M0SDfwg3JG/bUYwqqjUZrvqxN0l1TvIGk4iN27i0ed86ZRJnWVU3y nyyNpL2ek+fnvvp5tQqcb79s2RY2C5CC/PFyp9Cbm/ddHOLlDtPC7U7RudOqvyl3mP8o pX0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=OB8jRHFz; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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. [8.43.85.97]) by mx.google.com with ESMTPS id q14-20020a056402518e00b0044df6d4f36dsi1015018edd.325.2022.09.09.10.27.53 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Sep 2022 10:27:53 -0700 (PDT) Received-SPF: pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 as permitted sender) client-ip=8.43.85.97; Authentication-Results: mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=OB8jRHFz; spf=pass (google.com: domain of gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org designates 8.43.85.97 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 A9A6D38515D1 for <ouuuleilei@gmail.com>; Fri, 9 Sep 2022 17:27:13 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org A9A6D38515D1 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1662744433; bh=LacF4wdjEbYMqFdNQMkcThSU/UCJy0jw326JIjtpV0Q=; 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=OB8jRHFzvHGuXRBkRWNMXCnaHY6EJZDjOaQ/ecRT64L4/+3tibhuWjY37n48oyb1W OpXAfJs9PpJhZr9auHosDc0uvxf73/GYUsqTOk7+f9GkqQCvDFr9XldE90iwCszb/l MTSqslv68HcOynW+pCMlldrqQgRIxddZxLMSO02Q= 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.129.124]) by sourceware.org (Postfix) with ESMTPS id E4685385829A for <gcc-patches@gcc.gnu.org>; Fri, 9 Sep 2022 17:24:51 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org E4685385829A Received: from mail-qv1-f70.google.com (mail-qv1-f70.google.com [209.85.219.70]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_128_GCM_SHA256) id us-mta-537-P7HCshaHMNm47omPogL70w-1; Fri, 09 Sep 2022 13:24:50 -0400 X-MC-Unique: P7HCshaHMNm47omPogL70w-1 Received: by mail-qv1-f70.google.com with SMTP id g4-20020ad45424000000b004a9bb302c85so1668453qvt.22 for <gcc-patches@gcc.gnu.org>; Fri, 09 Sep 2022 10:24:50 -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 :subject:date; bh=LacF4wdjEbYMqFdNQMkcThSU/UCJy0jw326JIjtpV0Q=; b=SkT7OV5QQJizKE9BHJ3UXRnQHSFVA3vZL7gP21LUP8LyC4r6/0pMWhrI5ybGnWA4R4 +nGOcZ+m5q4qj+wnMWSoFpU3M+hH9r18pq0ZioIKioxxBg8MtmJL9XpHMk7+Dk/uGxez agFumb073LtYVxKfZXJb1f6IqHn/evIrdGJj9PZuY0CFwDA+H5I5DsEohLymTkOm0hyc 8G4QzsfCd3EBwbZZTJNOUZpb3yAiPZtqvqZh3Iw+0tc/1/QhorKJvHRoy58ng62Vqo+n 49H5V+r86oG3lgcZ/BQwg0+zlag0xjjoT6n7z2MYVbWAdd2utERJjEnPFUYb22b6HeT/ 1BZQ== X-Gm-Message-State: ACgBeo1BOyy1lvhH+ICX750g+fgJBEMVn6AQM+2OX4W/VnN8D1vz7cNt OlA1ptPtxV09YiDl+G+zi3iPLpKib6xcP/GBaND1j6GqXxZd2Q/kzGXn1KSGfMybuNX8QBhirrP cxRQTR3tjQyhfw/YyuxIerifI7VIKnXkp3bCxdL575ktdrtUlPzQUNXNyM/iCowbtjXg= X-Received: by 2002:a05:620a:2239:b0:6be:91e8:c9dc with SMTP id n25-20020a05620a223900b006be91e8c9dcmr10810458qkh.305.1662744290015; Fri, 09 Sep 2022 10:24:50 -0700 (PDT) X-Received: by 2002:a05:620a:2239:b0:6be:91e8:c9dc with SMTP id n25-20020a05620a223900b006be91e8c9dcmr10810444qkh.305.1662744289713; Fri, 09 Sep 2022 10:24:49 -0700 (PDT) Received: from localhost.localdomain (ool-457670bb.dyn.optonline.net. [69.118.112.187]) by smtp.gmail.com with ESMTPSA id f5-20020a05622a1a0500b003445bb107basm820250qtb.75.2022.09.09.10.24.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Sep 2022 10:24:49 -0700 (PDT) To: gcc-patches@gcc.gnu.org Subject: [PATCH 2/3] libstdc++: Fix typo in adjacent_view::_Iterator [PR106798] Date: Fri, 9 Sep 2022 13:24:45 -0400 Message-Id: <20220909172446.1546805-2-ppalka@redhat.com> X-Mailer: git-send-email 2.37.3.518.g79f2338b37 In-Reply-To: <20220909172446.1546805-1-ppalka@redhat.com> References: <20220909172446.1546805-1-ppalka@redhat.com> 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-default=true X-Spam-Status: No, score=-14.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, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 <gcc-patches.gcc.gnu.org> List-Unsubscribe: <https://gcc.gnu.org/mailman/options/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=unsubscribe> List-Archive: <https://gcc.gnu.org/pipermail/gcc-patches/> List-Post: <mailto:gcc-patches@gcc.gnu.org> List-Help: <mailto:gcc-patches-request@gcc.gnu.org?subject=help> List-Subscribe: <https://gcc.gnu.org/mailman/listinfo/gcc-patches>, <mailto:gcc-patches-request@gcc.gnu.org?subject=subscribe> From: Patrick Palka via Gcc-patches <gcc-patches@gcc.gnu.org> Reply-To: Patrick Palka <ppalka@redhat.com> Cc: libstdc++@gcc.gnu.org Errors-To: gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org Sender: "Gcc-patches" <gcc-patches-bounces+ouuuleilei=gmail.com@gcc.gnu.org> X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1743513948752432889?= X-GMAIL-MSGID: =?utf-8?q?1743513948752432889?= |
Series |
[1/3] libstdc++: Fix zip_view's operator- for integer-class difference type [PR106766]
|
|
Commit Message
Patrick Palka
Sept. 9, 2022, 5:24 p.m. UTC
PR libstdc++/106798 libstdc++-v3/ChangeLog: * include/std/ranges (adjacent_view::_Iterator::_Iterator): Fix typo. * testsuite/std/ranges/adaptors/adjacent/1.cc (test04): New test. --- libstdc++-v3/include/std/ranges | 2 +- .../testsuite/std/ranges/adaptors/adjacent/1.cc | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-)
Comments
On Fri, 9 Sep 2022, 18:25 Patrick Palka via Libstdc++, < libstdc++@gcc.gnu.org> wrote: > PR libstdc++/106798 > > libstdc++-v3/ChangeLog: > > * include/std/ranges (adjacent_view::_Iterator::_Iterator): Fix > typo. > * testsuite/std/ranges/adaptors/adjacent/1.cc (test04): New test. > OK, thanks. --- > libstdc++-v3/include/std/ranges | 2 +- > .../testsuite/std/ranges/adaptors/adjacent/1.cc | 12 ++++++++++++ > 2 files changed, 13 insertions(+), 1 deletion(-) > > diff --git a/libstdc++-v3/include/std/ranges > b/libstdc++-v3/include/std/ranges > index 2b8fec3c386..37ad80ad3de 100644 > --- a/libstdc++-v3/include/std/ranges > +++ b/libstdc++-v3/include/std/ranges > @@ -5239,7 +5239,7 @@ namespace views::__adaptor > requires _Const && convertible_to<iterator_t<_Vp>, > iterator_t<_Base>> > { > for (size_t __j = 0; __j < _Nm; ++__j) > - _M_current[__j] = std::move(__i[__j]); > + _M_current[__j] = std::move(__i._M_current[__j]); > } > > constexpr auto > diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent/1.cc > b/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent/1.cc > index 9829f79364f..443c1fbf450 100644 > --- a/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent/1.cc > +++ b/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent/1.cc > @@ -101,10 +101,22 @@ test03() > return true; > } > > +constexpr bool > +test04() > +{ > + // PR libstdc++/106798 > + auto r = views::single(0) | views::lazy_split(0) | views::pairwise; > + decltype(ranges::cend(r)) s = r.end(); > + VERIFY( r.begin() == s ); > + > + return true; > +} > + > int > main() > { > static_assert(test01()); > static_assert(test02()); > static_assert(test03()); > + static_assert(test04()); > } > -- > 2.37.3.518.g79f2338b37 > >
diff --git a/libstdc++-v3/include/std/ranges b/libstdc++-v3/include/std/ranges index 2b8fec3c386..37ad80ad3de 100644 --- a/libstdc++-v3/include/std/ranges +++ b/libstdc++-v3/include/std/ranges @@ -5239,7 +5239,7 @@ namespace views::__adaptor requires _Const && convertible_to<iterator_t<_Vp>, iterator_t<_Base>> { for (size_t __j = 0; __j < _Nm; ++__j) - _M_current[__j] = std::move(__i[__j]); + _M_current[__j] = std::move(__i._M_current[__j]); } constexpr auto diff --git a/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent/1.cc b/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent/1.cc index 9829f79364f..443c1fbf450 100644 --- a/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent/1.cc +++ b/libstdc++-v3/testsuite/std/ranges/adaptors/adjacent/1.cc @@ -101,10 +101,22 @@ test03() return true; } +constexpr bool +test04() +{ + // PR libstdc++/106798 + auto r = views::single(0) | views::lazy_split(0) | views::pairwise; + decltype(ranges::cend(r)) s = r.end(); + VERIFY( r.begin() == s ); + + return true; +} + int main() { static_assert(test01()); static_assert(test02()); static_assert(test03()); + static_assert(test04()); }