From 82309222300acf68e345b32155df21e1b876144e Mon Sep 17 00:00:00 2001
From: Jonathan Wakely
Date: Fri, 20 Sep 2024 17:35:48 +0100
Subject: [PATCH] libstdc++: Document missing features for old std:string ABI
[PR116777]
There are several features that are not supported when using the old
std::string ABI. It's possible that PR 81967 will get fixed, but the
missing C++20 features almost certainly won't be. Document this in the
manual.
libstdc++-v3/ChangeLog:
PR libstdc++/116777
* doc/xml/manual/using.xml: Document features that are not
supported for the gcc4-compatible ABI.
* doc/html/manual/using_dual_abi.html: Regenerate.
---
.../doc/html/manual/using_dual_abi.html | 18 ++++++++++++-
libstdc++-v3/doc/xml/manual/using.xml | 26 ++++++++++++++++++-
2 files changed, 42 insertions(+), 2 deletions(-)
diff --git a/libstdc++-v3/doc/html/manual/using_dual_abi.html b/libstdc++-v3/doc/html/manual/using_dual_abi.html
index 916ac575f64b..939eedae3629 100644
--- a/libstdc++-v3/doc/html/manual/using_dual_abi.html
+++ b/libstdc++-v3/doc/html/manual/using_dual_abi.html
@@ -22,7 +22,7 @@
of the macro is 1
which causes the new ABI to be active,
so to use the old ABI you must explicitly define the macro to
0
before including any library headers.
- (Be aware that some GNU/Linux distributions configure GCC 5 differently so
+ (Be aware that some GNU/Linux distributions configured GCC 5 differently so
that the default value of the macro is 0
and users must
define it to 1
to enable the new ABI.)
Although the changes were made for C++11 conformance, the choice of ABI
@@ -72,6 +72,22 @@
Handlers for std::exception
will always catch
iostreams exceptions, because the old and new type both inherit from
std::exception
.
+
+ Some features are not supported when using the old ABI, including:
+
-
+ Using
std::string::const_iterator
for
+ positional arguments to member functions such as
+ std::string::erase
.
+ -
+ Allocator propagation in
std::string
.
+ -
+ Using
std::string
at compile-time in
+ constexpr
functions.
+ -
+ Class
std::chrono::time_zone
and all related APIs.
+ -
+ The
<syncstream>
header.
+
If you get linker errors about undefined references to symbols
that involve types in the std::__cxx11
namespace or the tag
[abi:cxx11]
then it probably indicates that you are trying to
diff --git a/libstdc++-v3/doc/xml/manual/using.xml b/libstdc++-v3/doc/xml/manual/using.xml
index 4e1c70040b56..89119f6fb2db 100644
--- a/libstdc++-v3/doc/xml/manual/using.xml
+++ b/libstdc++-v3/doc/xml/manual/using.xml
@@ -1368,7 +1368,7 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
of the macro is 1 which causes the new ABI to be active,
so to use the old ABI you must explicitly define the macro to
0 before including any library headers.
- (Be aware that some GNU/Linux distributions configure GCC 5 differently so
+ (Be aware that some GNU/Linux distributions configured GCC 5 differently so
that the default value of the macro is 0 and users must
define it to 1 to enable the new ABI.)
@@ -1428,6 +1428,30 @@ g++ -Winvalid-pch -I. -include stdc++.h -H -g -O2 hello.cc -o test.exe
std::exception.
+
+ Some features are not supported when using the old ABI, including:
+
+
+ Using std::string::const_iterator for
+ positional arguments to member functions such as
+ std::string::erase.
+
+
+ Allocator propagation in std::string.
+
+
+ Using std::string at compile-time in
+ constexpr
functions.
+
+
+ Class std::chrono::time_zone and all related APIs.
+
+
+ The header.
+
+
+
+
Troubleshooting
If you get linker errors about undefined references to symbols
--
2.47.2