1 2023-05-03 Jonathan Wakely <jwakely@redhat.com>
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.
8 2023-05-03 Jonathan Wakely <jwakely@redhat.com>
10 Backported from master:
11 2022-06-10 Jonathan Wakely <jwakely@redhat.com>
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
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.
29 2023-05-03 Jonathan Wakely <jwakely@redhat.com>
31 Backported from master:
32 2023-04-28 Jonathan Wakely <jwakely@redhat.com>
34 * doc/doxygen/user.cfg.in (STRIP_FROM_PATH): Remove prefixes
37 2023-04-28 Jonathan Wakely <jwakely@redhat.com>
39 Backported from master:
40 2020-11-24 Jonathan Wakely <jwakely@redhat.com>
43 * src/c++11/thread.cc (thread::_M_start_thread(_State_ptr, void (*)())):
44 Check that gthreads is available before calling __gthread_create.
46 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
48 Backported from master:
49 2023-04-04 Jonathan Wakely <jwakely@redhat.com>
51 * doc/xml/manual/extensions.xml: Remove std::bad_exception from
53 * doc/html/manual/ext_demangling.html: Regenerate.
55 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
57 Backported from master:
58 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
60 * doc/doxygen/user.cfg.in (SOURCE_BROWSER): Only set to YES for
62 * include/bits/gslice_array.h (_DEFINE_VALARRAY_OPERATOR): Omit
64 * include/bits/indirect_array.h (_DEFINE_VALARRAY_OPERATOR):
66 * include/bits/mask_array.h (_DEFINE_VALARRAY_OPERATOR):
68 * include/bits/slice_array.h (_DEFINE_VALARRAY_OPERATOR):
70 * include/std/valarray (_DEFINE_VALARRAY_UNARY_OPERATOR)
71 (_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT)
72 (_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT)
73 (_DEFINE_BINARY_OPERATOR): Likewise.
75 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
77 Backported from master:
78 2022-10-28 Jonathan Wakely <jwakely@redhat.com>
80 * include/bits/fs_path.h (path::filename()): Fix dangling
83 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
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()
91 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
93 Backported from master:
94 2023-02-28 Jonathan Wakely <jwakely@redhat.com>
97 * include/std/memory (uses_allocator_construction_args):
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.
103 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
105 Backported from master:
106 2023-02-16 Jonathan Wakely <jwakely@redhat.com>
108 * include/experimental/optional: Fix header name in comment.
110 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
112 Backported from master:
113 2022-07-20 Jonathan Wakely <jwakely@redhat.com>
116 * include/bits/stl_iterator.h (common_iterator): Define move
117 constructor and move assignment operator.
118 (common_iterator::_M_assign): New function implementing
120 (common_iterator::operator=): Use _M_assign.
121 (common_iterator::_S_valueless): New constant.
122 * testsuite/24_iterators/common_iterator/100823.cc: New test.
124 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
126 Backported from master:
127 2022-07-20 Jonathan Wakely <jwakely@redhat.com>
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.
135 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
137 Backported from master:
138 2022-11-23 Jonathan Wakely <jwakely@redhat.com>
141 * testsuite/experimental/filesystem/iterators/error_reporting.cc:
142 Use a static buffer with space after it.
144 2023-03-16 Jonathan Wakely <jwakely@redhat.com>
146 Backported from master:
147 2023-02-02 Jonathan Wakely <jwakely@redhat.com>
150 * include/bits/fs_path.h (path::path(string_view, _Type))
151 (path::_Cmpt::_Cmpt(string_view, _Type, size_t)): Move inline
153 * src/c++17/fs_path.cc: ... here.
154 * testsuite/27_io/filesystem/path/108636.cc: New test.
156 2022-11-08 Jonathan Wakely <jwakely@redhat.com>
158 Backported from master:
159 2022-11-08 Jonathan Wakely <jwakely@redhat.com>
161 * doc/xml/authors.xml: Remove empty author element.
162 * doc/xml/manual/spine.xml: Likewise.
163 * doc/html/*: Regenerate.
165 2022-08-03 Jonathan Wakely <jwakely@redhat.com>
167 Backported from master:
168 2021-08-31 Jonathan Wakely <jwakely@redhat.com>
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.
176 2022-08-03 Jonathan Wakely <jwakely@redhat.com>
178 * include/bits/list.tcc (list::merge) [!USE_CXX11_ABI]: Remove
179 call to size() and try-catch block.
181 2022-08-03 Tim Adye <Tim.Adye@cern.ch>
183 Backported from master:
184 2021-06-04 Tim Adye <Tim.Adye@cern.ch>
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
191 2022-08-03 Jonathan Wakely <jwakely@redhat.com>
193 Backported from master:
194 2021-06-15 Jonathan Wakely <jwakely@redhat.com>
196 * include/std/ranges (subrange(i, s, n)): Remove assertion.
197 * testsuite/std/ranges/subrange/constexpr.cc: New test.
199 2022-08-03 Jonathan Wakely <jwakely@redhat.com>
201 Backported from master:
202 2021-11-10 Jonathan Wakely <jwakely@redhat.com>
206 * config/os/gnu-linux/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK):
207 Define for glibc 2.34 and later.
209 2022-07-23 Jonathan Wakely <jwakely@redhat.com>
211 Backported from master:
212 2022-07-01 Jonathan Wakely <jwakely@redhat.com>
215 * include/Makefile.am (largefile-config.h): Add
216 stamp-${host_alias} prerequisite.
217 * include/Makefile.in: Regenerate.
219 2022-07-23 Jonathan Wakely <jwakely@redhat.com>
221 Backported from master:
222 2021-11-05 Jonathan Wakely <jwakely@redhat.com>
224 * include/bits/range_access.h (begin(valarray), end(valarray)):
227 2022-07-22 Patrick Palka <ppalka@redhat.com>
229 Backported from master:
230 2022-07-22 Patrick Palka <ppalka@redhat.com>
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
248 2022-06-28 Release Manager
250 * GCC 10.4.0 released.
252 2022-06-15 Jonathan Wakely <jwakely@redhat.com>
254 Backported from master:
255 2022-06-13 Jonathan Wakely <jwakely@redhat.com>
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.
261 2022-06-15 Mark Mentovai <mark@mentovai.com>
263 Backported from master:
264 2022-06-13 Mark Mentovai <mark@mentovai.com>
266 * include/experimental/bits/fs_path.h (__detail::__null_terminated):
267 Rename to __nul_terminated to avoid colliding with a macro in
270 2022-06-15 Jonathan Wakely <jwakely@redhat.com>
272 Backported from master:
273 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
276 * testsuite/27_io/filesystem/iterators/error_reporting.cc:
277 Use a trailing char array as storage for dirent::d_name.
279 2022-06-15 Jonathan Wakely <jwakely@redhat.com>
281 Backported from master:
282 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
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:
289 2022-06-15 Jonathan Wakely <jwakely@redhat.com>
291 Backported from master:
292 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
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
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.
304 2022-06-15 Jonathan Wakely <jwakely@redhat.com>
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.
311 2022-06-15 Jonathan Wakely <jwakely@redhat.com>
313 Backported from master:
314 2021-12-01 Jonathan Wakely <jwakely@redhat.com>
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.
322 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
325 * testsuite/30_threads/jthread/95989.cc: Mark XFAIL.
327 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
329 Backported from master:
330 2020-11-24 Jonathan Wakely <jwakely@redhat.com>
332 * testsuite/30_threads/jthread/95989.cc: Run all three test
333 functions, not just the first one twice.
335 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
337 Backported from master:
338 2022-04-28 Jonathan Wakely <jwakely@redhat.com>
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:
349 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
351 Backported from master:
352 2021-11-05 Jonathan Wakely <jwakely@redhat.com>
354 * testsuite/lib/gdb-test.exp: Add target selector support to the
356 * testsuite/libstdc++-prettyprinters/80276.cc: Add xfail for
358 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
359 * testsuite/libstdc++-prettyprinters/prettyprinters.exp: Tweak
362 2022-06-10 Jonathan Wakely <jwakely@redhat.com>
364 Backported from master:
365 2022-06-10 Jonathan Wakely <jwakely@redhat.com>
368 * include/experimental/bits/fs_path.h (path::begin, path::end):
369 Remove noexcept from declarations.
371 2022-05-31 Patrick Palka <ppalka@redhat.com>
373 Backported from master:
374 2021-07-16 Patrick Palka <ppalka@redhat.com>
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.
382 2022-05-31 Patrick Palka <ppalka@redhat.com>
384 Backported from master:
385 2021-06-18 Patrick Palka <ppalka@redhat.com>
388 * include/bits/iterator_concepts.h (weakly_incrementable): Remove
389 default_initializable requirement.
390 * include/bits/stl_iterator.h (common_iterator): Constrain the
392 (counted_iterator): Likewise.
393 * include/std/ranges (ranges::view): Remove default_initializable
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.
424 2022-05-29 Iain Sandoe <iain@sandoe.co.uk>
426 Backported from master:
427 2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
429 * testsuite/17_intro/names.cc: Exclude j from the list
430 of test symbols for Darwin.
432 2022-05-29 Iain Sandoe <iain@sandoe.co.uk>
434 Backported from master:
435 2021-11-19 Iain Sandoe <iain@sandoe.co.uk>
437 * testsuite/lib/prune.exp: Prune dsymutil (ld64) warning.
439 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
441 Backported from master:
442 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
444 * doc/xml/manual/prerequisites.xml: Fix attributes for external
446 * doc/html/manual/setup.html: Regenerate.
448 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
450 Backported from master:
451 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
453 * doc/html/manual/status.html: Regenerate.
454 * doc/xml/manual/status_cxx2020.xml: Fix supported version for
455 C++20 bit operations.
457 2022-05-09 Jonathan Wakely <jwakely@redhat.com>
459 Backported from master:
460 2022-04-20 Jonathan Wakely <jwakely@redhat.com>
463 * doc/xml/manual/prerequisites.xml: Document libiconv
465 * doc/html/manual/setup.html: Regenerate.
466 * src/Makefile.am (CXXLINK): Add $(LTLIBICONV).
467 * src/Makefile.in: Regenerate.
469 2022-05-09 Jonathan Wakely <jwakely@redhat.com>
471 Backported from master:
472 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
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.
481 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
483 Backported from master:
484 2021-12-09 Jonathan Wakely <jwakely@redhat.com>
486 * include/bits/stl_iterator.h (operator==, operator<=>): Define
487 overloads for homogeneous specializations of reverse_iterator,
488 __normal_iterator and move_iterator.
490 2022-04-26 Patrick Palka <ppalka@redhat.com>
492 Backported from master:
493 2021-10-21 Patrick Palka <ppalka@redhat.com>
495 * include/bits/stl_iterator.h (common_iterator::__arrow_proxy):
496 Make fully constexpr as per LWG 3595.
497 (common_iterator::__postfix_proxy): Likewise.
499 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
501 Backported from master:
502 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
505 * include/bits/stl_iterator.h (reverse_iterator): Check
506 __cpp_lib_concepts instead of __cplusplus.
508 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
510 Backported from master:
511 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
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
518 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
521 * include/ext/rope (rope::erase(size_type)): Deprecate broken
524 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
526 Backported from master:
527 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
530 * include/bits/vector.tcc (vector<bool>::_M_shrink_to_fit()):
531 When size() is zero just deallocate and reset.
533 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
535 Backported from master:
536 2021-11-01 Jonathan Wakely <jwakely@redhat.com>
538 * include/std/span (span(Range&&)): Reorder constraints.
540 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
542 Backported from master:
543 2021-11-09 Jonathan Wakely <jwakely@redhat.com>
545 * testsuite/26_numerics/random/random_device/cons/token.cc:
546 Retry if random devices produce the same value.
548 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
550 Backported from master:
551 2021-11-16 Jonathan Wakely <jwakely@redhat.com>
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:
557 * testsuite/experimental/string_view/operations/compare/wchar_t/1.cc:
560 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
562 Backported from master:
563 2021-11-10 Jonathan Wakely <jwakely@redhat.com>
566 * testsuite/17_intro/headers/c++1998/49745.cc: Explicitly list
567 all C++ headers instead of including <bits/stdc++.h>
569 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
571 Backported from master:
572 2021-12-09 Jonathan Wakely <jwakely@redhat.com>
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.
579 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
581 Backported from master:
582 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
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.
589 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
591 Backported from master:
592 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
594 * include/experimental/bits/fs_ops.h (fs::copy_file): Remove
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.
602 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
604 Backported from master:
605 2022-04-01 Jonathan Wakely <jwakely@redhat.com>
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.
612 2022-04-26 Timm Bäder <tbaeder@redhat.com>
614 Backported from master:
615 2022-04-01 Timm Bäder <tbaeder@redhat.com>
617 * include/bits/fs_ops.h: Fix filename in Doxygen comment.
618 * include/experimental/bits/fs_ops.h: Likewise.
620 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
622 Backported from master:
623 2022-04-20 Jonathan Wakely <jwakely@redhat.com>
625 * testsuite/21_strings/basic_string_view/operations/copy/char/constexpr.cc:
626 Check correct feature test macro.
628 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
630 Backported from master:
631 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
633 * doc/xml/manual/intro.xml: Fix comment.
635 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
637 Backported from master:
638 2022-03-03 Jonathan Wakely <jwakely@redhat.com>
640 * testsuite/17_intro/names.cc (func): Undef on AIX.
642 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
644 Backported from master:
645 2022-01-27 Jonathan Wakely <jwakely@redhat.com>
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:
652 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
654 Backported from master:
655 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
657 * testsuite/ext/rope/pthread7-rope.cc: Add dg-timeout-factor.
659 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
661 Backported from master:
662 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
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.
671 2022-04-26 Pavel I. Kryukov <pavel.kryukov@phystech.edu>
673 Backported from master:
674 2022-01-06 Pavel I. Kryukov <pavel.kryukov@phystech.edu>
675 Jonathan Wakely <jwakely@redhat.com>
678 * include/bits/forward_list.tcc (forward_list::merge): Check for
680 * testsuite/23_containers/forward_list/operations/merge.cc: New test.
682 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
684 Backported from master:
685 2021-12-14 Jonathan Wakely <jwakely@redhat.com>
687 * include/bits/regex_compiler.tcc (_Compiler::_M_match_token):
688 Use reserved name for parameter.
689 * testsuite/17_intro/names.cc: Check "token".
691 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
693 Backported from master:
694 2021-08-25 Jonathan Wakely <jwakely@redhat.com>
696 * testsuite/17_intro/names.cc: Check 'sz'.
698 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
700 * doc/xml/manual/status_cxx1998.xml: Refer to GCC 10 not
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.
710 2022-02-17 Patrick Palka <ppalka@redhat.com>
712 Backported from master:
713 2021-10-21 Patrick Palka <ppalka@redhat.com>
716 * include/bits/stl_iterator.h (__niter_base): Make constexpr
718 (__miter_base): Likewise.
719 * testsuite/25_algorithms/move/constexpr.cc: New test.
721 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
723 Backported from master:
724 2021-11-18 Jonathan Wakely <jwakely@redhat.com>
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.
731 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
733 Backported from master:
734 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
737 * doc/xml/faq.xml: Add '-x c++' to preprocessor command.
738 * doc/html/faq.html: Regenerate.
740 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
742 Backported from master:
743 2021-12-04 Jonathan Wakely <jwakely@redhat.com>
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.
750 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
752 Backported from master:
753 2021-11-30 Jonathan Wakely <jwakely@redhat.com>
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.
761 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
763 Backported from master:
764 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
766 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Strip
767 versioned namespace from the type name that is printed.
769 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
771 Backported from master:
772 2021-08-28 Jonathan Wakely <jwakely@redhat.com>
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
778 (allocator<void>::construct, allocator<void>::destroy): Remove.
779 * include/ext/extptr_allocator.h (_Extptr_allocator<void>):
780 Add default constructor and converting constructor.
782 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
784 Backported from master:
785 2021-11-23 Jonathan Wakely <jwakely@redhat.com>
788 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr
789 with non-empty pointer and non-empty deleter.
791 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
793 Backported from master:
794 2021-11-04 Jonathan Wakely <jwakely@redhat.com>
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.
805 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
807 Backported from master:
808 2021-07-22 Jonathan Wakely <jwakely@redhat.com>
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.
816 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
818 Backported from master:
819 2021-08-19 Jonathan Wakely <jwakely@redhat.com>
822 * include/std/charconv (__to_chars_i): Remove redundant check.
824 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
826 Backported from master:
827 2021-10-22 Jonathan Wakely <jwakely@redhat.com>
830 * include/std/any (make_any): Add SFINAE constraint.
831 * testsuite/20_util/any/102894.cc: New test.
833 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
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.
843 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
845 Backported from master:
846 2021-08-09 Jonathan Wakely <jwakely@redhat.com>
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:
853 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
855 Backported from master:
856 2021-07-20 Jonathan Wakely <jwakely@redhat.com>
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.
866 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
868 Backported from master:
869 2021-06-02 Jonathan Wakely <jwakely@redhat.com>
873 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper):
874 Value-initialize subobject.
875 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
877 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
880 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
882 Backported from master:
883 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
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.
890 2021-11-26 Antony Polukhin <antoshkka@gmail.com>
892 Backported from master:
893 2021-08-17 Antony Polukhin <antoshkka@gmail.com>
894 Jonathan Wakely <jwakely@redhat.com>
896 * include/bits/random.tcc (seed_seq::seed_seq): Reserve capacity
898 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
901 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
903 Backported from master:
904 2021-08-12 Jonathan Wakely <jwakely@redhat.com>
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.
915 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
917 * testsuite/27_io/types/1.cc: Add c++11 target selector to
920 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
922 Backported from master:
923 2021-05-11 Jonathan Wakely <jwakely@redhat.com>
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
929 * testsuite/25_algorithms/copy/debug/99402.cc: Avoid C++11
932 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
934 * testsuite/23_containers/array/comparison_operators/96851.cc:
935 Skip test in debug mode.
937 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
939 * include/bits/stl_iterator.h: Include required header for
940 std::iterator class template and iterator category tags.
942 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
944 Backported from master:
945 2021-11-25 Jonathan Wakely <jwakely@redhat.com>
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.
953 2021-11-23 Jonathan Wakely <jwakely@redhat.com>
955 Backported from master:
956 2021-11-23 Jonathan Wakely <jwakely@redhat.com>
959 * include/ext/bitmap_allocator.h: Include <bits/stl_function.h>
960 instead of <functional>.
962 2021-11-01 Jonathan Wakely <jwakely@redhat.com>
964 * include/std/valarray (begin, end): Remove nodiscard attribute.
966 2021-11-01 Jonathan Wakely <jwakely@redhat.com>
968 Backported from master:
969 2021-11-01 Jonathan Wakely <jwakely@redhat.com>
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.
979 2021-10-13 Jonathan Wakely <jwakely@redhat.com>
981 Backported from master:
982 2021-10-13 Jonathan Wakely <jwakely@redhat.com>
984 * testsuite/28_regex/match_results/102667.C: Moved to...
985 * testsuite/28_regex/match_results/102667.cc: ...here.
987 2021-10-13 Jonathan Wakely <jwakely@redhat.com>
989 * testsuite/21_strings/basic_string_view/requirements/trivially_copyable.cc:
990 Use -std=gnu++17 option.
992 2021-10-13 Jonathan Wakely <jwakely@redhat.com>
994 Backported from master:
995 2021-08-20 Jonathan Wakely <jwakely@redhat.com>
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:
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:
1009 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
1011 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
1013 * testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc:
1015 * testsuite/experimental/filesystem/operations/exists.cc:
1017 * testsuite/experimental/filesystem/operations/is_empty.cc:
1019 * testsuite/experimental/filesystem/operations/remove.cc:
1021 * testsuite/experimental/filesystem/operations/remove_all.cc:
1023 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1025 * testsuite/util/testsuite_fs.h (__gnu_test::permissions_are_testable):
1026 New function to guess whether testing permissions will work.
1028 2021-10-13 Jonathan Wakely <jwakely@redhat.com>
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:
1035 2021-10-13 Jonathan Wakely <jwakely@redhat.com>
1037 Backported from master:
1038 2021-06-22 Jonathan Wakely <jwakely@redhat.com>
1040 * include/bits/random.h (seed_seq): Constrain initializer-list
1042 * include/bits/random.tcc (seed_seq): Add template parameter.
1043 * testsuite/26_numerics/random/seed_seq/cons/default.cc: Check
1045 * testsuite/26_numerics/random/seed_seq/cons/initlist.cc: Check
1048 2021-10-13 Jonathan Wakely <jwakely@redhat.com>
1050 Backported from master:
1051 2021-05-12 Jonathan Wakely <jwakely@redhat.com>
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
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
1062 2021-10-13 Patrick Palka <ppalka@redhat.com>
1064 Backported from master:
1065 2021-04-28 Patrick Palka <ppalka@redhat.com>
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
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.
1084 2021-10-12 Patrick Palka <ppalka@redhat.com>
1086 Backported from master:
1087 2021-08-02 Patrick Palka <ppalka@redhat.com>
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
1097 * testsuite/25_algorithms/copy/constrained.cc (test06): New test.
1098 * testsuite/25_algorithms/move/constrained.cc (test05): New test.
1100 2021-10-12 Patrick Palka <ppalka@redhat.com>
1102 Backported from master:
1103 2021-08-02 Patrick Palka <ppalka@redhat.com>
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.
1114 2021-10-12 Patrick Palka <ppalka@redhat.com>
1116 Backported from master:
1117 2021-08-02 Patrick Palka <ppalka@redhat.com>
1120 * include/std/ranges (join_view::_Iterator::_Iterator): Add
1123 2021-10-12 Patrick Palka <ppalka@redhat.com>
1125 Backported from master:
1126 2021-06-20 Patrick Palka <ppalka@redhat.com>
1128 * include/std/ranges (split_view::_InnerIter::base): Define as
1131 2021-10-12 Patrick Palka <ppalka@redhat.com>
1133 Backported from master:
1134 2021-06-19 Patrick Palka <ppalka@redhat.com>
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.
1140 2021-10-12 Patrick Palka <ppalka@redhat.com>
1142 Backported from master:
1143 2021-06-19 Patrick Palka <ppalka@redhat.com>
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.
1149 2021-10-12 Patrick Palka <ppalka@redhat.com>
1151 Backported from master:
1152 2021-06-19 Patrick Palka <ppalka@redhat.com>
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.
1160 2021-10-12 Patrick Palka <ppalka@redhat.com>
1162 Backported from master:
1163 2021-06-18 Patrick Palka <ppalka@redhat.com>
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):
1172 * testsuite/25_algorithms/minmax_element/constrained.cc (test02):
1175 2021-10-12 Patrick Palka <ppalka@redhat.com>
1177 Backported from master:
1178 2021-06-18 Patrick Palka <ppalka@redhat.com>
1180 * include/std/concepts (convertible_to): Just use declval as per
1183 2021-10-12 Patrick Palka <ppalka@redhat.com>
1185 Backported from master:
1186 2021-05-21 Patrick Palka <ppalka@redhat.com>
1189 * include/std/ranges (drop_while_view::begin): Assert the
1190 precondition added by LWG 3490.
1192 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1194 Backported from master:
1195 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1197 * testsuite/20_util/tuple/comparison_operators/overloaded.cc:
1198 Restore test for operator<.
1200 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1202 Backported from master:
1203 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1205 * testsuite/27_io/basic_filebuf/close/81256.cc: Moved to...
1206 * testsuite/27_io/basic_filebuf/close/wchar_t/81256.cc: ...here.
1208 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1210 Backported from master:
1211 2021-10-05 Jonathan Wakely <jwakely@redhat.com>
1213 * testsuite/21_strings/basic_string_view/requirements/trivially_copyable.cc:
1215 * testsuite/23_containers/span/trivially_copyable.cc: New test.
1217 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1219 Backported from master:
1220 2021-08-16 Jonathan Wakely <jwakely@redhat.com>
1222 * python/Makefile.am [GLIBCXX_BUILD_DEBUG] (install-data-local):
1223 Install another copy of the GDB hook.
1224 * python/Makefile.in: Regenerate.
1226 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1228 Backported from master:
1229 2021-08-17 Jonathan Wakely <jwakely@redhat.com>
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.
1236 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1238 Backported from master:
1239 2021-09-23 Jonathan Wakely <jwakely@redhat.com>
1242 * src/c++11/system_error.cc
1243 (system_error_category::default_error_condition): Add 0 to
1245 * testsuite/19_diagnostics/error_category/102425.cc: New test.
1247 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1249 Backported from master:
1250 2021-09-16 Jonathan Wakely <jwakely@redhat.com>
1252 * include/bits/fs_path.h (advance): Remove non-deducible
1255 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1257 Backported from master:
1258 2021-08-28 Jonathan Wakely <jwakely@redhat.com>
1261 * src/c++17/fs_ops.cc (fs::absolute): Call non-throwing form,
1262 to avoid unnecessary current_path() call.
1264 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1266 Backported from master:
1267 2021-09-17 Jonathan Wakely <jwakely@redhat.com>
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.
1274 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1276 Backported from master:
1277 2021-09-16 Jonathan Wakely <jwakely@redhat.com>
1280 * include/std/span (span(Range&&)): Add constraint to deduction
1283 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1285 Backported from master:
1286 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1288 * testsuite/25_algorithms/is_permutation/2.cc: Include <iterator>.
1290 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1292 Backported from master:
1293 2021-10-05 Jonathan Wakely <jwakely@redhat.com>
1295 * testsuite/20_util/integer_comparisons/greater.cc: New test.
1297 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1299 Backported from master:
1300 2021-10-11 Jonathan Wakely <jwakely@redhat.com>
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.
1308 2021-08-23 Jonathan Wakely <jwakely@redhat.com>
1310 Backported from master:
1311 2021-08-23 Jonathan Wakely <jwakely@redhat.com>
1313 * include/std/ranges (basic_istream_view): Add default template
1315 * testsuite/std/ranges/istream_view.cc: Check it.
1317 2021-08-19 Jonathan Wakely <jwakely@redhat.com>
1319 Backported from master:
1320 2021-08-19 Jonathan Wakely <jwakely@redhat.com>
1323 * doc/xml/manual/status_cxx2020.xml: Add P1739R4 to status table.
1324 * doc/html/manual/status.html: Regenerate.
1326 2021-08-17 Thomas Schwinge <thomas@codesourcery.com>
1328 Backported from master:
1329 2021-08-17 Thomas Schwinge <thomas@codesourcery.com>
1331 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose,
1334 2021-08-11 Jonathan Wakely <jwakely@redhat.com>
1336 Backported from master:
1337 2021-08-11 Jonathan Wakely <jwakely@redhat.com>
1340 * testsuite/experimental/random/randint.cc: Loop and retry if
1341 reseed() produces the same sequence.
1343 2021-08-11 Jonathan Wakely <jwakely@redhat.com>
1345 Backported from master:
1346 2021-07-20 Jonathan Wakely <jwakely@redhat.com>
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.
1361 2021-08-11 Jonathan Wakely <jwakely@redhat.com>
1363 Backported from master:
1364 2021-07-20 Jonathan Wakely <jwakely@redhat.com>
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
1371 * testsuite/experimental/filesystem/operations/create_directory.cc:
1374 2021-08-11 Jonathan Wakely <jwakely@redhat.com>
1376 Backported from master:
1377 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
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.
1385 2021-08-11 Jonathan Wakely <jwakely@redhat.com>
1387 Backported from master:
1388 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
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.
1398 2021-08-10 Jonathan Wakely <jwakely@redhat.com>
1400 Backported from master:
1401 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
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.
1408 2021-07-22 Jonathan Wakely <jwakely@redhat.com>
1410 Backported from master:
1411 2021-04-15 Jonathan Wakely <jwakely@redhat.com>
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.
1420 2021-07-22 Jonathan Wakely <jwakely@redhat.com>
1422 Backported from master:
1423 2021-06-07 Jonathan Wakely <jwakely@redhat.com>
1426 * include/std/optional (operator<=>(const optional<T>& const U&)):
1427 Add missing constraint and add workaround for template
1429 * testsuite/20_util/optional/relops/three_way.cc: Check that
1430 type without equality comparison cannot be compared when wrapped
1433 2021-07-14 Jonathan Wakely <jwakely@redhat.com>
1435 Backported from master:
1436 2021-07-13 Jonathan Wakely <jwakely@redhat.com>
1439 * include/std/string_view (ends_with): Use traits_type::compare
1442 2021-07-14 Jonathan Wakely <jwakely@redhat.com>
1444 Backported from master:
1445 2021-07-12 Jonathan Wakely <jwakely@redhat.com>
1448 * include/std/span (as_writable_bytes): Add requires-clause.
1449 * testsuite/23_containers/span/101411.cc: New test.
1451 2021-07-06 Avi Kivity <avi@scylladb.com>
1453 Backported from master:
1454 2021-06-07 Avi Kivity <avi@scylladb.com>
1457 * include/std/ranges (elements_view::__iter_cat::_S_iter_cat):
1458 Add missing typename.
1460 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
1462 Backported from master:
1463 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
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.
1471 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
1473 * include/std/variant (__same_types, __check_visitor_results):
1476 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
1478 Backported from master:
1479 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
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.
1494 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
1496 Backported from master:
1497 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
1499 * include/bits/basic_string.h (basic_string(const CharT*, const A&)):
1500 Do not do arithmetic on null pointer.
1502 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
1504 Backported from master:
1505 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
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.
1512 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
1514 Backported from master:
1515 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
1517 * testsuite/20_util/from_chars/3.cc: Use unsigned type to avoid
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.
1526 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
1528 Backported from master:
1529 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
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
1536 (__same_types): Move into namespace __detail::__variant.
1537 (__check_visitor_results): Likewise. Use __invoke_result_t and
1539 (__check_visitor_result): Remove.
1540 (visit): Use __visit_result_t for return type.
1541 * testsuite/20_util/variant/100384.cc: New test.
1543 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
1545 Backported from master:
1546 2021-04-22 Jonathan Wakely <jwakely@redhat.com>
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.
1554 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
1556 Backported from master:
1557 2021-05-11 Jonathan Wakely <jwakely@redhat.com>
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.
1572 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
1574 Backported from master:
1575 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
1577 * include/bits/shared_ptr_base.h (__shared_count(unique_ptr&&)):
1578 Initialize a non-reference deleter from an rvalue, as per LWG
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
1585 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
1587 Backported from master:
1588 2021-06-17 Jonathan Wakely <jwakely@redhat.com>
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):
1595 (__constant_string_p, __constant_array_p): Give external
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.
1601 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
1603 Backported from master:
1604 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
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.
1611 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
1613 Backported from master:
1614 2021-06-09 Jonathan Wakely <jwakely@redhat.com>
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.
1621 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
1623 Backported from master:
1624 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
1627 * include/std/any (any(in_place_t<T>, initializer_list<U>, A&&...))
1628 (any::emplace<T>(initializer_list<U>, A&&...)): Fix constraint
1630 * testsuite/20_util/any/cons/101034.cc: New test.
1632 2021-06-10 Patrick Palka <ppalka@redhat.com>
1634 Backported from master:
1635 2021-06-03 Patrick Palka <ppalka@redhat.com>
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
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.
1647 2021-06-10 Patrick Palka <ppalka@redhat.com>
1649 Backported from master:
1650 2021-05-21 Patrick Palka <ppalka@redhat.com>
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
1657 * testsuite/std/ranges/iota/iota_view.cc (test05): New test.
1659 2021-06-10 Patrick Palka <ppalka@redhat.com>
1661 Backported from master:
1662 2021-05-06 Patrick Palka <ppalka@redhat.com>
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.
1670 2021-06-10 Patrick Palka <ppalka@redhat.com>
1672 Backported from master:
1673 2021-05-06 Patrick Palka <ppalka@redhat.com>
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().
1683 2021-06-10 Patrick Palka <ppalka@redhat.com>
1685 Backported from master:
1686 2021-05-18 Patrick Palka <ppalka@redhat.com>
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.
1693 2021-06-10 Patrick Palka <ppalka@redhat.com>
1695 Backported from master:
1696 2021-05-18 Patrick Palka <ppalka@redhat.com>
1699 * include/std/ranges (elements_view::_Iterator): Also befriend
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):
1708 2021-06-10 Patrick Palka <ppalka@redhat.com>
1710 Backported from master:
1711 2021-05-20 Patrick Palka <ppalka@redhat.com>
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.
1721 2021-06-03 Jonathan Wakely <jwakely@redhat.com>
1723 Backported from master:
1724 2021-06-01 Jonathan Wakely <jwakely@redhat.com>
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.
1732 2021-06-03 Jonathan Wakely <jwakely@redhat.com>
1734 Backported from master:
1735 2021-05-26 Jonathan Wakely <jwakely@redhat.com>
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.
1748 2021-06-03 Jonathan Wakely <jwakely@redhat.com>
1750 Backported from master:
1751 2021-06-01 Jonathan Wakely <jwakely@redhat.com>
1754 * python/Makefile.am: Use archive name for printer hook if no
1755 dynamic library name is available.
1756 * python/Makefile.in: Regenerate.
1758 2021-06-03 Philippe Blain <levraiphilippeblain@gmail.com>
1760 Backported from master:
1761 2021-04-21 Philippe Blain <levraiphilippeblain@gmail.com>
1762 Jonathan Wakely <jwakely@redhat.com>
1765 * python/Makefile.am: Install libstdc++*-gdb.py more robustly.
1766 * python/Makefile.in: Regenerate.
1768 2021-05-17 Jonathan Wakely <jwakely@redhat.com>
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):
1775 * testsuite/27_io/filesystem/path/construct/100630.cc: New test.
1776 * testsuite/experimental/filesystem/path/construct/100630.cc:
1779 2021-05-17 Jonathan Wakely <jwakely@redhat.com>
1781 Backported from master:
1782 2021-03-11 Jonathan Wakely <jwakely@redhat.com>
1784 * python/libstdcxx/v6/printers.py (find_type): Use tag attribute
1785 instead of unqualified() method.
1787 2021-05-05 Patrick Palka <ppalka@redhat.com>
1789 Backported from master:
1790 2021-05-05 Patrick Palka <ppalka@redhat.com>
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.
1797 2021-05-04 Patrick Palka <ppalka@redhat.com>
1799 Backported from master:
1800 2021-04-30 Patrick Palka <ppalka@redhat.com>
1802 * include/std/ranges (split_view::_InnerIter::operator++):
1803 Depend on _Base instead of _Vp directly, as per LWG 3532.
1805 2021-05-04 Patrick Palka <ppalka@redhat.com>
1807 Backported from master:
1808 2021-04-20 Patrick Palka <ppalka@redhat.com>
1811 * include/bits/stl_iterator.h (__detail::__move_iter_cat):
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
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
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.
1903 2021-05-03 Patrick Palka <ppalka@redhat.com>
1905 Backported from master:
1906 2021-04-27 Patrick Palka <ppalka@redhat.com>
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.
1914 2021-04-30 Jonathan Wakely <jwakely@redhat.com>
1916 Backported from master:
1917 2021-04-30 Jonathan Wakely <jwakely@redhat.com>
1919 * include/bits/basic_string.h (__cpp_lib_constexpr_string):
1920 Only define for C++17 and later.
1922 2021-04-29 Jonathan Wakely <jwakely@redhat.com>
1924 Backported from master:
1925 2021-04-26 Jonathan Wakely <jwakely@redhat.com>
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'.
1932 2021-04-29 Jonathan Wakely <jwakely@redhat.com>
1934 Backported from master:
1935 2021-04-28 Jonathan Wakely <jwakely@redhat.com>
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:
1943 * testsuite/21_strings/char_traits/requirements/version.cc: New test.
1945 2021-04-21 Jonathan Wakely <jwakely@redhat.com>
1948 * testsuite/experimental/net/internet/address/v6/members.cc:
1951 2021-04-21 Patrick Palka <ppalka@redhat.com>
1953 Backported from master:
1954 2021-04-08 Patrick Palka <ppalka@redhat.com>
1956 * include/std/ranges (__detail::find): Define.
1957 (split_view::_OuterIter::operator++): Apply proposed resolution
1959 * testsuite/std/ranges/adaptors/split.cc (test10): New test.
1961 2021-04-21 Patrick Palka <ppalka@redhat.com>
1963 Backported from master:
1964 2021-04-08 Patrick Palka <ppalka@redhat.com>
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.
1972 2021-04-21 Patrick Palka <ppalka@redhat.com>
1974 Backported from master:
1975 2021-04-08 Patrick Palka <ppalka@redhat.com>
1977 * include/std/ranges (__detail::__returnable_element): New
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
1984 (elements_view::operator++): Remove unnecessary constraint
1986 * testsuite/std/ranges/adaptors/elements.cc (test05): New test.
1988 2021-04-21 Patrick Palka <ppalka@redhat.com>
1990 Backported from master:
1991 2020-10-31 Patrick Palka <ppalka@redhat.com>
1994 * include/std/ranges (basic_istream_view::begin): Initialize
1995 _Iterator from 'this' instead of '*this'.
1996 (basic_istream_view::_Iterator::_Iterator): Adjust constructor
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
2003 (filter_view::end): Likewise.
2004 (transform_view::_Iterator::_Iterator): Take a _Parent* instead
2006 (filter_view::_Iterator::operator+): Adjust accordingly.
2007 (filter_view::_Iterator::operator-): Likewise.
2008 (filter_view::begin): Initialize _Iterator from 'this' instead
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
2015 (join_view::end): Initialize _Sentinel from 'this' instead of
2017 (split_view::_OuterIter): Take a _Parent& instead of a _Parent*.
2018 (split_view::begin): Initialize _OuterIter from 'this' instead
2020 (split_view::end): Likewise.
2021 * testsuite/std/ranges/97600.cc: New test.
2023 2021-04-19 François Dumont <fdumont@gcc.gnu.org>
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,
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>&,
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>&,
2042 (_Safe_iterator<>::_M_valid_range(const _Safe_iterator<>&,
2043 std::pair<difference_type, _Distance_precision>&, bool)): Adapt for
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.
2054 2021-04-19 Jonathan Wakely <jwakely@redhat.com>
2056 Backported from master:
2057 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
2060 * libsupc++/new_opa.cc: Declare size_t in global namespace.
2061 Remove unused header.
2063 2021-04-13 Jonathan Wakely <jwakely@redhat.com>
2065 Backported from master:
2066 2021-04-13 Jonathan Wakely <jwakely@redhat.com>
2069 * include/std/bit: Only include <ext/numeric_traits.h> for
2070 hosted build, use <limits> otherwise.
2072 2021-04-12 Jonathan Wakely <jwakely@redhat.com>
2074 Backported from master:
2075 2021-04-12 Jonathan Wakely <jwakely@redhat.com>
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.
2085 2021-04-12 Jonathan Wakely <jwakely@redhat.com>
2087 Backported from master:
2088 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
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.
2095 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
2098 * include/bits/hashtable.h (_Hashtable): Fix noexcept-speciofier
2099 on definition to match the one on the declaration.
2101 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
2103 Backported from master:
2104 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
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.
2111 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
2113 Backported from master:
2114 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
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.
2123 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
2125 Backported from master:
2126 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
2128 * include/bits/basic_string.h: Tweak doxygen comment.
2130 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
2132 Backported from master:
2133 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
2135 * include/bits/random.h: Fix doxygen group commands.
2136 * include/bits/regex_constants.h: Likewise.
2137 * include/tr1/random.h: Likewise.
2139 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
2141 Backported from master:
2142 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
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:
2149 2021-04-08 François Dumont <fdumont@gcc.gnu.org>
2151 Backported from master:
2152 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
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
2161 * include/bits/unordered_map.h
2162 (unordered_map(unordered_map&&, const allocator_type&)): Add noexcept
2164 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
2166 * include/bits/unordered_set.h
2167 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
2168 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
2170 * include/debug/unordered_map
2171 (unordered_map(unordered_map&&, const allocator_type&)): Likewise.
2172 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
2174 * include/debug/unordered_set
2175 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
2176 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
2178 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
2180 * testsuite/23_containers/unordered_map/cons/noexcept_default_construct.cc:
2182 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
2184 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
2186 * testsuite/23_containers/unordered_multimap/cons/noexcept_default_construct.cc:
2188 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
2190 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
2192 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
2194 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
2196 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
2198 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
2201 2021-04-08 François Dumont <fdumont@gcc.gnu.org>
2203 Backported from master:
2204 2020-07-08 François Dumont <fdumont@gcc.gnu.org>
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
2211 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
2213 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
2215 * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
2217 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
2219 Backported from master:
2220 2021-04-07 Jonathan Wakely <jwakely@redhat.com>
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.
2228 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
2230 * doc/xml/manual/status_cxx2017.xml: Replace Intel parallelstl
2231 link with LLVM repo for PSTL.
2232 * doc/html/manual/status.html: Regenerate.
2234 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
2236 Backported from master:
2237 2021-04-06 Jonathan Wakely <jwakely@redhat.com>
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
2247 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
2249 Backported from master:
2250 2021-04-06 Jonathan Wakely <jwakely@redhat.com>
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:
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.
2348 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
2350 Backported from master:
2351 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
2353 * include/std/string_view: Adjust Doxygen @file comment.
2355 2021-04-08 Release Manager
2357 * GCC 10.3.0 released.
2359 2021-04-01 Jonathan Wakely <jwakely@redhat.com>
2361 Backported from master:
2362 2021-02-14 Jonathan Wakely <jwakely@redhat.com>
2365 * testsuite/util/testsuite_fs.h: Always include <unistd.h>.
2367 2021-04-01 Jonathan Wakely <jwakely@redhat.com>
2369 Backported from master:
2370 2020-12-17 Jonathan Wakely <jwakely@redhat.com>
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.
2379 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2381 Backported from master:
2382 2020-11-30 Jonathan Wakely <jwakely@redhat.com>
2384 * testsuite/20_util/specialized_algorithms/pstl/*: Add
2386 * testsuite/25_algorithms/pstl/*: Likewise.
2387 * testsuite/26_numerics/pstl/*: Likewise.
2388 * testsuite/28_regex/*: Likewise.
2390 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2392 Backported from master:
2393 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
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:
2399 * testsuite/28_regex/algorithms/regex_match/ecma/char/backref.cc:
2401 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/63199.cc:
2403 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/anymatcher.cc:
2405 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/cjk_match.cc:
2407 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc:
2409 * testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc:
2411 * testsuite/28_regex/algorithms/regex_search/61720.cc: Likewise.
2412 * testsuite/28_regex/algorithms/regex_search/ecma/assertion.cc:
2414 * testsuite/28_regex/algorithms/regex_search/ecma/string_01.cc:
2416 * testsuite/28_regex/basic_regex/ctors/deduction.cc: Likewise.
2418 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2420 Backported from master:
2421 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
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.
2428 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2430 Backported from master:
2431 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
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.
2438 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2440 Backported from master:
2441 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
2443 * testsuite/17_intro/names.cc: Do not test 'v' on AIX.
2445 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2447 Backported from master:
2448 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2450 * include/bits/basic_string.h (size_type, difference_type):
2451 Use allocator_traits to obtain the allocator's size_type and
2454 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2456 Backported from master:
2457 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
2459 * include/std/chrono (duration::_S_gcd(intmax_t, intmax_t)):
2460 New helper function for finding GCD of two positive intmax_t
2462 (duration::__divide): New helper alias for dividing one period
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.
2473 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2475 Backported from master:
2476 2020-08-27 Jonathan Wakely <jwakely@redhat.com>
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.
2491 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2493 Backported from master:
2494 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
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.
2501 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2503 Backported from master:
2504 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
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.
2511 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2513 Backported from master:
2514 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
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
2521 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2523 Backported from master:
2524 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
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.
2530 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2532 Backported from master:
2533 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
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
2542 (output_container, input_container, forward_container)
2543 (bidirectional_container, random_access_container): New alias
2545 * testsuite/25_algorithms/copy_n/5.cc: New test.
2547 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2549 Backported from master:
2550 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
2552 * include/std/atomic (atomic): Add static assertions.
2553 * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
2555 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2557 Backported from master:
2558 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
2560 * include/bits/stl_iterator.h (move_iterator::operator=): Define.
2561 * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
2563 2021-03-29 Paul Keir <paul.keir@uws.ac.uk>
2565 Backported from master:
2566 2020-06-15 Paul Keir <paul.keir@uws.ac.uk>
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:
2573 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2575 Backported from master:
2576 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2578 * testsuite/20_util/time_point_cast/rounding.cc: Remove
2579 duplicate dg-do directive and add c++17 effective target.
2581 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2583 Backported from master:
2584 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2586 * testsuite/30_threads/thread/cons/84535.cc: Use a custom
2588 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
2590 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2592 Backported from master:
2593 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
2595 * testsuite/lib/libstdc++.exp (libstdc++_init): Only set
2596 tool_timeout if it hasn't been set by the user already.
2598 2021-03-29 Moritz Sichert <sichert@in.tum.de>
2600 Backported from master:
2601 2021-03-23 Moritz Sichert <sichert@in.tum.de>
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.
2609 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2611 Backported from master:
2612 2021-03-22 Jonathan Wakely <jwakely@redhat.com>
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:
2626 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2628 Backported from master:
2629 2021-03-11 Jonathan Wakely <jwakely@redhat.com>
2632 * include/std/stop_token (_Stop_state_t::_M_release_ownership):
2633 Use acq_rel memory ordering.
2635 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2637 Backported from master:
2638 2021-03-11 Jonathan Wakely <jwakely@redhat.com>
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):
2645 * src/filesystem/dir-common.h (is_permission_denied_error): New
2648 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2650 Backported from master:
2651 2021-03-11 Jonathan Wakely <jwakely@redhat.com>
2654 * include/bits/random.h (normal_distribution): Use
2655 default-initializer for _M_saved and _M_saved_available.
2657 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2659 Backported from master:
2660 2021-03-10 Jonathan Wakely <jwakely@redhat.com>
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.
2674 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2676 Backported from master:
2677 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
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.
2691 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2693 Backported from master:
2694 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
2696 * testsuite/util/testsuite_fs.h (nonexistent_path): Add
2697 random number to the path.
2699 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2701 Backported from master:
2702 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
2704 * include/experimental/internet (address_v6::to_string): Include
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.
2710 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2712 Backported from master:
2713 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
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
2721 * testsuite/experimental/net/internet/address/v4/members.cc:
2722 Remove unused variables.
2723 * testsuite/experimental/net/internet/address/v6/members.cc:
2726 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2728 Backported from master:
2729 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
2731 * testsuite/25_algorithms/all_of/constexpr.cc: Check result of
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:
2746 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
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:
2764 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
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.
2770 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2772 Backported from master:
2773 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
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
2781 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2783 Backported from master:
2784 2021-02-11 Jonathan Wakely <jwakely@redhat.com>
2787 * doc/xml/manual/status_cxx2011.xml: Document when support
2789 * doc/xml/manual/status_cxx2014.xml: Likewise.
2790 * doc/xml/manual/status_cxx2017.xml: Likewise.
2791 * doc/html/manual/status.html: Regenerate.
2793 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2795 Backported from master:
2796 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
2799 * src/c++17/fs_ops.cc (fs::symlink_status): Re-enable workaround.
2801 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2803 Backported from master:
2804 2021-02-10 Jonathan Wakely <jwakely@redhat.com>
2807 * src/c++17/fs_ops.cc (fs::status): Re-enable workaround.
2809 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2811 Backported from master:
2812 2021-02-10 Jonathan Wakely <jwakely@redhat.com>
2814 * src/c++17/fs_ops.cc (fs::create_hard_link, fs::equivalent)
2815 (fs::remove): Use std::system_category() for error codes from
2817 * src/filesystem/ops.cc (fs::create_hard_link, fs::remove):
2820 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2822 Backported from master:
2823 2021-02-10 Jonathan Wakely <jwakely@redhat.com>
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:
2830 * testsuite/27_io/filesystem/path/generation/relative.cc:
2832 * testsuite/util/testsuite_fs.h: Likewise.
2834 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2836 Backported from master:
2837 2021-02-03 Jonathan Wakely <jwakely@redhat.com>
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:
2845 * testsuite/19_diagnostics/error_condition/operators/less.cc:
2847 * testsuite/19_diagnostics/error_condition/operators/three_way.cc:
2850 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2852 Backported from master:
2853 2020-12-16 Jonathan Wakely <jwakely@redhat.com>
2856 * include/experimental/random: Only define contents for C++14
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.
2863 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2865 Backported from master:
2866 2020-12-16 Jonathan Wakely <jwakely@redhat.com>
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:
2875 * testsuite/19_diagnostics/headers/system_error/93151.cc: New
2878 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2880 Backported from master:
2881 2020-12-10 Jonathan Wakely <jwakely@redhat.com>
2884 * include/std/bit (__countl_one, __countr_one): Remove redundant
2887 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2889 Backported from master:
2890 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
2892 * include/std/bit (__popcount): Remove redundant check for zero.
2894 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2896 Backported from master:
2897 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
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:
2909 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2911 Backported from master:
2912 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
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.
2919 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2921 Backported from master:
2922 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
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
2933 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2935 Backported from master:
2936 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
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
2945 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2947 Backported from master:
2948 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
2950 * include/bits/random.h (__detail::_Mod): Avoid divide by zero.
2951 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
2954 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2956 Backported from master:
2957 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
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.
2964 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2966 Backported from master:
2967 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
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
2974 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
2976 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2978 Backported from master:
2979 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
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.
2988 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
2990 Backported from master:
2991 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
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):
2999 * include/tr1/legendre_function.tcc (__sph_legendre): Use
3000 unsigned for loop variable.
3002 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
3004 Backported from master:
3005 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3007 * include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in_all):
3008 Add casts to compare types of the same signedness.
3010 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
3012 Backported from master:
3013 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3015 * include/bits/ranges_algobase.h (__equal_fn): Remove unused
3018 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
3020 Backported from master:
3021 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
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.
3031 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
3033 Backported from master:
3034 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3036 * include/bits/fs_path.h (path::_List::type()): Avoid narrowing
3039 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
3041 Backported from master:
3042 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
3044 * include/std/ranges (__box): Simplify constraints as per LWG 3477.
3046 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
3048 Backported from master:
3049 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
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.
3055 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
3057 Backported from master:
3058 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3060 * include/experimental/executor (system_context::_M_run()):
3062 (system_context::join()): Do not join unless joinable.
3063 * testsuite/experimental/net/system_context/1.cc: New test.
3065 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
3067 Backported from master:
3068 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
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.
3074 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
3076 Backported from master:
3077 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
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.
3082 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
3084 Backported from master:
3085 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
3087 * src/c++17/fs_dir.cc (fs::directory_iterator::operator*):
3088 Add noexcept. Do not throw on precondition violation.
3090 2021-03-19 Jakub Jelinek <jakub@redhat.com>
3092 Backported from master:
3093 2021-02-23 Jakub Jelinek <jakub@redhat.com>
3096 * testsuite/21_strings/char_traits/requirements/char/99181.cc: New
3099 2021-03-19 Jakub Jelinek <jakub@redhat.com>
3101 Backported from master:
3102 2021-02-23 Jakub Jelinek <jakub@redhat.com>
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
3110 2021-02-09 Jonathan Wakely <jwakely@redhat.com>
3112 Backported from master:
3113 2021-02-09 Jonathan Wakely <jwakely@redhat.com>
3116 * include/std/coroutine (coroutine_handle<P>::from_address): Add
3119 2021-01-13 Jonathan Wakely <jwakely@redhat.com>
3122 * include/std/mutex (call_once): Use NOLINT to suppress clang
3125 2021-01-11 Jonathan Wakely <jwakely@redhat.com>
3127 Backported from master:
3128 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
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.
3135 2021-01-11 Jonathan Wakely <jwakely@redhat.com>
3137 Backported from master:
3138 2020-12-16 Jonathan Wakely <jwakely@redhat.com>
3141 * include/ext/throw_allocator.h: Use __has_builtin to check for
3142 __builtin_sprintf support, and use std::sprintf if necessary.
3144 2021-01-11 Jonathan Wakely <jwakely@redhat.com>
3146 Backported from master:
3147 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
3151 * python/libstdcxx/v6/printers.py (function_pointer_to_name):
3152 New helper function to get the name of a function from its
3154 (StdExpAnyPrinter.__init__): Use it.
3156 2021-01-11 Jonathan Wakely <jwakely@redhat.com>
3158 Backported from master:
3159 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3161 * testsuite/experimental/filesystem/filesystem_error/cons.cc:
3162 Remove -std=gnu++17 option.
3164 2021-01-08 Iain Sandoe <iain@sandoe.co.uk>
3166 Backported from master:
3167 2020-07-17 Iain Sandoe <iain@sandoe.co.uk>
3169 * include/std/coroutine: Mark the methods of the
3170 trivial awaitables as constexpr.
3172 2021-01-03 Iain Sandoe <iain@sandoe.co.uk>
3173 Jakub Jelinek <jakub@redhat.com>
3176 * configure: Regenerate.
3178 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
3180 Backported from master:
3181 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
3183 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt:
3185 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt:
3188 2020-12-01 Patrick Palka <ppalka@redhat.com>
3190 Backported from master:
3191 2020-10-12 Patrick Palka <ppalka@redhat.com>
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.
3203 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
3205 Backported from master:
3206 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
3209 * testsuite/ext/stdio_filebuf/char/79820.cc: Do not pass invalid
3210 FILE* to constructor.
3212 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
3214 Backported from master:
3215 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
3218 * include/bits/iterator_concepts.h (__detail::__iter_without_category):
3220 (__iterator_traits::__cat): Use __detail::__iter_without_category.
3221 * testsuite/24_iterators/associated_types/iterator.traits.cc: New test.
3223 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
3225 Backported from master:
3226 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
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
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.
3238 2020-11-24 Jonathan Wakely <jwakely@redhat.com>
3240 Backported from master:
3241 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
3243 * testsuite/29_atomics/atomic_float/value_init.cc: Use float
3244 instead of double so that __atomic_load_8 isn't needed.
3246 2020-11-20 Jonathan Wakely <jwakely@redhat.com>
3248 Backported from master:
3249 2020-11-20 Jonathan Wakely <jwakely@redhat.com>
3252 * include/std/regex (pmr::smatch, pmr::wsmatch): Declare using
3253 underlying __normal_iterator type, not nested typedef
3254 basic_string::const_iterator.
3256 2020-11-20 Jonathan Wakely <jwakely@redhat.com>
3259 * include/std/stop_token (_Stop_state_t): Define default
3260 constructor as user-provided not defaulted.
3262 2020-11-20 Jonathan Wakely <jwakely@redhat.com>
3264 Backported from master:
3265 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
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.
3277 2020-11-18 Patrick Palka <ppalka@redhat.com>
3279 Backported from master:
3280 2020-11-18 Patrick Palka <ppalka@redhat.com>
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.
3288 2020-11-18 Jonathan Wakely <jwakely@redhat.com>
3290 Backported from master:
3291 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
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
3298 * testsuite/std/ranges/adaptors/join_lwg3474.cc: Removed.
3300 2020-11-18 Jonathan Wakely <jwakely@redhat.com>
3302 Backported from master:
3303 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
3305 * include/std/ranges (join_view): Add deduction guide (LWG 3474).
3306 * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test.
3308 2020-11-18 Jonathan Wakely <jwakely@redhat.com>
3310 Backported from master:
3311 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3313 * include/std/version (__cpp_lib_array_constexpr)
3314 (__cpp_lib_constexpr_char_traits): Only define C++17 value when
3317 2020-11-18 Jonathan Wakely <jwakely@redhat.com>
3319 Backported from master:
3320 2020-06-15 Jonathan Wakely <jwakely@redhat.com>
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.
3328 2020-11-18 Jonathan Wakely <jwakely@redhat.com>
3330 Backported from master:
3331 2020-11-17 Jonathan Wakely <jwakely@redhat.com>
3334 * include/precompiled/stdc++.h: Include <coroutine>.
3335 * include/std/version (__cpp_lib_span): Check __cpp_lib_concepts
3338 2020-11-17 Patrick Palka <ppalka@redhat.com>
3340 Backported from master:
3341 2020-11-17 Patrick Palka <ppalka@redhat.com>
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.
3350 2020-11-16 Jonathan Wakely <jwakely@redhat.com>
3352 Backported from master:
3353 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
3356 * src/c++11/futex.cc (relative_timespec): Remove redundant check
3358 * testsuite/30_threads/future/members/93456.cc: New.
3360 2020-11-16 Jonathan Wakely <jwakely@redhat.com>
3362 Backported from master:
3363 2020-11-16 Jonathan Wakely <jwakely@redhat.com>
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
3370 2020-11-16 Jonathan Wakely <jwakely@redhat.com>
3372 Backported from master:
3373 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
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.
3379 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
3381 Backported from master:
3382 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
3385 * include/ext/numeric_traits.h (__glibcxx_signed)
3386 (__glibcxx_digits, __glibcxx_min, __glibcxx_max): Remove
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
3392 (_GLIBCXX_INT_N_TRAITS): Macro to define explicit
3393 specializations for non-standard integer types.
3395 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
3398 * testsuite/std/ranges/iota/96042.cc: Only assert that the
3399 difference type is wider than long long if __int128 is
3402 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
3404 Backported from master:
3405 2020-08-20 Jonathan Wakely <jwakely@redhat.com>
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
3413 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
3415 Backported from master:
3416 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3417 Patrick Palka <ppalka@redhat.com>
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.
3428 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
3430 Backported from master:
3431 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
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>):
3441 * testsuite/std/ranges/iota/96042.cc: New test.
3443 2020-11-11 Paul Scharnofske <asynts@gmail.com>
3445 Backported from master:
3446 2020-11-11 Paul Scharnofske <asynts@gmail.com>
3448 * include/std/thread (jthread::operator=(jthread&&)): Transfer
3449 any existing state to a temporary that will request a stop and
3451 * testsuite/30_threads/jthread/jthread.cc: Test move assignment.
3453 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
3455 Backported from master:
3456 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
3459 * include/std/optional (operator==, operator!=, operator<)
3460 (operator>, operator<=, operator>=): Fix types used in
3462 * testsuite/20_util/optional/relops/96269.cc: New test.
3464 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
3466 Backported from master:
3467 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
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.
3474 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
3476 Backported from master:
3477 2020-10-10 Jonathan Wakely <jwakely@redhat.com>
3480 * doc/html/manual/source_code_style.html: Regenerate.
3481 * doc/xml/manual/appendix_contributing.xml: Add __deref to
3483 * include/debug/functions.h (_Irreflexive_checker::__deref):
3485 * testsuite/17_intro/badnames.cc: Check __deref.
3487 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
3489 Backported from master:
3490 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
3493 * doc/xml/manual/evolution.xml: Document change to base class.
3494 * doc/html/manual/api.html: Regenerate.
3496 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
3498 * doc/xml/manual/evolution.xml: Document new C++20 headers.
3499 * doc/html/*: Regenerate.
3501 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
3503 Backported from master:
3504 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
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.
3510 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
3512 Backported from master:
3513 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
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.
3520 2020-10-29 Patrick Palka <ppalka@redhat.com>
3522 Backported from master:
3523 2020-10-29 Patrick Palka <ppalka@redhat.com>
3525 * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
3526 (test03): Fix initializing the vector vy with the array y of size 4.
3528 2020-10-28 Patrick Palka <ppalka@redhat.com>
3530 Backported from master:
3531 2020-10-23 Patrick Palka <ppalka@redhat.com>
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.
3538 2020-10-21 Patrick Palka <ppalka@redhat.com>
3540 Backported from master:
3541 2020-09-22 Patrick Palka <ppalka@redhat.com>
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
3550 * testsuite/23_containers/span/index_op_neg.cc: Likewise for
3553 2020-10-21 Patrick Palka <ppalka@redhat.com>
3555 Backported from master:
3556 2020-10-12 Patrick Palka <ppalka@redhat.com>
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
3564 2020-10-21 Patrick Palka <ppalka@redhat.com>
3566 Backported from master:
3567 2020-09-22 Patrick Palka <ppalka@redhat.com>
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.
3573 2020-10-21 Patrick Palka <ppalka@redhat.com>
3575 Backported from master:
3576 2020-09-22 Patrick Palka <ppalka@redhat.com>
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
3582 * testsuite/25_algorithms/search/constexpr.cc: Test constexpr
3583 std::search overload that takes a searcher.
3585 2020-10-21 Patrick Palka <ppalka@redhat.com>
3587 Backported from master:
3588 2020-08-27 Patrick Palka <ppalka@redhat.com>
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.
3598 2020-10-21 Patrick Palka <ppalka@redhat.com>
3600 Backported from master:
3601 2020-08-27 Patrick Palka <ppalka@redhat.com>
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.
3612 2020-10-21 Patrick Palka <ppalka@redhat.com>
3614 Backported from master:
3615 2020-08-27 Patrick Palka <ppalka@redhat.com>
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.
3623 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
3625 Backported from master:
3626 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
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.
3633 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
3635 Backported from master:
3636 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
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).
3642 * include/bits/basic_string.tcc [!_GLIBCXX_USE_CXX11_ABI]
3643 (basic_string(const _CharT*, const _Alloc&)): Remove non-inline
3645 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
3647 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
3650 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
3652 Backported from master:
3653 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
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:
3659 * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
3661 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
3663 Backported from master:
3664 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
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
3671 * testsuite/27_io/ios_base/failure/error_code.cc: New test.
3673 2020-10-20 Nuno Lopes <nuno.lopes@ist.utl.pt>
3675 Backported from master:
3676 2020-10-13 Nuno Lopes <nuno.lopes@ist.utl.pt>
3678 * include/bits/stl_algo.h (any_of): Fix incorrect description
3681 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
3683 Backported from master:
3684 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
3686 * include/bits/stl_algobase.h (copy, move, copy_backward)
3687 (move_backward): Fix documentation for returned iterator.
3689 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
3691 Backported from master:
3692 2020-09-24 Jonathan Wakely <jwakely@redhat.com>
3694 * doc/xml/manual/configure.xml: Correct name of option.
3695 * doc/html/*: Regenerate.
3697 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
3699 Backported from master:
3700 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
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.
3708 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
3710 Backported from master:
3711 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
3713 * include/std/concepts: Fix typos in copyright notice.
3714 * include/std/ranges: Likewise.
3716 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
3718 * doc/xml/manual/status_cxx2020.xml: Remove red background for
3720 * doc/html/manual/status.html: Regenerate.
3722 2020-10-13 Patrick Palka <ppalka@redhat.com>
3724 Backported from master:
3725 2020-10-08 Patrick Palka <ppalka@redhat.com>
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:
3735 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
3737 Backported from master:
3738 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
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
3747 2020-10-06 Patrick Palka <ppalka@redhat.com>
3749 Backported from master:
3750 2020-10-02 Patrick Palka <ppalka@redhat.com>
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.
3759 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
3761 Backported from master:
3762 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
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.
3770 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
3772 Backported from master:
3773 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
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.
3782 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
3784 Backported from master:
3785 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
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.
3794 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
3796 Backported from master:
3797 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
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.
3804 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
3806 Backported from master:
3807 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3810 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
3811 $enable_libstdcxx_filesystem_ts.
3812 * configure: Regenerate.
3814 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
3816 Backported from master:
3817 2020-09-20 Jonathan Wakely <jwakely@redhat.com>
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.
3824 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
3826 Backported from master:
3827 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
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.
3837 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
3839 Backported from master:
3840 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
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
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
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):
3861 * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
3863 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
3865 Backported from master:
3866 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
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
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.
3885 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
3887 Backported from master:
3888 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
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:
3902 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
3903 Adjust dg-error line numbers.
3905 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
3907 * include/bits/stl_iterator.h (counted_iterator::operator++(int)):
3908 Use __throw_exception_again macro.
3910 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
3912 Backported from master:
3913 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
3916 * include/experimental/string_view (basic_string_view):
3917 Enable debug assertions.
3918 * include/std/string_view (basic_string_view):
3921 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
3923 Backported from master:
3924 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
3927 * include/std/variant (_Variant_storage): Replace implicit
3928 conversions from size_t to __index_type with explicit casts.
3930 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
3932 Backported from master:
3933 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
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.
3942 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3944 Backported from master:
3945 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
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.
3958 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
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:
3967 * testsuite/experimental/net/internet/address/v4/cons.cc:
3969 * testsuite/experimental/net/internet/address/v4/creation.cc:
3971 * testsuite/experimental/net/internet/address/v4/members.cc:
3973 * testsuite/experimental/net/internet/resolver/base.cc:
3975 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
3977 * testsuite/experimental/net/internet/resolver/ops/reverse.cc:
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.
3984 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3986 Backported from master:
3987 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3990 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
3991 (stat_type): Change to __stat64.
3992 (stat): Use _wstat64.
3994 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
3996 Backported from master:
3997 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
4000 * include/debug/bitset (bitset::operator==): Call _M_base() on
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.
4006 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
4008 Backported from master:
4009 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
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.
4016 2020-07-23 Release Manager
4018 * GCC 10.2.0 released.
4020 2020-07-09 Jonathan Wakely <jwakely@redhat.com>
4022 Backported from master:
4023 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
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
4029 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
4031 2020-07-09 Jonathan Wakely <jwakely@redhat.com>
4033 Backported from master:
4034 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
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.
4042 2020-07-09 Jonathan Wakely <jwakely@redhat.com>
4044 Backported from master:
4045 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
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
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:
4064 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
4066 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
4069 2020-07-09 Jonathan Wakely <jwakely@redhat.com>
4071 Backported from master:
4072 2020-05-19 Jonathan Wakely <jwakely@redhat.com>
4075 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
4077 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
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.
4083 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
4085 Backported from master:
4086 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
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.
4095 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
4097 Backported from master:
4098 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
4102 * testsuite/29_atomics/atomic_float/1.cc: Use different values
4104 * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
4106 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
4108 Backported from master:
4109 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
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.
4119 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
4121 Backported from master:
4122 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
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.
4129 2020-06-29 Ville Voutilainen <ville.voutilainen@gmail.com>
4131 Backported from master:
4132 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
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.
4140 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4142 Backported from master:
4143 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4145 * include/std/charconv (__from_chars_binary): Ignore leading zeros.
4146 * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
4148 * testsuite/20_util/from_chars/3.cc: New test.
4150 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4152 Backported from master:
4153 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4155 * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
4156 * include/std/charconv (__detail::__to_chars): Avoid
4157 -Wsign-compare warning.
4159 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4161 Backported from master:
4162 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4165 * include/std/charconv (__to_chars_i): Check for zero-sized
4166 buffer unconditionally.
4167 * testsuite/20_util/to_chars/95851.cc: New test.
4169 2020-06-22 Jason Merrill <jason@redhat.com>
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.
4176 2020-06-11 Patrick Palka <ppalka@redhat.com>
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
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.
4199 2020-05-28 Patrick Palka <ppalka@redhat.com>
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.
4209 2020-05-26 Alexandre Oliva <oliva@adacore.com>
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:
4218 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
4219 (test03): Drop max-align test for char-aligned alloc.
4221 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
4223 Backport from mainline
4224 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
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.
4231 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
4233 Backport from mainline
4234 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
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.
4241 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
4243 Backport from mainline
4244 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
4246 * include/experimental/executor (use_future_t::use_future_t()): Fix
4247 incorrect noexcept-specifier.
4248 * include/experimental/internet (basic_resolver_results): Adjust
4250 * include/experimental/socket (__basic_socket_impl::release): Add
4252 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
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
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.
4266 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
4268 Backport from mainline
4269 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
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.
4277 2020-05-12 Jonathan Wakely <jwakely@redhat.com>
4279 Backport from mainline
4280 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
4283 * src/c++17/memory_resource.cc
4284 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
4287 Backport from mainline
4288 2020-05-03 Jonathan Wakely <jwakely@redhat.com>
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
4296 2020-05-07 Jonathan Wakely <jwakely@redhat.com>
4298 Backport from mainline
4299 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
4300 Patrick Palka <ppalka@redhat.com>
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.
4310 2020-05-07 Release Manager
4312 * GCC 10.1.0 released.
4314 2020-05-07 Eric Botcazou <ebotcazou@adacore.com>
4316 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
4317 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
4319 2020-05-06 H.J. Lu <hongjiu.lu@intel.com>
4321 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
4323 2020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4325 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
4326 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
4328 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
4329 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
4332 2020-05-06 Jonathan Wakely <jwakely@redhat.com>
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.
4338 2020-05-06 Jakub Jelinek <jakub@redhat.com>
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.
4348 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
4350 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
4351 * doc/html/*: Regenerate.
4353 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
4355 Backport from mainline
4356 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
4359 * include/std/type_traits (__is_complete_or_unbounded): Replace
4360 BADNAME _T with _Tp.
4361 * testsuite/17_intro/badnames.cc: New test.
4363 2020-04-30 Jonathan Wakely <jwakely@redhat.com>
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.
4380 2020-04-29 Jonathan Wakely <jwakely@redhat.com>
4383 * include/bits/basic_string.tcc: Update comment about explicit
4386 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
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
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.
4407 * include/bits/alloc_traits.h (_S_construct): Restore placement
4408 new-expression for C++11/14/17 and call std::construct_at directly
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.
4416 2020-04-28 Patrick Palka <ppalka@redhat.com>
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.
4424 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
4425 Iain Sandoe <iain@sandoe.co.uk>
4428 * include/std/coroutine: Implement handing for non-
4429 class coroutine return types.
4431 2020-04-24 Jonathan Wakely <jwakely@redhat.com>
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.
4438 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
4439 Jonathan Wakely <jwakely@redhat.com>
4443 * include/std/any (any): Rename template parameters for consistency
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
4457 * testsuite/20_util/any/modifiers/92156.cc: New test.
4459 2020-04-23 Jonathan Wakely <jwakely@redhat.com>
4461 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
4462 * doc/html/*: Regenerate.
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.
4472 * include/std/version (__cpp_lib_three_way_comparison): Define for
4473 freestanding builds.
4475 2020-04-23 Thomas Rodgers <rodgert@appliantology.com>
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.
4482 2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
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.
4488 2020-04-22 Jonathan Wakely <jwakely@redhat.com>
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.
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:
4508 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
4510 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
4511 in C++17 mode and check feature test macro.
4513 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
4515 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
4516 defined by <utility>.
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.
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.
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
4534 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
4536 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
4538 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
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.
4556 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
4558 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
4560 * include/std/version (__cpp_lib_map_insertion)
4561 (__cpp_lib_unordered_map_insertion): Remove.
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:
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.
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
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.
4589 2020-04-21 Jonathan Wakely <jwakely@redhat.com>
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.
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
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
4605 * doc/html/*: Regenerate.
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.
4612 2020-04-20 Thomas Rodgers <trodgers@redhat.com>
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.
4618 2020-04-20 Jonathan Wakely <jwakely@redhat.com>
4620 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
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
4625 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
4626 results for some types when paren-init for aggregates is supported.
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.
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.
4649 2020-04-20 Matthias Kretz <kretz@kde.org>
4651 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
4653 2020-04-19 Jonathan Wakely <jwakely@redhat.com>
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.
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):
4664 * include/debug/unordered_map (unordered_map, unordered_multimap):
4666 * include/debug/unordered_set (unordered_set, unordered_multiset):
4670 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
4671 redundant assignment in constructor.
4673 2020-04-18 Jonathan Wakely <jwakely@redhat.com>
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
4679 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
4682 * testsuite/util/native_type/native_priority_queue.hpp: Use
4683 allocator_traits to rebind allocator.
4685 2020-04-17 Jonathan Wakely <jwakely@redhat.com>
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):
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.
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
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
4723 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
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:
4733 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
4735 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
4737 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
4739 2020-04-16 Jonathan Wakely <jwakely@redhat.com>
4741 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
4742 name of unused parameter.
4744 2020-04-15 Jonathan Wakely <jwakely@redhat.com>
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.
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.
4774 * include/std/typeindex (operator<=>): Define for C++20.
4775 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
4777 2020-04-14 Jonathan Wakely <jwakely@redhat.com>
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:
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
4794 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
4795 * testsuite/18_support/comparisons/categories/94565.cc: New test.
4797 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
4799 * include/std/coroutine: Update coroutines builtin define,
4802 2020-04-09 Jonathan Wakely <jwakely@redhat.com>
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:
4811 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
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.
4819 2020-04-08 Jonathan Wakely <jwakely@redhat.com>
4821 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
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.
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.
4834 2020-04-07 Jonathan Wakely <jwakely@redhat.com>
4837 * include/std/charconv (__integer_to_chars_result_type)
4838 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
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.
4846 2020-04-06 Jonathan Wakely <jwakely@redhat.com>
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.
4865 2020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
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.
4871 2020-04-03 Jonathan Wakely <jwakely@redhat.com>
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.
4879 2020-04-01 Andrea Corallo <andrea.corallo@arm.com>
4881 * testsuite/experimental/net/execution_context/use_service.cc:
4882 Require pthread and gthreads.
4884 2020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
4886 * doc/xml/manual/appendix_free.xml: Move "free books" list from
4888 * doc/html/manual/appendix_free.html: Regenerate.
4890 2020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
4892 Library-side tests for parenthesized aggregate init
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:
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:
4912 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
4914 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
4916 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
4918 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
4920 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
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:
4926 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
4927 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
4929 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
4931 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
4933 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
4935 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
4938 2020-03-28 Jonathan Wakely <jwakely@redhat.com>
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.
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.
4957 2020-03-27 Jonathan Wakely <jwakely@redhat.com>
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
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.
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.
5000 * include/std/type_traits (__is_array_convertible): Move definition
5001 to immediately after is_convertible.
5003 2020-03-26 Jonathan Wakely <jwakely@redhat.com>
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):
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.
5015 2020-03-25 Mike Crowe <mac@mcrowe.com>
5017 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
5019 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
5022 2020-03-25 Jonathan Wakely <jwakely@redhat.com>
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):
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
5040 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
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
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:
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
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
5062 2020-03-21 Jonathan Wakely <jwakely@redhat.com>
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.
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
5079 2020-03-18 Jonathan Wakely <jwakely@redhat.com>
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
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.
5094 * include/std/stop_token (stop_token::_Stop_state_ref): Define
5095 comparison operators explicitly if the compiler won't synthesize them.
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.
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
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
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
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.
5125 2020-03-16 Jonathan Wakely <jwakely@redhat.com>
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
5133 2020-03-12 Jonathan Wakely <jwakely@redhat.com>
5135 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
5136 a null pointer to functions with nonnull(1) attribute.
5138 2020-03-11 Patrick Palka <ppalka@redhat.com>
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.
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
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.
5161 2020-03-10 Jonathan Wakely <jwakely@redhat.com>
5163 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
5164 instead of _M_current.
5165 (split_view::_OuterIter::operator++): Likewise.
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.
5183 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
5184 Change expression in noexcept-specifier to match function body.
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.
5191 2020-03-09 Jonathan Wakely <jwakely@redhat.com>
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.
5199 2020-03-06 Patrick Palka <ppalka@redhat.com>
5201 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
5202 join_view::_Sentinel<!_Const>.
5203 * testsuite/std/ranges/adaptors/join.cc: Augment test.
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.
5210 2020-03-06 Jonathan Wakely <jwakely@redhat.com>
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.
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.
5224 2020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
5226 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
5229 2020-03-05 Jonathan Wakely <jwakely@redhat.com>
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.
5239 * include/std/string_view: Include <bits/ostream_insert.h>.
5240 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
5242 2020-03-04 Jonathan Wakely <jwakely@redhat.com>
5244 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
5246 2020-03-04 Patrick Palka <ppalka@redhat.com>
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
5254 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
5256 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
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.
5263 LWG 3355 The memory algorithms should support move-only input iterators
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
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:
5278 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
5280 * .../specialized_algorithms/uninitialized_move/constrained.cc:
5283 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
5284 protected instead of private.
5285 (test_sized_range_sized_sent): New.
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.
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.
5303 2020-03-03 Jonathan Wakely <jwakely@redhat.com>
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
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.
5326 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
5327 Avoid redundant iterator comparisons (LWG 3410).
5329 2020-03-02 Jonathan Wakely <jwakely@redhat.com>
5332 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
5334 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
5336 * include/std/ranges (__detail::__maybe_empty_t): Rename to
5338 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
5340 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
5343 2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
5345 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
5347 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
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.
5355 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
5356 Add libatomic option.
5357 * testsuite/30_threads/jthread/jthread.cc: Likewise.
5359 2020-02-29 François Dumont <fdumont@gcc.gnu.org>
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.
5366 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
5368 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
5370 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
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:
5382 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
5384 2020-02-28 Patrick Palka <ppalka@redhat.com>
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.
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.
5396 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
5398 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
5399 test instead of just compiling it.
5401 2020-02-28 Patrick Palka <ppalka@redhat.com>
5403 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
5404 whenever the underlying range models common_range.
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
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
5418 (views::reverse_view::_S_needs_cached_begin): New static member
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.
5432 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
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:
5439 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
5440 -Wstringop-overflow warnings.
5442 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
5444 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
5445 -fdiagnostics-urls=never to options.
5447 2020-02-27 Patrick Palka <ppalka@redhat.com>
5449 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
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.
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()
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.
5473 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
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.
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.
5496 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
5497 C++98 where the member function of the base class returns void.
5499 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
5500 equality comparisons that support value-initialized iterators.
5502 * include/bits/boost_concept_check.h (__function_requires): Add
5503 _GLIBCXX14_CONSTEXPR.
5504 * testsuite/25_algorithms/min/concept_checks.cc: New test.
5506 2020-02-26 Patrick Palka <ppalka@redhat.com>
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.
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
5517 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
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.
5535 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
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):
5544 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
5546 (__detail::__maybe_const_t): Likewise.
5547 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
5548 (transform_view, take_view, take_while_view, elements_view): Use
5550 (join_view, split_view): Use both.
5552 2020-02-25 Patrick Palka <ppalka@redhat.com>
5554 LWG 3397 basic_istream_view::iterator should not provide
5556 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
5558 (basic_istream_view:_Iterator::iterator_concept): ... this.
5559 * testsuite/std/ranges/istream_view.cc: Augment test.
5561 LWG 3325 Constrain return type of transformation function for
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.
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.
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.
5577 LWG 3292 iota_view is under-constrained
5578 * include/std/ranges (iota_view): Require that _Winc models semiregular
5580 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
5582 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
5584 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
5585 during constant evaluation. Call __builtin_memmove directly instead of
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.
5598 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
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.
5607 2020-02-24 Patrick Palka <ppalka@redhat.com>
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.
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.
5630 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
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
5637 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
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:
5646 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
5647 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
5649 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
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
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.
5668 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
5670 * include/std/optional (operator<=>(optional<T>, optional<U>))
5671 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
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.
5685 2020-02-20 Patrick Palka <ppalka@redhat.com>
5687 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
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.
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
5703 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
5705 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
5707 * include/bits/range_access.h (ranges::begin): Reject array of
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
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
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
5724 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
5725 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
5727 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
5729 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
5730 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
5732 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
5733 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
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
5741 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
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.
5748 2020-02-19 Patrick Palka <ppalka@redhat.com>
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.
5754 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
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.
5761 * include/std/ranges (take_while_view, drop_view, drop_while_view)
5762 (elements_view:_Iterator): Initialize data members (LWG 3364).
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).
5768 * include/std/concepts (__detail::__partially_ordered_with): Move here
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
5775 * include/std/concepts (totally_ordered_with): Remove redundant
5776 requirement (LWG 3329).
5778 * include/std/ranges (__detail::__convertible_to_non_slicing): New
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.
5787 * include/bits/iterator_concepts.h (iter_move): Add declaration to
5788 prevent unqualified lookup finding a suitable declaration (LWG 3247).
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.
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.
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
5804 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
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
5813 * include/std/span (span::const_iterator, span::const_reverse_iterator)
5814 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
5816 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
5818 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
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.
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.
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).
5839 * include/std/memory (uninitialized_construct_using_allocator): Use
5840 std::construct_at (LWG 3321).
5842 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
5843 (polymorphic_allocator::allocate_object)
5844 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
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.
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.
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.
5883 2020-02-18 Patrick Palka <ppalka@redhat.com>
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
5895 (split_view::_OuterIter::_OuterIter): Adjust constraints.
5896 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
5899 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
5902 * include/std/ranges (_RangeAdaptor): Add deduction guide.
5903 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
5905 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
5906 (transform_view::_Iterator): Add alias _Base_iter and use in place of
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.
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.
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
5924 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
5926 (span::first<Count>(), span::last<Count>()): Use explicit type in
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.
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
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.
5944 * include/std/span (span): Reorder members and rename template
5945 parameters to match declarations in the C++2a working paper.
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
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.
5956 2020-02-17 Patrick Palka <ppalka@redhat.com>
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
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
5973 (in_out_out_result): New.
5974 (partition_copy_result, merge_result): Change into an alias of
5976 (set_union_result, set_intersection_result): Change into an alias of
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
5983 (in_found_result): New.
5984 (next_permutation_result, prev_permutation_result): Change into an alias
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.
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.
6006 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
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):
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.
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.
6045 * include/std/charconv: Add comment.
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
6052 * include/bits/ranges_algobase.h: Do not include <cmath>.
6053 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
6055 * include/std/ranges: Do not include <limits>.
6056 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
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):
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.
6088 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
6089 value for partial_ordering::unordered.
6091 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
6092 const-qualified expression variations.
6093 * include/std/concepts (copyable): Likewise.
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.
6115 2020-02-16 Patrick Palka <ppalka@redhat.com>
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.
6121 2020-02-15 Patrick Palka <ppalka@redhat.com>
6123 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
6124 * include/bits/ranges_algobase.h: Likewise.
6125 * include/bits/ranges_uninitialized.h: Likewise.
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.
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.
6158 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
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.
6176 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
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.
6183 2020-02-13 Patrick Palka <ppalka@redhat.com>
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
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.
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
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.
6209 2020-02-12 Patrick Palka <ppalka@redhat.com>
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
6216 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
6217 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
6219 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
6224 * configure: Regenerated.
6226 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
6228 * include/bits/hashtable.h
6229 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
6230 missing std namespace qualification to forward call.
6232 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
6234 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
6236 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
6238 * include/std/ranges: Fix non-ASCII characters in comment.
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.
6247 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
6249 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_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.
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.
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.
6273 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
6275 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
6277 (basic_istream_view::_Iterator::operator++()): Add missing return.
6279 2020-02-07 Patrick Palka <ppalka@redhat.com>
6281 * include/bits/ranges_algo.h: Remove extraneous &&.
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.
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):
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.
6329 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
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
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.
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
6353 * testsuite/std/ranges/iota/iterator.cc: New test.
6355 2020-02-07 Patrick Palka <ppalka@redhat.com>
6356 Jonathan Wakely <jwakely@redhat.com>
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
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
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.
6443 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
6445 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
6446 number in comment. Fix indentation.
6448 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
6449 redundant _GLIBCXX20_CONSTEXPR.
6451 * include/std/ranges (viewable_range): Replace decay_t with
6452 remove_cvref_t (LWG 3375).
6454 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
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.
6461 2020-02-05 Patrick Palka <ppalka@redhat.com>
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.
6468 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
6470 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
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.
6478 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
6480 * configure: Regenerate.
6482 2020-01-31 Patrick Palka <ppalka@redhat.com>
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>.
6491 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
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):
6505 (stop_token::_Stop_cb::_M_run): New member function.
6506 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
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
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
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
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
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:
6555 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
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
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
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().
6573 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
6574 * testsuite/18_support/comparisons/object/93479.cc: New test.
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.
6586 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
6589 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
6590 static assertion to object types.
6593 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
6594 clock_gettime instead of explicit glibc version check.
6595 * configure: Regenerate.
6597 2020-01-28 Martin Liska <mliska@suse.cz>
6600 * include/std/atomic: Fix typo.
6601 * include/std/optional: Likewise.
6603 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
6605 * configure: Regenerate.
6607 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
6610 * include/std/span (span): Fix deduction guide.
6611 * testsuite/23_containers/span/deduction.cc: New test.
6613 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
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
6619 (partial_ordering, weak_ordering, strong_ordering): Remove
6620 constructors taking __cmp_cat::_Eq parameters. Use renamed
6623 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
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.
6641 2020-01-23 Alexandre Oliva <oliva@adacore.com>
6643 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
6644 * configure: Rebuild.
6646 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
6648 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
6651 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
6653 * include/Makefile.in: Regenerate.
6655 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
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.
6662 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
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.
6674 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
6676 * include/Makefile.am: Add coroutine to the std set.
6677 * include/Makefile.in: Regenerated.
6678 * include/std/coroutine: New file.
6680 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
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.
6688 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
6689 Matthew Bauer <mjbauer95@gmail.com>
6690 Jonathan Wakely <jwakely@redhat.com>
6692 PR bootstrap/64271 (partial)
6693 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
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
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.
6706 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
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.
6719 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
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
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.
6738 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
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.
6749 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
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
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
6773 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
6775 * testsuite/util/testsuite_iterators.h: Improve comment.
6777 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
6778 initialization syntax.
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.
6789 2020-01-09 Olivier Hainque <hainque@adacore.com>
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.
6796 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
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
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.
6815 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
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.
6821 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
6824 * include/bits/random.h (operator>>): Check stream operation succeeds.
6825 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
6827 (operator>>): Remove redundant __istream_type typedefs. Check stream
6829 (__extract_params): New function to fill a vector from a stream.
6830 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
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()):
6839 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
6840 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
6842 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
6845 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
6847 (_Hashtable<>::__fwd_value_for): New.
6848 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
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
6854 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
6855 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
6857 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
6859 * testsuite/23_containers/unordered_set/92124.cc: New.
6861 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
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
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.
6875 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
6877 * include/std/condition_variable
6878 (condition_variable_any::wait_on): Rename to match current draft
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.
6885 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
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.
6894 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
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
6901 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
6902 (lexicographical_compare_three_way): Do not depend on
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.
6908 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
6910 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
6911 Only define four-argument overload when __cpp_lib_concepts is defined.
6913 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
6915 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
6917 2020-01-01 Jakub Jelinek <jakub@redhat.com>
6919 Update copyright years.
6921 Copyright (C) 2020 Free Software Foundation, Inc.
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.