From 8cbaf679a3c1875c5475bd1cb0fb86fb9d03b2d4 Mon Sep 17 00:00:00 2001 From: Jonathan Wakely Date: Mon, 15 May 2023 21:41:56 +0100 Subject: [PATCH] libstdc++: Document removal of implicit allocator rebinding extensions 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/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html index 7d5f754fb38..27c0d090e5d 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. @@ -479,4 +488,8 @@ Tunables <variable>glibcxx.eh_pool.obj_count</

14

Deprecate the non-standard overload that allows std::setfill to be used with std::basic_istream. +

+ The extension allowing std::basic_string to be instantiated + with an allocator that doesn't match the string's character type is no + longer allowed in C++20 mode.

\ No newline at end of file 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 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. + +
<constant>9</constant> @@ -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. + +
<constant>11</constant> @@ -1096,6 +1109,12 @@ Deprecate the non-standard overload that allows std::setfill to be used with std::basic_istream. + + The extension allowing std::basic_string to be instantiated + with an allocator that doesn't match the string's character type is no + longer allowed in C++20 mode. + +