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 6CAC1383E055 for ; Wed, 31 Aug 2022 13:38:59 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6CAC1383E055 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=1661953139; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=CJ0ckdTE7rVy0NC0Vo+2VeXE4t39BOnUTnjfRPLGnmY=; b=SCU4XOPTitF/Ucf2OcS0GE1j39BWL6PXZuaCt22KnjPycG4zukM7Od2eHizln5Ly1PrSe5 Z3tawNXXDHJD+SO4XYFUWUmEauQ/LbbtLxROsguXzmm+iCZiSpXrIwFUPBuNLZGDltY/pj EeOrXEjCyDSZT/YRBkAFVng2s4PY6G0= 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-548-uTQPBDJhNN2KqzIf28Q_cg-1; Wed, 31 Aug 2022 09:38:58 -0400 X-MC-Unique: uTQPBDJhNN2KqzIf28Q_cg-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C91C080A0C2; Wed, 31 Aug 2022 13:38:57 +0000 (UTC) Received: from localhost (unknown [10.33.36.187]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8FC381415117; Wed, 31 Aug 2022 13:38:57 +0000 (UTC) From: Jonathan Wakely To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org Subject: [committed] libstdc++: Improve comments in std::reference_wrapper tests Date: Wed, 31 Aug 2022 14:38:56 +0100 Message-Id: <20220831133856.63223-1-jwakely@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-11.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_SHORT,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 List-Id: Tested x86_64-linux, pushed to trunk. -- >8 -- libstdc++-v3/ChangeLog: * testsuite/20_util/reference_wrapper/invoke-2.cc: Improve comments. * testsuite/20_util/reference_wrapper/invoke-3.cc: Likewise. * testsuite/20_util/reference_wrapper/invoke.cc: Likewise. --- libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-2.cc | 3 ++- libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-3.cc | 3 ++- libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc | 2 ++ 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-2.cc b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-2.cc index 2741510e756..fd3430cf0a9 100644 --- a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-2.cc +++ b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-2.cc @@ -16,7 +16,7 @@ // with this library; see the file COPYING3. If not see // . -// 20.6.4 function object return types [func.ret] +// C++11 20.8.3.4 reference_wrapper invocation [refwrap.invoke] #include struct X @@ -27,6 +27,7 @@ struct X void test01() { + // PR libstdc++/48521 std::result_of doesn't work with pointer to member typedef int (X::*mfp)(int); typedef int X::*mp; mfp m = &X::f; diff --git a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-3.cc b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-3.cc index e4124c9b57c..c25315b6751 100644 --- a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-3.cc +++ b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-3.cc @@ -17,7 +17,7 @@ // with this library; see the file COPYING3. If not see // . -// 20.8.3.4 reference_wrapper invocation [refwrap.invoke] +// C++11 20.8.3.4 reference_wrapper invocation [refwrap.invoke] #include struct ABC @@ -33,4 +33,5 @@ struct Concrete : ABC Concrete c; ABC& abc = c; +// PR libstdc++/57336 Cannot INVOKE a reference_wrapper around an abstract type auto b = std::cref(abc)(); diff --git a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc index cd884fe66eb..b2abc812b79 100644 --- a/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc +++ b/libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc @@ -17,6 +17,8 @@ // with this library; see the file COPYING3. If not see // . +// C++11 20.8.3.4 reference_wrapper invocation [refwrap.invoke] + #include #include #include -- 2.37.2