From: Jonathan Wakely <jwakely@redhat.com>
To: libstdc++@gcc.gnu.org, gcc-patches@gcc.gnu.org
Subject: [committed] libstdc++: Document removal of implicit allocator rebinding extensions
Date: Thu, 1 Jun 2023 16:07:11 +0100 [thread overview]
Message-ID: <20230601150711.257954-1-jwakely@redhat.com> (raw)
Pushed to trunk. The first two changes will be backported too.
-- >8 --
Traditionally libstdc++ allowed containers and strings to be
instantiated with allocator's that have the wrong value type, implicitly
rebinding the allocator to the container's value type. Since C++20 that
has been explicitly ill-formed, so the extension is no longer supported
in strict modes (e.g. -std=c++17) and in C++20 and later.
libstdc++-v3/ChangeLog:
* doc/xml/manual/evolution.xml: Document removal of implicit
allocator rebinding extensions in strict mode and for C++20.
* doc/html/*: Regenerate.
---
libstdc++-v3/doc/html/manual/api.html | 13 +++++++++++++
libstdc++-v3/doc/xml/manual/evolution.xml | 19 +++++++++++++++++++
2 files changed, 32 insertions(+)
diff --git a/libstdc++-v3/doc/xml/manual/evolution.xml b/libstdc++-v3/doc/xml/manual/evolution.xml
index 4037a18d2df..db70f24f2f9 100644
--- a/libstdc++-v3/doc/xml/manual/evolution.xml
+++ b/libstdc++-v3/doc/xml/manual/evolution.xml
@@ -915,6 +915,13 @@ Calling a <code>std::bind</code> result as volatile was deprecated for C++17.
<filename>libstdc++.so.8</filename>.
</para>
+<para>
+ The extension allowing containers to be instantiated with an allocator
+ that doesn't match the container's value type is no longer allowed in
+ strict (<option>-std=c++NN</option>) modes, only in
+ <option>-std=gnu++NN</option> modes.
+</para>
+
</section>
<section xml:id="api.rel_91"><info><title><constant>9</constant></title></info>
@@ -998,6 +1005,12 @@ Calling a <code>std::bind</code> result as volatile was deprecated for C++17.
added.
</para>
+<para>
+ The extension allowing containers to be instantiated with an allocator
+ that doesn't match the container's value type is no longer allowed in
+ C++20 mode, even in non-strict <option>-std=gnu++20</option> mode.
+</para>
+
</section>
<section xml:id="api.rel_111"><info><title><constant>11</constant></title></info>
@@ -1096,6 +1109,12 @@ Deprecate the non-standard overload that allows <code>std::setfill</code>
to be used with <code>std::basic_istream</code>.
</para>
+<para>
+ The extension allowing <code>std::basic_string</code> to be instantiated
+ with an allocator that doesn't match the string's character type is no
+ longer allowed in C++20 mode.
+</para>
+
</section>
</section>
--
2.40.1
reply other threads:[~2023-06-01 15:07 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230601150711.257954-1-jwakely@redhat.com \
--to=jwakely@redhat.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).