From: Jonathan Wakely Date: Mon, 15 May 2023 20:41:56 +0000 (+0100) Subject: libstdc++: Document removal of implicit allocator rebinding extensions X-Git-Tag: releases/gcc-10.5.0~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=291df257830e4ff877c716cfe6430c03677d9606;p=thirdparty%2Fgcc.git 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 --git a/libstdc++-v3/doc/html/manual/api.html b/libstdc++-v3/doc/html/manual/api.html index 359dcc4f2139..8f0b17e858a7 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 --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> @@ -423,4 +428,8 @@ now defaults to zero. 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.

\ 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 0394f7efb7b1..f7bf8bb2b713 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. 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> @@ -994,6 +1001,12 @@ now defaults to zero. 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. + +