1 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
3 * include/std/atomic: Add missing @endcond doxygen comment.
5 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
7 Backported from master:
8 2022-11-25 Jonathan Wakely <jwakely@redhat.com>
11 * include/bits/erase_if.h (__erase_nodes_if): Use non-const
12 reference to the container.
13 * include/experimental/map (erase_if): Likewise.
14 * include/experimental/set (erase_if): Likewise.
15 * include/experimental/unordered_map (erase_if): Likewise.
16 * include/experimental/unordered_set (erase_if): Likewise.
17 * include/std/map (erase_if): Likewise.
18 * include/std/set (erase_if): Likewise.
19 * include/std/unordered_map (erase_if): Likewise.
20 * include/std/unordered_set (erase_if): Likewise.
21 * testsuite/23_containers/map/erasure.cc: Check with
22 const-incorrect predicate.
23 * testsuite/23_containers/set/erasure.cc: Likewise.
24 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
25 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
26 * testsuite/experimental/map/erasure.cc: Likewise.
27 * testsuite/experimental/set/erasure.cc: Likewise.
28 * testsuite/experimental/unordered_map/erasure.cc: Likewise.
29 * testsuite/experimental/unordered_set/erasure.cc: Likewise.
31 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
33 Backported from master:
34 2022-11-28 Jonathan Wakely <jwakely@redhat.com>
36 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/lwg3809.cc:
37 Replace non-ASCII character.
39 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
41 Backported from master:
42 2023-02-28 Jonathan Wakely <jwakely@redhat.com>
45 * include/bits/uses_allocator_args.h
46 (uses_allocator_construction_args): Implement LWG 3527.
47 * testsuite/20_util/pair/astuple/get-2.cc: New test.
48 * testsuite/20_util/scoped_allocator/108952.cc: New test.
49 * testsuite/20_util/uses_allocator/lwg3527.cc: New test.
51 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
53 Backported from master:
54 2023-03-31 Jonathan Wakely <jwakely@redhat.com>
57 * include/std/stop_token (_Stop_state_ptr(const stop_source&)):
58 Add attribute access with access-mode 'none'.
59 * testsuite/30_threads/stop_token/stop_source/109339.cc: New test.
61 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
63 Backported from master:
64 2022-11-28 Jonathan Wakely <jwakely@redhat.com>
67 * include/bits/random.h (subtract_with_carry_engine): Use 32-bit
68 type for default seed. Use 0u as default argument for
69 subtract_with_carry_engine(result_type) constructor and
70 seed(result_type) member function.
71 * include/bits/random.tcc (subtract_with_carry_engine): Use
72 32-bit type for default seed and engine used for initial state.
73 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/lwg3809.cc:
76 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
78 Backported from master:
79 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
81 * include/bits/mofunc_impl.h: Fix typo in doxygen comment.
83 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
85 Backported from master:
86 2023-04-27 Jonathan Wakely <jwakely@redhat.com>
88 * doc/doxygen/user.cfg.in (SOURCE_BROWSER): Only set to YES for
90 * include/bits/gslice_array.h (_DEFINE_VALARRAY_OPERATOR): Omit
92 * include/bits/indirect_array.h (_DEFINE_VALARRAY_OPERATOR):
94 * include/bits/mask_array.h (_DEFINE_VALARRAY_OPERATOR):
96 * include/bits/slice_array.h (_DEFINE_VALARRAY_OPERATOR):
98 * include/std/valarray (_DEFINE_VALARRAY_UNARY_OPERATOR)
99 (_DEFINE_VALARRAY_AUGMENTED_ASSIGNMENT)
100 (_DEFINE_VALARRAY_EXPR_AUGMENTED_ASSIGNMENT)
101 (_DEFINE_BINARY_OPERATOR): Likewise.
103 2023-04-21 Jonathan Wakely <jwakely@redhat.com>
106 * include/bits/locale_classes.tcc (try_facet, use_facet): Do not
107 check array index or dynamic type when accessing required
108 specializations of std::ctype, std::num_get, or std::num_put.
109 * testsuite/22_locale/ctype/is/string/89728_neg.cc: Adjust
112 2023-04-20 Jonathan Wakely <jwakely@redhat.com>
114 Backported from master:
115 2022-11-29 Jonathan Wakely <jwakely@redhat.com>
120 * include/bits/vector.tcc (vector::_M_fill_insert): Copy
121 _M_start and _M_finish members before allocating.
122 (vector::_M_default_append): Likewise.
123 (vector::_M_range_insert): Likewise.
125 2023-04-20 Jonathan Wakely <jwakely@redhat.com>
127 Backported from master:
128 2023-04-04 Jonathan Wakely <jwakely@redhat.com>
130 * doc/xml/manual/extensions.xml: Remove std::bad_exception from
132 * doc/html/manual/ext_demangling.html: Regenerate.
134 2023-04-20 Jonathan Wakely <jwakely@redhat.com>
136 Backported from master:
137 2023-04-05 Jonathan Wakely <jwakely@redhat.com>
139 * include/bits/regex.h (sub_match::swap): New function.
140 * testsuite/28_regex/sub_match/lwg3204.cc: New test.
142 2023-04-20 Jonathan Wakely <jwakely@redhat.com>
144 Backported from master:
145 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
148 * include/bits/istream.tcc (istream::_M_extract(ValueT&)): Use
149 std::use_facet instead of cached _M_num_get facet.
150 (istream::operator>>(short&)): Likewise.
151 (istream::operator>>(int&)): Likewise.
152 * include/bits/ostream.tcc (ostream::_M_insert(ValueT)): Use
153 std::use_facet instead of cached _M_num_put facet.
155 2023-04-20 Jonathan Wakely <jwakely@redhat.com>
157 Backported from master:
158 2023-01-15 Jonathan Wakely <jwakely@redhat.com>
160 * testsuite/30_threads/jthread/jthread.cc: Remove -pthread from
163 2023-04-20 Jonathan Wakely <jwakely@redhat.com>
165 Backported from master:
166 2023-03-22 Jonathan Wakely <jwakely@redhat.com>
168 * include/bits/shared_ptr_atomic.h (atomic::operator=(nullptr_t)):
169 Add overload, as per LWG 3893.
170 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
171 Check assignment from nullptr.
173 2023-04-20 Jonathan Wakely <jwakely@redhat.com>
175 Backported from master:
176 2023-03-29 Jonathan Wakely <jwakely@redhat.com>
178 * include/std/expected (expected::value() &): Use const lvalue
179 for unex member passed to bad_expected_access constructor, as
182 2023-04-20 Jonathan Wakely <jwakely@redhat.com>
184 Backported from master:
185 2023-02-02 Jonathan Wakely <jwakely@redhat.com>
187 * include/std/variant (variant::operator=): Implement resolution
189 * testsuite/20_util/variant/lwg3585.cc: New test.
191 2023-04-12 Patrick Palka <ppalka@redhat.com>
193 Backported from master:
194 2023-04-12 Patrick Palka <ppalka@redhat.com>
196 * src/c++17/floating_from_chars.cc: Include <algorithm>,
197 <iterator>, <limits> and <cstdint>.
199 2023-03-30 Jonathan Wakely <jwakely@redhat.com>
201 Backported from master:
202 2023-03-29 Jonathan Wakely <jwakely@redhat.com>
205 * include/std/optional (transform): Use std::remove_cv_t.
206 * testsuite/20_util/optional/monadic/pr109242.cc: New test.
208 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
210 Backported from master:
211 2022-12-16 Jonathan Wakely <jwakely@redhat.com>
214 * include/bits/shared_ptr_base.h (weak_ptr::operator=):
215 Implement as move-and-swap exactly as specified in the standard.
216 * testsuite/20_util/weak_ptr/cons/self_move.cc: New test.
218 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
220 Backported from master:
221 2022-11-03 Jonathan Wakely <jwakely@redhat.com>
223 * include/bits/ranges_algobase.h (__detail::__copy_or_move):
224 Move output iterator.
225 * testsuite/25_algorithms/copy/constrained.cc: Check copying to
226 move-only output iterator.
228 2023-03-28 Björn Schäpers <bjoern@hazardy.de>
230 Backported from master:
231 2023-01-14 Björn Schäpers <bjoern@hazardy.de>
233 * include/std/stacktrace (stacktrace_entry::_S_demangle): Use
234 raw __name if __cxa_demangle could not demangle it.
236 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
238 Backported from master:
239 2022-12-12 Jonathan Wakely <jwakely@redhat.com>
241 * include/std/stacktrace (operator<<): Only output to narrow
243 * testsuite/19_diagnostics/stacktrace/synopsis.cc:
245 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
247 Backported from master:
248 2022-12-09 Jonathan Wakely <jwakely@redhat.com>
250 * include/bits/chrono.h (duration_cast, floor, round, abs, ceil)
251 (time_point_cast): Add [[nodiscard]] attribute and doxygen
253 (treat_as_floating_point): Add doxygen commen.
255 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
257 Backported from master:
258 2022-12-09 Jonathan Wakely <jwakely@redhat.com>
260 * include/bits/chrono.h (duration, time_point): Change 'struct'
263 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
265 Backported from master:
266 2023-01-26 Jonathan Wakely <jwakely@redhat.com>
269 * include/bits/stl_tree.h (_Rb_tree_insert_and_rebalance): Add
271 (_Rb_tree_rebalance_for_erase): Add nonnull and returns_nonnull
273 * testsuite/23_containers/map/modifiers/108554.cc: New test.
275 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
277 Backported from master:
278 2022-09-23 Jonathan Wakely <jwakely@redhat.com>
280 * include/std/bitset (bitset::_M_copy_to_string): Find set bits
281 instead of iterating over individual bits.
283 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
285 Backported from master:
286 2022-09-15 Jonathan Wakely <jwakely@redhat.com>
288 * include/bits/shared_ptr_atomic.h (_GLIBCXX_TSAN_MUTEX_PRE_LOCK):
290 (_GLIBCXX_TSAN_MUTEX_TRY_LOCK): ... this, add try_lock flag.
291 (_GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED): New macro using
293 (_GLIBCXX_TSAN_MUTEX_POST_LOCK): Rename to ...
294 (_GLIBCXX_TSAN_MUTEX_LOCKED): ... this.
295 (_GLIBCXX_TSAN_MUTEX_PRE_UNLOCK): Remove invalid flag.
296 (_GLIBCXX_TSAN_MUTEX_POST_UNLOCK): Remove invalid flag.
297 (_Sp_atomic::_Atomic_count::lock): Use new macros.
299 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
301 Backported from master:
302 2022-09-14 Jonathan Wakely <jwakely@redhat.com>
304 * include/bits/shared_ptr_atomic.h (_GLIBCXX_TSAN_MUTEX_DESTROY)
305 (_GLIBCXX_TSAN_MUTEX_PRE_LOCK, _GLIBCXX_TSAN_MUTEX_POST_LOCK)
306 (_GLIBCXX_TSAN_MUTEX_PRE_UNLOCK, _GLIBCXX_TSAN_MUTEX_POST_UNLOCK)
307 (_GLIBCXX_TSAN_MUTEX_PRE_SIGNAL, _GLIBCXX_TSAN_MUTEX_POST_SIGNAL):
308 Define macros for TSan annotation functions.
309 (_Sp_atomic::_Atomic_count): Add annotations.
311 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
313 Backported from master:
314 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
316 * include/std/memory_resource (new_delete_resource): Add
317 nodiscard, returns_nonnull and const attributes.
318 (null_memory_resource): Likewise.
319 (set_default_resource, get_default_resource): Add returns_nonnull
321 (memory_resource::is_equal): Add nodiscard attribute.
322 (operator==, operator!=): Likewise.
324 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
326 Backported from master:
327 2022-09-14 Jonathan Wakely <jwakely@redhat.com>
330 (_State_baseV2::__setter(exception_ptr&, promise&)): Add
331 assertion for LWG 2276 precondition.
332 * testsuite/30_threads/promise/members/set_exception_neg.cc:
335 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
337 Backported from master:
338 2022-09-08 Jonathan Wakely <jwakely@redhat.com>
340 * include/c_global/cstddef (byte): Add always_inline attribute
341 to all operator overloads.
342 (to_integer): Add always_inline attribute.
344 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
346 Backported from master:
347 2022-09-08 Jonathan Wakely <jwakely@redhat.com>
349 * include/std/system_error (__adl_only::make_error_code): Add
351 (__adl_only::make_error_condition): Likewise.
352 (error_code::error_code(ErrorCodeEnum)): Add using-declaration
353 for deleted function.
354 (error_condition::error_condition(ErrorConditionEnum)):
356 * testsuite/19_diagnostics/error_code/cons/lwg3629.cc: New test.
357 * testsuite/19_diagnostics/error_condition/cons/lwg3629.cc: New test.
359 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
361 Backported from master:
362 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
364 * include/bits/ios_base.h (io_category): Add const and nodiscard
366 (make_error_code, make_error_condition): Add nodiscard.
367 * include/std/future (future_category): Add const and nodiscard.
368 (make_error_code, make_error_condition): Add nodiscard.
369 * include/std/system_error (generic_category system_category):
370 Add nodiscard. Replace _GLIBCXX_CONST with C++11 attribute.
371 (error_code::value, error_code::category, error_code::operator bool)
372 (error_condition::value, error_condition::category)
373 (error_condition::operator bool, make_error_code)
374 (make_error_condition, operator==, operator!=, operator<=>): Add
377 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
379 Backported from master:
380 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
382 * include/bits/std_thread.h (thread, thread::id): Improve
384 * include/std/future: Likewise.
385 * include/std/thread (jthread): Likewise.
387 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
389 Backported from master:
390 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
392 * include/std/system_error: Improve doxygen comments.
394 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
396 Backported from master:
397 2023-02-16 Jonathan Wakely <jwakely@redhat.com>
399 * include/ext/throw_allocator.h: Use reserved names for
402 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
404 Backported from master:
405 2022-11-25 Jonathan Wakely <jwakely@redhat.com>
407 * acinclude.m4 (GLIBCXX_CHECK_UCHAR_H): Don't use AC_MSG_RESULT
408 unless the AC_MSG_CHECKING happened.
409 * configure: Regenerate.
411 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
413 Backported from master:
414 2023-01-12 Jonathan Wakely <jwakely@redhat.com>
416 * doc/xml/manual/abi.xml: Add latest library versions.
417 * doc/html/manual/abi.html: Regenerate.
419 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
421 Backported from master:
422 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
424 * include/bits/char_traits.h (char_traits::copy): Return without
425 using memcpy if n==0.
426 (char_traits::assign): Likewise for memset.
428 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
430 Backported from master:
431 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
434 * include/bits/basic_string.h (basic_string::_M_is_local()): Add
435 hint for compiler that local strings fit in the local buffer.
437 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
439 Backported from master:
440 2023-03-01 Jonathan Wakely <jwakely@redhat.com>
442 * include/bits/cow_string.h: Fix typo in comment.
444 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
446 Backported from master:
447 2023-02-16 Jonathan Wakely <jwakely@redhat.com>
449 * include/experimental/optional: Fix header name in comment.
451 2023-03-28 Jonathan Wakely <jwakely@redhat.com>
453 Backported from master:
454 2023-01-16 Jonathan Wakely <jwakely@redhat.com>
457 * include/c_compatibility/stdatomic.h: Change copyright line to
458 be consistent with other headers contributed under DCO terms.
459 * include/std/expected: Add full stop to copyright line.
461 2023-03-21 Matthias Kretz <m.kretz@gsi.de>
463 Backported from master:
464 2023-03-21 Matthias Kretz <m.kretz@gsi.de>
466 * include/experimental/bits/simd_x86.h
467 (_SimdImplX86::_S_divides): Replace test for __GCC_IEC_559 == 0
468 with __RECIPROCAL_MATH__.
470 2023-03-21 Matthias Kretz <m.kretz@gsi.de>
472 Backported from master:
473 2023-03-21 Matthias Kretz <m.kretz@gsi.de>
475 * include/experimental/bits/simd_detail.h: Don't define
476 _GLIBCXX_SIMD_WORKAROUND_PR90993 for Clang.
477 * include/experimental/bits/simd_x86.h (_S_divides): Remove
480 2023-03-21 Matthias Kretz <m.kretz@gsi.de>
482 Backported from master:
483 2023-03-21 Matthias Kretz <m.kretz@gsi.de>
485 * testsuite/experimental/simd/tests/operators.cc: Clang doesn't
486 define __GCC_IEC_559. Use __STDC_IEC_559__ instead.
488 2023-03-20 François Dumont <fdumont@gcc.gnu.org>
490 Backported from master:
491 2022-11-16 François Dumont <fdumont@gcc.gnu.org>
493 * python/libstdcxx/v6/printers.py (FilteringTypePrinter): Rename 'match' field
494 'template'. Add self.targ1 to specify the first template parameter of the instantiation
496 (add_one_type_printer): Add targ1 optional parameter, default to None.
497 Use gdb.types.get_basic_type to compare the type to recognize and the type
498 returned from the typedef lookup.
499 (register_type_printers): Adapt calls to add_one_type_printers.
501 2023-03-20 François Dumont <fdumont@gcc.gnu.org>
503 Backported from master:
504 2022-10-03 François Dumont <fdumont@gcc.gnu.org>
506 * python/libstdcxx/v6/printers.py (Printer.add_version): Do not add version
507 namespace for __cxx11 symbols.
508 (add_one_template_type_printer): Likewise.
509 (add_one_type_printer): Likewise.
510 (FilteringTypePrinter._recognizer.recognize): Add a workaround for std::string & al
511 ambiguous typedef matching both std:: and std::__cxx11:: symbols.
512 * testsuite/libstdc++-prettyprinters/cxx17.cc: Remove obsolete
513 \#define _GLIBCXX_USE_CXX11_ABI 0.
514 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise. Adapt test to accept
516 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
517 * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
518 * testsuite/libstdc++-prettyprinters/80276.cc: Likewise and remove xfail for c++20
520 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
522 2023-03-20 François Dumont <fdumont@gcc.gnu.org>
524 Backported from master:
525 2022-09-22 François Dumont <fdumont@gcc.gnu.org>
527 * python/libstdcxx/v6/printers.py: Remove ptinter registration for non-existing
528 types std::__debug::unique_ptr, std::__debug::stack, std::__debug::queue,
529 std::__debug::priority_queue.
531 2023-03-20 Jonathan Wakely <jwakely@redhat.com>
533 Backported from master:
534 2023-03-10 Jonathan Wakely <jwakely@redhat.com>
537 * python/libstdcxx/v6/xmethods.py (SharedPtrUseCountWorker):
538 Remove self-recursion in __init__. Add missing _supports.
539 * testsuite/libstdc++-xmethods/shared_ptr.cc: Check use_count()
542 2023-03-20 Jonathan Wakely <jwakely@redhat.com>
545 * include/std/expected (expected<void>::expected(in_place_t)):
546 Remove template-head.
548 2023-03-20 Jonathan Wakely <jwakely@redhat.com>
551 * include/std/coroutine (hash<>::operator()): Add const.
552 * testsuite/18_support/coroutines/hash.cc: New test.
554 2023-03-10 Thomas W Rodgers <rodgert@twrodgers.com>
556 Backported from master:
557 2023-02-14 Thomas W Rodgers <rodgert@twrodgers.com>
560 * include/std/atomic (atomic_flag_wait): Add.
561 (atomic_flag_wait_explicit): Add.
562 (atomic_flag_notify): Add.
563 (atomic_flag_notify_explicit): Add.
564 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc:
565 Add test case to cover missing atomic_flag free functions.
567 2023-02-23 Matthias Kretz <m.kretz@gsi.de>
569 Backported from master:
570 2023-02-23 Matthias Kretz <m.kretz@gsi.de>
573 * include/experimental/bits/simd.h (__vector_broadcast):
574 Implement via __vector_broadcast_impl instead of
575 __call_with_n_evaluations + 2 lambdas.
576 (__vector_broadcast_impl): New.
578 2023-02-23 Matthias Kretz <m.kretz@gsi.de>
580 Backported from master:
581 2023-02-23 Matthias Kretz <m.kretz@gsi.de>
583 * include/experimental/bits/simd_builtin.h (_S_set): Compare as
584 int. The actual range of these indexes is very small.
586 2023-02-23 Matthias Kretz <m.kretz@gsi.de>
588 Backported from master:
589 2023-02-23 Matthias Kretz <m.kretz@gsi.de>
591 * include/experimental/bits/simd_x86.h (_S_bit_shift_left)
592 (_S_bit_shift_right): Declare constexpr. The implementation was
593 already expecting constexpr evaluation.
595 2023-02-23 Matthias Kretz <m.kretz@gsi.de>
597 Backported from master:
598 2023-02-20 Matthias Kretz <m.kretz@gsi.de>
600 * include/experimental/bits/simd.h (__extract_part, split):
601 Use reserved name for template parameter.
603 2023-02-21 Jonathan Wakely <jwakely@redhat.com>
605 Backported from master:
606 2022-08-31 Jonathan Wakely <jwakely@redhat.com>
608 * include/bits/refwrap.h (reference_wrapper::operator()): Add
609 noexcept-specifier and use __invoke_result instead of result_of.
610 * testsuite/20_util/reference_wrapper/invoke-noexcept.cc: New test.
612 2023-02-21 Jonathan Wakely <jwakely@redhat.com>
614 Backported from master:
615 2023-02-02 Jonathan Wakely <jwakely@redhat.com>
618 * include/bits/fs_path.h (path::path(string_view, _Type))
619 (path::_Cmpt::_Cmpt(string_view, _Type, size_t)): Move inline
621 * src/c++17/fs_path.cc: ... here.
622 * testsuite/27_io/filesystem/path/108636.cc: New test.
624 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
626 Backported from master:
627 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
629 * include/experimental/bits/simd_math.h (__hypot): Bitcasting
630 between scalars requires the __bit_cast helper function instead
633 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
635 Backported from master:
636 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
638 * include/experimental/bits/simd_x86.h
639 (_SimdImplX86::_S_not_equal_to, _SimdImplX86::_S_less)
640 (_SimdImplX86::_S_less_equal): Do not call
641 __builtin_is_constant_evaluated in constexpr-if.
643 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
645 Backported from master:
646 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
648 * testsuite/experimental/simd/tests/bits/verify.h
649 (verify::verify): Use %zx for size_t in format string.
651 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
653 Backported from master:
654 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
656 * testsuite/experimental/simd/README.md: Document the timeout
657 and timeout-factor directives. Minor typo fixed.
659 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
661 Backported from master:
662 2023-02-16 Matthias Kretz <m.kretz@gsi.de>
664 * include/experimental/bits/simd.h
665 (_SimdWrapper::_M_is_constprop_none_of)
666 (_SimdWrapper::_M_is_constprop_all_of): Return false unless the
667 computed result still satisfies __builtin_constant_p.
669 2023-02-14 Thomas W Rodgers <rodgert@twrodgers.com>
671 Backported from master:
672 2023-02-14 Thomas W Rodgers <rodgert@twrodgers.com>
675 * include/std/atomic (atomic_flag_test): Add.
676 (atomic_flag_test_explicit): Add.
677 * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
678 test case to cover missing atomic_flag free functions.
679 * testsuite/29_atomics/atomic_flag/test/implicit.cc:
682 2023-02-10 Jakub Jelinek <jakub@redhat.com>
684 Backported from master:
685 2022-11-24 Jakub Jelinek <jakub@redhat.com>
688 * src/c++17/fast_float/fast_float.h: Partial merge from fast_float
689 2ef9abbcf6a11958b6fa685a89d0150022e82e78 commit.
691 2023-02-10 Jakub Jelinek <jakub@redhat.com>
693 Backported from master:
694 2022-11-07 Jakub Jelinek <jakub@redhat.com>
697 * src/c++17/fast_float/fast_float.h: Partial merge from fast_float
698 662497742fea7055f0e0ee27e5a7ddc382c2c38e commit.
699 * testsuite/20_util/from_chars/pr107468.cc: New test.
701 2023-02-02 Jonathan Wakely <jwakely@redhat.com>
703 Backported from master:
704 2023-02-01 Jonathan Wakely <jwakely@redhat.com>
706 * src/c++11/random.cc (random_device::_M_fini): Do not try to
707 close the file handle if the target doesn't support the
708 /dev/random and /dev/urandom files.
710 2023-02-02 Jonathan Wakely <jwakely@redhat.com>
712 Backported from master:
713 2023-02-01 Jonathan Wakely <jwakely@redhat.com>
715 * config/os/generic/error_constants.h (errc::value_too_large)
717 * src/c++11/system_error.cc
718 (system_category::default_error_condition) [__AVR__]: Only match
719 recognize values equal to EDOM, ERANGE, ENOSYS and EINTR.
720 * src/c++17/fs_ops.cc (fs::current_path) [__AVR__]: Do not check
721 for ENOENT etc. in switch.
722 (fs::remove_all) [__AVR__]: Likewise.
723 * src/filesystem/ops-common.h [__AVR__]: Do not use POSIX open,
726 2023-02-02 Patrick Palka <ppalka@redhat.com>
728 Backported from master:
729 2022-11-06 Patrick Palka <ppalka@redhat.com>
731 * include/bits/atomic_wait.h (_detail::__platform_wait_alignment):
732 Declare inline. Remove redundant static specifier.
733 (__detail::__atomic_spin_count_relax): Declare inline.
734 (__detail::__atomic_spin_count): Likewise.
735 * include/bits/regex_automaton.h (__detail::_S_invalid_state_id):
736 Declare inline for C++17. Declare constexpr. Remove
737 redundant const and static specifiers.
738 * include/bits/regex_error.h (regex_constants::error_collate):
739 Declare inline for C++17 as per P0607R0.
740 (regex_constants::error_ctype): Likewise.
741 (regex_constants::error_escape): Likewise.
742 (regex_constants::error_backref): Likewise.
743 (regex_constants::error_brack): Likewise.
744 (regex_constants::error_paren): Likewise.
745 (regex_constants::error_brace): Likewise.
746 (regex_constants::error_badbrace): Likewise.
747 (regex_constants::error_range): Likewise.
748 (regex_constants::error_space): Likewise.
749 (regex_constants::error_badrepeat): Likewise.
750 (regex_constants::error_complexity): Likewise.
751 (regex_constants::error_stack): Likewise.
752 * include/ext/concurrence.h (__gnu_cxx::__default_lock_policy):
753 Likewise. Remove redundant static specifier.
754 * include/pstl/execution_defs.h (execution::seq): Declare inline
755 for C++17 as per P0607R0.
756 (execution::par): Likewise.
757 (execution::par_unseq): Likewise.
758 (execution::unseq): Likewise.
760 2023-01-18 Jonathan Wakely <jwakely@redhat.com>
762 Backported from master:
763 2022-12-22 Jonathan Wakely <jwakely@redhat.com>
766 * src/c++11/compatibility-condvar.cc (__nothrow_wait_cv::wait):
767 Access private data member of base class and call its wait
770 2023-01-16 Jonathan Wakely <jwakely@redhat.com>
772 Backported from master:
773 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
776 * include/bits/atomic_wait.h (__waiter_pool_base::_M_notify):
777 Move increment of _M_ver here.
778 [!_GLIBCXX_HAVE_PLATFORM_WAIT]: Lock mutex around increment.
779 Use relaxed memory order and always notify all waiters.
780 (__waiter_base::_M_do_wait) [!_GLIBCXX_HAVE_PLATFORM_WAIT]:
781 Check value again after locking mutex.
782 (__waiter_base::_M_notify): Remove increment of _M_ver.
784 2023-01-05 Jonathan Wakely <jwakely@redhat.com>
786 Backported from master:
787 2023-01-05 Jonathan Wakely <jwakely@redhat.com>
790 * include/std/chrono (hh_mm_ss): Do not use chrono::abs if
791 duration rep is unsigned. Remove incorrect noexcept-specifier.
792 * testsuite/std/time/hh_mm_ss/1.cc: Check unsigned rep. Check
793 floating-point representations. Check default construction.
795 2022-12-21 Jonathan Wakely <jwakely@redhat.com>
797 Backported from master:
798 2022-11-23 Jonathan Wakely <jwakely@redhat.com>
801 * testsuite/experimental/filesystem/iterators/error_reporting.cc:
802 Use a static buffer with space after it.
804 2022-12-21 Jonathan Wakely <jwakely@redhat.com>
806 Backported from master:
807 2022-12-16 Jonathan Wakely <jwakely@redhat.com>
809 * include/std/expected (expected::_M_swap_val_unex): Guard the
811 (expected::swap): Move is_swappable
812 requirement from static_assert to constraint.
814 (operator==): Remove noexcept-specifier.
815 * testsuite/20_util/expected/swap.cc: Check swapping of
816 types without non-throwing move constructor. Check constraints
818 * testsuite/20_util/expected/unexpected.cc: Check constraints on
820 * testsuite/20_util/expected/equality.cc: New test.
822 2022-12-14 Jonathan Wakely <jwakely@redhat.com>
824 Backported from master:
825 2022-12-14 Jonathan Wakely <jwakely@redhat.com>
828 * include/std/stacktrace (basic_stracktrace::_Impl): Do not
829 multiply N by sizeof(value_type) when allocating.
831 2022-11-24 Jonathan Wakely <jwakely@redhat.com>
833 Backported from master:
834 2022-09-15 Jonathan Wakely <jwakely@redhat.com>
836 * include/std/memory: Do not include <bits/stl_algobase.h>.
838 2022-11-24 Jonathan Wakely <jwakely@redhat.com>
840 Backported from master:
841 2022-11-11 Jonathan Wakely <jwakely@redhat.com>
843 * testsuite/20_util/tuple/swap.cc (MoveOnly::operator==): Add
845 * testsuite/26_numerics/valarray/87641.cc (X::operator==):
848 2022-11-24 Jonathan Wakely <jwakely@redhat.com>
850 Backported from master:
851 2022-11-02 Jonathan Wakely <jwakely@redhat.com>
853 * include/std/expected (expected::_M_invalid): Remove.
855 2022-11-24 Jonathan Wakely <jwakely@redhat.com>
857 Backported from master:
858 2022-11-21 Jonathan Wakely <jwakely@redhat.com>
860 * include/bits/chrono.h (duration): Check preconditions on
861 template arguments before using them.
863 2022-11-24 Jonathan Wakely <jwakely@redhat.com>
865 Backported from master:
866 2022-10-28 Jonathan Wakely <jwakely@redhat.com>
868 * include/bits/fs_path.h (path::filename()): Fix dangling
871 2022-11-24 Jonathan Wakely <jwakely@redhat.com>
873 Backported from master:
874 2022-09-14 Jonathan Wakely <jwakely@redhat.com>
876 * doc/xml/manual/intro.xml: Document LWG 1203.
877 * doc/html/*: Regenerate.
879 2022-11-24 Jonathan Wakely <jwakely@redhat.com>
881 Backported from master:
882 2022-09-07 Jonathan Wakely <jwakely@redhat.com>
884 * include/std/barrier: Add missing runtime exception.
886 2022-11-24 Jonathan Wakely <jwakely@redhat.com>
888 Backported from master:
889 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
891 * include/bits/fs_dir.h (directory_iterator): Add comparison
892 with std::default_sentinel_t. Remove redundant operator!= for
894 * (recursive_directory_iterator): Likewise.
895 * include/bits/iterator_concepts.h [!__cpp_lib_concepts]
896 (default_sentinel_t, default_sentinel): Define even if concepts
898 * include/bits/regex.h (regex_iterator): Add comparison with
899 std::default_sentinel_t. Remove redundant operator!= for C++20.
900 (regex_token_iterator): Likewise.
901 (regex_token_iterator::_M_end_of_seq()): Add noexcept.
902 * testsuite/27_io/filesystem/iterators/lwg3719.cc: New test.
903 * testsuite/28_regex/iterators/regex_iterator/lwg3719.cc:
905 * testsuite/28_regex/iterators/regex_token_iterator/lwg3719.cc:
908 2022-11-24 Jonathan Wakely <jwakely@redhat.com>
910 Backported from master:
911 2022-09-23 Jonathan Wakely <jwakely@redhat.com>
914 * include/std/type_traits (__is_nothrow_invocable): Remove.
915 (__is_invocable_impl::__nothrow_type): New member type which
916 checks if the conversion can throw.
917 (__is_nt_invocable_impl): Replace class template with alias
918 template to __is_nt_invocable_impl::__nothrow_type.
919 * testsuite/20_util/is_nothrow_invocable/91456.cc: New test.
920 * testsuite/20_util/is_nothrow_convertible/value.cc: Remove
921 macro used by value_ext.cc test.
922 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: Remove
923 test for non-standard __is_nothrow_invocable trait.
925 2022-11-22 Jonathan Wakely <jwakely@redhat.com>
928 * include/bits/fs_path.h (filesystem::swap(path&, path&)):
929 Replace with abbreviated function template.
930 * include/experimental/bits/fs_path.h (filesystem::swap):
932 * testsuite/27_io/filesystem/iterators/106201.cc: New test.
933 * testsuite/experimental/filesystem/iterators/106201.cc: New test.
935 2022-11-22 Jonathan Wakely <jwakely@redhat.com>
937 Backported from master:
938 2022-11-22 Jonathan Wakely <jwakely@redhat.com>
941 * src/c++17/memory_resource.cc (pool_sizes): Disable large pools
942 for targets with 16-bit int.
944 2022-11-14 Jonathan Wakely <jwakely@redhat.com>
946 * include/bits/mofunc_impl.h (move_only_function::__param_t):
947 Use __is_scalar instead of is_trivially_copyable.
948 * testsuite/20_util/move_only_function/call.cc: Check parameters
949 involving incomplete types.
951 2022-11-14 Jonathan Wakely <jwakely@redhat.com>
953 Backported from master:
954 2022-11-11 Jonathan Wakely <jwakely@redhat.com>
957 * include/bits/fs_path.h (path::_Codecvt): New class template
958 that selects the kind of code conversion done.
959 (path::_Codecvt<wchar_t>): Select based on sizeof(wchar_t).
960 (_GLIBCXX_CONV_FROM_UTF8): New macro to allow the same code to
961 be used for Windows and POSIX.
962 (path::_S_convert(const EcharT*, const EcharT*)): Simplify by
963 using _Codecvt and _GLIBCXX_CONV_FROM_UTF8 abstractions.
964 (path::_S_str_convert(basic_string_view<value_type>, const A&)):
965 Simplify nested conditions.
966 * include/experimental/bits/fs_path.h (path::_Cvt): Define
967 nested typedef controlling type of code conversion done.
968 (path::_Cvt::_S_wconvert): Use new typedef.
969 (path::string(const A&)): Likewise.
970 * testsuite/27_io/filesystem/path/construct/95048.cc: New test.
971 * testsuite/experimental/filesystem/path/construct/95048.cc: New
974 2022-11-14 Nathaniel Shead <nathanieloshead@gmail.com>
976 Backported from master:
977 2022-11-11 Nathaniel Shead <nathanieloshead@gmail.com>
980 * include/bits/basic_string.h (_M_use_local_data): Set active
981 member to _M_local_buf.
983 2022-11-08 Jonathan Wakely <jwakely@redhat.com>
985 Backported from master:
986 2022-11-08 Jonathan Wakely <jwakely@redhat.com>
988 * doc/xml/authors.xml: Remove empty author element.
989 * doc/xml/manual/spine.xml: Likewise.
990 * doc/html/manual/index.html: Regenerate.
992 2022-10-19 Alexandre Oliva <oliva@adacore.com>
994 Backported from master:
995 2022-06-22 Alexandre Oliva <oliva@adacore.com>
997 * libsupc++/eh_globals.cc [!_GLIBCXX_HAVE_TLS]
998 (__eh_globals_init::~__eh_globals_init): Clear _S_init first.
1000 2022-09-29 Jonathan Wakely <jwakely@redhat.com>
1002 Backported from master:
1003 2022-09-28 Jonathan Wakely <jwakely@redhat.com>
1005 * doc/xml/manual/evolution.xml: Document std::bind API
1007 * doc/xml/manual/intro.xml: Document LWG 2487 status.
1008 * doc/xml/manual/using.xml: Clarify default value of
1009 _GLIBCXX_USE_DEPRECATED.
1010 * doc/html/*: Regenerate.
1011 * include/std/functional (_Bind::operator()(Args&&...) volatile)
1012 (_Bind::operator()(Args&&...) const volatile)
1013 (_Bind_result::operator()(Args&&...) volatile)
1014 (_Bind_result::operator()(Args&&...) const volatile): Replace
1015 with deleted overload for C++20 and later.
1016 * testsuite/20_util/bind/cv_quals.cc: Check for deprecated
1018 * testsuite/20_util/bind/cv_quals_2.cc: Likewise, and check for
1019 ill-formed in C++20.
1021 2022-09-16 Jonathan Wakely <jwakely@redhat.com>
1023 * doc/xml/manual/abi.xml: Document GLIBCXX_3.4.30 version.
1024 * doc/html/manual/abi.html: Regenerate.
1026 2022-09-12 Patrick Palka <ppalka@redhat.com>
1028 Backported from master:
1029 2022-09-12 Patrick Palka <ppalka@redhat.com>
1032 * testsuite/std/ranges/adaptors/join.cc (test13): New test.
1034 2022-09-07 Jonathan Wakely <jwakely@redhat.com>
1036 Backported from master:
1037 2022-08-22 Jonathan Wakely <jwakely@redhat.com>
1040 * include/bits/std_thread.h (thread::_State_impl): Forward
1041 individual arguments to _Invoker constructor.
1042 (thread::_Invoker): Add constructor. Delete copies.
1043 * include/std/future (__future_base::_Deferred_state): Forward
1044 individual arguments to _Invoker constructor.
1045 (__future_base::_Async_state_impl): Likewise.
1046 * testsuite/30_threads/async/106695.cc: New test.
1047 * testsuite/30_threads/thread/106695.cc: New test.
1049 2022-09-07 Jonathan Wakely <jwakely@redhat.com>
1051 Backported from master:
1052 2022-08-22 Jonathan Wakely <jwakely@redhat.com>
1055 * include/bits/regex_compiler.tcc (_Compiler::_M_cur_int_value):
1056 Use built-ins to check for integer overflow in back-reference
1058 * testsuite/28_regex/basic_regex/106607.cc: New test.
1060 2022-08-24 Jonathan Wakely <jwakely@redhat.com>
1062 Backported from master:
1063 2022-08-23 Jonathan Wakely <jwakely@redhat.com>
1066 * include/std/variant (__do_visit): Handle is_void<R> for zero
1068 * testsuite/20_util/variant/visit_r.cc: Check std::visit<void>(v).
1070 2022-08-23 Jonathan Wakely <jwakely@redhat.com>
1072 Backported from master:
1073 2022-08-22 Jonathan Wakely <jwakely@redhat.com>
1076 * doc/xml/manual/using.xml: Document -lstdc++_libbacktrace
1077 requirement for using std::stacktrace. Also adjust -frtti and
1078 -fexceptions to document non-default (i.e. negative) forms.
1079 * doc/html/*: Regenerate.
1081 2022-08-19 Release Manager
1083 * GCC 12.2.0 released.
1085 2022-08-05 Jonathan Wakely <jwakely@redhat.com>
1087 Backported from master:
1088 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
1090 * include/std/string_view (basic_string_view(Range&&)): Add
1091 explicit as per P2499R0.
1092 * testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc:
1093 Adjust implicit conversions. Check implicit conversions fail.
1094 * testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc:
1097 2022-08-05 Jonathan Wakely <jwakely@redhat.com>
1099 Backported from master:
1100 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
1102 * include/std/expected (unexpected::_M_val): Rename to _M_unex.
1103 (bad_expected_access::_M_val): Likewise.
1105 2022-08-05 Jonathan Wakely <jwakely@redhat.com>
1107 Backported from master:
1108 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
1110 * include/bits/ios_base.h (__cpp_lib_ios_noreplace): Update
1112 * include/std/version (__cpp_lib_ios_noreplace): Likewise.
1113 * testsuite/27_io/basic_ofstream/open/char/noreplace.cc: Check
1115 * testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc:
1118 2022-08-03 Jonathan Wakely <jwakely@redhat.com>
1120 Backported from master:
1121 2022-06-28 Jonathan Wakely <jwakely@redhat.com>
1123 * src/c++17/fs_dir.cc (_Dir::dir_and_pathname):: Replace with
1124 current() returning _At_path.
1125 (_Dir::_Dir, _Dir::open_subdir, _Dir::do_unlink): Adjust.
1126 * src/filesystem/dir-common.h (_Dir_base::_At_path): New class.
1127 (_Dir_base::_Dir_Base, _Dir_base::openat): Use _At_path.
1128 * src/filesystem/dir.cc (_Dir::dir_and_pathname): Replace with
1129 current() returning _At_path.
1130 (_Dir::_Dir, _Dir::open_subdir): Adjust.
1132 2022-08-03 Jonathan Wakely <jwakely@redhat.com>
1134 Backported from master:
1135 2022-07-29 Jonathan Wakely <jwakely@redhat.com>
1138 * include/bits/stl_iterator.h (common_iterator::operator->):
1139 Change return type to just auto.
1141 2022-08-03 Jonathan Wakely <jwakely@redhat.com>
1143 Backported from master:
1144 2022-07-12 Jonathan Wakely <jwakely@redhat.com>
1147 * include/std/istream [C++17] (operator>>(istream&, char*)):
1148 Set eofbit if we stopped extracting at EOF.
1149 * testsuite/27_io/basic_istream/extractors_character/char/pr106248.cc:
1151 * testsuite/27_io/basic_istream/extractors_character/wchar_t/pr106248.cc:
1154 2022-08-03 Jonathan Wakely <jwakely@redhat.com>
1156 Backported from master:
1157 2022-07-01 Jonathan Wakely <jwakely@redhat.com>
1159 * include/bits/fs_ops.h: Add nodiscard to all pure functions.
1160 * include/experimental/bits/fs_ops.h: Likewise.
1161 * testsuite/27_io/filesystem/operations/all.cc: Do not discard
1162 results of absolute and canonical.
1163 * testsuite/27_io/filesystem/operations/absolute.cc: Cast
1164 discarded result to void.
1165 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
1166 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
1167 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
1168 * testsuite/27_io/filesystem/operations/read_symlink.cc:
1170 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1171 * testsuite/27_io/filesystem/operations/symlink_status.cc:
1173 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
1175 * testsuite/experimental/filesystem/operations/canonical.cc:
1177 * testsuite/experimental/filesystem/operations/exists.cc:
1179 * testsuite/experimental/filesystem/operations/is_empty.cc:
1181 * testsuite/experimental/filesystem/operations/read_symlink.cc:
1183 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1186 2022-08-03 Jonathan Wakely <jwakely@redhat.com>
1188 Backported from master:
1189 2022-06-16 Jonathan Wakely <jwakely@redhat.com>
1192 * include/bits/basic_string.h (_M_use_local_data): Initialize
1193 the entire SSO buffer.
1194 * testsuite/21_strings/basic_string/cons/char/105995.cc: New test.
1196 2022-08-03 Jonathan Wakely <jwakely@redhat.com>
1198 Backported from master:
1199 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
1201 * include/bits/new_allocator.h: Fix indentation.
1202 * include/ext/malloc_allocator.h: Likewise.
1204 2022-08-03 Jonathan Wakely <jwakely@redhat.com>
1206 Backported from master:
1207 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
1210 * include/bits/allocator.h (allocator::allocate): Check for
1211 overflow in constexpr allocation.
1212 * testsuite/20_util/allocator/105975.cc: New test.
1214 2022-08-03 Jonathan Wakely <jwakely@redhat.com>
1216 Backported from master:
1217 2022-06-10 Jonathan Wakely <jwakely@redhat.com>
1220 * include/experimental/numeric (experimental::gcd): Simplify
1221 assertions. Use __abs_r instead of __absu.
1222 (experimental::lcm): Likewise. Remove use of __detail::__lcm so
1223 overflow can be detected.
1224 * include/std/numeric (__detail::__absu): Rename to __abs_r and
1225 change to allow signed result type, so overflow can be detected.
1226 (__detail::__lcm): Remove.
1227 (gcd): Simplify assertions. Use __abs_r instead of __absu.
1228 (lcm): Likewise. Remove use of __detail::__lcm so overflow can
1230 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
1231 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1232 * testsuite/26_numerics/gcd/105844.cc: New test.
1233 * testsuite/26_numerics/lcm/105844.cc: New test.
1235 2022-07-26 Thomas Rodgers <trodgers@redhat.com>
1237 Backported from master:
1238 2022-07-26 Thomas Rodgers <trodgers@redhat.com>
1240 * include/bits/atomic_wait.h (__atomic_spin): Merge spin loops.
1242 2022-07-22 Jonathan Wakely <jwakely@redhat.com>
1244 Backported from master:
1245 2022-06-28 Jonathan Wakely <jwakely@redhat.com>
1247 * src/c++17/fs_dir.cc (_Dir::_Dir) [!_GLIBCXX_HAVE_OPENAT]:
1248 Always store pathname if we don't have openat or unlinkat,
1249 because the full path is needed to open sub-directories and
1252 2022-07-22 Alexandre Oliva <oliva@adacore.com>
1254 Backported from master:
1255 2022-06-27 Alexandre Oliva <oliva@adacore.com>
1257 * src/c++17/fs_dir.cc (dir_and_pathname): Use dirfd if
1258 _GLIBCXX_HAVE_OPENAT.
1260 2022-07-22 Alexandre Oliva <oliva@adacore.com>
1262 Backported from master:
1263 2022-06-24 Alexandre Oliva <oliva@adacore.com>
1265 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for
1267 * configure, config.h.in: Rebuilt.
1268 * src/filesystem/dir-common.h (openat): Use ::openat if
1269 _GLIBCXX_HAVE_OPENAT.
1270 * src/filesystem/dir.cc (dir_and_pathname): Use dirfd if
1271 _GLIBCXX_HAVE_OPENAT.
1273 2022-07-22 Jonathan Wakely <jwakely@redhat.com>
1275 Backported from master:
1276 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
1278 * include/std/stacktrace: Do not include <cxxabi.h>.
1279 (__cxa_demangle): Declare.
1281 2022-07-21 Jonathan Wakely <jwakely@redhat.com>
1283 Backported from master:
1284 2022-07-20 Jonathan Wakely <jwakely@redhat.com>
1287 * include/bits/stl_iterator.h (common_iterator): Define move
1288 constructor and move assignment operator.
1289 (common_iterator::_M_assign): New function implementing
1291 (common_iterator::operator=): Use _M_assign.
1292 (common_iterator::_S_valueless): New constant.
1293 * testsuite/24_iterators/common_iterator/100823.cc: New test.
1295 2022-07-21 Jonathan Wakely <jwakely@redhat.com>
1297 Backported from master:
1298 2022-07-20 Jonathan Wakely <jwakely@redhat.com>
1300 * include/bits/stl_iterator.h (common_iterator): Fix incorrect
1301 uses of is_nothrow_assignable_v. Fix inconsistent constraints on
1302 friend declaration. Do not move argument in copy constructor.
1303 * testsuite/24_iterators/common_iterator/1.cc: Check for
1304 noexcept constructibnle/assignable.
1306 2022-07-21 Nathan Sidwell <nathan@acm.org>
1308 Backported from master:
1309 2022-05-26 Nathan Sidwell <nathan@acm.org>
1311 * include/bits/hashtable.h: Include required headers.
1312 * include/bits/hashtable_policy.h: Likewise.
1313 * include/bits/stl_heap.h: Likewise.
1314 * include/bits/stl_iterator_base_funcs.h: Likewise.
1316 2022-07-21 Jonathan Wakely <jwakely@redhat.com>
1318 Backported from master:
1319 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
1321 * include/bits/utility.h: Fix comment typos.
1323 2022-07-21 Jonathan Wakely <jwakely@redhat.com>
1325 Backported from master:
1326 2022-06-28 Jonathan Wakely <jwakely@redhat.com>
1328 * testsuite/20_util/from_chars/4.cc: Only use log2 if C99 math
1329 functions are available.
1331 2022-07-21 Jonathan Wakely <jwakely@redhat.com>
1333 Backported from master:
1334 2022-06-23 Jonathan Wakely <jwakely@redhat.com>
1336 * testsuite/26_numerics/random/random_device/entropy.cc: Use
1337 numeric_limits<unsigned>::digits.
1339 2022-07-21 Marco Falke <falke.marco@gmail.com>
1341 Backported from master:
1342 2022-07-19 Marco Falke <falke.marco@gmail.com>
1344 * include/std/charconv (__from_chars_alnum_to_val): Replace
1345 implicit conversion from int to unsigned char with explicit
1348 2022-07-21 Jonathan Wakely <jwakely@redhat.com>
1350 Backported from master:
1351 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
1354 * src/filesystem/ops.cc (has_trailing_slash): New helper
1356 (fs::status): Strip trailing slashes.
1357 (fs::symlink_status): Likewise.
1358 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1359 Clean the environment before each test and use TMP instead of
1360 TMPDIR so the test passes on Windows.
1362 2022-07-21 Jonathan Wakely <jwakely@redhat.com>
1364 Backported from master:
1365 2022-06-10 Jonathan Wakely <jwakely@redhat.com>
1368 * libsupc++/eh_globals.cc (eh_globals): Ensure constant init and
1369 prevent destruction during termination.
1370 (__eh_globals_init::_M_init): Replace with static member _S_init.
1371 (__cxxabiv1::__cxa_get_globals_fast): Update.
1372 (__cxxabiv1::__cxa_get_globals): Likewise.
1374 2022-07-07 Jonathan Wakely <jwakely@redhat.com>
1376 Backported from master:
1377 2022-07-01 Jonathan Wakely <jwakely@redhat.com>
1380 * include/Makefile.am (largefile-config.h): Add
1381 stamp-${host_alias} prerequisite.
1382 * include/Makefile.in: Regenerate.
1384 2022-07-07 Jonathan Wakely <jwakely@redhat.com>
1386 Backported from master:
1387 2022-06-23 Jonathan Wakely <jwakely@redhat.com>
1389 * testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
1390 rmdir to remove directories.
1391 * testsuite/experimental/filesystem/iterators/error_reporting.cc:
1394 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
1396 Backported from master:
1397 2022-06-13 Jonathan Wakely <jwakely@redhat.com>
1399 * include/std/atomic (__atomic_val_t): Use __type_identity_t
1400 instead of atomic<T>::value_type, as per LWG 3220.
1401 * testsuite/29_atomics/atomic/lwg3220.cc: New test.
1403 2022-06-14 Mark Mentovai <mark@mentovai.com>
1405 Backported from master:
1406 2022-06-13 Mark Mentovai <mark@mentovai.com>
1408 * include/experimental/bits/fs_path.h (__detail::__null_terminated):
1409 Rename to __nul_terminated to avoid colliding with a macro in
1412 2022-06-08 Jonathan Wakely <jwakely@redhat.com>
1414 Backported from master:
1415 2022-05-27 Jonathan Wakely <jwakely@redhat.com>
1418 * include/std/sstream (basic_stringbuf::_M_high_mark): Add
1419 always_inline attribute.
1421 2022-06-08 Jonathan Wakely <jwakely@redhat.com>
1423 Backported from master:
1424 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1427 * include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:
1428 Limit ga_sizes array to values that fit in size_t.
1429 * include/ext/random [__SIZE_WIDTH < 32] (sfmt86243)
1430 (sfmt86243_64, sfmt132049, sfmt132049_64, sfmt216091)
1431 (sfmt216091_64): Do not declare.
1433 2022-06-08 Jonathan Wakely <jwakely@redhat.com>
1435 Backported from master:
1436 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
1438 * include/bits/basic_string.h: Do not include <ext/atomicity.h>
1440 * include/bits/cow_string.h: Include it here.
1442 2022-05-27 Jonathan Wakely <jwakely@redhat.com>
1444 Backported from master:
1445 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1447 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Make
1448 lookup for ios_errc and future_errc check versioned namespace.
1449 (StdAtomicPrinter): Strip versioned namespace from typename.
1451 2022-05-27 François Dumont <fdumont@gcc.gnu.org>
1453 Backported from master:
1454 2022-05-26 François Dumont <fdumont@gcc.gnu.org>
1456 * python/libstdcxx/v6/printers.py (StdSpanPrinter.__init__):
1457 Strip typename from version namespace.
1459 2022-05-27 Jonathan Wakely <jwakely@redhat.com>
1461 Backported from master:
1462 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1464 * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Strip
1465 versioned namespace from the template argument too.
1467 2022-05-27 Jonathan Wakely <jwakely@redhat.com>
1469 Backported from master:
1470 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1472 * include/bits/stl_iterator.h (counted_iterator::operator++(int)):
1473 Add 'constexpr' as per LWG 3643.
1474 * testsuite/24_iterators/counted_iterator/lwg3643.cc: New test.
1476 2022-05-27 Jonathan Wakely <jwakely@redhat.com>
1478 Backported from master:
1479 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
1481 * include/std/memory_resource (polymorphic_allocator): Add
1482 non-template equality operator, as proposed for LWG 3683.
1483 * testsuite/20_util/polymorphic_allocator/lwg3683.cc: New test.
1485 2022-05-27 Jonathan Wakely <jwakely@redhat.com>
1487 Backported from master:
1488 2022-05-20 Jonathan Wakely <jwakely@redhat.com>
1490 * testsuite/26_numerics/random/bernoulli_distribution/operators/values.cc:
1491 Run fewer iterations for simulator targets.
1492 * testsuite/26_numerics/random/binomial_distribution/operators/values.cc:
1494 * testsuite/26_numerics/random/discrete_distribution/operators/values.cc:
1496 * testsuite/26_numerics/random/geometric_distribution/operators/values.cc:
1498 * testsuite/26_numerics/random/negative_binomial_distribution/operators/values.cc:
1500 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1502 * testsuite/26_numerics/random/uniform_int_distribution/operators/values.cc:
1505 2022-05-27 Jonathan Wakely <jwakely@redhat.com>
1507 Backported from master:
1508 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
1510 * testsuite/20_util/expected/synopsis.cc: Skip for versioned
1512 * testsuite/27_io/headers/iosfwd/synopsis.cc: Likewise.
1514 2022-05-27 Jonathan Wakely <jwakely@redhat.com>
1516 Backported from master:
1517 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1519 * include/bits/mofunc_impl.h: Fix doxygen command.
1521 2022-05-27 Jonathan Wakely <jwakely@redhat.com>
1523 Backported from master:
1524 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1526 * include/std/future (launch): Make operators noexcept.
1528 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
1530 Backported from master:
1531 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
1533 * doc/xml/manual/prerequisites.xml: Fix attributes for external
1535 * doc/html/manual/setup.html: Regenerate.
1537 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
1539 Backported from master:
1540 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
1542 * doc/xml/manual/status_cxx2023.xml: Update with gcc-12 support.
1543 * doc/html/*: Regenerate.
1545 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
1547 Backported from master:
1548 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
1550 * doc/xml/manual/intro.xml: Include new chapter.
1551 * doc/xml/manual/status_cxx2020.xml: Tweak release numbers.
1552 * doc/xml/manual/status_cxx2023.xml: New file.
1553 * doc/html/*: Regenerate.
1555 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
1557 Backported from master:
1558 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
1560 * doc/html/manual/status.html: Regenerate.
1561 * doc/xml/manual/status_cxx2020.xml: Fix supported version for
1562 C++20 bit operations.
1564 2022-05-13 Alexandre Oliva <oliva@adacore.com>
1566 Backported from master:
1567 2022-05-06 Alexandre Oliva <oliva@adacore.com>
1569 * include/experimental/bits/simd.h [__ALTIVEC__]: Require VSX
1570 for double, long long, and 64-bit long intrinsic types.
1571 [__ALTIVEC__] (__intrinsic_type): Mention 128-bit in
1572 preexisting long double diagnostic, adjust no-VSX double
1573 diagnostic to cover 64-bit long double as well.
1575 2022-05-10 Jonathan Wakely <jwakely@redhat.com>
1577 Backported from master:
1578 2022-05-10 Jonathan Wakely <jwakely@redhat.com>
1581 * include/std/iosfwd: Add declarations for <spanstream> class
1582 templates and typedefs.
1583 * include/std/spanstream (basic_spanbuf, basic_ispanstream)
1584 (basic_ospanstream, basic_spanstream): Remove default template
1586 * testsuite/27_io/headers/iosfwd/synopsis.cc: Add <spanstream>
1588 * testsuite/27_io/headers/iosfwd/types.cc: Check <spanstream>
1591 2022-05-10 Jonathan Wakely <jwakely@redhat.com>
1593 Backported from master:
1594 2022-05-10 Jonathan Wakely <jwakely@redhat.com>
1597 * include/std/iosfwd: Add declarations for <synstream> class
1598 templates and typedefs.
1599 * include/std/syncstream (basic_syncbuf, basic_osyncstream):
1600 Remove default template arguments.
1601 * testsuite/27_io/headers/iosfwd/synopsis.cc: New test.
1602 * testsuite/27_io/headers/iosfwd/types.cc: New test.
1604 2022-05-09 Jonathan Wakely <jwakely@redhat.com>
1606 Backported from master:
1607 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
1610 * testsuite/27_io/filesystem/iterators/error_reporting.cc:
1611 Use a trailing char array as storage for dirent::d_name.
1613 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
1615 Backported from master:
1616 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
1619 * include/bits/random.tcc
1620 (operator>>(basic_istream<C,T>&, normal_distribution<R>&)):
1621 Update state when __state_avail is false.
1622 * testsuite/26_numerics/random/normal_distribution/operators/serialize.cc:
1623 Check that deserialized object equals serialized one.
1625 2022-05-06 Patrick Palka <ppalka@redhat.com>
1627 Backported from master:
1628 2022-05-02 Patrick Palka <ppalka@redhat.com>
1631 * src/c++17/floating_from_chars.cc (find_end_of_float): Accept
1632 two delimeters for the exponent part in the form of a possibly
1633 NULL string of length two. Don't use std::tolower.
1634 (pattern): Adjust calls to find_end_of_float accordingly.
1636 2022-05-06 Alexandre Oliva <oliva@adacore.com>
1638 Backported from master:
1639 2022-05-03 Alexandre Oliva <oliva@adacore.com>
1642 * testsuite/20_util/from_chars/pr105324.cc: Guard test body
1643 with conditional for floating-point overloads of from_char.
1645 2022-05-06 Release Manager
1647 * GCC 12.1.0 released.
1649 2022-05-02 Patrick Palka <ppalka@redhat.com>
1651 Backported from master:
1652 2022-05-02 Patrick Palka <ppalka@redhat.com>
1655 * src/c++17/floating_from_chars.cc (__floating_from_chars_hex):
1656 Also accept 'P' as the start of the exponent.
1657 * testsuite/20_util/from_chars/7.cc: Add corresponding testcase.
1659 2022-04-29 Jonathan Wakely <jwakely@redhat.com>
1661 Backported from master:
1662 2022-04-29 Jonathan Wakely <jwakely@redhat.com>
1665 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt:
1667 * src/c++11/compatibility-ldbl-alt128.cc [_GLIBCXX_USE_DUAL_ABI]:
1668 Define __gnu_ieee128::num_get<C>::_M_extract_int[abi:cxx11]<I>
1669 symbols as aliases for corresponding symbols without abi-tag.
1671 2022-04-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1673 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
1674 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
1676 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
1677 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
1680 2022-04-28 Jonathan Wakely <jwakely@redhat.com>
1682 * doc/xml/manual/status_cxx1998.xml: Refer to GCC 12 not
1684 * doc/xml/manual/status_cxx2011.xml: Likewise.
1685 * doc/xml/manual/status_cxx2014.xml: Likewise.
1686 * doc/xml/manual/status_cxx2017.xml: Likewise.
1687 * doc/xml/manual/status_cxx2020.xml: Likewise.
1688 * doc/xml/manual/status_cxxtr1.xml: Likewise.
1689 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
1690 * doc/html/manual/status.html: Regenerate.
1692 2022-04-28 Jonathan Wakely <jwakely@redhat.com>
1695 * src/c++17/fs_ops.cc (fs::copy): Pass error_code to
1696 directory_iterator constructor, and check on each iteration.
1697 * src/filesystem/ops.cc (fs::copy): Likewise.
1698 * testsuite/27_io/filesystem/operations/copy.cc: Check for
1699 errors during recursion.
1700 * testsuite/experimental/filesystem/operations/copy.cc:
1703 2022-04-28 François Dumont <fdumont@gcc.gnu.org>
1705 * config/abi/pre/gnu-versioned-namespace.ver: Remove
1706 std::random_device::* pattern.
1708 2022-04-27 Jakub Jelinek <jakub@redhat.com>
1710 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1711 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1712 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1713 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1714 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1715 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1716 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1717 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1719 2022-04-27 Jonathan Wakely <jwakely@redhat.com>
1721 * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Add
1722 support for atomic<shared_ptr<T>> and atomic<weak_ptr<T>>.
1723 (StdAtomicPrinter): New printer.
1724 (build_libstdcxx_dictionary): Register new printer.
1725 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test std::atomic.
1726 * testsuite/libstdc++-prettyprinters/cxx20.cc: Test atomic smart
1729 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
1731 * include/bits/shared_ptr_atomic.h (atomic<shared_ptr>): Add
1732 constructor for constant initialization from nullptr_t.
1733 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
1734 Check for new constructor.
1736 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
1738 * include/bits/fs_path.h (hash<filesystem::path>): Define.
1739 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
1740 Check std::hash specialization.
1742 2022-04-25 Jonathan Wakely <jwakely@redhat.com>
1744 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define
1746 * include/bits/unique_ptr.h (__cpp_lib_constexpr_memory):
1748 (default_delete, default_delete<T[]>, __uniq_ptr_impl)
1749 (unique_ptr, unique_ptr<T[], D>): Add constexpr to all member
1751 * include/std/version (__cpp_lib_constexpr_memory): Define new
1753 * testsuite/20_util/unique_ptr/assign/constexpr.cc: New test.
1754 * testsuite/20_util/unique_ptr/comparison/constexpr.cc: New test.
1755 * testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc: New test.
1756 * testsuite/20_util/unique_ptr/creation/constexpr.cc: New test.
1757 * testsuite/20_util/unique_ptr/modifiers/constexpr.cc: New test.
1758 * testsuite/20_util/unique_ptr/specialized_algorithms/constexpr.cc:
1761 2022-04-25 Jonathan Wakely <jwakely@redhat.com>
1764 * include/std/future (packaged_task): Add deduction guides.
1765 * testsuite/30_threads/packaged_task/cons/deduction.cc: New test.
1767 2022-04-25 Philipp Fent <fent@in.tum.de>
1769 * python/libstdcxx/v6/printers.py (StdSpanPrinter._iterator):
1771 (StdInitializerListPrinter): Define new printer.
1772 (build_libstdcxx_dictionary): Register new printer.
1773 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check printer for
1776 2022-04-22 Thomas W Rodgers <trodgers@redhat.com>
1779 * include/bits/atomic_base.h (atomic_flag::notify_one,
1780 notify_all): Remove const qualification.
1781 (__atomic_base::notify_one, notify_all): Likewise.
1782 * include/std/atomic (atomic<bool>::notify_one, notify_all):
1784 (atomic::notify_one, notify_all): Likewise.
1785 (atomic<T*>::notify_one, notify_all): Likewise.
1786 (atomic_notify_one, atomic_notify_all): Likewise.
1787 * testsuite/29_atomics/atomic/wait_notify/102994.cc: Adjust test
1788 to account for change in notify_one/notify_all signature.
1790 2022-04-21 Patrick Palka <ppalka@redhat.com>
1792 * include/std/charconv (__from_chars_alnum_to_val_table):
1793 Simplify initialization of __lower/__upper_letters.
1794 (__from_chars_alnum_to_val): Default the template parameter to
1796 * src/c++17/floating_from_chars.cc (starts_with_ci): Don't
1797 assume the uppercase and lowercase letters are contiguous.
1798 (__floating_from_chars_hex): Likewise.
1800 2022-04-21 Patrick Palka <ppalka@redhat.com>
1804 * include/std/charconv (__from_chars_alnum_to_val): Make
1805 initializer for __table dependent in an artificial way.
1807 2022-04-21 Jonathan Wakely <jwakely@redhat.com>
1810 * src/c++17/floating_from_chars.cc (buffer_resource::do_allocate):
1812 * testsuite/20_util/from_chars/pr105324.cc: New test.
1814 2022-04-20 Jonathan Wakely <jwakely@redhat.com>
1816 * testsuite/21_strings/basic_string_view/operations/copy/char/constexpr.cc:
1817 Check correct feature test macro.
1819 2022-04-20 Jonathan Wakely <jwakely@redhat.com>
1822 * doc/xml/manual/prerequisites.xml: Document libiconv
1824 * doc/html/manual/setup.html: Regenerate.
1825 * src/Makefile.am (CXXLINK): Add $(LTLIBICONV).
1826 * src/Makefile.in: Regenerate.
1828 2022-04-19 Patrick Palka <ppalka@redhat.com>
1830 * src/c++17/floating_to_chars.cc (_GLIBCXX_ASSERTIONS): Don't
1832 (__floating_to_chars_shortest): Add __builtin_unreachable calls to
1833 squelch false-positive -Wmaybe-uninitialized and -Wreturn-type
1835 (__floating_to_chars_precision): Likewise.
1837 2022-04-19 Philipp Fent <fent@in.tum.de>
1839 * python/libstdcxx/v6/printers.py (StdSpanPrinter): Define.
1840 * testsuite/libstdc++-prettyprinters/cxx20.cc: Test it.
1842 2022-04-19 Jonathan Wakely <jwakely@redhat.com>
1844 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Fix shell operators.
1845 * configure: Regenerate.
1847 2022-04-18 Patrick Palka <ppalka@redhat.com>
1849 * include/std/charconv (__from_chars_pow2_base): Manually
1850 unroll the first iteration of the main loop and simplify
1853 2022-04-15 Patrick Palka <ppalka@redhat.com>
1856 * include/bits/ranges_algo.h (__minmax_fn): Avoid dereferencing
1857 __first twice at the start.
1858 * testsuite/25_algorithms/minmax/constrained.cc (test06): New test.
1860 2022-04-15 Patrick Palka <ppalka@redhat.com>
1862 * include/std/charconv (__from_chars_alnum_to_val_table): Define.
1863 (__from_chars_alnum_to_val): Define.
1864 (__from_chars_binary): Rename to ...
1865 (__from_chars_pow2_base): ... this. Generalize to handle any
1866 power-of-two base using __from_chars_alnum_to_val.
1867 (__from_chars_digit): Optimize digit recognition to a single
1868 test instead of two tests. Use [[__unlikely___]] attribute.
1869 (__from_chars_alpha_to_num): Remove.
1870 (__from_chars_alnum): Use __from_chars_alnum_to_val. Use a
1871 nested loop for the overflow case. Maintain a lower bound
1872 on the number of available bits in the result and use it to
1873 omit the overflow check.
1874 (from_chars): Adjust appropriately.
1875 * src/c++17/floating_from_chars.cc (ascii_to_hexit): Remove.
1876 (__floating_from_chars_hex): Use __from_chars_alnum_to_val
1877 to recognize a hex digit instead.
1879 2022-04-14 Palmer Dabbelt <palmer@rivosinc.com>
1881 * acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Force auto to mutex
1883 * configure: Regenerate.
1885 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
1887 * doc/xml/manual/intro.xml: Fix comment.
1889 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
1891 * include/precompiled/stdc++.h: Include <stacktrace> and
1892 <stdatomic.h> for C++23.
1894 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
1897 * include/bits/stl_vector.h (__cpp_lib_constexpr_vector):
1899 * include/c_compatibility/stdatomic.h (__cpp_lib_stdatomic_h):
1901 * include/std/optional (__cpp_lib_optional): Define new value
1903 (__cpp_lib_monadic_optional): Remove.
1904 * include/std/version (__cpp_lib_constexpr_vector): Define.
1905 (__cpp_lib_stdatomic_h): Define.
1906 (__cpp_lib_optional): Define new value for C++23.
1907 (__cpp_lib_monadic_optional): Remove.
1908 * testsuite/20_util/optional/monadic/and_then.cc: Adjust.
1909 * testsuite/20_util/optional/requirements.cc: Adjust for C++23.
1910 * testsuite/20_util/optional/version.cc: Likewise.
1911 * testsuite/23_containers/vector/cons/constexpr.cc: Check
1913 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc:
1915 * testsuite/20_util/optional/monadic/version.cc: Removed.
1916 * testsuite/23_containers/vector/requirements/version.cc: New test.
1917 * testsuite/29_atomics/headers/stdatomic.h/version.cc: New test.
1919 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
1921 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Check for mmap.
1922 * config.h.in: Regenerate.
1923 * configure: Regenerate.
1925 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
1927 * include/std/stacktrace (basic_stacktrace::current): Reallocate
1928 a smaller container if the unused capacity is larger than the
1931 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
1933 * include/std/stacktrace (basic_stacktrace): Use _Impl::_M_clone
1934 or _Impl::_M_assign to initialize elements in allocated storage.
1935 (basic_stacktrace::_M_clear()): Use _Impl::_M_resize instead of
1937 (basic_stacktrace::_Impl::_M_destroy()): Replace with ...
1938 (basic_stacktrace::_Impl::_M_resize(size_type, allocator&)): New
1940 (basic_stacktrace::_Impl::_M_push_back): Use _M_xclone. Construct
1941 new element using allocator.
1942 (basic_stacktrace::_Impl::_M_clone): New function.
1943 (basic_stacktrace::_Impl::_M_xclone): New function.
1944 (basic_stacktrace::_Impl::_M_assign): New function.
1946 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
1948 * include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
1949 Use nothrow new instead of try block for std::allocator.
1950 (basic_stacktrace::_Impl::_M_deallocate): Use delete for
1953 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
1955 * include/std/stacktrace (basic_stacktrace::current): Replace
1956 calls to _M_reserve and _S_curr_cb with call to _M_prepare.
1957 Check return value of backtrace_simple when max depth given.
1958 (basic_stacktrace::_M_reserve): Remove.
1959 (basic_stacktrace::_S_curr_cb): Remove.
1960 (basic_stacktrace::_M_prepare(size_type)): New function to
1961 reserve initial capacity and return callback.
1962 (basic_stacktrace::_Impl::_M_allocate): Remove check for 0 < n
1963 and remove redundant zeroing of _M_frames and _M_capacity.
1964 (basic_stacktrace::_Impl::_M_push_back): Add [[unlikely]]
1965 attribute. Assign _Impl instead of swapping.
1966 * testsuite/19_diagnostics/stacktrace/current.cc: New test.
1968 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
1970 * include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
1971 Change [[unlikely]] attribute to [[likely]].
1973 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
1976 * include/std/stacktrace (basic_stacktrace::basic_stacktrace):
1977 Fix allocator usage in constructors.
1978 (basic_stacktrace::operator=(const basic_stacktrace&)): Do not
1979 try to reallocate using const allocator.
1980 (basic_stacktrace::operator=(basic_stacktrace&&)): Fix
1981 if-constexpr with non-constant condition. Do not allocate new
1982 storage if allocator propagates. Do not set _M_size if
1984 (basic_stacktrace::swap(basic_stacktrace&)): Fix typo. Add
1985 assertion that non-propagating allocators are equal.
1986 * testsuite/19_diagnostics/stacktrace/stacktrace.cc: New test.
1988 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
1990 * include/std/stacktrace (basic_stacktrace::current): Duplicate
1991 implementation into each overload. Add noinline attribute and
1993 (basic_stacktrace::max_size()): Call _Impl::_S_max_size.
1994 (basic_stacktrace::_S_curr_cb()): New function defining lambda.
1995 (basic_stacktrace::_Impl::_S_max_size): New function defining
1996 maximum size in terms of allocator and size_type.
1997 (basic_stacktrace::_Impl::_M_allocate): Check against
1999 * testsuite/19_diagnostics/stacktrace/entry.cc: Call function
2000 for non-constexpr checks. Check line number is correct.
2002 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
2004 * testsuite/20_util/stacktrace/entry.cc: Moved to...
2005 * testsuite/19_diagnostics/stacktrace/entry.cc: ...here.
2006 * testsuite/20_util/stacktrace/synopsis.cc: Moved to...
2007 * testsuite/19_diagnostics/stacktrace/synopsis.cc: ...here.
2008 * testsuite/20_util/stacktrace/version.cc: Moved to...
2009 * testsuite/19_diagnostics/stacktrace/version.cc: ...here.
2011 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
2013 * include/experimental/bits/fs_path.h (path): Define special
2014 members after path::_Cmpt is complete.
2016 2022-04-08 Jonathan Wakely <jwakely@redhat.com>
2019 * include/std/expected
2020 (expected<void,E>::expected(expected<U,G>&&)): Fix constraints.
2021 * testsuite/20_util/expected/cons.cc: Check constructor.
2023 2022-04-08 Jonathan Wakely <jwakely@redhat.com>
2026 * include/std/expected (expected<void, E>::swap): Set
2027 _M_has_value to false for objects that previously had a value.
2028 * testsuite/20_util/expected/swap.cc: Fix test to check void
2031 2022-04-08 Jonathan Wakely <jwakely@redhat.com>
2034 * include/std/expected (bad_expected_access): Move constructor
2036 * testsuite/20_util/expected/bad.cc: New test.
2038 2022-04-07 Hans-Peter Nilsson <hp@axis.com>
2040 * testsuite/20_util/expected/requirements.cc: Correct minimal-size
2043 2022-04-02 Jakub Jelinek <jakub@redhat.com>
2046 * include/std/source_location (std::source_location::__impl): Move
2047 definition before using __builtin_ret_type.
2049 2022-04-01 Jonathan Wakely <jwakely@redhat.com>
2051 * include/std/utility (unreachable): Define for C++23.
2052 * include/std/version (__cpp_lib_unreachable): Define.
2053 * src/c++11/debug.cc (__glibcxx_assert_fail): Check for valid
2054 arguments. Handle only the function being given.
2055 * testsuite/20_util/unreachable/1.cc: New test.
2056 * testsuite/20_util/unreachable/version.cc: New test.
2058 2022-04-01 Jonathan Wakely <jwakely@redhat.com>
2060 * include/experimental/bits/fs_fwd.h (copy_file): Remove
2061 incorrect noexcept from declaration.
2062 * include/experimental/bits/fs_path.h (path::begin, path::end):
2063 Add noexcept to declarations, to match definitions.
2065 2022-04-01 Timm Bäder <tbaeder@redhat.com>
2067 * include/bits/fs_ops.h: Fix filename in Doxygen comment.
2068 * include/experimental/bits/fs_ops.h: Likewise.
2070 2022-03-31 Jonathan Wakely <jwakely@redhat.com>
2072 * libsupc++/new_opa.cc (aligned_alloc): Add comment.
2074 2022-03-29 Jonathan Wakely <jwakely@redhat.com>
2076 * testsuite/18_support/exception/38732.cc: Disable for C++23.
2077 * testsuite/18_support/headers/exception/synopsis.cc: Likewise.
2078 * testsuite/18_support/unexpected_handler.cc: Likewise.
2080 2022-03-29 Jonathan Wakely <jwakely@redhat.com>
2082 * libsupc++/compare (_Strong_order) [!__cpp_using_enum]: Add
2083 static data members for _Fp_fmt enumerators.
2085 2022-03-29 Jonathan Wakely <jwakely@redhat.com>
2087 * include/std/version (__cpp_lib_variant): Fix conditions to
2089 (__cpp_lib_expected): Fix condition to match <expected>.
2091 2022-03-28 Jonathan Wakely <jwakely@redhat.com>
2093 * testsuite/20_util/optional/monadic/and_then.cc: Fix typo.
2094 * testsuite/20_util/optional/monadic/transform.cc: Likewise.
2095 * testsuite/22_locale/codecvt/always_noconv/char/1.cc: Likewise.
2096 * testsuite/22_locale/codecvt/encoding/char/1.cc: Likewise.
2097 * testsuite/22_locale/codecvt/in/char/1.cc: Likewise.
2098 * testsuite/22_locale/codecvt/max_length/char/1.cc: Likewise.
2099 * testsuite/22_locale/codecvt/out/char/1.cc: Likewise.
2100 * testsuite/22_locale/codecvt/unshift/char/1.cc: Likewise.
2102 2022-03-27 Jonathan Wakely <jwakely@redhat.com>
2104 * doc/doxygen/user.cfg.in: Add new header.
2105 * include/Makefile.am: Likewise.
2106 * include/Makefile.in: Regenerate.
2107 * include/precompiled/stdc++.h: Add new header.
2108 * include/std/version (__cpp_lib_expected): Define.
2109 * libsupc++/exception [__cplusplus > 202002] (unexpected)
2110 (unexpected_handler, set_unexpected): Do not declare for C++23.
2111 * include/std/expected: New file.
2112 * testsuite/20_util/expected/assign.cc: New test.
2113 * testsuite/20_util/expected/cons.cc: New test.
2114 * testsuite/20_util/expected/illformed_neg.cc: New test.
2115 * testsuite/20_util/expected/observers.cc: New test.
2116 * testsuite/20_util/expected/requirements.cc: New test.
2117 * testsuite/20_util/expected/swap.cc: New test.
2118 * testsuite/20_util/expected/synopsis.cc: New test.
2119 * testsuite/20_util/expected/unexpected.cc: New test.
2120 * testsuite/20_util/expected/version.cc: New test.
2122 2022-03-25 Jonathan Wakely <jwakely@redhat.com>
2124 * include/std/bit (bit_cast, byteswap, endian): Add doxygen
2127 2022-03-23 Jonathan Wakely <jwakely@redhat.com>
2130 * include/std/bit (bit_cast): Add constraints.
2131 * testsuite/26_numerics/bit/bit.cast/105027.cc: New test.
2133 2022-03-23 Jonathan Wakely <jwakely@redhat.com>
2135 * include/std/version [!_GLIBCXX_HOSTED]
2136 (__cpp_lib_hardware_interference_size): Define for freestanding.
2137 (__cpp_lib_bit_cast): Likewise.
2138 (__cpp_lib_is_layout_compatible): Likewise.
2139 (__cpp_lib_is_pointer_interconvertible): Likewise.
2140 (__cpp_lib_adaptor_iterator_pair_constructor): Do not define for
2142 (__cpp_lib_invoke_r): Likewise.
2143 (__cpp_lib_ios_noreplace): Likewise.
2144 (__cpp_lib_monadic_optional): Likewise.
2145 (__cpp_lib_move_only_function): Likewise.
2146 (__cpp_lib_spanstream): Likewise.
2147 (__cpp_lib_stacktrace): Likewise.
2148 (__cpp_lib_string_contains): Likewise.
2149 (__cpp_lib_string_resize_and_overwrite): Likewise.
2150 (__cpp_lib_to_underlying): Likewise.
2152 2022-03-23 Jonathan Wakely <jwakely@redhat.com>
2155 * include/bits/atomic_base.h [!_GLIBCXX_HOSTED]: Do not include
2156 <bits/atomic_wait.h> for freestanding.
2158 2022-03-22 Hans-Peter Nilsson <hp@axis.com>
2160 * testsuite/20_util/from_chars/6.cc (test01) [FE_DOWNWARD]:
2161 Conditionalize call to fesetround.
2163 2022-03-21 Jakub Jelinek <jakub@redhat.com>
2166 * include/bits/locale_facets_nonio.tcc (get): Don't check if do_get
2167 isn't overloaded if __clang__ is defined.
2169 2022-03-18 Jonathan Wakely <jwakely@redhat.com>
2172 * include/std/any (any(T&&)): Revert change to constraints.
2173 * testsuite/20_util/any/cons/104242.cc: New test.
2175 2022-03-18 Jonathan Wakely <jwakely@redhat.com>
2178 * include/pstl/glue_algorithm_defs.h: Replace <functional> with
2180 * include/pstl/utils.h: Replace <iterator> with <type_traits>.
2181 (__pstl::__internal::__except_handler): Use std::__terminate
2182 instead of std::terminate.
2183 * src/c++17/fs_path.cc: Include <array>.
2184 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Include
2186 * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
2187 * testsuite/25_algorithms/clamp/constrained.cc: Likewise.
2188 * testsuite/25_algorithms/equal/constrained.cc: Likewise.
2189 * testsuite/25_algorithms/for_each/constrained.cc: Likewise.
2190 * testsuite/25_algorithms/includes/constrained.cc: Likewise.
2191 * testsuite/25_algorithms/is_heap/constexpr.cc: Likewise.
2192 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Likewise.
2193 * testsuite/25_algorithms/is_permutation/constrained.cc: Include
2195 * testsuite/25_algorithms/is_sorted/constexpr.cc: Include
2197 * testsuite/25_algorithms/is_sorted_until/constexpr.cc:
2199 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
2201 * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
2203 * testsuite/25_algorithms/lexicographical_compare_three_way/1.cc:
2205 * testsuite/25_algorithms/lower_bound/constexpr.cc: Include
2207 * testsuite/25_algorithms/max/constrained.cc: Likewise.
2208 * testsuite/25_algorithms/max_element/constrained.cc: Likewise.
2209 * testsuite/25_algorithms/min/constrained.cc: Likewise.
2210 * testsuite/25_algorithms/min_element/constrained.cc: Likewise.
2211 * testsuite/25_algorithms/minmax_element/constrained.cc:
2213 * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
2214 * testsuite/25_algorithms/move/93872.cc: Likewise.
2215 * testsuite/25_algorithms/move_backward/93872.cc: Include
2217 * testsuite/25_algorithms/nth_element/constexpr.cc: Include
2219 * testsuite/25_algorithms/partial_sort/constexpr.cc: Likewise.
2220 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc:
2222 * testsuite/25_algorithms/search/constexpr.cc: Likewise.
2223 * testsuite/25_algorithms/search_n/constrained.cc: Likewise.
2224 * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
2225 * testsuite/25_algorithms/set_difference/constrained.cc:
2227 * testsuite/25_algorithms/set_intersection/constexpr.cc:
2229 * testsuite/25_algorithms/set_intersection/constrained.cc:
2231 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
2233 * testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
2234 * testsuite/25_algorithms/set_union/constrained.cc: Likewise.
2235 * testsuite/25_algorithms/sort/constexpr.cc: Likewise.
2236 * testsuite/25_algorithms/sort_heap/constexpr.cc: Likewise.
2237 * testsuite/25_algorithms/transform/constrained.cc: Likewise.
2238 * testsuite/25_algorithms/unique/constexpr.cc: Likewise.
2239 * testsuite/25_algorithms/unique/constrained.cc: Likewise.
2240 * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
2241 * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
2242 * testsuite/std/ranges/adaptors/elements.cc: Include <vector>.
2243 * testsuite/std/ranges/adaptors/lazy_split.cc: Likewise.
2244 * testsuite/std/ranges/adaptors/split.cc: Likewise.
2246 2022-03-17 Jonathan Wakely <jwakely@redhat.com>
2249 * include/bits/fs_path.h (path::make_preferred): Use
2250 handwritten loop instead of std::replace.
2252 2022-03-17 Jonathan Wakely <jwakely@redhat.com>
2254 PR middle-end/104966
2255 * include/bits/locale_facets_nonio.tcc
2256 (__moneypunct_cache::_M_cache): Replace try-catch with RAII and
2257 make all string copies before any stores to *this.
2259 2022-03-17 Jonathan Wakely <jwakely@redhat.com>
2261 * testsuite/util/testsuite_character.h: Fix comment.
2263 2022-03-16 Jonathan Wakely <jwakely@redhat.com>
2266 * config/abi/pre/gnu.ver: Make version for std::from_chars
2267 depend on HAVE_USELOCALE macro.
2268 * testsuite/util/testsuite_abi.cc (compare_symbols): Treat
2269 std::from_chars for floating-point types as undesignated if
2270 not found in the baseline symbols file.
2272 2022-03-16 Jonathan Wakely <jwakely@redhat.com>
2274 * include/std/charconv (__cpp_lib_to_chars): Only define when
2275 both from_chars and to_chars are supported for floating-point
2277 (from_chars, to_chars): Adjust preprocessor conditions guarding
2279 * include/std/version (__cpp_lib_to_chars): Adjust condition to
2280 match <charconv> definition.
2281 * src/c++17/floating_from_chars.cc (from_chars_strtod): New
2283 (from_chars): Simplify preprocessor checks and use
2284 from_chars_strtod when appropriate.
2286 2022-03-14 Jonathan Wakely <jwakely@redhat.com>
2289 * src/c++11/codecvt.cc (read_utf8_code_point): Use char32_t to
2290 hold octets that will be left-shifted.
2292 2022-03-10 Jonathan Wakely <jwakely@redhat.com>
2295 * src/c++17/floating_from_chars.cc: Check __SIZE_WIDTH__ >= 32
2296 before using fast_float.
2298 2022-03-10 Detlef Vollmann <dv@vollmann.ch>
2301 * include/bits/this_thread_sleep.h: Fix order of #endif and
2302 closing brace of namespace.
2304 2022-03-10 Jonathan Wakely <jwakely@redhat.com>
2306 * libsupc++/compare (_Strong_order::_S_fp_cmp) [__vax__]:
2309 2022-03-10 Jonathan Wakely <jwakely@redhat.com>
2311 * libsupc++/compare (_Strong_ordering::_S_fp_cmp) [__vax__]: Use
2314 2022-03-09 Patrick Palka <ppalka@redhat.com>
2317 * src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
2318 Be explicit when narrowing the shifted effective_mantissa,
2319 since it may have an integer-class type.
2321 2022-03-08 Jonathan Wakely <jwakely@redhat.com>
2323 * include/bits/uses_allocator_args.h: Remove incorrect copyright
2326 2022-03-07 Jonathan Wakely <jwakely@redhat.com>
2329 * include/bits/c++config (__terminate, __glibcxx_assert_fail):
2330 Replace _GLIBCXX_VISIBILITY on function with visibility pragma.
2331 (__is_constant_evaluated): Add visibility pragma.
2333 2022-03-07 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2335 * config/locale/vxworks/ctype_members.cc: Remove <iostream>
2338 2022-03-05 Jonathan Wakely <jwakely@redhat.com>
2340 * include/bits/c++config (__glibcxx_assert_fail): Add visibility
2342 (__terminate): Likewise.
2344 2022-03-04 Jonathan Wakely <jwakely@redhat.com>
2346 * libsupc++/compare (strong_order::_S_fp_cmp): Move typedef
2347 inside #if condition.
2349 2022-03-03 Jonathan Wakely <jwakely@redhat.com>
2352 * testsuite/std/ranges/adaptors/all.cc: Use non-debug vector for
2355 2022-03-03 Jonathan Wakely <jwakely@redhat.com>
2357 * testsuite/17_intro/names.cc (func): Undef on AIX.
2359 2022-03-03 Jonathan Wakely <jwakely@redhat.com>
2362 * libsupc++/compare (strong_order): Add missing support for
2363 floating-point types.
2364 * testsuite/18_support/comparisons/algorithms/strong_order_floats.cc:
2367 2022-03-01 Jonathan Wakely <jwakely@redhat.com>
2369 PR middle-end/103984
2370 * include/bits/regex_compiler.h (_BracketMatcher::_M_char): Use
2371 default member initializer.
2373 2022-02-24 Jonathan Wakely <jwakely@redhat.com>
2376 * include/std/source_location (source_location::current): Use
2377 deduced type of __builtin_source_location().
2379 2022-02-22 Patrick Palka <ppalka@redhat.com>
2381 * include/bits/ranges_base.h (__detail::__is_initializer_list):
2383 (viewable_range): Adjust as per P2415R2.
2384 * include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value.
2385 * include/std/ranges (owning_view): Define as per P2415R2.
2386 (enable_borrowed_range<owning_view>): Likewise.
2387 (views::__detail::__can_subrange): Replace with ...
2388 (views::__detail::__can_owning_view): ... this.
2389 (views::_All::_S_noexcept): Sync with operator().
2390 (views::_All::operator()): Use owning_view instead of subrange
2392 * include/std/version (__cpp_lib_ranges): Adjust value.
2393 * testsuite/std/ranges/adaptors/all.cc (test06): Adjust now that
2394 views::all uses owning_view instead of subrange.
2396 * testsuite/std/ranges/adaptors/lazy_split.cc (test09): Adjust
2397 now that rvalue non-view non-borrowed ranges are viewable.
2398 * testsuite/std/ranges/adaptors/split.cc (test06): Likewise.
2400 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
2403 * doc/xml/manual/evolution.xml: Document deprecation.
2404 * doc/html/manual/api.html: Regenerate.
2405 * include/bits/stl_bvector.h (insert(const_iterator, const bool&)):
2406 Remove default argument.
2407 (insert(const_iterator)): New overload with deprecated attribute.
2408 * testsuite/23_containers/vector/bool/modifiers/insert/104559.cc:
2411 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
2413 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Replace
2414 code that call cat->name() on std::error_category objects.
2415 Identify known categories by symbol name and use a hardcoded
2416 name. Print error code values as enumerators where appopriate.
2417 * testsuite/libstdc++-prettyprinters/cxx11.cc: Adjust expected
2418 name of custom category. Check io_errc and future_errc errors.
2420 2022-02-15 Jonathan Wakely <jwakely@redhat.com>
2423 * include/bits/uses_allocator_args.h (make_obj_using_allocator)
2424 (uninitialized_construct_using_allocator): Add constexpr.
2425 * testsuite/20_util/uses_allocator/make_obj.cc: Check constexpr.
2426 * testsuite/20_util/uses_allocator/uninitialized_construct.cc: New test.
2428 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
2431 * config/locale/gnu/c_locale.h (__convert_from_v): Use inline
2432 namespace for IEEE128 long double mode.
2433 * config/os/gnu-linux/ldbl-ieee128-extra.ver: Add new symbol
2434 version and export __gnu_cxx_ieee128::__convert_from_v.
2435 * include/bits/locale_facets_nonio.tcc (money_put::__do_put):
2436 Make __ibm128 overload use snprintf directly
2437 * testsuite/util/testsuite_abi.cc: Add new symbol version.
2438 Remove stable IEEE128/LDBL versions.
2440 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
2443 * include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
2445 * include/std/variant: Check feature test macros instead.
2446 * include/std/version: Likewise.
2448 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
2450 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
2453 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
2455 * src/c++17/floating_to_chars.cc (FLOAT128_TO_CHARS): Depend on
2456 LONG_DOUBLE_ALT128_COMPAT instead of USE_FLOAT128.
2458 2022-02-11 Jonathan Wakely <jwakely@redhat.com>
2460 * testsuite/20_util/temporary_buffer.cc: Fix dg-warning target
2463 2022-02-11 Jonathan Wakely <jwakely@redhat.com>
2465 * testsuite/20_util/monotonic_buffer_resource/allocate.cc:
2466 Ignore -Walloc-larger-than warning.
2467 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
2469 * testsuite/29_atomics/atomic/cons/user_pod.cc: Compile with -O1
2470 to avoid linker error for __atomic_is_lock_free.
2472 2022-02-10 Thomas Rodgers <rodgert@appliantology.com>
2474 * include/bits/atomic_wait.h (__waiter_base::_S_do_spin,
2475 __waiter_base::_S_do_spin_v): Change memory order from relaxed
2478 2022-02-10 Jonathan Wakely <jwakely@redhat.com>
2480 * include/c_compatibility/stdatomic.h (atomic_fetch_xor): Add
2482 (atomic_fetch_xor_explicit): Likewise.
2483 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Check
2484 arithmetic and logical operations for atomic_int.
2486 2022-02-10 Jonathan Wakely <jwakely@redhat.com>
2488 * src/filesystem/dir-common.h (_GLIBCXX_HAVE_DIRFD): Undefine
2489 when <dirent.h> is not available.
2490 (_GLIBCXX_HAVE_UNLINKAT): Likewise.
2492 2022-02-09 Thomas Rodgers <rodgert@appliantology.com>
2495 * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): Move spin
2496 loop inside do loop so that threads failing the wait, reload
2499 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
2501 * src/c++17/fs_dir.cc (_Dir(DIR*, const path&)): Change first
2502 parameter to _Dir_base&&.
2503 * src/filesystem/dir-common.h (_Dir_base(DIR*)): Remove.
2504 * src/filesystem/dir.cc (_Dir(DIR*, const path&)): Change first
2505 parameter to _Dir_base&&.
2507 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
2509 * acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Add comment about
2510 checking for CAS on correct word size.
2512 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
2514 * testsuite/experimental/filesystem/operations/create_directories.cc:
2515 Adjust expected results for Windows.
2517 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
2520 * src/c++17/fs_dir.cc (fs::recursive_directory_iterator::__erase):
2521 [i_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Refresh entry._M_type member,
2522 instead of checking for errno values indicating a directory.
2523 * src/c++17/fs_ops.cc (fs::remove_all(const path&)): Use similar
2524 logic to non-throwing overload.
2525 (fs::remove_all(const path&, error_code&)): Add comments.
2526 * src/filesystem/ops-common.h: Likewise.
2528 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
2530 * src/filesystem/dir-common.h (_Dir_base::openat): Change return
2531 type to use portable posix::DIR alias.
2533 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
2535 * include/c_compatibility/stdatomic.h [__clang__]: Use
2536 #include_next <stdatomic.h>.
2538 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
2540 * include/experimental/bits/fs_ops.h (fs::copy_file): Remove
2542 (fs::create_directories): Likewise.
2543 (fs::remove_all): Likewise.
2544 * src/filesystem/ops.cc (fs::copy_file): Remove noexcept.
2545 (fs::create_directories): Likewise.
2546 (fs::remove_all): Likewise.
2548 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
2551 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for dirfd
2553 * config.h.in: Regenerate.
2554 * configure: Regenerate.
2555 * include/bits/fs_dir.h (recursive_directory_iterator): Declare
2556 remove_all overloads as friends.
2557 (recursive_directory_iterator::__erase): Declare new member
2559 * include/bits/fs_fwd.h (remove, remove_all): Declare.
2560 * src/c++17/fs_dir.cc (_Dir): Add filename_only parameter to
2561 constructor. Pass file descriptor argument to base constructor.
2562 (_Dir::dir_and_pathname, _Dir::open_subdir, _Dir::do_unlink)
2563 (_Dir::unlink, _Dir::rmdir): Define new member functions.
2564 (directory_iterator): Pass filename_only argument to _Dir
2566 (recursive_directory_iterator::_Dir_stack): Adjust constructor
2567 parameters to take a _Dir rvalue instead of creating one.
2568 (_Dir_stack::orig): Add data member for storing original path.
2569 (_Dir_stack::report_error): Define new member function.
2570 (__directory_iterator_nofollow): Move here from dir-common.h and
2571 fix value to be a power of two.
2572 (__directory_iterator_filename_only): Define new constant.
2573 (recursive_directory_iterator): Construct _Dir object and move
2574 into _M_dirs stack. Pass skip_permission_denied argument to first
2576 (recursive_directory_iterator::increment): Use _Dir::open_subdir.
2577 (recursive_directory_iterator::__erase): Define new member
2579 * src/c++17/fs_ops.cc (ErrorReporter, do_remove_all): Remove.
2580 (fs::remove_all): Use new recursive_directory_iterator::__erase
2582 * src/filesystem/dir-common.h (_Dir_base): Add int parameter to
2583 constructor and use openat to implement nofollow semantics.
2584 (_Dir_base::fdcwd, _Dir_base::set_close_on_exec, _Dir_base::openat):
2585 Define new member functions.
2586 (__directory_iterator_nofollow): Move to fs_dir.cc.
2587 * src/filesystem/dir.cc (_Dir): Pass file descriptor argument to
2589 (_Dir::dir_and_pathname, _Dir::open_subdir): Define new member
2591 (recursive_directory_iterator::_Dir_stack): Adjust constructor
2592 parameters to take a _Dir rvalue instead of creating one.
2593 (recursive_directory_iterator): Check for new nofollow option.
2594 Construct _Dir object and move into _M_dirs stack. Pass
2595 skip_permission_denied argument to first advance call.
2596 (recursive_directory_iterator::increment): Use _Dir::open_subdir.
2597 * src/filesystem/ops.cc (fs::remove_all): Use C++17 remove_all.
2599 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
2601 * include/bits/allocator.h: Qualify std::allocator_traits in
2602 deprecated warnings.
2603 * libsupc++/exception (uncaught_exception): Add suggestion to
2606 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
2608 * src/c++17/fs_dir.cc (fs::recursive_directory_iterator::pop):
2609 Add [[maybe_unused]] attribute.
2610 * src/filesystem/dir.cc (fs::recursive_directory_iterator::pop):
2613 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
2615 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: Use
2616 custom comparison function for multiset.
2617 * testsuite/23_containers/set/operators/cmp_c++20.cc: Use custom
2618 comparison function for set.
2620 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
2622 * include/bits/boost_concept_check.h (_OutputIteratorConcept):
2623 Change member function to data member of function pointer type.
2625 2022-02-02 Martin Sebor <msebor@redhat.com>
2628 * include/std/array (begin): Declare const member function attribute
2630 (end, rbegin, rend, size, max_size, empty, data): Same.
2631 * testsuite/23_containers/array/capacity/empty.cc: Add test cases.
2632 * testsuite/23_containers/array/capacity/max_size.cc: Same.
2633 * testsuite/23_containers/array/capacity/size.cc: Same.
2634 * testsuite/23_containers/array/iterators/begin_end.cc: New test.
2636 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
2638 * testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
2639 autoconf macro to check whether d_type is present.
2640 * testsuite/experimental/filesystem/iterators/error_reporting.cc:
2643 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
2645 * testsuite/27_io/filesystem/iterators/97731.cc: New test.
2646 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2647 Check follow_directory_symlink option.
2648 * testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc:
2651 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
2653 * src/c++17/fs_dir.cc (recursive_directory_iterator::increment):
2654 Reset state to past-the-end iterator on error.
2655 (fs::recursive_directory_iterator::pop(error_code&)): Likewise.
2656 (fs::recursive_directory_iterator::pop()): Check _M_dirs before
2658 * src/filesystem/dir.cc (recursive_directory_iterator): Likewise,
2659 for the TS implementation.
2660 * testsuite/27_io/filesystem/iterators/error_reporting.cc: New test.
2661 * testsuite/experimental/filesystem/iterators/error_reporting.cc: New test.
2663 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
2665 * include/bits/fs_fwd.h (filesystem::perms): Fix comment.
2667 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
2670 * acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Print different messages
2671 for stdio_pure and stdio_posix options.
2672 * configure: Regenerate.
2674 2022-02-01 Thomas Rodgers <rodgert@appliantology.com>
2676 * include/bits/atomic_wait.h: Change memory order from
2677 Acquire/Release with relaxed loads to SeqCst+Release for
2678 accesses to the waiter's count.
2680 2022-01-31 Martin Liska <mliska@suse.cz>
2682 * acinclude.m4: Detect *_ld_is_mold and use it.
2683 * configure: Regenerate.
2685 2022-01-30 Hans-Peter Nilsson <hp@axis.com>
2687 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: Don't run on
2689 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: Likewise.
2691 2022-01-27 Jonathan Wakely <jwakely@redhat.com>
2694 * include/bits/deque.tcc (_M_range_initialize<ForwardIterator>):
2695 Add __builtin_unreachable to loop.
2696 * testsuite/23_containers/deque/100516.cc: New test.
2698 2022-01-27 Jonathan Wakely <jwakely@redhat.com>
2700 * include/bits/ranges_base.h (ranges::advance): Avoid signed
2701 overflow. Do nothing if already equal to desired result.
2702 * testsuite/24_iterators/range_operations/advance_overflow.cc:
2705 2022-01-27 Martin Liska <mliska@suse.cz>
2708 * acinclude.m4: Fix typo.
2709 * configure: Regenerate.
2711 2022-01-25 Jonathan Wakely <jwakely@redhat.com>
2714 * include/bits/istream.tcc (basic_istream::sentry): Add braces
2716 * include/bits/shared_ptr_base.h (_Sp_counted_array_base::_M_init):
2717 Add pragmas to disable bogus warnings from PR 61596.
2719 2022-01-25 Jonathan Wakely <jwakely@redhat.com>
2722 * src/c++17/fs_ops.cc (_GNU_SOURCE): Define.
2723 * src/filesystem/dir.cc (_GNU_SOURCE): Define.
2724 * src/filesystem/ops.cc (_GNU_SOURCE): Define.
2726 2022-01-25 Jonathan Wakely <jwakely@redhat.com>
2729 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for
2731 * config.h.in: Regenerate.
2732 * configure: Regenerate.
2733 * src/c++17/fs_dir.cc (_Dir): Add nofollow flag to constructor
2734 and pass it to base class constructor.
2735 (directory_iterator): Pass nofollow flag to _Dir constructor.
2736 (fs::recursive_directory_iterator::increment): Likewise.
2737 * src/c++17/fs_ops.cc (do_remove_all): Use nofollow option for
2738 directory_iterator constructor. Move error check outside loop.
2739 * src/filesystem/dir-common.h (_Dir_base): Add nofollow flag to
2740 constructor and when it's set use ::open with O_NOFOLLOW and
2742 * src/filesystem/dir.cc (_Dir): Add nofollow flag to constructor
2743 and pass it to base class constructor.
2744 (directory_iterator): Pass nofollow flag to _Dir constructor.
2745 (fs::recursive_directory_iterator::increment): Likewise.
2746 * src/filesystem/ops.cc (remove_all): Use nofollow option for
2747 directory_iterator constructor. Move error check outside loop.
2749 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
2752 * include/std/spanstream (basic_spanbuf(basic_spanbuf&&)): Use
2753 mem-initializer for _M_buf.
2754 (basic_spanbuf::Operator=(basic_spanbuf&&)): Fix ill-formed
2756 * testsuite/27_io/spanstream/2.cc: New test.
2758 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
2760 * src/c++17/floating_from_chars.cc (USE_STRTOD_FOR_FROM_CHARS):
2761 Define macro for case where std::from_chars is implemented in
2762 terms of strtod, strtof or strtold.
2763 (buffer_resource, valid_fmt, find_end_of_float, pattern)
2764 (from_chars_impl, make_result, reserve_string): Do not define
2765 unless USE_STRTOD_FOR_FROM_CHARS is defined.
2766 (from_chars): Define when at least one of USE_LIB_FAST_FLOAT and
2767 USE_STRTOD_FOR_FROM_CHARS is defined, instead of
2768 _GLIBCXX_HAVE_USELOCALE. Use fast_float for long double when it
2771 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
2774 * include/bits/hashtable_policy.h (_Map_base): Add partial
2775 specialization for maps with const key types.
2776 * testsuite/23_containers/unordered_map/104174.cc: New test.
2778 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
2781 * include/bits/shared_ptr_base.h (_Sp_counted_base<>::_M_release):
2782 Set members to zero without type punning.
2784 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
2786 * testsuite/20_util/shared_ptr/cons/array.cc: Fix comment.
2788 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
2792 * include/bits/alloc_traits.h (__cpp_lib_allocator_traits_is_always_equal):
2793 Define as type long.
2794 * include/bits/allocator.h (__cpp_lib_incomplete_container_elements):
2796 * include/bits/basic_string.h (__cpp_lib_string_udls): Likewise.
2797 * include/bits/chrono.h (__cpp_lib_chrono): Likewise.
2798 (__cpp_lib_chrono_udls): Likewise.
2799 * include/bits/move.h (__cpp_lib_addressof_constexpr): Likewise.
2800 * include/bits/node_handle.h (__cpp_lib_node_extract): Likewise.
2801 * include/bits/range_access.h (__cpp_lib_nonmember_container_access):
2803 * include/bits/shared_ptr.h (__cpp_lib_enable_shared_from_this):
2805 * include/bits/stl_algo.h (__cpp_lib_clamp): Likewise.
2806 (__cpp_lib_sample): Likewise.
2807 * include/bits/stl_algobase.h (__cpp_lib_robust_nonmodifying_seq_ops):
2809 * include/bits/stl_function.h (__cpp_lib_transparent_operators):
2811 * include/bits/stl_iterator.h (__cpp_lib_make_reverse_iterator):
2813 * include/bits/stl_map.h (__cpp_lib_map_try_emplace):
2815 * include/bits/stl_tree.h (__cpp_lib_generic_associative_lookup):
2817 * include/bits/unique_ptr.h (__cpp_lib_make_unique):
2819 * include/bits/unordered_map.h (__cpp_lib_unordered_map_try_emplace):
2821 * include/c_global/cmath (__cpp_lib_hypot): Likewise.
2822 * include/c_global/cstddef (__cpp_lib_byte): Likewise.
2823 * include/std/atomic (__cpp_lib_atomic_is_always_lock_free):
2825 * include/std/complex (__cpp_lib_complex_udls): Likewise.
2826 * include/std/filesystem (__cpp_lib_filesystem): Likewise.
2827 * include/std/functional (__cpp_lib_not_fn): Likewise.
2828 (__cpp_lib_boyer_moore_searcher): Likewise.
2829 * include/std/iomanip (__cpp_lib_quoted_string_io): Likewise.
2830 * include/std/mutex (__cpp_lib_scoped_lock): Likewise.
2831 * include/std/numeric (__cpp_lib_gcd_lcm): Likewise.
2832 (__cpp_lib_gcd, __cpp_lib_lcm): Likewise.
2833 * include/std/tuple (__cpp_lib_apply): Likewise.
2834 (__cpp_lib_make_from_tuple): Likewise.
2835 * include/std/type_traits (__cpp_lib_integral_constant_callable)
2836 (__cpp_lib_bool_constant, __cpp_lib_logical_traits)
2837 (__cpp_lib_is_null_pointer, __cpp_lib_transformation_trait_aliases)
2838 (__cpp_lib_result_of_sfinae, __cpp_lib_void_t)
2839 (__cpp_lib_is_swappable, __cpp_lib_is_invocable)
2840 (__cpp_lib_has_unique_object_representations)
2841 (__cpp_lib_is_aggregate): Likewise.
2842 * include/std/version: Likewise.
2843 * libsupc++/new (__cpp_lib_launder): Likewise.
2845 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
2847 * include/std/version (__cpp_lib_shared_ptr_arrays): Fix
2848 condition for C++17 definition.
2850 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
2852 * include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count):
2854 (_Sp_atomic::_M_ptr): Add default member-initializer.
2855 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
2856 Check constant initialization.
2857 * testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: Likewise.
2859 2022-01-20 Jonathan Wakely <jwakely@redhat.com>
2861 * src/c++11/cxx11-ios_failure.cc (__constinit): Define as
2862 equivalent attribute for Clang.
2863 * src/c++11/future.cc (__constinit): Likewise.
2864 * src/c++11/system_error.cc (__constinit): Likewise.
2865 * src/c++17/memory_resource.cc (__constinit): Likewise.
2867 2022-01-20 Jonathan Wakely <jwakely@redhat.com>
2869 * scripts/testsuite_flags.in: Only add src/filesystem/.libs and
2870 src/libbacktrace/.libs to LDFLAGS if those directories exist.
2872 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
2874 * configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Remove -gdwarf-4
2876 * configure: Regenerate.
2878 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
2881 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Include
2884 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
2886 * scripts/testsuite_flags.in: Add src/libbacktrace/.libs to
2887 linker search paths.
2888 * src/Makefile.am: Fix src/debug/libbacktrace build.
2889 * src/Makefile.in: Regenerate.
2890 * src/libbacktrace/Makefile.am: Use per-library CPPFLAGS
2891 variable. Use symlinks for the source files.
2892 * src/libbacktrace/Makefile.in: Regenerate.
2894 2022-01-19 Matthias Kretz <m.kretz@gsi.de>
2896 * include/experimental/bits/simd.h (__floating_point_flags): Do
2897 not rely on math_errhandling to expand to a constant expression.
2899 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
2901 * doc/xml/manual/evolution.xml: Document deprecations.
2902 * doc/xml/manual/status_cxx2017.xml: Update status.
2903 * doc/html/*: Regenerate.
2905 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
2907 * include/bits/stl_tempbuf.h (get_temporary_buffer): Change
2908 _GLIBCXX14_DEPRECATED to _GLIBCXX17_DEPRECATED.
2910 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
2912 * include/bits/stl_pair.h (_PCC::_DeprConsPair): Remove unused
2915 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
2918 * include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count::lock):
2919 Only use __thread_relax if __cpp_lib_atomic_wait is defined.
2921 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
2924 * include/bits/basic_string.h (basic_string(nullptr_t)): Only
2926 (operator=(nullptr_t)): Likewise.
2927 * include/bits/cow_string.h: Likewise.
2928 * include/std/string_view (basic_string_view(nullptr_t)):
2930 * testsuite/21_strings/basic_string/cons/char/nullptr.cc: Adjust
2931 expected error. Add examples that become ill-formed in C++23.
2932 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
2933 Adjust expected errors.
2934 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
2937 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
2940 * include/bits/stl_iterator.h (reverse_iterator): Check
2941 __cpp_lib_concepts instead of __cplusplus.
2943 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
2946 * include/bits/stl_pair.h (pair): Adjust constraints on
2947 deprecated constructors accepting literal zero as null pointer
2948 constant. Improve wording of deprecated attribute.
2949 * testsuite/20_util/pair/cons/99957.cc: Check that deprecated
2950 constructors do not cause ambiguities for copyable types.
2952 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
2954 * include/bits/stl_function.h (ptr_fun): Fix suggestion for
2955 non-deprecated alternative.
2957 2022-01-18 Tom Honermann <tom@honermann.net>
2959 * acinclude.m4: Define config macros if uchar.h provides
2960 c8rtomb() and mbrtoc8().
2961 * config.h.in: Regenerate.
2962 * configure: Regenerate.
2963 * include/c_compatibility/uchar.h (c8rtomb, mbrtoc8): Define.
2964 * include/c_global/cuchar (c8rtomb, mbrtoc8): Likewise.
2965 * include/c_std/cuchar (c8rtomb, mbrtoc8): Likewise.
2966 * testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc:
2968 * testsuite/21_strings/headers/cuchar/functions_std_fchar8_t.cc:
2971 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
2973 * include/Makefile.am: Install new header.
2974 * include/Makefile.in: Regenerate.
2975 * include/c_compatibility/stdatomic.h: New file.
2976 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: New test.
2978 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
2981 * src/c++17/fast_float/LOCAL_PATCHES: Update.
2982 * src/c++17/fast_float/fast_float.h (FASTFLOAT_IS_BIG_ENDIAN):
2983 Define in terms of __BYTE_ORDER__.
2985 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
2988 * src/c++17/fast_float/LOCAL_PATCHES: UPDATE.
2989 * src/c++17/fast_float/fast_float.h (round): Use explicit
2990 template argument list for std::min.
2992 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
2994 * doc/xml/manual/status_cxx2017.xml: Update C++17 status.
2995 * doc/xml/manual/status_cxx2020.xml: Use 12.1 instead of 12 for
2997 * doc/html/manual/status.html: Regenerate.
2999 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3001 * acinclude.m4 (GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING): Improve
3003 * configure: Regenerate.
3005 2022-01-17 Patrick Palka <ppalka@redhat.com>
3007 * src/c++17/floating_from_chars.cc: (USE_LIB_FAST_FLOAT):
3008 Conditionally define, and use it to conditionally include
3010 (from_chars): Use fast_float for float and double when
3013 2022-01-17 Patrick Palka <ppalka@redhat.com>
3015 * src/c++17/fast_float/LOCAL_PATCHES: Update.
3016 * src/c++17/fast_float/fast_float.h (from_chars_advanced): In
3017 case of over/underflow, return errc::result_out_of_range and don't
3020 2022-01-17 Patrick Palka <ppalka@redhat.com>
3022 * src/c++17/fast_float/LOCAL_PATCHES: Update.
3023 * src/c++17/fast_float/fast_float.h: Apply local modifications.
3025 2022-01-17 Patrick Palka <ppalka@redhat.com>
3027 * src/c++17/fast_float/LOCAL_PATCHES: New file.
3028 * src/c++17/fast_float/MERGE: New file.
3029 * src/c++17/fast_float/README.md: New file, copied from the
3030 fast_float repository.
3031 * src/c++17/fast_float/fast_float.h: New file, an amalgamation
3032 of the fast_float library.
3034 2022-01-17 Patrick Palka <ppalka@redhat.com>
3036 * src/c++17/floating_from_chars.cc: Include <bit>.
3037 (ascii_to_hexit, starts_with_ci): Conditionally define.
3038 (__floating_from_chars_hex): Conditionally define.
3039 (from_chars): Use __floating_from_chars_hex for
3040 chars_format::hex parsing of binary32/64 float/double.
3041 (testsuite/20_util/from_chars/7.cc): New test.
3042 * testsuite/20_util/from_chars/7.cc: New file.
3044 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
3046 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): New macro.
3047 * configure.ac: Use GLIBCXX_ENABLE_BACKTRACE.
3048 * include/Makefile.am: Add new header.
3049 * include/Makefile.in: Regenerate.
3050 * include/std/stacktrace: New header.
3051 * include/std/version (__cpp_lib_stacktrace): Define.
3052 * Makefile.in: Regenerate.
3053 * config.h.in: Regenerate.
3054 * configure: Regenerate.
3055 * doc/Makefile.in: Regenerate.
3056 * libsupc++/Makefile.in: Regenerate.
3057 * po/Makefile.in: Regenerate.
3058 * python/Makefile.in: Regenerate.
3059 * src/Makefile.am: Regenerate.
3060 * src/Makefile.in: Regenerate.
3061 * src/c++11/Makefile.in: Regenerate.
3062 * src/c++17/Makefile.in: Regenerate.
3063 * src/c++20/Makefile.in: Regenerate.
3064 * src/c++98/Makefile.in: Regenerate.
3065 * src/filesystem/Makefile.in: Regenerate.
3066 * testsuite/Makefile.in: Regenerate.
3067 * src/libbacktrace/Makefile.am: New file.
3068 * src/libbacktrace/Makefile.in: New file.
3069 * src/libbacktrace/backtrace-rename.h: New file.
3070 * src/libbacktrace/backtrace-supported.h.in: New file.
3071 * src/libbacktrace/config.h.in: New file.
3072 * testsuite/lib/libstdc++.exp (check_effective_target_stacktrace):
3074 * testsuite/20_util/stacktrace/entry.cc: New test.
3075 * testsuite/20_util/stacktrace/synopsis.cc: New test.
3076 * testsuite/20_util/stacktrace/version.cc: New test.
3078 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
3080 * doc/xml/manual/status_cxx2020.xml: Use final C++20 option
3082 * doc/html/manual/status.html: Regenerate.
3084 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
3087 * include/Makefile.am: Rename LT_OBJDIR and STDC_HEADERS.
3088 * include/Makefile.in: Regenerate.
3089 * testsuite/17_intro/headers/c++1998/103650.cc: New test.
3091 2022-01-17 Matthias Kretz <m.kretz@gsi.de>
3093 * include/experimental/bits/simd.h (__floating_point_flags): Do
3094 not rely on the presence of the math_errhandling macro.
3096 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
3098 * include/bits/shared_ptr_atomic.h (_Sp_atomic): Add typename
3099 to qualified-id for dependent type.
3101 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
3103 * doc/xml/manual/status_cxx2020.xml: Update.
3104 * doc/html/manual/status.html: Regenerate.
3106 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
3107 Thomas Rodgers <trodgers@redhat.com>
3109 * include/bits/shared_ptr_atomic.h (__cpp_lib_atomic_shared_ptr):
3111 (_Sp_atomic): New class template.
3112 (atomic<shared_ptr<T>>, atomic<weak_ptr<T>>): New partial
3114 * include/bits/shared_ptr_base.h (__shared_count, __weak_count)
3115 (__shared_ptr, __weak_ptr): Declare _Sp_atomic as a friend.
3116 * include/std/version (__cpp_lib_atomic_shared_ptr): New macro.
3117 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc: New
3119 * testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: New test.
3121 2022-01-15 Matthias Kretz <m.kretz@gsi.de>
3123 * include/experimental/bits/simd.h: Move feature detection bools
3124 and add __have_avx512bitalg, __have_avx512vbmi2,
3125 __have_avx512vbmi, __have_avx512ifma, __have_avx512cd,
3126 __have_avx512vnni, __have_avx512vpopcntdq.
3127 (__detail::__machine_flags): New function which returns a unique
3128 uint64 depending on relevant -m and -f flags.
3129 (__detail::__odr_helper): New type alias for either an anonymous
3130 type or a type specialized with the __machine_flags number.
3131 (_SimdIntOperators): Change template parameters from _Impl to
3132 _Tp, _Abi because _Impl now has an __odr_helper parameter which
3133 may be _OdrEnforcer from the anonymous namespace, which makes
3134 for a bad base class.
3135 (many): Either add __odr_helper template parameter or mark as
3137 * include/experimental/bits/simd_detail.h: Add defines for
3138 AVX512BITALG, AVX512VBMI2, AVX512VBMI, AVX512IFMA, AVX512CD,
3139 AVX512VNNI, AVX512VPOPCNTDQ, and AVX512VP2INTERSECT.
3140 * include/experimental/bits/simd_builtin.h: Add __odr_helper
3141 template parameter or mark as always_inline.
3142 * include/experimental/bits/simd_fixed_size.h: Ditto.
3143 * include/experimental/bits/simd_math.h: Ditto.
3144 * include/experimental/bits/simd_scalar.h: Ditto.
3145 * include/experimental/bits/simd_neon.h: Add __odr_helper
3147 * include/experimental/bits/simd_ppc.h: Ditto.
3148 * include/experimental/bits/simd_x86.h: Ditto.
3150 2022-01-14 Uroš Bizjak <ubizjak@gmail.com>
3152 * testsuite/22_locale/numpunct/members/char/3.cc:
3153 Require pt_PT locale instead of nl_NL.
3154 (test02): Use pt_PT locale instead of nl_NL.
3156 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
3161 * include/backward/binders.h (bind1st, bind2nd): Add deprecated
3163 * include/bits/refwrap.h (_Maybe_unary_or_binary_function):
3164 Disable deprecated warnings for base classes.
3165 (_Reference_wrapper_base): Likewise.
3166 * include/bits/shared_ptr_base.h (_Sp_owner_less): Likewise.
3167 * include/bits/stl_bvector.h (_Bit_iterator_base): Likewise.
3168 * include/bits/stl_function.h (unary_function, binary_function):
3169 Add deprecated attribute.
3170 (unary_negate, not1, binary_negate, not2, ptr_fun)
3171 (pointer_to_unary_function, pointer_to_binary_function)
3172 (mem_fun_t, const_mem_fun_t, mem_fun_ref_t, const_mem_fun_ref_t)
3173 (mem_fun1_t, const_mem_fun1_t, mem_fun_ref1_t)
3174 (const_mem_fun1_ref_t, mem_fun, mem_fun_ref): Add deprecated
3176 * include/bits/stl_iterator.h: Disable deprecated warnings for
3177 std::iterator base classes.
3178 * include/bits/stl_iterator_base_types.h (iterator): Add
3179 deprecated attribute.
3180 * include/bits/stl_map.h (map::value_compare): Disable
3181 deprecated warnings for base class.
3182 * include/bits/stl_multimap.h (multimap::value_compare):
3184 * include/bits/stl_raw_storage_iter.h (raw_storage_iterator):
3185 Add deprecated attribute.
3186 * include/bits/stl_tempbuf.h (get_temporary_buffer): Likewise.
3187 * include/bits/stream_iterator.h: Disable deprecated warnings.
3188 * include/bits/streambuf_iterator.h: Likewise.
3189 * include/ext/bitmap_allocator.h: Remove unary_function base
3191 * include/ext/functional: Disable deprecated warnings.
3192 * include/ext/rope: Likewise.
3193 * include/ext/throw_allocator.h: Likewise.
3194 * include/std/type_traits (result_of): Add deprecated attribute.
3195 * include/tr1/functional: Disable deprecated warnings.
3196 * include/tr1/functional_hash.h: Likewise.
3197 * testsuite/20_util/function_objects/binders/1.cc: Add
3198 -Wno-disable-deprecations.
3199 * testsuite/20_util/function_objects/binders/3113.cc: Likewise.
3200 * testsuite/20_util/function_objects/constexpr.cc: Add
3202 * testsuite/20_util/raw_storage_iterator/base.cc: Likewise.
3203 * testsuite/20_util/raw_storage_iterator/dr2127.cc: Likewise.
3204 * testsuite/20_util/raw_storage_iterator/requirements/base_classes.cc:
3206 * testsuite/20_util/raw_storage_iterator/requirements/explicit_instantiation/1.cc:
3208 * testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc:
3210 * testsuite/20_util/reference_wrapper/24803.cc:
3212 * testsuite/20_util/reference_wrapper/typedefs.cc: Enable for
3213 C++20 and check for absence of nested types.
3214 * testsuite/20_util/shared_ptr/comparison/less.cc: Remove
3215 std::binary_function base class.
3216 * testsuite/20_util/temporary_buffer.cc: Add dg-warning.
3217 * testsuite/21_strings/basic_string/cons/char/69092.cc: Remove
3218 std::iterator base class.
3219 * testsuite/24_iterators/back_insert_iterator/requirements/base_classes.cc:
3221 * testsuite/24_iterators/front_insert_iterator/requirements/base_classes.cc:
3223 * testsuite/24_iterators/insert_iterator/requirements/base_classes.cc:
3225 * testsuite/24_iterators/istream_iterator/requirements/base_classes.cc:
3227 * testsuite/24_iterators/istreambuf_iterator/92285.cc:
3229 * testsuite/24_iterators/istreambuf_iterator/requirements/base_classes.cc:
3231 * testsuite/24_iterators/ostream_iterator/requirements/base_classes.cc:
3233 * testsuite/24_iterators/ostreambuf_iterator/requirements/base_classes.cc:
3235 * testsuite/24_iterators/reverse_iterator/requirements/base_classes.cc:
3237 * testsuite/25_algorithms/copy/34595.cc:
3239 * testsuite/25_algorithms/minmax/3.cc: Remove std::binary_function
3241 * testsuite/25_algorithms/all_of/requirements/explicit_instantiation/2.cc:
3242 Disable deprecated warnings.
3243 * testsuite/25_algorithms/all_of/requirements/explicit_instantiation/pod.cc:
3245 * testsuite/25_algorithms/any_of/requirements/explicit_instantiation/2.cc:
3247 * testsuite/25_algorithms/any_of/requirements/explicit_instantiation/pod.cc:
3249 * testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/2.cc:
3251 * testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/pod.cc:
3253 * testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc:
3255 * testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc:
3257 * testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc:
3259 * testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc:
3261 * testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc:
3263 * testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc:
3265 * testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc:
3267 * testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc:
3269 * testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/2.cc:
3271 * testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/pod.cc:
3273 * testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc:
3275 * testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc:
3277 * testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/2.cc:
3279 * testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/pod.cc:
3281 * testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/2.cc:
3283 * testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/pod.cc:
3285 * testsuite/25_algorithms/none_of/requirements/explicit_instantiation/2.cc:
3287 * testsuite/25_algorithms/none_of/requirements/explicit_instantiation/pod.cc:
3289 * testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc:
3291 * testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc:
3293 * testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/2.cc:
3295 * testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/pod.cc:
3297 * testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/2.cc:
3299 * testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/pod.cc:
3301 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
3303 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
3305 * testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc:
3307 * testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc:
3309 * testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc:
3311 * testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc:
3313 * testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc:
3315 * testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc:
3317 * testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc:
3319 * testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc:
3321 * testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc:
3323 * testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc:
3325 * testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc:
3327 * testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc:
3329 * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc:
3331 * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc:
3333 * testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc:
3335 * testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc:
3337 * testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc: Add
3339 * testsuite/ext/pb_ds/example/priority_queue_erase_if.cc:
3341 * testsuite/ext/pb_ds/example/priority_queue_split_join.cc:
3343 * testsuite/tr1/3_function_objects/reference_wrapper/typedefs.cc:
3344 Disable deprecated warnings.
3345 * testsuite/tr1/6_containers/hash/requirements/base_classes.cc:
3347 * testsuite/util/regression/trait/erase_if_fn.hpp: Remove
3348 std::unary_function base classes.
3349 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper):
3350 Remove std::iterator base classes.
3352 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
3354 * include/bits/shared_ptr.h (__cpp_lib_shared_ptr_weak_type):
3355 Correct type of macro value.
3356 (shared_ptr): Add additional friend declarations.
3357 (make_shared, allocate_shared): Constrain existing overloads and
3358 remove static_assert.
3359 * include/bits/shared_ptr_base.h (__cpp_lib_smart_ptr_for_overwrite):
3361 (_Sp_counted_ptr_inplace<T, Alloc, Lp>): New partial
3362 specialization for use with make_shared_for_overwrite.
3363 (__cpp_lib_shared_ptr_arrays): Update value for C++20.
3364 (_Sp_counted_array_base): New class template.
3365 (_Sp_counted_array): New class template.
3366 (__shared_count(_Tp*&, const _Sp_counted_array_base&, _Init)):
3367 New constructor for allocating shared arrays.
3368 (__shared_ptr(const _Sp_counted_array_base&, _Init)): Likewise.
3369 * include/std/version (__cpp_lib_shared_ptr_weak_type): Correct
3371 (__cpp_lib_shared_ptr_arrays): Update value for C++20.
3372 (__cpp_lib_smart_ptr_for_overwrite): New macro.
3373 * testsuite/20_util/shared_ptr/creation/99006.cc: Adjust
3375 * testsuite/20_util/shared_ptr/creation/array.cc: New test.
3376 * testsuite/20_util/shared_ptr/creation/overwrite.cc: New test.
3377 * testsuite/20_util/shared_ptr/creation/version.cc: New test.
3378 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: Check
3379 feature test macro. Test non-trivial default-initialization.
3381 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
3383 * include/bits/stl_construct.h (_Construct, _Construct_novalue):
3384 Also cast away cv-qualifiers when converting pointer to void.
3385 * testsuite/20_util/allocator/void.cc: Test construct function
3386 with cv-qualified types.
3388 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
3391 * include/bits/stl_iterator.h (common_iterator): Use
3392 std::construct_at instead of placement new.
3393 * testsuite/24_iterators/common_iterator/1.cc: Check copy
3394 construction is usable in constant expressions.
3396 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
3398 * doc/xml/manual/status_cxx2011.xml: Document new tokens
3399 accepted by std::random_device constructor.
3400 * doc/html/manual/status.html: Regenerate.
3402 2022-01-12 Patrick Palka <ppalka@redhat.com>
3404 * testsuite/20_util/to_chars/103955.cc: Add explicit dg-do
3407 2022-01-12 Patrick Palka <ppalka@redhat.com>
3410 * src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
3411 Track the excess precision separately from the effective
3412 precision. Avoid overflow in bounds check by splitting it into
3414 (__floating_to_chars_precision): Avoid overflow in bounds checks
3416 * testsuite/20_util/to_chars/103955.cc: New test.
3418 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3421 * include/Makefile.am: Install <source_location> for
3423 * include/Makefile.in: Regenerate.
3424 * include/std/version (__cpp_lib_source_location): Define for
3427 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3429 * include/std/ranges (ranges::lazy_split_view::_InnerIter::end()):
3430 Add neoxcept (LWG 3593).
3432 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3434 * include/std/ranges (ranges::__detail::__box): Add constexpr to
3435 assignment operators (LWG 3572).
3436 * testsuite/std/ranges/adaptors/filter.cc: Check assignment of a
3437 view that uses copyable-box.
3439 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3442 * include/Makefile.am: Install <coroutine> for freestanding.
3443 * include/Makefile.in: Regenerate.
3444 * include/std/coroutine: Adjust headers and preprocessor
3446 (__coroutine_traits_impl): Use concepts when available.
3447 [_GLIBCXX_HOSTED] (hash<coroutine_handle>): Define.
3449 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3451 * include/std/ostream (operator<<(basic_ostream&, charT)):
3452 Use unformatted input if no padding is needed.
3453 (operator<<(basic_ostream<char>&, char)): Likewise.
3455 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3458 * include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
3460 * include/std/variant (__cpp_lib_variant): Only define C++20
3461 value when the compiler is known to support conditionally
3462 trivial destructors.
3463 * include/std/version (__cpp_lib_variant): Likewise.
3465 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3467 * include/bits/stl_iterator.h (common_iterator): Add constexpr
3468 to all member functions (LWG 3574).
3469 * testsuite/24_iterators/common_iterator/1.cc: Evaluate some
3470 tests as constant expressions.
3471 * testsuite/24_iterators/common_iterator/2.cc: Likewise.
3473 2022-01-10 Jakub Jelinek <jakub@redhat.com>
3476 * include/bits/locale_facets_nonio.h (__time_get_state): New struct.
3477 (time_get::_M_extract_via_format): Declare new method with
3478 __time_get_state& as an extra argument.
3479 * include/bits/locale_facets_nonio.tcc (_M_extract_via_format): Add
3480 __state argument, set various fields in it while parsing. Handle %j,
3481 %U, %w and %W, fix up handling of %y, %Y and %C, don't adjust tm_hour
3482 for %p immediately. Add a wrapper around the method without the
3483 __state argument for backwards compatibility.
3484 (_M_extract_num): Remove all __len == 4 special cases.
3485 (time_get::do_get_time, time_get::do_get_date, time_get::do_get): Zero
3486 initialize __state, pass it to _M_extract_via_format and finalize it
3488 (do_get_year): For 1-2 digit parsed years, map 0-68 to 2000-2068,
3489 69-99 to 1969-1999. For 3-4 digit parsed years use that as year.
3490 (get): If do_get isn't overloaded from the locale_facets_nonio.tcc
3491 version, don't call do_get but call _M_extract_via_format instead to
3493 * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export _M_extract_via_format
3494 with extra __time_get_state and __time_get_state::_M_finalize_state.
3495 * src/c++98/locale_facets.cc (is_leap, day_of_the_week,
3496 day_of_the_year): New functions in anon namespace.
3497 (mon_yday): New var in anon namespace.
3498 (__time_get_state::_M_finalize_state): Define.
3499 * testsuite/22_locale/time_get/get/char/4.cc: New test.
3500 * testsuite/22_locale/time_get/get/wchar_t/4.cc: New test.
3501 * testsuite/22_locale/time_get/get_year/char/1.cc (test01): Parse 197
3502 as year 197AD instead of error.
3503 * testsuite/22_locale/time_get/get_year/char/5.cc (test01): Parse 1 as
3504 year 2001 instead of error.
3505 * testsuite/22_locale/time_get/get_year/char/6.cc: New test.
3506 * testsuite/22_locale/time_get/get_year/wchar_t/1.cc (test01): Parse
3507 197 as year 197AD instead of error.
3508 * testsuite/22_locale/time_get/get_year/wchar_t/5.cc (test01): Parse
3509 1 as year 2001 instead of error.
3510 * testsuite/22_locale/time_get/get_year/wchar_t/6.cc: New test.
3512 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
3515 * acinclude.m4 (GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS): Do
3516 nothing for freestanding builds.
3517 (GLIBCXX_ENABLE_HOSTED): Define FREESTANDING_FLAGS.
3518 * configure.ac: Do not use AC_LIBTOOL_DLOPEN when configured
3519 with --without-headers. Do not use GCC_HEADER_STDINT for
3520 freestanding builds.
3521 * libsupc++/Makefile.am (HOSTED_CXXFLAGS): Use -ffreestanding
3522 for freestanding builds.
3523 * configure: Regenerate.
3524 * Makefile.in: Regenerate.
3525 * doc/Makefile.in: Regenerate.
3526 * include/Makefile.in: Regenerate.
3527 * libsupc++/Makefile.in: Regenerate.
3528 * po/Makefile.in: Regenerate.
3529 * python/Makefile.in: Regenerate.
3530 * src/Makefile.in: Regenerate.
3531 * src/c++11/Makefile.in: Regenerate.
3532 * src/c++17/Makefile.in: Regenerate.
3533 * src/c++20/Makefile.in: Regenerate.
3534 * src/c++98/Makefile.in: Regenerate.
3535 * src/filesystem/Makefile.in: Regenerate.
3536 * testsuite/Makefile.in: Regenerate.
3538 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
3540 * testsuite/28_regex/algorithms/regex_replace/char/103664.cc:
3541 Add dg-timeout-factor directive.
3542 * testsuite/28_regex/basic_regex/84110.cc: Likewise.
3543 * testsuite/28_regex/basic_regex/ctors/char/other.cc: Likewise.
3544 * testsuite/28_regex/match_results/102667.cc: Likewise.
3546 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
3548 * doc/xml/manual/using.xml: Update documentation around default
3550 * doc/html/*: Regenerate.
3552 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
3555 * src/c++17/Makefile.am (AM_CXXFLAGS): Add -nostdinc++.
3556 * src/c++17/Makefile.in: Regenerate.
3558 2022-01-09 Sandra Loosemore <sandra@codesourcery.com>
3560 * testsuite/18_support/type_info/constexpr.cc: Add explicit
3561 -fdelete-null-pointer-checks option.
3563 2022-01-06 Pavel I. Kryukov <pavel.kryukov@phystech.edu>
3564 Jonathan Wakely <jwakely@redhat.com>
3567 * include/bits/forward_list.tcc (forward_list::merge): Check for
3569 * testsuite/23_containers/forward_list/operations/merge.cc: New test.
3571 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
3573 * include/bits/regex.h (basic_regex, match_results): Qualify
3574 name in friend declaration, to work around Clang bug.
3576 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
3578 * testsuite/ext/rope/pthread7-rope.cc: Add dg-timeout-factor.
3580 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
3583 * include/std/charconv (__from_chars_alpha_to_num): Return
3584 char instead of unsigned char. Change invalid return value to
3585 127 instead of using numeric trait.
3586 (__from_chars_alnum): Fix comment. Do not use std::isdigit.
3587 Change type of variable to char.
3589 2022-01-05 François Dumont <fdumont@gcc.gnu.org>
3592 * include/bits/hashtable_policy.h
3593 (_Hashtable_hash_traits<_Hash>): New.
3594 (_Hash_code_base<>::_M_hash_code(const _Hash_node_value<>&)): New.
3595 (_Hashtable_base<>::_M_key_equals): New.
3596 (_Hashtable_base<>::_M_equals): Use latter.
3597 (_Hashtable_base<>::_M_key_equals_tr): New.
3598 (_Hashtable_base<>::_M_equals_tr): Use latter.
3599 * include/bits/hashtable.h
3600 (_Hashtable<>::__small_size_threshold()): New, use _Hashtable_hash_traits.
3601 (_Hashtable<>::find): Loop through elements to look for key if size is lower
3602 than __small_size_threshold().
3603 (_Hashtable<>::_M_emplace(true_type, _Args&&...)): Likewise.
3604 (_Hashtable<>::_M_insert_unique(_Kt&&, _Args&&, const _NodeGenerator&)): Likewise.
3605 (_Hashtable<>::_M_compute_hash_code(const_iterator, const key_type&)): New.
3606 (_Hashtable<>::_M_emplace(const_iterator, false_type, _Args&&...)): Use latter.
3607 (_Hashtable<>::_M_find_before_node(const key_type&)): New.
3608 (_Hashtable<>::_M_erase(true_type, const key_type&)): Use latter.
3609 (_Hashtable<>::_M_erase(false_type, const key_type&)): Likewise.
3610 * src/c++11/hashtable_c++0x.cc: Include <bits/functional_hash.h>.
3611 * testsuite/util/testsuite_performance.h
3612 (report_performance): Use 9 width to display memory.
3613 * testsuite/performance/23_containers/insert_erase/unordered_small_size.cc:
3614 New performance test case.
3616 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3619 * include/bits/basic_string.h (basic_string(const T&, size_t, size_t)):
3620 Relax constraints on string_view parameter.
3621 * include/bits/cow_string.h (basic_string(const T&, size_t, size_t)):
3623 * testsuite/21_strings/basic_string/cons/char/103919.cc: New test.
3625 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3627 * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export new symbol for
3629 * include/bits/c++config (_GLIBCXX23_CONSTEXPR): Define.
3630 * include/std/version (__cpp_lib_constexpr_typeinfo): Define.
3631 * libsupc++/tinfo.cc: Add #error to ensure non-inline definition
3633 (type_info::__equal): Define alias symbol.
3634 * libsupc++/typeinfo (type_info::before): Combine different
3635 implementations into one.
3636 (type_info::operator==): Likewise. Use address equality for
3637 constant evaluation. Call __equal for targets that require the
3638 definition to be non-inline.
3639 * testsuite/18_support/type_info/constexpr.cc: New test.
3641 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3643 * src/c++11/cxx11-ios_failure.cc (io_error_category): Define
3644 class and virtual functions as 'final'.
3645 (io_category_instance): Use constinit union to make the object
3647 * src/c++11/future.cc (future_error_category): Define class and
3648 virtual functions as 'final'.
3649 (future_category_instance): Use constinit union.
3651 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3653 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Strip
3654 versioned namespace from the type name that is printed.
3656 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3658 * python/libstdcxx/v6/printers.py (StdRegexStatePrinter): New
3659 printer for std::regex NFA states.
3661 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3663 * testsuite/23_containers/forward_list/operations/1.cc: Fill in
3664 placeholders in comments.
3665 * testsuite/23_containers/forward_list/operations/2.cc:
3667 * testsuite/23_containers/forward_list/operations/3.cc:
3669 * testsuite/23_containers/forward_list/operations/4.cc:
3671 * testsuite/23_containers/forward_list/operations/5.cc:
3673 * testsuite/23_containers/forward_list/operations/6.cc:
3675 * testsuite/23_containers/forward_list/operations/7.cc:
3678 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3681 * include/bits/stl_deque.h (operator-): Do not use 0 as null
3684 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3686 * include/bits/alloc_traits.h (allocator_traits<allocator<void>>):
3687 Use std::_Construct for construct.
3689 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3692 * doc/xml/faq.xml: Add '-x c++' to preprocessor command.
3693 * doc/html/faq.html: Regenerate.
3695 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3697 * include/bits/regex.h (__regex_algo_impl): Change __policy and
3698 __match_mode template parameters to be function parameters.
3699 (regex_match, regex_search): Pass policy and match mode as
3701 * include/bits/regex.tcc (__regex_algo_impl): Change template
3702 parameters to function parameters.
3703 * include/bits/regex_compiler.h (_RegexTranslatorBase): Use
3704 'if constexpr' for conditions using template parameters.
3705 (_RegexTranslator): Likewise.
3706 * include/bits/regex_executor.tcc (_Executor::_M_handle_accept):
3708 * testsuite/util/testsuite_regex.h (regex_match_debug)
3709 (regex_search_debug): Move template arguments to function
3712 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3714 * testsuite/util/testsuite_regex.h (regex_match_debug): Compare
3715 results even if the match failed.
3717 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3719 * include/bits/regex_compiler.tcc: Adjust all calls to
3720 __throw_regex_error.
3721 * include/bits/regex_error.h (__throw_regex_error): Add noreturn
3723 * include/bits/regex_scanner.tcc: Likewise.
3724 * src/c++11/regex.cc (desc): New helper function.
3725 (regex_error::regex_error(error_type)): Use desc to get a string
3726 corresponding to the error code.
3729 Copyright (C) 2022 Free Software Foundation, Inc.
3731 Copying and distribution of this file, with or without modification,
3732 are permitted in any medium without royalty provided the copyright
3733 notice and this notice are preserved.