]> gcc.gnu.org Git - gcc.git/blob - libstdc++-v3/ChangeLog
f3b21c28bc9e29c38dea81febfd5123b8abf2e87
[gcc.git] / libstdc++-v3 / ChangeLog
1 2021-07-22 Jonathan Wakely <jwakely@redhat.com>
2
3 Backported from master:
4 2021-04-15 Jonathan Wakely <jwakely@redhat.com>
5
6 PR libstdc++/96657
7 * libsupc++/Makefile.am: Add atomicity.cc here.
8 * src/c++98/Makefile.am: Remove it from here.
9 * libsupc++/Makefile.in: Regenerate.
10 * src/c++98/Makefile.in: Regenerate.
11 * testsuite/18_support/exception_ptr/96657.cc: New test.
12
13 2021-07-22 Jonathan Wakely <jwakely@redhat.com>
14
15 Backported from master:
16 2021-06-07 Jonathan Wakely <jwakely@redhat.com>
17
18 PR libstdc++/98842
19 * include/std/optional (operator<=>(const optional<T>& const U&)):
20 Add missing constraint and add workaround for template
21 recursion.
22 * testsuite/20_util/optional/relops/three_way.cc: Check that
23 type without equality comparison cannot be compared when wrapped
24 in std::optional.
25
26 2021-07-14 Jonathan Wakely <jwakely@redhat.com>
27
28 Backported from master:
29 2021-07-13 Jonathan Wakely <jwakely@redhat.com>
30
31 PR c++/101361
32 * include/std/string_view (ends_with): Use traits_type::compare
33 directly.
34
35 2021-07-14 Jonathan Wakely <jwakely@redhat.com>
36
37 Backported from master:
38 2021-07-12 Jonathan Wakely <jwakely@redhat.com>
39
40 PR libstdc++/101411
41 * include/std/span (as_writable_bytes): Add requires-clause.
42 * testsuite/23_containers/span/101411.cc: New test.
43
44 2021-07-06 Avi Kivity <avi@scylladb.com>
45
46 Backported from master:
47 2021-06-07 Avi Kivity <avi@scylladb.com>
48
49 PR libstdc++/100900
50 * include/std/ranges (elements_view::__iter_cat::_S_iter_cat):
51 Add missing typename.
52
53 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
54
55 Backported from master:
56 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
57
58 PR libstdc++/95833
59 * include/std/numeric (reduce(Iter, Iter, T, BinaryOp)): Replace
60 incorrect static_assert with ones matching the 'Mandates'
61 conditions in the standard.
62 * testsuite/26_numerics/reduce/95833.cc: New test.
63
64 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
65
66 * include/std/variant (__same_types, __check_visitor_results):
67 Remove.
68
69 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
70
71 Backported from master:
72 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
73
74 * include/std/future (promise::set_value): Check for existence
75 of shared state before dereferncing it.
76 (promise::set_exception, promise::set_value_at_thread_exit)
77 (promise::set_exception_at_thread_exit): Likewise.
78 (promise<R&>::set_value, promise<R&>::set_exception)
79 (promise<R&>::set_value_at_thread_exit)
80 (promise<R&>::set_exception_at_thread_exit): Likewise.
81 (promise<void>::set_value, promise<void>::set_exception)
82 (promise<void>::set_value_at_thread_exit)
83 (promise<void>::set_exception_at_thread_exit): Likewise.
84 * testsuite/30_threads/promise/members/at_thread_exit2.cc:
85 Remove unused variable.
86
87 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
88
89 Backported from master:
90 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
91
92 * include/bits/basic_string.h (basic_string(const CharT*, const A&)):
93 Do not do arithmetic on null pointer.
94
95 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
96
97 Backported from master:
98 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
99
100 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp
101 (find_key_pointer(key_const_reference, false_type))
102 (find_key_pointer(key_const_reference, true_type)): Do not
103 dereference null pointer.
104
105 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
106
107 Backported from master:
108 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
109
110 * testsuite/20_util/from_chars/3.cc: Use unsigned type to avoid
111 overflow.
112 * testsuite/24_iterators/reverse_iterator/2.cc: Do not add
113 non-zero value to null pointer.
114 * testsuite/25_algorithms/copy_backward/move_iterators/69478.cc:
115 Use past-the-end iterator for result.
116 * testsuite/25_algorithms/move_backward/69478.cc: Likewise.
117 * testsuite/25_algorithms/move_backward/93872.cc: Likewise.
118
119 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
120
121 Backported from master:
122 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
123
124 PR libstdc++/100384
125 * include/std/variant (__get_t): New alias template yielding the
126 return type of std::get<N> on a variant.
127 (__visit_result_t): New alias template yielding the result of
128 std::visit.
129 (__same_types): Move into namespace __detail::__variant.
130 (__check_visitor_results): Likewise. Use __invoke_result_t and
131 __get_t.
132 (__check_visitor_result): Remove.
133 (visit): Use __visit_result_t for return type.
134 * testsuite/20_util/variant/100384.cc: New test.
135
136 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
137
138 Backported from master:
139 2021-04-22 Jonathan Wakely <jwakely@redhat.com>
140
141 PR libstdc++/99006
142 * include/bits/shared_ptr.h (allocate_shared): Assert that _Tp
143 is not an array type.
144 * include/bits/shared_ptr_base.h (__allocate_shared): Likewise.
145 * testsuite/20_util/shared_ptr/creation/99006.cc: New test.
146
147 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
148
149 Backported from master:
150 2021-05-11 Jonathan Wakely <jwakely@redhat.com>
151
152 * include/bits/allocator.h (allocator<void>) [C++20]: Add
153 missing noexcept to constructor. Restore missing POCMA and
154 is_always_equal_traits.
155 * include/bits/memoryfwd.h (allocator_traits): Declare.
156 * include/ext/malloc_allocator.h (malloc_allocator::allocate):
157 Add nodiscard attribute. Add static assertion for LWG 3307.
158 * include/ext/new_allocator.h (new_allocator::allocate): Add
159 static assertion for LWG 3307.
160 * testsuite/20_util/allocator/void.cc: Check that converting
161 constructor is noexcept. Check for propagation traits and
162 size_type and difference_type. Check that pointer and
163 const_pointer are gone in C++20.
164
165 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
166
167 Backported from master:
168 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
169
170 * include/bits/shared_ptr_base.h (__shared_count(unique_ptr&&)):
171 Initialize a non-reference deleter from an rvalue, as per LWG
172 3548.
173 (__shared_ptr::_UniqCompatible): Add missing constraint.
174 * testsuite/20_util/shared_ptr/cons/lwg3548.cc: New test.
175 * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc: Check
176 constraints.
177
178 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
179
180 Backported from master:
181 2021-06-17 Jonathan Wakely <jwakely@redhat.com>
182
183 PR libstdc++/91488
184 * include/bits/basic_string.h (__cpp_lib_constexpr_string): Only
185 define C++20 value when std::is_constant_evaluated is available.
186 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
187 Likewise.
188 (__constant_string_p, __constant_array_p): Give external
189 linkage.
190 * include/std/version (__cpp_lib_constexpr_char_traits)
191 (__cpp_lib_constexpr_string): Only define C++20 values when
192 is_constant_evaluated is available.
193
194 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
195
196 Backported from master:
197 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
198
199 * testsuite/20_util/scoped_allocator/69293_neg.cc: Add dg-error
200 for additional errors in C++20.
201 * testsuite/20_util/uses_allocator/69293_neg.cc: Likewise.
202 * testsuite/20_util/uses_allocator/cons_neg.cc: Likewise.
203
204 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
205
206 Backported from master:
207 2021-06-09 Jonathan Wakely <jwakely@redhat.com>
208
209 PR libstdc++/100982
210 * include/std/optional (optional::operator=(const optional<U>&)):
211 Fix value category used in is_assignable check.
212 * testsuite/20_util/optional/assignment/100982.cc: New test.
213
214 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
215
216 Backported from master:
217 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
218
219 PR libstdc++/101034
220 * include/std/any (any(in_place_t<T>, initializer_list<U>, A&&...))
221 (any::emplace<T>(initializer_list<U>, A&&...)): Fix constraint
222 to use lvalue.
223 * testsuite/20_util/any/cons/101034.cc: New test.
224
225 2021-06-10 Patrick Palka <ppalka@redhat.com>
226
227 Backported from master:
228 2021-06-03 Patrick Palka <ppalka@redhat.com>
229
230 PR libstdc++/100770
231 * include/bits/ranges_algo.h (__detail::__can_reread_output):
232 Factor out this concept from ...
233 (__unique_copy_fn::operator()): ... here. Use the concept
234 throughout.
235 * testsuite/std/ranges/range.cc: Remove now ill-formed use
236 of range_value_t on an output_range.
237 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper):
238 Define value_type, pointer and reference member types to void.
239
240 2021-06-10 Patrick Palka <ppalka@redhat.com>
241
242 Backported from master:
243 2021-05-21 Patrick Palka <ppalka@redhat.com>
244
245 PR libstdc++/100690
246 * include/std/ranges (iota_view::_Sentinel::_M_distance_from):
247 Split out this member function from ...
248 (iota_view::_Sentinel::operator-): ... here, for sake of access
249 control.
250 * testsuite/std/ranges/iota/iota_view.cc (test05): New test.
251
252 2021-06-10 Patrick Palka <ppalka@redhat.com>
253
254 Backported from master:
255 2021-05-06 Patrick Palka <ppalka@redhat.com>
256
257 * include/std/ranges (filter_view::_Iterator::base): Make the
258 const& overload unconstrained and return a const reference as
259 per LWG 3533. Make unconditionally noexcept.
260 (transform_view::_Iterator::base): Likewise.
261 (elements_view::_Iterator::base): Likewise.
262
263 2021-06-10 Patrick Palka <ppalka@redhat.com>
264
265 Backported from master:
266 2021-05-06 Patrick Palka <ppalka@redhat.com>
267
268 * include/bits/stl_iterator.h (move_iterator::base): Make the
269 const& overload unconstrained and return a const reference as
270 per LWG 3391. Make unconditionally noexcept.
271 (counted_iterator::base): Likewise.
272 * testsuite/24_iterators/move_iterator/lwg3391.cc: New test.
273 * testsuite/24_iterators/move_iterator/move_only.cc: Adjust
274 has_member_base concept to decay-copy the result of base().
275
276 2021-06-10 Patrick Palka <ppalka@redhat.com>
277
278 Backported from master:
279 2021-05-18 Patrick Palka <ppalka@redhat.com>
280
281 PR libstdc++/100631
282 * include/std/ranges (elements_view::_Sentinel::operator-): Use
283 _M_distance_from in the other operator- overload too.
284 * testsuite/std/ranges/adaptors/elements.cc (test06): Augment test.
285
286 2021-06-10 Patrick Palka <ppalka@redhat.com>
287
288 Backported from master:
289 2021-05-18 Patrick Palka <ppalka@redhat.com>
290
291 PR libstdc++/100631
292 * include/std/ranges (elements_view::_Iterator): Also befriend
293 _Sentinel<!_Const>.
294 (elements_view::_Sentinel::_M_equal): Templatize.
295 (elements_view::_Sentinel::_M_distance_from): Split out from ...
296 (elements_view::_Sentinel::operator-): ... here. Depend on
297 _Base2 instead of _Base in the return type.
298 * testsuite/std/ranges/adaptors/elements.cc (test06, test07):
299 New tests.
300
301 2021-06-10 Patrick Palka <ppalka@redhat.com>
302
303 Backported from master:
304 2021-05-20 Patrick Palka <ppalka@redhat.com>
305
306 PR libstdc++/100639
307 * include/bits/stl_iterator.h (reverse_iterator::difference_type):
308 In C++20 mode, define in terms of iter_difference_t as per P0896R4.
309 (reverse_iterator::reference): Likewise, but with iter_reference_t.
310 (reverse_iterator::value_type): Likewise, but with iter_value_t.
311 * testsuite/std/ranges/adaptors/reverse.cc (test08): New test.
312 * testsuite/24_iterators/reverse_iterator/100639.cc: New test.
313
314 2021-06-03 Jonathan Wakely <jwakely@redhat.com>
315
316 Backported from master:
317 2021-06-01 Jonathan Wakely <jwakely@redhat.com>
318
319 PR libstdc++/100833
320 * include/bits/range_access.h (ranges::advance(iter, n, sentinel)):
321 Fix return value for no-op case.
322 * testsuite/24_iterators/range_operations/advance.cc: Test
323 return values of three-argument overload.
324
325 2021-06-03 Jonathan Wakely <jwakely@redhat.com>
326
327 Backported from master:
328 2021-05-26 Jonathan Wakely <jwakely@redhat.com>
329
330 PR libstdc++/100768
331 * include/bits/range_access.h (ranges::advance)
332 (ranges::distance, ranges::next, ranges::prev): Replace
333 function templates with function objects.
334 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc:
335 Adjust for changes to function objects.
336 * testsuite/std/ranges/adaptors/elements.cc: Add using
337 declarations for names from namespace ranges.
338 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
339 * testsuite/24_iterators/range_operations/100768.cc: New test.
340
341 2021-06-03 Jonathan Wakely <jwakely@redhat.com>
342
343 Backported from master:
344 2021-06-01 Jonathan Wakely <jwakely@redhat.com>
345
346 PR libstdc++/99453
347 * python/Makefile.am: Use archive name for printer hook if no
348 dynamic library name is available.
349 * python/Makefile.in: Regenerate.
350
351 2021-06-03 Philippe Blain <levraiphilippeblain@gmail.com>
352
353 Backported from master:
354 2021-04-21 Philippe Blain <levraiphilippeblain@gmail.com>
355 Jonathan Wakely <jwakely@redhat.com>
356
357 PR libstdc++/99453
358 * python/Makefile.am: Install libstdc++*-gdb.py more robustly.
359 * python/Makefile.in: Regenerate.
360
361 2021-05-17 Jonathan Wakely <jwakely@redhat.com>
362
363 PR libstdc++/100630
364 * include/bits/fs_path.h (__is_constructible_from): Test
365 construction from a const lvalue, not an rvalue.
366 * include/experimental/bits/fs_path.h (__is_constructible_from):
367 Likewise.
368 * testsuite/27_io/filesystem/path/construct/100630.cc: New test.
369 * testsuite/experimental/filesystem/path/construct/100630.cc:
370 New test.
371
372 2021-05-17 Jonathan Wakely <jwakely@redhat.com>
373
374 Backported from master:
375 2021-03-11 Jonathan Wakely <jwakely@redhat.com>
376
377 * python/libstdcxx/v6/printers.py (find_type): Use tag attribute
378 instead of unqualified() method.
379
380 2021-05-05 Patrick Palka <ppalka@redhat.com>
381
382 Backported from master:
383 2021-05-05 Patrick Palka <ppalka@redhat.com>
384
385 * include/std/ranges (transform_view::_Iterator::iter_swap):
386 Remove as per LWG 3520.
387 (join_view::_Iterator::iter_swap): Add indirectly_swappable
388 constraint as per LWG 3517.
389
390 2021-05-04 Patrick Palka <ppalka@redhat.com>
391
392 Backported from master:
393 2021-04-30 Patrick Palka <ppalka@redhat.com>
394
395 * include/std/ranges (split_view::_InnerIter::operator++):
396 Depend on _Base instead of _Vp directly, as per LWG 3532.
397
398 2021-05-04 Patrick Palka <ppalka@redhat.com>
399
400 Backported from master:
401 2021-04-20 Patrick Palka <ppalka@redhat.com>
402
403 PR libstdc++/95983
404 * include/bits/stl_iterator.h (__detail::__move_iter_cat):
405 Define.
406 (move_iterator): Derive from the above in C++20 in order to
407 conditionally define iterator_category as per P2259.
408 (move_iterator::__base_cat): No longer used, so remove.
409 (move_iterator::iterator_category): Remove in C++20.
410 (__detail::__common_iter_use_postfix_proxy): Define.
411 (common_iterator::_Proxy): Rename to ...
412 (common_iterator:__arrow_proxy): ... this.
413 (common_iterator::__postfix_proxy): Define as per P2259.
414 (common_iterator::operator->): Adjust.
415 (common_iterator::operator++): Adjust as per P2259.
416 (iterator_traits<common_iterator>::_S_iter_cat): Define.
417 (iterator_traits<common_iterator>::iterator_category): Change as
418 per P2259.
419 (__detail::__counted_iter_value_type): Define.
420 (__detail::__counted_iter_concept): Define.
421 (__detail::__counted_iter_cat): Define.
422 (counted_iterator): Derive from the above three classes in order
423 to conditionally define value_type, iterator_concept and
424 iterator category respectively as per P2259.
425 (counted_iterator::operator->): Define as per P2259.
426 (incrementable_traits<counted_iterator>): Remove as per P2259.
427 (iterator_traits<counted_iterator>): Adjust as per P2259.
428 * include/std/ranges (__detail::__iota_view_iter_cat): Define.
429 (iota_view::_Iterator): Derive from the above in order to
430 conditionally define iterator_category as per P2259.
431 (iota_view::_S_iter_cat): Rename to ...
432 (iota_view::_S_iter_concept): ... this.
433 (iota_view::iterator_concept): Use it to apply LWG 3291 changes.
434 (iota_view::iterator_category): Remove.
435 (__detail::__filter_view_iter_cat): Define.
436 (filter_view::_Iterator): Derive from the above in order to
437 conditionally define iterator_category as per P2259.
438 (filter_view::_Iterator): Move to struct __filter_view_iter_cat.
439 (filter_view::_Iterator::iterator_category): Remove.
440 (transform_view::_Base): Define.
441 (transform_view::__iter_cat): Define.
442 (transform_view::_Iterator): Derive from the above in order to
443 conditionally define iterator_category as per P2259.
444 (transform_view::_Iterator::_Base): Just alias
445 transform_view::_Base.
446 (transform_view::_Iterator::_S_iter_cat): Move to struct
447 transform_view::__iter_cat.
448 (transform_view::_Iterator::iterator_category): Remove.
449 (transform_view::_Sentinel::_Base): Just alias
450 transform_view::_Base.
451 (join_view::_Base): Define.
452 (join_view::_Outer_iter): Define.
453 (join_view::_Inner_iter): Define.
454 (join_view::_S_ref_is_glvalue): Define.
455 (join_view::__iter_cat): Define.
456 (join_view::_Iterator): Derive from it in order to conditionally
457 define iterator_category as per P2259.
458 (join_view::_Iterator::_Base): Just alias join_view::_Base.
459 (join_view::_Iterator::_S_ref_is_glvalue): Just alias
460 join_view::_S_ref_is_glvalue.
461 (join_view::_Iterator::_S_iter_cat): Move to struct
462 transform_view::__iter_cat.
463 (join_view::_Iterator::_Outer_iter): Just alias
464 join_view::_Outer_iter.
465 (join_view::_Iterator::_Inner_iter): Just alias
466 join_view::_Inner_iter.
467 (join_view::_Iterator::iterator_category): Remove.
468 (join_view::_Sentinel::_Base): Just alias join_view::_Base.
469 (__detail::__split_view_outer_iter_cat): Define.
470 (__detail::__split_view_inner_iter_cat): Define.
471 (split_view::_Base): Define.
472 (split_view::_Outer_iter): Derive from __split_view_outer_iter_cat
473 in order to conditionally define iterator_category as per P2259.
474 (split_view::_Outer_iter::iterator_category): Remove.
475 (split_view::_Inner_iter): Derive from __split_view_inner_iter_cat
476 in order to conditionally define iterator_category as per P2259.
477 (split_view::_Inner_iter::_S_iter_cat): Move to
478 __split_view_inner_iter_cat.
479 (split_view::_Inner_iter::iterator_category): Remove.
480 (elements_view::_Base): Define.
481 (elements_view::__iter_cat): Define.
482 (elements_view::_Iterator): Derive from the above in order to
483 conditionall define iterator_category as per P2259.
484 (elements_view::_Iterator::_Base): Just alias
485 elements_view::_Base.
486 (elements_view::_Iterator::_S_iter_concept)
487 (elements_view::_Iterator::iterator_concept): Define as per
488 P2259.
489 (elements_view::_Iterator::iterator_category): Remove.
490 (elements_view::_Sentinel::_Base): Just alias
491 elements_view::_Base.
492 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc:
493 Adjust constraints on iterator_traits<counted_iterator>.
494 * testsuite/std/ranges/p2259.cc: New test.
495
496 2021-05-03 Patrick Palka <ppalka@redhat.com>
497
498 Backported from master:
499 2021-04-27 Patrick Palka <ppalka@redhat.com>
500
501 PR libstdc++/100290
502 * include/std/ranges (join_view::_Iterator::operator++): Correct
503 the return type of the lambda to avoid returning a copy of
504 _M_parent->_M_inner.
505 * testsuite/std/ranges/adaptors/join.cc (test10): New test.
506
507 2021-04-30 Jonathan Wakely <jwakely@redhat.com>
508
509 Backported from master:
510 2021-04-30 Jonathan Wakely <jwakely@redhat.com>
511
512 * include/bits/basic_string.h (__cpp_lib_constexpr_string):
513 Only define for C++17 and later.
514
515 2021-04-29 Jonathan Wakely <jwakely@redhat.com>
516
517 Backported from master:
518 2021-04-26 Jonathan Wakely <jwakely@redhat.com>
519
520 PR libstdc++/100259
521 * include/experimental/internet (net::ip::make_error_code)
522 (net::ip::make_error_condition, net::ip::make_network_v4)
523 (net::ip::operator==(const udp&, const udp&)): Add 'inline'.
524
525 2021-04-29 Jonathan Wakely <jwakely@redhat.com>
526
527 Backported from master:
528 2021-04-28 Jonathan Wakely <jwakely@redhat.com>
529
530 * include/bits/basic_string.h (__cpp_lib_constexpr_string): Define.
531 * include/std/version (__cpp_lib_constexpr_string): Define.
532 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
533 Check for __cpp_lib_constexpr_string.
534 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
535 Likewise.
536 * testsuite/21_strings/char_traits/requirements/version.cc: New test.
537
538 2021-04-21 Jonathan Wakely <jwakely@redhat.com>
539
540 PR libstdc++/100180
541 * testsuite/experimental/net/internet/address/v6/members.cc:
542 Require gthreads.
543
544 2021-04-21 Patrick Palka <ppalka@redhat.com>
545
546 Backported from master:
547 2021-04-08 Patrick Palka <ppalka@redhat.com>
548
549 * include/std/ranges (__detail::find): Define.
550 (split_view::_OuterIter::operator++): Apply proposed resolution
551 of LWG 3505.
552 * testsuite/std/ranges/adaptors/split.cc (test10): New test.
553
554 2021-04-21 Patrick Palka <ppalka@redhat.com>
555
556 Backported from master:
557 2021-04-08 Patrick Palka <ppalka@redhat.com>
558
559 * include/std/ranges (__detail::find_if): Simplify.
560 (__detail::find_if_not): Likewise.
561 (__detail::min): Remove.
562 (__detail::mismatch): Simplify.
563 (take_view::size): Use std::min instead of __detail::min.
564
565 2021-04-21 Patrick Palka <ppalka@redhat.com>
566
567 Backported from master:
568 2021-04-08 Patrick Palka <ppalka@redhat.com>
569
570 * include/std/ranges (__detail::__returnable_element): New
571 concept.
572 (elements_view): Use this concept in its constraints. Add
573 missing private access specifier.
574 (elements_view::_S_get_element): Define as per LWG 3502.
575 (elements_view::operator*, elements_view::operator[]): Use
576 _S_get_element.
577 (elements_view::operator++): Remove unnecessary constraint
578 as per LWG 3492.
579 * testsuite/std/ranges/adaptors/elements.cc (test05): New test.
580
581 2021-04-21 Patrick Palka <ppalka@redhat.com>
582
583 Backported from master:
584 2020-10-31 Patrick Palka <ppalka@redhat.com>
585
586 PR libstdc++/97600
587 * include/std/ranges (basic_istream_view::begin): Initialize
588 _Iterator from 'this' instead of '*this'.
589 (basic_istream_view::_Iterator::_Iterator): Adjust constructor
590 accordingly.
591 (filter_view::_Iterator::_Iterator): Take a filter_view*
592 argument instead of a filter_view& argument.
593 (filter_view::_Sentinel::_Sentinel): Likewise.
594 (filter_view::begin): Initialize _Iterator from 'this' instead
595 of '*this'.
596 (filter_view::end): Likewise.
597 (transform_view::_Iterator::_Iterator): Take a _Parent* instead
598 of a _Parent&.
599 (filter_view::_Iterator::operator+): Adjust accordingly.
600 (filter_view::_Iterator::operator-): Likewise.
601 (filter_view::begin): Initialize _Iterator from 'this' instead
602 of '*this'.
603 (filter_view::end): Likewise.
604 (join_view::_Iterator): Take a _Parent* instead of a _Parent&.
605 (join_view::_Sentinel): Likewise.
606 (join_view::begin): Initialize _Iterator from 'this' instead of
607 '*this'.
608 (join_view::end): Initialize _Sentinel from 'this' instead of
609 '*this'.
610 (split_view::_OuterIter): Take a _Parent& instead of a _Parent*.
611 (split_view::begin): Initialize _OuterIter from 'this' instead
612 of '*this'.
613 (split_view::end): Likewise.
614 * testsuite/std/ranges/97600.cc: New test.
615
616 2021-04-19 François Dumont <fdumont@gcc.gnu.org>
617
618 PR libstdc++/99402
619 * include/debug/helper_functions.h (__can_advance(_InputIterator,
620 const std::pair<_Diff, _Distance_precision>&, int)): New.
621 (__can_advance(const _Safe_iterator<>&,
622 const std::pair<_Diff, _Distance_precision>&, int)): New.
623 * include/debug/macros.h (__glibcxx_check_can_increment_dist): New,
624 use latter.
625 (__glibcxx_check_can_increment_range): Adapt to use latter.
626 (__glibcxx_check_can_decrement_range): Likewise.
627 * include/debug/safe_iterator.h
628 (_Safe_iterator<>::_M_can_advance(const std::pair<_Diff, _Distance_precision>&,
629 int)): New.
630 (__can_advance(const _Safe_iterator<>&,
631 const std::pair<_Diff, _Distance_precision>&, int)): New.
632 * include/debug/safe_iterator.tcc
633 (_Safe_iterator<>::_M_can_advance(const std::pair<_Diff, _Distance_precision>&,
634 int)): New.
635 (_Safe_iterator<>::_M_valid_range(const _Safe_iterator<>&,
636 std::pair<difference_type, _Distance_precision>&, bool)): Adapt for
637 __dp_sign_max_size.
638 (__copy_move_a): Adapt to use __glibcxx_check_can_increment_dist.
639 (__copy_move_backward_a): Likewise.
640 (__equal_aux): Likewise.
641 * include/debug/stl_iterator.h (__can_advance(const std::reverse_iterator<>&,
642 const std::pair<_Diff, _Distance_precision>&, int)): New.
643 (__can_advance(const std::move_iterator<>&,
644 const std::pair<_Diff, _Distance_precision>&, int)): New.
645 * testsuite/25_algorithms/copy/debug/99402.cc: New test.
646
647 2021-04-19 Jonathan Wakely <jwakely@redhat.com>
648
649 Backported from master:
650 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
651
652 PR libstdc++/97570
653 * libsupc++/new_opa.cc: Declare size_t in global namespace.
654 Remove unused header.
655
656 2021-04-13 Jonathan Wakely <jwakely@redhat.com>
657
658 Backported from master:
659 2021-04-13 Jonathan Wakely <jwakely@redhat.com>
660
661 PR libstdc++/100060
662 * include/std/bit: Only include <ext/numeric_traits.h> for
663 hosted build, use <limits> otherwise.
664
665 2021-04-12 Jonathan Wakely <jwakely@redhat.com>
666
667 Backported from master:
668 2021-04-12 Jonathan Wakely <jwakely@redhat.com>
669
670 PR libstdc++/100044
671 * include/std/ranges (__detail::__iterator_sentinel_pair):
672 Remove helper concept.
673 (subrange(_Pr), subrange(Pr, __make_unsigned_like<...>)): Remove
674 deduction guides, as per LWG 3404.
675 * testsuite/std/ranges/subrange/lwg3282_neg.cc: Check that class
676 template argument deduction fails.
677
678 2021-04-12 Jonathan Wakely <jwakely@redhat.com>
679
680 Backported from master:
681 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
682
683 * include/bits/iterator_concepts.h (indirectly_readable): Add
684 partial specializations to resolve ambiguities (LWG 3446).
685 * testsuite/24_iterators/associated_types/readable.traits.cc:
686 Check types with both value_type and element_type.
687
688 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
689
690 PR bootstrap/99983
691 * include/bits/hashtable.h (_Hashtable): Fix noexcept-speciofier
692 on definition to match the one on the declaration.
693
694 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
695
696 Backported from master:
697 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
698
699 PR libstdc++/99985
700 * include/bits/hashtable.h (_Hashtable::_S_nothrow_move()): Fix
701 to be a valid constexpr function in C++11.
702 * testsuite/23_containers/unordered_set/cons/99985.cc: New test.
703
704 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
705
706 Backported from master:
707 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
708
709 * include/bits/fs_fwd.h: Fix doxygen group command.
710 * include/bits/streambuf_iterator.h: Likewise.
711 * include/std/chrono: Likewise.
712 * include/std/memory: Likewise.
713 * include/std/thread: Likewise.
714 * include/tr1/complex: Likewise.
715
716 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
717
718 Backported from master:
719 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
720
721 * include/bits/basic_string.h: Tweak doxygen comment.
722
723 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
724
725 Backported from master:
726 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
727
728 * include/bits/random.h: Fix doxygen group commands.
729 * include/bits/regex_constants.h: Likewise.
730 * include/tr1/random.h: Likewise.
731
732 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
733
734 Backported from master:
735 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
736
737 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
738 Use allocator with the correct value type.
739 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
740 Likewise.
741
742 2021-04-08 François Dumont <fdumont@gcc.gnu.org>
743
744 Backported from master:
745 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
746
747 PR libstdc++/96029
748 * include/bits/hashtable.h
749 (_Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type)):
750 Add noexcept qualification.
751 (_Hashtable(_Hashtable&&)): Fix noexcept qualification.
752 (_Hashtable(_Hashtable&&, const allocator_type&)): Add noexcept
753 qualification.
754 * include/bits/unordered_map.h
755 (unordered_map(unordered_map&&, const allocator_type&)): Add noexcept
756 qualification.
757 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
758 Likewise.
759 * include/bits/unordered_set.h
760 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
761 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
762 Likewise.
763 * include/debug/unordered_map
764 (unordered_map(unordered_map&&, const allocator_type&)): Likewise.
765 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
766 Likewise.
767 * include/debug/unordered_set
768 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
769 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
770 Likewise.
771 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
772 New test.
773 * testsuite/23_containers/unordered_map/cons/noexcept_default_construct.cc:
774 New test.
775 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
776 New test.
777 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
778 New test.
779 * testsuite/23_containers/unordered_multimap/cons/noexcept_default_construct.cc:
780 New test.
781 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
782 New test.
783 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
784 New test.
785 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
786 New test.
787 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
788 New test.
789 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
790 New test.
791 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
792 New test.
793
794 2021-04-08 François Dumont <fdumont@gcc.gnu.org>
795
796 Backported from master:
797 2020-07-08 François Dumont <fdumont@gcc.gnu.org>
798
799 PR libstdc++/96029
800 * include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&)): Add noexcept
801 qualification based only on _Compare one.
802 * testsuite/23_containers/map/cons/noexcept_move_construct.cc: Add
803 static asserts.
804 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
805 Likewise.
806 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
807 Likewise.
808 * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
809
810 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
811
812 Backported from master:
813 2021-04-07 Jonathan Wakely <jwakely@redhat.com>
814
815 PR libstdc++/99805
816 * src/c++17/fs_path.cc (path::_M_split_cmpts): Do not call
817 non-const member on _M_pathname, to avoid copy-on-write.
818 * testsuite/27_io/filesystem/path/decompose/parent_path.cc:
819 Check construction from strings that might be shared.
820
821 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
822
823 * doc/xml/manual/status_cxx2017.xml: Replace Intel parallelstl
824 link with LLVM repo for PSTL.
825 * doc/html/manual/status.html: Regenerate.
826
827 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
828
829 Backported from master:
830 2021-04-06 Jonathan Wakely <jwakely@redhat.com>
831
832 * include/bits/alloc_traits.h: Use markdown for code font.
833 * include/bits/basic_string.h: Fix @param names.
834 * include/bits/regex.h: Fix duplicate @retval names, and rename.
835 * include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp: Add
836 group open to match existing group close.
837 * include/ext/pb_ds/priority_queue.hpp: Add blank line before group
838 open.
839
840 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
841
842 Backported from master:
843 2021-04-06 Jonathan Wakely <jwakely@redhat.com>
844
845 * include/bits/atomic_base.h: Fix doxygen group close.
846 * include/bits/basic_ios.h: Likewise.
847 * include/bits/forward_list.h: Likewise.
848 * include/bits/fs_dir.h: Likewise.
849 * include/bits/fs_ops.h: Likewise.
850 * include/bits/fs_path.h: Likewise.
851 * include/bits/functional_hash.h: Likewise.
852 * include/bits/gslice.h: Likewise.
853 * include/bits/gslice_array.h: Likewise.
854 * include/bits/hashtable_policy.h: Likewise.
855 * include/bits/indirect_array.h: Likewise.
856 * include/bits/locale_classes.h: Likewise.
857 * include/bits/locale_facets.h: Likewise.
858 * include/bits/locale_facets_nonio.h: Likewise.
859 * include/bits/mask_array.h: Likewise.
860 * include/bits/refwrap.h: Likewise.
861 * include/bits/regex.h: Likewise.
862 * include/bits/regex_automaton.h: Likewise.
863 * include/bits/regex_compiler.h: Likewise.
864 * include/bits/regex_constants.h: Likewise.
865 * include/bits/regex_error.h: Likewise.
866 * include/bits/regex_executor.h: Likewise.
867 * include/bits/regex_scanner.h: Likewise.
868 * include/bits/shared_ptr.h: Likewise.
869 * include/bits/shared_ptr_atomic.h: Likewise.
870 * include/bits/shared_ptr_base.h: Likewise.
871 * include/bits/slice_array.h: Likewise.
872 * include/bits/specfun.h: Likewise.
873 * include/bits/std_function.h: Likewise.
874 * include/bits/std_mutex.h: Likewise.
875 * include/bits/stl_deque.h: Likewise.
876 * include/bits/stl_iterator.h: Likewise.
877 * include/bits/stl_iterator_base_types.h: Likewise.
878 * include/bits/stl_map.h: Likewise.
879 * include/bits/stl_multimap.h: Likewise.
880 * include/bits/stl_multiset.h: Likewise.
881 * include/bits/stl_numeric.h: Likewise.
882 * include/bits/stl_pair.h: Likewise.
883 * include/bits/stl_set.h: Likewise.
884 * include/bits/stl_uninitialized.h: Likewise.
885 * include/bits/stream_iterator.h: Likewise.
886 * include/bits/streambuf_iterator.h: Likewise.
887 * include/bits/unique_ptr.h: Likewise.
888 * include/bits/unordered_map.h: Likewise.
889 * include/bits/unordered_set.h: Likewise.
890 * include/decimal/decimal: Likewise.
891 * include/experimental/any: Likewise.
892 * include/experimental/array: Likewise.
893 * include/experimental/bits/fs_dir.h: Likewise.
894 * include/experimental/bits/fs_fwd.h: Likewise.
895 * include/experimental/bits/fs_ops.h: Likewise.
896 * include/experimental/bits/fs_path.h: Likewise.
897 * include/experimental/buffer: Likewise.
898 * include/experimental/internet: Likewise.
899 * include/experimental/optional: Likewise.
900 * include/experimental/propagate_const: Likewise.
901 * include/experimental/socket: Likewise.
902 * include/ext/pb_ds/assoc_container.hpp: Likewise.
903 * include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp:
904 Likewise.
905 * include/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp: Likewise.
906 * include/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp: Likewise.
907 * include/ext/pb_ds/detail/types_traits.hpp: Likewise.
908 * include/ext/pb_ds/exception.hpp: Likewise.
909 * include/ext/pb_ds/priority_queue.hpp: Likewise.
910 * include/ext/pb_ds/tag_and_trait.hpp: Likewise.
911 * include/ext/random: Likewise.
912 * include/std/any: Likewise.
913 * include/std/atomic: Likewise.
914 * include/std/bitset: Likewise.
915 * include/std/chrono: Likewise.
916 * include/std/complex: Likewise.
917 * include/std/condition_variable: Likewise.
918 * include/std/fstream: Likewise.
919 * include/std/future: Likewise.
920 * include/std/istream: Likewise.
921 * include/std/iostream: Likewise.
922 * include/std/mutex: Likewise.
923 * include/std/numeric: Likewise.
924 * include/std/ostream: Likewise.
925 * include/std/ratio: Likewise.
926 * include/std/shared_mutex: Likewise.
927 * include/std/stdexcept: Likewise.
928 * include/std/streambuf: Likewise.
929 * include/std/system_error: Likewise.
930 * include/std/valarray: Likewise.
931 * include/std/variant: Likewise.
932 * include/tr1/cmath: Likewise.
933 * include/tr1/regex: Likewise.
934 * include/tr2/dynamic_bitset: Likewise.
935 * libsupc++/atomic_lockfree_defines.h: Likewise.
936 * libsupc++/exception: Likewise.
937 * libsupc++/exception.h: Likewise.
938 * libsupc++/exception_ptr.h: Likewise.
939 * libsupc++/nested_exception.h: Likewise.
940
941 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
942
943 Backported from master:
944 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
945
946 * include/std/string_view: Adjust Doxygen @file comment.
947
948 2021-04-08 Release Manager
949
950 * GCC 10.3.0 released.
951
952 2021-04-01 Jonathan Wakely <jwakely@redhat.com>
953
954 Backported from master:
955 2021-02-14 Jonathan Wakely <jwakely@redhat.com>
956
957 PR libstdc++/99096
958 * testsuite/util/testsuite_fs.h: Always include <unistd.h>.
959
960 2021-04-01 Jonathan Wakely <jwakely@redhat.com>
961
962 Backported from master:
963 2020-12-17 Jonathan Wakely <jwakely@redhat.com>
964
965 * config.h.in: Regenerate.
966 * config/os/djgpp/error_constants.h: Test POSIX errno macros
967 directly, instead of corresponding _GLIBCXX_HAVE_EXXX macros.
968 * config/os/mingw32-w64/error_constants.h: Likewise.
969 * config/os/mingw32/error_constants.h: Likewise.
970 * configure: Regenerate.
971
972 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
973
974 Backported from master:
975 2020-11-30 Jonathan Wakely <jwakely@redhat.com>
976
977 * testsuite/20_util/specialized_algorithms/pstl/*: Add
978 dg-timeout-factor.
979 * testsuite/25_algorithms/pstl/*: Likewise.
980 * testsuite/26_numerics/pstl/*: Likewise.
981 * testsuite/28_regex/*: Likewise.
982
983 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
984
985 Backported from master:
986 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
987
988 * testsuite/28_regex/algorithms/regex_match/basic/string_range_01_03.cc:
989 Add dg-timeout-factor directive.
990 * testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc:
991 Likewise.
992 * testsuite/28_regex/algorithms/regex_match/ecma/char/backref.cc:
993 Likewise.
994 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/63199.cc:
995 Likewise.
996 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/anymatcher.cc:
997 Likewise.
998 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/cjk_match.cc:
999 Likewise.
1000 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc:
1001 Likewise.
1002 * testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc:
1003 Likewise.
1004 * testsuite/28_regex/algorithms/regex_search/61720.cc: Likewise.
1005 * testsuite/28_regex/algorithms/regex_search/ecma/assertion.cc:
1006 Likewise.
1007 * testsuite/28_regex/algorithms/regex_search/ecma/string_01.cc:
1008 Likewise.
1009 * testsuite/28_regex/basic_regex/ctors/deduction.cc: Likewise.
1010
1011 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1012
1013 Backported from master:
1014 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
1015
1016 * include/std/stop_token: Check _GLIBCXX_HAS_GTHREADS using
1017 #ifdef instead of #if.
1018 (stop_token::_S_yield()): Check _GLIBCXX_HAS_GTHREADS before
1019 using __gthread_yield.
1020
1021 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1022
1023 Backported from master:
1024 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
1025
1026 PR libstdc++/95765
1027 * include/bits/stl_algobase.h (__size_to_integer(float))
1028 (__size_to_integer(double), __size_to_integer(long double))
1029 (__size_to_integer(__float128)): Cast return type explicitly.
1030
1031 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1032
1033 Backported from master:
1034 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
1035
1036 * testsuite/17_intro/names.cc: Do not test 'v' on AIX.
1037
1038 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1039
1040 Backported from master:
1041 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
1042
1043 * include/bits/basic_string.h (size_type, difference_type):
1044 Use allocator_traits to obtain the allocator's size_type and
1045 difference_type.
1046
1047 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1048
1049 Backported from master:
1050 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
1051
1052 * include/std/chrono (duration::_S_gcd(intmax_t, intmax_t)):
1053 New helper function for finding GCD of two positive intmax_t
1054 values.
1055 (duration::__divide): New helper alias for dividing one period
1056 by another.
1057 (duration::__is_harmonic): Use __divide not ratio_divide.
1058 (duration(const duration<R2, P2>&)): Require the duration rep
1059 types to be convertible.
1060 * testsuite/20_util/duration/cons/dr2094.cc: New test.
1061 * testsuite/20_util/duration/requirements/reduced_period.cc:
1062 Fix definition of unused member functions in test type.
1063 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
1064 Adjust expected errors.
1065
1066 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1067
1068 Backported from master:
1069 2020-08-27 Jonathan Wakely <jwakely@redhat.com>
1070
1071 * include/std/chrono (__duration_common_type): Ensure the
1072 reduced ratio is used. Remove unused partial specialization
1073 using __failure_type.
1074 (common_type): Pass reduced ratios to __duration_common_type.
1075 Add partial specializations for simple cases involving a single
1076 duration or time_point type.
1077 (duration::period): Use reduced ratio.
1078 (duration::operator+(), duration::operator-()): Return duration
1079 type using the reduced ratio.
1080 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
1081 Adjust expected errors.
1082 * testsuite/20_util/duration/requirements/reduced_period.cc: New test.
1083
1084 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1085
1086 Backported from master:
1087 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
1088
1089 PR libstdc++/96592
1090 * include/std/tuple (_TupleConstraints<true, T...>): Use
1091 alternative is_constructible instead of std::is_constructible.
1092 * testsuite/20_util/tuple/cons/96592.cc: New test.
1093
1094 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1095
1096 Backported from master:
1097 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1098
1099 * testsuite/20_util/is_aggregate/value.cc: Adjust for changes to
1100 definition of aggregates in C++20.
1101 * testsuite/20_util/optional/requirements.cc: Adjust for
1102 defaulted comparisons in C++20.
1103
1104 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1105
1106 Backported from master:
1107 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1108
1109 * testsuite/20_util/tuple/78939.cc: Suppress warnings about
1110 deprecation of volatile-qualified structured bindings in C++20.
1111 * testsuite/20_util/variable_templates_for_traits.cc: Likewise
1112 for deprecation of is_pod in C++20
1113
1114 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1115
1116 Backported from master:
1117 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
1118
1119 * include/std/optional (bad_optional_access): Define default
1120 constructor and destructor as defaulted.
1121 * testsuite/20_util/optional/bad_access.cc: New test.
1122
1123 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1124
1125 Backported from master:
1126 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
1127
1128 * include/bits/ranges_algobase.h (__copy_n_fn): Only call
1129 ranges::copy for positive values.
1130 * include/bits/stl_algo.h (copy_n): Convert Size argument to an
1131 integral type and only call __copy_n for positive values.
1132 * testsuite/util/testsuite_iterators.h
1133 (random_access_iterator_wrapper::operator+=): Fix range check for
1134 negative values.
1135 (output_container, input_container, forward_container)
1136 (bidirectional_container, random_access_container): New alias
1137 templates.
1138 * testsuite/25_algorithms/copy_n/5.cc: New test.
1139
1140 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1141
1142 Backported from master:
1143 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
1144
1145 * include/std/atomic (atomic): Add static assertions.
1146 * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
1147
1148 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1149
1150 Backported from master:
1151 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
1152
1153 * include/bits/stl_iterator.h (move_iterator::operator=): Define.
1154 * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
1155
1156 2021-03-29 Paul Keir <paul.keir@uws.ac.uk>
1157
1158 Backported from master:
1159 2020-06-15 Paul Keir <paul.keir@uws.ac.uk>
1160
1161 * include/bits/char_traits.h (char_traits::move): constexpr move with
1162 overlap was using copy_backward incorrectly.
1163 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
1164 New test.
1165
1166 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1167
1168 Backported from master:
1169 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1170
1171 * testsuite/20_util/time_point_cast/rounding.cc: Remove
1172 duplicate dg-do directive and add c++17 effective target.
1173
1174 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1175
1176 Backported from master:
1177 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
1178
1179 * testsuite/30_threads/thread/cons/84535.cc: Use a custom
1180 namespace.
1181 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
1182
1183 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1184
1185 Backported from master:
1186 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
1187
1188 * testsuite/lib/libstdc++.exp (libstdc++_init): Only set
1189 tool_timeout if it hasn't been set by the user already.
1190
1191 2021-03-29 Moritz Sichert <sichert@in.tum.de>
1192
1193 Backported from master:
1194 2021-03-23 Moritz Sichert <sichert@in.tum.de>
1195
1196 * include/std/ranges (reverse_view::begin, reverse_view::end):
1197 Qualify make_reverse_iterator calls to avoid ADL.
1198 * testsuite/std/ranges/adaptors/reverse.cc: Test that
1199 views::reverse works when make_reverse_iterator is defined
1200 in an associated namespace.
1201
1202 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1203
1204 Backported from master:
1205 2021-03-22 Jonathan Wakely <jwakely@redhat.com>
1206
1207 * include/bits/range_access.h (begin(T (&)[N]), end(T (&)[N])):
1208 Add missing 'noexcept' as per LWG 2280.
1209 (rbegin(T (&)[N]), rend(T (&)[N]), rbegin(initializer_list<T>))
1210 (rend(initializer_list<T>)): Add 'noexcept' as per LWG 3537.
1211 * testsuite/24_iterators/range_access/range_access.cc: Check for
1212 expected noexcept specifiers. Check result types of generic
1213 std::begin and std::end overloads.
1214 * testsuite/24_iterators/range_access/range_access_cpp14.cc:
1215 Check for expected noexcept specifiers.
1216 * testsuite/24_iterators/range_access/range_access_cpp17.cc:
1217 Likewise.
1218
1219 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1220
1221 Backported from master:
1222 2021-03-11 Jonathan Wakely <jwakely@redhat.com>
1223
1224 PR libstdc++/99537
1225 * include/std/stop_token (_Stop_state_t::_M_release_ownership):
1226 Use acq_rel memory ordering.
1227
1228 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1229
1230 Backported from master:
1231 2021-03-11 Jonathan Wakely <jwakely@redhat.com>
1232
1233 PR libstdc++/99533
1234 * src/c++17/fs_dir.cc (recursive_directory_iterator): Use new
1235 helper function to check for permission denied errors.
1236 * src/filesystem/dir.cc (recursive_directory_iterator):
1237 Likewise.
1238 * src/filesystem/dir-common.h (is_permission_denied_error): New
1239 helper function.
1240
1241 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1242
1243 Backported from master:
1244 2021-03-11 Jonathan Wakely <jwakely@redhat.com>
1245
1246 PR libstdc++/99536
1247 * include/bits/random.h (normal_distribution): Use
1248 default-initializer for _M_saved and _M_saved_available.
1249
1250 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1251
1252 Backported from master:
1253 2021-03-10 Jonathan Wakely <jwakely@redhat.com>
1254
1255 * include/bits/range_cmp.h (__eq_builtin_ptr_cmp): Remove.
1256 (ranges::equal_to, ranges::not_equal_to): Do not constrain
1257 with __eq_builtin_ptr_cmp.
1258 (ranges::less, ranges::greater, ranges::less_equal)
1259 (ranges::greater_equal): Do not constrain with
1260 __less_builtin_ptr_cmp.
1261 * libsupc++/compare (compare_three_way): Do not constrain with
1262 __3way_builtin_ptr_cmp.
1263 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc: Moved to...
1264 * testsuite/18_support/comparisons/object/lwg3530.cc: ...here.
1265 * testsuite/20_util/function_objects/range.cmp/lwg3530.cc: New test.
1266
1267 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1268
1269 Backported from master:
1270 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
1271
1272 * doc/xml/manual/status_cxx2014.xml: Document implementation
1273 specific properties of std::experimental::filesystem::rename.
1274 * doc/xml/manual/status_cxx2017.xml: Document implementation
1275 specific properties of std::filesystem::rename.
1276 * doc/html/*: Regenerate.
1277 * src/c++17/fs_ops.cc (fs::rename): Implement correct behaviour
1278 for directories on Windows.
1279 * src/filesystem/ops-common.h (__gnu_posix::rename): Use
1280 MoveFileExW on Windows.
1281 * testsuite/27_io/filesystem/operations/rename.cc: New test.
1282 * testsuite/experimental/filesystem/operations/rename.cc: New test.
1283
1284 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1285
1286 Backported from master:
1287 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
1288
1289 * testsuite/util/testsuite_fs.h (nonexistent_path): Add
1290 random number to the path.
1291
1292 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1293
1294 Backported from master:
1295 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
1296
1297 * include/experimental/internet (address_v6::to_string): Include
1298 scope ID in string.
1299 (address_v6::loopback): Fix to be constexpr in C++14.
1300 * testsuite/experimental/net/internet/address/v6/members.cc:
1301 Test to_string() results.
1302
1303 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1304
1305 Backported from master:
1306 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
1307
1308 * include/experimental/internet (address_v6::any): Avoid using
1309 memcpy in constexpr function.
1310 (address_v6::loopback): Likewise.
1311 (make_address_v6): Fix missing return statements on error paths.
1312 * include/experimental/io_context: Avoid -Wdangling-else
1313 warning.
1314 * testsuite/experimental/net/internet/address/v4/members.cc:
1315 Remove unused variables.
1316 * testsuite/experimental/net/internet/address/v6/members.cc:
1317 New test.
1318
1319 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1320
1321 Backported from master:
1322 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1323
1324 * testsuite/25_algorithms/all_of/constexpr.cc: Check result of
1325 the algorithm.
1326 * testsuite/25_algorithms/any_of/constexpr.cc: Likewise.
1327 * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
1328 * testsuite/25_algorithms/copy_backward/constexpr.cc: Likewise.
1329 * testsuite/25_algorithms/count/constexpr.cc: Likewise.
1330 * testsuite/25_algorithms/equal/constexpr.cc: Likewise.
1331 * testsuite/25_algorithms/equal_range/constexpr.cc: Likewise.
1332 * testsuite/25_algorithms/fill/constexpr.cc: Likewise.
1333 * testsuite/25_algorithms/find_end/constexpr.cc: Likewise.
1334 * testsuite/25_algorithms/find_if/constexpr.cc: Likewise.
1335 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Likewise.
1336 * testsuite/25_algorithms/is_permutation/constexpr.cc: Likewise.
1337 * testsuite/25_algorithms/is_sorted_until/constexpr.cc:
1338 Likewise.
1339 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
1340 Likewise.
1341 * testsuite/25_algorithms/lower_bound/constexpr.cc: Likewise.
1342 * testsuite/25_algorithms/merge/constexpr.cc: Likewise.
1343 * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
1344 * testsuite/25_algorithms/none_of/constexpr.cc: Likewise.
1345 * testsuite/25_algorithms/partition_copy/constexpr.cc: Likewise.
1346 * testsuite/25_algorithms/remove_copy/constexpr.cc: Likewise.
1347 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Likewise.
1348 * testsuite/25_algorithms/remove_if/constexpr.cc: Likewise.
1349 * testsuite/25_algorithms/replace_if/constexpr.cc: Likewise.
1350 * testsuite/25_algorithms/reverse/constexpr.cc: Likewise.
1351 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Likewise.
1352 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Likewise.
1353 * testsuite/25_algorithms/search/constexpr.cc: Likewise.
1354 * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
1355 * testsuite/25_algorithms/set_intersection/constexpr.cc:
1356 Likewise.
1357 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
1358 Likewise.
1359 * testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
1360 * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
1361 * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
1362
1363 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1364
1365 Backported from master:
1366 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
1367
1368 PR libstdc++/99077
1369 * src/c++11/cxx11-ios_failure.cc (__ios_failure(const char*, int)):
1370 Change int parameter to error_code, to match std::ios_failure.
1371 (__throw_ios_failure(const char*, int)): Construct error_code
1372 from int parameter.
1373
1374 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1375
1376 Backported from master:
1377 2021-02-11 Jonathan Wakely <jwakely@redhat.com>
1378
1379 PR libstdc++/99058
1380 * doc/xml/manual/status_cxx2011.xml: Document when support
1381 became stable.
1382 * doc/xml/manual/status_cxx2014.xml: Likewise.
1383 * doc/xml/manual/status_cxx2017.xml: Likewise.
1384 * doc/html/manual/status.html: Regenerate.
1385
1386 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1387
1388 Backported from master:
1389 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
1390
1391 PR libstdc++/88881
1392 * src/c++17/fs_ops.cc (fs::symlink_status): Re-enable workaround.
1393
1394 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1395
1396 Backported from master:
1397 2021-02-10 Jonathan Wakely <jwakely@redhat.com>
1398
1399 PR libstdc++/88881
1400 * src/c++17/fs_ops.cc (fs::status): Re-enable workaround.
1401
1402 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1403
1404 Backported from master:
1405 2021-02-10 Jonathan Wakely <jwakely@redhat.com>
1406
1407 * src/c++17/fs_ops.cc (fs::create_hard_link, fs::equivalent)
1408 (fs::remove): Use std::system_category() for error codes from
1409 GetLastError().
1410 * src/filesystem/ops.cc (fs::create_hard_link, fs::remove):
1411 Likewise.
1412
1413 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1414
1415 Backported from master:
1416 2021-02-10 Jonathan Wakely <jwakely@redhat.com>
1417
1418 * testsuite/27_io/filesystem/operations/proximate.cc: Fix typo
1419 in __MINGW32__ macro name.
1420 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
1421 * testsuite/27_io/filesystem/path/generation/proximate.cc:
1422 Likewise.
1423 * testsuite/27_io/filesystem/path/generation/relative.cc:
1424 Likewise.
1425 * testsuite/util/testsuite_fs.h: Likewise.
1426
1427 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1428
1429 Backported from master:
1430 2021-02-03 Jonathan Wakely <jwakely@redhat.com>
1431
1432 * testsuite/19_diagnostics/error_code/operators/not_equal.cc:
1433 Add comparison with same category and different values.
1434 * testsuite/19_diagnostics/error_code/operators/less.cc:
1435 Likewise. Fix comparison involving different categories.
1436 * testsuite/19_diagnostics/error_code/operators/three_way.cc:
1437 Likewise.
1438 * testsuite/19_diagnostics/error_condition/operators/less.cc:
1439 Add comment.
1440 * testsuite/19_diagnostics/error_condition/operators/three_way.cc:
1441 Likewise.
1442
1443 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1444
1445 Backported from master:
1446 2020-12-16 Jonathan Wakely <jwakely@redhat.com>
1447
1448 PR libstdc++/98319
1449 * include/experimental/random: Only define contents for C++14
1450 and later.
1451 * include/experimental/source_location: Likewise.
1452 * include/experimental/utility: Likewise.
1453 * testsuite/experimental/feat-lib-fund.cc: Include all LFTS
1454 headers that are present. Allow test to run for all modes.
1455
1456 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1457
1458 Backported from master:
1459 2020-12-16 Jonathan Wakely <jwakely@redhat.com>
1460
1461 PR libstdc++/93151
1462 * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Remove.
1463 * configure.ac: Regenerate.
1464 * config/os/generic/error_constants.h: Test POSIX errno macros
1465 directly, instead of corresponding _GLIBCXX_HAVE_EXXX macros.
1466 * testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc:
1467 Likewise.
1468 * testsuite/19_diagnostics/headers/system_error/93151.cc: New
1469 test.
1470
1471 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1472
1473 Backported from master:
1474 2020-12-10 Jonathan Wakely <jwakely@redhat.com>
1475
1476 PR libstdc++/98226
1477 * include/std/bit (__countl_one, __countr_one): Remove redundant
1478 branches.
1479
1480 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1481
1482 Backported from master:
1483 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
1484
1485 * include/std/bit (__popcount): Remove redundant check for zero.
1486
1487 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1488
1489 Backported from master:
1490 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
1491
1492 * include/std/ranges (enable_borrowed_view<take_view<T>>)
1493 (enable_borrowed_view<drop_view<T>>)
1494 (enable_borrowed_view<drop_while_view<T>>)
1495 (enable_borrowed_view<reverse_view<T>>)
1496 (enable_borrowed_view<common_view<T>>)
1497 (enable_borrowed_view<elements_view<T>>): Add partial
1498 specializations as per P2017R1.
1499 * testsuite/std/ranges/adaptors/conditionally_borrowed.cc:
1500 New test.
1501
1502 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1503
1504 Backported from master:
1505 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1506
1507 * include/std/ranges (subrange::subrange(R&&)): Use
1508 direct-initialization instead of list-initialization, so a
1509 potential narrowing conversion from ranges::size(r) to the
1510 stored size isn't ill-formed.
1511
1512 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1513
1514 Backported from master:
1515 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
1516
1517 PR libstdc++/82584
1518 * include/bits/random.tcc
1519 (discrete_distribution::param_type::_M_initialize)
1520 (piecewise_constant_distribution::param_type::_M_initialize)
1521 (piecewise_linear_distribution::param_type::_M_initialize):
1522 Add assertions for positive sums..
1523 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
1524 line.
1525
1526 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1527
1528 Backported from master:
1529 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
1530
1531 * include/bits/random.h (__detail::_Mod): Revert last change.
1532 (__detail::__mod): Do not use _Mod for a==0 case.
1533 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
1534 Check other cases with a==0. Also check runtime results.
1535 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
1536 line.
1537
1538 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1539
1540 Backported from master:
1541 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
1542
1543 * include/bits/random.h (__detail::_Mod): Avoid divide by zero.
1544 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
1545 New test.
1546
1547 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1548
1549 Backported from master:
1550 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1551
1552 * include/std/ranges (drop_view::begin()): Adjust constraints
1553 to match the correct condition for O(1) ranges::next (LWG 3482).
1554 * testsuite/std/ranges/adaptors/drop.cc: Check that iterator is
1555 cached for non-sized_range.
1556
1557 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1558
1559 Backported from master:
1560 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1561
1562 * include/std/ranges (transform_view, elements_view): Relax
1563 constraints on operator- for iterators, as per LWG 3483.
1564 * testsuite/std/ranges/adaptors/elements.cc: Check that we
1565 can take the difference of two iterators from a non-random
1566 access range.
1567 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
1568
1569 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1570
1571 Backported from master:
1572 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1573
1574 PR libstdc++/95592
1575 * include/bits/valarray_after.h (_DEFINE_EXPR_UNARY_OPERATOR)
1576 (_DEFINE_EXPR_BINARY_OPERATOR, _DEFINE_EXPR_BINARY_FUNCTION):
1577 Use elaborated-type-specifier and qualified-id to avoid
1578 ambiguities with QNX system headers.
1579 * testsuite/26_numerics/valarray/95592.cc: New test.
1580
1581 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1582
1583 Backported from master:
1584 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
1585
1586 * include/bits/locale_conv.h (__str_codecvt_out_all):
1587 Add cast to compare operands of the same signedness.
1588 * include/bits/locale_facets_nonio.tcc
1589 (time_get::_M_extract_wday_or_month): Likewise.
1590 * include/bits/sstream.tcc (basic_stringbuf::overflow):
1591 Likewise.
1592 * include/tr1/legendre_function.tcc (__sph_legendre): Use
1593 unsigned for loop variable.
1594
1595 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1596
1597 Backported from master:
1598 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1599
1600 * include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in_all):
1601 Add casts to compare types of the same signedness.
1602
1603 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1604
1605 Backported from master:
1606 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1607
1608 * include/bits/ranges_algobase.h (__equal_fn): Remove unused
1609 typedef.
1610
1611 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1612
1613 Backported from master:
1614 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1615
1616 * include/experimental/bits/shared_ptr.h (shared_ptr(auto_ptr&&))
1617 (operator=(auto_ptr&&)): Add diagnostic pragmas to suppress
1618 warnings for uses of std::auto_ptr.
1619 * include/experimental/type_traits (is_literal_type_v):
1620 Likewise, for use of std::is_literal_type.
1621 * include/std/condition_variable (condition_variable_any::_Unlock):
1622 Likewise, for use of std::uncaught_exception.
1623
1624 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1625
1626 Backported from master:
1627 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1628
1629 * include/bits/fs_path.h (path::_List::type()): Avoid narrowing
1630 conversion.
1631
1632 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1633
1634 Backported from master:
1635 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
1636
1637 * include/std/ranges (__box): Simplify constraints as per LWG 3477.
1638
1639 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1640
1641 Backported from master:
1642 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1643
1644 * include/std/ranges (ranges::iota_view::size()): Perform all
1645 calculations in the right unsigned types.
1646 * testsuite/std/ranges/iota/size.cc: New test.
1647
1648 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1649
1650 Backported from master:
1651 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
1652
1653 * include/experimental/executor (system_context::_M_run()):
1654 Fix predicate.
1655 (system_context::join()): Do not join unless joinable.
1656 * testsuite/experimental/net/system_context/1.cc: New test.
1657
1658 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1659
1660 Backported from master:
1661 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
1662
1663 * include/bits/stl_iterator.h (inserter): Do not deduce
1664 iterator type (LWG 561).
1665 * testsuite/24_iterators/insert_iterator/dr561.cc: New test.
1666
1667 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1668
1669 Backported from master:
1670 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
1671
1672 * include/bits/fs_path.h (path::_List::begin, path::_List::end):
1673 Add noexcept to match definitions in src/c++17/fs_path.cc.
1674
1675 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
1676
1677 Backported from master:
1678 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
1679
1680 * src/c++17/fs_dir.cc (fs::directory_iterator::operator*):
1681 Add noexcept. Do not throw on precondition violation.
1682
1683 2021-03-19 Jakub Jelinek <jakub@redhat.com>
1684
1685 Backported from master:
1686 2021-02-23 Jakub Jelinek <jakub@redhat.com>
1687
1688 PR libstdc++/99181
1689 * testsuite/21_strings/char_traits/requirements/char/99181.cc: New
1690 test.
1691
1692 2021-03-19 Jakub Jelinek <jakub@redhat.com>
1693
1694 Backported from master:
1695 2021-02-23 Jakub Jelinek <jakub@redhat.com>
1696
1697 PR libstdc++/99181
1698 * include/bits/char_traits.h (char_traits<char>::compare): For
1699 constexpr evaluation don't call
1700 __gnu_cxx::char_traits<char_type>::compare but do the comparison loop
1701 directly.
1702
1703 2021-02-09 Jonathan Wakely <jwakely@redhat.com>
1704
1705 Backported from master:
1706 2021-02-09 Jonathan Wakely <jwakely@redhat.com>
1707
1708 PR libstdc++/99021
1709 * include/std/coroutine (coroutine_handle<P>::from_address): Add
1710 noexcept.
1711
1712 2021-01-13 Jonathan Wakely <jwakely@redhat.com>
1713
1714 PR libstdc++/98605
1715 * include/std/mutex (call_once): Use NOLINT to suppress clang
1716 analyzer warnings.
1717
1718 2021-01-11 Jonathan Wakely <jwakely@redhat.com>
1719
1720 Backported from master:
1721 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
1722
1723 * python/libstdcxx/v6/printers.py (StdExpPathPrinter): Store the
1724 name of the type and pass it to the iterator.
1725 (StdPathPrinter): Likewise.
1726 * testsuite/libstdc++-prettyprinters/filesystem-ts.cc: New test.
1727
1728 2021-01-11 Jonathan Wakely <jwakely@redhat.com>
1729
1730 Backported from master:
1731 2020-12-16 Jonathan Wakely <jwakely@redhat.com>
1732
1733 PR libstdc++/96083
1734 * include/ext/throw_allocator.h: Use __has_builtin to check for
1735 __builtin_sprintf support, and use std::sprintf if necessary.
1736
1737 2021-01-11 Jonathan Wakely <jwakely@redhat.com>
1738
1739 Backported from master:
1740 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
1741
1742 PR libstdc++/65480
1743 PR libstdc++/68735
1744 * python/libstdcxx/v6/printers.py (function_pointer_to_name):
1745 New helper function to get the name of a function from its
1746 address.
1747 (StdExpAnyPrinter.__init__): Use it.
1748
1749 2021-01-11 Jonathan Wakely <jwakely@redhat.com>
1750
1751 Backported from master:
1752 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
1753
1754 * testsuite/experimental/filesystem/filesystem_error/cons.cc:
1755 Remove -std=gnu++17 option.
1756
1757 2021-01-08 Iain Sandoe <iain@sandoe.co.uk>
1758
1759 Backported from master:
1760 2020-07-17 Iain Sandoe <iain@sandoe.co.uk>
1761
1762 * include/std/coroutine: Mark the methods of the
1763 trivial awaitables as constexpr.
1764
1765 2021-01-03 Iain Sandoe <iain@sandoe.co.uk>
1766 Jakub Jelinek <jakub@redhat.com>
1767
1768 PR target/97865
1769 * configure: Regenerate.
1770
1771 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
1772
1773 Backported from master:
1774 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
1775
1776 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt:
1777 Update.
1778 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt:
1779 Update.
1780
1781 2020-12-01 Patrick Palka <ppalka@redhat.com>
1782
1783 Backported from master:
1784 2020-10-12 Patrick Palka <ppalka@redhat.com>
1785
1786 PR libstdc++/95322
1787 * include/std/ranges (take_view::_CI): Define this alias
1788 template as per LWG 3449 and remove ...
1789 (take_view::_Sentinel::_CI): ... this type alias.
1790 (take_view::_Sentinel::operator==): Adjust use of _CI
1791 accordingly. Define a second overload that accepts an iterator
1792 of the opposite constness as per LWG 3449.
1793 (take_while_view::_Sentinel::operator==): Likewise.
1794 * testsuite/std/ranges/adaptors/95322.cc: Add tests for LWG 3449.
1795
1796 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
1797
1798 Backported from master:
1799 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
1800
1801 PR libstdc++/98001
1802 * testsuite/ext/stdio_filebuf/char/79820.cc: Do not pass invalid
1803 FILE* to constructor.
1804
1805 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
1806
1807 Backported from master:
1808 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
1809
1810 PR libstdc++/97935
1811 * include/bits/iterator_concepts.h (__detail::__iter_without_category):
1812 New helper concept.
1813 (__iterator_traits::__cat): Use __detail::__iter_without_category.
1814 * testsuite/24_iterators/associated_types/iterator.traits.cc: New test.
1815
1816 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
1817
1818 Backported from master:
1819 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
1820
1821 * include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
1822 (__detail::__cat, __detail::__diff): Move to class scope in the
1823 relevant __iterator_traits specializations.
1824 (__iterator_traits<>): Use nested class templates instead of ones from
1825 namespace __detail.
1826 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
1827 class scope in iterator_traits<common_iterator<I, S>>.
1828 (iterator_traits<common_iterator<I, S>>): Use nested class template
1829 instead of __detail::__common_iter_ptr.
1830
1831 2020-11-24 Jonathan Wakely <jwakely@redhat.com>
1832
1833 Backported from master:
1834 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
1835
1836 * testsuite/29_atomics/atomic_float/value_init.cc: Use float
1837 instead of double so that __atomic_load_8 isn't needed.
1838
1839 2020-11-20 Jonathan Wakely <jwakely@redhat.com>
1840
1841 Backported from master:
1842 2020-11-20 Jonathan Wakely <jwakely@redhat.com>
1843
1844 PR libstdc++/92546
1845 * include/std/regex (pmr::smatch, pmr::wsmatch): Declare using
1846 underlying __normal_iterator type, not nested typedef
1847 basic_string::const_iterator.
1848
1849 2020-11-20 Jonathan Wakely <jwakely@redhat.com>
1850
1851 PR libstdc++/97876
1852 * include/std/stop_token (_Stop_state_t): Define default
1853 constructor as user-provided not defaulted.
1854
1855 2020-11-20 Jonathan Wakely <jwakely@redhat.com>
1856
1857 Backported from master:
1858 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
1859
1860 PR libstdc++/95989
1861 * config/os/gnu-linux/os_defines.h (_GLIBCXX_NATIVE_THREAD_ID):
1862 Define new macro to get reliable thread ID.
1863 * include/std/stop_token (_Stop_state_t::_M_request_stop):
1864 Use new macro if it's defined.
1865 (_Stop_state_t::_M_remove_callback): Likewise.
1866 * include/std/thread (this_thread::get_id): Likewise.
1867 * testsuite/30_threads/jthread/95989.cc: New test.
1868 * testsuite/30_threads/this_thread/95989.cc: New test.
1869
1870 2020-11-18 Patrick Palka <ppalka@redhat.com>
1871
1872 Backported from master:
1873 2020-11-18 Patrick Palka <ppalka@redhat.com>
1874
1875 * include/std/ranges (join_view::_Iterator::_M_satisfy): Uglify
1876 local variable inner.
1877 (join_view::_Iterator::operator->): Use _Inner_iter instead of
1878 _Outer_iter in the function signature as per LWG 3500.
1879 * testsuite/std/ranges/adaptors/join.cc (test08): Test it.
1880
1881 2020-11-18 Jonathan Wakely <jwakely@redhat.com>
1882
1883 Backported from master:
1884 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
1885
1886 * include/std/ranges (join_view): Remove deduction guide.
1887 (views::join): Add explicit template argument list to prevent
1888 deducing the wrong type.
1889 * testsuite/std/ranges/adaptors/join.cc: Move test for LWG 3474
1890 here, from ...
1891 * testsuite/std/ranges/adaptors/join_lwg3474.cc: Removed.
1892
1893 2020-11-18 Jonathan Wakely <jwakely@redhat.com>
1894
1895 Backported from master:
1896 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1897
1898 * include/std/ranges (join_view): Add deduction guide (LWG 3474).
1899 * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test.
1900
1901 2020-11-18 Jonathan Wakely <jwakely@redhat.com>
1902
1903 Backported from master:
1904 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1905
1906 * include/std/version (__cpp_lib_array_constexpr)
1907 (__cpp_lib_constexpr_char_traits): Only define C++17 value when
1908 compiling C++17.
1909
1910 2020-11-18 Jonathan Wakely <jwakely@redhat.com>
1911
1912 Backported from master:
1913 2020-06-15 Jonathan Wakely <jwakely@redhat.com>
1914
1915 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
1916 Update value for C++20.
1917 * include/std/version (__cpp_lib_constexpr_char_traits): Likewise.
1918 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
1919 Update expected value.
1920
1921 2020-11-18 Jonathan Wakely <jwakely@redhat.com>
1922
1923 Backported from master:
1924 2020-11-17 Jonathan Wakely <jwakely@redhat.com>
1925
1926 PR libstdc++/97869
1927 * include/precompiled/stdc++.h: Include <coroutine>.
1928 * include/std/version (__cpp_lib_span): Check __cpp_lib_concepts
1929 before defining.
1930
1931 2020-11-17 Patrick Palka <ppalka@redhat.com>
1932
1933 Backported from master:
1934 2020-11-17 Patrick Palka <ppalka@redhat.com>
1935
1936 PR libstdc++/97828
1937 * include/bits/ranges_algo.h (__search_n_fn::operator()): Check
1938 random_access_iterator before using the backtracking
1939 implementation. When the backwards scan fails prematurely,
1940 reset __remainder appropriately.
1941 * testsuite/25_algorithms/search_n/97828.cc: New test.
1942
1943 2020-11-16 Jonathan Wakely <jwakely@redhat.com>
1944
1945 Backported from master:
1946 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
1947
1948 PR libstdc++/93456
1949 * src/c++11/futex.cc (relative_timespec): Remove redundant check
1950 negative values.
1951 * testsuite/30_threads/future/members/93456.cc: New.
1952
1953 2020-11-16 Jonathan Wakely <jwakely@redhat.com>
1954
1955 Backported from master:
1956 2020-11-16 Jonathan Wakely <jwakely@redhat.com>
1957
1958 * src/c++11/futex.cc (relative_timespec): New function to
1959 create relative time from two absolute times.
1960 (__atomic_futex_unsigned_base::_M_futex_wait_until): Use
1961 relative_timespec.
1962
1963 2020-11-16 Jonathan Wakely <jwakely@redhat.com>
1964
1965 Backported from master:
1966 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
1967
1968 * include/std/future (future::wait_for): Do not wait for
1969 durations less than or equal to zero.
1970 * testsuite/30_threads/future/members/poll.cc: New test.
1971
1972 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
1973
1974 Backported from master:
1975 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
1976
1977 PR libstdc++/97798
1978 * include/ext/numeric_traits.h (__glibcxx_signed)
1979 (__glibcxx_digits, __glibcxx_min, __glibcxx_max): Remove
1980 macros.
1981 (__is_integer_nonstrict::__width): Define new constant.
1982 (__numeric_traits_integer): Define constants in terms of each
1983 other and __is_integer_nonstrict::__width, rather than the
1984 removed macros.
1985 (_GLIBCXX_INT_N_TRAITS): Macro to define explicit
1986 specializations for non-standard integer types.
1987
1988 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
1989
1990 PR libstdc++/96042
1991 * testsuite/std/ranges/iota/96042.cc: Only assert that the
1992 difference type is wider than long long if __int128 is
1993 supported.
1994
1995 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
1996
1997 Backported from master:
1998 2020-08-20 Jonathan Wakely <jwakely@redhat.com>
1999
2000 * include/bits/iterator_concepts.h [__STRICT_ANSI__]
2001 (incrementable_traits<__int128>): Define specialization.
2002 (incrementable_traits<unsigned __int128>): Likewise.
2003 * testsuite/std/ranges/iota/96042.cc: Test iota_view with
2004 __int128.
2005
2006 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
2007
2008 Backported from master:
2009 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2010 Patrick Palka <ppalka@redhat.com>
2011
2012 PR libstdc++/96042
2013 * include/bits/range_access.h (__detail::__to_unsigned_like):
2014 Do not use make_unsigned_t<T> in the return type, as it can
2015 result in an error before the integral<T> constraint is checked.
2016 [__STRICT_ANSI__]: Add overloads for 128-bit integer types.
2017 (__detail::__make_unsigned_like_t): Define as the return type
2018 of __to_unsigned_like.
2019 * testsuite/std/ranges/subrange/96042.cc: New test.
2020
2021 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
2022
2023 Backported from master:
2024 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2025
2026 PR libstdc++/96042
2027 * include/ext/numeric_traits.h (__is_integer_nonstrict): New
2028 trait which is true for 128-bit integers even in strict modes.
2029 (__numeric_traits_integer, __numeric_traits): Use
2030 __is_integer_nonstrict instead of __is_integer.
2031 * include/std/limits [__STRICT_ANSI__ && __SIZEOF_INT128__]
2032 (numeric_limits<__int128>, (numeric_limits<unsigned __int128>):
2033 Define.
2034 * testsuite/std/ranges/iota/96042.cc: New test.
2035
2036 2020-11-11 Paul Scharnofske <asynts@gmail.com>
2037
2038 Backported from master:
2039 2020-11-11 Paul Scharnofske <asynts@gmail.com>
2040
2041 * include/std/thread (jthread::operator=(jthread&&)): Transfer
2042 any existing state to a temporary that will request a stop and
2043 then join.
2044 * testsuite/30_threads/jthread/jthread.cc: Test move assignment.
2045
2046 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
2047
2048 Backported from master:
2049 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
2050
2051 PR libstdc++/96269
2052 * include/std/optional (operator==, operator!=, operator<)
2053 (operator>, operator<=, operator>=): Fix types used in
2054 SFINAE constraints.
2055 * testsuite/20_util/optional/relops/96269.cc: New test.
2056
2057 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
2058
2059 Backported from master:
2060 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
2061
2062 PR libstdc++/97731
2063 * src/filesystem/dir.cc (recursive_directory_iterator): Call the
2064 right overload of _Dir::advance.
2065 * testsuite/experimental/filesystem/iterators/97731.cc: New test.
2066
2067 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
2068
2069 Backported from master:
2070 2020-10-10 Jonathan Wakely <jwakely@redhat.com>
2071
2072 PR libstdc++/97362
2073 * doc/html/manual/source_code_style.html: Regenerate.
2074 * doc/xml/manual/appendix_contributing.xml: Add __deref to
2075 BADNAMES.
2076 * include/debug/functions.h (_Irreflexive_checker::__deref):
2077 Rename to __ref.
2078 * testsuite/17_intro/badnames.cc: Check __deref.
2079
2080 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
2081
2082 Backported from master:
2083 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
2084
2085 PR libstdc++/92285
2086 * doc/xml/manual/evolution.xml: Document change to base class.
2087 * doc/html/manual/api.html: Regenerate.
2088
2089 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
2090
2091 * doc/xml/manual/evolution.xml: Document new C++20 headers.
2092 * doc/html/*: Regenerate.
2093
2094 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
2095
2096 Backported from master:
2097 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
2098
2099 * doc/xml/manual/evolution.xml: Document deprecation of
2100 __is_nullptr_t and removal of std::allocator members.
2101 * doc/html/manual/api.html: Regenerate.
2102
2103 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
2104
2105 Backported from master:
2106 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
2107
2108 * doc/xml/manual/containers.xml: Replace <xref> with <link>.
2109 * doc/xml/manual/evolution.xml: Likewise.
2110 * doc/html/manual/api.html: Regenerate.
2111 * doc/html/manual/containers.html: Regenerate.
2112
2113 2020-10-29 Patrick Palka <ppalka@redhat.com>
2114
2115 Backported from master:
2116 2020-10-29 Patrick Palka <ppalka@redhat.com>
2117
2118 * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
2119 (test03): Fix initializing the vector vy with the array y of size 4.
2120
2121 2020-10-28 Patrick Palka <ppalka@redhat.com>
2122
2123 Backported from master:
2124 2020-10-23 Patrick Palka <ppalka@redhat.com>
2125
2126 * include/std/ranges (single_view::single_view): Mark the
2127 in place constructor explicit as per LWG 3428.
2128 (take_view): Remove the constraint on the deduction guide's
2129 template parameter as per LWG 3447.
2130
2131 2020-10-21 Patrick Palka <ppalka@redhat.com>
2132
2133 Backported from master:
2134 2020-09-22 Patrick Palka <ppalka@redhat.com>
2135
2136 * include/std/span (span::front): Remove static_assert.
2137 (span::back): Likewise.
2138 (span::operator[]): Likewise.
2139 * testsuite/23_containers/span/back_neg.cc: Rewrite to verify
2140 that we check the preconditions of back() only when it's called.
2141 * testsuite/23_containers/span/front_neg.cc: Likewise for
2142 front().
2143 * testsuite/23_containers/span/index_op_neg.cc: Likewise for
2144 operator[].
2145
2146 2020-10-21 Patrick Palka <ppalka@redhat.com>
2147
2148 Backported from master:
2149 2020-10-12 Patrick Palka <ppalka@redhat.com>
2150
2151 * include/std/ranges (take_while_view::begin): Constrain the
2152 const overload further as per LWG 3450.
2153 (take_while_view::end): Likewise.
2154 * testsuite/std/ranges/adaptors/take_while.cc: Add test for LWG
2155 3450.
2156
2157 2020-10-21 Patrick Palka <ppalka@redhat.com>
2158
2159 Backported from master:
2160 2020-09-22 Patrick Palka <ppalka@redhat.com>
2161
2162 * include/bits/stl_algo.h (__sample): Exit early when the
2163 input range is empty.
2164 * testsuite/25_algorithms/sample/3.cc: New test.
2165
2166 2020-10-21 Patrick Palka <ppalka@redhat.com>
2167
2168 Backported from master:
2169 2020-09-22 Patrick Palka <ppalka@redhat.com>
2170
2171 * include/bits/stl_algo.h (for_each_n): Mark constexpr for C++20.
2172 (search): Likewise for the overload that takes a searcher.
2173 * testsuite/25_algorithms/for_each/constexpr.cc: Test constexpr
2174 std::for_each_n.
2175 * testsuite/25_algorithms/search/constexpr.cc: Test constexpr
2176 std::search overload that takes a searcher.
2177
2178 2020-10-21 Patrick Palka <ppalka@redhat.com>
2179
2180 Backported from master:
2181 2020-08-27 Patrick Palka <ppalka@redhat.com>
2182
2183 PR libstdc++/95322
2184 * include/std/ranges (transform_view::sentinel::__distance_from):
2185 Give this a deduced return type.
2186 (transform_view::sentinel::operator-): Adjust the return type so
2187 that it's based on the constness of the iterator rather than
2188 that of the sentinel.
2189 * testsuite/std/ranges/adaptors/95322.cc: Refer to LWG 3488.
2190
2191 2020-10-21 Patrick Palka <ppalka@redhat.com>
2192
2193 Backported from master:
2194 2020-08-27 Patrick Palka <ppalka@redhat.com>
2195
2196 * include/std/ranges (elements_view::begin): Adjust constraints.
2197 (elements_view::end): Likewise.
2198 (elements_view::_Sentinel::operator==): Templatize to take both
2199 _Iterator<true> and _Iterator<false>.
2200 (elements_view::_Sentinel::operator-): Likewise.
2201 * testsuite/std/ranges/adaptors/elements.cc: Add testcase for
2202 the example from P1994R1.
2203 * testsuite/std/ranges/adaptors/lwg3406.cc: New test.
2204
2205 2020-10-21 Patrick Palka <ppalka@redhat.com>
2206
2207 Backported from master:
2208 2020-08-27 Patrick Palka <ppalka@redhat.com>
2209
2210 * include/std/ranges (elements_view::end): Replace these two
2211 overloads with four new overloads.
2212 (elements_view::_Iterator::operator==): Remove.
2213 (elements_view::_Iterator::operator-): Likewise.
2214 (elements_view::_Sentinel): Define.
2215
2216 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
2217
2218 Backported from master:
2219 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2220
2221 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2222 Use gdb.Type.strip_typedefs().
2223 * testsuite/libstdc++-prettyprinters/compat.cc: Use a typedef in
2224 the emulated old type.
2225
2226 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
2227
2228 Backported from master:
2229 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2230
2231 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2232 (basic_string(const _CharT*, const _Alloc&)): Constrain to
2233 require an allocator-like type to fix CTAD ambiguity (LWG 3706).
2234 Define inline.
2235 * include/bits/basic_string.tcc [!_GLIBCXX_USE_CXX11_ABI]
2236 (basic_string(const _CharT*, const _Alloc&)): Remove non-inline
2237 definition.
2238 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
2239 Remove dg-skip-if.
2240 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
2241 Likewise.
2242
2243 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
2244
2245 Backported from master:
2246 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2247
2248 * testsuite/21_strings/basic_string/allocator/char/minimal.cc:
2249 Do not require cxx11-abi effective target.
2250 * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
2251 Likewise.
2252 * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
2253
2254 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
2255
2256 Backported from master:
2257 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
2258
2259 * include/bits/ios_base.h (ios_base::failure): Add constructors
2260 takeing error_code argument. Add code() member function.
2261 * testsuite/27_io/ios_base/failure/cxx11.cc: Allow test to
2262 run for the old ABI but do not check for derivation from
2263 std::system_error.
2264 * testsuite/27_io/ios_base/failure/error_code.cc: New test.
2265
2266 2020-10-20 Nuno Lopes <nuno.lopes@ist.utl.pt>
2267
2268 Backported from master:
2269 2020-10-13 Nuno Lopes <nuno.lopes@ist.utl.pt>
2270
2271 * include/bits/stl_algo.h (any_of): Fix incorrect description
2272 in comment.
2273
2274 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
2275
2276 Backported from master:
2277 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
2278
2279 * include/bits/stl_algobase.h (copy, move, copy_backward)
2280 (move_backward): Fix documentation for returned iterator.
2281
2282 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
2283
2284 Backported from master:
2285 2020-09-24 Jonathan Wakely <jwakely@redhat.com>
2286
2287 * doc/xml/manual/configure.xml: Correct name of option.
2288 * doc/html/*: Regenerate.
2289
2290 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
2291
2292 Backported from master:
2293 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2294
2295 PR libstdc++/97132
2296 * include/std/memory (assume_aligned): Do not use
2297 __builtin_assume_aligned during constant evaluation.
2298 * testsuite/20_util/assume_aligned/1.cc: Improve test.
2299 * testsuite/20_util/assume_aligned/97132.cc: New test.
2300
2301 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
2302
2303 Backported from master:
2304 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
2305
2306 * include/std/concepts: Fix typos in copyright notice.
2307 * include/std/ranges: Likewise.
2308
2309 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
2310
2311 * doc/xml/manual/status_cxx2020.xml: Remove red background for
2312 completed feature.
2313 * doc/html/manual/status.html: Regenerate.
2314
2315 2020-10-13 Patrick Palka <ppalka@redhat.com>
2316
2317 Backported from master:
2318 2020-10-08 Patrick Palka <ppalka@redhat.com>
2319
2320 PR libstdc++/95788
2321 * include/bits/ranges_uninitialized.h:
2322 (__construct_at_fn::operator()): Rewrite in terms of
2323 std::construct_at. Declare it conditionally noexcept. Qualify
2324 calls to declval in its requires-clause.
2325 * testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
2326 New test.
2327
2328 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
2329
2330 Backported from master:
2331 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
2332
2333 * include/bits/random.h (seed_seq(initializer_list<T>)): Rename
2334 parameter to use reserved name.
2335 * include/bits/ranges_algo.h (shift_left, shift_right): Rename
2336 template parameters to use reserved name.
2337 * testsuite/17_intro/names.cc: Check "il". Do not check "d" and
2338 "y" in C++20 mode.
2339
2340 2020-10-06 Patrick Palka <ppalka@redhat.com>
2341
2342 Backported from master:
2343 2020-10-02 Patrick Palka <ppalka@redhat.com>
2344
2345 * include/bits/stl_iterator.h (reverse_iterator::iter_move):
2346 Define for C++20 as per P0896.
2347 (reverse_iterator::iter_swap): Likewise.
2348 (move_iterator::operator*): Apply P0896 changes for C++20.
2349 (move_iterator::operator[]): Likewise.
2350 * testsuite/24_iterators/reverse_iterator/cust.cc: New test.
2351
2352 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
2353
2354 Backported from master:
2355 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
2356
2357 PR libstdc++/97167
2358 * src/c++17/fs_path.cc (path::_Parser::root_path()): Check
2359 for empty string before inspecting the first character.
2360 * testsuite/27_io/filesystem/path/append/source.cc: Append
2361 empty string_view to path.
2362
2363 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
2364
2365 Backported from master:
2366 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
2367
2368 PR libstdc++/96803
2369 * include/std/tuple
2370 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
2371 Use correct value category in __use_alloc call.
2372 * testsuite/20_util/tuple/cons/96803.cc: Check with constructors
2373 that require correct value category to be used.
2374
2375 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
2376
2377 Backported from master:
2378 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2379
2380 PR libstdc++/96803
2381 * include/std/tuple
2382 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
2383 Replace parameter pack with a type parameter and a pack and pass
2384 the first type to __use_alloc.
2385 * testsuite/20_util/tuple/cons/96803.cc: New test.
2386
2387 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2388
2389 Backported from master:
2390 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2391
2392 PR libstdc++/94681
2393 * src/c++17/fs_ops.cc (read_symlink): Use posix::lstat instead
2394 of calling ::lstat directly.
2395 * src/filesystem/ops.cc (read_symlink): Likewise.
2396
2397 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2398
2399 Backported from master:
2400 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2401
2402 PR libstdc++/94681
2403 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
2404 $enable_libstdcxx_filesystem_ts.
2405 * configure: Regenerate.
2406
2407 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2408
2409 Backported from master:
2410 2020-09-20 Jonathan Wakely <jwakely@redhat.com>
2411
2412 PR libstdc++/97101
2413 * include/std/functional (bind_front): Fix order of parameters
2414 in is_nothrow_constructible_v specialization.
2415 * testsuite/20_util/function_objects/bind_front/97101.cc: New test.
2416
2417 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2418
2419 Backported from master:
2420 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2421
2422 PR libstdc++/94160
2423 * src/c++17/memory_resource.cc (munge_options): Round
2424 max_blocks_per_chunk to a multiple of four.
2425 (__pool_resource::_M_alloc_pools()): Simplify slightly.
2426 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
2427 Check that valid pointers are returned when small values are
2428 used for max_blocks_per_chunk.
2429
2430 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
2431
2432 Backported from master:
2433 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
2434
2435 * include/Makefile.am: Remove bits/int_limits.h.
2436 * include/Makefile.in: Regenerate.
2437 * include/bits/int_limits.h: Removed.
2438 * include/bits/parse_numbers.h (_Select_int_base): Replace
2439 __int_limits with __int_traits.
2440 * include/bits/range_access.h (_SSize::operator()): Likewise.
2441 * include/ext/numeric_traits.h (__numeric_traits_integer): Add
2442 static assertion.
2443 (__int_traits): New alias template.
2444 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
2445 (__countr_zero, __countr_one, __popcount, __bit_ceil)
2446 (__bit_floor, __bit_width) Replace __int_limits with
2447 __int_traits.
2448 * include/std/charconv (__to_chars_8, __from_chars_binary)
2449 (__from_chars_alpha_to_num, from_chars): Likewise.
2450 * include/std/memory_resource (polymorphic_allocator::allocate)
2451 (polymorphic_allocator::allocate_object): Likewise.
2452 * include/std/string_view (basic_string_view::_S_compare):
2453 Likewise.
2454 * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
2455
2456 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
2457
2458 Backported from master:
2459 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
2460
2461 PR libstdc++/92978
2462 * include/std/numeric (__abs_integral): Replace with ...
2463 (__detail::__absu): New function template that returns an
2464 unsigned type, guaranteeing it can represent the most
2465 negative signed value.
2466 (__detail::__gcd, __detail::__lcm): Require arguments to
2467 be unsigned and therefore already non-negative.
2468 (gcd, lcm): Convert arguments to absolute value as unsigned
2469 type before calling __detail::__gcd or __detail::__lcm.
2470 * include/experimental/numeric (gcd, lcm): Likewise.
2471 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust expected
2472 errors.
2473 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
2474 * testsuite/26_numerics/gcd/92978.cc: New test.
2475 * testsuite/26_numerics/lcm/92978.cc: New test.
2476 * testsuite/experimental/numeric/92978.cc: New test.
2477
2478 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
2479
2480 Backported from master:
2481 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
2482
2483 PR libstdc++/96851
2484 * include/bits/cpp_type_traits.h (__is_memcmp_ordered):
2485 New trait that says if memcmp can be used for ordering.
2486 (__is_memcmp_ordered_with): Likewise, for two types.
2487 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
2488 Use new traits instead of __is_byte and __numeric_traits.
2489 * include/bits/stl_algobase.h (__lexicographical_compare_aux1)
2490 (__is_byte_iter): Likewise.
2491 * include/std/array (operator<=>): Likewise. Only use memcmp
2492 when std::is_constant_evaluated() is false.
2493 * testsuite/23_containers/array/comparison_operators/96851.cc:
2494 New test.
2495 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
2496 Adjust dg-error line numbers.
2497
2498 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
2499
2500 * include/bits/stl_iterator.h (counted_iterator::operator++(int)):
2501 Use __throw_exception_again macro.
2502
2503 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2504
2505 Backported from master:
2506 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2507
2508 PR libstdc++/71960
2509 * include/experimental/string_view (basic_string_view):
2510 Enable debug assertions.
2511 * include/std/string_view (basic_string_view):
2512 Likewise.
2513
2514 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2515
2516 Backported from master:
2517 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2518
2519 PR libstdc++/96766
2520 * include/std/variant (_Variant_storage): Replace implicit
2521 conversions from size_t to __index_type with explicit casts.
2522
2523 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
2524
2525 Backported from master:
2526 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
2527
2528 PR libstdc++/96718
2529 * testsuite/25_algorithms/pstl/feature_test-2.cc: Require
2530 tbb-backend effective target.
2531 * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
2532 * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
2533 * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
2534
2535 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2536
2537 Backported from master:
2538 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2539
2540 * include/bits/c++config (_GLIBCXX_DEPRECATED_SUGGEST): New
2541 macro for "use 'foo' instead" message in deprecated warnings.
2542 * include/bits/ios_base.h (io_state, open_mode, seek_dir)
2543 (streampos, streamoff): Use _GLIBCXX_DEPRECATED_SUGGEST.
2544 * include/std/streambuf (stossc): Replace C++11 attribute
2545 with _GLIBCXX_DEPRECATED_SUGGEST.
2546 * include/std/type_traits (__is_nullptr_t): Use
2547 _GLIBCXX_DEPRECATED_SUGGEST instead of _GLIBCXX_DEPRECATED.
2548 * testsuite/27_io/types/1.cc: Check for deprecated warnings.
2549 Also check for io_state, open_mode and seek_dir typedefs.
2550
2551 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2552
2553 PR libstdc++/89760
2554 * testsuite/experimental/net/execution_context/make_service.cc:
2555 Add dg-require-gthreads.
2556 * testsuite/experimental/net/executor/1.cc: Likewise.
2557 * testsuite/experimental/net/headers.cc: Likewise.
2558 * testsuite/experimental/net/internet/address/v4/comparisons.cc:
2559 Likewise.
2560 * testsuite/experimental/net/internet/address/v4/cons.cc:
2561 Likewise.
2562 * testsuite/experimental/net/internet/address/v4/creation.cc:
2563 Likewise.
2564 * testsuite/experimental/net/internet/address/v4/members.cc:
2565 Likewise.
2566 * testsuite/experimental/net/internet/resolver/base.cc:
2567 Likewise.
2568 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
2569 Likewise.
2570 * testsuite/experimental/net/internet/resolver/ops/reverse.cc:
2571 Likewise.
2572 * testsuite/experimental/net/socket/basic_socket.cc: Likewise.
2573 * testsuite/experimental/net/timer/waitable/cons.cc: Likewise.
2574 * testsuite/experimental/net/timer/waitable/dest.cc: Likewise.
2575 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
2576
2577 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2578
2579 Backported from master:
2580 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2581
2582 PR libstdc++/95749
2583 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
2584 (stat_type): Change to __stat64.
2585 (stat): Use _wstat64.
2586
2587 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2588
2589 Backported from master:
2590 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2591
2592 PR libstdc++/96303
2593 * include/debug/bitset (bitset::operator==): Call _M_base() on
2594 right operand.
2595 (bitset::operator!=): Likewise, but don't define it at all when
2596 default comparisons are supported by the compiler.
2597 * testsuite/23_containers/bitset/operations/96303.cc: New test.
2598
2599 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
2600
2601 Backported from master:
2602 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
2603
2604 PR libstdc++/96484
2605 * src/c++17/fs_ops.cc (fs::read_symlink): Return an error
2606 immediately for non-symlinks.
2607 * src/filesystem/ops.cc (fs::read_symlink): Likewise.
2608
2609 2020-07-23 Release Manager
2610
2611 * GCC 10.2.0 released.
2612
2613 2020-07-09 Jonathan Wakely <jwakely@redhat.com>
2614
2615 Backported from master:
2616 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
2617
2618 * include/bits/unique_ptr.h (operator<<): Define for C++20.
2619 * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
2620 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
2621 line number.
2622 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
2623
2624 2020-07-09 Jonathan Wakely <jwakely@redhat.com>
2625
2626 Backported from master:
2627 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
2628
2629 PR libstdc++/95322
2630 * include/std/ranges (transform_view::_Sentinel): Allow hidden
2631 friends to work with _Iterator<true> and _Iterator<false>.
2632 (join_view::_Sentinel): Likewise.
2633 * testsuite/std/ranges/adaptors/95322.cc: New test.
2634
2635 2020-07-09 Jonathan Wakely <jwakely@redhat.com>
2636
2637 Backported from master:
2638 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
2639
2640 PR libstdc++/94936
2641 * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
2642 Add comment about single-threaded behaviour.
2643 (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
2644 class member access out of loop.
2645 (synchronized_pool_resource::synchronized_pool_resource())
2646 (synchronized_pool_resource::~synchronized_pool_resource())
2647 (synchronized_pool_resource::release()): Check __gthread_active_p
2648 before creating and/or deleting the thread-specific data key.
2649 (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
2650 assertions.
2651 (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
2652 path for single-threaded case.
2653 (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
2654 Likewise. Return if unable to find a pool that owns the allocation.
2655 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
2656 New test.
2657 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
2658 test.
2659 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
2660 test.
2661
2662 2020-07-09 Jonathan Wakely <jwakely@redhat.com>
2663
2664 Backported from master:
2665 2020-05-19 Jonathan Wakely <jwakely@redhat.com>
2666
2667 PR libstdc++/94087
2668 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
2669 passed in.
2670 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
2671 fallback.
2672 (random_device::_M_init): Use __x86_rdseed_rdrand when both
2673 instructions are available.
2674 * testsuite/26_numerics/random/random_device/94087.cc: New test.
2675
2676 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
2677
2678 Backported from master:
2679 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
2680
2681 PR libstdc++/91807
2682 * include/std/variant
2683 (_Copy_assign_base::operator=(const _Copy_assign_base&):
2684 Do the move-assignment from a temporary so that the temporary
2685 is constructed with an explicit index.
2686 * testsuite/20_util/variant/91807.cc: New.
2687
2688 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
2689
2690 Backported from master:
2691 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
2692
2693 PR libstdc++/91153
2694 PR target/93224
2695 * testsuite/29_atomics/atomic_float/1.cc: Use different values
2696 for tests.
2697 * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
2698
2699 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
2700
2701 Backported from master:
2702 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
2703
2704 PR libstdc++/95282
2705 * include/bits/atomic_base.h (__atomic_impl::load): Add
2706 const-qualifier to parameter so that _Tp is deduced as the
2707 non-const type, and use _Val to get the unqualified type.
2708 (__atomic_impl::exchange): Use the _Val alias to remove
2709 volatile from the reinterpret_cast result type.
2710 * testsuite/29_atomics/atomic_float/95282.cc: New test.
2711
2712 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
2713
2714 Backported from master:
2715 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
2716
2717 PR libstdc++/94627
2718 * include/bits/regex.h (operator==, operator!=): Remove noexcept
2719 equality comparisons for match_results.
2720 * testsuite/28_regex/match_results/94627.cc: New test.
2721
2722 2020-06-29 Ville Voutilainen <ville.voutilainen@gmail.com>
2723
2724 Backported from master:
2725 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2726
2727 PR libstdc++/95915
2728 * include/std/variant (_Uninitialized):
2729 Adjust the condition and the comment.
2730 * testsuite/20_util/variant/95915.cc: New.
2731 * testsuite/20_util/variant/compile.cc: Add new test.
2732
2733 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
2734
2735 Backported from master:
2736 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
2737
2738 * include/std/charconv (__from_chars_binary): Ignore leading zeros.
2739 * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
2740 not just 10 and 16.
2741 * testsuite/20_util/from_chars/3.cc: New test.
2742
2743 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
2744
2745 Backported from master:
2746 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
2747
2748 * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
2749 * include/std/charconv (__detail::__to_chars): Avoid
2750 -Wsign-compare warning.
2751
2752 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
2753
2754 Backported from master:
2755 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
2756
2757 PR libstdc++/95851
2758 * include/std/charconv (__to_chars_i): Check for zero-sized
2759 buffer unconditionally.
2760 * testsuite/20_util/to_chars/95851.cc: New test.
2761
2762 2020-06-22 Jason Merrill <jason@redhat.com>
2763
2764 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
2765 Remove greedy_ops tests.
2766 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
2767 Remove greedy_ops tests.
2768
2769 2020-06-11 Patrick Palka <ppalka@redhat.com>
2770
2771 PR libstdc++/95578
2772 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
2773 Also check that the iterator and sentinel have the same type before
2774 applying the unwrapping optimization for __normal_iterator.
2775 Split the check into two, one for the first iterator/sentinel
2776 pair and another for second iterator/sentinel pair. Remove uses
2777 of __niter_base, and remove uses of std::move on a
2778 __normal_iterator.
2779 * include/bits/ranges_algobase.h (__equal_fn): Likewise.
2780 (__copy_or_move): Likewise. Perform similar adjustments for
2781 the reverse_iterator and move_iterator optimizations. Inline
2782 the checks into the if-constexprs, and use using-declarations to
2783 make them less visually noisy. Remove uses of __niter_wrap.
2784 (__copy_or_move_backward): Likewise.
2785 * testsuite/25_algorithms/copy/95578.cc: New test.
2786 * testsuite/25_algorithms/copy_backward/95578.cc: New test.
2787 * testsuite/25_algorithms/equal/95578.cc: New test.
2788 * testsuite/25_algorithms/lexicographical_compare/95578.cc: New test.
2789 * testsuite/25_algorithms/move/95578.cc: New test.
2790 * testsuite/25_algorithms/move_backward/95578.cc: New test.
2791
2792 2020-05-28 Patrick Palka <ppalka@redhat.com>
2793
2794 PR libstdc++/95322
2795 * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
2796 Remove and instead define it ...
2797 (common_iterator::_Proxy): ... here.
2798 (common_iterator::operator->): Use it.
2799 * testsuite/24_iterators/common_iterator/2.cc: New test.
2800 * testsuite/std/ranges/adaptors/95322.cc: New test.
2801
2802 2020-05-26 Alexandre Oliva <oliva@adacore.com>
2803
2804 PR libstdc++/77691
2805 * include/experimental/memory_resource
2806 (__resource_adaptor_imp::do_allocate): Handle max_align_t on
2807 x86-vxworks as on x86-solaris.
2808 (__resource_adaptor_imp::do_deallocate): Likewise.
2809 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2810 Drop xfail.
2811 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
2812 (test03): Drop max-align test for char-aligned alloc.
2813
2814 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
2815
2816 Backport from mainline
2817 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
2818
2819 * include/bits/fs_path.h (__detail::_S_range_begin)
2820 (__detail::_S_range_end): Remove unintentional static specifiers.
2821 * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
2822 (__detail::_S_range_end): Likewise.
2823
2824 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
2825
2826 Backport from mainline
2827 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
2828
2829 PR libstdc++/95289
2830 * include/debug/helper_functions.h (__get_distance): Only declare
2831 as a constexpr function for C++14 and up.
2832 * testsuite/25_algorithms/copy/debug/95289.cc: New test.
2833
2834 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
2835
2836 Backport from mainline
2837 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
2838
2839 * include/experimental/executor (use_future_t::use_future_t()): Fix
2840 incorrect noexcept-specifier.
2841 * include/experimental/internet (basic_resolver_results): Adjust
2842 whitespace.
2843 * include/experimental/socket (__basic_socket_impl::release): Add
2844 member function.
2845 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
2846 target constructor.
2847 (basic_socket::release(), basic_socket::release(error_code&)): Add
2848 missing member functions.
2849 (basic_socket::is_open()): Add nodiscard attribute.
2850 (basic_socket::close(error_code&)): Pass argument to base function.
2851 (basic_socket_acceptor::release())
2852 (basic_socket_acceptor::release(error_code&)): Add missing member
2853 functions.
2854 (basic_socket_acceptor::is_open()): Add nodiscard attribute.
2855 (basic_socket_streambuf::error()): Add noexcept.
2856 (basic_socket_iostream::error()): Likewise.
2857 * testsuite/experimental/net/socket/basic_socket.cc: New test.
2858
2859 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
2860
2861 Backport from mainline
2862 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
2863
2864 PR libstdc++/93983
2865 * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
2866 Reorder constraints to avoid recursion when constructors use
2867 iterator_traits (LWG 3420).
2868 * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
2869
2870 2020-05-12 Jonathan Wakely <jwakely@redhat.com>
2871
2872 Backport from mainline
2873 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
2874
2875 PR libstdc++/94906
2876 * src/c++17/memory_resource.cc
2877 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
2878 operands.
2879
2880 Backport from mainline
2881 2020-05-03 Jonathan Wakely <jwakely@redhat.com>
2882
2883 PR libstdc++/94933
2884 * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
2885 usable in constant expressions.
2886 * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
2887 non-scalars.
2888
2889 2020-05-07 Jonathan Wakely <jwakely@redhat.com>
2890
2891 Backport from mainline
2892 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
2893 Patrick Palka <ppalka@redhat.com>
2894
2895 PR libstdc++/92894
2896 * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
2897 Add trait to determine return type and an alias for it.
2898 (ranges::__cust_imove::_IMove::operator()): Use __result instead of
2899 deduced return type.
2900 * testsuite/24_iterators/customization_points/92894.cc: New test.
2901 * testsuite/24_iterators/indirect_callable/92894.cc: New test.
2902
2903 2020-05-07 Release Manager
2904
2905 * GCC 10.1.0 released.
2906
2907 2020-05-07 Eric Botcazou <ebotcazou@adacore.com>
2908
2909 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
2910 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
2911
2912 2020-05-06 H.J. Lu <hongjiu.lu@intel.com>
2913
2914 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
2915
2916 2020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2917
2918 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
2919 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
2920 Likewise.
2921 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
2922 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
2923 Likewise.
2924
2925 2020-05-06 Jonathan Wakely <jwakely@redhat.com>
2926
2927 * doc/xml/manual/abi.xml (abi.versioning.history): Document library
2928 versions for GCC 9.[123] and 10.1 releases.
2929 * doc/html/*: Regenerate.
2930
2931 2020-05-06 Jakub Jelinek <jakub@redhat.com>
2932
2933 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2934 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2935 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
2936 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2937 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2938 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2939 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2940
2941 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
2942
2943 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
2944 * doc/html/*: Regenerate.
2945
2946 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
2947
2948 Backport from mainline
2949 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
2950
2951 PR libstdc++/94901
2952 * include/std/type_traits (__is_complete_or_unbounded): Replace
2953 BADNAME _T with _Tp.
2954 * testsuite/17_intro/badnames.cc: New test.
2955
2956 2020-04-30 Jonathan Wakely <jwakely@redhat.com>
2957
2958 PR libstdc++/89510
2959 * include/bits/alloc_traits.h (allocator_traits::_S_construct)
2960 (allocator_traits::_S_destroy)
2961 (allocator_traits<allocator<T>>::construct): Use traits in
2962 noexcept-specifiers.
2963 * include/bits/allocator.h (allocator<void>::construct)
2964 (allocator<void>::destroy): Likewise.
2965 * include/ext/malloc_allocator.h (malloc_allocator::construct)
2966 (malloc_allocator::destroy): Likewise.
2967 * include/ext/new_allocator.h (new_allocator::construct)
2968 (new_allocator::destroy): Likewise.
2969 * testsuite/20_util/allocator/89510.cc: New test.
2970 * testsuite/ext/malloc_allocator/89510.cc: New test.
2971 * testsuite/ext/new_allocator/89510.cc: New test.
2972
2973 2020-04-29 Jonathan Wakely <jwakely@redhat.com>
2974
2975 PR libstdc++/94854
2976 * include/bits/basic_string.tcc: Update comment about explicit
2977 instantiations.
2978
2979 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
2980
2981 PR libstdc++/91480
2982 * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
2983 Remove non-standard macro.
2984 * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
2985 to indicate P1032R1 support.
2986 * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
2987 * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
2988 * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
2989 * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
2990 (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
2991 (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
2992 * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
2993 feature test macro.
2994 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
2995 * testsuite/21_strings/basic_string_view/operations/copy/char/
2996 constexpr.cc: Likewise.
2997 * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
2998
2999 PR libstdc++/94831
3000 * include/bits/alloc_traits.h (_S_construct): Restore placement
3001 new-expression for C++11/14/17 and call std::construct_at directly
3002 for C++20.
3003 * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
3004 function returning void.
3005 * testsuite/20_util/specialized_algorithms/
3006 uninitialized_value_construct/94831.cc: New test.
3007 * testsuite/23_containers/vector/cons/94831.cc: New test.
3008
3009 2020-04-28 Patrick Palka <ppalka@redhat.com>
3010
3011 LWG 3433 subrange::advance(n) has UB when n < 0
3012 * include/std/ranges (subrange::prev): Fix typo.
3013 (subrange::advance): Handle a negative argument as per the proposed
3014 resolution of LWG 3433.
3015 * testsuite/std/ranges/subrange/lwg3433.cc: New test.
3016
3017 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
3018 Iain Sandoe <iain@sandoe.co.uk>
3019
3020 PR c++/94759
3021 * include/std/coroutine: Implement handing for non-
3022 class coroutine return types.
3023
3024 2020-04-24 Jonathan Wakely <jwakely@redhat.com>
3025
3026 * include/experimental/executor (service_already_exists): Make default
3027 constructor public (LWG 3414).
3028 * testsuite/experimental/net/execution_context/make_service.cc: Check
3029 the service_already_exists can be default constructed.
3030
3031 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
3032 Jonathan Wakely <jwakely@redhat.com>
3033
3034 PR libstdc++/90415
3035 PR libstdc++/92156
3036 * include/std/any (any): Rename template parameters for consistency
3037 with the standard.
3038 (any::_Decay): Rename to _Decay_if_not_any.
3039 (any::any(T&&):: Remove is_constructible from constraints. Remove
3040 non-standard overload.
3041 (any::any(in_place_type_t<T>, Args&&...))
3042 (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
3043 (any::emplace(Args&&...))
3044 (any::emplace(initializer_list<U>, Args&&...)):
3045 Use decay_t instead of _Decay.
3046 * testsuite/20_util/any/cons/90415.cc: New test.
3047 * testsuite/20_util/any/cons/92156.cc: New Test.
3048 * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
3049 more robust.
3050 * testsuite/20_util/any/modifiers/92156.cc: New test.
3051
3052 2020-04-23 Jonathan Wakely <jwakely@redhat.com>
3053
3054 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
3055 * doc/html/*: Regenerate.
3056
3057 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
3058 value for C++17 to 201803L because P0858R0 is supported for C++17.
3059 * include/std/version (__cpp_lib_array_constexpr): Likewise.
3060 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
3061 Check for value corresponding to P0031R0 features being tested.
3062 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
3063 Check for value corresponding to P0858R0 features being tested.
3064
3065 * include/std/version (__cpp_lib_three_way_comparison): Define for
3066 freestanding builds.
3067
3068 2020-04-23 Thomas Rodgers <rodgert@appliantology.com>
3069
3070 * include/experimental/net/executor (system_context): Mark
3071 system_context::system_context() = delete.
3072 * testsuite/experimental/net/executor/1.cc: Add new
3073 test to check system_context is not default constructible.
3074
3075 2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
3076
3077 * include/std/coroutine: Update the inline namespace to __n4861.
3078 Add the __cpp_lib_coroutine define, set to 201902L.
3079 * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
3080
3081 2020-04-22 Jonathan Wakely <jwakely@redhat.com>
3082
3083 * include/std/execution (__cpp_lib_execution): Define to indicate
3084 support for P0024R2 and P1001R2.
3085 * include/std/version (__cpp_lib_execution): Define.
3086 * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
3087 defined by <algorithm>, move other tests to new tests ...
3088 * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
3089 * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
3090 * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
3091 * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
3092
3093 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
3094 different values for C++17 and C++20, to indicate different feature
3095 sets. Update value for C++20 to indicate P1032R1 support.
3096 * include/std/version (__cpp_lib_array_constexpr): Likewise.
3097 * testsuite/23_containers/array/comparison_operators/constexpr.cc:
3098 Check feature test macro.
3099 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
3100 New test.
3101 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
3102 feature test macro.
3103 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
3104 in C++17 mode and check feature test macro.
3105
3106 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
3107 here.
3108 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
3109 defined by <utility>.
3110
3111 * include/std/functional (__cpp_lib_concepts): Update macro value to
3112 indicate P1964R2 support.
3113 * include/std/version (__cpp_lib_concepts): Likewise.
3114 * testsuite/std/concepts/1.cc: Adjust expected value.
3115 * testsuite/std/concepts/2.cc: Likewise.
3116
3117 * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
3118 __cpp_lib_constexpr_functional.
3119 * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
3120 * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
3121
3122 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
3123 indicate P1006R1 support.
3124 (__cpp_lib_to_address): Define to indicate P0653R2 support.
3125 * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
3126 P1227R2 support.
3127 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
3128 P0769R2 support.
3129 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
3130 P0020R6 support.
3131 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
3132 P1007R3 support.
3133 * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
3134 Define to indicate P0339R6 support.
3135 * include/std/string_view (__cpp_lib_starts_ends_with): Define to
3136 indicate P0457R2 support.
3137 * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
3138 to indicate P0758R1 support.
3139 (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
3140 (__cpp_lib_type_identity): Define to indicate P0887R1 support.
3141 * include/std/version (__cpp_lib_atomic_float)
3142 (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
3143 (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
3144 (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
3145 (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
3146 (__cpp_lib_to_address): Define.
3147 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
3148
3149 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
3150 macro.
3151 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
3152 Likewise.
3153 * include/std/version (__cpp_lib_map_insertion)
3154 (__cpp_lib_unordered_map_insertion): Remove.
3155
3156 * include/std/condition_variable (__cpp_lib_jthread): Remove
3157 redundant definition.
3158 * include/std/stop_token (__cpp_lib_jthread): Update macro value to
3159 indicate P1869R1 support.
3160 * include/std/version (__cpp_lib_jthread): Update value.
3161 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
3162 for updated macro value.
3163 * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
3164 Likewise.
3165 * testsuite/30_threads/jthread/1.cc: Likewise.
3166 * testsuite/30_threads/jthread/2.cc: Likewise.
3167 * testsuite/30_threads/stop_token/1.cc: Likewise.
3168 * testsuite/30_threads/stop_token/2.cc: Likewise.
3169
3170 * testsuite/21_strings/basic_string/erasure.cc: Check for
3171 __cpp_lib_erase_if macro.
3172 * testsuite/23_containers/deque/erasure.cc: Add header name to #error
3173 messages.
3174 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
3175 * testsuite/23_containers/list/erasure.cc: Likewise.
3176 * testsuite/23_containers/map/erasure.cc: Likewise.
3177 * testsuite/23_containers/set/erasure.cc: Likewise.
3178 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3179 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
3180 * testsuite/23_containers/vector/erasure.cc: Likewise.
3181
3182 2020-04-21 Jonathan Wakely <jwakely@redhat.com>
3183
3184 * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
3185 to define operator<=>.
3186 * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
3187
3188 * doc/Makefile.am (xml_sources_manual): Add missing XML files.
3189 * doc/Makefile.in: Regenerate.
3190 * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
3191 of "this page".
3192 * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
3193 to the C++11 status table.
3194 * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
3195 proposals with table matching contents of the C++14 standard.
3196 * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
3197 the C++17 standard.
3198 * doc/html/*: Regenerate.
3199
3200 PR c++/94149
3201 * include/std/type_traits (__is_nt_constructible_impl): Add partial
3202 specializations for bounded arrays with non-empty initializers.
3203 * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
3204
3205 2020-04-20 Thomas Rodgers <trodgers@redhat.com>
3206
3207 * testsuite/lib/libstdc++.exp: Add additional_flags=
3208 -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
3209 compiling with a newer Thread Building Blocks.
3210
3211 2020-04-20 Jonathan Wakely <jwakely@redhat.com>
3212
3213 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
3214
3215 * testsuite/20_util/is_constructible/51185.cc: Make test class a
3216 non-aggregate so that the test verifies the same thing in all -std
3217 modes.
3218 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
3219 results for some types when paren-init for aggregates is supported.
3220
3221 * include/std/version (__cpp_lib_three_way_comparison): Update value.
3222 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
3223 (__detail::__synth3way): Add noexcept-specifier.
3224
3225 * include/bits/stl_map.h (map): Define operator<=> and remove
3226 operator< for C++20.
3227 * include/bits/stl_multimap.h (multimap): Likewise.
3228 * include/bits/stl_multiset.h (multiset): Likewise.
3229 * include/bits/stl_set.h (set): Likewise.
3230 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3231 (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
3232 operator!= for C++20.
3233 * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
3234 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
3235 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
3236 * include/debug/set.h (__gnu_debug::set): Likewise.
3237 * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
3238 * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
3239 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
3240 * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
3241
3242 2020-04-20 Matthias Kretz <kretz@kde.org>
3243
3244 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
3245
3246 2020-04-19 Jonathan Wakely <jwakely@redhat.com>
3247
3248 * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
3249 * include/bits/stl_stack.h (stack): Likewise.
3250 * testsuite/23_containers/queue/cmp_c++20.cc: New test.
3251 * testsuite/23_containers/stack/cmp_c++20.cc: New test.
3252
3253 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
3254 Remove redundant operator!= for C++20.
3255 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
3256 Likewise.
3257 * include/debug/unordered_map (unordered_map, unordered_multimap):
3258 Likewise.
3259 * include/debug/unordered_set (unordered_set, unordered_multiset):
3260 Likewise.
3261
3262 PR other/94629
3263 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
3264 redundant assignment in constructor.
3265
3266 2020-04-18 Jonathan Wakely <jwakely@redhat.com>
3267
3268 * include/std/chrono (duration, time_point): Define operator<=> and
3269 remove redundant operator!= for C++20.
3270 * testsuite/20_util/duration/comparison_operators/three_way.cc: New
3271 test.
3272 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
3273 test.
3274
3275 * testsuite/util/native_type/native_priority_queue.hpp: Use
3276 allocator_traits to rebind allocator.
3277
3278 2020-04-17 Jonathan Wakely <jwakely@redhat.com>
3279
3280 * include/bits/forward_list.h (forward_list): Define operator<=> and
3281 remove redundant comparison operators for C++20.
3282 * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
3283 * include/bits/stl_deque.h (deque): Likewise.
3284 * include/bits/stl_iterator.h (__normal_iterator): Likewise.
3285 * include/bits/stl_list.h (list): Likewise.
3286 * include/bits/stl_vector.h (vector): Likewise.
3287 * include/debug/deque (__gnu_debug::deque): Likewise.
3288 * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
3289 * include/debug/list (__gnu_debug::list): Likewise.
3290 * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
3291 Likewise.
3292 * include/debug/vector (__gnu_debug::vector): Likewise.
3293 * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
3294 operator<=> for C++20.
3295 * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
3296 * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
3297 * testsuite/23_containers/list/cmp_c++20.cc: New test.
3298 * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
3299 * testsuite/23_containers/vector/cmp_c++20.cc: New test.
3300
3301 * include/bits/basic_string.h (basic_string): Define operator<=> and
3302 remove redundant comparison operators for C++20.
3303 * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
3304 Add comparison_category members.
3305 (__detail::__char_traits_cmp_cat): New helper to get comparison
3306 category from char traits class.
3307 * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
3308 define for C++20.
3309 (sub_match): Define operator<=> and remove redundant comparison
3310 operators for C++20.
3311 (match_results): Remove redundant operator!= for C++20.
3312 * include/std/string_view (basic_string_view): Define operator<=> and
3313 remove redundant comparison operators for C++20.
3314 * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
3315 test.
3316 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
3317 New test.
3318 * testsuite/21_strings/basic_string_view/operations/copy/char/
3319 constexpr.cc: Initialize variable.
3320 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
3321 constexpr.cc: Likewise.
3322 * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
3323 dg-do directive and remove comments showing incorrect signatures.
3324 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
3325 Likewise.
3326 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
3327 New test.
3328 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
3329 New test.
3330 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
3331
3332 2020-04-16 Jonathan Wakely <jwakely@redhat.com>
3333
3334 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
3335 name of unused parameter.
3336
3337 2020-04-15 Jonathan Wakely <jwakely@redhat.com>
3338
3339 * include/bits/fs_dir.h (file_status): Define operator== for C++20.
3340 (directory_entry): Define operator<=> and remove redundant comparison
3341 operators for C++20.
3342 * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
3343 * include/bits/fs_path.h (path): Define operator<=> and remove
3344 redundant comparison operators for C++20.
3345 * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
3346 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
3347 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
3348 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
3349
3350 * include/bits/allocator.h (operator!=): Do not define for C++20.
3351 * include/bits/locale_classes.h (operator!=): Likewise.
3352 * include/bits/std_function.h (operator==(nullptr_t, const function&))
3353 (operator!=(const function&, nullptr_t))
3354 (operator!=(nullptr_t, const function&)): Likewise.
3355 * include/ext/bitmap_allocator.h (operator!=): Likewise.
3356 * include/ext/debug_allocator.h (operator!=): Likewise.
3357 * include/ext/extptr_allocator.h (operator!=): Likewise.
3358 * include/ext/malloc_allocator.h (operator!=): Likewise.
3359 * include/ext/mt_allocator.h (operator!=): Likewise.
3360 * include/ext/new_allocator.h (operator!=): Likewise.
3361 * include/ext/pool_allocator.h (operator!=): Likewise.
3362 * include/ext/throw_allocator.h (operator!=): Likewise.
3363 * include/std/bitset (bitset::operator!=): Likewise.
3364 * include/std/memory_resource (operator!=): Likewise.
3365 * include/std/scoped_allocator (operator!=): Likewise.
3366
3367 * include/std/typeindex (operator<=>): Define for C++20.
3368 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
3369
3370 2020-04-14 Jonathan Wakely <jwakely@redhat.com>
3371
3372 * libsupc++/compare (compare_three_way): Fix constraint so that
3373 BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
3374 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
3375 New test.
3376
3377 PR libstdc++/94562
3378 * include/bits/shared_ptr.h (operator<=>): Define for C++20.
3379 * include/bits/shared_ptr_base.h (operator<=>): Likewise.
3380 * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
3381 * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
3382 * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
3383 std::less<A*> to be used when comparing std::shared_ptr<A> objects in
3384 C++20.
3385
3386 PR libstdc++/94565
3387 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
3388 * testsuite/18_support/comparisons/categories/94565.cc: New test.
3389
3390 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
3391
3392 * include/std/coroutine: Update coroutines builtin define,
3393 per n4861.
3394
3395 2020-04-09 Jonathan Wakely <jwakely@redhat.com>
3396
3397 * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
3398 (strong_order, weak_order, partial_order): Replace uses of <=> with
3399 compare_three_way function object (LWG 3324).
3400 * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
3401 equality operator so that X satisfies three_way_comparable.
3402 * testsuite/18_support/comparisons/algorithms/strong_order.cc:
3403 Likewise.
3404 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
3405
3406 * include/bits/unique_ptr.h (operator<=>): Define for C++20.
3407 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
3408 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
3409 * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
3410 * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
3411
3412 2020-04-08 Jonathan Wakely <jwakely@redhat.com>
3413
3414 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
3415 Define for C++20.
3416 * include/std/complex (operator==(const T&, const complex<T>&))
3417 (operator!=(const complex<T>&, const complex<T>&))
3418 (operator!=(const complex<T>&, const T&))
3419 (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
3420 * testsuite/26_numerics/slice/compare.cc: New test.
3421
3422 * include/std/charconv (to_chars_result, from_chars_result): Add
3423 defaulted equality comparisons for C++20.
3424 * testsuite/20_util/from_chars/compare.cc: New test.
3425 * testsuite/20_util/to_chars/compare.cc: New test.
3426
3427 2020-04-07 Jonathan Wakely <jwakely@redhat.com>
3428
3429 PR libstdc++/94520
3430 * include/std/charconv (__integer_to_chars_result_type)
3431 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
3432 allow use in C++14.
3433 * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
3434 use of std::string_view with std::string.
3435 * testsuite/20_util/from_chars/2.cc: Likewise.
3436 * testsuite/20_util/to_chars/1.cc: Likewise.
3437 * testsuite/20_util/to_chars/2.cc: Likewise.
3438
3439 2020-04-06 Jonathan Wakely <jwakely@redhat.com>
3440
3441 PR libstdc++/94498
3442 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
3443 usable in constant expressions for C++20.
3444 (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
3445 _GLIBCXX20_CONSTEXPR.
3446 (std::char_traits<char>, std::char_traits<wchar_t>)
3447 (std::char_traits<char8_t>): Make move, copy and assign usable in
3448 constant expressions for C++20.
3449 (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
3450 and copy usable in constant expressions for C++20.
3451 * include/std/string_view (basic_string_view::copy): Add
3452 _GLIBCXX20_CONSTEXPR.
3453 * testsuite/21_strings/basic_string_view/operations/copy/char/
3454 constexpr.cc: New test.
3455 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
3456 constexpr.cc: New test.
3457
3458 2020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
3459
3460 * doc/xml/manual/appendix_contributing.xml: Refer to Git
3461 documentation instead of Subversion. Switch to https.
3462 * doc/html/manual/appendix_contributing.html: Regenerate.
3463
3464 2020-04-03 Jonathan Wakely <jwakely@redhat.com>
3465
3466 PR libstdc++/93960
3467 * include/bits/ptr_traits.h (__to_address): Add special case for debug
3468 iterators, to avoid dereferenceable check.
3469 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
3470 * testsuite/20_util/to_address/debug.cc: New test.
3471
3472 2020-04-01 Andrea Corallo <andrea.corallo@arm.com>
3473
3474 * testsuite/experimental/net/execution_context/use_service.cc:
3475 Require pthread and gthreads.
3476
3477 2020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
3478
3479 * doc/xml/manual/appendix_free.xml: Move "free books" list from
3480 fsf.org to gnu.org.
3481 * doc/html/manual/appendix_free.html: Regenerate.
3482
3483 2020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
3484
3485 Library-side tests for parenthesized aggregate init
3486
3487 PR c++/92878
3488 PR c++/92947
3489
3490 * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
3491 * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
3492 * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
3493 * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
3494 * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
3495 * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
3496 * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
3497 * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
3498 * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
3499 Likewise.
3500 * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
3501 * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
3502 * testsuite/20_util/variant/92878_92947.cc: Likewise.
3503 * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
3504 Likewise.
3505 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
3506 Likewise.
3507 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
3508 Likewise.
3509 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
3510 Likewise.
3511 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
3512 Likewise.
3513 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
3514 Likewise.
3515 * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
3516 * testsuite/23_containers/queue/92878_92947.cc: Likewise.
3517 * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
3518 Likewise.
3519 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
3520 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
3521 Likewise.
3522 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
3523 Likewise.
3524 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
3525 Likewise.
3526 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
3527 Likewise.
3528 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
3529 Likewise.
3530
3531 2020-03-28 Jonathan Wakely <jwakely@redhat.com>
3532
3533 * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
3534 for changes due to parenthesized aggregate-initialization in C++20.
3535 * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
3536 with std::chrono::sys_time in C++20.
3537
3538 * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
3539 to constrain C++20 versions of comparison operators. Fix backwards
3540 logic of relational operators.
3541 (move_iterator): Use requires-clause to constrain comparison operators
3542 in C++20. Do not declare non-standard same-type overloads for C++20.
3543 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
3544 of comparisons and check using greedy_ops type.
3545 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
3546 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
3547 main function from compile-only test.
3548 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
3549
3550 2020-03-27 Jonathan Wakely <jwakely@redhat.com>
3551
3552 * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
3553 * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
3554 C++20 concepts are required.
3555 * include/bits/stl_iterator_base_types.h: Likewise.
3556 * include/std/concepts: Likewise.
3557 * include/std/version: Likewise.
3558 * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
3559 macro.
3560
3561 * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
3562 (reverse_iterator::iterator_category): Define for C++20.
3563 (reverse_iterator): Define comparison operators correctly for C++20.
3564 (__normal_iterator): Add constraints to comparison operators for C++20.
3565 (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
3566 overload for input iterators.
3567 (move_iterator): Add constraints to comparison operators for C++20.
3568 Define operator<=> for C++20.
3569 * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
3570 * testsuite/24_iterators/move_iterator/move_only.cc: New test.
3571 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
3572 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
3573
3574 * include/bits/iterator_concepts.h (__detail::__decay_copy)
3575 (__detail::__member_begin, __detail::__adl_begin): Move here from
3576 <bits/range_access.h>.
3577 (__detail::__ranges_begin, __detail::__range_iter_t): Define.
3578 * bits/range_access.h (__cust_access::__decay_copy)
3579 (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
3580 <bits/iterator_concepts.h>.
3581 (ranges::iterator_t): Use __detail::__range_iter_t.
3582 * include/bits/stl_iterator.h (back_insert_iterator): Simplify
3583 conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
3584 (front_insert_iterator): Likewise.
3585 (insert_iterator): Implement changes from P0896R4 for C++20.
3586 * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
3587 * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
3588 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
3589 for inclusion in synopsis_c++20.cc which expects different signatures
3590 for some function templates.
3591 * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
3592
3593 * include/std/type_traits (__is_array_convertible): Move definition
3594 to immediately after is_convertible.
3595
3596 2020-03-26 Jonathan Wakely <jwakely@redhat.com>
3597
3598 * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
3599 (chrono::months, chrono::sys_days, chrono::local_t)
3600 (chrono::local_time, chrono::local_seconds, chrono::local_days):
3601 Define for C++20.
3602 (chrono::time_point): Add missing static assert.
3603 * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
3604 * testsuite/std/time/clock/file/overview.cc: New test.
3605 * testsuite/std/time/clock/file/members.cc: New test.
3606 * testsuite/std/time/syn_c++20.cc: New test.
3607
3608 2020-03-25 Mike Crowe <mac@mcrowe.com>
3609
3610 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
3611 test.
3612 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
3613 test.
3614
3615 2020-03-25 Jonathan Wakely <jwakely@redhat.com>
3616
3617 * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
3618 * include/std/chrono (filesystem::__file_clock): Here.
3619 (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
3620 Define public member functions for C++20.
3621 (is_clock, is_clock_v): Define traits for C++20.
3622 * include/std/condition_variable (condition_variable::wait_until): Add
3623 check for valid clock.
3624 * include/std/future (_State_baseV2::wait_until): Likewise.
3625 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
3626 * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
3627 Likewise.
3628 * include/std/thread (this_thread::sleep_until): Likewise.
3629 * testsuite/30_threads/condition_variable/members/2.cc: Qualify
3630 slow_clock with new namespace.
3631 * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
3632 test.
3633 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
3634 New test.
3635 * testsuite/30_threads/future/members/clock_neg.cc: New test.
3636 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
3637 Qualify slow_clock with new namespace.
3638 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
3639 clock_neg.cc: New test.
3640 * testsuite/30_threads/shared_future/members/clock_neg.cc: New
3641 test.
3642 * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
3643 * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
3644 New test.
3645 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
3646 slow_clock with new namespace.
3647 * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
3648 * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
3649 test.
3650 * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
3651 * testsuite/std/time/traits/is_clock.cc: New test.
3652 * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
3653 namespace.
3654
3655 2020-03-21 Jonathan Wakely <jwakely@redhat.com>
3656
3657 PR libstdc++/93245
3658 * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
3659 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
3660 Improve test coverage.
3661
3662 PR libstdc++/94242
3663 * include/bits/fs_path.h (path::_S_str_convert): Replace first
3664 parameter with basic_string_view so that strings with different
3665 allocators can be accepted.
3666 (path::generic_string<C,T,A>()): Use basic_string object that uses the
3667 right allocator type.
3668 * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
3669 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
3670 test coverage.
3671
3672 2020-03-18 Jonathan Wakely <jwakely@redhat.com>
3673
3674 PR libstdc++/94033
3675 * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
3676 (__is_nt_default_constructible_impl): Remove.
3677 (__is_nothrow_default_constructible_impl): Remove.
3678 (__is_nt_constructible_impl): Add bool template parameter. Adjust
3679 partial specializations.
3680 (__is_nothrow_constructible_impl): Replace class template with alias
3681 template.
3682 (is_nothrow_default_constructible): Derive from alias template
3683 __is_nothrow_constructible_impl instead of
3684 __is_nothrow_default_constructible_impl.
3685 * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
3686
3687 * include/std/stop_token (stop_token::_Stop_state_ref): Define
3688 comparison operators explicitly if the compiler won't synthesize them.
3689
3690 * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
3691 __cpp_lib_concepts before using iter_reference_t.
3692 * include/bits/stream_iterator.h (istream_iterator): Check
3693 __cpp_lib_concepts before using default_sentinel_t.
3694 * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
3695
3696 PR libstdc++/94203
3697 * include/experimental/executor (executor::executor(Executor)): Call
3698 make_shared directly instead of _M_create. Create _Tgt1 object.
3699 (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
3700 Call allocate_shared directly instead of _M_create. Create _Tgt2
3701 object.
3702 (executor::target_type): Add cast needed for new _Tgt interface.
3703 (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
3704 (executor::_Tgt): Define the same interface whether RTTI is enabled or
3705 not.
3706 (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
3707 std::type_info in the interface.
3708 (executor::_Tgt::_M_func): Add data member.
3709 (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
3710 (executor::_Tgt1::_S_func): Define function to access target without
3711 depending on RTTI.
3712 (executor::_M_create): Remove.
3713 (operator==, operator!=): Simplify comparisons for executor.
3714 * include/experimental/socket (is_error_code_enum<socket_errc>):
3715 Define specialization before use.
3716 * testsuite/experimental/net/executor/1.cc: New test.
3717
3718 2020-03-16 Jonathan Wakely <jwakely@redhat.com>
3719
3720 PR libstdc++/94199
3721 * include/experimental/executor (service_already_exists): Add default
3722 constructor. Declare make_service to be a friend.
3723 * testsuite/experimental/net/execution_context/make_service.cc: New
3724 test.
3725
3726 2020-03-12 Jonathan Wakely <jwakely@redhat.com>
3727
3728 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
3729 a null pointer to functions with nonnull(1) attribute.
3730
3731 2020-03-11 Patrick Palka <ppalka@redhat.com>
3732
3733 * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
3734 'address' -> 'std::__addressof'.
3735 * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
3736 a non-forward input_range.
3737 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
3738 default constructor protected instead of deleted, like with
3739 input_iterator_wrapper.
3740 (test_range::iterator): Add comment explaining that this type is used
3741 only when the underlying wrapper is input_iterator_wrapper or
3742 output_iterator_wrapper. Remove delegating defaulted constructor so
3743 that the inherited default constructor is used instead.
3744
3745 LWG 3286 ranges::size is not required to be valid after a call to
3746 ranges::begin on an input range
3747 * include/std/ranges (subrange::subrange): Split single-argument
3748 constructor into two, one constrained by _S_store_size and another by
3749 !_S_store_size.
3750 (take_view::begin): Call size() before calling ranges::begin(_M_base).
3751 * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
3752 * testsuite/std/ranges/subrange/lwg3286.cc: New test.
3753
3754 2020-03-10 Jonathan Wakely <jwakely@redhat.com>
3755
3756 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
3757 instead of _M_current.
3758 (split_view::_OuterIter::operator++): Likewise.
3759
3760 * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
3761 (transform_view::_Iterator::operator*): Add noexcept-specifier.
3762 (transform_view::_Iterator::iter_move): Inline __iter_move body here.
3763 (split_view::_OuterIter::__current): Add noexcept.
3764 (split_view::_InnerIter::__iter_swap): Remove.
3765 (split_view::_InnerIter::__iter_move): Remove.
3766 (split_view::_InnerIter::_M_i_current): New accessors.
3767 (split_view::_InnerIter::__at_end): Use _M_i_current().
3768 (split_view::_InnerIter::operator*): Likewise.
3769 (split_view::_InnerIter::operator++): Likewise.
3770 (iter_move(const _InnerIter&)): Likewise.
3771 (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
3772 * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
3773 for iter_move and iter_swap on split_view's inner iterator.
3774
3775 PR c++/94117
3776 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
3777 Change expression in noexcept-specifier to match function body.
3778
3779 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
3780 comment explaining multiple dg-do directives.
3781 * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
3782 so test is run as well as compiled.
3783
3784 2020-03-09 Jonathan Wakely <jwakely@redhat.com>
3785
3786 PR libstdc++/94063
3787 * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
3788 handle concatenations that change the type of the first component.
3789 (path::operator+=(basic_string_view<value_type>)): Likewise.
3790 * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
3791
3792 2020-03-06 Patrick Palka <ppalka@redhat.com>
3793
3794 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
3795 join_view::_Sentinel<!_Const>.
3796 * testsuite/std/ranges/adaptors/join.cc: Augment test.
3797
3798 PR libstdc++/93978
3799 * include/bits/range_access.h (__cust_access::_Empty::operator()):
3800 Declare return type to be bool instead of auto.
3801 * testsuite/std/ranges/adaptors/93978.cc: New test.
3802
3803 2020-03-06 Jonathan Wakely <jwakely@redhat.com>
3804
3805 PR libstdc++/94069
3806 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
3807 (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
3808 second argument to __glibcxx_rwlock_init.
3809 * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
3810
3811 PR libstdc++/93244
3812 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
3813 test to not fail due to PR 94063.
3814 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
3815 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
3816
3817 2020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
3818
3819 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
3820 would match ENOSYS.
3821
3822 2020-03-05 Jonathan Wakely <jwakely@redhat.com>
3823
3824 * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
3825 * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
3826 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
3827 * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
3828 for return value, and in comparison.
3829 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
3830
3831 PR libstdc++/94051
3832 * include/std/string_view: Include <bits/ostream_insert.h>.
3833 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
3834
3835 2020-03-04 Jonathan Wakely <jwakely@redhat.com>
3836
3837 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
3838
3839 2020-03-04 Patrick Palka <ppalka@redhat.com>
3840
3841 PR libstdc++/94017
3842 * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
3843 condition for when to use memset, making sure to additionally check that
3844 the output pointer's value type is a non-volatile byte type. Instead of
3845 requiring that the fill type is a byte type, just require that it's an
3846 integral type.
3847 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
3848 New test.
3849 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
3850 New test.
3851 * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
3852 blocked by PR 94017.
3853 * testsuite/25_algorithms/fill/94017.cc: New test.
3854 * testsuite/25_algorithms/fill_n/94017.cc: New test.
3855
3856 LWG 3355 The memory algorithms should support move-only input iterators
3857 introduced by P1207
3858 * include/bits/ranges_uninitialized.h
3859 (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
3860 to copy __ifirst, which could be a move-only input iterator. Use
3861 operator- instead of ranges::distance to compute distance from a sized
3862 sentinel.
3863 (__uninitialized_copy_n_fn::operator()): Likewise.
3864 (__uninitialized_move_fn::operator()): Likewise.
3865 (__uninitialized_move_n_fn::operator()): Likewise.
3866 (__uninitialized_destroy_fn::operator()): Use std::move to avoid
3867 attempting to copy __first.
3868 (__uninitialized_destroy_n_fn::operator()): Likewise.
3869 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
3870 Augment test.
3871 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
3872 Likewise.
3873 * .../specialized_algorithms/uninitialized_move/constrained.cc:
3874 Likewise.
3875
3876 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
3877 protected instead of private.
3878 (test_sized_range_sized_sent): New.
3879
3880 * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
3881 New testsuite iterator.
3882 * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
3883 * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
3884
3885 * include/bits/ranges_uninitialized.h
3886 (uninitialized_copy_fn::operator()): Pass a reference type as the first
3887 argument to is_nothrow_assignable_v.
3888 (uninitialized_copy_fn::operator()): Likewise.
3889 (uninitialized_move_fn::operator()): Likewise. Return an in_out_result
3890 with the input iterator stripped of its move_iterator.
3891 (uninitialized_move_n_fn::operator()): Likewise.
3892 (uninitialized_fill_fn::operator()): Pass a reference type as the first
3893 argument to is_nothrow_assignable_v.
3894 (uninitialized_fill_n_fn::operator()): Likewise.
3895
3896 2020-03-03 Jonathan Wakely <jwakely@redhat.com>
3897
3898 PR libstdc++/94013
3899 * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
3900 traits to control when to use memmove and memcmp optimizations.
3901 (__is_nonvolatile_trivially_copyable): New helper trait.
3902 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
3903 use memcmp optimization with volatile data.
3904 * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
3905 (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
3906 * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
3907 (__copy_move_backward_a2): Likewise.
3908 (__equal_aux1): Use __memcmpable.
3909 (__lexicographical_compare_aux): Do not use memcmp optimization with
3910 volatile data.
3911 * testsuite/25_algorithms/copy/94013.cc: New test.
3912 * testsuite/25_algorithms/copy_backward/94013.cc: New test.
3913 * testsuite/25_algorithms/equal/94013.cc: New test.
3914 * testsuite/25_algorithms/fill/94013.cc: New test.
3915 * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
3916 * testsuite/25_algorithms/move/94013.cc: New test.
3917 * testsuite/25_algorithms/move_backward/94013.cc: New test.
3918
3919 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
3920 Avoid redundant iterator comparisons (LWG 3410).
3921
3922 2020-03-02 Jonathan Wakely <jwakely@redhat.com>
3923
3924 PR libstdc++/93972
3925 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
3926 differ.
3927 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
3928
3929 * include/std/ranges (__detail::__maybe_empty_t): Rename to
3930 __maybe_present_t.
3931 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
3932
3933 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
3934 dependent type.
3935
3936 2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
3937
3938 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
3939
3940 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
3941
3942 * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
3943 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
3944 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
3945 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
3946 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
3947
3948 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
3949 Add libatomic option.
3950 * testsuite/30_threads/jthread/jthread.cc: Likewise.
3951
3952 2020-02-29 François Dumont <fdumont@gcc.gnu.org>
3953
3954 * include/bits/stl_algo.h
3955 (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
3956 * include/bits/stl_algobase.h: ...here.
3957 * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
3958
3959 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
3960
3961 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
3962 option.
3963 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
3964 Likewise.
3965 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
3966 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
3967 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
3968 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
3969 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
3970 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
3971 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
3972 Likewise.
3973
3974 PR libstdc++/92906
3975 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
3976
3977 2020-02-28 Patrick Palka <ppalka@redhat.com>
3978
3979 PR libstdc++/93972
3980 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
3981 Fix condition for when to use memcmp, making it consistent with the
3982 corresponding condition used in std::lexicographical_compare.
3983 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
3984
3985 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
3986 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
3987 existing signatures for C++2a.
3988
3989 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
3990
3991 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
3992 test instead of just compiling it.
3993
3994 2020-02-28 Patrick Palka <ppalka@redhat.com>
3995
3996 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
3997 whenever the underlying range models common_range.
3998
3999 * include/std/ranges (__detail::_CachedPosition): New struct.
4000 (views::filter_view::_S_needs_cached_begin): New member variable.
4001 (views::filter_view::_M_cached_begin): New member variable.
4002 (views::filter_view::begin): Use _M_cached_begin to cache its
4003 result.
4004 (views::drop_view::_S_needs_cached_begin): New static member variable.
4005 (views::drop_view::_M_cached_begin): New member variable.
4006 (views::drop_view::begin): Use _M_cached_begin to cache its result
4007 when _S_needs_cached_begin.
4008 (views::drop_while_view::_M_cached_begin): New member variable.
4009 (views::drop_while_view::begin): Use _M_cached_begin to cache its
4010 result.
4011 (views::reverse_view::_S_needs_cached_begin): New static member
4012 variable.
4013 (views::reverse_view::_M_cached_begin): New member variable.
4014 (views::reverse_view::begin): Use _M_cached_begin to cache its result
4015 when _S_needs_cached_begin.
4016 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
4017 drop_view::begin caches its result.
4018 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
4019 that drop_while_view::begin caches its result.
4020 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
4021 filter_view::begin caches its result.
4022 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
4023 reverse_view::begin caches its result.
4024
4025 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
4026
4027 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
4028 filesystems that silently truncate timestamps.
4029 * testsuite/experimental/filesystem/operations/last_write_time.cc:
4030 Likewise.
4031
4032 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
4033 -Wstringop-overflow warnings.
4034
4035 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
4036
4037 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
4038 -fdiagnostics-urls=never to options.
4039
4040 2020-02-27 Patrick Palka <ppalka@redhat.com>
4041
4042 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
4043 _Iterator<!_Const>.
4044 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
4045 (take_view::_Sentinel<_Const>): Likewise.
4046 (take_while_view::_Sentinel<_Const>): Likewise.
4047 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
4048 * testsuite/std/ranges/adaptors/split.cc: Augment test.
4049 * testsuite/std/ranges/adaptors/take.cc: Augment test.
4050 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
4051 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
4052
4053 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
4054 base() of a vector<>::iterator is a pointer.
4055 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
4056 * testsuite/25_algorithms/move/constrained.cc: Likewise.
4057 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
4058 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
4059 instead of &foo[0].
4060 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
4061 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
4062 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
4063 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
4064 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
4065
4066 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
4067
4068 * include/debug/array (operator<=>): Define for C++20.
4069 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
4070 Adjust dg-error line numbers.
4071 * testsuite/23_containers/array/tuple_interface/
4072 tuple_element_debug_neg.cc: Likewise.
4073
4074 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
4075 defining _GLIBCXX_ASSERTIONS.
4076 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
4077 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
4078 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
4079 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
4080 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
4081 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
4082 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
4083 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
4084 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
4085 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
4086 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
4087 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
4088
4089 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
4090 C++98 where the member function of the base class returns void.
4091
4092 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
4093 equality comparisons that support value-initialized iterators.
4094
4095 * include/bits/boost_concept_check.h (__function_requires): Add
4096 _GLIBCXX14_CONSTEXPR.
4097 * testsuite/25_algorithms/min/concept_checks.cc: New test.
4098
4099 2020-02-26 Patrick Palka <ppalka@redhat.com>
4100
4101 PR libstdc++/93936
4102 * include/std/ranges (split_view::_InnerIter::operator==): Compare
4103 the operands' _M_i rather than their _M_i.current().
4104 * testsuite/std/ranges/adaptors/split.cc: Augment test.
4105
4106 P1645R1 constexpr for <numeric> algorithms
4107 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
4108 partial_sum, adjacent_difference): Make conditionally constexpr for
4109 C++20.
4110 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
4111 test macro.
4112 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
4113 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
4114 constexpr for C++20.
4115 * include/std/version (__cpp_lib_constexpr_numeric): Define.
4116 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
4117 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
4118 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
4119 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
4120 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
4121 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
4122 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
4123 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
4124 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
4125 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
4126 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
4127
4128 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
4129
4130 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
4131 variables in smaller scope and avoid calling ranges::distance when we
4132 know they are pointers. Remove statically-unreachable use of
4133 __builtin_unreachable().
4134 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
4135 Define inline.
4136
4137 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
4138 alias.
4139 (__detail::__maybe_const_t): Likewise.
4140 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
4141 (transform_view, take_view, take_while_view, elements_view): Use
4142 __maybe_const_t.
4143 (join_view, split_view): Use both.
4144
4145 2020-02-25 Patrick Palka <ppalka@redhat.com>
4146
4147 LWG 3397 basic_istream_view::iterator should not provide
4148 iterator_category
4149 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
4150 Rename to ...
4151 (basic_istream_view:_Iterator::iterator_concept): ... this.
4152 * testsuite/std/ranges/istream_view.cc: Augment test.
4153
4154 LWG 3325 Constrain return type of transformation function for
4155 transform_view
4156 * include/std/ranges (transform_view): Constrain the return type of the
4157 transformation function as per LWG 3325.
4158 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
4159
4160 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
4161 * include/std/ranges (join_view::_Iterator::operator--): Require that
4162 range_reference_t<_Base> models common_range.
4163 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
4164
4165 LWG 3301 transform_view::_Iterator has incorrect iterator_category
4166 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
4167 determination of iterator_category as per LWG 3301.
4168 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
4169
4170 LWG 3292 iota_view is under-constrained
4171 * include/std/ranges (iota_view): Require that _Winc models semiregular
4172 as per LWG 3292.
4173 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
4174
4175 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
4176
4177 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
4178 during constant evaluation. Call __builtin_memmove directly instead of
4179 __memmove.
4180 (__copy_or_move_backward): Likewise.
4181 * include/bits/stl_algobase.h (__memmove): Remove.
4182 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
4183 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
4184 Use __builtin_memmove directly instead of __memmove.
4185 (__copy_move_a2): Do not use memmove during constant evaluation.
4186 (__copy_move_backward_a2): Use _IsMove constant to select correct
4187 __copy_move_backward specialization.
4188 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
4189 begin turned into moves during constant evaluation.
4190
4191 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
4192 previous commit.
4193
4194 PR libstdc++/93872
4195 * include/bits/stl_algobase.h (__memmove): Cast away const before
4196 doing move assignment.
4197 * testsuite/25_algorithms/move/93872.cc: New test.
4198 * testsuite/25_algorithms/move_backward/93872.cc: New test.
4199
4200 2020-02-24 Patrick Palka <ppalka@redhat.com>
4201
4202 PR libstdc++/93884
4203 * include/bits/ranges_algobase.h (__copy_or_move,
4204 __copy_or_move_backward): Don't inspect the iter_value_t of the output
4205 iterator, instead inspect its iterator_traits directly.
4206 * include/bits/stl_iterator.h (back_insert_iterator::container):
4207 Conditionally initialize.
4208 (back_insert_iterator::difference_type): Conditionally define.
4209 (back_insert_iterator::back_insert_iterator): Conditionally define this
4210 default constructor.
4211 (front_insert_iterator::container): Conditionally initialize.
4212 (front_insert_iterator::difference_type): Conditionally define.
4213 (front_insert_iterator::front_insert_iterator): Conditionally define
4214 this default constructor.
4215 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
4216 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
4217
4218 P0769R2 Add shift to <algorithm>
4219 * include/bits/ranges_algo.h (shift_left, shift_right): New.
4220 * testsuite/25_algorithms/shift_left/1.cc: New test.
4221 * testsuite/25_algorithms/shift_right/1.cc: New test.
4222
4223 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
4224
4225 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
4226 Make noexcept-specifier conditional.
4227 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
4228 noexcept-specifier.
4229
4230 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
4231 Add constructor.
4232 (operator==(istream_iterator, default_sentinel_t)): Add operator.
4233 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
4234 * include/bits/streambuf_iterator.h
4235 (istreambuf_iterator(default_sentinel_t)): Add constructor.
4236 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
4237 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
4238 New test.
4239 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
4240 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
4241 New test.
4242 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
4243
4244 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
4245 (ranges::enable_view): Simplify (LWG 3326).
4246 * include/bits/range_access.h (ranges::enable_view): Declare.
4247 * include/bits/regex.h (__enable_view_impl): Remove partial
4248 specialization.
4249 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
4250 * include/bits/stl_set.h (__enable_view_impl): Likewise.
4251 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
4252 * include/debug/multiset.h (__enable_view_impl): Likewise.
4253 * include/debug/set.h (__enable_view_impl): Likewise.
4254 * include/debug/unordered_set (__enable_view_impl): Likewise.
4255 * include/experimental/string_view (ranges::enable_view): Define
4256 partial specialization.
4257 * include/std/span (ranges::enable_view): Likewise.
4258 * include/std/string_view (ranges::enable_view): Likewise.
4259 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
4260
4261 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
4262
4263 * include/std/optional (operator<=>(optional<T>, optional<U>))
4264 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
4265 Define for C++20.
4266 * include/std/tuple (__tuple_cmp): New helper function for <=>.
4267 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
4268 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
4269 (operator<=>(monostate, monostate)): Define for C++20.
4270 * testsuite/20_util/optional/relops/three_way.cc: New test.
4271 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
4272 * testsuite/20_util/variant/89851.cc: Move to ...
4273 * testsuite/20_util/variant/relops/89851.cc: ... here.
4274 * testsuite/20_util/variant/90008.cc: Move to ...
4275 * testsuite/20_util/variant/relops/90008.cc: ... here.
4276 * testsuite/20_util/variant/relops/three_way.cc: New test.
4277
4278 2020-02-20 Patrick Palka <ppalka@redhat.com>
4279
4280 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
4281 function.
4282 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
4283 __maybe_refwrap to capture lvalue references by reference, and then use
4284 unwrap_reference_t to forward the by-reference captures as references.
4285 * testsuite/std/ranges/adaptors/split.cc: Augment test.
4286 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
4287
4288 * include/std/ranges (iota_view): Forward declare _Sentinel.
4289 (iota_view::_Iterator): Befriend _Sentinel.
4290 (iota_view::_Sentinel::_M_equal): New member function.
4291 (iota_view::_Sentinel::operator==): Use it.
4292 (views::_Iota::operator()): Forward __f using the correct type.
4293 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
4294 with integers of different signedness, to appease iota_view's deduction
4295 guide.
4296 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
4297
4298 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
4299
4300 * include/bits/range_access.h (ranges::begin): Reject array of
4301 incomplete type.
4302 (ranges::end, ranges::size): Require arrays to be bounded.
4303 (ranges::data): Require lvalue or borrowed_range.
4304 (ranges::iterator_t): Remove constraint.
4305 * testsuite/std/ranges/access/begin.cc: Do not check array of
4306 incomplete type.
4307 * testsuite/std/ranges/access/begin_neg.cc: New test.
4308 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
4309 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
4310 * testsuite/std/ranges/access/ssize.cc: Do not check array of
4311 incomplete type.
4312
4313 * include/std/system_error (error_category::operator<=>)
4314 (operator<=>(const error_code&, const error_code&))
4315 (operator<=>(const error_condition&, const error_condition&)): Define
4316 for C++20.
4317 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
4318 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
4319 test.
4320 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
4321 incorrect comment.
4322 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
4323 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
4324 incorrect comment.
4325 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
4326 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
4327 incorrect comment.
4328 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
4329 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
4330 Remove incorrect comment.
4331 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
4332 test.
4333
4334 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
4335
4336 * include/std/thread (thread::id::operator<=>): Define for C++20.
4337 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
4338 functions in namespace std.
4339 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
4340
4341 2020-02-19 Patrick Palka <ppalka@redhat.com>
4342
4343 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
4344 null terminator of the underlying string as part of the test_range.
4345 (main): Call test03.
4346
4347 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
4348
4349 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
4350 requirement (LWG 3385).
4351 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
4352 expected declaration.
4353
4354 * include/std/ranges (take_while_view, drop_view, drop_while_view)
4355 (elements_view:_Iterator): Initialize data members (LWG 3364).
4356
4357 * libsupc++/compare (three_way_comparable): Remove always-false check
4358 that should have been removed with weak_equality (P1959R0).
4359 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
4360
4361 * include/std/concepts (__detail::__partially_ordered_with): Move here
4362 from <compare>.
4363 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
4364 to simplify definition (LWG 3331).
4365 * libsupc++/compare (__detail::__partially_ordered_with): Move to
4366 <concepts>.
4367
4368 * include/std/concepts (totally_ordered_with): Remove redundant
4369 requirement (LWG 3329).
4370
4371 * include/std/ranges (__detail::__convertible_to_non_slicing): New
4372 helper concept.
4373 (__detail::__pair_like_convertible_to): Remove.
4374 (__detail::__pair_like_convertible_from): Add requirements for
4375 non-slicing conversions.
4376 (subrange): Constrain constructors with __convertible_to_non_slicing.
4377 Remove constructors from pair-like types. Add new deduction guide.
4378 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
4379
4380 * include/bits/iterator_concepts.h (iter_move): Add declaration to
4381 prevent unqualified lookup finding a suitable declaration (LWG 3247).
4382
4383 * include/std/memory_resource (polymorphic_allocator::allocate)
4384 (polymorphic_allocator::allocate_object): Change type of exception to
4385 bad_array_new_length (LWG 3237).
4386 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
4387
4388 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
4389 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
4390 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
4391 * testsuite/20_util/unwrap_reference/3.cc: New test.
4392
4393 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
4394 type during overload resolution, use static assert instead (LWG 3200).
4395 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
4396 incomplete type.
4397 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
4398
4399 * include/std/span (span(T (&)[N])): Use non-deduced context to
4400 prevent first parameter from interfering with class template argument
4401 deduction (LWG 3369).
4402 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
4403 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
4404 rvalues.
4405
4406 * include/std/span (span::const_iterator, span::const_reverse_iterator)
4407 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
4408 Remove (LWG 3320).
4409 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
4410 and cend.
4411 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
4412 Likewise.
4413 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
4414 constrained.cc: Likewise.
4415 * testsuite/20_util/specialized_algorithms/
4416 uninitialized_default_construct/constrained.cc: Likewise.
4417 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
4418 constrained.cc: Likewise.
4419 * testsuite/20_util/specialized_algorithms/uninitialized_move/
4420 constrained.cc: Likewise.
4421 * testsuite/20_util/specialized_algorithms/
4422 uninitialized_value_construct/constrained.cc: Likewise.
4423
4424 * include/bits/range_access.h (range_size_t): Define alias template.
4425 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
4426 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
4427
4428 * include/std/ranges (filter_view, transform_view, take_view)
4429 (join_view, split_view, reverse_view): Remove commented-out converting
4430 constructors (LWG 3280).
4431
4432 * include/std/memory (uninitialized_construct_using_allocator): Use
4433 std::construct_at (LWG 3321).
4434
4435 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
4436 (polymorphic_allocator::allocate_object)
4437 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
4438
4439 LWG 3379. "safe" in several library names is misleading
4440 * include/bits/range_access.h (enable_safe_range): Rename to
4441 enable_borrowed_range.
4442 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
4443 (safe_range): Rename to borrowed_range.
4444 * include/bits/ranges_algo.h: Adjust to use new names.
4445 * include/bits/ranges_algobase.h: Likewise.
4446 * include/bits/ranges_uninitialized.h: Likewise.
4447 * include/std/ranges: Likewise.
4448 (safe_iterator_t): Rename to borrowed_iterator_t.
4449 (safe_subrange_t): Rename to borrowed_subrange_t.
4450 * include/std/span: Adjust to use new names.
4451 * include/std/string_view: Likewise.
4452 * include/experimental/string_view: Likewise.
4453 * testsuite/std/ranges/access/begin.cc: Likewise.
4454 * testsuite/std/ranges/access/cbegin.cc: Likewise.
4455 * testsuite/std/ranges/access/cdata.cc: Likewise.
4456 * testsuite/std/ranges/access/cend.cc: Likewise.
4457 * testsuite/std/ranges/access/crbegin.cc: Likewise.
4458 * testsuite/std/ranges/access/crend.cc: Likewise.
4459 * testsuite/std/ranges/access/data.cc: Likewise.
4460 * testsuite/std/ranges/access/end.cc: Likewise.
4461 * testsuite/std/ranges/access/rbegin.cc: Likewise.
4462 * testsuite/std/ranges/access/rend.cc: Likewise.
4463 * testsuite/std/ranges/safe_range.cc: Likewise.
4464 * testsuite/std/ranges/safe_range_types.cc: Likewise.
4465 * testsuite/util/testsuite_iterators.h: Likewise.
4466
4467 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
4468 (tuple_element<1, const subrange<I, S, K>>): Add partial
4469 specializations (LWG 3398).
4470 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
4471
4472 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
4473 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
4474 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
4475
4476 2020-02-18 Patrick Palka <ppalka@redhat.com>
4477
4478 P1983R0 Wording for GB301, US296, US292, US291, and US283
4479 * include/std/ranges (filter_view::pred): New member function.
4480 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
4481 P1983R0 fixes the highlighted issue in the same way.
4482 (join_view::_Iterator<_Const>): Add friend
4483 join_view::_Iterator<!_Const>.
4484 (join_view::_M_inner): Remove mutable specifier, effectively reverting
4485 the proposed wording changes of P3278.
4486 (join_view::begin): Refine the condition for when to return a const
4487 iterator.
4488 (split_view::_OuterIter::_OuterIter): Adjust constraints.
4489 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
4490 exists and works.
4491
4492 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
4493
4494 PR libstdc++/93818
4495 * include/std/ranges (_RangeAdaptor): Add deduction guide.
4496 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
4497 iterator_t<_Vp>.
4498 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
4499 (transform_view::_Iterator): Add alias _Base_iter and use in place of
4500 iterator_t<_Base>.
4501 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
4502 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
4503 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
4504 (split_view::_InnerIter::_S_iter_cat()): Likewise.
4505
4506 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
4507 assumption that long is wider than int.
4508 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
4509 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
4510 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
4511 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
4512
4513 P1976R2 Fixed-size span construction from dynamic range
4514 * include/std/span (__cpp_lib_span): Update value.
4515 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
4516 assertion.
4517 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
4518 constraints.
4519 (span::first<Count>(), span::last<Count>()): Use explicit type in
4520 return statement.
4521 (as_bytes, as_writable_bytes): Likewise.
4522 * include/std/version (__cpp_lib_span): Update value.
4523 * testsuite/23_containers/span/1.cc: Check new value.
4524 * testsuite/23_containers/span/2.cc: Check new value.
4525 * testsuite/23_containers/span/explicit.cc: New test.
4526
4527 * include/std/span (span::__is_compatible_array): Simplify alias
4528 template by using requires-clause.
4529 (span::__is_compatible_ref): New alias template for constraining
4530 constructors.
4531 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
4532 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
4533 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
4534 redundant parentheses.
4535 (span(R&&)): Add missing constraints.
4536
4537 * include/std/span (span): Reorder members and rename template
4538 parameters to match declarations in the C++2a working paper.
4539
4540 P2116R0 Remove tuple-like protocol support from fixed-extent span
4541 * include/std/span (get, tuple_size, tuple_element): Remove.
4542 * testsuite/23_containers/span/everything.cc: Remove checks for
4543 tuple-like API.
4544 * testsuite/23_containers/span/get_neg.cc: Remove.
4545 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
4546 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
4547 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
4548
4549 2020-02-17 Patrick Palka <ppalka@redhat.com>
4550
4551 P2106R0 Alternative wording for GB315 and GB316
4552 * include/bits/ranges_algo.h (in_fun_result): New.
4553 (for_each_result, for_each_n_result): Change into an alias of
4554 in_fun_result.
4555 (in_in_result): New.
4556 (mismatch_result): Change into an alias of in_in_result.
4557 (copy_if_result): Change into an alias of in_out_result.
4558 (swap_ranges_result): Change into an alias of in_in_result.
4559 (unary_transform_result): Change into an alias of in_out_result.
4560 (in_in_out_result): New.
4561 (binary_transform_result): Change into an alias of in_in_out_result.
4562 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
4563 remove_copy_result, unique_copy_result, reverse_copy_result,
4564 rotate_copy_result, partial_sort_copy_result): Change into an alias of
4565 in_out_result.
4566 (in_out_out_result): New.
4567 (partition_copy_result, merge_result): Change into an alias of
4568 in_out_out_result.
4569 (set_union_result, set_intersection_result): Change into an alias of
4570 in_in_out_result.
4571 (set_difference_result): Change into an alias of in_out_result.
4572 (set_symmetric_difference): Change into an alias of in_in_out_result.
4573 (min_max_result): New.
4574 (minmax_result, minmax_element_result): Change into an alias of
4575 min_max_result.
4576 (in_found_result): New.
4577 (next_permutation_result, prev_permutation_result): Change into an alias
4578 of in_found_result.
4579 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
4580 Adjust following changes to next_permutation_result and
4581 prev_permutation_result.
4582 * include/bits/ranges_algobase.h (in_out_result): New.
4583 (copy_result, move_result, move_backward_result, copy_backward_result,
4584 copy_n_result): Change into an alias of in_out_result.
4585 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
4586 uninitialized_copy_n_result, uninitialized_move_result,
4587 uninitialized_move_n_result): Likewise.
4588 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
4589 structured bindings.
4590 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
4591
4592 P1243R4 Rangify new algorithms
4593 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
4594 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
4595 * testsuite/25_algorithms/clamp/constrained.cc: New test.
4596 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
4597 * testsuite/25_algorithms/sample/constrained.cc: New test.
4598
4599 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
4600
4601 P1964R2 Wording for boolean-testable
4602 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
4603 (__adjacent_find_fn): Cast result of predicate to bool.
4604 * include/std/concepts (__boolean): Remove.
4605 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
4606 new helper concepts.
4607 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
4608 (predicate): Use __boolean_testable instead of boolean.
4609 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
4610 Likewise.
4611
4612 P1970R2 Consistency for size() functions: Add ranges::ssize
4613 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
4614 * testsuite/std/ranges/access/ssize.cc: New test.
4615
4616 P1956R1 On the names of low-level bit manipulation functions
4617 * include/bits/hashtable_policy.h: Update comment.
4618 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
4619 (ispow2, ceil2, floor2, log2p1): Likewise.
4620 (__cpp_lib_int_pow2): Add feature test macro.
4621 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
4622 * include/std/memory (assume_aligned): Adjust use of ispow2.
4623 * include/std/version (__cpp_lib_int_pow2): Add.
4624 * libsupc++/new_opa.cc: Adjust use of __ispow2.
4625 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
4626 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
4627 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
4628 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
4629 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
4630 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
4631 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
4632 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
4633 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
4634 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
4635 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
4636 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
4637
4638 * include/std/charconv: Add comment.
4639
4640 PR libstdc++/92546 (partial)
4641 * include/bits/random.h (uniform_random_bit_generator): Move definition
4642 to <bits/uniform_int_dist.h>.
4643 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
4644 of <bits/random.h>.
4645 * include/bits/ranges_algobase.h: Do not include <cmath>.
4646 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
4647 Move here.
4648 * include/std/ranges: Do not include <limits>.
4649 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
4650
4651 PR libstdc++/92546 (partial)
4652 * include/Makefile.am: Add new header.
4653 * include/Makefile.in: Regenerate.
4654 * include/bits/int_limits.h: New header.
4655 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
4656 numeric_limits with __detail::__int_limits.
4657 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
4658 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
4659 Likewise.
4660 * include/std/charconv (__to_chars_8, __from_chars_binary)
4661 (__from_chars_alpha_to_num, from_chars): Likewise.
4662 * include/std/memory_resource (polymorphic_allocator::allocate)
4663 (polymorphic_allocator::allocate_object): Likewise.
4664 * include/std/string_view (basic_string_view::_S_compare): Likewise.
4665 * include/std/utility (in_range): Likewise.
4666 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
4667 extra error about incomplete type __int_limits<bool>.
4668 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
4669 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
4670 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
4671 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
4672 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
4673 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
4674 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
4675 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
4676 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
4677 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
4678 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
4679 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
4680
4681 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
4682 value for partial_ordering::unordered.
4683
4684 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
4685 const-qualified expression variations.
4686 * include/std/concepts (copyable): Likewise.
4687
4688 * include/std/type_traits (__is_standard_integer): New helper trait.
4689 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
4690 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
4691 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
4692 * testsuite/20_util/integer_comparisons/1.cc: New test.
4693 * testsuite/20_util/integer_comparisons/2.cc: New test.
4694 * testsuite/20_util/integer_comparisons/equal.cc: New test.
4695 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
4696 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
4697 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
4698 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
4699 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
4700 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
4701 * testsuite/20_util/integer_comparisons/less.cc: New test.
4702 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
4703 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
4704 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
4705 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
4706 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
4707
4708 2020-02-16 Patrick Palka <ppalka@redhat.com>
4709
4710 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
4711 Move code after an early exit constexpr if to under an else branch.
4712 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
4713
4714 2020-02-15 Patrick Palka <ppalka@redhat.com>
4715
4716 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
4717 * include/bits/ranges_algobase.h: Likewise.
4718 * include/bits/ranges_uninitialized.h: Likewise.
4719
4720 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
4721 binary_search, copy_if, count, count_if, equal_range, find, find_end,
4722 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
4723 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
4724 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
4725 lower_bound, make_heap, max, max_element, merge, min, min_element,
4726 minmax, minmax_element, mismatch, next_permutation, none_of,
4727 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
4728 partition_point, pop_heap, prev_permutation, push_heap, remove,
4729 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
4730 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
4731 search, search_n, set_difference, set_intersection,
4732 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
4733 stable_partition, stable_sort, swap_ranges, transform, unique,
4734 unique_copy, upper_bound): Convert into function objects.
4735 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
4736 fill, move_backward, copy_backward): Likewise.
4737 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
4738 uninitialized_default_construct_n, uninitialized_value_construct,
4739 uninitialized_value_construct_n, uninitialized_copy,
4740 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
4741 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
4742 destroy, destroy_n): Likewise.
4743
4744 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
4745 (ranges::find_end): ... here.
4746 (ranges::__lexicographical_compare): Fold into ...
4747 (ranges::lexicographical_compare): ... here.
4748 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
4749 (ranges::equal): ... here.
4750
4751 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
4752
4753 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
4754 * include/std/deque: Likewise.
4755 * include/std/forward_list: Likewise.
4756 * include/std/list: Likewise.
4757 * include/std/string: Likewise.
4758 * include/std/vector: Likewise.
4759 * include/std/version: Likewise.
4760 * testsuite/23_containers/deque/erasure.cc: Test for new value.
4761 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4762 * testsuite/23_containers/list/erasure.cc: Likewise.
4763 * testsuite/23_containers/map/erasure.cc: Likewise.
4764 * testsuite/23_containers/set/erasure.cc: Likewise.
4765 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4766 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4767 * testsuite/23_containers/vector/erasure.cc: Likewise.
4768
4769 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
4770
4771 * include/bits/random.h (uniform_random_bit_generator): Require min()
4772 and max() to be constant expressions and min() to be less than max().
4773 * testsuite/26_numerics/random/concept.cc: Check additional cases.
4774 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
4775
4776 2020-02-13 Patrick Palka <ppalka@redhat.com>
4777
4778 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
4779 * include/Makefile.in: Regenerate.
4780 * include/bits/ranges_uninitialized.h: New header.
4781 * include/std/memory: Include it.
4782 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
4783 test.
4784 * .../uninitialized_copy/constrained.cc: New test.
4785 * .../uninitialized_default_construct/constrained.cc: New test.
4786 * .../uninitialized_fill/constrained.cc: New test.
4787 * .../uninitialized_move/constrained.cc: New test.
4788 * .../uninitialized_value_construct/constrained.cc: New test.
4789
4790 * include/Makefile.am: Add bits/ranges_algobase.h
4791 * include/Makefile.in: Regenerate.
4792 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
4793 existing #includes.
4794 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
4795 __detail::__is_move_iterator, copy_result, move_result,
4796 __equal, equal, copy_result, move_result, move_backward_result,
4797 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
4798 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
4799 fill): Split out into ...
4800 * bits/range_algobase.h: ... this new header.
4801
4802 2020-02-12 Patrick Palka <ppalka@redhat.com>
4803
4804 LWG 3389 and LWG 3390
4805 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
4806 constructing the move_iterator with __i.
4807 (counted_iterator::counted_iterator): Use std::move when initializing
4808 M_current with __i.
4809 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
4810 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
4811
4812 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
4813
4814 PR libstdc++/79193
4815 PR libstdc++/88999
4816
4817 * configure: Regenerated.
4818
4819 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
4820
4821 * include/bits/hashtable.h
4822 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
4823 missing std namespace qualification to forward call.
4824
4825 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
4826
4827 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
4828 comment.
4829 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
4830
4831 * include/std/ranges: Fix non-ASCII characters in comment.
4832
4833 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
4834 equality comparison to be valid and return bool.
4835 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
4836 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
4837 type with ambiguous conversion to fundamental types.
4838 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
4839
4840 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
4841
4842 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
4843 Use remove_cvref_t.
4844 (readable_traits): Rename to indirectly_readable_traits.
4845 (readable): Rename to indirectly_readable.
4846 (writable): Rename to indirectly_writable.
4847 (__detail::__iter_exchange_move): Do not use remove_reference_t.
4848 (indirectly_swappable): Adjust requires expression parameter types.
4849 expression.
4850 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
4851 (ranges::replace_if, ranges::generate_n, ranges::generate)
4852 (ranges::remove): Use new name for writable.
4853 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
4854 Use new name for readable.
4855 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
4856 new name for readable_traits.
4857 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
4858 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
4859 new definition of indirectly_readable.
4860
4861 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
4862 to take parameters of common_iterator, instead of the common_iterator
4863 type itself. Fix argument for __common_iter_has_arrow constraint.
4864 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
4865
4866 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
4867
4868 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
4869 warning.
4870 (basic_istream_view::_Iterator::operator++()): Add missing return.
4871
4872 2020-02-07 Patrick Palka <ppalka@redhat.com>
4873
4874 * include/bits/ranges_algo.h: Remove extraneous &&.
4875
4876 * include/std/ranges (ranges::__detail::__stream_extractable,
4877 ranges::basic_istream_view, ranges::istream_view): Define.
4878 * testsuite/std/ranges/istream_view: New test.
4879
4880 Implement C++20 range adaptors
4881 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
4882 (subrange::_S_store_size): Mark as const instead of constexpr to
4883 avoid what seems to be a bug in GCC.
4884 (__detail::__box): Give it defaulted copy and move constructors.
4885 (ranges::views::_Single::operator()): Mark constexpr.
4886 (ranges::views::_Iota::operator()): Mark constexpr.
4887 (__detail::Empty): Define.
4888 (ranges::views::__closure::_RangeAdaptor,
4889 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
4890 ranges::views::all, ranges::__detail::find_if,
4891 ranges::__detail::find_if_not, ranges::__detail::mismatch,
4892 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
4893 ranges::views::transform, take_view, ranges::views::take,
4894 take_while_view, ranges::views::take_while, drop_view,
4895 ranges::views::drop, join_view, ranges::views::join,
4896 __detail::require_constant, __detail::tiny_range, split_view,
4897 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
4898 common_view, ranges::views::common, reverse_view,
4899 ranges::views::reverse,
4900 ranges::views::__detail::__is_reversible_subrange,
4901 ranges::views::__detail::__is_reverse_view, reverse_view,
4902 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
4903 ranges::views::elements, ranges::views::keys, ranges::views::values):
4904 Define.
4905 (views): Alias for ranges::views.
4906 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
4907 tuple_element<1, ranges::subrange>): New partial specializations.
4908 * testsuite/std/ranges/adaptors/all.cc: New test.
4909 * testsuite/std/ranges/adaptors/common.cc: Likewise.
4910 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
4911 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
4912 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
4913 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
4914 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
4915 * testsuite/std/ranges/adaptors/join.cc: Likewise.
4916 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
4917 * testsuite/std/ranges/adaptors/split.cc: Likewise.
4918 * testsuite/std/ranges/adaptors/take.cc: Likewise.
4919 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
4920 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
4921
4922 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
4923
4924 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
4925 type of enumerations and comparison category types.
4926 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
4927 (__cmp_cat::_Ncmp::unordered): Change value to 2.
4928 (partial_ordering::_M_value, weak_ordering::_M_value)
4929 (strong_ordering::_M_value): Change type to __cmp_cat::type.
4930 (partial_ordering::_M_is_ordered): Remove data member.
4931 (partial_ordering): Use second bit of _M_value for unordered. Adjust
4932 comparison operators.
4933 (weak_ordering::operator partial_ordering): Simplify to remove
4934 branches.
4935 (operator<=>(unspecified, weak_ordering)): Likewise.
4936 (strong_ordering::operator partial_ordering): Likewise.
4937 (strong_ordering::operator weak_ordering): Likewise.
4938 (operator<=>(unspecified, strong_ordering)): Likewise.
4939 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
4940 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
4941 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
4942
4943 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
4944 __cpp_lib_three_way_comparison macro and use deduced return type for
4945 operator<=>.
4946 * testsuite/std/ranges/iota/iterator.cc: New test.
4947
4948 2020-02-07 Patrick Palka <ppalka@redhat.com>
4949 Jonathan Wakely <jwakely@redhat.com>
4950
4951 Implement C++20 constrained algorithms
4952 * include/Makefile.am: Add new header.
4953 * include/Makefile.in: Regenerate.
4954 * include/std/algorithm: Include <bits/ranges_algo.h>.
4955 * include/bits/ranges_algo.h: New file.
4956 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
4957 * testsuite/25_algorithms/all_of/constrained.cc: New test.
4958 * testsuite/25_algorithms/any_of/constrained.cc: New test.
4959 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
4960 * testsuite/25_algorithms/copy/constrained.cc: New test.
4961 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
4962 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
4963 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
4964 * testsuite/25_algorithms/count/constrained.cc: New test.
4965 * testsuite/25_algorithms/count_if/constrained.cc: New test.
4966 * testsuite/25_algorithms/equal/constrained.cc: New test.
4967 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
4968 * testsuite/25_algorithms/fill/constrained.cc: New test.
4969 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
4970 * testsuite/25_algorithms/find/constrained.cc: New test.
4971 * testsuite/25_algorithms/find_end/constrained.cc: New test.
4972 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
4973 * testsuite/25_algorithms/find_if/constrained.cc: New test.
4974 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
4975 * testsuite/25_algorithms/for_each/constrained.cc: New test.
4976 * testsuite/25_algorithms/generate/constrained.cc: New test.
4977 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
4978 * testsuite/25_algorithms/heap/constrained.cc: New test.
4979 * testsuite/25_algorithms/includes/constrained.cc: New test.
4980 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
4981 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
4982 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
4983 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
4984 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
4985 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
4986 test.
4987 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
4988 * testsuite/25_algorithms/max/constrained.cc: New test.
4989 * testsuite/25_algorithms/max_element/constrained.cc: New test.
4990 * testsuite/25_algorithms/merge/constrained.cc: New test.
4991 * testsuite/25_algorithms/min/constrained.cc: New test.
4992 * testsuite/25_algorithms/min_element/constrained.cc: New test.
4993 * testsuite/25_algorithms/minmax/constrained.cc: New test.
4994 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
4995 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
4996 * testsuite/25_algorithms/move/constrained.cc: New test.
4997 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
4998 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
4999 * testsuite/25_algorithms/none_of/constrained.cc: New test.
5000 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
5001 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
5002 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
5003 * testsuite/25_algorithms/partition/constrained.cc: New test.
5004 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
5005 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
5006 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
5007 * testsuite/25_algorithms/remove/constrained.cc: New test.
5008 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
5009 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
5010 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
5011 * testsuite/25_algorithms/replace/constrained.cc: New test.
5012 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
5013 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
5014 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
5015 * testsuite/25_algorithms/reverse/constrained.cc: New test.
5016 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
5017 * testsuite/25_algorithms/rotate/constrained.cc: New test.
5018 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
5019 * testsuite/25_algorithms/search/constrained.cc: New test.
5020 * testsuite/25_algorithms/search_n/constrained.cc: New test.
5021 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
5022 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
5023 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
5024 test.
5025 * testsuite/25_algorithms/set_union/constrained.cc: New test.
5026 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
5027 * testsuite/25_algorithms/sort/constrained.cc: New test.
5028 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
5029 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
5030 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
5031 * testsuite/25_algorithms/transform/constrained.cc: New test.
5032 * testsuite/25_algorithms/unique/constrained.cc: New test.
5033 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
5034 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
5035
5036 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
5037
5038 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
5039 number in comment. Fix indentation.
5040
5041 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
5042 redundant _GLIBCXX20_CONSTEXPR.
5043
5044 * include/std/ranges (viewable_range): Replace decay_t with
5045 remove_cvref_t (LWG 3375).
5046
5047 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
5048
5049 * include/bits/iterator_concepts.h (iter_reference_t)
5050 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
5051 Remove workarounds for PR c++/67704.
5052 * testsuite/24_iterators/aliases.cc: New test.
5053
5054 2020-02-05 Patrick Palka <ppalka@redhat.com>
5055
5056 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
5057 when initializing _M_current.
5058 (move_iterator::base): Split into two overloads differing in
5059 ref-qualifiers as in P1207R4 for C++20.
5060
5061 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
5062
5063 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
5064 use.
5065
5066 PR libstdc++/93562
5067 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
5068 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
5069 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
5070
5071 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
5072
5073 * configure: Regenerate.
5074
5075 2020-01-31 Patrick Palka <ppalka@redhat.com>
5076
5077 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
5078 test_range::end() returns the same type as test_range::begin().
5079 * testsuite/24_iterators/range_operations/next.cc: Likewise.
5080 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
5081 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
5082 Always return a sentinel<I>.
5083
5084 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
5085
5086 PR libstdc++/92895
5087 * include/std/stop_token (stop_token::stop_possible()): Call new
5088 _M_stop_possible() function.
5089 (stop_token::stop_requested()): Do not use stop_possible().
5090 (stop_token::binary_semaphore): New class, as temporary stand-in for
5091 std::binary_semaphore.
5092 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
5093 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
5094 New data members for symchronization with stop_callback destruction.
5095 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
5096 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
5097 Remove.
5098 (stop_token::_Stop_cb::_M_run): New member function.
5099 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
5100 Remove.
5101 (stop_token::_Stop_state::_M_owners): New data member to track
5102 reference count for ownership.
5103 (stop_token::_Stop_state::_M_value): New data member combining a
5104 spinlock, the stop requested flag, and the reference count for
5105 associated stop_source objects.
5106 (stop_token::_Stop_state::_M_requester): New data member for
5107 synchronization with stop_callback destruction.
5108 (stop_token::_Stop_state::_M_stop_possible()): New member function.
5109 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
5110 of _M_value.
5111 (stop_token::_Stop_state::_M_add_owner)
5112 (stop_token::_Stop_state::_M_release_ownership)
5113 (stop_token::_Stop_state::_M_add_ssrc)
5114 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
5115 updating reference counts.
5116 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
5117 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
5118 (stop_token::_Stop_state::_M_try_lock)
5119 (stop_token::_Stop_state::_M_try_lock_and_stop)
5120 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
5121 managing spinlock.
5122 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
5123 read and update state. Release lock while running callbacks. Use new
5124 data members to synchronize with callback destruction.
5125 (stop_token::_Stop_state::_M_remove_callback): Likewise.
5126 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
5127 to read and update state.
5128 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
5129 replacing shared_ptr.
5130 (stop_source::stop_source(const stop_source&)): Update reference count.
5131 (stop_source::operator=(const stop_source&)): Likewise.
5132 (stop_source::~stop_source()): Likewise.
5133 (stop_source::stop_source(stop_source&&)): Define as defaulted.
5134 (stop_source::operator=(stop_source&&)): Establish postcondition on
5135 parameter.
5136 (stop_callback): Enforce preconditions on template parameter. Replace
5137 base class with data member of new _Cb_impl type.
5138 (stop_callback::stop_callback(const stop_token&, Cb&&))
5139 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
5140 (stop_callback::_Cb_impl): New type wrapping _Callback member and
5141 defining the _S_execute member function.
5142 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
5143 test.
5144 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
5145 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
5146 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
5147 New test.
5148 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
5149 test.
5150 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
5151 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
5152 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
5153 test.
5154
5155 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
5156 three_way_comparable_with.
5157 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
5158 (compare_three_way::operator()): Remove redundant constraint from
5159 requires-clause.
5160 (__detail::_Synth3way::operator()): Use three_way_comparable_with
5161 instead of workaround.
5162 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
5163 output due to simplified constraints on compare_three_way::operator().
5164
5165 PR libstdc++/93479
5166 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
5167 * testsuite/18_support/comparisons/object/93479.cc: New test.
5168
5169 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
5170 returns the same type as test_range::begin(). Add comments.
5171 * testsuite/std/ranges/access/rbegin.cc: Likewise.
5172 * testsuite/std/ranges/access/rend.cc: Likewise.
5173 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
5174 test_range is the same as its iterator type.
5175 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
5176 operator- overloads to satisfy sized_sentinel_for when the iterator
5177 satisfies random_access_iterator.
5178
5179 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
5180
5181 PR libstdc++/93470
5182 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
5183 static assertion to object types.
5184
5185 PR libstdc++/93325
5186 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
5187 clock_gettime instead of explicit glibc version check.
5188 * configure: Regenerate.
5189
5190 2020-01-28 Martin Liska <mliska@suse.cz>
5191
5192 PR libstdc++/93478
5193 * include/std/atomic: Fix typo.
5194 * include/std/optional: Likewise.
5195
5196 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
5197
5198 * configure: Regenerate.
5199
5200 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
5201
5202 PR libstdc++/93426
5203 * include/std/span (span): Fix deduction guide.
5204 * testsuite/23_containers/span/deduction.cc: New test.
5205
5206 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
5207
5208 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
5209 (__cmp_cat::_Ord::equivalent): Add enumerator.
5210 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
5211 and greater.
5212 (partial_ordering, weak_ordering, strong_ordering): Remove
5213 constructors taking __cmp_cat::_Eq parameters. Use renamed
5214 enumerators.
5215
5216 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
5217
5218 * acinclude.m4: Handle `--with-toolexeclibdir='.
5219 * Makefile.in: Regenerate.
5220 * aclocal.m4: Regenerate.
5221 * configure: Regenerate.
5222 * doc/Makefile.in: Regenerate.
5223 * include/Makefile.in: Regenerate.
5224 * libsupc++/Makefile.in: Regenerate.
5225 * po/Makefile.in: Regenerate.
5226 * python/Makefile.in: Regenerate.
5227 * src/Makefile.in: Regenerate.
5228 * src/c++11/Makefile.in: Regenerate.
5229 * src/c++17/Makefile.in: Regenerate.
5230 * src/c++98/Makefile.in: Regenerate.
5231 * src/filesystem/Makefile.in: Regenerate.
5232 * testsuite/Makefile.in: Regenerate.
5233
5234 2020-01-23 Alexandre Oliva <oliva@adacore.com>
5235
5236 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
5237 * configure: Rebuild.
5238
5239 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
5240
5241 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
5242
5243 PR libstdc++/91947
5244 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
5245 rule.
5246 * include/Makefile.in: Regenerate.
5247
5248 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
5249
5250 * doc/xml/faq.xml: Fix grammar.
5251 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
5252 * doc/xml/manual/spine.xml: Update copyright years.
5253 * doc/html/*: Regenerate.
5254
5255 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
5256
5257 * doc/xml/faq.xml: Update for SVN -> Git transition.
5258 * doc/xml/manual/appendix_contributing.xml: Likewise.
5259 * doc/xml/manual/status_cxx1998.xml: Likewise.
5260 * doc/xml/manual/status_cxx2011.xml: Likewise.
5261 * doc/xml/manual/status_cxx2014.xml: Likewise.
5262 * doc/xml/manual/status_cxx2017.xml: Likewise.
5263 * doc/xml/manual/status_cxx2020.xml: Likewise.
5264 * doc/xml/manual/status_cxxtr1.xml: Likewise.
5265 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
5266
5267 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
5268
5269 * include/Makefile.am: Add coroutine to the std set.
5270 * include/Makefile.in: Regenerated.
5271 * include/std/coroutine: New file.
5272
5273 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
5274
5275 PR libstdc++/92376
5276 * include/bits/c++config: Only do PSTL config when the header is
5277 present, to fix freestanding.
5278 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
5279 functions if they were detected by configure.
5280
5281 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
5282 Matthew Bauer <mjbauer95@gmail.com>
5283 Jonathan Wakely <jwakely@redhat.com>
5284
5285 PR bootstrap/64271 (partial)
5286 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
5287 to unsigned short.
5288 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
5289 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
5290 definitions with NetBSD upstream.
5291 (ctype_base::blank): Use _CTYPE_BL.
5292 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
5293 Declaration.
5294 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
5295 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
5296 parameters to unsigned char.
5297 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
5298
5299 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
5300
5301 PR libstdc++/91263
5302 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
5303 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
5304 (_Equality_base): Remove.
5305 (_Equality<>::_M_equal): Review implementation. Use
5306 std::is_permutation.
5307 * testsuite/23_containers/unordered_multiset/operators/1.cc
5308 (Hash, Equal, test02, test03): New.
5309 * testsuite/23_containers/unordered_set/operators/1.cc
5310 (Hash, Equal, test02, test03): New.
5311
5312 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
5313
5314 PR libstdc++/93267
5315 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
5316 Move here from <bits/range_access.h> and define using __int128 when
5317 available.
5318 (__is_integer_like, __is_signed_integer_like): Move here from
5319 <bits/range_access.h>.
5320 (weakly_incrementable): Use __is_signed_integer_like.
5321 * include/bits/range_access.h (__max_diff_type, __max_size_type)
5322 (__is_integer_like, __is_signed_integer_like): Move to
5323 <bits/iterator_concepts.h>.
5324 (__make_unsigned_like_t): Move here from <ranges>.
5325 * include/std/ranges (__make_unsigned_like_t): Move to
5326 <bits/range_access.h>.
5327 (iota_view): Replace using-directive with using-declarations.
5328 * testsuite/std/ranges/iota/93267.cc: New test.
5329 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
5330
5331 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
5332
5333 PR libstdc++/93244
5334 * include/bits/fs_path.h (path::generic_string<C,A>)
5335 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
5336 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
5337 root-dir is converted to forward slash in generic pathname.
5338 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
5339 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
5340
5341 PR libstdc++/58605
5342 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
5343 Define.
5344 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
5345 (__atomic_float): Add default member initializer for C++20.
5346 * include/std/atomic (atomic): Likewise.
5347 (atomic::atomic()): Remove noexcept-specifier on default constructor.
5348 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
5349 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
5350 number.
5351 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
5352 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
5353 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
5354 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
5355 expected result for is_trivially_default_constructible.
5356 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
5357 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
5358 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
5359 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
5360 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
5361 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
5362 expected results for is_trivially_default_constructible.
5363 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
5364 new test generator.
5365
5366 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
5367
5368 * testsuite/util/testsuite_iterators.h: Improve comment.
5369
5370 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
5371 initialization syntax.
5372
5373 PR libstdc++/92285
5374 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
5375 of base class independent of __cplusplus value.
5376 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
5377 type defined in the base class
5378 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
5379 * testsuite/24_iterators/istreambuf_iterator/requirements/
5380 base_classes.cc: Adjust expected base class for C++98.
5381
5382 2020-01-09 Olivier Hainque <hainque@adacore.com>
5383
5384 * doc/xml/manual/appendix_contributing.xml: Document _C2
5385 as a reserved identifier, by VxWorks.
5386 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
5387 * include/bits/stl_multimap.h: Likewise.
5388
5389 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
5390
5391 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
5392 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
5393 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
5394 partial specialization to disambiguate the two constrained
5395 specializations.
5396
5397 * include/experimental/type_traits (experimental::is_pod_v): Disable
5398 -Wdeprecated-declarations warnings around reference to std::is_pod.
5399 * include/std/type_traits (is_pod_v): Likewise.
5400 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
5401 is_standard_layout and is_trivial. Do not check is_pod for C++20.
5402 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
5403 Add -Wno-deprecated for C++20.
5404 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
5405 * testsuite/20_util/is_pod/value.cc: Likewise.
5406 * testsuite/experimental/type_traits/value.cc: Likewise.
5407
5408 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
5409
5410 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
5411 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
5412 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
5413
5414 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
5415
5416 PR libstdc++/93205
5417 * include/bits/random.h (operator>>): Check stream operation succeeds.
5418 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
5419 typedefs.
5420 (operator>>): Remove redundant __istream_type typedefs. Check stream
5421 operations succeed.
5422 (__extract_params): New function to fill a vector from a stream.
5423 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
5424
5425 PR libstdc++/93208
5426 * config/abi/pre/gnu.ver: Add new exports.
5427 * include/std/memory_resource (memory_resource::~memory_resource()):
5428 Do not define inline.
5429 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
5430 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
5431 Define.
5432 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
5433 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
5434
5435 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
5436
5437 PR libstdc++/92124
5438 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
5439 template alias.
5440 (_Hashtable<>::__fwd_value_for): New.
5441 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
5442 parameter.
5443 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
5444 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
5445 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
5446 with std::move.
5447 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
5448 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
5449 Adapt.
5450 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
5451 Adapt.
5452 * testsuite/23_containers/unordered_set/92124.cc: New.
5453
5454 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
5455
5456 PR libstdc++/93201
5457 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
5458 detailed error reporting for remove_all. Check result of recursive
5459 call before incrementing iterator.
5460 (remove_all(const path&), remove_all(const path&, error_code&)): Use
5461 do_remove_all.
5462 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
5463 result of recursive call before incrementing iterator.
5464 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
5465 are reported correctly.
5466 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
5467
5468 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
5469
5470 * include/std/condition_variable
5471 (condition_variable_any::wait_on): Rename to match current draft
5472 standard.
5473 (condition_variable_any::wait_on_until): Likewise.
5474 (condition_variable_any::wait_on_for): Likewise.
5475 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
5476 Adjust tests to account for renamed methods.
5477
5478 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
5479
5480 PR libstdc++/92124
5481 * include/bits/stl_tree.h
5482 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
5483 std::move_if_noexcept by std::move.
5484 * testsuite/23_containers/map/92124.cc: New.
5485 * testsuite/23_containers/set/92124.cc: New.
5486
5487 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
5488
5489 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
5490 (stop_source): Likewise (LWG 3362).
5491 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
5492 comparisons.
5493
5494 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
5495 (lexicographical_compare_three_way): Do not depend on
5496 __cpp_lib_concepts.
5497 * include/std/version (__cpp_lib_three_way_comparison): Only define
5498 when __cpp_lib_concepts is defined.
5499 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
5500
5501 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
5502
5503 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
5504 Only define four-argument overload when __cpp_lib_concepts is defined.
5505
5506 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
5507
5508 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
5509
5510 2020-01-01 Jakub Jelinek <jakub@redhat.com>
5511
5512 Update copyright years.
5513 \f
5514 Copyright (C) 2020 Free Software Foundation, Inc.
5515
5516 Copying and distribution of this file, with or without modification,
5517 are permitted in any medium without royalty provided the copyright
5518 notice and this notice are preserved.
This page took 0.319634 seconds and 5 git commands to generate.