From Jason Turner

[diff.cpp23.depr]

Diff to HTML by rtfpessoa

Files changed (1) hide show
  1. tmp/tmp02amw2i6/{from.md → to.md} +80 -0
tmp/tmp02amw2i6/{from.md → to.md} RENAMED
@@ -0,0 +1,80 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ### [[depr]]: compatibility features <a id="diff.cpp23.depr">[[diff.cpp23.depr]]</a>
2
+
3
+ **Change:** Remove the type alias `allocator<T>::is_always_equal`.
4
+ **Rationale:** Non-empty allocator classes derived from `allocator`
5
+ needed to explicitly define an `is_always_equal` member type so that
6
+ `allocator_traits` would not use the one from the allocator base class.
7
+ **Effect on original feature:** It is simpler to correctly define an
8
+ allocator class with an allocator base class.
9
+
10
+ [*Example 1*:
11
+
12
+ ``` cpp
13
+ template <class T>
14
+ struct MyAlloc : allocator<T> {
15
+ int tag;
16
+ };
17
+
18
+ static_assert(!allocator_traits<MyAlloc<int>>::is_always_equal); // Error in C++23{},
19
+ // OK in C++26{}
20
+ ```
21
+
22
+ — *end example*]
23
+
24
+ **Change:** Removal of atomic access API for `shared_ptr` objects.
25
+ **Rationale:** The old behavior was brittle. `shared_ptr` objects using
26
+ the old API were not protected by the type system, and certain
27
+ interactions with code not using this API would, in some cases, silently
28
+ produce undefined behavior. A complete type-safe replacement is provided
29
+ in the form of `atomic<shared_ptr<T>>`. **Effect on original feature:**
30
+ A valid C++23 program that relies on the presence of the removed
31
+ functions may fail to compile.
32
+
33
+ **Change:** Remove the `basic_string::reserve()` overload with no
34
+ parameters. **Rationale:** The overload of `reserve` with no parameters
35
+ is redundant. The `shrink_to_fit` member function can be used instead.
36
+ **Effect on original feature:** A valid C++23 program that calls
37
+ `reserve()` on a `basic_string` object may fail to compile. The old
38
+ functionality can be achieved by calling `shrink_to_fit()` instead, or
39
+ the function call can be safely eliminated with no side effects.
40
+
41
+ **Change:** Remove header `<codecvt>` and all its contents.
42
+ **Rationale:** The header has been deprecated for the previous three
43
+ editions of this document and no longer implements the current Unicode
44
+ standard, supporting only the obsolete UCS-2 encoding. Ongoing support
45
+ is at implementer’s discretion, exercising freedoms granted by
46
+ [[zombie.names]]. **Effect on original feature:** A valid C++23 program
47
+ `#include`-ing the header or importing the header unit may fail to
48
+ compile. Code that uses any of the following names by importing the
49
+ standard library modules may fail to compile:
50
+
51
+ - `codecvt_mode`,
52
+ - `codecvt_utf16`,
53
+ - `codecvt_utf8`,
54
+ - `codecvt_utf8_utf16`,
55
+ - `consume_header`,
56
+ - `generate_header`, and
57
+ - `little_endian`.
58
+
59
+ **Change:** Remove header `<strstream>` and all its contents.
60
+ **Rationale:** The header has been deprecated since the original C++
61
+ standard; the `<spanstream>` header provides an updated, safer facility.
62
+ Ongoing support is at implementer’s discretion, exercising freedoms
63
+ granted by [[zombie.names]]. **Effect on original feature:** A valid
64
+ C++23 program `#include`-ing the header or importing the header unit may
65
+ become ill-formed. Code that uses any of the following classes by
66
+ importing one of the standard library modules may become ill-formed:
67
+
68
+ - `istrstream`
69
+ - `ostrstream`
70
+ - `strstream`
71
+ - `strstreambuf`
72
+
73
+ **Change:** Remove convenience interfaces `wstring_convert` and
74
+ `wbuffer_convert`. **Rationale:** These features were underspecified
75
+ with no clear error reporting mechanism and were deprecated for the last
76
+ three editions of this document. Ongoing support is at implementer’s
77
+ discretion, exercising freedoms granted by [[zombie.names]]. **Effect on
78
+ original feature:** A valid C++23 program using these interfaces may
79
+ become ill-formed.
80
+