libstdc++: Improve comments in std::reference_wrapper tests
authorJonathan Wakely <jwakely@redhat.com>
Wed, 31 Aug 2022 12:44:45 +0000 (13:44 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Wed, 31 Aug 2022 13:28:03 +0000 (14:28 +0100)
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
libstdc++-v3/testsuite/20_util/reference_wrapper/invoke-3.cc
libstdc++-v3/testsuite/20_util/reference_wrapper/invoke.cc

index 2741510..fd3430c 100644 (file)
@@ -16,7 +16,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 20.6.4 function object return types [func.ret]
+// C++11 20.8.3.4 reference_wrapper invocation [refwrap.invoke]
 #include <functional>
 
 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;
index e4124c9..c25315b 100644 (file)
@@ -17,7 +17,7 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
-// 20.8.3.4 reference_wrapper invocation [refwrap.invoke]
+// C++11 20.8.3.4 reference_wrapper invocation [refwrap.invoke]
 #include <functional>
 
 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)();
index cd884fe..b2abc81 100644 (file)
@@ -17,6 +17,8 @@
 // with this library; see the file COPYING3.  If not see
 // <http://www.gnu.org/licenses/>.
 
+// C++11 20.8.3.4 reference_wrapper invocation [refwrap.invoke]
+
 #include <functional>
 #include <type_traits>
 #include <testsuite_hooks.h>