From: Tomasz Kamiński
Date: Mon, 22 Dec 2025 10:53:45 +0000 (+0100)
Subject: libstdc++/doc: Document generate_canonical and variant compat macros.
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6a8b3a63089745b945bebe7ba21104060a2edbb1;p=thirdparty%2Fgcc.git
libstdc++/doc: Document generate_canonical and variant compat macros.
The _GLIBCXX_USE_OLD_GENERATE_CANONICAL was introduced by
r16-6177-g866bc8a9214b1d that implemented P0952R2 [1] resolution
for LWG2524 as DR against C++20.
The _GLIBCXX_USE_VARIANT_CXX17_OLD_ABI was introduced by
r16-6301-gb3c167b61fd75f that resovled PR112591.
[1] https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2023/p0952r2.html
libstdc++-v3/ChangeLog:
* doc/html/manual/using_macros.html: Regenerate.
* doc/xml/manual/using.xml: Add entries for
_GLIBCXX_USE_OLD_GENERATE_CANONICAL and
_GLIBCXX_USE_VARIANT_CXX17_OLD_ABI.
Reviewed-by: Jonathan Wakely
Signed-off-by: Tomasz Kamiński
---
diff --git a/libstdc++-v3/doc/html/manual/using_macros.html b/libstdc++-v3/doc/html/manual/using_macros.html
index c1406ec76f7..b1d05d99d76 100644
--- a/libstdc++-v3/doc/html/manual/using_macros.html
+++ b/libstdc++-v3/doc/html/manual/using_macros.html
@@ -137,4 +137,14 @@
When not defined, durations, time points, and calendar types are
available for freestanding, but the standard clocks and the time zone
database are not (because they require OS support).
+
_GLIBCXX_USE_OLD_GENERATE_CANONICAL
+ Undefined by default. When defined generate_canonical
+ reverts to the algorithm used prior to the implementation of
+
+ P0952: A new specification for std::generate_canonical in GCC-16.
+
_GLIBCXX_USE_VARIANT_CXX17_OLD_ABI
+ Undefined by default. When defined variant in C++17
+ mode will revert to the non-conforming implementation used prior to the
+ PR112591
+ in GCC-16. Has no impact for C++20 or later modes.