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.129.124]) by sourceware.org (Postfix) with ESMTPS id 98E003858025 for ; Wed, 29 Mar 2023 23:45:06 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 98E003858025 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1680133506; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=I71Ex2imyyhdxerjH9xleTWoA1StOFk5jh9jBKnRd5c=; b=V2AikSWH7XvOuvS705Exm8Xv0HYBcvtiFCoJ7DWomYehSQZh8lFezcVR+tS1yriW/VunqW ghkn+sYIlxpCnuWtti/TpfiDVSxYJf8Z1YQFW+tUDod59jUHykMNmFNhB13GggJUpjeu32 cTTaYACpD8sTZsb+H2FYbuyVNPLKzF4= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-517-nlFZbuJvMgukXhVwYbt9vg-1; Wed, 29 Mar 2023 19:45:05 -0400 X-MC-Unique: nlFZbuJvMgukXhVwYbt9vg-1 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.rdu2.redhat.com [10.11.54.1]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id B1C56889047; Wed, 29 Mar 2023 23:45:04 +0000 (UTC) Received: from localhost (unknown [10.33.36.149]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7A7D24042AC0; Wed, 29 Mar 2023 23:45:04 +0000 (UTC) Date: Thu, 30 Mar 2023 00:45:03 +0100 From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: Re: [committed] libstdc++: Use std::remove_cv_t in std::optional::transform [PR109340] Message-ID: References: <20230329233904.1405179-1-jwakely@redhat.com> MIME-Version: 1.0 In-Reply-To: <20230329233904.1405179-1-jwakely@redhat.com> X-Clacks-Overhead: GNU Terry Pratchett X-Scanned-By: MIMEDefang 3.1 on 10.11.54.1 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline X-Spam-Status: No, score=-5.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,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 List-Id: On 30/03/23 00:39 +0100, Jonathan Wakely wrote: >Tested powerpc64le-linux. Pushed to trunk. > >-- >8 -- > >We need to strip cv-qualifiers from the result of the callable passed to >std::optional::transform. > >For std::expected::transform and std::expected::transform_error I >noticed we were stripping cv-qualifiers but were also incorrectly >stripping references. > >libstdc++-v3/ChangeLog: > > PR libstdc++/109340 > * include/std/expected (expected::transform): Use > std::remove_cv_t instead of std::remove_cvref_t. > (expected::transform_error): Likewise. > (expected::transform): Likewise. > (expected::transform_error): Likewise. > * include/std/optional (transform): Use std::remove_cv_t. > * testsuite/20_util/optional/monadic/pr109340.cc: New test. Oops, I put the wrong PR number in the commit message and the name of the new test. I've renamed it to pr109242.cc now.