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