public inbox for libstdc++-cvs@sourceware.org
help / color / mirror / Atom feed
From: Jonathan Wakely <redi@gcc.gnu.org>
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r11-10871] libstdc++: Document removal of implicit allocator rebinding extensions
Date: Fri, 23 Jun 2023 13:00:17 +0000 (GMT)	[thread overview]
Message-ID: <20230623130017.B8BEB3858CD1@sourceware.org> (raw)

https://gcc.gnu.org/g:c0bc9846d9e38bbeeef6723b3c44d5977e95b827

commit r11-10871-gc0bc9846d9e38bbeeef6723b3c44d5977e95b827
Author: Jonathan Wakely <jwakely@redhat.com>
Date:   Mon May 15 21:41:56 2023 +0100

    libstdc++: Document removal of implicit allocator rebinding extensions
    
    Traditionally libstdc++ allowed containers 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.
    
    (cherry picked from commit 8cbaf679a3c1875c5475bd1cb0fb86fb9d03b2d4)

Diff:
---
 libstdc++-v3/doc/html/manual/api.html     |  9 +++++++++
 libstdc++-v3/doc/xml/manual/evolution.xml | 13 +++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html
index 70889a583f9..617c457e155 100644
--- a/libstdc++-v3/doc/html/manual/api.html
+++ b/libstdc++-v3/doc/html/manual/api.html
@@ -368,6 +368,11 @@ now defaults to zero.
   For the non-default <code class="option">--enable-symvers=gnu-versioned-namespace</code>
   configuration, the shared library SONAME has been changed to
   <code class="filename">libstdc++.so.8</code>.
+</p><p>
+  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 (<code class="option">-std=c++NN</code>) modes, only in
+  <code class="option">-std=gnu++NN</code> modes.
 </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_91"></a><code class="constant">9</code></h3></div></div></div><p>
   C++17 header
   <code class="filename">&lt;memory_resource&gt;</code>
@@ -423,6 +428,10 @@ now defaults to zero.
   and
   <code class="filename">&lt;stop_token&gt;</code>
   added.
+</p><p>
+  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 <code class="option">-std=gnu++20</code> mode.
 </p></div><div class="section"><div class="titlepage"><div><div><h3 class="title"><a id="api.rel_111"></a><code class="constant">11</code></h3></div></div></div><p>
   The <code class="option">--enable-cheaders=c_std</code> configuration
   was deprecated.
diff --git a/libstdc++-v3/doc/xml/manual/evolution.xml b/libstdc++-v3/doc/xml/manual/evolution.xml
index 55b8903baff..6ae6b5aec19 100644
--- a/libstdc++-v3/doc/xml/manual/evolution.xml
+++ b/libstdc++-v3/doc/xml/manual/evolution.xml
@@ -911,6 +911,13 @@ now defaults to zero.
   <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>
@@ -994,6 +1001,12 @@ now defaults to zero.
   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>

                 reply	other threads:[~2023-06-23 13:00 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=20230623130017.B8BEB3858CD1@sourceware.org \
    --to=redi@gcc.gnu.org \
    --cc=gcc-cvs@gcc.gnu.org \
    --cc=libstdc++-cvs@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).