Commit graph

847 commits

Author SHA1 Message Date
Gerald Pfeifer
3e558fb7f3 libstdc++: Switch two links to www.open-std.org to https
libstdc++-v3/ChangeLog:

	* doc/xml/faq.xml: Switch two links to www.open-std.org to https.
	* doc/html/faq.html: Regenerate.
2023-02-18 10:59:11 +01:00
Gerald Pfeifer
7e300a3d04 libstdc++: Update an open-std.org link
libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2017.xml: Update an open-std.org link
	to www.open-std.org and https.
	* doc/html/manual/status.html: Regenerate.
2023-02-14 22:17:10 +01:00
Gerald Pfeifer
a1292514f8 libstdc++: Adjust "The Component Object Model" reference
libstdc++-v3/ChangeLog:

	* doc/xml/manual/policy_data_structures_biblio.xml: Adjust
	"The Component Object Model" reference.
	* doc/html/manual/policy_data_structures.html: Regenerate.
2023-02-13 23:30:37 +01:00
Gerald Pfeifer
74e72964b4 libstdc++: Tweak link to N1780 (C++ standard)
libstdc++-v3/ChangeLog:

	* doc/xml/manual/containers.xml: Tweak a link to N1780
	(C++ standard).
	* doc/html/manual/associative.html: Regenerate.
2023-02-12 23:35:40 +01:00
Gerald Pfeifer
4fd0cfd87b libstdc++: Change www.unix.org to unix.org
www.unix.org now redirects to unix.org.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/ctype.xml: Change www.unix.org to unix.org.
	* doc/html/manual/facets.html: Regenerate.
2023-02-12 09:58:08 +01:00
Gerald Pfeifer
d651736e10 libstdc++: Update link to "Worst-case efficient priority queues"
libstdc++-v3/ChangeLog:

	* doc/xml/manual/policy_data_structures_biblio.xml: Update
	link to "Worst-case efficient priority queues".
	* doc/html/manual/policy_data_structures.html: Regenerate.
