From patchwork Fri Jul 29 09:11:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Wakely X-Patchwork-Id: 302 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:6a10:b5d6:b0:2b9:3548:2db5 with SMTP id v22csp700657pxt; Fri, 29 Jul 2022 02:12:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1uXe0fe4SjYlJBeeecNH4ZZiPginzAoawxVw9e3dWcTr42kYNJNa3bqSqwtDw+WBW9DTMxU X-Received: by 2002:a17:907:1c95:b0:72b:4e37:7736 with SMTP id nb21-20020a1709071c9500b0072b4e377736mr2157997ejc.516.1659085950457; Fri, 29 Jul 2022 02:12:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1659085950; cv=none; d=google.com; s=arc-20160816; b=jtVQigdF2iz6NOxxkRSfjV+uIx3SXbxxS1KW7xoATF1RRSZxG9HAcG1OLrbTuyX4vy 9j/DNcmSjbZprBKKRxdoA545TfuaYbkt1cpsTAdaZKt+TR2MBqZ3QDi4p/XBnrav26of v/9SK+zP5eyNxd7Z9AX+BR962VD+NruFjqb5CX/CukJ3slR+rrkJfJX54AJGGDJg9Hg9 6Izl1CP5iXXwGJPtj/itSDOKswYqNqXFECTPsh2FiUATNMUyHqdWRG9sT5eeQ4BE9mdL Ynz97c2SJmQkGDQa0K0DM9j8cqXnfshes80Z8qPPIS9v7MNPa2iiM5imx3tmzcJsqGec w0tQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:from:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence :content-transfer-encoding:mime-version:message-id:date:subject:to :dmarc-filter:delivered-to:dkim-signature:dkim-filter; bh=nZEHpYYH4sQcRJlZx/p9CjJGQCfmYQ/UU5zhn6ADygE=; b=MVh8Xip8iOfuYbs8+WsW6pZXCo9sYF9UbSsPDt3OS1D1IvJNEvy7vbAebj5QYuJbtI W6Vi11daWFGZAXNnbgONAR1YBn8DuqFlLfcaUx1BlegMoM8ZLKXmZO5OfIIvi+CjLZ/f dYxikVU5WfKNZrRpMUZX81/6Qvj92oa/qunOl1RBgGU14dDGAaiEHShLFRmZG9nT3bLT Pr11nK0keVWn/vjEU2vy6VtvAN4SXXmDXklY60+rsBZ3WC2w6gzyckUkbe/CH6XDsKbK EYV5pNucJK5RU3QpIgQxLImnm9SFtY9dpi1B0S+Jcp/+1pUDogdtiEn3ULk9lQXPaIiR 0fuA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gcc.gnu.org header.s=default header.b=bEAkZ22S; 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 y1-20020a056402358100b0043cc4d4ef9dsi1605459edc.365.2022.07.29.02.12.30 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 29 Jul 2022 02:12:30 -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=bEAkZ22S; 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 73FD53858429 for ; Fri, 29 Jul 2022 09:12:14 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 73FD53858429 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1659085934; bh=nZEHpYYH4sQcRJlZx/p9CjJGQCfmYQ/UU5zhn6ADygE=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=bEAkZ22SkGBqUwxVjVbgUlxP2xKZianKSnE/b4mopsvggwbSp7g7ERdmnCI3fEo2a qk2RHOpJA1aj4s82yH6ctdE45hs/HvBjZBG7rXlab8jhDumiFha/++V7Hqs09l8sBp +OhQdmgnTLLRJZyP6GsqVQ9ChCFEuf/2vcByp2u4= 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 90EDF3857C77 for ; Fri, 29 Jul 2022 09:11:29 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 90EDF3857C77 Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-583-eL5qc_rAM6qzjWaLMGqw8A-1; Fri, 29 Jul 2022 05:11:28 -0400 X-MC-Unique: eL5qc_rAM6qzjWaLMGqw8A-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id BBC7B1C06EE4; Fri, 29 Jul 2022 09:11:27 +0000 (UTC) Received: from localhost (unknown [10.33.36.4]) by smtp.corp.redhat.com (Postfix) with ESMTP id 857E92166B26; Fri, 29 Jul 2022 09:11:27 +0000 (UTC) To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Tweak common_iterator::operator-> return type [PR104443] Date: Fri, 29 Jul 2022 10:11:26 +0100 Message-Id: <20220729091126.219141-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-13.1 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 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: Jonathan Wakely via Gcc-patches From: Jonathan Wakely Reply-To: Jonathan Wakely 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?1739677709057300889?= X-GMAIL-MSGID: =?utf-8?q?1739677709057300889?= Tested powerpc64le-linux, pushed to trunk. -- >8 -- This adjusts the return type to match the resolution of LWG 3672. There is no functional difference, because decltype(auto) always deduced a value anyway, but this makes it simpler and consistent with the working draft. libstdc++-v3/ChangeLog: PR libstdc++/104443 * include/bits/stl_iterator.h (common_iterator::operator->): Change return type to just auto. --- libstdc++-v3/include/bits/stl_iterator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libstdc++-v3/include/bits/stl_iterator.h b/libstdc++-v3/include/bits/stl_iterator.h index 9cd262cd1d9..003cebbec83 100644 --- a/libstdc++-v3/include/bits/stl_iterator.h +++ b/libstdc++-v3/include/bits/stl_iterator.h @@ -2058,7 +2058,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION } [[nodiscard]] - constexpr decltype(auto) + constexpr auto operator->() const requires __detail::__common_iter_has_arrow<_It> { __glibcxx_assert(_M_index == 0);