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