mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
libstdc++: Disable __cpp_lib_reflection for old CXX ABI
Reflection currently doesn't work with -D_GLIBCXX_USE_CXX11_ABI=0.
The problem is that std::meta::exception currently uses under the
hood std::string and std::u8string and those aren't constexpr in
the old ABI.
While those members are in the standard exposition-only and so
we could make it to work by writing a custom class template that
just remembers const char{,8_t} * and size_t, there shouldn't be
many people trying to use C++26 features with the ABI that isn't
even compatible with C++11.
2026-01-20 Jakub Jelinek <jakub@redhat.com>
* include/bits/version.def (reflection): Add cxx11abi = yes;.
* include/bits/version.h: Regenerate.
This commit is contained in:
committed by
Jakub Jelinek
parent
bc09128cad
commit
23cd6f3bcb
@@ -2259,6 +2259,7 @@ ftms = {
|
||||
v = 202506;
|
||||
cxxmin = 26;
|
||||
extra_cond = "__cpp_impl_reflection >= 202506L";
|
||||
cxx11abi = yes;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@@ -2526,6 +2526,16 @@
|
||||
#endif /* !defined(__cpp_lib_philox_engine) */
|
||||
#undef __glibcxx_want_philox_engine
|
||||
|
||||
#if !defined(__cpp_lib_reflection)
|
||||
# if (__cplusplus > 202302L) && _GLIBCXX_USE_CXX11_ABI && (__cpp_impl_reflection >= 202506L)
|
||||
# define __glibcxx_reflection 202506L
|
||||
# if defined(__glibcxx_want_all) || defined(__glibcxx_want_reflection)
|
||||
# define __cpp_lib_reflection 202506L
|
||||
# endif
|
||||
# endif
|
||||
#endif /* !defined(__cpp_lib_reflection) */
|
||||
#undef __glibcxx_want_reflection
|
||||
|
||||
#if !defined(__cpp_lib_is_implicit_lifetime)
|
||||
# if (__cplusplus >= 202100L) && (__has_builtin(__builtin_is_implicit_lifetime))
|
||||
# define __glibcxx_is_implicit_lifetime 202302L
|
||||
@@ -2536,14 +2546,4 @@
|
||||
#endif /* !defined(__cpp_lib_is_implicit_lifetime) */
|
||||
#undef __glibcxx_want_is_implicit_lifetime
|
||||
|
||||
#if !defined(__cpp_lib_reflection)
|
||||
# if (__cplusplus > 202302L) && (__cpp_impl_reflection >= 202506L)
|
||||
# define __glibcxx_reflection 202506L
|
||||
# if defined(__glibcxx_want_all) || defined(__glibcxx_want_reflection)
|
||||
# define __cpp_lib_reflection 202506L
|
||||
# endif
|
||||
# endif
|
||||
#endif /* !defined(__cpp_lib_reflection) */
|
||||
#undef __glibcxx_want_reflection
|
||||
|
||||
#undef __glibcxx_want_all
|
||||
|
||||
Reference in New Issue
Block a user