aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Grosheintz <luc.grosheintz@gmail.com>2025-04-29 14:46:07 +0200
committerJonathan Wakely <redi@gcc.gnu.org>2025-05-07 11:47:39 +0100
commit369c439ca19725712426defb441663c529b27dd3 (patch)
tree3321b642a3f06f6cf7ade9bd70b5205500802fb3
parent15edd7d60352d4cfa95ed1cf14e6ded041b469ba (diff)
downloadgcc-369c439ca19725712426defb441663c529b27dd3.zip
gcc-369c439ca19725712426defb441663c529b27dd3.tar.gz
gcc-369c439ca19725712426defb441663c529b27dd3.tar.bz2
libstdc++: Setup internal FTM for mdspan.
Uses the FTM infrastructure to create an internal feature testing macro for partial availability of mdspan; which is then used to hide the contents of the header mdspan when compiling against a standard prior to C++23. libstdc++-v3/ChangeLog: * include/bits/version.def: Add internal feature testing macro __glibcxx_mdspan. * include/bits/version.h: Regenerate. Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>
-rw-r--r--libstdc++-v3/include/bits/version.def9
-rw-r--r--libstdc++-v3/include/bits/version.h9
2 files changed, 18 insertions, 0 deletions
diff --git a/libstdc++-v3/include/bits/version.def b/libstdc++-v3/include/bits/version.def
index 282667e..f4d3de8 100644
--- a/libstdc++-v3/include/bits/version.def
+++ b/libstdc++-v3/include/bits/version.def
@@ -1000,6 +1000,15 @@ ftms = {
};
ftms = {
+ name = mdspan;
+ no_stdname = true; // FIXME: remove
+ values = {
+ v = 1; // FIXME: 202207
+ cxxmin = 23;
+ };
+};
+
+ftms = {
name = ssize;
values = {
v = 201902;
diff --git a/libstdc++-v3/include/bits/version.h b/libstdc++-v3/include/bits/version.h
index bb7c047..d5d75ce 100644
--- a/libstdc++-v3/include/bits/version.h
+++ b/libstdc++-v3/include/bits/version.h
@@ -1114,6 +1114,15 @@
#endif /* !defined(__cpp_lib_span) && defined(__glibcxx_want_span) */
#undef __glibcxx_want_span
+#if !defined(__cpp_lib_mdspan)
+# if (__cplusplus >= 202100L)
+# define __glibcxx_mdspan 1L
+# if defined(__glibcxx_want_all) || defined(__glibcxx_want_mdspan)
+# endif
+# endif
+#endif /* !defined(__cpp_lib_mdspan) && defined(__glibcxx_want_mdspan) */
+#undef __glibcxx_want_mdspan
+
#if !defined(__cpp_lib_ssize)
# if (__cplusplus >= 202002L)
# define __glibcxx_ssize 201902L