2023-02-11 09:00:01 +01:00
Arsen Arsenović
9f4baed6ac libstdc++: Document P1642 and extensions
libstdc++-v3/ChangeLog:

	* doc/xml/manual/using.xml: Document newly-freestanding
	headers and the effect of the -ffreestanding flag.
	* doc/xml/manual/status_cxx2023.xml: Document P1642R11 as
	completed.
	* doc/xml/manual/configure.xml: Document that hosted installs
	respect __STDC_HOSTED__.
	* doc/xml/manual/test.xml: Document how to run tests in
	freestanding mode.
	* doc/html/*: Regenerate.
2023-02-06 20:46:52 +00:00
Nathaniel Shead
aa02a69e15 libstdc++: Implement P1413R3 'deprecate aligned_storage and aligned_union'
Adds deprecated attributes for C++23, and makes use of it for
std::aligned_storage, std::aligned_storage_t, std::aligned_union, and
std::aligned_union_t.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Add new macros.
	* include/bits/c++config (_GLIBCXX23_DEPRECATED)
	(_GLIBCXX23_DEPRECATED_SUGGEST): New macros.
	* include/std/type_traits (aligned_storage, aligned_union)
	(aligned_storage_t, aligned_union_t): Deprecate for C++23.
	* testsuite/20_util/aligned_storage/deprecated-2b.cc: New test.
	* testsuite/20_util/aligned_union/deprecated-2b.cc: New test.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
2023-02-06 14:23:47 +00:00
Nathaniel Shead
4f49ae607c libstdc++: Normalise _GLIBCXX20_DEPRECATED macro
Updates _GLIBCXX20_DEPRECATED to be defined and behave the same as the
versions for other standards (e.g. _GLIBCXX17_DEPRECATED).

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Update macros.
	* include/bits/c++config (_GLIBCXX20_DEPRECATED): Make
	consistent with other 'deprecated' macros.
	* include/std/type_traits (is_pod, is_pod_v): Use
	_GLIBCXX20_DEPRECATED_SUGGEST instead.

Signed-off-by: Nathaniel Shead <nathanieloshead@gmail.com>
Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
2023-02-06 14:23:46 +00:00
Gerald Pfeifer
08fde093ca libstdc++: Adjust link to pdftex
libstdc++-v3/ChangeLog:

	* doc/xml/manual/documentation_hacking.xml: Adjust link to pdftex.
	* doc/html/manual/documentation_hacking.html: Regenerate.
2023-02-04 17:17:52 +01:00
Gerald Pfeifer
07c87fce63 libstdc++: Tweak link to ABIcheck project
libstdc++-v3/ChangeLog:

	* doc/xml/manual/abi.xml: Tweak link to ABIcheck project.
	* doc/html/manual/abi.html: Regenerate.
2023-02-02 22:55:17 +01:00
Gerald Pfeifer
66d700af5b libstdc++: Switch a www.open-std.org link to https
libstdc++-v3/ChangeLog:

	* doc/xml/manual/using_exceptions.xml: Update a www.open-std.org
	link to https.
	* doc/html/manual/using_exceptions.html: Regenerate.
2023-02-02 01:50:44 +01:00
Gerald Pfeifer
d95e72b9c4 libstdc++: Fix link to online GDB manual
libstdc++-v3/ChangeLog:

	* doc/xml/manual/debug.xml: Fix link to online GDB manual.
	* doc/html/manual/debug.html: Regenerate.
2023-02-02 01:30:02 +01:00
Gerald Pfeifer
ab21d8d5bd libstdc++: Update links in the Memory section of the manual
libstdc++-v3/ChangeLog:

	* doc/xml/manual/shared_ptr.xml: Move links from both
	http://open-std.org and http://www.open-std.org to
	https://www.open-std.org.
	* doc/html/manual/memory.html: Regenerate.
2023-01-30 23:12:23 +01:00
Gerald Pfeifer
3e8704f98e libstdc++: Update links in the "Contributing" manual
libstdc++-v3/ChangeLog:

	* doc/xml/manual/appendix_contributing.xml: Adjust link to
	ISO C++ standard at ANSI.
	Move link to www.open-std.org to https.
	* doc/html/manual/appendix_contributing.html: Regenerate.
2023-01-28 23:07:01 +01:00
Gerald Pfeifer
191c1e7bc7 libstdc++: Move sourceforge.net links to https
libstdc++-v3/ChangeLog:

	* doc/xml/manual/documentation_hacking.xml: Move sourceforge.net
	links to https.
	* doc/html/manual/documentation_hacking.html: Regenerate.
2023-01-28 11:49:13 +01:00
Gerald Pfeifer
8ca0f49921 libstdc++: Switch www.open-std.org to https (ABI manual)
libstdc++-v3/ChangeLog:

	* doc/xml/manual/abi.xml: Update www.open-std.org link to https.
	* doc/html/manual/abi.html: Regenerate.
2023-01-28 11:12:57 +01:00
Gerald Pfeifer
e75b2c67e5 libstdc++: Move www.open-std.org to https in bugs manual
libstdc++-v3/ChangeLog:

	* doc/xml/manual/intro.xml: Update links to www.open-std.org to
	use https.
	* doc/html/manual/bugs.html: Regenerate.
2023-01-26 14:10:47 +01:00
Gerald Pfeifer
af7881e076 libstdc++: Minor updates to Policy Based Data Structures: Biblio
libstdc++-v3/ChangeLog:

2023-01-18  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/xml/manual/policy_data_structures_biblio.xml: Adjust links
	to www.open-std.org to use https.
	(COM: Component Model Object Technologies): Rename from...
	(The Component Object Model): ...to.
	* doc/html/manual/policy_data_structures.html: Regenerate.
2023-01-18 19:59:26 +01:00
Jakub Jelinek
83ffe9cde7 Update copyright years. 2023-01-16 11:52:17 +01:00
Gerald Pfeifer
b1c2182bd9 libstdc++: Move www.open-std.org in status part of manual to https
libstdc++-v3/ChangeLog:

2023-01-15  Gerald Pfeifer  <gerald@pfeifer.com>

	* doc/xml/manual/status_cxx2014.xml: Switch www.open-std.org to
	https.
	* doc/xml/manual/status_cxx2017.xml: Ditto.
	* doc/xml/manual/status_cxx2020.xml: Ditto.
	* doc/xml/manual/status_cxx2023.xml: Ditto.
	* doc/html/manual/status.html: Regenerate.
2023-01-15 23:43:06 +01:00
Jonathan Wakely
559993b857 libstdc++: Embed a static copy of tzdata.zi
This adds a copy of the tzdata.zi file to the library, and allows
configuring to use it instead of a copy read from disk at runtime.
The content of the file is in the public domain, but will need to be
updated to the latest upstream file before making GCC releases.

libstdc++-v3/ChangeLog:

	* acinclude.m4 (GLIBCXX_ZONEINFO_DIR): Replace the
	--with-libstdcxx-zoneinfo-dir configure option with
	--with-libstdcxx-zoneinfo with yes/no/static choices as well as
	a directory.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* doc/xml/manual/configure.xml: Document configure option.
	* doc/html/manual/configure.html: Regenerate.
	* src/c++20/Makefile.am: Generate tzdata.zi.h header.
	* src/c++20/Makefile.in: Regenerate.
	* src/c++20/tzdb.cc (__gnu_cxx::zoneinfo_dir_override): Return a
	null pointer if no directory is configured.
	(zoneinfo_dir): Replace with ...
	(zoneinfo_file): New function.
	(tzdata_stream): New istream class.
	(remote_version, reload_tzdb): Use tzdata_stream.
	* testsuite/lib/libstdc++.exp (check_effective_target_tzdb):
	Check new _GLIBCXX_STATIC_TZDATA macro and ignore presence of
	tzdata.zi file in default location.
	* src/c++20/tzdata.zi: New file.
2023-01-14 18:06:07 +00:00
Jonathan Wakely
ac1c7fcce1 libstdc++: Update shared library version history in manual
libstdc++-v3/ChangeLog:

	* doc/xml/manual/abi.xml: Add latest library versions.
	* doc/html/manual/abi.html: Regenerate.
2023-01-12 20:57:34 +00:00
Jonathan Wakely
4581328022 libstdc++: Change return type of std::bit_width to int (LWG 3656)
libstdc++-v3/ChangeLog:

	* doc/html/manual/bugs.html: Regenerate.
	* doc/xml/manual/intro.xml: Document LWG 3656 change.
	* include/std/bit (__bit_width, bit_width): Return int.
	* testsuite/26_numerics/bit/bit.pow.two/lwg3656.cc: New test.
2022-11-25 00:22:01 +00:00
Jonathan Wakely
d34dea05f8 libstdc++: Document use of Markdown for Doxygen comments
libstdc++-v3/ChangeLog:

	* doc/xml/manual/documentation_hacking.xml: Document use of
	Markdown for Doxygen comments. Tweak formatting.
	* doc/html/manual/documentation_hacking.html: Regenerate.
2022-11-15 11:35:52 +00:00
Jonathan Wakely
acbfa2bc60 libstdc++: Update my author blurb in the manual
libstdc++-v3/ChangeLog:

	* doc/xml/authors.xml: Update the blurb listing my doc
	contributions.
2022-11-08 03:07:49 +00:00
Jonathan Wakely
4596339d9f libstdc++: Remove empty <author> elements in manual
This fixes a spurious comma before the list of authors in the PDF
version of the libstdc++ manual.

Also fix the commented-out examples which should show <personblurb> not
<authorblurb>.

libstdc++-v3/ChangeLog:

	* doc/xml/authors.xml: Remove empty author element.
	* doc/xml/manual/spine.xml: Likewise.
	* doc/html/manual/index.html: Regenerate.
2022-11-08 03:07:49 +00:00
Arsen Arsenović
655271e47f libstdc++: Don't use gstdint.h anymore
libstdc++-v3/ChangeLog:

	* configure.ac: Stop generating gstdint.h.
	* src/c++11/compatibility-atomic-c++0x.cc: Stop using gstdint.h.
	* Makefile.in: Regenerate.
	* aclocal.m4: Regenerate.
	* config.h.in: Regenerate.
	* configure: Regenerate.
	* doc/Makefile.in: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.in: Regenerate.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++17/Makefile.in: Regenerate.
	* src/c++20/Makefile.in: Regenerate.
	* src/c++98/Makefile.in: Regenerate.
	* src/filesystem/Makefile.in: Regenerate.
	* src/libbacktrace/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
2022-10-29 00:55:42 +01:00
Jonathan Wakely
637e3668fd libstdc++: Allow emergency EH alloc pool size to be tuned [PR68606]
Implement a long-standing request to support tuning the size of the
emergency buffer for allocating exceptions after malloc fails, or to
disable that buffer entirely.

It's now possible to disable the dynamic allocation of the buffer and
use a fixed-size static buffer, via --enable-libstdcxx-static-eh-pool.
This is a built-time choice that is baked into libstdc++ and so affects
all code linked against that build of libstdc++.

The size of the pool can be set by --with-libstdcxx-eh-pool-obj-count=N
which is measured in units of sizeof(void*) not bytes. A given exception
type such as std::system_error depends on the target, so giving a size
in bytes wouldn't be portable across 16/32/64-bit targets.

When libstdc++ is configured to use a dynamic buffer, the size of that
buffer can now be tuned at runtime by setting the GLIBCXX_TUNABLES
environment variable (c.f. PR libstdc++/88264). The number of exceptions
to reserve space for is controlled by the "glibcxx.eh_pool.obj_count"
and "glibcxx.eh_pool.obj_size" tunables. The pool will be sized to be
able to allocate obj_count exceptions of size obj_size*sizeof(void*) and
obj_count "dependent" exceptions rethrown by std::rethrow_exception.

With the ability to tune the buffer size, we can reduce the default pool
size on 32-bit and 16-bit targets. Most users never need to throw 1kB
exceptions in parallel from hundreds of threads after malloc is OOM. The
users who do need that can use the tunables to select larger sizes.

The old defaults can be chosen at runtime by setting GLIBCXX_TUNABLES
to:
64-bit: glibcxx.eh_pool.obj_count=64:glibcxx.eh_pool.obj_size=112
32-bit: glibcxx.eh_pool.obj_count=32:glibcxx.eh_pool.obj_size=104

Or approximated by configuring with:
64-bit: --with-libstdcxx-eh-pool-obj-count=252
32-bit: --with-libstdcxx-eh-pool-obj-count=94

libstdc++-v3/ChangeLog:

	PR libstdc++/68606
	* Makefile.in: Regenerate.
	* acinclude.m4 (GLIBCXX_EMERGENCY_EH_ALLOC): New macro.
	* configure: Regenerate.
	* configure.ac: Use GLIBCXX_EMERGENCY_EH_ALLOC.
	* crossconfig.m4: Check for secure_getenv.
	* doc/Makefile.in: Regenerate.
	* doc/xml/manual/configure.xml: Document new configure options.
	* doc/xml/manual/evolution.xml: Document addition of tunables.
	* doc/xml/manual/using_exceptions.xml: Document emergency
	buffer and tunables.
	* doc/html/*: Regenerate.
	* include/Makefile.in: Regenerate.
	* libsupc++/Makefile.am: Use EH_POOL_FLAGS.
	* libsupc++/Makefile.in: Regenerate.
	* libsupc++/eh_alloc.cc (EMERGENCY_OBJ_SIZE): Define in units
	of sizeof(void*) not including the ABI's exception header.
	(EMERGENCY_OBJ_COUNT): Define as target-independent calculation
	based on word size.
	(MAX_OBJ_COUNT): Define macro for upper limit on pool size.
	(pool) [_GLIBCXX_EH_POOL_STATIC]: Use fixed-size buffer.
	(pool::buffer_size_in_bytes): New static member function.
	(pool::pool): Parse GLIBCXX_TUNABLES environment variable to set
	pool size at runtime.
	(pool::in_pool): Use std::less<void*> for total order.
	(__freeres) [_GLIBCXX_EH_POOL_STATIC]: Do nothing.
	(__cxa_free_exception, __cxa_free_dependent_exception): Add
	[[unlikely]] attributes.
	* po/Makefile.in: Regenerate.
	* python/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* src/c++11/Makefile.in: Regenerate.
	* src/c++17/Makefile.in: Regenerate.
	* src/c++20/Makefile.in: Regenerate.
	* src/c++98/Makefile.in: Regenerate.
	* src/filesystem/Makefile.in: Regenerate.
	* src/libbacktrace/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.
2022-10-11 16:21:48 +01:00
Jonathan Wakely
8e2f453de3 libstdc++: Use bold style for DR titles in the manual
This matches how the issues are styled in the LWG issues list, and also
allows us to use italics for "cv" (e.g. in issue 2487).

libstdc++-v3/ChangeLog:

	* doc/xml/manual/intro.xml: Add role="bold" attribute to
	emphasis elements for issue titles.
	* doc/html/manual/bugs.html: Regenerate.
2022-10-07 12:20:24 +01:00
Jonathan Wakely
c27ddea746 libstdc++: Update status docs for compare_exchange padding bits
libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2020.xml: Update C++20 status.
	* doc/html/manual/status.html: Regenerate.
2022-10-03 22:02:14 +01:00
Jonathan Wakely
d01f112de4 libstdc++: Disable volatile-qualified std::bind for C++20
LWG 2487 added a precondition to std::bind for C++17, making
volatile-qualified uses undefined. We still support it, but with a
deprecated warning.

P1065R2 made it explicitly ill-formed for C++20, so we should no longer
accept it as deprecated. This implements that change.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/evolution.xml: Document std::bind API
	changes.
	* doc/xml/manual/intro.xml: Document LWG 2487 status.
	* doc/xml/manual/using.xml: Clarify default value of
	_GLIBCXX_USE_DEPRECATED.
	* doc/html/*: Regenerate.
	* include/std/functional (_Bind::operator()(Args&&...) volatile)
	(_Bind::operator()(Args&&...) const volatile)
	(_Bind_result::operator()(Args&&...) volatile)
	(_Bind_result::operator()(Args&&...) const volatile): Replace
	with deleted overload for C++20 and later.
	* testsuite/20_util/bind/cv_quals.cc: Check for deprecated
	warnings in C++17.
	* testsuite/20_util/bind/cv_quals_2.cc: Likewise, and check for
	ill-formed in C++20.
2022-09-29 00:33:46 +01:00
Jonathan Wakely
9c23fe08c1 libstdc++: Remove trailing whitespace in documentation sources
libstdc++-v3/ChangeLog:

	* doc/xml/manual/documentation_hacking.xml: Remove trailing
	whitespace.
	* doc/xml/manual/policy_data_structures.xml: Likewise.
2022-09-21 08:44:22 +01:00
Jonathan Wakely
64f9580423 libstdc++: Fix Doxygen commands
Remove the bogus -D__allocator_base=std::__new_allocator macro
definition for Doxygen, because that's an alias template for C++11 and
later, not a macro.

Fix the @cond/@endcond pair that span the end of an @addtogroup group.
Add another @endcond inside the group, and another @cond after it.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Remove __allocator_base.
	* include/bits/allocator.h: Fix nesting of Doxygen commands.
2022-09-16 15:54:41 +01:00
Jonathan Wakely
4c156ead37 libstdc++: Document new libstdc++.so symbol versions
libstdc++-v3/ChangeLog:

	* doc/xml/manual/abi.xml: Document GLIBCXX_3.4.30 and
	GLIBCXX_3.4.31 versions.
	* doc/html/manual/abi.html: Regenerate.
2022-09-16 10:50:28 +01:00
Jonathan Wakely
8b1bc3051b libstdc++: Document LWG 1203 API change in manual
libstdc++-v3/ChangeLog:

	* doc/xml/manual/intro.xml: Document LWG 1203.
	* doc/html/*: Regenerate.
2022-09-14 19:17:36 +01:00
François Dumont
4d5660907c libstdc++: [_GLIBCXX_DEBUG] Add backtrace generation on demand
Add _GLIBCXX_DEBUG_BACKTRACE macro to activate backtrace generation on
_GLIBCXX_DEBUG assertions. Prerequisite is to have configure the lib with:

--enable-libstdcxx-backtrace=yes

libstdc++-v3/ChangeLog:

	* include/debug/formatter.h
	[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_state): Declare.
	[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_create_state): Declare.
	[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_callback): Define.
	[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_error_callback): Define.
	[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_func): Define.
	[_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full): Declare.
	[_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_state): New.
	[_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_full): New.
	* src/c++11/debug.cc [_GLIBCXX_HAVE_STACKTRACE](print_backtrace): New.
	(_Error_formatter::_M_error()): Adapt.
	* src/libbacktrace/Makefile.am: Add backtrace.c.
	* src/libbacktrace/Makefile.in: Regenerate.
	* src/libbacktrace/backtrace-rename.h (backtrace_full): New.
	* testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc: New test.
	* doc/xml/manual/debug_mode.xml: Document _GLIBCXX_DEBUG_BACKTRACE.
	* doc/xml/manual/using.xml: Likewise.
2022-08-31 20:51:10 +02:00
Jonathan Wakely
cc4fa7a210 libstdc++: Document linker option for C++23 <stacktrace> [PR105678]
libstdc++-v3/ChangeLog:

	PR libstdc++/105678
	* doc/xml/manual/using.xml: Document -lstdc++_libbacktrace
	requirement for using std::stacktrace. Also adjust -frtti and
	-fexceptions to document non-default (i.e. negative) forms.
	* doc/html/*: Regenerate.
2022-08-22 22:52:25 +01:00
Jonathan Wakely
682e587f10 libstdc++: Fix hyperlink in docs
libstdc++-v3/ChangeLog:

	* doc/xml/manual/prerequisites.xml: Fix attributes for external
	hyperlink.
	* doc/html/manual/setup.html: Regenerate.
2022-05-16 14:54:07 +01:00
Jonathan Wakely
8414dad54a libstdc++: Update C++23 status docs
These are the C++23 proposals supported in the gcc-12 branch.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/status_cxx2023.xml: Update with gcc-12 support.
	* doc/html/*: Regenerate.
2022-05-16 14:53:16 +01:00
Jonathan Wakely
4361867344 libstdc++: Add C++23 status docs
These are the C++23 proposals already supported in the gcc-11 branch.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/intro.xml: Include new chapter.
	* doc/xml/manual/status_cxx2020.xml: Tweak release numbers.
	* doc/xml/manual/status_cxx2023.xml: New file.
	* doc/html/*: Regenerate.
2022-05-16 14:47:34 +01:00
Jonathan Wakely
64648821f1 libstdc++: Fix status docs for <bit> support
libstdc++-v3/ChangeLog:

	* doc/html/manual/status.html: Regenerate.
	* doc/xml/manual/status_cxx2020.xml: Fix supported version for
	C++20 bit operations.
2022-05-16 14:47:34 +01:00
Jonathan Wakely
c829b04bc3 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.
2022-05-13 20:40:04 +01:00
Jonathan Wakely
b584cbdb08 libstdc++: Improve doxygen docs for <mutex>
libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Define
	_GTHREAD_USE_MUTEX_TIMEDLOCK macro.
	* include/bits/std_mutex.h (mutex, lock_guard): Use @since and
	@headerfile.
	* include/bits/unique_lock.h (unique_lock): Likewise.
	* include/std/mutex (recursive_mutex, timed_mutex)
	(recursive_timed_mutex, scoped_lock): Likewise.
2022-05-13 13:32:23 +01:00
Jonathan Wakely
a278402216 libstdc++: Improve doxygen docs for some of <memory>
libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Define
	_GLIBCXX23_CONSTEXPR macro.
	* include/backward/auto_ptr.h (auto_ptr): Use @deprecated.
	* include/bits/unique_ptr.h (default_delete): Use @since and
	@headerfile.
	* include/std/scoped_allocator: Remove @ingroup from @file
	block.
2022-05-13 13:32:23 +01:00
Jonathan Wakely
171f41f124 libstdc++: Improve doxygen docs for std::allocator
libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Define __allocator_base
	so that Doxygen shows the right base-class for std::allocator.
	* include/bits/alloc_traits.h: Improve doxygen docs.
	* include/bits/allocator.h: Likewise.
	* include/bits/new_allocator.h: Likewise.
	* include/ext/new_allocator.h: Likewise.
2022-05-13 13:32:22 +01:00
Jonathan Wakely
1b01963a4e libstdc++: Improve doxygen docs for <regex>
Add @headerfile and @since tags. Improve grouping of non-member
functions via @relates tags.

Mark the std::pair base class of std::sub_match as undocumented, so that
the docs don't show all the related non-member functions are part of the
sub_match API. Use a new macro to re-add the data members for Doxygen
only.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Define macro
	_GLIBCXX_DOXYGEN_ONLY to expand its argument.
	* include/bits/c++config (_GLIBCXX_DOXYGEN_ONLY): Define.
	* include/bits/regex.h: Improve doxygen docs.
	* include/bits/regex_constants.h: Likewise.
	* include/bits/regex_error.h: Likewise.
2022-05-13 13:32:22 +01:00
Jonathan Wakely
e4905f1185 libstdc++: Add macros for the inline namespace std::_V2
Use macros to open and close the inline namespace _V2 that is used for
ABI versioning of individual components such as chrono::system_clock.

This allows the namespace to be hidden in the docs generated by Doxygen,
so that we document std::foo instead of std::_V2::foo.

This also makes it easy to remove that namespace entirely for the
gnu-versioned-namespace build, where everything is already versioned as
std::__8 and there are no backwards compatibility guarantees.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (PREDEFINED): Expand new macros to
	nothing.
	* include/bits/c++config (_GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE)
	(_GLIBCXX_END_INLINE_ABI_NAMESPACE): Define new macros.
	* include/bits/algorithmfwd.h (_V2::__rotate): Use new macros
	for the namespace.
	* include/bits/chrono.h (chrono::_V2::system_clock): Likewise.
	* include/bits/stl_algo.h (_V2::__rotate): Likewise.
	* include/std/condition_variable (_V2::condition_variable_any):
	Likewise.
	* include/std/system_error (_V2::error_category): Likewise.
2022-05-13 13:32:22 +01:00
Jonathan Wakely
9c3a8fe34a libstdc++: Disable Doxygen GROUP_NESTED_COMPOUNDS config option
Before Doxygen version 1.9.2 this option is broken (see
https://github.com/doxygen/doxygen/issues/8638 for more details) and
classes are not added to the correct groups by @ingroup and @addtogroup.

Also remove the obsolete CLASS_DIAGRAMS option that causes a warning.

libstdc++-v3/ChangeLog:

	* doc/doxygen/user.cfg.in (GROUP_NESTED_COMPOUNDS): Set to NO.
	(CLASS_DIAGRAMS): Remove obsolete option.
2022-05-13 13:32:21 +01:00
Jonathan Wakely
e03a0a4d73 libstdc++: Update documentation about copyright and GPL notices in tests
There is no need to require FSF copyright for tests that are just
"self-evident" ways to check the API and behaviour of the library.
This is consistent with tests for the compiler, which do not have
copyright and licence notices either.

libstdc++-v3/ChangeLog:

	* doc/xml/manual/test.xml: Remove requirement for copyright and
	GPL notice in tests.
	* doc/html/manual/test.html: Regenerate.
2022-05-06 14:43:38 +01:00