From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: by sourceware.org (Postfix, from userid 2181)
id 8CDE03858CD1; Fri, 23 Jun 2023 12:59:44 +0000 (GMT)
DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8CDE03858CD1
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org;
s=default; t=1687525184;
bh=I6CDOyT5znPNeHPTGoQ4jfR8BGz14QtOEwz+3A54x5A=;
h=From:To:Subject:Date:From;
b=yavxh6DJ1nMIlh+AapmvQcYduk8WE+Fv5vjJmdjyJrb4epoParvTBD53BYd+TX18x
FEJl6Bdb9zHOlkILsaaVbDUWrpQJoHVMkdPN9c/o+cs9C+k9jAav3FKzIgYDv94E65
BBVw7GEVSS3sjBW/NTv2dQgNitCGnotCvTzm3I3U=
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="utf-8"
From: Jonathan Wakely
To: gcc-cvs@gcc.gnu.org, libstdc++-cvs@gcc.gnu.org
Subject: [gcc r12-9724] libstdc++: Document removal of implicit allocator
rebinding extensions
X-Act-Checkin: gcc
X-Git-Author: Jonathan Wakely
X-Git-Refname: refs/heads/releases/gcc-12
X-Git-Oldrev: c409f2a1cc5d5bffe2fb93454924ae402c57f8f6
X-Git-Newrev: 72ceed08d45137b0f1a9b4ea8ca533aa6489bc39
Message-Id: <20230623125944.8CDE03858CD1@sourceware.org>
Date: Fri, 23 Jun 2023 12:59:44 +0000 (GMT)
List-Id:
https://gcc.gnu.org/g:72ceed08d45137b0f1a9b4ea8ca533aa6489bc39
commit r12-9724-g72ceed08d45137b0f1a9b4ea8ca533aa6489bc39
Author: Jonathan Wakely
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 604380e0136..fd6420a9e2c 100644
--- a/libstdc++-v3/doc/html/manual/api.html
+++ b/libstdc++-v3/doc/html/manual/api.html
@@ -370,6 +370,11 @@ Calling a std::bind result as volatile was deprecated
For the non-default --enable-symvers=gnu-versioned-namespace
configuration, the shared library SONAME has been changed to
libstdc++.so.8.
+
+ 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 (-std=c++NN) modes, only in
+ -std=gnu++NN modes.
9
C++17 header
<memory_resource>
@@ -425,6 +430,10 @@ Calling a std::bind result as volatile was deprecated
and
<stop_token>
added.
+
+ 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 -std=gnu++20 mode.
11
The --enable-cheaders=c_std configuration
was deprecated.
diff --git a/libstdc++-v3/doc/xml/manual/evolution.xml b/libstdc++-v3/doc/xml/manual/evolution.xml
index 82936189179..9259c43fb19 100644
--- a/libstdc++-v3/doc/xml/manual/evolution.xml
+++ b/libstdc++-v3/doc/xml/manual/evolution.xml
@@ -915,6 +915,13 @@ Calling a std::bind result as volatile was deprecated for C++17.
libstdc++.so.8.
+
+ 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 () modes, only in
+ modes.
+
+
9
@@ -998,6 +1005,12 @@ Calling a std::bind result as volatile was deprecated for C++17.
added.
+
+ 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 mode.
+
+
11