libstdc++: Allow std::swap to find overload for std::exception_ptr
authorJonathan Wakely <jwakely@redhat.com>
Thu, 12 May 2022 13:18:53 +0000 (14:18 +0100)
committerJonathan Wakely <jwakely@redhat.com>
Fri, 13 May 2022 19:40:04 +0000 (20:40 +0100)
commitc829b04bc3e1dcd4b06fa3bc2e62dd2d1eb0b036
tree8725c00e5962e393828ad784cba95a07874ad977
parentc470f3ea86a28caacb9e9124307c4a03b2396288
libstdc++: Allow std::swap to find overload for std::exception_ptr

The non-member swap for std::exception_ptr is in a nested namespace and
so can only be found by ADL currently. Add a using-declaration so that
qualified std::swap calls will use the std::exception_ptr::swap member,
instead of the generic std::swap.

There's no new test for this, because the generic std::swap works, it
just does more work than is necessary.

Also tell Doxygen to replace the __exception_ptr namespace with
"__unspecified__" in the generate docs, so the real name is not
documented.

libstdc++-v3/ChangeLog:

* doc/doxygen/user.cfg.in (PREDEFINED): Replace __exception_ptr
with "__unspecified__".
* libsupc++/exception_ptr.h: Improve doxygen docs.
(__exception_ptr::swap): Also declare in namespace std.
libstdc++-v3/doc/doxygen/user.cfg.in
libstdc++-v3/libsupc++/exception_ptr.h