]> gcc.gnu.org Git - gcc.git/blame - libstdc++-v3/ChangeLog
libstdc++: Fix use of inaccessible private member in split_view (PR93936)
[gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
fd335985
PP
12020-02-26 Patrick Palka <ppalka@redhat.com>
2
8ce13842
PP
3 PR libstdc++/93936
4 * include/std/ranges (split_view::_InnerIter::operator==): Compare
5 the operands' _M_i rather than their _M_i.current().
6 * testsuite/std/ranges/adaptors/split.cc: Augment test.
7
fd335985
PP
8 P1645R1 constexpr for <numeric> algorithms
9 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
10 partial_sum, adjacent_difference): Make conditionally constexpr for
11 C++20.
12 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
13 test macro.
14 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
15 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
16 constexpr for C++20.
17 * include/std/version (__cpp_lib_constexpr_numeric): Define.
18 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
19 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
20 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
21 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
22 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
23 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
24 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
25 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
26 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
27 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
28 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
29
8017d95c
JW
302020-02-26 Jonathan Wakely <jwakely@redhat.com>
31
113f0a63
JW
32 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
33 variables in smaller scope and avoid calling ranges::distance when we
34 know they are pointers. Remove statically-unreachable use of
35 __builtin_unreachable().
36 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
37 Define inline.
38
8017d95c
JW
39 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
40 alias.
41 (__detail::__maybe_const_t): Likewise.
42 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
43 (transform_view, take_view, take_while_view, elements_view): Use
44 __maybe_const_t.
45 (join_view, split_view): Use both.
46
7f0f1083
PP
472020-02-25 Patrick Palka <ppalka@redhat.com>
48
76a8c0f6
PP
49 LWG 3397 basic_istream_view::iterator should not provide
50 iterator_category
51 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
52 Rename to ...
53 (basic_istream_view:_Iterator::iterator_concept): ... this.
54 * testsuite/std/ranges/istream_view.cc: Augment test.
55
ec15da7c
PP
56 LWG 3325 Constrain return type of transformation function for
57 transform_view
58 * include/std/ranges (transform_view): Constrain the return type of the
59 transformation function as per LWG 3325.
60 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
61
55c4b3f4
PP
62 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
63 * include/std/ranges (join_view::_Iterator::operator--): Require that
64 range_reference_t<_Base> models common_range.
65 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
66
510bd1c1
PP
67 LWG 3301 transform_view::_Iterator has incorrect iterator_category
68 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
69 determination of iterator_category as per LWG 3301.
70 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
71
7f0f1083
PP
72 LWG 3292 iota_view is under-constrained
73 * include/std/ranges (iota_view): Require that _Winc models semiregular
74 as per LWG 3292.
75 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
76
dfb93d05 772020-02-25 Jonathan Wakely <jwakely@redhat.com>
5b904f17 78
490350a1
JW
79 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
80 during constant evaluation. Call __builtin_memmove directly instead of
81 __memmove.
82 (__copy_or_move_backward): Likewise.
83 * include/bits/stl_algobase.h (__memmove): Remove.
84 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
85 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
86 Use __builtin_memmove directly instead of __memmove.
87 (__copy_move_a2): Do not use memmove during constant evaluation.
88 (__copy_move_backward_a2): Use _IsMove constant to select correct
89 __copy_move_backward specialization.
90 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
91 begin turned into moves during constant evaluation.
92
6de946e6
JW
93 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
94 previous commit.
95
5b904f17
JW
96 PR libstdc++/93872
97 * include/bits/stl_algobase.h (__memmove): Cast away const before
98 doing move assignment.
99 * testsuite/25_algorithms/move/93872.cc: New test.
100 * testsuite/25_algorithms/move_backward/93872.cc: New test.
101
c5eab4ed
PP
1022020-02-24 Patrick Palka <ppalka@redhat.com>
103
85c143d0
PP
104 PR libstdc++/93884
105 * include/bits/ranges_algobase.h (__copy_or_move,
106 __copy_or_move_backward): Don't inspect the iter_value_t of the output
107 iterator, instead inspect its iterator_traits directly.
108 * include/bits/stl_iterator.h (back_insert_iterator::container):
109 Conditionally initialize.
110 (back_insert_iterator::difference_type): Conditionally define.
111 (back_insert_iterator::back_insert_iterator): Conditionally define this
112 default constructor.
113 (front_insert_iterator::container): Conditionally initialize.
114 (front_insert_iterator::difference_type): Conditionally define.
115 (front_insert_iterator::front_insert_iterator): Conditionally define
116 this default constructor.
117 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
118 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
119
c5eab4ed
PP
120 P0769R2 Add shift to <algorithm>
121 * include/bits/ranges_algo.h (shift_left, shift_right): New.
122 * testsuite/25_algorithms/shift_left/1.cc: New test.
123 * testsuite/25_algorithms/shift_right/1.cc: New test.
124
3841739c
JW
1252020-02-24 Jonathan Wakely <jwakely@redhat.com>
126
8566286e
JW
127 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
128 Make noexcept-specifier conditional.
129 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
130 noexcept-specifier.
131
120e8734
JW
132 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
133 Add constructor.
134 (operator==(istream_iterator, default_sentinel_t)): Add operator.
135 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
136 * include/bits/streambuf_iterator.h
137 (istreambuf_iterator(default_sentinel_t)): Add constructor.
138 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
139 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
140 New test.
141 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
142 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
143 New test.
144 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
145
3841739c
JW
146 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
147 (ranges::enable_view): Simplify (LWG 3326).
148 * include/bits/range_access.h (ranges::enable_view): Declare.
149 * include/bits/regex.h (__enable_view_impl): Remove partial
150 specialization.
151 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
152 * include/bits/stl_set.h (__enable_view_impl): Likewise.
153 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
154 * include/debug/multiset.h (__enable_view_impl): Likewise.
155 * include/debug/set.h (__enable_view_impl): Likewise.
156 * include/debug/unordered_set (__enable_view_impl): Likewise.
157 * include/experimental/string_view (ranges::enable_view): Define
158 partial specialization.
159 * include/std/span (ranges::enable_view): Likewise.
160 * include/std/string_view (ranges::enable_view): Likewise.
161 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
162
9e589880
JW
1632020-02-21 Jonathan Wakely <jwakely@redhat.com>
164
165 * include/std/optional (operator<=>(optional<T>, optional<U>))
166 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
167 Define for C++20.
168 * include/std/tuple (__tuple_cmp): New helper function for <=>.
169 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
170 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
171 (operator<=>(monostate, monostate)): Define for C++20.
172 * testsuite/20_util/optional/relops/three_way.cc: New test.
173 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
174 * testsuite/20_util/variant/89851.cc: Move to ...
175 * testsuite/20_util/variant/relops/89851.cc: ... here.
176 * testsuite/20_util/variant/90008.cc: Move to ...
177 * testsuite/20_util/variant/relops/90008.cc: ... here.
178 * testsuite/20_util/variant/relops/three_way.cc: New test.
179
5586e506
PP
1802020-02-20 Patrick Palka <ppalka@redhat.com>
181
6e63438a
PP
182 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
183 function.
184 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
185 __maybe_refwrap to capture lvalue references by reference, and then use
186 unwrap_reference_t to forward the by-reference captures as references.
187 * testsuite/std/ranges/adaptors/split.cc: Augment test.
188 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
189
5586e506
PP
190 * include/std/ranges (iota_view): Forward declare _Sentinel.
191 (iota_view::_Iterator): Befriend _Sentinel.
192 (iota_view::_Sentinel::_M_equal): New member function.
193 (iota_view::_Sentinel::operator==): Use it.
194 (views::_Iota::operator()): Forward __f using the correct type.
195 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
196 with integers of different signedness, to appease iota_view's deduction
197 guide.
198 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
199
c7b591f3
JW
2002020-02-20 Jonathan Wakely <jwakely@redhat.com>
201
e817c23f
JW
202 * include/bits/range_access.h (ranges::begin): Reject array of
203 incomplete type.
204 (ranges::end, ranges::size): Require arrays to be bounded.
205 (ranges::data): Require lvalue or borrowed_range.
206 (ranges::iterator_t): Remove constraint.
207 * testsuite/std/ranges/access/begin.cc: Do not check array of
208 incomplete type.
209 * testsuite/std/ranges/access/begin_neg.cc: New test.
210 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
211 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
212 * testsuite/std/ranges/access/ssize.cc: Do not check array of
213 incomplete type.
214
4be779f5
JW
215 * include/std/system_error (error_category::operator<=>)
216 (operator<=>(const error_code&, const error_code&))
217 (operator<=>(const error_condition&, const error_condition&)): Define
218 for C++20.
219 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
220 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
221 test.
222 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
223 incorrect comment.
224 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
225 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
226 incorrect comment.
227 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
228 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
229 incorrect comment.
230 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
231 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
232 Remove incorrect comment.
233 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
234 test.
235
20fa41e6
JW
236 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
237
c7b591f3
JW
238 * include/std/thread (thread::id::operator<=>): Define for C++20.
239 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
240 functions in namespace std.
241 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
242
38c7b74d
PP
2432020-02-19 Patrick Palka <ppalka@redhat.com>
244
245 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
246 null terminator of the underlying string as part of the test_range.
247 (main): Call test03.
248
a45fb21a
JW
2492020-02-19 Jonathan Wakely <jwakely@redhat.com>
250
1b425f3a
JW
251 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
252 requirement (LWG 3385).
253 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
254 expected declaration.
255
7433536b
JW
256 * include/std/ranges (take_while_view, drop_view, drop_while_view)
257 (elements_view:_Iterator): Initialize data members (LWG 3364).
258
256f67aa
JW
259 * libsupc++/compare (three_way_comparable): Remove always-false check
260 that should have been removed with weak_equality (P1959R0).
261 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
262
0294dc5f
JW
263 * include/std/concepts (__detail::__partially_ordered_with): Move here
264 from <compare>.
265 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
266 to simplify definition (LWG 3331).
267 * libsupc++/compare (__detail::__partially_ordered_with): Move to
268 <concepts>.
269
241ed965
JW
270 * include/std/concepts (totally_ordered_with): Remove redundant
271 requirement (LWG 3329).
272
77f5310f
JW
273 * include/std/ranges (__detail::__convertible_to_non_slicing): New
274 helper concept.
275 (__detail::__pair_like_convertible_to): Remove.
276 (__detail::__pair_like_convertible_from): Add requirements for
277 non-slicing conversions.
278 (subrange): Constrain constructors with __convertible_to_non_slicing.
279 Remove constructors from pair-like types. Add new deduction guide.
280 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
281
59aa9e57
JW
282 * include/bits/iterator_concepts.h (iter_move): Add declaration to
283 prevent unqualified lookup finding a suitable declaration (LWG 3247).
284
e89100ef
JW
285 * include/std/memory_resource (polymorphic_allocator::allocate)
286 (polymorphic_allocator::allocate_object): Change type of exception to
287 bad_array_new_length (LWG 3237).
288 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
289
bb54e0b8
JW
290 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
291 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
292 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
293 * testsuite/20_util/unwrap_reference/3.cc: New test.
294
5f031f97
JW
295 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
296 type during overload resolution, use static assert instead (LWG 3200).
297 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
298 incomplete type.
299 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
300
66ae31eb
JW
301 * include/std/span (span(T (&)[N])): Use non-deduced context to
302 prevent first parameter from interfering with class template argument
303 deduction (LWG 3369).
304 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
305 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
306 rvalues.
307
247f410b
JW
308 * include/std/span (span::const_iterator, span::const_reverse_iterator)
309 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
310 Remove (LWG 3320).
311 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
312 and cend.
313 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
314 Likewise.
315 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
316 constrained.cc: Likewise.
317 * testsuite/20_util/specialized_algorithms/
318 uninitialized_default_construct/constrained.cc: Likewise.
319 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
320 constrained.cc: Likewise.
321 * testsuite/20_util/specialized_algorithms/uninitialized_move/
322 constrained.cc: Likewise.
323 * testsuite/20_util/specialized_algorithms/
324 uninitialized_value_construct/constrained.cc: Likewise.
325
aca60ecf
JW
326 * include/bits/range_access.h (range_size_t): Define alias template.
327 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
328 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
329
4cc3b275
JW
330 * include/std/ranges (filter_view, transform_view, take_view)
331 (join_view, split_view, reverse_view): Remove commented-out converting
332 constructors (LWG 3280).
333
5f3641d0
JW
334 * include/std/memory (uninitialized_construct_using_allocator): Use
335 std::construct_at (LWG 3321).
336
020a03ee
JW
337 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
338 (polymorphic_allocator::allocate_object)
339 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
340
15411a64
JW
341 LWG 3379. "safe" in several library names is misleading
342 * include/bits/range_access.h (enable_safe_range): Rename to
343 enable_borrowed_range.
344 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
345 (safe_range): Rename to borrowed_range.
346 * include/bits/ranges_algo.h: Adjust to use new names.
347 * include/bits/ranges_algobase.h: Likewise.
348 * include/bits/ranges_uninitialized.h: Likewise.
349 * include/std/ranges: Likewise.
350 (safe_iterator_t): Rename to borrowed_iterator_t.
351 (safe_subrange_t): Rename to borrowed_subrange_t.
352 * include/std/span: Adjust to use new names.
353 * include/std/string_view: Likewise.
354 * include/experimental/string_view: Likewise.
355 * testsuite/std/ranges/access/begin.cc: Likewise.
356 * testsuite/std/ranges/access/cbegin.cc: Likewise.
357 * testsuite/std/ranges/access/cdata.cc: Likewise.
358 * testsuite/std/ranges/access/cend.cc: Likewise.
359 * testsuite/std/ranges/access/crbegin.cc: Likewise.
360 * testsuite/std/ranges/access/crend.cc: Likewise.
361 * testsuite/std/ranges/access/data.cc: Likewise.
362 * testsuite/std/ranges/access/end.cc: Likewise.
363 * testsuite/std/ranges/access/rbegin.cc: Likewise.
364 * testsuite/std/ranges/access/rend.cc: Likewise.
365 * testsuite/std/ranges/safe_range.cc: Likewise.
366 * testsuite/std/ranges/safe_range_types.cc: Likewise.
367 * testsuite/util/testsuite_iterators.h: Likewise.
368
fa89adaa
JW
369 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
370 (tuple_element<1, const subrange<I, S, K>>): Add partial
371 specializations (LWG 3398).
372 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
373
a45fb21a
JW
374 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
375 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
376 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
377
242b4fb7
PP
3782020-02-18 Patrick Palka <ppalka@redhat.com>
379
380 P1983R0 Wording for GB301, US296, US292, US291, and US283
381 * include/std/ranges (filter_view::pred): New member function.
382 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
383 P1983R0 fixes the highlighted issue in the same way.
384 (join_view::_Iterator<_Const>): Add friend
385 join_view::_Iterator<!_Const>.
386 (join_view::_M_inner): Remove mutable specifier, effectively reverting
387 the proposed wording changes of P3278.
388 (join_view::begin): Refine the condition for when to return a const
389 iterator.
390 (split_view::_OuterIter::_OuterIter): Adjust constraints.
391 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
392 exists and works.
393
f5b4dc38
JW
3942020-02-18 Jonathan Wakely <jwakely@redhat.com>
395
a5b213dd
JW
396 PR libstdc++/93818
397 * include/std/ranges (_RangeAdaptor): Add deduction guide.
398 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
399 iterator_t<_Vp>.
400 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
401 (transform_view::_Iterator): Add alias _Base_iter and use in place of
402 iterator_t<_Base>.
403 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
404 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
405 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
406 (split_view::_InnerIter::_S_iter_cat()): Likewise.
407
ce7b39d0
JW
408 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
409 assumption that long is wider than int.
410 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
411 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
412 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
413 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
414
9b8e2dea
JW
415 P1976R2 Fixed-size span construction from dynamic range
416 * include/std/span (__cpp_lib_span): Update value.
417 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
418 assertion.
419 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
420 constraints.
421 (span::first<Count>(), span::last<Count>()): Use explicit type in
422 return statement.
423 (as_bytes, as_writable_bytes): Likewise.
424 * include/std/version (__cpp_lib_span): Update value.
425 * testsuite/23_containers/span/1.cc: Check new value.
426 * testsuite/23_containers/span/2.cc: Check new value.
427 * testsuite/23_containers/span/explicit.cc: New test.
428
d6c9e372
JW
429 * include/std/span (span::__is_compatible_array): Simplify alias
430 template by using requires-clause.
431 (span::__is_compatible_ref): New alias template for constraining
432 constructors.
433 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
434 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
435 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
436 redundant parentheses.
437 (span(R&&)): Add missing constraints.
438
f09f3242
JW
439 * include/std/span (span): Reorder members and rename template
440 parameters to match declarations in the C++2a working paper.
441
f5b4dc38
JW
442 P2116R0 Remove tuple-like protocol support from fixed-extent span
443 * include/std/span (get, tuple_size, tuple_element): Remove.
444 * testsuite/23_containers/span/everything.cc: Remove checks for
445 tuple-like API.
446 * testsuite/23_containers/span/get_neg.cc: Remove.
447 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
448 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
449 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
450
f3169941
PP
4512020-02-17 Patrick Palka <ppalka@redhat.com>
452
aa667c3f
PP
453 P2106R0 Alternative wording for GB315 and GB316
454 * include/bits/ranges_algo.h (in_fun_result): New.
455 (for_each_result, for_each_n_result): Change into an alias of
456 in_fun_result.
457 (in_in_result): New.
458 (mismatch_result): Change into an alias of in_in_result.
459 (copy_if_result): Change into an alias of in_out_result.
460 (swap_ranges_result): Change into an alias of in_in_result.
461 (unary_transform_result): Change into an alias of in_out_result.
462 (in_in_out_result): New.
463 (binary_transform_result): Change into an alias of in_in_out_result.
464 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
465 remove_copy_result, unique_copy_result, reverse_copy_result,
466 rotate_copy_result, partial_sort_copy_result): Change into an alias of
467 in_out_result.
468 (in_out_out_result): New.
469 (partition_copy_result, merge_result): Change into an alias of
470 in_out_out_result.
471 (set_union_result, set_intersection_result): Change into an alias of
472 in_in_out_result.
473 (set_difference_result): Change into an alias of in_out_result.
474 (set_symmetric_difference): Change into an alias of in_in_out_result.
475 (min_max_result): New.
476 (minmax_result, minmax_element_result): Change into an alias of
477 min_max_result.
478 (in_found_result): New.
479 (next_permutation_result, prev_permutation_result): Change into an alias
480 of in_found_result.
481 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
482 Adjust following changes to next_permutation_result and
483 prev_permutation_result.
484 * include/bits/ranges_algobase.h (in_out_result): New.
485 (copy_result, move_result, move_backward_result, copy_backward_result,
486 copy_n_result): Change into an alias of in_out_result.
487 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
488 uninitialized_copy_n_result, uninitialized_move_result,
489 uninitialized_move_n_result): Likewise.
490 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
491 structured bindings.
492 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
493
f3169941
PP
494 P1243R4 Rangify new algorithms
495 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
496 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
497 * testsuite/25_algorithms/clamp/constrained.cc: New test.
498 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
499 * testsuite/25_algorithms/sample/constrained.cc: New test.
500
98cf2c26
JW
5012020-02-17 Jonathan Wakely <jwakely@redhat.com>
502
c5e1c1d3
JW
503 P1964R2 Wording for boolean-testable
504 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
505 (__adjacent_find_fn): Cast result of predicate to bool.
506 * include/std/concepts (__boolean): Remove.
507 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
508 new helper concepts.
509 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
510 (predicate): Use __boolean_testable instead of boolean.
511 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
512 Likewise.
513
7ab36231
JW
514 P1970R2 Consistency for size() functions: Add ranges::ssize
515 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
516 * testsuite/std/ranges/access/ssize.cc: New test.
517
9866abe3
JW
518 P1956R1 On the names of low-level bit manipulation functions
519 * include/bits/hashtable_policy.h: Update comment.
520 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
521 (ispow2, ceil2, floor2, log2p1): Likewise.
522 (__cpp_lib_int_pow2): Add feature test macro.
523 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
524 * include/std/memory (assume_aligned): Adjust use of ispow2.
525 * include/std/version (__cpp_lib_int_pow2): Add.
526 * libsupc++/new_opa.cc: Adjust use of __ispow2.
527 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
528 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
529 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
530 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
531 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
532 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
533 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
534 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
535 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
536 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
537 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
538 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
539
cfbc8fbb
JW
540 * include/std/charconv: Add comment.
541
9cd4eeef
JW
542 PR libstdc++/92546 (partial)
543 * include/bits/random.h (uniform_random_bit_generator): Move definition
544 to <bits/uniform_int_dist.h>.
545 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
546 of <bits/random.h>.
547 * include/bits/ranges_algobase.h: Do not include <cmath>.
548 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
549 Move here.
550 * include/std/ranges: Do not include <limits>.
551 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
552
c03b53da
JW
553 PR libstdc++/92546 (partial)
554 * include/Makefile.am: Add new header.
555 * include/Makefile.in: Regenerate.
556 * include/bits/int_limits.h: New header.
557 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
558 numeric_limits with __detail::__int_limits.
559 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
560 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
561 Likewise.
562 * include/std/charconv (__to_chars_8, __from_chars_binary)
563 (__from_chars_alpha_to_num, from_chars): Likewise.
564 * include/std/memory_resource (polymorphic_allocator::allocate)
565 (polymorphic_allocator::allocate_object): Likewise.
566 * include/std/string_view (basic_string_view::_S_compare): Likewise.
567 * include/std/utility (in_range): Likewise.
568 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
569 extra error about incomplete type __int_limits<bool>.
570 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
571 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
572 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
573 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
574 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
575 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
576 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
577 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
578 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
579 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
580 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
581 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
582
4540ef78
JW
583 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
584 value for partial_ordering::unordered.
585
d6dfa3da
JW
586 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
587 const-qualified expression variations.
588 * include/std/concepts (copyable): Likewise.
589
98cf2c26
JW
590 * include/std/type_traits (__is_standard_integer): New helper trait.
591 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
592 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
593 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
594 * testsuite/20_util/integer_comparisons/1.cc: New test.
595 * testsuite/20_util/integer_comparisons/2.cc: New test.
596 * testsuite/20_util/integer_comparisons/equal.cc: New test.
597 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
598 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
599 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
600 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
601 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
602 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
603 * testsuite/20_util/integer_comparisons/less.cc: New test.
604 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
605 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
606 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
607 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
608 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
609
93b8cfce
PP
6102020-02-16 Patrick Palka <ppalka@redhat.com>
611
612 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
613 Move code after an early exit constexpr if to under an else branch.
614 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
615
90b7eb65
PP
6162020-02-15 Patrick Palka <ppalka@redhat.com>
617
55992626
PP
618 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
619 * include/bits/ranges_algobase.h: Likewise.
620 * include/bits/ranges_uninitialized.h: Likewise.
621
b40c57bd
PP
622 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
623 binary_search, copy_if, count, count_if, equal_range, find, find_end,
624 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
625 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
626 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
627 lower_bound, make_heap, max, max_element, merge, min, min_element,
628 minmax, minmax_element, mismatch, next_permutation, none_of,
629 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
630 partition_point, pop_heap, prev_permutation, push_heap, remove,
631 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
632 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
633 search, search_n, set_difference, set_intersection,
634 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
635 stable_partition, stable_sort, swap_ranges, transform, unique,
636 unique_copy, upper_bound): Convert into function objects.
637 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
638 fill, move_backward, copy_backward): Likewise.
639 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
640 uninitialized_default_construct_n, uninitialized_value_construct,
641 uninitialized_value_construct_n, uninitialized_copy,
642 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
643 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
644 destroy, destroy_n): Likewise.
645
90b7eb65
PP
646 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
647 (ranges::find_end): ... here.
648 (ranges::__lexicographical_compare): Fold into ...
649 (ranges::lexicographical_compare): ... here.
650 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
651 (ranges::equal): ... here.
652
55b00d14
JW
6532020-02-15 Jonathan Wakely <jwakely@redhat.com>
654
655 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
656 * include/std/deque: Likewise.
657 * include/std/forward_list: Likewise.
658 * include/std/list: Likewise.
659 * include/std/string: Likewise.
660 * include/std/vector: Likewise.
661 * include/std/version: Likewise.
662 * testsuite/23_containers/deque/erasure.cc: Test for new value.
663 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
664 * testsuite/23_containers/list/erasure.cc: Likewise.
665 * testsuite/23_containers/map/erasure.cc: Likewise.
666 * testsuite/23_containers/set/erasure.cc: Likewise.
667 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
668 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
669 * testsuite/23_containers/vector/erasure.cc: Likewise.
670
5b1d5885
JW
6712020-02-15 Jonathan Wakely <jwakely@redhat.com>
672
673 * include/bits/random.h (uniform_random_bit_generator): Require min()
674 and max() to be constant expressions and min() to be less than max().
675 * testsuite/26_numerics/random/concept.cc: Check additional cases.
676 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
677
90fc7b3c
PP
6782020-02-13 Patrick Palka <ppalka@redhat.com>
679
613c932f
PP
680 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
681 * include/Makefile.in: Regenerate.
682 * include/bits/ranges_uninitialized.h: New header.
683 * include/std/memory: Include it.
684 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
685 test.
686 * .../uninitialized_copy/constrained.cc: New test.
687 * .../uninitialized_default_construct/constrained.cc: New test.
688 * .../uninitialized_fill/constrained.cc: New test.
689 * .../uninitialized_move/constrained.cc: New test.
690 * .../uninitialized_value_construct/constrained.cc: New test.
691
90fc7b3c
PP
692 * include/Makefile.am: Add bits/ranges_algobase.h
693 * include/Makefile.in: Regenerate.
694 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
695 existing #includes.
696 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
697 __detail::__is_move_iterator, copy_result, move_result,
698 __equal, equal, copy_result, move_result, move_backward_result,
699 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
700 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
701 fill): Split out into ...
702 * bits/range_algobase.h: ... this new header.
703
99bbab9f
PP
7042020-02-12 Patrick Palka <ppalka@redhat.com>
705
706 LWG 3389 and LWG 3390
707 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
708 constructing the move_iterator with __i.
709 (counted_iterator::counted_iterator): Use std::move when initializing
710 M_current with __i.
711 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
712 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
713
02ce382c
SL
7142020-02-12 Sandra Loosemore <sandra@codesourcery.com>
715
716 PR libstdc++/79193
717 PR libstdc++/88999
718
719 * configure: Regenerated.
720
b32a3f32
FD
7212020-02-12 François Dumont <fdumont@gcc.gnu.org>
722
723 * include/bits/hashtable.h
724 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
725 missing std namespace qualification to forward call.
726
dcda050e
JW
7272020-02-09 Jonathan Wakely <jwakely@redhat.com>
728
38660e87
JW
729 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
730 comment.
731 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
732
97a7c229
JW
733 * include/std/ranges: Fix non-ASCII characters in comment.
734
dcda050e
JW
735 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
736 equality comparison to be valid and return bool.
737 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
738 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
739 type with ambiguous conversion to fundamental types.
740 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
741
d222d8ec
JW
7422020-02-07 Jonathan Wakely <jwakely@redhat.com>
743
c8dd2446
JW
744 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
745 Use remove_cvref_t.
746 (readable_traits): Rename to indirectly_readable_traits.
747 (readable): Rename to indirectly_readable.
748 (writable): Rename to indirectly_writable.
749 (__detail::__iter_exchange_move): Do not use remove_reference_t.
750 (indirectly_swappable): Adjust requires expression parameter types.
751 expression.
752 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
753 (ranges::replace_if, ranges::generate_n, ranges::generate)
754 (ranges::remove): Use new name for writable.
755 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
756 Use new name for readable.
757 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
758 new name for readable_traits.
759 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
760 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
761 new definition of indirectly_readable.
762
d222d8ec
JW
763 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
764 to take parameters of common_iterator, instead of the common_iterator
765 type itself. Fix argument for __common_iter_has_arrow constraint.
766 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
767
572992c8
JW
7682020-02-07 Jonathan Wakely <jwakely@redhat.com>
769
770 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
771 warning.
772 (basic_istream_view::_Iterator::operator++()): Add missing return.
773
cba9ef06
PP
7742020-02-07 Patrick Palka <ppalka@redhat.com>
775
a04f635d
PP
776 * include/bits/ranges_algo.h: Remove extraneous &&.
777
b7903d9f
PP
778 * include/std/ranges (ranges::__detail::__stream_extractable,
779 ranges::basic_istream_view, ranges::istream_view): Define.
780 * testsuite/std/ranges/istream_view: New test.
781
cba9ef06
PP
782 Implement C++20 range adaptors
783 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
784 (subrange::_S_store_size): Mark as const instead of constexpr to
785 avoid what seems to be a bug in GCC.
786 (__detail::__box): Give it defaulted copy and move constructors.
55d4cbcb
PP
787 (ranges::views::_Single::operator()): Mark constexpr.
788 (ranges::views::_Iota::operator()): Mark constexpr.
cba9ef06 789 (__detail::Empty): Define.
55d4cbcb
PP
790 (ranges::views::__closure::_RangeAdaptor,
791 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
792 ranges::views::all, ranges::__detail::find_if,
793 ranges::__detail::find_if_not, ranges::__detail::mismatch,
794 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
795 ranges::views::transform, take_view, ranges::views::take,
796 take_while_view, ranges::views::take_while, drop_view,
797 ranges::views::drop, join_view, ranges::views::join,
cba9ef06 798 __detail::require_constant, __detail::tiny_range, split_view,
55d4cbcb
PP
799 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
800 common_view, ranges::views::common, reverse_view,
801 ranges::views::reverse,
802 ranges::views::__detail::__is_reversible_subrange,
803 ranges::views::__detail::__is_reverse_view, reverse_view,
804 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
805 ranges::views::elements, ranges::views::keys, ranges::views::values):
806 Define.
807 (views): Alias for ranges::views.
808 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
809 tuple_element<1, ranges::subrange>): New partial specializations.
cba9ef06
PP
810 * testsuite/std/ranges/adaptors/all.cc: New test.
811 * testsuite/std/ranges/adaptors/common.cc: Likewise.
812 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
813 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
814 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
815 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
816 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
817 * testsuite/std/ranges/adaptors/join.cc: Likewise.
818 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
819 * testsuite/std/ranges/adaptors/split.cc: Likewise.
820 * testsuite/std/ranges/adaptors/take.cc: Likewise.
821 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
822 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
823
5713834e
JW
8242020-02-07 Jonathan Wakely <jwakely@redhat.com>
825
0d57370c
JW
826 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
827 type of enumerations and comparison category types.
828 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
829 (__cmp_cat::_Ncmp::unordered): Change value to 2.
830 (partial_ordering::_M_value, weak_ordering::_M_value)
831 (strong_ordering::_M_value): Change type to __cmp_cat::type.
832 (partial_ordering::_M_is_ordered): Remove data member.
833 (partial_ordering): Use second bit of _M_value for unordered. Adjust
834 comparison operators.
835 (weak_ordering::operator partial_ordering): Simplify to remove
836 branches.
837 (operator<=>(unspecified, weak_ordering)): Likewise.
838 (strong_ordering::operator partial_ordering): Likewise.
839 (strong_ordering::operator weak_ordering): Likewise.
840 (operator<=>(unspecified, strong_ordering)): Likewise.
841 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
842 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
843 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
844
5713834e
JW
845 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
846 __cpp_lib_three_way_comparison macro and use deduced return type for
847 operator<=>.
848 * testsuite/std/ranges/iota/iterator.cc: New test.
849
bc464641
PP
8502020-02-07 Patrick Palka <ppalka@redhat.com>
851 Jonathan Wakely <jwakely@redhat.com>
852
853 Implement C++20 constrained algorithms
854 * include/Makefile.am: Add new header.
855 * include/Makefile.in: Regenerate.
856 * include/std/algorithm: Include <bits/ranges_algo.h>.
857 * include/bits/ranges_algo.h: New file.
858 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
859 * testsuite/25_algorithms/all_of/constrained.cc: New test.
860 * testsuite/25_algorithms/any_of/constrained.cc: New test.
861 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
862 * testsuite/25_algorithms/copy/constrained.cc: New test.
863 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
864 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
865 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
866 * testsuite/25_algorithms/count/constrained.cc: New test.
867 * testsuite/25_algorithms/count_if/constrained.cc: New test.
868 * testsuite/25_algorithms/equal/constrained.cc: New test.
869 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
870 * testsuite/25_algorithms/fill/constrained.cc: New test.
871 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
872 * testsuite/25_algorithms/find/constrained.cc: New test.
873 * testsuite/25_algorithms/find_end/constrained.cc: New test.
874 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
875 * testsuite/25_algorithms/find_if/constrained.cc: New test.
876 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
877 * testsuite/25_algorithms/for_each/constrained.cc: New test.
878 * testsuite/25_algorithms/generate/constrained.cc: New test.
879 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
880 * testsuite/25_algorithms/heap/constrained.cc: New test.
881 * testsuite/25_algorithms/includes/constrained.cc: New test.
882 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
883 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
884 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
885 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
886 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
887 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
888 test.
889 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
890 * testsuite/25_algorithms/max/constrained.cc: New test.
891 * testsuite/25_algorithms/max_element/constrained.cc: New test.
892 * testsuite/25_algorithms/merge/constrained.cc: New test.
893 * testsuite/25_algorithms/min/constrained.cc: New test.
894 * testsuite/25_algorithms/min_element/constrained.cc: New test.
895 * testsuite/25_algorithms/minmax/constrained.cc: New test.
896 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
897 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
898 * testsuite/25_algorithms/move/constrained.cc: New test.
899 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
900 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
901 * testsuite/25_algorithms/none_of/constrained.cc: New test.
902 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
903 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
904 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
905 * testsuite/25_algorithms/partition/constrained.cc: New test.
906 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
907 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
908 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
909 * testsuite/25_algorithms/remove/constrained.cc: New test.
910 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
911 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
912 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
913 * testsuite/25_algorithms/replace/constrained.cc: New test.
914 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
915 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
916 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
917 * testsuite/25_algorithms/reverse/constrained.cc: New test.
918 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
919 * testsuite/25_algorithms/rotate/constrained.cc: New test.
920 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
921 * testsuite/25_algorithms/search/constrained.cc: New test.
922 * testsuite/25_algorithms/search_n/constrained.cc: New test.
923 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
924 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
925 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
926 test.
927 * testsuite/25_algorithms/set_union/constrained.cc: New test.
928 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
929 * testsuite/25_algorithms/sort/constrained.cc: New test.
930 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
931 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
932 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
933 * testsuite/25_algorithms/transform/constrained.cc: New test.
934 * testsuite/25_algorithms/unique/constrained.cc: New test.
935 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
936 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
937
d1aa7705
JW
9382020-02-06 Jonathan Wakely <jwakely@redhat.com>
939
bd630df0
JW
940 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
941 number in comment. Fix indentation.
942
d1aa7705
JW
943 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
944 redundant _GLIBCXX20_CONSTEXPR.
945
26eae9ac
JW
946 * include/std/ranges (viewable_range): Replace decay_t with
947 remove_cvref_t (LWG 3375).
948
269e8130
JW
9492020-02-05 Jonathan Wakely <jwakely@redhat.com>
950
951 * include/bits/iterator_concepts.h (iter_reference_t)
952 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
953 Remove workarounds for PR c++/67704.
954 * testsuite/24_iterators/aliases.cc: New test.
955
7db12d15
PP
9562020-02-05 Patrick Palka <ppalka@redhat.com>
957
958 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
959 when initializing _M_current.
960 (move_iterator::base): Split into two overloads differing in
961 ref-qualifiers as in P1207R4 for C++20.
962
9962493c
JW
9632020-02-04 Jonathan Wakely <jwakely@redhat.com>
964
9bc5bea1
JW
965 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
966 use.
967
9962493c
JW
968 PR libstdc++/93562
969 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
970 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
971 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
972
20fa702b
AB
9732020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
974
975 * configure: Regenerate.
976
6e5a1963
PP
9772020-01-31 Patrick Palka <ppalka@redhat.com>
978
979 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
980 test_range::end() returns the same type as test_range::begin().
981 * testsuite/24_iterators/range_operations/next.cc: Likewise.
982 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
983 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
984 Always return a sentinel<I>.
985
5cd2e126
JW
9862020-01-29 Jonathan Wakely <jwakely@redhat.com>
987
0a8f4feb
JW
988 PR libstdc++/92895
989 * include/std/stop_token (stop_token::stop_possible()): Call new
990 _M_stop_possible() function.
991 (stop_token::stop_requested()): Do not use stop_possible().
992 (stop_token::binary_semaphore): New class, as temporary stand-in for
993 std::binary_semaphore.
994 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
995 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
996 New data members for symchronization with stop_callback destruction.
997 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
998 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
999 Remove.
1000 (stop_token::_Stop_cb::_M_run): New member function.
1001 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
1002 Remove.
1003 (stop_token::_Stop_state::_M_owners): New data member to track
1004 reference count for ownership.
1005 (stop_token::_Stop_state::_M_value): New data member combining a
1006 spinlock, the stop requested flag, and the reference count for
1007 associated stop_source objects.
1008 (stop_token::_Stop_state::_M_requester): New data member for
1009 synchronization with stop_callback destruction.
1010 (stop_token::_Stop_state::_M_stop_possible()): New member function.
1011 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
1012 of _M_value.
1013 (stop_token::_Stop_state::_M_add_owner)
1014 (stop_token::_Stop_state::_M_release_ownership)
1015 (stop_token::_Stop_state::_M_add_ssrc)
1016 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
1017 updating reference counts.
1018 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
1019 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
1020 (stop_token::_Stop_state::_M_try_lock)
1021 (stop_token::_Stop_state::_M_try_lock_and_stop)
1022 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
1023 managing spinlock.
1024 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
1025 read and update state. Release lock while running callbacks. Use new
1026 data members to synchronize with callback destruction.
1027 (stop_token::_Stop_state::_M_remove_callback): Likewise.
1028 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
1029 to read and update state.
1030 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
1031 replacing shared_ptr.
1032 (stop_source::stop_source(const stop_source&)): Update reference count.
1033 (stop_source::operator=(const stop_source&)): Likewise.
1034 (stop_source::~stop_source()): Likewise.
1035 (stop_source::stop_source(stop_source&&)): Define as defaulted.
1036 (stop_source::operator=(stop_source&&)): Establish postcondition on
1037 parameter.
1038 (stop_callback): Enforce preconditions on template parameter. Replace
1039 base class with data member of new _Cb_impl type.
1040 (stop_callback::stop_callback(const stop_token&, Cb&&))
1041 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
1042 (stop_callback::_Cb_impl): New type wrapping _Callback member and
1043 defining the _S_execute member function.
1044 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
1045 test.
1046 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
1047 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
1048 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
1049 New test.
1050 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
1051 test.
1052 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
1053 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
1054 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
1055 test.
1056
f214ffb3
JW
1057 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
1058 three_way_comparable_with.
1059 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
1060 (compare_three_way::operator()): Remove redundant constraint from
1061 requires-clause.
1062 (__detail::_Synth3way::operator()): Use three_way_comparable_with
1063 instead of workaround.
1064 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
1065 output due to simplified constraints on compare_three_way::operator().
1066
83b02010
JW
1067 PR libstdc++/93479
1068 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
1069 * testsuite/18_support/comparisons/object/93479.cc: New test.
1070
5cd2e126
JW
1071 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
1072 returns the same type as test_range::begin(). Add comments.
1073 * testsuite/std/ranges/access/rbegin.cc: Likewise.
1074 * testsuite/std/ranges/access/rend.cc: Likewise.
1075 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
1076 test_range is the same as its iterator type.
1077 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
1078 operator- overloads to satisfy sized_sentinel_for when the iterator
1079 satisfies random_access_iterator.
1080
759812fd
JW
10812020-01-28 Jonathan Wakely <jwakely@redhat.com>
1082
72a9fd20
JW
1083 PR libstdc++/93470
1084 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
1085 static assertion to object types.
1086
759812fd
JW
1087 PR libstdc++/93325
1088 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
1089 clock_gettime instead of explicit glibc version check.
1090 * configure: Regenerate.
1091
a5d81aaa
JW
10922020-01-28 Martin Liska <mliska@suse.cz>
1093
1094 PR libstdc++/93478
1095 * include/std/atomic: Fix typo.
1096 * include/std/optional: Likewise.
1097
10982020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
1099
1100 * configure: Regenerate.
1101
389cd88c
JW
11022020-01-27 Jonathan Wakely <jwakely@redhat.com>
1103
1104 PR libstdc++/93426
1105 * include/std/span (span): Fix deduction guide.
1106 * testsuite/23_containers/span/deduction.cc: New test.
1107
482eeff5
JW
11082020-01-24 Jonathan Wakely <jwakely@redhat.com>
1109
1110 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
1111 (__cmp_cat::_Ord::equivalent): Add enumerator.
1112 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
1113 and greater.
1114 (partial_ordering, weak_ordering, strong_ordering): Remove
1115 constructors taking __cmp_cat::_Eq parameters. Use renamed
1116 enumerators.
1117
e8e66971
MR
11182020-01-24 Maciej W. Rozycki <macro@wdc.com>
1119
1120 * acinclude.m4: Handle `--with-toolexeclibdir='.
1121 * Makefile.in: Regenerate.
1122 * aclocal.m4: Regenerate.
1123 * configure: Regenerate.
1124 * doc/Makefile.in: Regenerate.
1125 * include/Makefile.in: Regenerate.
1126 * libsupc++/Makefile.in: Regenerate.
1127 * po/Makefile.in: Regenerate.
1128 * python/Makefile.in: Regenerate.
1129 * src/Makefile.in: Regenerate.
1130 * src/c++11/Makefile.in: Regenerate.
1131 * src/c++17/Makefile.in: Regenerate.
1132 * src/c++98/Makefile.in: Regenerate.
1133 * src/filesystem/Makefile.in: Regenerate.
1134 * testsuite/Makefile.in: Regenerate.
1135
7a900bce
AO
11362020-01-23 Alexandre Oliva <oliva@adacore.com>
1137
f9e84b31
AO
1138 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
1139 * configure: Rebuild.
1140
7a900bce
AO
1141 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
1142
04681fca
JW
11432020-01-23 Jonathan Wakely <jwakely@redhat.com>
1144
1145 PR libstdc++/91947
1146 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
1147 rule.
1148 * include/Makefile.in: Regenerate.
1149
c784f162
JW
11502020-01-20 Jonathan Wakely <jwakely@redhat.com>
1151
1152 * doc/xml/faq.xml: Fix grammar.
1153 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
1154 * doc/xml/manual/spine.xml: Update copyright years.
1155 * doc/html/*: Regenerate.
1156
f4d83eba
ER
11572020-01-19 Eric S. Raymond <esr@thyrsus.com>
1158
1159 * doc/xml/faq.xml: Update for SVN -> Git transition.
1160 * doc/xml/manual/appendix_contributing.xml: Likewise.
1161 * doc/xml/manual/status_cxx1998.xml: Likewise.
1162 * doc/xml/manual/status_cxx2011.xml: Likewise.
1163 * doc/xml/manual/status_cxx2014.xml: Likewise.
1164 * doc/xml/manual/status_cxx2017.xml: Likewise.
1165 * doc/xml/manual/status_cxx2020.xml: Likewise.
1166 * doc/xml/manual/status_cxxtr1.xml: Likewise.
1167 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
1168
49789fd0
IS
11692020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1170
1171 * include/Makefile.am: Add coroutine to the std set.
1172 * include/Makefile.in: Regenerated.
1173 * include/std/coroutine: New file.
1174
0ba6a850
JW
11752020-01-17 Jonathan Wakely <jwakely@redhat.com>
1176
1177 PR libstdc++/92376
1178 * include/bits/c++config: Only do PSTL config when the header is
1179 present, to fix freestanding.
1180 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
1181 functions if they were detected by configure.
1182
98d56ea8
JW
11832020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
1184 Matthew Bauer <mjbauer95@gmail.com>
1185 Jonathan Wakely <jwakely@redhat.com>
1186
1187 PR bootstrap/64271 (partial)
1188 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
1189 to unsigned short.
1190 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
1191 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
1192 definitions with NetBSD upstream.
1193 (ctype_base::blank): Use _CTYPE_BL.
1194 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
1195 Declaration.
1196 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
1197 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
1198 parameters to unsigned char.
1199 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
1200
d9165389
FD
12012020-01-16 François Dumont <fdumont@gcc.gnu.org>
1202
1203 PR libstdc++/91263
1204 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
1205 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
1206 (_Equality_base): Remove.
1207 (_Equality<>::_M_equal): Review implementation. Use
1208 std::is_permutation.
1209 * testsuite/23_containers/unordered_multiset/operators/1.cc
1210 (Hash, Equal, test02, test03): New.
1211 * testsuite/23_containers/unordered_set/operators/1.cc
1212 (Hash, Equal, test02, test03): New.
1213
2a0f6c61
JW
12142020-01-15 Jonathan Wakely <jwakely@redhat.com>
1215
1216 PR libstdc++/93267
1217 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
1218 Move here from <bits/range_access.h> and define using __int128 when
1219 available.
1220 (__is_integer_like, __is_signed_integer_like): Move here from
1221 <bits/range_access.h>.
1222 (weakly_incrementable): Use __is_signed_integer_like.
1223 * include/bits/range_access.h (__max_diff_type, __max_size_type)
1224 (__is_integer_like, __is_signed_integer_like): Move to
1225 <bits/iterator_concepts.h>.
1226 (__make_unsigned_like_t): Move here from <ranges>.
1227 * include/std/ranges (__make_unsigned_like_t): Move to
1228 <bits/range_access.h>.
1229 (iota_view): Replace using-directive with using-declarations.
1230 * testsuite/std/ranges/iota/93267.cc: New test.
1231 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
1232
e4379a93
JW
12332020-01-13 Jonathan Wakely <jwakely@redhat.com>
1234
fe7cc34f
JW
1235 PR libstdc++/93244
1236 * include/bits/fs_path.h (path::generic_string<C,A>)
1237 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
1238 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
1239 root-dir is converted to forward slash in generic pathname.
1240 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
1241 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
1242
e4379a93
JW
1243 PR libstdc++/58605
1244 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
1245 Define.
1246 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
1247 (__atomic_float): Add default member initializer for C++20.
1248 * include/std/atomic (atomic): Likewise.
1249 (atomic::atomic()): Remove noexcept-specifier on default constructor.
1250 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
1251 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
1252 number.
1253 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
1254 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
1255 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
1256 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
1257 expected result for is_trivially_default_constructible.
1258 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
1259 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
1260 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
1261 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
1262 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
1263 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
1264 expected results for is_trivially_default_constructible.
1265 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
1266 new test generator.
1267
7918cb93
JW
12682020-01-10 Jonathan Wakely <jwakely@redhat.com>
1269
68be73fc
JW
1270 * testsuite/util/testsuite_iterators.h: Improve comment.
1271
78f02e80
JW
1272 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
1273 initialization syntax.
1274
7918cb93
JW
1275 PR libstdc++/92285
1276 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
1277 of base class independent of __cplusplus value.
1278 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
1279 type defined in the base class
1280 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
1281 * testsuite/24_iterators/istreambuf_iterator/requirements/
1282 base_classes.cc: Adjust expected base class for C++98.
1283
acd43917
OH
12842020-01-09 Olivier Hainque <hainque@adacore.com>
1285
1286 * doc/xml/manual/appendix_contributing.xml: Document _C2
1287 as a reserved identifier, by VxWorks.
1288 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
1289 * include/bits/stl_multimap.h: Likewise.
1290
caa39b2e
JW
12912020-01-09 Jonathan Wakely <jwakely@redhat.com>
1292
1a788638
JW
1293 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
1294 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
1295 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
1296 partial specialization to disambiguate the two constrained
1297 specializations.
1298
caa39b2e
JW
1299 * include/experimental/type_traits (experimental::is_pod_v): Disable
1300 -Wdeprecated-declarations warnings around reference to std::is_pod.
1301 * include/std/type_traits (is_pod_v): Likewise.
1302 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
1303 is_standard_layout and is_trivial. Do not check is_pod for C++20.
1304 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
1305 Add -Wno-deprecated for C++20.
1306 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
1307 * testsuite/20_util/is_pod/value.cc: Likewise.
1308 * testsuite/experimental/type_traits/value.cc: Likewise.
1309
1a6c5064
JTM
13102020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
1311
1312 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
1313 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
1314 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
1315
d574c8aa
JW
13162020-01-09 Jonathan Wakely <jwakely@redhat.com>
1317
160e95dc
JW
1318 PR libstdc++/93205
1319 * include/bits/random.h (operator>>): Check stream operation succeeds.
1320 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
1321 typedefs.
1322 (operator>>): Remove redundant __istream_type typedefs. Check stream
1323 operations succeed.
1324 (__extract_params): New function to fill a vector from a stream.
1325 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
1326
d574c8aa
JW
1327 PR libstdc++/93208
1328 * config/abi/pre/gnu.ver: Add new exports.
1329 * include/std/memory_resource (memory_resource::~memory_resource()):
1330 Do not define inline.
1331 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
1332 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
1333 Define.
1334 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
1335 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
1336
b9c84e95
FD
13372020-01-09 François Dumont <fdumont@gcc.gnu.org>
1338
1339 PR libstdc++/92124
1340 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
1341 template alias.
1342 (_Hashtable<>::__fwd_value_for): New.
1343 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
1344 parameter.
1345 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
1346 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
1347 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
1348 with std::move.
1349 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
1350 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
1351 Adapt.
1352 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
1353 Adapt.
1354 * testsuite/23_containers/unordered_set/92124.cc: New.
1355
fff148b7
JW
13562020-01-08 Jonathan Wakely <jwakely@redhat.com>
1357
1358 PR libstdc++/93201
1359 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
1360 detailed error reporting for remove_all. Check result of recursive
1361 call before incrementing iterator.
1362 (remove_all(const path&), remove_all(const path&, error_code&)): Use
1363 do_remove_all.
1364 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
1365 result of recursive call before incrementing iterator.
1366 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
1367 are reported correctly.
1368 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
1369
9e3c1eb7
TR
13702020-01-07 Thomas Rodgers <trodgers@redhat.com>
1371
1372 * include/std/condition_variable
1373 (condition_variable_any::wait_on): Rename to match current draft
1374 standard.
1375 (condition_variable_any::wait_on_until): Likewise.
1376 (condition_variable_any::wait_on_for): Likewise.
1377 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
1378 Adjust tests to account for renamed methods.
1379
6af8819b
FD
13802020-01-07 François Dumont <fdumont@gcc.gnu.org>
1381
1382 PR libstdc++/92124
1383 * include/bits/stl_tree.h
1384 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
1385 std::move_if_noexcept by std::move.
1386 * testsuite/23_containers/map/92124.cc: New.
1387 * testsuite/23_containers/set/92124.cc: New.
1388
f31a99f7
JW
13892020-01-06 Jonathan Wakely <jwakely@redhat.com>
1390
a4a1f965
JW
1391 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
1392 (stop_source): Likewise (LWG 3362).
1393 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
1394 comparisons.
1395
f31a99f7
JW
1396 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
1397 (lexicographical_compare_three_way): Do not depend on
1398 __cpp_lib_concepts.
1399 * include/std/version (__cpp_lib_three_way_comparison): Only define
1400 when __cpp_lib_concepts is defined.
1401 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
1402
b4e70137
JW
14032020-01-03 Jonathan Wakely <jwakely@redhat.com>
1404
1405 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
1406 Only define four-argument overload when __cpp_lib_concepts is defined.
1407
a8497ec6
JDA
14082020-01-01 John David Anglin <danglin@gcc.gnu.org>
1409
1410 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
1411
8d9254fc 14122020-01-01 Jakub Jelinek <jakub@redhat.com>
5624e564
JJ
1413
1414 Update copyright years.
b4df5e92 1415\f
8d9254fc 1416Copyright (C) 2020 Free Software Foundation, Inc.
b4df5e92
JW
1417
1418Copying and distribution of this file, with or without modification,
1419are permitted in any medium without royalty provided the copyright
1420notice and this notice are preserved.
This page took 0.933193 seconds and 5 git commands to generate.