]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Disable __cpp_lib_reflection for old CXX ABI
authorJakub Jelinek <jakub@redhat.com>
Tue, 20 Jan 2026 11:01:07 +0000 (12:01 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 20 Jan 2026 11:01:07 +0000 (12:01 +0100)
commit23cd6f3bcb494606afe82a490b10f64f660d8143
tree28bcf2494c4a7b76b77366213de778f67e8b2add
parentbc09128cad447159eb71f0e5f97ac49ca2888300
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.
libstdc++-v3/include/bits/version.def
libstdc++-v3/include/bits/version.h