[diff.cpp23.depr] # Annex C (informative) Compatibility [[diff]](./#diff) ## C.1 C++ and ISO C++ 2023 [[diff.cpp23]](diff.cpp23#depr) ### C.1.11 [[depr]](depr "Annex D (normative) Compatibility features"): compatibility features [diff.cpp23.depr] [1](#1) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L358) **Change:** Remove the type alias allocator​::​is_always_equal[.](#1.sentence-1) **Rationale:** Non-empty allocator classes derived from allocator needed to explicitly define an is_always_equal member type so that allocator_traits would not use the one from the allocator base class[.](#1.sentence-2) **Effect on original feature:** It is simpler to correctly define an allocator class with an allocator base class[.](#1.sentence-3) [*Example [1](#example-1)*: template struct MyAlloc : allocator {int tag;}; static_assert(!allocator_traits>::is_always_equal); // Error in C++ 2023,// OK in C++ 2026 — *end example*] [2](#2) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L380) **Change:** Removal of atomic access API for shared_ptr objects[.](#2.sentence-1) **Rationale:** The old behavior was brittle[.](#2.sentence-2) shared_ptr objects using the old API were not protected by the type system, and certain interactions with code not using this API would, in some cases, silently produce undefined behavior[.](#2.sentence-3) A complete type-safe replacement is provided in the form of atomic>[.](#2.sentence-4) **Effect on original feature:** A valid C++ 2023 program that relies on the presence of the removed functions may fail to compile[.](#2.sentence-5) [3](#3) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L392) **Change:** Remove the basic_string​::​reserve() overload with no parameters[.](#3.sentence-1) **Rationale:** The overload of reserve with no parameters is redundant[.](#3.sentence-2) The shrink_to_fit member function can be used instead[.](#3.sentence-3) **Effect on original feature:** A valid C++ 2023 program that calls reserve() on a basic_string object may fail to compile[.](#3.sentence-4) The old functionality can be achieved by calling shrink_to_fit() instead, or the function call can be safely eliminated with no side effects[.](#3.sentence-5) [4](#4) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L404) **Change:** Remove header and all its contents[.](#4.sentence-1) **Rationale:** The header has been deprecated for the previous three editions of this document and no longer implements the current Unicode standard, supporting only the obsolete UCS-2 encoding[.](#4.sentence-2) Ongoing support is at implementer's discretion, exercising freedoms granted by [[zombie.names]](zombie.names "16.4.5.3.2 Zombie names")[.](#4.sentence-3) **Effect on original feature:** A valid C++ 2023 program #include-ing the header or importing the header unit may fail to compile[.](#4.sentence-4) Code that uses any of the following names by importing the standard library modules may fail to compile: - [(4.1)](#4.1) codecvt_mode, - [(4.2)](#4.2) codecvt_utf16, - [(4.3)](#4.3) codecvt_utf8, - [(4.4)](#4.4) codecvt_utf8_utf16, - [(4.5)](#4.5) consume_header, - [(4.6)](#4.6) generate_header, and - [(4.7)](#4.7) little_endian[.](#4.sentence-5) [5](#5) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L427) **Change:** Remove header and all its contents[.](#5.sentence-1) **Rationale:** The header has been deprecated since the original C++ standard; the[](span.streams.overview#header:%3cspanstream%3e "31.9.1 Overview [span.streams.overview]") header provides an updated, safer facility[.](#5.sentence-2) Ongoing support is at implementer's discretion, exercising freedoms granted by [[zombie.names]](zombie.names "16.4.5.3.2 Zombie names")[.](#5.sentence-3) **Effect on original feature:** A valid C++ 2023 program #include-ing the header or importing the header unit may become ill-formed[.](#5.sentence-4) Code that uses any of the following classes by importing one of the standard library modules may become ill-formed: - [(5.1)](#5.1) istrstream - [(5.2)](#5.2) ostrstream - [(5.3)](#5.3) strstream - [(5.4)](#5.4) strstreambuf [6](#6) [#](http://github.com/Eelis/draft/tree/9adde4bc1c62ec234483e63ea3b70a59724c745a/source/compatibility.tex#L446) **Change:** Remove convenience interfaces wstring_convert andwbuffer_convert[.](#6.sentence-1) **Rationale:** These features were underspecified with no clear error reporting mechanism and were deprecated for the last three editions of this document[.](#6.sentence-2) Ongoing support is at implementer's discretion, exercising freedoms granted by [[zombie.names]](zombie.names "16.4.5.3.2 Zombie names")[.](#6.sentence-3) **Effect on original feature:** A valid C++ 2023 program using these interfaces may become ill-formed[.](#6.sentence-4)