[gcc r16-8579] libstdc++: Update __cpp_lib_function_ref value for P3948R1.
Tomasz Kaminski
tkaminsk@gcc.gnu.org
Mon Apr 13 09:49:45 GMT 2026
https://gcc.gnu.org/g:2979e67af19d5c199a60b852efa8214131ba53ad
commit r16-8579-g2979e67af19d5c199a60b852efa8214131ba53ad
Author: Tomasz Kamiński <tkaminsk@redhat.com>
Date: Wed Apr 8 17:35:46 2026 +0200
libstdc++: Update __cpp_lib_function_ref value for P3948R1.
SG-10 agreed on using 202604L value for paper P3961R0 that
also updates __cpp_lib_function_ref macro.
libstdc++-v3/ChangeLog:
* include/bits/version.def (function_ref): Bump to 202603L.
* include/bits/version.h: Regenerate.
* testsuite/20_util/function_ref/assign.cc: Remove repeated
check for feature test macro.
* testsuite/20_util/function_ref/cons.cc: Updated checked
value.
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Signed-off-by: Tomasz Kamiński <tkaminsk@redhat.com>
Diff:
---
libstdc++-v3/include/bits/version.def | 5 ++++-
libstdc++-v3/include/bits/version.h | 4 ++--
libstdc++-v3/testsuite/20_util/function_ref/assign.cc | 6 ------
libstdc++-v3/testsuite/20_util/function_ref/cons.cc | 2 +-
4 files changed, 7 insertions(+), 10 deletions(-)
diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def
index 0142251ef936..3b4a0d4fdc05 100644
--- a/libstdc++-v3/include/bits/version.def
+++ b/libstdc++-v3/include/bits/version.def
@@ -1959,9 +1959,12 @@ ftms = {
};
ftms = {
+ // 202306 P0792R14 function_ref: a non-owning reference to a Callable
+ // 202511 P3774R1 Rename std::nontype, and make it broadly useful
+ // 202603 P3948R1 constant_wrapper is the only tool needed for passing...
name = function_ref;
values = {
- v = 202306;
+ v = 202603;
cxxmin = 26;
};
};
diff --git a/libstdc++-v3/include/bits/version.h b/libstdc++-v3/include/bits/version.h
index cf78137c9d1a..59719b4f8116 100644
--- a/libstdc++-v3/include/bits/version.h
+++ b/libstdc++-v3/include/bits/version.h
@@ -2183,9 +2183,9 @@
#if !defined(__cpp_lib_function_ref)
# if (__cplusplus > 202302L)
-# define __glibcxx_function_ref 202306L
+# define __glibcxx_function_ref 202603L
# if defined(__glibcxx_want_all) || defined(__glibcxx_want_function_ref)
-# define __cpp_lib_function_ref 202306L
+# define __cpp_lib_function_ref 202603L
# endif
# endif
#endif /* !defined(__cpp_lib_function_ref) */
diff --git a/libstdc++-v3/testsuite/20_util/function_ref/assign.cc b/libstdc++-v3/testsuite/20_util/function_ref/assign.cc
index 521a35fc11e0..eafea9aac241 100644
--- a/libstdc++-v3/testsuite/20_util/function_ref/assign.cc
+++ b/libstdc++-v3/testsuite/20_util/function_ref/assign.cc
@@ -2,12 +2,6 @@
#include <functional>
-#ifndef __cpp_lib_function_ref
-# error "Feature-test macro for function_ref missing in <functional>"
-#elif __cpp_lib_function_ref != 202306L
-# error "Feature-test macro for function_ref has wrong value in <functional>"
-#endif
-
using std::constant_wrapper;
using std::function_ref;
diff --git a/libstdc++-v3/testsuite/20_util/function_ref/cons.cc b/libstdc++-v3/testsuite/20_util/function_ref/cons.cc
index 78aebd38a074..e6c13e3e538c 100644
--- a/libstdc++-v3/testsuite/20_util/function_ref/cons.cc
+++ b/libstdc++-v3/testsuite/20_util/function_ref/cons.cc
@@ -5,7 +5,7 @@
#ifndef __cpp_lib_function_ref
# error "Feature-test macro for function_ref missing in <functional>"
-#elif __cpp_lib_function_ref != 202306L
+#elif __cpp_lib_function_ref != 202603L
# error "Feature-test macro for function_ref has wrong value in <functional>"
#endif
More information about the Libstdc++-cvs
mailing list