File tree Expand file tree Collapse file tree 3 files changed +25
-16
lines changed Expand file tree Collapse file tree 3 files changed +25
-16
lines changed Original file line number Diff line number Diff line change 107
107
// changed according to the global C locale
108
108
\end {codeblock }
109
109
110
+ \rSec 2[diff.cpp23.depr]{\ref {depr }: compatibility features}
111
+
112
+ \nodiffref
113
+ \change
114
+ Remove the type alias \tcode {allocator<T>::is_always_equal}.
115
+ \rationale
116
+ Non-empty allocator classes derived from \tcode {allocator} needed to explicitly
117
+ define an \tcode {is_always_equal} member type so that \tcode {allocator_traits}
118
+ would not use the one from the allocator base class.
119
+ \effect
120
+ It is simpler to correctly define an allocator class with an allocator base
121
+ class. For example:
122
+ \begin {codeblock }
123
+ template <class T>
124
+ struct MyAlloc : allocator<T> {
125
+ int tag;
126
+ };
127
+
128
+ static_assert(!allocator_traits<MyAlloc<int>>::is_always_equal); // Error in \CppXXIII {},
129
+ // OK in \CppXXVI {}
130
+ \end {codeblock }
131
+
110
132
\rSec 2[diff.cpp23.containers]{\ref {containers }: containers library}
111
133
112
134
\diffref {span.overview }
Original file line number Diff line number Diff line change 1383
1383
is the same as the value of the \libheader {cerrno} macro
1384
1384
shown in the above synopsis.
1385
1385
1386
- \rSec 1[depr.default.allocator]{The default allocator}
1387
-
1388
- \pnum
1389
- The following member is defined in addition to those
1390
- specified in \ref {default.allocator }:
1391
-
1392
- \indexlibrarymember {is_always_equal}{allocator}%
1393
- \begin {codeblock }
1394
- namespace std {
1395
- template<class T> class allocator {
1396
- public:
1397
- using is_always_equal = true_type;
1398
- };
1399
- }
1400
- \end {codeblock }
1401
-
1402
1386
\rSec 1[depr.mem.poly.allocator.mem]{Deprecated \tcode {polymorphic_allocator} member function}
1403
1387
1404
1388
\pnum
Original file line number Diff line number Diff line change 22
22
% P2864R2 Remove deprecated arithmetic conversions
23
23
\removedxref {depr.arith.conv.enum }
24
24
25
+ % P2870R3 Remove deprecated typedef from `std::allocator`
26
+ \removedxref {depr.default.allocator }
27
+
25
28
% P2874R2 Mandating Annex D
26
29
\removedxref {depr.res.on.required }
27
30
You can’t perform that action at this time.
0 commit comments