]> git.ipfire.org Git - thirdparty/gcc.git/commit
libstdc++: Implement C++26 P2927R3 - Inspecting exception_ptr
authorJakub Jelinek <jakub@redhat.com>
Thu, 26 Jun 2025 14:18:38 +0000 (16:18 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 26 Jun 2025 14:18:38 +0000 (16:18 +0200)
commitaf5b72cf9f5640d24f28398b37c7208d6b2439ab
tree22b8e29401e2aca55c76940348480d0d8987565d
parent29c7661c6f92d80f63a9a3cc37f3dc790a161f3f
libstdc++: Implement C++26 P2927R3 - Inspecting exception_ptr

The following patch attempts to implement the C++26 P2927R3 - Inspecting exception_ptr
paper (but not including P3748R0, I plan to play with it incrementally and
it will really depend on the Constexpr exceptions patch).

The function template is implemented using an out of line private method of
exception_ptr, so that P3748R0 then can use if consteval and provide a
constant evaluation variant of it.

2025-06-26  Jakub Jelinek  <jakub@redhat.com>

* include/bits/version.def (exception_ptr_cast): Add.
* include/bits/version.h: Regenerate.
* libsupc++/exception: Define __glibcxx_want_exception_ptr_cast before
including bits/version.h.
* libsupc++/exception_ptr.h (std::exception_ptr_cast): Define.
(std::__exception_ptr::exception_ptr::_M_exception_ptr_cast): Declare.
* libsupc++/eh_ptr.cc
(std::__exception_ptr::exception_ptr::_M_exception_ptr_cast): Define.
* src/c++23/std.cc.in (std::exception_ptr_cast): Export.
* config/abi/pre/gnu.ver: Export
_ZNKSt15__exception_ptr13exception_ptr21_M_exception_ptr_castERKSt9type_info
at CXXABI_1.3.17.
* testsuite/util/testsuite_abi.cc (check_version): Allow CXXABI_1.3.17.
* testsuite/18_support/exception_ptr/exception_ptr_cast.cc: New test.
libstdc++-v3/config/abi/pre/gnu.ver
libstdc++-v3/include/bits/version.def
libstdc++-v3/include/bits/version.h
libstdc++-v3/libsupc++/eh_ptr.cc
libstdc++-v3/libsupc++/exception
libstdc++-v3/libsupc++/exception_ptr.h
libstdc++-v3/src/c++23/std.cc.in
libstdc++-v3/testsuite/18_support/exception_ptr/exception_ptr_cast.cc [new file with mode: 0644]
libstdc++-v3/testsuite/util/testsuite_abi.cc