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