c++: Implement __is_member_function_pointer built-in trait
[official-gcc.git] / libstdc++-v3 / ChangeLog-2022
blob77d709a9ce4d7f824be652d4e97a4d6e4f50c76e
1 2022-12-24  Iain Sandoe  <iain@sandoe.co.uk>
3         * src/c++20/tzdb.cc (remote_version): Look for the tzdata.zi
4         file before falling back to system-specific ones on Darwin and
5         BSD.
7 2022-12-24  Iain Sandoe  <iain@sandoe.co.uk>
9         * testsuite/std/time/tzdb/leap_seconds.cc: Initialize the
10         override_used test var to false.
12 2022-12-23  Eric Botcazou  <ebotcazou@adacore.com>
14         * acinclude.m4 (GLIBCXX_EXPORT_FLAGS): Substitute CPPFLAGS.
15         (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Set ac_has_sched_yield and
16         ac_has_win32_sleep to yes for MinGW.  Change HAVE_WIN32_SLEEP
17         into _GLIBCXX_USE_WIN32_SLEEP.
18         (GLIBCXX_CHECK_GTHREADS): Add _WIN32_THREADS to compilation flags for
19         Win32 threads and force _GTHREAD_USE_MUTEX_TIMEDLOCK to 0 for them.
20         Add -D_WIN32_WINNT=0x0600 to compilation flags if yes was configured
21         and add it to CPPFLAGS on success.
22         * config.h.in: Regenerate.
23         * configure: Likewise.
24         * config/os/mingw32-w64/os_defines.h (_GLIBCXX_USE_GET_NPROCS_WIN32):
25         Define to 1.
26         * config/os/mingw32/os_defines.h (_GLIBCXX_USE_GET_NPROCS_WIN32): Ditto
27         * src/c++11/thread.cc (get_nprocs): Provide Win32 implementation if
28         _GLIBCXX_USE_GET_NPROCS_WIN32 is defined.  Replace HAVE_WIN32_SLEEP
29         with USE_WIN32_SLEEP.
30         * testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc: Add
31         missing conditional compilation.
32         * testsuite/lib/libstdc++.exp (check_v3_target_sleep): Add support for
33         _GLIBCXX_USE_WIN32_SLEEP.
34         (check_v3_target_nprocs): Likewise for _GLIBCXX_USE_GET_NPROCS_WIN32.
36 2022-12-23  Jonathan Wakely  <jwakely@redhat.com>
38         * src/c++20/tzdb.cc [__APPLE__] (zoneinfo_dir_override): Add
39         definition.
41 2022-12-23  Jonathan Wakely  <jwakely@redhat.com>
43         * src/c++20/tzdb.cc: Remove static_assert.
45 2022-12-23  Arsen Arsenović  <arsen@aarsen.me>
46             Jonathan Wakely  <jwakely@redhat.com>
48         PR libstdc++/107792
49         PR libstdc++/107778
50         * src/experimental/contract.cc (handle_contract_violation): Make
51         output more readable.
53 2022-12-22  Jonathan Wakely  <jwakely@redhat.com>
55         PR libstdc++/105730
56         * src/c++11/compatibility-condvar.cc (__nothrow_wait_cv::wait):
57         Access private data member of base class and call its wait
58         member.
60 2022-12-22  Jonathan Wakely  <jwakely@redhat.com>
62         * include/Makefile.am: Add new header.
63         * include/Makefile.in: Regenerate.
64         * include/std/chrono (operator<<): Move to new header.
65         (nonexistent_local_time::_M_make_what_str): Define correctly.
66         (ambiguous_local_time::_M_make_what_str): Likewise.
67         * include/bits/chrono_io.h: New file.
68         * src/c++20/tzdb.cc (operator<<(ostream&, const Rule&)): Use
69         new ostream output for month and weekday types.
70         * testsuite/20_util/duration/io.cc: Test std::format support.
71         * testsuite/std/time/exceptions.cc: Check what() strings.
72         * testsuite/std/time/syn_c++20.cc: Uncomment local_time_format.
73         * testsuite/std/time/time_zone/get_info_local.cc: Enable check
74         for formatted output of local_info objects.
75         * testsuite/std/time/clock/file/io.cc: New test.
76         * testsuite/std/time/clock/gps/io.cc: New test.
77         * testsuite/std/time/clock/system/io.cc: New test.
78         * testsuite/std/time/clock/tai/io.cc: New test.
79         * testsuite/std/time/clock/utc/io.cc: New test.
80         * testsuite/std/time/day/io.cc: New test.
81         * testsuite/std/time/format.cc: New test.
82         * testsuite/std/time/hh_mm_ss/io.cc: New test.
83         * testsuite/std/time/month/io.cc: New test.
84         * testsuite/std/time/weekday/io.cc: New test.
85         * testsuite/std/time/year/io.cc: New test.
86         * testsuite/std/time/year_month_day/io.cc: New test.
88 2022-12-22  Jonathan Wakely  <jwakely@redhat.com>
90         * include/std/format (__format::__write_padded_as_spec): New
91         function.
92         (__format::__formatter_str, __format::__formatter_int::format)
93         (formatter<const void*, charT>): Use it.
95 2022-12-22  Jonathan Wakely  <jwakely@redhat.com>
97         * python/libstdcxx/v6/printers.py (StdChronoDurationPrinter)
98         (StdChronoTimePointPrinter, StdChronoZonedTimePrinter)
99         (StdChronoCalendarPrinter, StdChronoTimeZonePrinter)
100         (StdChronoLeapSecondPrinter, StdChronoTzdbPrinter)
101         (StdChronoTimeZoneRulePrinter): New printers.
103 2022-12-22  Jonathan Wakely  <jwakely@redhat.com>
105         * acinclude.m4 (GLIBCXX_ZONEINFO_DIR): New macro.
106         * config.h.in: Regenerate.
107         * config/abi/pre/gnu.ver: Export new symbols.
108         * configure: Regenerate.
109         * configure.ac (GLIBCXX_ZONEINFO_DIR): Use new macro.
110         * include/std/chrono (utc_clock::from_sys): Correct handling
111         of leap seconds.
112         (nonexistent_local_time::_M_make_what_str): Define.
113         (ambiguous_local_time::_M_make_what_str): Define.
114         (__throw_bad_local_time): Define new function.
115         (time_zone, tzdb_list, tzdb): Implement all members.
116         (remote_version, zoned_time, get_leap_second_info): Define.
117         * include/std/version: Add comment for __cpp_lib_chrono.
118         * src/c++20/Makefile.am: Add new file.
119         * src/c++20/Makefile.in: Regenerate.
120         * src/c++20/tzdb.cc: New file.
121         * testsuite/lib/libstdc++.exp: Define effective target tzdb.
122         * testsuite/std/time/clock/file/members.cc: Check file_time
123         alias and file_clock::now() member.
124         * testsuite/std/time/clock/gps/1.cc: Likewise for gps_clock.
125         * testsuite/std/time/clock/tai/1.cc: Likewise for tai_clock.
126         * testsuite/std/time/syn_c++20.cc: Uncomment everything except
127         parse.
128         * testsuite/std/time/clock/utc/leap_second_info.cc: New test.
129         * testsuite/std/time/exceptions.cc: New test.
130         * testsuite/std/time/time_zone/get_info_local.cc: New test.
131         * testsuite/std/time/time_zone/get_info_sys.cc: New test.
132         * testsuite/std/time/time_zone/requirements.cc: New test.
133         * testsuite/std/time/tzdb/1.cc: New test.
134         * testsuite/std/time/tzdb/leap_seconds.cc: New test.
135         * testsuite/std/time/tzdb_list/1.cc: New test.
136         * testsuite/std/time/tzdb_list/requirements.cc: New test.
137         * testsuite/std/time/zoned_time/1.cc: New test.
138         * testsuite/std/time/zoned_time/custom.cc: New test.
139         * testsuite/std/time/zoned_time/deduction.cc: New test.
140         * testsuite/std/time/zoned_time/req_neg.cc: New test.
141         * testsuite/std/time/zoned_time/requirements.cc: New test.
142         * testsuite/std/time/zoned_traits.cc: New test.
144 2022-12-22  Jonathan Wakely  <jwakely@redhat.com>
146         * include/bits/chrono.h (__is_duration_v, __is_time_point_v):
147         New variable templates.
148         (duration_cast): Add simplified definition for noconv case.
149         (treat_as_floating_point_v): Add explicit specializations.
150         (duration::operator%=, floor, ceil, round): Simplify SFINAE
151         constraints.
153 2022-12-22  Jonathan Wakely  <jwakely@redhat.com>
155         * include/std/chrono: Use nodiscard attribute.
157 2022-12-21  Jakub Jelinek  <jakub@redhat.com>
159         * testsuite/20_util/to_chars/float16_c++23.cc (test): Use 3 argument
160         std::to_chars if fmt is std::chars_format{}, rather than 4 argument.
161         * testsuite/20_util/to_chars/float128_c++23.cc (test): Likewise, and
162         skip second part of testing that requires 5 argument std::to_chars.
164 2022-12-19  Arsen Arsenović  <arsen@aarsen.me>
166         * include/experimental/contract: Lowercase the constants in
167         contract_violation_continuation_mode.
169 2022-12-16  John David Anglin  <danglin@gcc.gnu.org>
171         * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
173 2022-12-16  Jonathan Wakely  <jwakely@redhat.com>
175         * include/std/expected (expected): Add monadic operations.
176         (expected<void, E>): Likewise.
177         * include/std/version (__cpp_lib_expected): Bump value.
178         * testsuite/20_util/expected/synopsis.cc: Adjust expected macro
179         value.
180         * testsuite/20_util/expected/version.cc: Likewise.
181         * testsuite/20_util/expected/illformed_neg.cc: Prune additional
182         errors from ill-formed monadic operations.
183         * testsuite/20_util/expected/observers.cc: Check error_or.
184         * testsuite/20_util/expected/monadic.cc: New test.
186 2022-12-16  Jonathan Wakely  <jwakely@redhat.com>
188         * include/std/expected (expected::_M_swap_val_unex): Guard the
189         correct object.
190         (expected::swap): Move is_swappable
191         requirement from static_assert to constraint.
192         (swap): Likewise.
193         (operator==): Remove noexcept-specifier.
194         * testsuite/20_util/expected/swap.cc: Check swapping of
195         types without non-throwing move constructor. Check constraints
196         on swap.
197         * testsuite/20_util/expected/unexpected.cc: Check constraints on
198         swap.
199         * testsuite/20_util/expected/equality.cc: New test.
201 2022-12-16  Jonathan Wakely  <jwakely@redhat.com>
203         * include/bits/alloc_traits.h (__allocator_traits_base::__rebind):
204         Add static assert for rebind requirement.
205         * testsuite/20_util/allocator_traits/members/rebind_alloc.cc:
206         Fix invalid rebind member in test allocator.
207         * testsuite/20_util/allocator_traits/requirements/rebind_neg.cc:
208         New test.
209         * testsuite/20_util/scoped_allocator/outermost.cc: Add rebind to
210         test allocator.
211         * testsuite/23_containers/forward_list/48101_neg.cc: Prune new
212         static assert error.
213         * testsuite/23_containers/unordered_multiset/48101_neg.cc:
214         Likewise.
215         * testsuite/23_containers/unordered_set/48101_neg.cc:
216         Likewise.
217         * testsuite/23_containers/vector/52591.cc: Fix typo in rebind.
219 2022-12-16  Jonathan Wakely  <jwakely@redhat.com>
221         PR libstdc++/108118
222         * include/bits/shared_ptr_base.h (weak_ptr::operator=):
223         Implement as move-and-swap exactly as specified in the standard.
224         * testsuite/20_util/weak_ptr/cons/self_move.cc: New test.
226 2022-12-15  Jakub Jelinek  <jakub@redhat.com>
228         PR libstdc++/108075
229         * config/abi/pre/gnu.ver (CXXABI_1.3.14): Export
230         _ZTIDF[0-9]*[_bx], _ZTIPDF[0-9]*[_bx] and _ZTIPKDF[0-9]*[_bx].
231         * testsuite/util/testsuite_abi.cc (check_version): Handle
232         CXXABI_1.3.14.
234 2022-12-14  Jonathan Wakely  <jwakely@redhat.com>
236         PR libstdc++/108097
237         * include/std/stacktrace (basic_stracktrace::_Impl): Do not
238         multiply N by sizeof(value_type) when allocating.
240 2022-12-13  Jakub Jelinek  <jakub@redhat.com>
242         * src/libbacktrace/backtrace-rename.h (backtrace_uncompress_zstd):
243         Define.
245 2022-12-12  Jonathan Wakely  <jwakely@redhat.com>
247         * testsuite/20_util/duration/arithmetic/overflow_c++20.cc: New
248         test.
250 2022-12-12  Jonathan Wakely  <jwakely@redhat.com>
252         PR libstdc++/108024
253         * include/std/format (basic_format_string): Fix constraint.
254         * testsuite/std/format/format_string.cc: New test.
256 2022-12-12  Jonathan Wakely  <jwakely@redhat.com>
258         * include/std/chrono (hh_mm_ss): Rename __is_unsigned member to
259         _S_is_unsigned.
260         * include/std/format (basic_format_context): Rename _Out_
261         template parameter to _Out2.
262         * testsuite/17_intro/names.cc: Add Windows SAL annotation
263         macros.
265 2022-12-12  Jonathan Wakely  <jwakely@redhat.com>
267         PR libstdc++/98034
268         * include/std/atomic (__cpp_lib_atomic_lock_free_type_aliases):
269         Define macro.
270         (atomic_signed_lock_free, atomic_unsigned_lock_free): Define
271         aliases.
272         * include/std/version (__cpp_lib_atomic_lock_free_type_aliases):
273         Define macro.
274         * testsuite/29_atomics/atomic/lock_free_aliases.cc: New test.
276 2022-12-12  Jonathan Wakely  <jwakely@redhat.com>
278         * include/std/stacktrace (operator<<): Only output to narrow
279         ostreams (LWG 3515).
280         * testsuite/19_diagnostics/stacktrace/synopsis.cc:
282 2022-12-09  Jonathan Wakely  <jwakely@redhat.com>
284         PR libstdc++/108015
285         * include/std/chrono (hh_mm_ss): Remove digit separators.
287 2022-12-09  Jonathan Wakely  <jwakely@redhat.com>
289         * include/ext/pb_ds/detail/type_utils.hpp (PB_DS_STATIC_ASSERT):
290         Add unused attribute to avoid -Wunused-local-typedef warnings.
291         * testsuite/17_intro/tag_type_explicit_ctor.cc: Add pragma to
292         ignore -Wunused-variable warnings
294 2022-12-09  Jonathan Wakely  <jwakely@redhat.com>
296         * include/bits/chrono.h (duration_cast, floor, round, abs, ceil)
297         (time_point_cast): Add [[nodiscard]] attribute and doxygen
298         comments.
299         (treat_as_floating_point): Add doxygen commen.
301 2022-12-09  Jonathan Wakely  <jwakely@redhat.com>
303         * include/bits/chrono.h (duration, time_point): Change 'struct'
304         to 'class'.
306 2022-12-07  Jonathan Wakely  <jwakely@redhat.com>
307             François Dumont  <frs.dumont@gmail.com>
309         * include/debug/formatter.h [_GLIBCXX_DEBUG_BACKTRACE]
310         (_Error_formatter::_Error_formatter): Pass error handler to
311         __glibcxx_backtrace_create_state. Pass 1 for threaded argument.
312         (_Error_formatter::_S_err): Define empty function.
313         * src/c++11/debug.cc (_Error_formatter::_M_error): Pass error
314         handler to __glibcxx_backtrace_full.
316 2022-12-06  Jonathan Wakely  <jwakely@redhat.com>
318         PR libstdc++/107979
319         * testsuite/17_intro/names.cc: Do not check __unused on old
320         Glibc versions.
322 2022-12-06  Jonathan Wakely  <jwakely@redhat.com>
324         PR libstdc++/107871
325         * include/std/format (_Iter_sink::_M_overflow): Add cast to
326         size_t.
327         (_Iter_sink<CharT, contiguous_iterator auto>::_M_make_span): Use
328         typedef instead of decltype.
329         * testsuite/std/format/functions/107871.cc: New test.
331 2022-12-06  Jonathan Wakely  <jwakely@redhat.com>
333         * include/std/chrono (chrono::hh_mm_ss): Do not use 64-bit
334         representations for all four duration members. Reorder members.
335         (hh_mm_ss::hh_mm_ss()): Define as defaulted.
336         (hh_mm_ss::hh_mm_ss(Duration)): Delegate to a new private
337         constructor, instead of calling chrono::abs repeatedly.
338         * testsuite/std/time/hh_mm_ss/1.cc: Check floating-point
339         representations. Check default constructor. Check sizes.
341 2022-12-06  Jonathan Wakely  <jwakely@redhat.com>
343         PR c++/106434
344         * include/bits/vector.tcc (insert(const_iterator, const T&)):
345         Add assertion and optimization hint that the iterator for the
346         insertion point must be non-null.
348 2022-12-06  Jonathan Wakely  <jwakely@redhat.com>
350         * include/bits/std_mutex.h (mutex): Add nodiscard attribute to
351         try_lock member function.
352         * include/bits/unique_lock.h (unique_lock): Likewise for
353         try_lock, try_lock_until, try_lock_for member functions, and
354         owns_lock and mutex member functions.
355         * include/std/mutex (recursive_mutex): Likewise for try_lock
356         member function.
357         (timed_mutex, recursive_timed_mutex, try_lock): Likewise for
358         try_lock, try_lock_until, try_lock_for member functions.
359         (try_lock): Likewise for non-member function.
360         * include/std/shared_mutex (shared_mutex): Likewise for try_lock
361         and try_lock_shared member functions.
362         (shared_timed_mutex): Likewise for try_lock, try_lock_for,
363         try_lock_shared, try_lock_shared_for, try_lock_until, and
364         try_lock_shared_until member functions.
365         (shared_lock): Likewise for try_lock, try_lock, try_lock_for,
366         try_lock_until, owns_lock, and mutex member functions.
367         * testsuite/30_threads/recursive_timed_mutex/try_lock_until/clock_neg.cc:
368         Cast discarded value expression to void.
369         * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
370         * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
371         * testsuite/30_threads/shared_lock/locking/clock_neg.cc:
372         Likewise.
373         * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
374         Likewise.
375         * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc:
376         Likewise.
377         * testsuite/30_threads/try_lock/4.cc: Likewise.
378         * testsuite/30_threads/unique_lock/cons/60497.cc: Likewise.
379         * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
380         * testsuite/30_threads/unique_lock/locking/clock_neg.cc:
381         Likewise.
383 2022-12-06  Jonathan Wakely  <jwakely@redhat.com>
385         * include/std/format (basic_format_parse_context::next_arg_id):
386         Only check arg-id is in range during constant evaluation.
387         * testsuite/std/format/functions/format.cc: Check "{:#Lx}".
388         * testsuite/std/format/parse_ctx.cc: Adjust expected results for
389         format-strings using an out-of-range arg-id.
391 2022-12-04  Iain Sandoe  <iain@sandoe.co.uk>
393         * config/os/bsd/darwin/os_defines.h
394         (_GTHREAD_USE_RECURSIVE_MUTEX_INIT_FUNC): Limit use of this macro
395         to OS versions that need it.
397 2022-12-04  Iain Sandoe  <iain@sandoe.co.uk>
399         * config/os/bsd/darwin/os_defines.h (_GLIBCXX_WEAK_DEFINITION): Use the
400         implementation namespace for the weak attribute.
402 2022-12-02  Björn Schäpers  <bjoern@hazardy.de>
403             Jonathan Wakely  <jwakely@redhat.com>
405         * include/std/stacktrace (stacktrace_entry::_S_err_handler): New
406         static function.
407         (stacktrace_entry, basic_stacktrace): Pass &_S_err_handler to
408         all calls to libbacktrace.
410 2022-11-29  Jonathan Wakely  <jwakely@redhat.com>
412         PR libstdc++/107852
413         PR libstdc++/106199
414         PR libstdc++/100366
415         * include/bits/vector.tcc (vector::_M_fill_insert): Copy
416         _M_start and _M_finish members before allocating.
417         (vector::_M_default_append): Likewise.
418         (vector::_M_range_insert): Likewise.
420 2022-11-29  Jonathan Wakely  <jwakely@redhat.com>
422         * include/bits/stl_iterator_base_types.h (__iterator_category):
423         Add always_inline attribute.
424         * include/bits/stl_vector.h (assign(Iter, Iter)): Call
425         _M_assign_aux directly, instead of _M_assign_dispatch.
426         (insert(const_iterator, Iter, Iter)): Call _M_range_insert
427         directly instead of _M_insert_dispatch.
429 2022-11-29  Jonathan Wakely  <jwakely@redhat.com>
431         * include/std/format: Rename all variables called __used or
432         __packed.
433         * testsuite/17_intro/badnames.cc: Add no_pch options.
434         * testsuite/17_intro/names.cc: Check __packed, __unused and
435         __used.
437 2022-11-28  François Dumont  <fdumont@gcc.gnu.org>
439         * testsuite/20_util/function/cons/70692.cc: Adapt dg-error message.
441 2022-11-28  Jonathan Wakely  <jwakely@redhat.com>
443         PR libstdc++/107801
444         * src/c++17/memory_resource.cc (chunk::_M_bytes): Change type
445         from uint32_t to bitset::size_type. Adjust static assertion.
446         (__pool_resource::_Pool::replenish): Cast to size_t after
447         multiplication instead of before.
448         (__pool_resource::_M_alloc_pools): Ensure both arguments to
449         std::max have type size_t.
451 2022-11-28  Jonathan Wakely  <jwakely@redhat.com>
453         * include/std/string_view (basic_string_view::copy) Use explicit
454         template argument for call to std::min<size_t>.
455         (basic_string_view::substr): Likewise.
457 2022-11-28  Jonathan Wakely  <jwakely@redhat.com>
459         PR libstdc++/107885
460         * libsupc++/hash_bytes.cc (_Hash_bytes): Convert to size_t
461         instead of implicit integer promotion to 16 bits.
463 2022-11-28  Jonathan Wakely  <jwakely@redhat.com>
465         * testsuite/26_numerics/random/subtract_with_carry_engine/cons/lwg3809.cc:
466         Replace non-ASCII character.
468 2022-11-28  Jonathan Wakely  <jwakely@redhat.com>
470         * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc:
471         Simplify dg-prune-output pattern.
472         * testsuite/lib/prune.exp (libstdc++-dg-prune): Prune "::__8".
474 2022-11-28  Jonathan Wakely  <jwakely@redhat.com>
476         PR libstdc++/107466
477         * include/bits/random.h (subtract_with_carry_engine): Use 32-bit
478         type for default seed. Use 0u as default argument for
479         subtract_with_carry_engine(result_type) constructor and
480         seed(result_type) member function.
481         * include/bits/random.tcc (subtract_with_carry_engine): Use
482         32-bit type for default seed and engine used for initial state.
483         * testsuite/26_numerics/random/subtract_with_carry_engine/cons/lwg3809.cc:
484         New test.
486 2022-11-25  Jonathan Wakely  <jwakely@redhat.com>
488         * acinclude.m4 (GLIBCXX_CHECK_UCHAR_H): Don't use AC_MSG_RESULT
489         unless the AC_MSG_CHECKING happened.
490         * configure: Regenerate.
492 2022-11-25  Jonathan Wakely  <jwakely@redhat.com>
494         PR libstdc++/107850
495         * include/bits/erase_if.h (__erase_nodes_if): Use non-const
496         reference to the container.
497         * include/experimental/map (erase_if): Likewise.
498         * include/experimental/set (erase_if): Likewise.
499         * include/experimental/unordered_map (erase_if): Likewise.
500         * include/experimental/unordered_set (erase_if): Likewise.
501         * include/std/map (erase_if): Likewise.
502         * include/std/set (erase_if): Likewise.
503         * include/std/unordered_map (erase_if): Likewise.
504         * include/std/unordered_set (erase_if): Likewise.
505         * testsuite/23_containers/map/erasure.cc: Check with
506         const-incorrect predicate.
507         * testsuite/23_containers/set/erasure.cc: Likewise.
508         * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
509         * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
510         * testsuite/experimental/map/erasure.cc: Likewise.
511         * testsuite/experimental/set/erasure.cc: Likewise.
512         * testsuite/experimental/unordered_map/erasure.cc: Likewise.
513         * testsuite/experimental/unordered_set/erasure.cc: Likewise.
515 2022-11-25  Jonathan Wakely  <jwakely@redhat.com>
517         * include/bits/random.h [three_way_comparison] (operator!=):
518         Do not define inequality operators when C++20 three way
519         comparisons are supported.
520         * include/ext/random [three_way_comparison] (operator!=):
521         Likewise.
523 2022-11-25  Jonathan Wakely  <jwakely@redhat.com>
525         * include/bits/stl_iterator_base_funcs.h (__distance):
526         Add always_inline attribute to overload for random
527         access iterators.
528         (advance, distance, next, prev): Add always_inline attribute to
529         inline functions that just forward to another function.
531 2022-11-25  Jonathan Wakely  <jwakely@redhat.com>
533         * doc/html/manual/bugs.html: Regenerate.
534         * doc/xml/manual/intro.xml: Document LWG 3656 change.
535         * include/std/bit (__bit_width, bit_width): Return int.
536         * testsuite/26_numerics/bit/bit.pow.two/lwg3656.cc: New test.
538 2022-11-24  Jonathan Wakely  <jwakely@redhat.com>
540         PR libstdc++/106201
541         * testsuite/27_io/filesystem/iterators/106201.cc: Improve test.
542         * testsuite/experimental/filesystem/iterators/106201.cc: New test.
544 2022-11-24  Jakub Jelinek  <jakub@redhat.com>
546         PR libstdc++/107468
547         * src/c++17/fast_float/MERGE: Adjust for merge from upstream.
548         * src/c++17/fast_float/fast_float.h: Merge from fast_float
549         2ef9abbcf6a11958b6fa685a89d0150022e82e78 commit.
551 2022-11-24  Jakub Jelinek  <jakub@redhat.com>
553         PR libstdc++/107815
554         * testsuite/20_util/to_chars/float128_c++23.cc (test): Disable
555         __FLT128_MAX__ test on Solaris.  Fix up commented out debugging
556         printouts.
558 2022-11-23  Jakub Jelinek  <jakub@redhat.com>
560         PR libstdc++/107811
561         * src/c++17/floating_from_chars.cc (__floating_from_chars_hex): Guard
562         fast_float uses with #if USE_LIB_FAST_FLOAT and for mantissa_bits and
563         exponent_bits provide a fallback.
565 2022-11-23  Jonathan Wakely  <jwakely@redhat.com>
567         PR libstdc++/107814
568         * testsuite/experimental/filesystem/iterators/error_reporting.cc:
569         Use a static buffer with space after it.
571 2022-11-22  Jonathan Wakely  <jwakely@redhat.com>
573         PR libstdc++/107817
574         * include/std/charconv (__from_chars_alnum_to_val): Add
575         constexpr for C++20.
576         * include/std/format (__is_digit, __is_xdigit): New functions.
577         (_Spec::_S_parse_width_or_precision): Use __is_digit.
578         (__formatter_fp::parse): Use __is_xdigit.
580 2022-11-22  Jonathan Wakely  <jwakely@redhat.com>
582         PR libstdc++/106201
583         * testsuite/27_io/filesystem/iterators/106201.cc: New test.
585 2022-11-22  Jonathan Wakely  <jwakely@redhat.com>
587         PR libstdc++/107801
588         * src/c++17/memory_resource.cc (pool_sizes): Disable large pools
589         for targets with 16-bit int.
591 2022-11-21  Jonathan Wakely  <jwakely@redhat.com>
593         * include/std/functional (_Bind_front0): New class template.
594         (_Bind_front_t): Use _Bind_front0 when there are no bound
595         arguments.
596         * testsuite/20_util/function_objects/bind_front/107784.cc:
597         New test.
599 2022-11-21  Jonathan Wakely  <jwakely@redhat.com>
601         * include/bits/chrono.h (duration): Check preconditions on
602         template arguments before using them.
604 2022-11-21  Jonathan Wakely  <jwakely@redhat.com>
606         * include/std/tuple: Add better Doxygen comments.
608 2022-11-21  Martin Liska  <mliska@suse.cz>
610         * src/experimental/Makefile.in: Re-configure.
612 2022-11-20  François Dumont  <fdumont@gcc.gnu.org>
614         * include/std/format: Add std qualification on isxdigit calls.
616 2022-11-19  Jonathan Wakely  <jwakely@redhat.com>
618         * include/bits/range_access.h: Add always_inline attribute to
619         trivial functions.
621 2022-11-19  Jonathan Wakely  <jwakely@redhat.com>
623         * include/std/format: Fix -Wsign-compare warnings.
625 2022-11-19  Jonathan Wakely  <jwakely@redhat.com>
627         * include/bits/ptr_traits.h (pointer_traits::pointer_to): Rename
628         parameter.
630 2022-11-19  Jonathan Wakely  <jwakely@redhat.com>
632         PR libstdc++/107649
633         * include/std/complex (__complex_proj): Fix requires-clause.
635 2022-11-19  Jeff Chapman II  <jchapman@lock3software.com>
636             Andrew Marmaduke  <amarmaduke@lock3software.com>
637             Jason Merrill   <jason@redhat.com>
639         * acinclude.m4 (glibcxx_SUBDIRS): Add src/experimental.
640         * include/Makefile.am (experimental_headers): Add contract.
641         * include/Makefile.in: Regenerate.
642         * src/Makefile.am (SUBDIRS): Add experimental.
643         * src/Makefile.in: Regenerate.
644         * configure: Regenerate.
645         * src/experimental/contract.cc: New file.
646         * src/experimental/Makefile.am: New file.
647         * src/experimental/Makefile.in: New file.
648         * include/experimental/contract: New file.
650 2022-11-17  Jonathan Wakely  <jwakely@redhat.com>
652         PR libstdc++/107720
653         * include/std/format [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT]:
654         Declare overloads of std::to_chars for the alternative long
655         double type.
657 2022-11-16  Jonathan Wakely  <jwakely@redhat.com>
659         PR libstdc++/107720
660         * include/std/format (__format::_Arg_t): Fix typo in enumerator
661         name.
662         (_Arg_value::_S_get): Fix missing semi-colons.
664 2022-11-16  Jonathan Wakely  <jwakely@redhat.com>
666         * include/std/chrono (get_leap_second_info): Optimize.
668 2022-11-16  Jonathan Wakely  <jwakely@redhat.com>
670         PR libstdc++/107712
671         * include/std/format (__format::__formatter_int::format): Use
672         std::toupper when __builtin_toupper isn't available.
673         (basic_format_arg::handle): Add 'typename'.
674         * include/std/complex (complex<T>): Add 'typename'.
676 2022-11-16  Jonathan Wakely  <jwakely@redhat.com>
678         * include/std/format [__FLT128_DIG__] (_GLIBCXX_FORMAT_F128):
679         Only support formatting _Float128 when glibc provides the
680         functionality needed for accurate std::to_chars.
682 2022-11-16  Jonathan Wakely  <jwakely@redhat.com>
684         * testsuite/std/time/clock/utc/1.cc: Check handling across leap
685         second insertion.
687 2022-11-16  Patrick Palka  <ppalka@redhat.com>
689         PR libstdc++/107701
690         * include/std/iostream (__ioinit): Adjust comment.
691         * src/c++98/globals_io.cc: Include "io_base_init.h" here
692         instead of ...
693         * src/c++98/ios_init.cc: ... here.
694         * src/c++98/ios_base_init.h (__ioinit): More comments.
695         * testsuite/17_intro/static.cc: dg-do run instead of just link.
697 2022-11-16  Jakub Jelinek  <jakub@redhat.com>
698             Jonathan Wakely  <jwakely@redhat.com>
700         PR libstdc++/107649
701         * include/std/complex (__complex_abs, __complex_arg, __complex_cos,
702         __complex_cosh, __complex_exp, __complex_log, __complex_sin,
703         __complex_sinh, __complex_sqrt, __complex_tan, __complex_tanh,
704         __complex_pow): Move __complex__ _Float{16,32,64,128} and
705         __complex__ decltype(0.0bf16) overloads earlier in the file.
706         (complex): Fix up requires on the partial specialization for extended
707         float types.
708         (__complex_acos, __complex_asin, __complex_atan, __complex_acosh,
709         __complex_asinh, __complex_atanh): Move
710         __complex__ _Float{16,32,64,128} and __complex__ decltype(0.0bf16)
711         overloads earlier in the file.
713 2022-11-16  Jonathan Wakely  <jwakely@redhat.com>
715         * python/libstdcxx/v6/printers.py (StdExpAnyPrinter): Make
716         expansion of std::string in manager name more robust.
718 2022-11-16  Jonathan Wakely  <jwakely@redhat.com>
720         * python/libstdcxx/v6/printers.py (is_specialization_of): Fix
721         incorrect terminology in docstring and describe arguments.
722         (FilteringTypePrinter): Add default argument for new parameter,
723         enhance docstring.
725 2022-11-16  François Dumont  <fdumont@gcc.gnu.org>
727         * python/libstdcxx/v6/printers.py (FilteringTypePrinter): Rename 'match' field
728         'template'. Add self.targ1 to specify the first template parameter of the instantiation
729         to match.
730         (add_one_type_printer): Add targ1 optional parameter, default to None.
731         Use gdb.types.get_basic_type to compare the type to recognize and the type
732         returned from the typedef lookup.
733         (register_type_printers): Adapt calls to add_one_type_printers.
735 2022-11-15  Jonathan Wakely  <jwakely@redhat.com>
737         * testsuite/std/format/functions/format.cc: Do not use
738         std::make_unsigned_t<__int128>.
740 2022-11-15  Jonathan Wakely  <jwakely@redhat.com>
742         * include/std/format (formattable): Only define for C++23/
743         * testsuite/std/format/formatter.cc: Moved to...
744         * testsuite/std/format/formatter/requirements.cc: ...here.
745         * testsuite/std/format/formatter/concept.cc: New test.
746         * testsuite/std/format/functions/format.cc: Replace use of
747         std::formattable in C++20.
749 2022-11-15  Jonathan Wakely  <jwakely@redhat.com>
751         PR libstdc++/107693
752         * include/std/format (_GLIBCXX_FORMAT_F128): Define to 2 when
753         basic_format_arg needs to use its _M_f128 member.
754         (__extended_floating_point, __floating_point): Replace with ...
755         (__formattable_floating_point): New concept.
756         * testsuite/std/format/functions/format.cc: Check whether
757         __float128 is supported. Also test _Float128.
759 2022-11-15  Jonathan Wakely  <jwakely@redhat.com>
761         * doc/xml/manual/documentation_hacking.xml: Document use of
762         Markdown for Doxygen comments. Tweak formatting.
763         * doc/html/manual/documentation_hacking.html: Regenerate.
765 2022-11-14  Jonathan Wakely  <jwakely@redhat.com>
767         * python/Makefile.am (install-data-local): Use mkdirs_p for debug
768         libdir.
769         * python/Makefile.in: Regenerate.
771 2022-11-14  Bernhard Reutner-Fischer  <rep.dot.nop@gmail.com>
773         * src/Makefile.am (install-debug): Remove use of $(debugdir).
774         * src/Makefile.in: Regenerate.
776 2022-11-13  Jonathan Wakely  <jwakely@redhat.com>
778         * include/std/chrono (utc_clock, tai_clock, gps_clock): Define.
779         (clock_time_conversion, clock_cast): Define.
780         (sys_info, local_info): Define structs for timezone information.
781         (nonexistent_local_time, ambiguous_local_time): Define
782         exceptions for invalid times.
783         (time_zone, time_zone_link, leap_second, zoned_traits, tzdb)
784         (tzdb_list): Define classes representing time zones.
785         (get_leap_second_info): Define new function returning leap
786         second offset for a given time point.
787         * testsuite/std/time/clock/gps/1.cc: New test.
788         * testsuite/std/time/clock/tai/1.cc: New test.
789         * testsuite/std/time/clock/utc/1.cc: New test.
791 2022-11-13  Jonathan Wakely  <jwakely@redhat.com>
793         PR libstdc++/104166
794         * include/Makefile.am (std_headers): Add <format>.
795         * include/Makefile.in: Regenerate.
796         * include/precompiled/stdc++.h: Add <format>.
797         * include/std/format: New file.
798         * python/libstdcxx/v6/printers.py (StdFormatArgsPrinter): New
799         printer for std::format_args.
800         * testsuite/std/format/arguments/args.cc: New test.
801         * testsuite/std/format/error.cc: New test.
802         * testsuite/std/format/formatter.cc: New test.
803         * testsuite/std/format/functions/format.cc: New test.
804         * testsuite/std/format/functions/format_to_n.cc: New test.
805         * testsuite/std/format/functions/size.cc: New test.
806         * testsuite/std/format/functions/vformat_to.cc: New test.
807         * testsuite/std/format/parse_ctx.cc: New test.
808         * testsuite/std/format/string.cc: New test.
809         * testsuite/std/format/string_neg.cc: New test.
811 2022-11-13  Jonathan Wakely  <jwakely@redhat.com>
813         * include/bits/charconv.h (__integer_to_chars_is_unsigned):
814         New variable template.
815         (__to_chars_len, __to_chars_10_impl): Use variable template in
816         assertions to allow unsigned __int128 in strict mode.
817         * include/std/charconv (__to_chars, __to_chars_16)
818         (__to_chars_10, __to_chars_8, __to_chars_2): Likewise.
820 2022-11-12  Jakub Jelinek  <jakub@redhat.com>
822         PR libstdc++/107636
823         * include/std/charconv (to_chars): Fix up powerpc64le _Float128
824         overload __extension__ placement.
826 2022-11-12  Jonathan Wakely  <jwakely@redhat.com>
828         * src/Makefile.am: Simplify debug build targets.
829         * src/Makefile.in: Regenerate.
831 2022-11-12  Jonathan Wakely  <jwakely@redhat.com>
833         PR libstdc++/103755
834         * src/c++11/locale-inst-monetary.h: Include new header.
835         * src/c++11/locale-inst-numeric.h: Likewise.
836         * src/c++11/locale-inst.cc: Likewise.
837         (INSTANTIATE_USE_FACET, INSTANTIATE_FACET_ACCESSORS): Move
838         macro definitions to ...
839         * src/c++11/facet_inst_macros.h: New file.
841 2022-11-11  Jonathan Wakely  <jwakely@redhat.com>
843         PR libstdc++/95048
844         * include/experimental/bits/fs_path.h (path::_Cvt::_S_wconvert):
845         Construct codecvt directly instead of getting it from the
846         locale.
848 2022-11-11  Nathaniel Shead  <nathanieloshead@gmail.com>
850         PR libstdc++/103295
851         * include/bits/basic_string.h (_M_use_local_data): Set active
852         member to _M_local_buf.
854 2022-11-11  Jonathan Wakely  <jwakely@redhat.com>
856         PR libstdc++/95048
857         * include/bits/fs_path.h (path::_Codecvt): New class template
858         that selects the kind of code conversion done.
859         (path::_Codecvt<wchar_t>): Select based on sizeof(wchar_t).
860         (_GLIBCXX_CONV_FROM_UTF8): New macro to allow the same code to
861         be used for Windows and POSIX.
862         (path::_S_convert(const EcharT*, const EcharT*)): Simplify by
863         using _Codecvt and _GLIBCXX_CONV_FROM_UTF8 abstractions.
864         (path::_S_str_convert(basic_string_view<value_type>, const A&)):
865         Simplify nested conditions.
866         * include/experimental/bits/fs_path.h (path::_Cvt): Define
867         nested typedef controlling type of code conversion done.
868         (path::_Cvt::_S_wconvert): Use new typedef.
869         (path::string(const A&)): Likewise.
870         * testsuite/27_io/filesystem/path/construct/95048.cc: New test.
871         * testsuite/experimental/filesystem/path/construct/95048.cc: New
872         test.
874 2022-11-11  Jonathan Wakely  <jwakely@redhat.com>
876         * testsuite/20_util/tuple/swap.cc (MoveOnly::operator==): Add
877         const qualifier.
878         * testsuite/26_numerics/valarray/87641.cc (X::operator==):
879         Likewise.
881 2022-11-11  Jonathan Wakely  <jwakely@redhat.com>
883         * include/std/charconv (__from_chars_alnum_to_val_table::value):
884         [!__cpp_inline_variables]: Add non-inline definition.
886 2022-11-11  Jonathan Wakely  <jwakely@redhat.com>
888         * testsuite/experimental/propagate_const/observers/107525.cc:
889         Use type trait instead of C++17 variable template.
891 2022-11-11  Jonathan Wakely  <jwakely@redhat.com>
893         PR libstdc++/103755
894         * config/abi/pre/gnu.ver: Tighten patterns for facets in the
895         base version. Add exports for __try_use_facet.
896         * include/bits/basic_ios.tcc (basic_ios::_M_cache_locale): Use
897         __try_use_facet instead of has_facet and use_facet.
898         * include/bits/fstream.tcc (basic_filebuf::basic_filebuf()):
899         Likewise.
900         (basic_filebuf::imbue): Likewise.
901         * include/bits/locale_classes.h (locale, locale::id)
902         (locale::_Impl): Declare __try_use_facet as a friend.
903         * include/bits/locale_classes.tcc (__try_use_facet): Define new
904         function template with special cases for default facets.
905         (has_facet, use_facet): Call __try_use_facet.
906         * include/bits/locale_facets.tcc (__try_use_facet): Declare
907         explicit instantiations.
908         * include/bits/locale_facets_nonio.tcc (__try_use_facet):
909         Likewise.
910         * src/c++11/locale-inst-monetary.h (INSTANTIATE_FACET_ACCESSORS):
911         Use new macro for facet accessor instantiations.
912         * src/c++11/locale-inst-numeric.h (INSTANTIATE_FACET_ACCESSORS):
913         Likewise.
914         * src/c++11/locale-inst.cc (INSTANTIATE_USE_FACET): Define new
915         macro for instantiating __try_use_facet and use_facet.
916         (INSTANTIATE_FACET_ACCESSORS): Define new macro for also
917         defining has_facet.
918         * src/c++98/compatibility-ldbl.cc (__try_use_facet):
919         Instantiate.
920         * testsuite/22_locale/ctype/is/string/89728_neg.cc: Adjust
921         expected errors.
923 2022-11-10  Jonathan Wakely  <jwakely@redhat.com>
925         * include/std/concepts (__detail::__destructible_impl)
926         (__detail::__destructible): New variable templates.
927         (destructible): Use __detail::__destructible.
928         * testsuite/std/concepts/concepts.lang/concept.destructible/1.cc:
929         Add more checks for array and reference types.
931 2022-11-08  Jonathan Wakely  <jwakely@redhat.com>
933         * testsuite/18_support/new_nothrow.cc: Add missing noexcept
934         to operator delete replacements.
935         * testsuite/20_util/any/cons/92156.cc: Disable
936         -Winit-list-lifetime warnings from instantiating invalid
937         specialization of manager function.
938         * testsuite/20_util/any/modifiers/92156.cc: Likewise.
939         * testsuite/20_util/default_delete/void_neg.cc: Prune additional
940         diagnostics.
941         * testsuite/20_util/headers/memory/synopsis.cc: Add missing
942         noexcept.
943         * testsuite/20_util/shared_ptr/cons/void_neg.cc: Prune
944         additional diagnostic.
945         * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: Add
946         missing noexcept to operator delete replacements.
947         * testsuite/21_strings/basic_string/cons/char/103919.cc:
948         Likewise.
949         * testsuite/23_containers/map/modifiers/emplace/92300.cc:
950         Likewise.
951         * testsuite/23_containers/map/modifiers/insert/92300.cc:
952         Likewise.
953         * testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
954         Add missing noexcept to synopsis declarations.
955         * testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
956         Likewise.
957         * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
958         Likewise.
960 2022-11-08  Jonathan Wakely  <jwakely@redhat.com>
962         * include/bits/stl_tempbuf.h (_Temporary_buffer): Disable
963         warnings about get_temporary_buffer being deprecated.
964         * include/ext/functional (mem_fun1, mem_fun1_ref): Disable
965         warnings about mem_fun1_t, const_mem_fun1_t, mem_fun1_ref_t and
966         const_mem_fun1_ref_t being deprecated.
967         * include/std/array (__array_traits<T, 0>): Remove artificial
968         attributes which give warnings about being ignored.
969         * include/std/spanstream (basic_spanbuf::setbuf): Add assertion
970         and adjust to avoid narrowing warning.
971         * libsupc++/exception_ptr.h [!__cpp_rtti && !__cpp_exceptions]
972         (make_exception_ptr): Add missing inline specifier.
974 2022-11-08  Jonathan Wakely  <jwakely@redhat.com>
976         * include/bits/alloc_traits.h (allocator_traits): Add
977         always_inline attribute to all member functions.
978         (__do_alloc_on_copy, __alloc_on_copy, __do_alloc_on_move)
979         (__alloc_on_move, __do_alloc_on_swap, __alloc_on_swap)
980         (_Destroy(FwdIter, FwdIter, allocator<T>&)): : Add
981         always_inline attribute.
982         * include/bits/allocator.h (allocator): Add always_inline
983         attribute to all member functions and equality operators.
984         * include/bits/new_allocator.h (__new_allocator): Likewise.
985         * include/ext/alloc_traits.h (__gnu_cxx::__alloc_traits):
986         Likewise.
988 2022-11-08  Charles-François Natali  <cf.natali@gmail.com>
990         PR libstdc++/63746
991         * include/bits/fstream.tcc (basic_filbuf::xsputn): Remove
992         1024-byte chunking that bypasses the buffer for large writes.
993         * testsuite/27_io/basic_filebuf/sputn/char/63746.cc: New test.
995 2022-11-08  Will Hawkins  <whh8b@obs.cr>
996             Jonathan Wakely  <jwakely@redhat.com>
998         * include/bits/basic_string.h (__str_cat): Add common function
999         that performs single-allocation string concatenation.
1000         (operator+): Use __str_cat.
1001         * include/bits/basic_string.tcc (operator+): Move to .h and
1002         define inline using __str_cat.
1004 2022-11-08  Jakub Jelinek  <jakub@redhat.com>
1006         * testsuite/20_util/to_chars/float128_c++23.cc (test): Uncomment
1007         denorm_min test.
1009 2022-11-08  Jonathan Wakely  <jwakely@redhat.com>
1011         * doc/xml/authors.xml: Update the blurb listing my doc
1012         contributions.
1014 2022-11-08  Jonathan Wakely  <jwakely@redhat.com>
1016         * doc/xml/authors.xml: Remove empty author element.
1017         * doc/xml/manual/spine.xml: Likewise.
1018         * doc/html/manual/index.html: Regenerate.
1020 2022-11-08  Joseph Myers  <joseph@codesourcery.com>
1022         PR libstdc++/107562
1023         * src/c++17/floating_from_chars.cc (from_chars_impl): Fix syntax
1024         error.
1026 2022-11-08  Jason Merrill  <jason@redhat.com>
1027             Jakub Jelinek  <jakub@redhat.com>
1029         * testsuite/18_support/comparisons/algorithms/fallback.cc: Adjust
1030         asserts.
1032 2022-11-07  Jakub Jelinek  <jakub@redhat.com>
1034         PR libstdc++/107562
1035         * src/c++17/floating_from_chars.cc (__strtof128): Put __asm before
1036         __attribute__.
1037         * src/c++17/floating_to_chars.cc (__strfromf128): Likewise.
1039 2022-11-07  Patrick Palka  <ppalka@redhat.com>
1041         * include/std/ranges (as_rvalue_view): Define.
1042         (enable_borrowed_range<as_rvalue_view>): Define.
1043         (views::__detail::__can_as_rvalue_view): Define.
1044         (views::_AsRvalue, views::as_rvalue): Define.
1045         * testsuite/std/ranges/adaptors/as_rvalue/1.cc: New test.
1047 2022-11-07  Patrick Palka  <ppalka@redhat.com>
1049         * include/std/ranges (__maybe_const_t): New alias for
1050         __detail::__maybe_const_t.
1051         (__detail::__cartesian_product_is_random_access): Define.
1052         (__detail::__cartesian_product_common_arg): Define.
1053         (__detail::__cartesian_product_is_bidirectional): Define.
1054         (__detail::__cartesian_product_is_common): Define.
1055         (__detail::__cartesian_product_is_sized): Define.
1056         (__detail::__cartesian_is_sized_sentinel): Define.
1057         (__detail::__cartesian_common_arg_end): Define.
1058         (cartesian_product_view): Define.
1059         (cartesian_product_view::_Iterator): Define.
1060         (views::__detail::__can_cartesian_product_view): Define.
1061         (views::_CartesianProduct, views::cartesian_product): Define.
1062         * testsuite/std/ranges/cartesian_product/1.cc: New test.
1064 2022-11-07  Jakub Jelinek  <jakub@redhat.com>
1066         PR libstdc++/107468
1067         * src/c++17/fast_float/MERGE: Adjust for merge from upstream.
1068         * src/c++17/fast_float/LOCAL_PATCHES: Remove commits that were
1069         upstreamed.
1070         * src/c++17/fast_float/README.md: Merge from fast_float
1071         662497742fea7055f0e0ee27e5a7ddc382c2c38e commit.
1072         * src/c++17/fast_float/fast_float.h: Likewise.
1073         * testsuite/20_util/from_chars/pr107468.cc: New test.
1075 2022-11-07  Jakub Jelinek  <jakub@redhat.com>
1077         * include/std/charconv (from_chars, to_chars): Add _Float128
1078         overfloads if _GLIBCXX_HAVE_FLOAT128_MATH is defined.
1079         * config/abi/pre/gnu.ver (GLIBCXX_3.4.31): Export
1080         _ZSt8to_charsPcS_DF128_, _ZSt8to_charsPcS_DF128_St12chars_format,
1081         _ZSt8to_charsPcS_DF128_St12chars_formati and
1082         _ZSt10from_charsPKcS0_RDF128_St12chars_format.
1083         * src/c++17/floating_from_chars.cc (USE_STRTOF128_FOR_FROM_CHARS):
1084         Define if needed.
1085         (__strtof128): Declare.
1086         (from_chars_impl): Handle _Float128.
1087         (from_chars): New _Float128 overload if USE_STRTOF128_FOR_FROM_CHARS
1088         is define.
1089         * src/c++17/floating_to_chars.cc (__strfromf128): Declare.
1090         (FLOAT128_TO_CHARS): Define even when _Float128 is supported and
1091         wider than long double.
1092         (F128_type): Use _Float128 for that case.
1093         (floating_type_traits): Specialize for F128_type rather than
1094         __float128.
1095         (sprintf_ld): Add length argument.  Handle _Float128.
1096         (__floating_to_chars_shortest, __floating_to_chars_precision):
1097         Pass length to sprintf_ld.
1098         (to_chars): Add _Float128 overloads for the F128_type being
1099         _Float128 cases.
1100         * testsuite/20_util/to_chars/float128_c++23.cc: New test.
1102 2022-11-06  Patrick Palka  <ppalka@redhat.com>
1104         * include/bits/atomic_wait.h (_detail::__platform_wait_alignment):
1105         Declare inline.  Remove redundant static specifier.
1106         (__detail::__atomic_spin_count_relax): Declare inline.
1107         (__detail::__atomic_spin_count): Likewise.
1108         * include/bits/regex_automaton.h (__detail::_S_invalid_state_id):
1109         Declare inline for C++17.  Declare constexpr.  Remove
1110         redundant const and static specifiers.
1111         * include/bits/regex_error.h (regex_constants::error_collate):
1112         Declare inline for C++17 as per P0607R0.
1113         (regex_constants::error_ctype): Likewise.
1114         (regex_constants::error_escape): Likewise.
1115         (regex_constants::error_backref): Likewise.
1116         (regex_constants::error_brack): Likewise.
1117         (regex_constants::error_paren): Likewise.
1118         (regex_constants::error_brace): Likewise.
1119         (regex_constants::error_badbrace): Likewise.
1120         (regex_constants::error_range): Likewise.
1121         (regex_constants::error_space): Likewise.
1122         (regex_constants::error_badrepeat): Likewise.
1123         (regex_constants::error_complexity): Likewise.
1124         (regex_constants::error_stack): Likewise.
1125         * include/ext/concurrence.h (__gnu_cxx::__default_lock_policy):
1126         Likewise.  Remove redundant static specifier.
1127         * include/pstl/execution_defs.h (execution::seq): Declare inline
1128         for C++17 as per P0607R0.
1129         (execution::par): Likewise.
1130         (execution::par_unseq): Likewise.
1131         (execution::unseq): Likewise.
1133 2022-11-06  Patrick Palka  <ppalka@redhat.com>
1135         PR libstdc++/44952
1136         PR libstdc++/39796
1137         PR libstdc++/98108
1138         * include/std/iostream (__ioinit): No longer define here if
1139         the init_priority attribute is usable.
1140         * src/c++98/ios_init.cc (__ioinit): Define here instead if
1141         init_priority is usable, via ...
1142         * src/c++98/ios_base_init.h: ... this new file.
1144 2022-11-05  Jakob Hasse  <0xjakob@users.noreply.github.com>
1146         PR libstdc++/105387
1147         * libsupc++/pbase_type_info.cc (__do_catch) [!__cpp_rtti]: Add
1148         check that the thrown type is actually a pointer.
1149         * testsuite/18_support/105387.cc: New test.
1150         * testsuite/18_support/105387_memptr.cc: New test.
1152 2022-11-05  Jonathan Wakely  <jwakely@redhat.com>
1154         PR libstdc++/107525
1155         * include/experimental/propagate_const (operator element_type*()):
1156         Move into base class that can be partially specilized to iompose
1157         constraints.
1158         (operator const element_type*()): Likewise.
1159         * testsuite/experimental/propagate_const/observers/107525.cc: New test.
1161 2022-11-04  Jonathan Wakely  <jwakely@redhat.com>
1163         PR libstdc++/107500
1164         * libsupc++/eh_globals.cc (eh_globals): Remove immortalizing
1165         wrapper.
1166         (__cxxabiv1::__cxa_get_globals_fast): Adjust.
1167         (__cxxabiv1::__cxa_get_globals): Adjust.
1169 2022-11-04  Jonathan Wakely  <jwakely@redhat.com>
1171         PR libstdc++/107511
1172         * libsupc++/eh_alloc.cc (_GNU_SOURCE): Define.
1174 2022-11-03  Jonathan Wakely  <jwakely@redhat.com>
1176         * include/bits/ranges_algobase.h (__detail::__copy_or_move):
1177         Move output iterator.
1178         * testsuite/25_algorithms/copy/constrained.cc: Check copying to
1179         move-only output iterator.
1181 2022-11-02  Jonathan Wakely  <jwakely@redhat.com>
1183         * libsupc++/eh_globals.cc (constant_init::unused): Remove.
1184         * src/c++11/system_error.cc (constant_init::unused): Remove.
1185         * src/c++17/memory_resource.cc (constant_init::unused): Remove.
1187 2022-11-02  Patrick Palka  <ppalka@redhat.com>
1189         * src/c++17/floating_from_chars.cc (from_chars_impl): In the
1190         ERANGE case, distinguish between a denormal result and true
1191         underflow by checking if the return value is 0.
1193 2022-11-02  Jonathan Wakely  <jwakely@redhat.com>
1195         * include/std/expected (expected::_M_invalid): Remove.
1197 2022-11-02  Jonathan Wakely  <jwakely@redhat.com>
1199         * include/std/variant (__variant::_Multi_array::__untag_result):
1200         Use pragma to suppress warning.
1202 2022-11-02  Jakub Jelinek  <jakub@redhat.com>
1204         * libsupc++/compare (_Strong_order::_Fp_fmt): Add _Bfloat16.
1205         (_Strong_order::_Bfloat16): New static data member.
1206         (_Strong_order::_S_fp_fmt): Return _Bfloat16 for std::bfloat16_t.
1208 2022-11-02  Jakub Jelinek  <jakub@redhat.com>
1210         * src/c++17/floating_to_chars.cc (__floating_to_chars_hex): Drop const
1211         from unbiased_exponent.  Canonicalize denormals such that they have
1212         the leading bit set by shifting effective mantissa up and decreasing
1213         unbiased_exponent.
1214         (__floating_to_chars_shortest): Don't instantiate
1215         __floating_to_chars_hex for float16_t either and use float instead.
1216         * testsuite/20_util/to_chars/float.cc (float_to_chars_test_cases):
1217         Adjust testcases for shortest hex denormals.
1218         * testsuite/20_util/to_chars/double.cc (double_to_chars_test_cases):
1219         Likewise.
1221 2022-11-01  Jakub Jelinek  <jakub@redhat.com>
1223         * include/std/charconv (__from_chars_float16_t,
1224         __from_chars_bfloat16_t): Declare.
1225         (from_chars): Add _Float16 and __gnu_cxx::__bfloat16_t overloads.
1226         * config/abi/pre/gnu.ver (GLIBCXX_3.4.31): Export
1227         _ZSt22__from_chars_float16_tPKcS0_RfSt12chars_format and
1228         _ZSt23__from_chars_bfloat16_tPKcS0_RfSt12chars_format.
1229         * src/c++17/floating_from_chars.cc
1230         (fast_float::floating_type_float16_t,
1231         fast_float::floating_type_bfloat16_t): New classes.
1232         (fast_float::binary_format<floating_type_float16_t>,
1233         fast_float::binary_format<floating_type_bfloat16_t>): New
1234         specializations.
1235         (fast_float::to_float<floating_type_float16_t>,
1236         fast_float::to_float<floating_type_bfloat16_t>,
1237         fast_float::to_extended<floating_type_float16_t>,
1238         fast_float::to_extended<floating_type_bfloat16_t>): Likewise.
1239         (fast_float::from_chars_16): New template function.
1240         (__floating_from_chars_hex): Allow instantiation with
1241         fast_float::floating_type_{,b}float16_t.
1242         (from_chars): Formatting fixes for float/double/long double overloads.
1243         (__from_chars_float16_t, __from_chars_bfloat16_t): New functions.
1244         * testsuite/20_util/to_chars/float16_c++23.cc: New test.
1246 2022-11-01  Jakub Jelinek  <jakub@redhat.com>
1248         * include/std/charconv (__to_chars_float16_t, __to_chars_bfloat16_t):
1249         Declare.
1250         (to_chars): Add _Float16 and __gnu_cxx::__bfloat16_t overloads.
1251         * config/abi/pre/gnu.ver (GLIBCXX_3.4.31): Export
1252         _ZSt20__to_chars_float16_tPcS_fSt12chars_format and
1253         _ZSt21__to_chars_bfloat16_tPcS_fSt12chars_format.
1254         * src/c++17/floating_to_chars.cc (floating_type_float16_t,
1255         floating_type_bfloat16_t): New types.
1256         (floating_type_traits<floating_type_float16_t>,
1257         floating_type_traits<floating_type_bfloat16_t>,
1258         get_ieee_repr<floating_type_float16_t>,
1259         get_ieee_repr<floating_type_bfloat16_t>,
1260         __handle_special_value<floating_type_float16_t>,
1261         __handle_special_value<floating_type_bfloat16_t>): New specializations.
1262         (floating_to_shortest_scientific): Handle floating_type_float16_t
1263         and floating_type_bfloat16_t like IEEE quad.
1264         (__floating_to_chars_shortest): For floating_type_bfloat16_t call
1265         __floating_to_chars_hex<float> rather than
1266         __floating_to_chars_hex<floating_type_bfloat16_t> to avoid
1267         instantiating the latter.
1268         (__to_chars_float16_t, __to_chars_bfloat16_t): New functions.
1270 2022-11-01  Jakub Jelinek  <jakub@redhat.com>
1272         * include/std/charconv (from_chars, to_chars): Add _Float{32,64,128}
1273         overloads for cases where those types match {float,double,long double}.
1274         * include/std/istream (basic_istream::operator>>): Add
1275         _Float{16,32,64,128} and __gnu_cxx::__bfloat16_t overloads.
1276         * include/std/ostream (basic_ostream::operator<<): Add
1277         _Float{16,32,64,128} and __gnu_cxx::__bfloat16_t overloads.
1278         * testsuite/20_util/from_chars/8.cc: New test.
1279         * testsuite/26_numerics/headers/cmath/nextafter_c++23.cc (test):
1280         Formatting fixes.
1281         * testsuite/26_numerics/headers/cmath/functions_std_c++23.cc: Add
1282         dg-options "-std=gnu++2b".
1283         (test_functions, main): Formatting fixes.
1284         * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++23.cc:
1285         Add dg-options "-std=gnu++2b".
1287 2022-10-31  Jakub Jelinek  <jakub@redhat.com>
1289         * include/std/complex (complex::complex converting ctor): For C++23
1290         use explicit specifier with constant expression.  Explicitly cast
1291         both parts to _Tp.
1292         (__complex_abs, __complex_arg, __complex_cos, __complex_cosh,
1293         __complex_exp, __complex_log, __complex_sin, __complex_sinh,
1294         __complex_sqrt, __complex_tan, __complex_tanh, __complex_pow): Add
1295         __complex__ _Float{16,32,64,128} and __complex__ decltype(0.0bf16)
1296         overloads.
1297         (complex<float>::complex converting ctor,
1298         complex<double>::complex converting ctor,
1299         complex<long double>::complex converting ctor): For C++23 implement
1300         as template with explicit specifier with constant expression
1301         and explicit casts.
1302         (__complex_type): New template.
1303         (complex): New partial specialization for types with extended floating
1304         point types.
1305         (__complex_acos, __complex_asin, __complex_atan, __complex_acosh,
1306         __complex_asinh, __complex_atanh): Add __complex__ _Float{16,32,64,128}
1307         and __complex__ decltype(0.0bf16) overloads.
1308         (__complex_proj): Likewise.  Add template for complex of extended
1309         floating point types.
1310         * include/bits/cpp_type_traits.h (__is_floating): Specialize for
1311         _Float{16,32,64,128} and __gnu_cxx::__bfloat16_t.
1312         * testsuite/26_numerics/complex/ext_c++23.cc: New test.
1314 2022-10-31  Jakub Jelinek  <jakub@redhat.com>
1316         * config/os/gnu-linux/os_defines.h (_GLIBCXX_HAVE_FLOAT128_MATH):
1317         Uncomment.
1318         * include/c_global/cmath (nextafter(_Float16, _Float16)): Make it constexpr.
1319         If std::__is_constant_evaluated() call __builtin_nextafterf16.
1320         (nextafter(__gnu_cxx::__bfloat16_t, __gnu_cxx::__bfloat16_t)): Similarly
1321         but call __builtin_nextafterf16b.
1322         * testsuite/26_numerics/headers/cmath/nextafter_c++23.cc (test): Add
1323         static assertions to test constexpr nextafter.
1325 2022-10-28  Jonathan Wakely  <jwakely@redhat.com>
1327         * include/bits/fs_path.h (path::filename()): Fix dangling
1328         reference.
1330 2022-10-28  Arsen Arsenović  <arsen@aarsen.me>
1332         * include/std/functional: Make placeholders inline, if possible.
1334 2022-10-28  Arsen Arsenović  <arsen@aarsen.me>
1336         * configure.ac: Stop generating gstdint.h.
1337         * src/c++11/compatibility-atomic-c++0x.cc: Stop using gstdint.h.
1338         * Makefile.in: Regenerate.
1339         * aclocal.m4: Regenerate.
1340         * config.h.in: Regenerate.
1341         * configure: Regenerate.
1342         * doc/Makefile.in: Regenerate.
1343         * include/Makefile.in: Regenerate.
1344         * libsupc++/Makefile.in: Regenerate.
1345         * po/Makefile.in: Regenerate.
1346         * python/Makefile.in: Regenerate.
1347         * src/Makefile.in: Regenerate.
1348         * src/c++11/Makefile.in: Regenerate.
1349         * src/c++17/Makefile.in: Regenerate.
1350         * src/c++20/Makefile.in: Regenerate.
1351         * src/c++98/Makefile.in: Regenerate.
1352         * src/filesystem/Makefile.in: Regenerate.
1353         * src/libbacktrace/Makefile.in: Regenerate.
1354         * testsuite/Makefile.in: Regenerate.
1356 2022-10-28  Jonathan Wakely  <jwakely@redhat.com>
1358         PR libstdc++/107376
1359         * include/bits/regex_executor.h (_Executor::_Executor): Use same
1360         allocator for _M_cur_results and _M_results.
1361         * include/bits/regex_executor.tcc (_Executor::_M_main_dispatch):
1362         Prevent possibly incorrect allocator propagating to
1363         _M_cur_results.
1364         * testsuite/28_regex/algorithms/regex_match/107376.cc: New test.
1366 2022-10-26  Marek Polacek  <polacek@redhat.com>
1368         PR c++/106393
1369         * include/bits/locale_classes.tcc: Add #pragma to disable
1370         -Wdangling-reference with std::use_facet.
1372 2022-10-21  Arsen Arsenović  <arsen@aarsen.me>
1374         * acinclude.m4: Default hosted to off if building without
1375         headers and without newlib.
1376         * configure: Regenerate.
1378 2022-10-21  Jonathan Wakely  <jwakely@redhat.com>
1380         * include/bits/mofunc_impl.h (move_only_function::__param_t):
1381         Use __is_scalar instead of is_trivially_copyable.
1382         * testsuite/20_util/move_only_function/call.cc: Check parameters
1383         involving incomplete types.
1385 2022-10-20  Patrick Palka  <ppalka@redhat.com>
1387         * include/std/charconv (__detail::__from_chars_alnum_to_val_table):
1388         Redefine as a class template containing the members type, value and
1389         _S_make_table.  Don't use a local class as the table type.
1390         (__detail::__table): Remove.
1391         (__detail::__from_chars_alnum_to_val): Adjust after the above.
1393 2022-10-19  Patrick Palka  <ppalka@redhat.com>
1395         * include/std/ranges (views::__detail::__is_repeat_view): Define
1396         and later define a partial specialization.
1397         (views::__detail::__take_of_repeat_view): Declare and later define.
1398         (views::__detail::__drop_of_repeat_view): Likewise.
1399         (views::_Take::operator()): Return a repeat_view if the argument
1400         is a repeat_view as per P2474R2.
1401         (views::_Drop::operator()): Likewise.
1402         (repeat_view): Befriend __take/drop_of_repeat_view.
1403         * testsuite/std/ranges/repeat/1.cc (test04): New test.
1405 2022-10-19  Patrick Palka  <ppalka@redhat.com>
1407         PR libstdc++/107313
1408         * include/std/ranges (stride_view::_Iterator::operator-): Fix typo.
1409         * testsuite/std/ranges/adaptors/stride/1.cc (test03): New test.
1411 2022-10-19  LIU Hao  <lh_mouse@126.com>
1413         * src/c++11/thread.cc (get_nprocs): Add new implementation
1414         for native Windows targets
1416 2022-10-19  LIU Hao  <lh_mouse@126.com>
1418         * libsupc++/atexit_thread.cc (__cxa_thread_atexit): Use
1419         implementation from mcfgthread if available
1420         * libsupc++/guard.cc (__cxa_guard_acquire, __cxa_guard_release,
1421         __cxa_guard_abort): Use implementations from mcfgthread if
1422         available
1423         * configure: Regenerate
1425 2022-10-19  Jakub Jelinek  <jakub@redhat.com>
1427         PR c++/106652
1428         * include/std/limits: Fix a typo, 202202L -> 202002L.
1429         (numeric_limits::<_Float16>::radix, numeric_limits::<_Float32>::radix,
1430         numeric_limits::<_Float64>::radix, numeric_limits::<_Float128>::radix,
1431         numeric_limits::<__gnu_cxx::__bfloat16_t>::radix): Use __FLT_RADIX__
1432         macro instead of type specific macros.
1433         * include/c_global/cmath (nextafter(_Float16, _Float16)): New
1434         overload.
1435         (nextafter(__gnu_cxx::__bfloat16_t, __gnu_cxx::__bfloat16_t)):
1436         Likewise.
1437         * testsuite/26_numerics/headers/cmath/functions_std_c++23.cc
1438         (test_functions): Uncomment nextafter test.  Fix up sph_neumann call.
1439         * testsuite/26_numerics/headers/cmath/nextafter_c++23.cc: New test.
1441 2022-10-18  Patrick Palka  <ppalka@redhat.com>
1443         * include/std/ranges (stride_view): Define.
1444         (stride_view::_Iterator): Define.
1445         (views::__detail::__can_stride_view): Define.
1446         (views::_Stride, views::stride): Define.
1447         * testsuite/std/ranges/adaptors/stride/1.cc: New test.
1449 2022-10-18  Jakub Jelinek  <jakub@redhat.com>
1451         PR c++/106652
1452         * include/std/stdfloat: New file.
1453         * include/std/numbers (__glibcxx_numbers): Define and use it
1454         for __float128 explicit instantiations as well as
1455         _Float{16,32,64,128} and __gnu_cxx::__bfloat16_t.
1456         * include/std/atomic (atomic<_Float16>, atomic<_Float32>,
1457         atomic<_Float64>, atomic<_Float128>, atomic<__gnu_cxx::__bfloat16_t>):
1458         New explicit instantiations.
1459         * include/std/type_traits (__is_floating_point_helper<_Float16>,
1460         __is_floating_point_helper<_Float32>,
1461         __is_floating_point_helper<_Float64>,
1462         __is_floating_point_helper<_Float128>,
1463         __is_floating_point_helper<__gnu_cxx::__bfloat16_t>): Likewise.
1464         * include/std/limits (__glibcxx_concat3_, __glibcxx_concat3,
1465         __glibcxx_float_n): Define.
1466         (numeric_limits<_Float16>, numeric_limits<_Float32>,
1467         numeric_limits<_Float64>, numeric_limits<_Float128>,
1468         numeric_limits<__gnu_cxx::__bfloat16_t>): New explicit instantiations.
1469         * include/bits/std_abs.h (abs): New overloads for
1470         _Float{16,32,64,128} and __gnu_cxx::__bfloat16_t.
1471         * include/bits/c++config (_GLIBCXX_LDOUBLE_IS_IEEE_BINARY128): Define
1472         if long double is IEEE quad.
1473         (__gnu_cxx::__bfloat16_t): New using.
1474         * include/c_global/cmath (acos, asin, atan, atan2, ceil, cos, cosh,
1475         exp, fabs, floor, fmod, frexp, ldexp, log, log10, modf, pow, sin,
1476         sinh, sqrt, tan, tanh, fpclassify, isfinite, isinf, isnan, isnormal,
1477         signbit, isgreater, isgreaterequal, isless, islessequal,
1478         islessgreater, isunordered, acosh, asinh, atanh, cbrt, copysign, erf,
1479         erfc, exp2, expm1, fdim, fma, fmax, fmin, hypot, ilogb, lgamma,
1480         llrint, llround, log1p, log2, logb, lrint, lround, nearbyint,
1481         nextafter, remainder, rint, round, scalbln, scalbn, tgamma, trunc,
1482         lerp): New overloads with _Float{16,32,64,128} or
1483         __gnu_cxx::__bfloat16_t types.
1484         * config/os/gnu-linux/os_defines.h (_GLIBCXX_HAVE_FLOAT128_MATH):
1485         Prepare for definition if glibc 2.26 and later implements *f128 APIs
1486         but comment out the actual definition for now.
1487         * include/ext/type_traits.h (__promote<_Float16>, __promote<_Float32>,
1488         __promote<_Float64>, __promote<_Float128>,
1489         __promote<__gnu_cxx::__bfloat16_t>): New specializations.
1490         * include/Makefile.am (std_headers): Add stdfloat.
1491         * include/Makefile.in: Regenerated.
1492         * include/precompiled/stdc++.h: Include stdfloat.
1493         * testsuite/18_support/headers/stdfloat/types_std.cc: New test.
1494         * testsuite/18_support/headers/limits/synopsis_cxx23.cc: New test.
1495         * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++23.cc:
1496         New test.
1497         * testsuite/26_numerics/headers/cmath/functions_std_c++23.cc: New test.
1498         * testsuite/26_numerics/numbers/4.cc: New test.
1499         * testsuite/29_atomics/atomic_float/requirements_cxx23.cc: New test.
1501 2022-10-17  Jonathan Wakely  <jwakely@redhat.com>
1503         * include/std/charconv (__cpp_lib_constexpr_charconv): Define to
1504         correct value.
1505         * include/std/version (__cpp_lib_constexpr_charconv): Likewise.
1506         * testsuite/20_util/to_chars/constexpr.cc: Check correct value.
1507         * testsuite/20_util/to_chars/version.cc: Likewise.
1509 2022-10-15  Jonathan Wakely  <jwakely@redhat.com>
1511         * src/c++11/debug.cc (print_raw): Move inside #if block.
1513 2022-10-15  Jonathan Wakely  <jwakely@redhat.com>
1515         * include/bits/charconv.h (__to_chars_10_impl): Add constexpr
1516         for C++23. Remove 'static' from array.
1517         * include/std/charconv (__cpp_lib_constexpr_charconv): Define.
1518         (__to_chars, __to_chars_16): Remove 'static' from array, add
1519         constexpr.
1520         (__to_chars_10, __to_chars_8, __to_chars_2, __to_chars_i)
1521         (to_chars, __raise_and_add, __from_chars_pow2_base)
1522         (__from_chars_alnum, from_chars): Add constexpr.
1523         (__from_chars_alnum_to_val): Avoid local static during constant
1524         evaluation. Add constexpr.
1525         * include/std/version (__cpp_lib_constexpr_charconv): Define.
1526         * testsuite/20_util/from_chars/constexpr.cc: New test.
1527         * testsuite/20_util/to_chars/constexpr.cc: New test.
1528         * testsuite/20_util/to_chars/version.cc: New test.
1530 2022-10-15  Jonathan Wakely  <jwakely@redhat.com>
1532         * include/bits/stl_map.h (map::insert(Pair&&)): Use
1533         remove_const_t on argument to __is_pair.
1534         * include/bits/stl_pair.h (__is_pair<const pair<T,U>>): Remove
1535         partial specialization.
1536         * include/bits/uses_allocator_args.h (_Std_pair): Use
1537         remove_cv_t as per LWG 3677.
1538         * testsuite/20_util/uses_allocator/lwg3677.cc: New test.
1540 2022-10-14  Jonathan Wakely  <jwakely@redhat.com>
1542         * libsupc++/eh_alloc.cc [USE_POOL]: New macro.
1543         [!USE_POOL] (__gnu_cxx::__freeres, pool): Do not define.
1544         [_GLIBCXX_EH_POOL_STATIC] (pool::arena): Do not use std::max.
1545         (__cxxabiv1::__cxa_allocate_exception) [!USE_POOL]: Do not use
1546         pool.
1547         (__cxxabiv1::__cxa_free_exception) [!USE_POOL]: Likewise.
1548         (__cxxabiv1::__cxa_allocate_dependent_exception) [!USE_POOL]:
1549         Likewise.
1550         (__cxxabiv1::__cxa_free_dependent_exception) [!USE_POOL]:
1551         Likewise.
1553 2022-10-14  Jonathan Wakely  <jwakely@redhat.com>
1555         * src/c++11/debug.cc (print_raw): Simplify.
1556         (print_word): Print indentation by calling fprintf directly.
1557         (_Error_formatter::_M_error): Print unindented string by calling
1558         fprintf directly.
1560 2022-10-14  Jonathan Wakely  <jwakely@redhat.com>
1562         * include/std/iostream: Use markdown in Doxygen comment.
1564 2022-10-12  François Dumont  <fdumont@gcc.gnu.org>
1566         * include/debug/string: Add using _Base::compare.
1567         (__gnu_debug::basic_string<>::compare(const basic_string<>&)): Remove.
1568         (__gnu_debug::basic_string<>::compare(size_type, size_type, const basic_string<>&)):
1569         Remove.
1570         (__gnu_debug::basic_string<>::compare(size_type, size_type, const basic_string<>&,
1571         size_type, size_type)): Remove.
1572         * testsuite/util/testsuite_string.h [_GLIBCXX_TEST_DEBUG_STRING]: Include <debug/string>.
1573         * testsuite/21_strings/basic_string/operations/compare/char/1.cc: Include testsuite_string.h
1574         and use __gnu_test::string.
1575         * testsuite/21_strings/basic_string/operations/compare/char/13650.cc: Likewise.
1576         * testsuite/21_strings/basic_string/operations/compare/char/2.cc: Likewise.
1577         * testsuite/21_strings/basic_string/operations/rfind/char/1.cc: Likewise.
1578         * testsuite/21_strings/basic_string/operations/rfind/char/2.cc: Likewise.
1579         * testsuite/21_strings/basic_string/operations/rfind/char/3.cc: Likewise.
1580         * testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc:
1581         Include testsuite_string.h
1582         and use __gnu_test::wstring.
1583         * testsuite/21_strings/basic_string/operations/compare/wchar_t/13650.cc: Likewise.
1584         * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc: Likewise.
1586 2022-10-12  Patrick Palka  <ppalka@redhat.com>
1588         * include/std/ranges (repeat_view): Define.
1589         (repeat_view::_Iterator): Define.
1590         (views::__detail::__can_repeat_view): Define.
1591         (views::__detail::__can_bounded_repeat_view): Define.
1592         (views::_Repeat, views::repeat): Define.
1593         * testsuite/std/ranges/repeat/1.cc: New test.
1595 2022-10-12  Martin Liska  <mliska@suse.cz>
1597         * configure: Regenerate.
1599 2022-10-11  Jonathan Wakely  <jwakely@redhat.com>
1601         PR bootstrap/107221
1602         * libsupc++/eh_alloc.cc (pool): Change preprocessor condition
1603         for using __mutex from __GTHREADS to _GLIBCXX_HOSTED.
1604         (pool::allocate): Remove namespace qualification to use
1605         pool::__scoped_lock instead of __gnu_cxx::__scoped_lock.
1607 2022-10-11  Jonathan Wakely  <jwakely@redhat.com>
1609         PR libstdc++/68606
1610         * Makefile.in: Regenerate.
1611         * acinclude.m4 (GLIBCXX_EMERGENCY_EH_ALLOC): New macro.
1612         * configure: Regenerate.
1613         * configure.ac: Use GLIBCXX_EMERGENCY_EH_ALLOC.
1614         * crossconfig.m4: Check for secure_getenv.
1615         * doc/Makefile.in: Regenerate.
1616         * doc/xml/manual/configure.xml: Document new configure options.
1617         * doc/xml/manual/evolution.xml: Document addition of tunables.
1618         * doc/xml/manual/using_exceptions.xml: Document emergency
1619         buffer and tunables.
1620         * doc/html/*: Regenerate.
1621         * include/Makefile.in: Regenerate.
1622         * libsupc++/Makefile.am: Use EH_POOL_FLAGS.
1623         * libsupc++/Makefile.in: Regenerate.
1624         * libsupc++/eh_alloc.cc (EMERGENCY_OBJ_SIZE): Define in units
1625         of sizeof(void*) not including the ABI's exception header.
1626         (EMERGENCY_OBJ_COUNT): Define as target-independent calculation
1627         based on word size.
1628         (MAX_OBJ_COUNT): Define macro for upper limit on pool size.
1629         (pool) [_GLIBCXX_EH_POOL_STATIC]: Use fixed-size buffer.
1630         (pool::buffer_size_in_bytes): New static member function.
1631         (pool::pool): Parse GLIBCXX_TUNABLES environment variable to set
1632         pool size at runtime.
1633         (pool::in_pool): Use std::less<void*> for total order.
1634         (__freeres) [_GLIBCXX_EH_POOL_STATIC]: Do nothing.
1635         (__cxa_free_exception, __cxa_free_dependent_exception): Add
1636         [[unlikely]] attributes.
1637         * po/Makefile.in: Regenerate.
1638         * python/Makefile.in: Regenerate.
1639         * src/Makefile.in: Regenerate.
1640         * src/c++11/Makefile.in: Regenerate.
1641         * src/c++17/Makefile.in: Regenerate.
1642         * src/c++20/Makefile.in: Regenerate.
1643         * src/c++98/Makefile.in: Regenerate.
1644         * src/filesystem/Makefile.in: Regenerate.
1645         * src/libbacktrace/Makefile.in: Regenerate.
1646         * testsuite/Makefile.in: Regenerate.
1648 2022-10-11  Olivier Hainque  <hainque@adacore.com>
1649             Olivier Hainque  <hainque@adacore.com>
1651         * configure: Regenerate.
1653 2022-10-10  Jonathan Wakely  <jwakely@redhat.com>
1655         * include/std/type_traits (make_signed, make_unsigned): Remove
1656         constraints on primary template.
1657         * testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
1658         Undo changes to expected error in C++20 mode.
1659         * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
1660         Likewise.
1661         * testsuite/24_iterators/range_access/range_access_cpp20_neg.cc:
1662         Likewise.
1663         * testsuite/20_util/make_signed/requirements/uninstantiated.cc:
1664         New test.
1665         * testsuite/20_util/make_unsigned/requirements/uninstantiated.cc:
1666         New test.
1668 2022-10-10  Jonathan Wakely  <jwakely@redhat.com>
1670         * include/std/type_traits (make_signed, make_unsigned): Add
1671         specializations for cv bool. Add requires-clause for C++20 to
1672         improve diagnostics for non-integral, non-enum cases.
1673         * testsuite/20_util/make_signed/requirements/typedefs_neg.cc:
1674         Check cv bool.
1675         * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc:
1676         Likewise.
1677         * testsuite/24_iterators/range_access/range_access_cpp20_neg.cc:
1678         Adjust expected errors for C++20 and later.
1679         * testsuite/lib/prune.exp: Prune "in requirements  [with ...]"
1680         lines from diagnostics.
1682 2022-10-07  Jonathan Wakely  <jwakely@redhat.com>
1684         * acinclude.m4 (GLIBCXX_ENABLE_HOSTED): Add libstdcxx-hosted
1685         enable arg as an alias for hosted-libstdcxx enable arg.
1686         * configure: Regenerate.
1688 2022-10-07  Jonathan Wakely  <jwakely@redhat.com>
1690         * include/bits/std_function.h: Include <new> but do not include
1691         <bits/stl_function.h>.
1692         * include/std/functional: Do not include <new>.
1694 2022-10-07  Jonathan Wakely  <jwakely@redhat.com>
1696         * doc/xml/manual/intro.xml: Add role="bold" attribute to
1697         emphasis elements for issue titles.
1698         * doc/html/manual/bugs.html: Regenerate.
1700 2022-10-05  Jonathan Wakely  <jwakely@redhat.com>
1702         * include/Makefile.in: Regenerate.
1704 2022-10-05  Jonathan Wakely  <jwakely@redhat.com>
1706         * include/bits/invoke.h (__invoke_r): Check
1707         __has_builtin(__reference_converts_from_temporary) before using
1708         built-in.
1710 2022-10-04  Jonathan Wakely  <jwakely@redhat.com>
1712         * testsuite/std/ranges/adaptors/join_with/1.cc: Remove unused
1713         <sstream header.
1714         (test04): Remove constexpr for old std::string ABI and test at
1715         runtime.
1717 2022-10-04  Jonathan Wakely  <jwakely@redhat.com>
1719         * include/std/type_traits (remove_cv): Use __remove_cv built-in.
1720         (remove_reference): Use __remove_reference built-in.
1721         (remove_cvref): Use __remove_cvref built-in. Remove inheritance
1722         for fallback implementation.
1724 2022-10-04  Jonathan Wakely  <jwakely@redhat.com>
1726         * include/bits/random.h (__is_seed_seq): Replace with ...
1727         (_If_seed_seq_for): ... this.
1728         * include/ext/random: Adjust to use _If_seed_seq_for.
1730 2022-10-04  Patrick Palka  <ppalka@redhat.com>
1732         * include/std/ranges (join_with_view::_Iterator::operator*):
1733         Replace use of std::visit with manual visitation.
1734         (join_with_view::_Iterator::operator++): Likewise.
1735         (join_with_view::_Iterator::operator--): Likewise.
1736         (join_with_view::_Iterator::iter_move): Likewise.
1737         (join_with_view::_Iterator::iter_swap): Likewise.
1739 2022-10-04  Jonathan Wakely  <jwakely@redhat.com>
1741         * testsuite/25_algorithms/stable_sort/mem_check.cc: Do nto run
1742         for freestanding.
1744 2022-10-04  Jonathan Wakely  <jwakely@redhat.com>
1746         PR libstdc++/107139
1747         * include/std/coroutine: Remove all _GLIBCXXHOSTED preprocessor
1748         conditionals.
1750 2022-10-04  Jonathan Wakely  <jwakely@redhat.com>
1752         PR libstdc++/107134
1753         * include/c_global/cstdint [!_GLIBCXX_HOSTED]: Include
1754         <stdint-gcc.h> directly.
1756 2022-10-04  Jonathan Wakely  <jwakely@redhat.com>
1758         PR libstdc++/107135
1759         * include/bits/functexcept.h [!_GLIBCXX_HOSTED]
1760         (__throw_invalid_argument, __throw_out_of_range)
1761         (__throw_out_of_range_fmt, __throw_runtime_error)
1762         (__throw_overflow_error): Define inline.
1763         * include/std/bitset (_M_copy_from_ptr) [!_GLIBCXX_HOSTED]:
1764         Replace __builtin_abort with __throw_invalid_argument.
1766 2022-10-04  Patrick Palka  <ppalka@redhat.com>
1768         * include/std/ranges: Include <variant> for C++23.
1769         (__detail::__compatible_joinable_ranges): Define.
1770         (__detail::__bidirectional_common): Define.
1771         (join_with_view): Define.
1772         (join_with_view::_Iterator): Define.
1773         (join_with_view::_Sentinel): Define.
1774         (views::__detail::__can_join_with_view): Define.
1775         (views::_JoinWith, views::join_with): Define.
1776         * testsuite/std/ranges/adaptors/join_with/1.cc: New test.
1778 2022-10-04  Arsen Arsenović  <arsen@aarsen.me>
1780         * include/std/iostream: Use ///< for inline documentation.
1781         * include/std/limits: Likewise.
1782         * include/experimental/internet: Likewise.
1784 2022-10-03  Jonathan Wakely  <jwakely@redhat.com>
1786         * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
1787         * doc/html/manual/status.html: Regenerate.
1789 2022-10-03  Arsen Arsenović  <arsen@aarsen.me>
1791         PR libstdc++/103626
1792         * testsuite/17_intro/headers/c++1998/stdc++_assert_neg.cc:
1793         Require ET hosted.
1794         * testsuite/18_support/aligned_alloc/aligned_alloc.cc: Likewise.
1795         * testsuite/18_support/new_nothrow.cc: Likewise.
1796         * testsuite/20_util/allocator/105975.cc: Likewise.
1797         * testsuite/20_util/allocator/14176.cc: Likewise.
1798         * testsuite/20_util/allocator/64135.cc: Likewise.
1799         * testsuite/20_util/allocator/89510.cc: Likewise.
1800         * testsuite/20_util/allocator/lwg3190.cc: Likewise.
1801         * testsuite/20_util/allocator/overaligned.cc: Likewise.
1802         * testsuite/20_util/allocator/rebind_c++20.cc: Likewise.
1803         * testsuite/20_util/allocator/requirements/constexpr.cc:
1804         Likewise.
1805         * testsuite/20_util/allocator/requirements/explicit_instantiation/1.cc:
1806         Likewise.
1807         * testsuite/20_util/allocator/requirements/typedefs.cc:
1808         Likewise.
1809         * testsuite/20_util/allocator/requirements/typedefs_c++20.cc:
1810         Likewise.
1811         * testsuite/20_util/allocator/void.cc: Likewise.
1812         * testsuite/20_util/allocator_traits/header-2.cc: Likewise.
1813         * testsuite/20_util/allocator_traits/header.cc: Likewise.
1814         * testsuite/20_util/allocator_traits/members/92878_92947.cc:
1815         Likewise.
1816         * testsuite/20_util/allocator_traits/members/pointers.cc:
1817         Likewise.
1818         * testsuite/20_util/allocator_traits/requirements/typedefs.cc:
1819         Likewise.
1820         * testsuite/20_util/bad_function_call/cons_virtual_derivation.cc:
1821         Likewise.
1822         * testsuite/20_util/bind/42593.cc: Likewise.
1823         * testsuite/20_util/bitset/access/dr396.cc: Likewise.
1824         * testsuite/20_util/bitset/access/to_string.cc: Likewise.
1825         * testsuite/20_util/bitset/cons/16020.cc: Likewise.
1826         * testsuite/20_util/bitset/cons/dr1325-2.cc: Likewise.
1827         * testsuite/20_util/bitset/cons/dr396.cc: Likewise.
1828         * testsuite/20_util/bitset/debug/invalidation/1.cc: Likewise.
1829         * testsuite/20_util/bitset/ext/15361.cc: Likewise.
1830         * testsuite/20_util/bitset/operations/13838.cc: Likewise.
1831         * testsuite/20_util/bitset/operations/96303.cc: Likewise.
1832         * testsuite/20_util/bitset/version.cc: Likewise.
1833         * testsuite/20_util/enable_shared_from_this/56383.cc: Likewise.
1834         * testsuite/20_util/enable_shared_from_this/89303.cc: Likewise.
1835         * testsuite/20_util/enable_shared_from_this/members/assign.cc:
1836         Likewise.
1837         * testsuite/20_util/enable_shared_from_this/members/const.cc:
1838         Likewise.
1839         * testsuite/20_util/enable_shared_from_this/members/reinit.cc:
1840         Likewise.
1841         * testsuite/20_util/enable_shared_from_this/members/unique_ptr.cc:
1842         Likewise.
1843         * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
1844         Likewise.
1845         * testsuite/20_util/enable_shared_from_this/requirements/explicit_instantiation.cc:
1846         Likewise.
1847         * testsuite/20_util/forward/1.cc: Likewise.
1848         * testsuite/20_util/forward/1_neg.cc: Likewise.
1849         * testsuite/20_util/function/1.cc: Likewise.
1850         * testsuite/20_util/function/10.cc: Likewise.
1851         * testsuite/20_util/function/2.cc: Likewise.
1852         * testsuite/20_util/function/3.cc: Likewise.
1853         * testsuite/20_util/function/4.cc: Likewise.
1854         * testsuite/20_util/function/43397.cc: Likewise.
1855         * testsuite/20_util/function/48541.cc: Likewise.
1856         * testsuite/20_util/function/5.cc: Likewise.
1857         * testsuite/20_util/function/58569.cc: Likewise.
1858         * testsuite/20_util/function/6.cc: Likewise.
1859         * testsuite/20_util/function/60594.cc: Likewise.
1860         * testsuite/20_util/function/65760.cc: Likewise.
1861         * testsuite/20_util/function/69222.cc: Likewise.
1862         * testsuite/20_util/function/7.cc: Likewise.
1863         * testsuite/20_util/function/77322.cc: Likewise.
1864         * testsuite/20_util/function/8.cc: Likewise.
1865         * testsuite/20_util/function/9.cc: Likewise.
1866         * testsuite/20_util/function/91456.cc: Likewise.
1867         * testsuite/20_util/function/assign/move.cc: Likewise.
1868         * testsuite/20_util/function/assign/move_target.cc: Likewise.
1869         * testsuite/20_util/function/cmp/cmp_neg.cc: Likewise.
1870         * testsuite/20_util/function/cons/55320.cc: Likewise.
1871         * testsuite/20_util/function/cons/57465.cc: Likewise.
1872         * testsuite/20_util/function/cons/72820.cc: Likewise.
1873         * testsuite/20_util/function/cons/addressof.cc: Likewise.
1874         * testsuite/20_util/function/cons/callable.cc: Likewise.
1875         * testsuite/20_util/function/cons/deduction.cc: Likewise.
1876         * testsuite/20_util/function/cons/lwg2774.cc: Likewise.
1877         * testsuite/20_util/function/cons/move.cc: Likewise.
1878         * testsuite/20_util/function/cons/move_target.cc: Likewise.
1879         * testsuite/20_util/function/cons/noexcept.cc: Likewise.
1880         * testsuite/20_util/function/cons/non_copyconstructible.cc:
1881         Likewise.
1882         * testsuite/20_util/function/cons/refqual.cc: Likewise.
1883         * testsuite/20_util/function/cons/70692.cc: Likewise.
1884         * testsuite/20_util/function/cons/deduction_c++23.cc: Likewise.
1885         * testsuite/20_util/function/invoke/forwarding.cc: Likewise.
1886         * testsuite/20_util/function/invoke/move_only.cc: Likewise.
1887         * testsuite/20_util/function/null_pointer_comparisons.cc:
1888         Likewise.
1889         * testsuite/20_util/function/requirements/explicit_instantiation.cc:
1890         Likewise.
1891         * testsuite/20_util/function/target_no_rtti.cc: Likewise.
1892         * testsuite/20_util/function_objects/83607.cc: Likewise.
1893         * testsuite/20_util/function_objects/mem_fn/adl.cc: Likewise.
1894         * testsuite/20_util/headers/cstdlib/functions_std.cc: Likewise.
1895         * testsuite/20_util/headers/functional/types_std_c++0x.cc:
1896         Likewise.
1897         * testsuite/20_util/headers/memory/types_std_c++0x.cc: Likewise.
1898         * testsuite/20_util/is_function/35637.cc: Likewise.
1899         * testsuite/20_util/move/1.cc: Likewise.
1900         * testsuite/20_util/move_only_function/call.cc: Likewise.
1901         * testsuite/20_util/move_only_function/cons.cc: Likewise.
1902         * testsuite/20_util/move_only_function/move.cc: Likewise.
1903         * testsuite/20_util/move_only_function/version.cc: Likewise.
1904         * testsuite/20_util/owner_less/cmp.cc: Likewise.
1905         * testsuite/20_util/owner_less/noexcept.cc: Likewise.
1906         * testsuite/20_util/owner_less/void.cc: Likewise.
1907         * testsuite/20_util/pointer_safety/1.cc: Likewise.
1908         * testsuite/20_util/scoped_allocator/65279.cc: Likewise.
1909         * testsuite/20_util/scoped_allocator/69293_neg.cc: Likewise.
1910         * testsuite/20_util/scoped_allocator/construct_pair.cc:
1911         Likewise.
1912         * testsuite/20_util/scoped_allocator/dr2586.cc: Likewise.
1913         * testsuite/20_util/scoped_allocator/requirements/explicit_instantiation.cc:
1914         Likewise.
1915         * testsuite/20_util/shared_ptr/assign/assign.cc: Likewise.
1916         * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise.
1917         * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
1918         * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc:
1919         Likewise.
1920         * testsuite/20_util/shared_ptr/assign/dr541.cc: Likewise.
1921         * testsuite/20_util/shared_ptr/assign/move.cc: Likewise.
1922         * testsuite/20_util/shared_ptr/assign/sfinae.cc: Likewise.
1923         * testsuite/20_util/shared_ptr/assign/shared_ptr.cc: Likewise.
1924         * testsuite/20_util/shared_ptr/assign/shared_ptr_neg.cc:
1925         Likewise.
1926         * testsuite/20_util/shared_ptr/assign/unique_ptr_lvalue_neg.cc:
1927         Likewise.
1928         * testsuite/20_util/shared_ptr/assign/unique_ptr_rvalue.cc:
1929         Likewise.
1930         * testsuite/20_util/shared_ptr/atomic/1.cc: Likewise.
1931         * testsuite/20_util/shared_ptr/atomic/2.cc: Likewise.
1932         * testsuite/20_util/shared_ptr/casts/1.cc: Likewise.
1933         * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
1934         * testsuite/20_util/shared_ptr/casts/rval.cc: Likewise.
1935         * testsuite/20_util/shared_ptr/comparison/42925.cc: Likewise.
1936         * testsuite/20_util/shared_ptr/comparison/86537.cc: Likewise.
1937         * testsuite/20_util/shared_ptr/comparison/cmp.cc: Likewise.
1938         * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc:
1939         Likewise.
1940         * testsuite/20_util/shared_ptr/comparison/dr1401.cc: Likewise.
1941         * testsuite/20_util/shared_ptr/comparison/less.cc: Likewise.
1942         * testsuite/20_util/shared_ptr/cons/39405.cc: Likewise.
1943         * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
1944         * testsuite/20_util/shared_ptr/cons/46910.cc: Likewise.
1945         * testsuite/20_util/shared_ptr/cons/51365.cc: Likewise.
1946         * testsuite/20_util/shared_ptr/cons/52924.cc: Likewise.
1947         * testsuite/20_util/shared_ptr/cons/55123.cc: Likewise.
1948         * testsuite/20_util/shared_ptr/cons/58659.cc: Likewise.
1949         * testsuite/20_util/shared_ptr/cons/58839.cc: Likewise.
1950         * testsuite/20_util/shared_ptr/cons/61036.cc: Likewise.
1951         * testsuite/20_util/shared_ptr/cons/79467.cc: Likewise.
1952         * testsuite/20_util/shared_ptr/cons/80229.cc: Likewise.
1953         * testsuite/20_util/shared_ptr/cons/alias-rval.cc: Likewise.
1954         * testsuite/20_util/shared_ptr/cons/alias.cc: Likewise.
1955         * testsuite/20_util/shared_ptr/cons/array.cc: Likewise.
1956         * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise.
1957         * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise.
1958         * testsuite/20_util/shared_ptr/cons/copy.cc: Likewise.
1959         * testsuite/20_util/shared_ptr/cons/deduction.cc: Likewise.
1960         * testsuite/20_util/shared_ptr/cons/default.cc: Likewise.
1961         * testsuite/20_util/shared_ptr/cons/lwg2802.cc: Likewise.
1962         * testsuite/20_util/shared_ptr/cons/lwg3548.cc: Likewise.
1963         * testsuite/20_util/shared_ptr/cons/move.cc: Likewise.
1964         * testsuite/20_util/shared_ptr/cons/noexcept_move_construct.cc:
1965         Likewise.
1966         * testsuite/20_util/shared_ptr/cons/nullptr.cc: Likewise.
1967         * testsuite/20_util/shared_ptr/cons/pointer.cc: Likewise.
1968         * testsuite/20_util/shared_ptr/cons/unique_ptr.cc: Likewise.
1969         * testsuite/20_util/shared_ptr/cons/unique_ptr_array.cc:
1970         Likewise.
1971         * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc:
1972         Likewise.
1973         * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_1.cc:
1974         Likewise.
1975         * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc:
1976         Likewise.
1977         * testsuite/20_util/shared_ptr/cons/void_neg.cc: Likewise.
1978         * testsuite/20_util/shared_ptr/cons/weak_ptr.cc: Likewise.
1979         * testsuite/20_util/shared_ptr/creation/36949.cc: Likewise.
1980         * testsuite/20_util/shared_ptr/creation/58594-no-rtti.cc:
1981         Likewise.
1982         * testsuite/20_util/shared_ptr/creation/58594.cc: Likewise.
1983         * testsuite/20_util/shared_ptr/creation/87278.cc: Likewise.
1984         * testsuite/20_util/shared_ptr/creation/92878_92947.cc:
1985         Likewise.
1986         * testsuite/20_util/shared_ptr/creation/99006.cc: Likewise.
1987         * testsuite/20_util/shared_ptr/creation/dr402.cc: Likewise.
1988         * testsuite/20_util/shared_ptr/creation/dr925.cc: Likewise.
1989         * testsuite/20_util/shared_ptr/creation/make.cc: Likewise.
1990         * testsuite/20_util/shared_ptr/creation/no_rtti.cc: Likewise.
1991         * testsuite/20_util/shared_ptr/creation/overwrite.cc: Likewise.
1992         * testsuite/20_util/shared_ptr/creation/private.cc: Likewise.
1993         * testsuite/20_util/shared_ptr/creation/single_allocation.cc:
1994         Likewise.
1995         * testsuite/20_util/shared_ptr/creation/single_allocation_no_rtti.cc:
1996         Likewise.
1997         * testsuite/20_util/shared_ptr/creation/version.cc: Likewise.
1998         * testsuite/20_util/shared_ptr/dest/dest.cc: Likewise.
1999         * testsuite/20_util/shared_ptr/hash/1.cc: Likewise.
2000         * testsuite/20_util/shared_ptr/misc/24595.cc: Likewise.
2001         * testsuite/20_util/shared_ptr/misc/42019.cc: Likewise.
2002         * testsuite/20_util/shared_ptr/misc/get_deleter.cc: Likewise.
2003         * testsuite/20_util/shared_ptr/misc/swap.cc: Likewise.
2004         * testsuite/20_util/shared_ptr/modifiers/reset.cc: Likewise.
2005         * testsuite/20_util/shared_ptr/modifiers/reset_neg.cc: Likewise.
2006         * testsuite/20_util/shared_ptr/modifiers/reset_sfinae.cc:
2007         Likewise.
2008         * testsuite/20_util/shared_ptr/modifiers/swap.cc: Likewise.
2009         * testsuite/20_util/shared_ptr/modifiers/swap_neg.cc: Likewise.
2010         * testsuite/20_util/shared_ptr/observers/array.cc: Likewise.
2011         * testsuite/20_util/shared_ptr/observers/bool_conv.cc: Likewise.
2012         * testsuite/20_util/shared_ptr/observers/get.cc: Likewise.
2013         * testsuite/20_util/shared_ptr/observers/owner_before.cc:
2014         Likewise.
2015         * testsuite/20_util/shared_ptr/observers/unique.cc: Likewise.
2016         * testsuite/20_util/shared_ptr/observers/use_count.cc: Likewise.
2017         * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/1.cc:
2018         Likewise.
2019         * testsuite/20_util/shared_ptr/requirements/explicit_instantiation/2.cc:
2020         Likewise.
2021         * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
2022         Likewise.
2023         * testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
2024         Likewise.
2025         * testsuite/20_util/temporary_buffer.cc: Likewise.
2026         * testsuite/20_util/tuple/48476.cc: Likewise.
2027         * testsuite/20_util/tuple/cons/90700.cc: Likewise.
2028         * testsuite/20_util/tuple/cons/96803.cc: Likewise.
2029         * testsuite/20_util/tuple/cons/allocator_with_any.cc: Likewise.
2030         * testsuite/20_util/tuple/cons/allocators.cc: Likewise.
2031         * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc:
2032         Likewise.
2033         * testsuite/20_util/tuple/cons/explicit_construct.cc: Likewise.
2034         * testsuite/20_util/tuple/p2321r2.cc: Likewise.
2035         * testsuite/20_util/unique_ptr/creation/92878_92947.cc:
2036         Likewise.
2037         * testsuite/20_util/unique_ptr/creation/array.cc: Likewise.
2038         * testsuite/20_util/unique_ptr/creation/array_neg.cc: Likewise.
2039         * testsuite/20_util/unique_ptr/creation/constexpr.cc: Likewise.
2040         * testsuite/20_util/unique_ptr/creation/for_overwrite.cc:
2041         Likewise.
2042         * testsuite/20_util/unique_ptr/creation/for_overwrite__neg.cc:
2043         Likewise.
2044         * testsuite/20_util/unique_ptr/creation/single.cc: Likewise.
2045         * testsuite/20_util/uses_allocator/69293_neg.cc: Likewise.
2046         * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
2047         * testsuite/20_util/uses_allocator/uninitialized_construct.cc:
2048         Likewise.
2049         * testsuite/20_util/weak_ptr/comparison/cmp_neg.cc: Likewise.
2050         * testsuite/20_util/weak_ptr/cons/deduction.cc: Likewise.
2051         * testsuite/20_util/weak_ptr/cons/noexcept_move_construct.cc:
2052         Likewise.
2053         * testsuite/20_util/weak_ptr/lock/1.cc: Likewise.
2054         * testsuite/20_util/weak_ptr/observers/owner_before.cc:
2055         Likewise.
2056         * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/1.cc:
2057         Likewise.
2058         * testsuite/20_util/weak_ptr/requirements/explicit_instantiation/2.cc:
2059         Likewise.
2060         * testsuite/21_strings/basic_string/version.cc: Likewise.
2061         * testsuite/21_strings/basic_string_view/operations/contains/char/2.cc:
2062         Likewise.
2063         * testsuite/21_strings/c_strings/char/69626.cc: Likewise.
2064         * testsuite/21_strings/char_traits/requirements/version.cc:
2065         Likewise.
2066         * testsuite/23_containers/vector/requirements/version.cc:
2067         Likewise.
2068         * testsuite/24_iterators/back_insert_iterator/requirements/base_classes.cc:
2069         Likewise.
2070         * testsuite/24_iterators/front_insert_iterator/requirements/base_classes.cc:
2071         Likewise.
2072         * testsuite/24_iterators/insert_iterator/requirements/base_classes.cc:
2073         Likewise.
2074         * testsuite/24_iterators/istream_iterator/requirements/base_classes.cc:
2075         Likewise.
2076         * testsuite/24_iterators/istreambuf_iterator/92285.cc: Likewise.
2077         * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
2078         Likewise.
2079         * testsuite/24_iterators/istreambuf_iterator/requirements/base_classes.cc:
2080         Likewise.
2081         * testsuite/24_iterators/istreambuf_iterator/requirements/dr445.cc:
2082         Likewise.
2083         * testsuite/24_iterators/ostream_iterator/requirements/base_classes.cc:
2084         Likewise.
2085         * testsuite/24_iterators/ostreambuf_iterator/requirements/base_classes.cc:
2086         Likewise.
2087         * testsuite/25_algorithms/constexpr_macro.cc: Likewise.
2088         * testsuite/25_algorithms/equal/constrained.cc: Likewise.
2089         * testsuite/25_algorithms/headers/cstdlib/functions_std.cc:
2090         Likewise.
2091         * testsuite/25_algorithms/inplace_merge/1.cc: Likewise.
2092         * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
2093         Likewise.
2094         * testsuite/25_algorithms/make_heap/movable.cc: Likewise.
2095         * testsuite/25_algorithms/pstl/feature_test-4.cc: Likewise.
2096         * testsuite/25_algorithms/random_shuffle/1.cc: Likewise.
2097         * testsuite/25_algorithms/random_shuffle/moveable.cc: Likewise.
2098         * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
2099         Likewise.
2100         * testsuite/25_algorithms/sort/35588.cc: Likewise.
2101         * testsuite/25_algorithms/stable_partition/1.cc: Likewise.
2102         * testsuite/25_algorithms/stable_partition/constrained.cc:
2103         Likewise.
2104         * testsuite/25_algorithms/stable_partition/mem_check.cc:
2105         Likewise.
2106         * testsuite/25_algorithms/stable_partition/moveable.cc:
2107         Likewise.
2108         * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc:
2109         Likewise.
2110         * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc:
2111         Likewise.
2112         * testsuite/25_algorithms/stable_sort/1.cc: Likewise.
2113         * testsuite/26_numerics/complex/2.cc: Likewise.
2114         * testsuite/26_numerics/headers/cstdlib/13943.cc: Likewise.
2115         * testsuite/26_numerics/headers/cstdlib/2190.cc: Likewise.
2116         * testsuite/26_numerics/headers/cstdlib/60401.cc: Likewise.
2117         * testsuite/26_numerics/headers/cstdlib/dr2192.cc: Likewise.
2118         * testsuite/26_numerics/headers/cstdlib/dr2192_neg.cc: Likewise.
2119         * testsuite/26_numerics/headers/cstdlib/dr2735.cc: Likewise.
2120         * testsuite/26_numerics/headers/cstdlib/functions_std.cc:
2121         Likewise.
2122         * testsuite/26_numerics/headers/cstdlib/macros.cc: Likewise.
2123         * testsuite/26_numerics/headers/cstdlib/types_std.cc: Likewise.
2124         * testsuite/26_numerics/headers/cstdlib/types_std_c++0x.cc:
2125         Likewise.
2126         * testsuite/26_numerics/lerp/version.cc: Likewise.
2127         * testsuite/26_numerics/midpoint/version.cc: Likewise.
2128         * testsuite/27_io/basic_syncbuf/2.cc: Likewise.
2129         * testsuite/27_io/basic_syncstream/2.cc: Likewise.
2130         * testsuite/27_io/fpos/14320-1.cc: Likewise.
2131         * testsuite/27_io/fpos/14320-2.cc: Likewise.
2132         * testsuite/27_io/fpos/14320-3.cc: Likewise.
2133         * testsuite/27_io/fpos/14320-4.cc: Likewise.
2134         * testsuite/27_io/spanstream/version.cc: Likewise.
2135         * testsuite/29_atomics/atomic/lwg3220.cc: Likewise.
2136         * testsuite/29_atomics/atomic/operators/51811.cc: Likewise.
2137         * testsuite/29_atomics/atomic/wait_notify/1.cc: Likewise.
2138         * testsuite/29_atomics/atomic/wait_notify/102994.cc: Likewise.
2139         * testsuite/29_atomics/atomic/wait_notify/2.cc: Likewise.
2140         * testsuite/29_atomics/headers/stdatomic.h/version.cc: Likewise.
2141         * testsuite/30_threads/barrier/2.cc: Likewise.
2142         * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
2143         Likewise.
2144         * testsuite/30_threads/jthread/version.cc: Likewise.
2145         * testsuite/30_threads/latch/2.cc: Likewise.
2146         * testsuite/30_threads/semaphore/2.cc: Likewise.
2147         * testsuite/30_threads/stop_token/2.cc: Likewise.
2148         * testsuite/abi/pr42230.cc: Likewise.
2149         * testsuite/ext/shared_ptr/1.cc: Likewise.
2150         * testsuite/libstdc++-xmethods/shared_ptr.cc: Likewise.
2151         * testsuite/std/ranges/adaptors/lazy_split_neg.cc: Likewise.
2152         * testsuite/std/ranges/adaptors/p1739.cc: Likewise.
2153         * testsuite/std/ranges/iota/lwg3292_neg.cc: Likewise.
2154         * testsuite/std/ranges/p2325.cc: Likewise.
2156 2022-10-03  Jonathan Wakely  <jwakely@redhat.com>
2158         * include/std/bitset (bitset(const C*, size_type n, C, C))
2159         [!_GLIBCXX_HOSTED]: Remove std::basic_string dependency.
2160         (_M_copy_from_ptr) [!_GLIBCXX_HOSTED]: Abort instead of
2161         throwing.
2163 2022-10-03  Arsen Arsenović  <arsen@aarsen.me>
2165         PR libstdc++/103626
2166         * include/std/bitset [!_GLIBCXX_HOSTED]: Re-enable std::hash.
2167         * testsuite/20_util/bitset/cons/constexpr_c++23.cc: Require ET
2168         hosted.
2169         * testsuite/20_util/bitset/ext/constexpr.cc: Likewise.
2171 2022-10-03  Jonathan Wakely  <jwakely@redhat.com>
2173         PR libstdc++/103626
2174         * testsuite/lib/libstdc++.exp (check_effective_target_stacktrace):
2175         Also require hosted.
2176         (check_effective_target_hosted): New proc.
2178 2022-10-03  Arsen Arsenović  <arsen@aarsen.me>
2179             Jonathan Wakely  <jwakely@redhat.com>
2181         PR libstdc++/103626
2182         * testsuite/17_intro/headers/c++1998/stdc++.cc [!__STDC_HOSTED__]:
2183         Do not include C headers that aren't valid for freestanding.
2184         * testsuite/17_intro/tag_type_explicit_ctor.cc [!__STDC_HOSTED__]:
2185         Do not test tag types that aren't defined for freestanding.
2186         * testsuite/18_support/headers/cstdlib/functions_std.cc: Do not
2187         check for std::getenv and std::system for freestanding.
2188         * testsuite/17_intro/using_namespace_std_exp_neg.cc [!__STDC_HOSTED__]:
2189         Do not test hosted parts of the standard library.
2190         * testsuite/17_intro/using_namespace_std_tr1_neg.cc [!__STDC_HOSTED__]:
2191         Likewise.
2192         * testsuite/20_util/allocator_traits/members/rebind_alloc.cc [!__STDC_HOSTED__]:
2193         Likewise.
2194         * testsuite/20_util/allocator_traits/requirements/explicit_instantiation.cc [!HOSTED]:
2195         Likewise.
2196         * testsuite/20_util/headers/bitset/synopsis.cc [!__STDC_HOSTED__]: Likewise.
2197         * testsuite/20_util/make_unsigned/requirements/typedefs_neg.cc [!__STDC_HOSTED__]:
2198         Likewise.
2199         * testsuite/20_util/pointer_traits/requirements/typedefs.cc [!__STDC_HOSTED__]:
2200         Likewise.
2201         * testsuite/20_util/tuple/cons/deduction.cc [!__STDC_HOSTED__]: Likewise.
2202         * testsuite/25_algorithms/move/93872.cc [!__STDC_HOSTED__]: Likewise.
2203         * testsuite/std/ranges/adaptors/100577.cc [!__STDC_HOSTED__]: Likewise.
2205 2022-10-03  Arsen Arsenović  <arsen@aarsen.me>
2207         PR libstdc++/106953
2208         * include/Makefile.am [!_GLIBCXX_HOSTED]: Remove
2209         install-freestanding-headers, unifying it with the usual
2210         install-headers
2211         * include/Makefile.in: Regenerate.
2213 2022-10-03  Arsen Arsenović  <arsen@aarsen.me>
2214             Jonathan Wakely  <jwakely@redhat.com>
2216         PR libstdc++/103626
2217         * include/Makefile.am: Add new header.
2218         * include/Makefile.in: Regenerate.
2219         * include/bits/requires_hosted.h: New header.
2220         * include/experimental/algorithm: Include
2221         <bits/requires_hosted.h>.
2222         * include/experimental/any: Likewise.
2223         * include/experimental/array: Likewise.
2224         * include/experimental/buffer: Likewise.
2225         * include/experimental/chrono: Likewise.
2226         * include/experimental/deque: Likewise.
2227         * include/experimental/executor: Likewise.
2228         * include/experimental/filesystem: Likewise.
2229         * include/experimental/forward_list: Likewise.
2230         * include/experimental/functional: Likewise.
2231         * include/experimental/internet: Likewise.
2232         * include/experimental/io_context: Likewise.
2233         * include/experimental/iterator: Likewise.
2234         * include/experimental/list: Likewise.
2235         * include/experimental/map: Likewise.
2236         * include/experimental/memory: Likewise.
2237         * include/experimental/memory_resource: Likewise.
2238         * include/experimental/net: Likewise.
2239         * include/experimental/netfwd: Likewise.
2240         * include/experimental/numeric: Likewise.
2241         * include/experimental/optional: Likewise.
2242         * include/experimental/propagate_const: Likewise.
2243         * include/experimental/random: Likewise.
2244         * include/experimental/ratio: Likewise.
2245         * include/experimental/regex: Likewise.
2246         * include/experimental/scope: Likewise.
2247         * include/experimental/set: Likewise.
2248         * include/experimental/simd: Likewise.
2249         * include/experimental/socket: Likewise.
2250         * include/experimental/source_location: Likewise.
2251         * include/experimental/string: Likewise.
2252         * include/experimental/string_view: Likewise.
2253         * include/experimental/system_error: Likewise.
2254         * include/experimental/timer: Likewise.
2255         * include/experimental/tuple: Likewise.
2256         * include/experimental/unordered_map: Likewise.
2257         * include/experimental/unordered_set: Likewise.
2258         * include/experimental/utility: Likewise.
2259         * include/experimental/vector: Likewise.
2260         * include/std/barrier: Likewise.
2261         * include/std/chrono: Likewise.
2262         * include/std/condition_variable: Likewise.
2263         * include/std/deque: Likewise.
2264         * include/std/execution: Likewise.
2265         * include/std/filesystem: Likewise.
2266         * include/std/forward_list: Likewise.
2267         * include/std/fstream: Likewise.
2268         * include/std/future: Likewise.
2269         * include/std/iomanip: Likewise.
2270         * include/std/ios: Likewise.
2271         * include/std/iosfwd: Likewise.
2272         * include/std/iostream: Likewise.
2273         * include/std/istream: Likewise.
2274         * include/std/latch: Likewise.
2275         * include/std/list: Likewise.
2276         * include/std/locale: Likewise.
2277         * include/std/map: Likewise.
2278         * include/std/memory_resource: Likewise.
2279         * include/std/mutex: Likewise.
2280         * include/std/ostream: Likewise.
2281         * include/std/queue: Likewise.
2282         * include/std/random: Likewise.
2283         * include/std/regex: Likewise.
2284         * include/std/semaphore: Likewise.
2285         * include/std/set: Likewise.
2286         * include/std/shared_mutex: Likewise.
2287         * include/std/spanstream: Likewise.
2288         * include/std/sstream: Likewise.
2289         * include/std/stack: Likewise.
2290         * include/std/stacktrace: Likewise.
2291         * include/std/stop_token: Likewise.
2292         * include/std/streambuf: Likewise.
2293         * include/std/string: Likewise.
2294         * include/std/syncstream: Likewise.
2295         * include/std/system_error: Likewise.
2296         * include/std/thread: Likewise.
2297         * include/std/unordered_map: Likewise.
2298         * include/std/unordered_set: Likewise.
2299         * include/std/valarray: Likewise.
2300         * include/std/vector: Likewise.
2301         * include/tr1/array: Likewise.
2302         * include/tr1/ccomplex: Likewise.
2303         * include/tr1/cctype: Likewise.
2304         * include/tr1/cfenv: Likewise.
2305         * include/tr1/cfloat: Likewise.
2306         * include/tr1/cinttypes: Likewise.
2307         * include/tr1/climits: Likewise.
2308         * include/tr1/cmath: Likewise.
2309         * include/tr1/complex: Likewise.
2310         * include/tr1/complex.h: Likewise.
2311         * include/tr1/cstdarg: Likewise.
2312         * include/tr1/cstdbool: Likewise.
2313         * include/tr1/cstdint: Likewise.
2314         * include/tr1/cstdio: Likewise.
2315         * include/tr1/cstdlib: Likewise.
2316         * include/tr1/ctgmath: Likewise.
2317         * include/tr1/ctime: Likewise.
2318         * include/tr1/ctype.h: Likewise.
2319         * include/tr1/cwchar: Likewise.
2320         * include/tr1/cwctype: Likewise.
2321         * include/tr1/fenv.h: Likewise.
2322         * include/tr1/float.h: Likewise.
2323         * include/tr1/functional: Likewise.
2324         * include/tr1/inttypes.h: Likewise.
2325         * include/tr1/limits.h: Likewise.
2326         * include/tr1/math.h: Likewise.
2327         * include/tr1/memory: Likewise.
2328         * include/tr1/random: Likewise.
2329         * include/tr1/regex: Likewise.
2330         * include/tr1/stdarg.h: Likewise.
2331         * include/tr1/stdbool.h: Likewise.
2332         * include/tr1/stdint.h: Likewise.
2333         * include/tr1/stdio.h: Likewise.
2334         * include/tr1/stdlib.h: Likewise.
2335         * include/tr1/tgmath.h: Likewise.
2336         * include/tr1/tuple: Likewise.
2337         * include/tr1/type_traits: Likewise.
2338         * include/tr1/unordered_map: Likewise.
2339         * include/tr1/unordered_set: Likewise.
2340         * include/tr1/utility: Likewise.
2341         * include/tr1/wchar.h: Likewise.
2342         * include/tr1/wctype.h: Likewise.
2343         * include/c_global/cmath: Likewise.
2344         * include/ext/algorithm: Include <bits/requires_hosted.h>.
2345         * include/ext/bitmap_allocator.h: Likewise.
2346         * include/ext/cmath: Likewise.
2347         * include/ext/codecvt_specializations.h: Likewise.
2348         * include/ext/debug_allocator.h: Likewise.
2349         * include/ext/enc_filebuf.h: Likewise.
2350         * include/ext/extptr_allocator.h: Likewise.
2351         * include/ext/functional: Likewise.
2352         * include/ext/malloc_allocator.h: Likewise.
2353         * include/ext/memory: Likewise.
2354         * include/ext/mt_allocator.h: Likewise.
2355         * include/ext/new_allocator.h: Likewise.
2356         * include/ext/numeric: Likewise.
2357         * include/ext/pod_char_traits.h: Likewise.
2358         * include/ext/pool_allocator.h: Likewise.
2359         * include/ext/random: Likewise.
2360         * include/ext/random.tcc: Likewise.
2361         * include/ext/rb_tree: Likewise.
2362         * include/ext/rc_string_base.h: Likewise.
2363         * include/ext/rope: Likewise.
2364         * include/ext/ropeimpl.h: Likewise.
2365         * include/ext/slist: Likewise.
2366         * include/ext/sso_string_base.h: Likewise.
2367         * include/ext/stdio_filebuf.h: Likewise.
2368         * include/ext/stdio_sync_filebuf.h: Likewise.
2369         * include/ext/string_conversions.h: Likewise.
2370         * include/ext/throw_allocator.h: Likewise.
2371         * include/ext/vstring.h: Likewise.
2372         * include/ext/vstring.tcc: Likewise.
2373         * include/ext/vstring_fwd.h: Likewise.
2374         * include/ext/vstring_util.h: Likewise.
2375         * include/std/charconv: Likewise.
2376         (__cpp_lib_to_chars): Do not define for freestanding.
2377         * include/std/version: Adjust which macros get defined in
2378         freestanding.
2379         * include/ext/pointer.h [!_GLIBCXX_HOSTED]: Omit iostream
2380         functionality from freestanding.
2381         * include/std/algorithm [!_GLIBCXX_HOSTED]: Omit PSTL algos.
2382         * include/std/memory [!_GLIBCXX_HOSTED]: Omit
2383         <bits/stl_tempbuf.h> in freestanding
2384         * include/bits/algorithmfwd.h [!_GLIBCXX_HOSTED]: Omit leftover
2385         random_shuffle and stable_partition definition.
2386         * include/bits/stl_algo.h [!_GLIBCXX_HOSTED]: Omit
2387         random_shuffle and stable_partition from freestanding.
2388         * include/bits/ranges_algo.h [!_GLIBCXX_HOSTED]: Omit
2389         stable_partition from freestanding.
2390         * include/bits/concept_check.h: Remove needless HOSTED check.
2391         * include/std/iterator: Include <bits/ranges_base.h>.
2392         * include/std/numeric (__cpp_lib_parallel_algorithms): Do not
2393         define for freestanding.
2394         * include/std/functional (__cpp_lib_boyer_moore_searcher):
2395         Likewise.
2396         * testsuite/lib/prune.exp: Match error for hosted-only libstdc++
2397         tests.
2399 2022-10-03  Jonathan Wakely  <jwakely@redhat.com>
2400             Arsen Arsenović  <arsen@aarsen.me>
2402         * include/precompiled/extc++.h [!_GLIBCXX_HOSTED]: Do not
2403         include headers that aren't valid for freestanding.
2404         * include/precompiled/stdc++.h [!_GLIBCXX_HOSTED]: Likewise.
2406 2022-10-03  Arsen Arsenović  <arsen@aarsen.me>
2408         * configure.ac: Remove any lines that unconditionally include
2409         <stdio.h> from ac_includes_default, when running Autoconf <2.70.
2410         * configure: Regenerate.
2412 2022-10-03  Jonathan Wakely  <jwakely@redhat.com>
2414         PR libstdc++/103626
2415         * acinclude.m4 (GLIBCXX_ENABLE_HOSTED): Define _GLIBCXX_HOSTED
2416         to __STDC_HOSTED__ for non-freestanding installations.
2417         * configure: Regenerate.
2418         * include/Makefile.am (${host_builddir}/c++config.h): Adjust
2419         grep pattern.
2420         * include/Makefile.in: Regenerate.
2421         * testsuite/lib/libstdc++.exp (v3-build_support): Use
2422         -fno-freestanding.
2423         * testsuite/libstdc++-abi/abi.exp: Likewise.
2425 2022-10-03  Jonathan Wakely  <jwakely@redhat.com>
2427         * testsuite/27_io/basic_ostream/inserters_other/char/6.cc:
2428         Change body of unused operator<< overload to throw if called.
2429         * testsuite/27_io/basic_ostream/inserters_other/wchar_t/6.cc:
2430         Likewise.
2432 2022-10-03  François Dumont  <fdumont@gcc.gnu.org>
2434         * python/libstdcxx/v6/printers.py (Printer.add_version): Do not add version
2435         namespace for __cxx11 symbols.
2436         (add_one_template_type_printer): Likewise.
2437         (add_one_type_printer): Likewise.
2438         (FilteringTypePrinter._recognizer.recognize): Add a workaround for std::string & al
2439         ambiguous typedef matching both std:: and std::__cxx11:: symbols.
2440         * testsuite/libstdc++-prettyprinters/cxx17.cc: Remove obsolete
2441         \#define _GLIBCXX_USE_CXX11_ABI 0.
2442         * testsuite/libstdc++-prettyprinters/simple.cc: Likewise. Adapt test to accept
2443         std::__cxx11::list.
2444         * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2445         * testsuite/libstdc++-prettyprinters/whatis.cc: Likewise.
2446         * testsuite/libstdc++-prettyprinters/80276.cc: Likewise and remove xfail for c++20
2447         and debug mode.
2448         * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
2450 2022-09-30  Jonathan Wakely  <jwakely@redhat.com>
2452         * testsuite/20_util/bitset/access/to_ulong.cc: Construct bitset
2453         from binary literal instead of using stringstream.
2455 2022-09-30  Jonathan Wakely  <jwakely@redhat.com>
2457         * include/std/bitset (operator>>): Use a simple buffer instead
2458         of std::basic_string.
2460 2022-09-30  Jonathan Wakely  <jwakely@redhat.com>
2462         * include/std/bitset (_M_copy_from_ptr, _M_copy_from_string)
2463         (_M_copy_to_string): Change access to private.
2464         (_M_copy_from_string(const basic_string&, size_t, size_t)):
2465         Remove.
2466         (_M_copy_to_string(const basic_string&)): Remove.
2468 2022-09-30  Jonathan Wakely  <jwakely@redhat.com>
2470         * testsuite/20_util/bind/ref_neg.cc: Fix dg-prune-output
2471         directive.
2473 2022-09-30  Torbjörn SVENSSON  <torbjorn.svensson@foss.st.com>
2474             Yvan ROUX   <yvan.roux@foss.st.com>
2476         * testsuite/20_util/bind/ref_neg.cc: Prune Windows paths too.
2478 2022-09-30  Arsen Arsenović  <arsen@aarsen.me>
2480         * include/std/bitset: Include <bits/stl_algobase.h>.
2482 2022-09-29  François Dumont  <fdumont@gcc.gnu.org>
2484         * python/libstdcxx/v6/printers.py (add_one_template_type_printer): Register
2485         printer for types in std::__debug namespace with template parameters in std::__8
2486         namespace.
2488 2022-09-29  Patrick Palka  <ppalka@redhat.com>
2490         * include/bits/unique_ptr.h (unique_ptr<_Tp[], _Dp>): Remove
2491         __remove_cv and use __remove_cv_t instead.
2493 2022-09-29  Jonathan Wakely  <jwakely@redhat.com>
2495         * include/std/type_traits (__is_invocable_impl): Check
2496         __has_builtin(__reference_converts_from_temporary) before using
2497         built-in.
2499 2022-09-28  Jonathan Wakely  <jwakely@redhat.com>
2501         * doc/xml/manual/evolution.xml: Document std::bind API
2502         changes.
2503         * doc/xml/manual/intro.xml: Document LWG 2487 status.
2504         * doc/xml/manual/using.xml: Clarify default value of
2505         _GLIBCXX_USE_DEPRECATED.
2506         * doc/html/*: Regenerate.
2507         * include/std/functional (_Bind::operator()(Args&&...) volatile)
2508         (_Bind::operator()(Args&&...) const volatile)
2509         (_Bind_result::operator()(Args&&...) volatile)
2510         (_Bind_result::operator()(Args&&...) const volatile): Replace
2511         with deleted overload for C++20 and later.
2512         * testsuite/20_util/bind/cv_quals.cc: Check for deprecated
2513         warnings in C++17.
2514         * testsuite/20_util/bind/cv_quals_2.cc: Likewise, and check for
2515         ill-formed in C++20.
2517 2022-09-28  Jonathan Wakely  <jwakely@redhat.com>
2519         PR libstdc++/70692
2520         * include/bits/invoke.h [__cplusplus < 201703] (__invoke_r):
2521         Remove is_invocable and is_convertible constraints.
2522         * include/std/type_traits (__is_invocable_impl::_S_conv): Use
2523         non-deduced context for parameter.
2524         (__is_invocable_impl::_S_test): Remove _Check_noex template
2525         parameter and use deduced noexcept value in its place. Add bool
2526         parameter to detect dangling references.
2527         (__is_invocable_impl::type): Adjust call to _S_test to avoid
2528         deducing unnecessary noexcept property..
2529         (__is_invocable_impl::__nothrow_type): Rename to ...
2530         (__is_invocable_impl::__nothrow_conv): ... this. Adjust call
2531         to _S_test to deduce noexcept property.
2532         * testsuite/20_util/bind/dangling_ref.cc: New test.
2533         * testsuite/20_util/function/cons/70692.cc: New test.
2534         * testsuite/20_util/function_objects/invoke/dangling_ref.cc:
2535         New test.
2536         * testsuite/20_util/is_invocable/dangling_ref.cc: New test.
2537         * testsuite/30_threads/packaged_task/cons/dangling_ref.cc:
2538         New test.
2540 2022-09-27  Jonathan Wakely  <jwakely@redhat.com>
2542         PR c++/107049
2543         * testsuite/20_util/is_convertible/requirements/access.cc: New
2544         test.
2546 2022-09-27  Jonathan Wakely  <jwakely@redhat.com>
2548         PR c++/106651
2549         * include/bits/std_function.h (__function_guide_t): New alias
2550         template.
2551         [__cpp_static_call_operator] (__function_guide_static_helper):
2552         New class template.
2553         (function): Use __function_guide_t in deduction guide.
2554         * include/std/future (packaged_task): Use __function_guide_t in
2555         deduction guide.
2556         * testsuite/20_util/function/cons/deduction_c++23.cc: New test.
2557         * testsuite/30_threads/packaged_task/cons/deduction_c++23.cc:
2558         New test.
2560 2022-09-26  Jonathan Wakely  <jwakely@redhat.com>
2562         * include/bits/ptr_traits.h (__ptr_traits_elem) [__cpp_concepts]:
2563         Also define the __ptr_traits_elem class template for the
2564         concepts case.
2565         (pointer_traits<Ptr>): Remove constrained partial
2566         specialization.
2567         * testsuite/20_util/pointer_traits/lwg3545.cc: Check for
2568         ambiguitiy with program-defined partial specialization.
2570 2022-09-26  Jonathan Wakely  <jwakely@redhat.com>
2572         * include/std/type_traits (is_convertible, is_convertible_v):
2573         Define using new built-in.
2574         (is_nothrow_convertible is_nothrow_convertible_v): Likewise.
2576 2022-09-26  Jonathan Wakely  <jwakely@redhat.com>
2578         PR libstdc++/107037
2579         * include/std/bitset (_Base_bitset::_M_do_reset): Use
2580         preprocessor conditional around non-C++03 code.
2581         * testsuite/20_util/bitset/107037.cc: New test.
2583 2022-09-24  Jonathan Wakely  <jwakely@redhat.com>
2585         * include/bits/alloc_traits.h (allocator_traits::is_always_equal):
2586         Only instantiate is_empty if needed.
2587         * include/bits/ptr_traits.h (__ptr_traits_impl::difference_type)
2588         (__ptr_traits_impl::rebind): Use __detected_or.
2589         * include/experimental/type_traits (is_same_v): Add a partial
2590         specialization instead of instantiating the std::is_same class
2591         template.
2592         (detected_t): Redefine in terms of detected_or_t.
2593         (is_detected, is_detected_v): Redefine in terms of detected_t.
2594         * include/std/type_traits [__cpp_concepts] (__detected_or): Add
2595         new definition using concepts.
2596         (__detector::value_t): Rename to __is_detected.
2597         * testsuite/17_intro/names.cc: Check value_t isn't used.
2599 2022-09-23  Jonathan Wakely  <jwakely@redhat.com>
2601         * testsuite/20_util/is_assignable/requirements/access.cc:
2602         New test.
2604 2022-09-23  Jonathan Wakely  <jwakely@redhat.com>
2606         PR libstdc++/91456
2607         * include/std/type_traits (__is_nothrow_invocable_lib): Remove.
2608         (__is_invocable_impl::__nothrow_type): New member type which
2609         checks if the conversion can throw.
2610         (__is_nt_invocable_impl): Replace class template with alias
2611         template to __is_nt_invocable_impl::__nothrow_type.
2612         * testsuite/20_util/is_nothrow_invocable/91456.cc: New test.
2613         * testsuite/20_util/is_nothrow_convertible/value.cc: Remove
2614         macro used by value_ext.cc test.
2615         * testsuite/20_util/is_nothrow_convertible/value_ext.cc: Remove
2616         test for non-standard __is_nothrow_invocable_lib trait.
2618 2022-09-23  Marek Polacek  <polacek@redhat.com>
2620         PR c++/106784
2621         * include/std/type_traits: Rename __is_nothrow_convertible to
2622         __is_nothrow_convertible_lib.
2623         * testsuite/20_util/is_nothrow_convertible/value_ext.cc: Likewise.
2625 2022-09-23  Jonathan Wakely  <jwakely@redhat.com>
2627         * include/std/bitset (operator>>): Do not copy for N==0.
2628         * testsuite/20_util/bitset/io/input.cc: Add comment.
2630 2022-09-23  Jonathan Wakely  <jwakely@redhat.com>
2632         * include/debug/bitset (__debug::bitset): Add constexpr to all
2633         member functions.
2634         (operator&, operator|, operator^): Add inline and constexpr.
2635         (operator>>, operator<<): Add inline.
2636         * testsuite/20_util/bitset/access/constexpr.cc: Only check using
2637         constexpr std::string for the cxx11 ABI.
2638         * testsuite/20_util/bitset/cons/constexpr_c++23.cc: Likewise.
2639         * testsuite/20_util/headers/bitset/synopsis.cc: Check constexpr
2640         for C++23.
2642 2022-09-23  Jonathan Wakely  <jwakely@redhat.com>
2644         * include/std/bitset (bitset::_M_copy_to_string): Find set bits
2645         instead of iterating over individual bits.
2647 2022-09-22  Jonathan Wakely  <jwakely@redhat.com>
2649         * include/std/bitset (bitset): Add constexpr for C++23. Guard
2650         members using std::string with _GLIBCXX_HOSTED.
2651         * include/std/version (__cpp_lib_constexpr_bitset): Define.
2652         * testsuite/20_util/bitset/access/constexpr.cc: New test.
2653         * testsuite/20_util/bitset/cons/constexpr_c++23.cc: New test.
2654         * testsuite/20_util/bitset/count/constexpr.cc: New test.
2655         * testsuite/20_util/bitset/ext/constexpr.cc: New test.
2656         * testsuite/20_util/bitset/operations/constexpr_c++23.cc: New test.
2657         * testsuite/20_util/bitset/version.cc: New test.
2659 2022-09-22  Jonathan Wakely  <jwakely@redhat.com>
2661         * testsuite/23_containers/bitset/18604.cc: Moved to...
2662         * testsuite/20_util/bitset/18604.cc: ...here.
2663         * testsuite/23_containers/bitset/45713.cc: Moved to...
2664         * testsuite/20_util/bitset/45713.cc: ...here.
2665         * testsuite/23_containers/bitset/to_string/dr396.cc: Moved to...
2666         * testsuite/20_util/bitset/access/dr396.cc: ...here.
2667         * testsuite/23_containers/bitset/to_string/1.cc: Moved to...
2668         * testsuite/20_util/bitset/access/to_string.cc: ...here.
2669         * testsuite/23_containers/bitset/to_ullong/1.cc: Moved to...
2670         * testsuite/20_util/bitset/access/to_ullong.cc: ...here.
2671         * testsuite/23_containers/bitset/to_ulong/1.cc: Moved to...
2672         * testsuite/20_util/bitset/access/to_ulong.cc: ...here.
2673         * testsuite/23_containers/bitset/cons/1.cc: Moved to...
2674         * testsuite/20_util/bitset/cons/1.cc: ...here.
2675         * testsuite/23_containers/bitset/cons/16020.cc: Moved to...
2676         * testsuite/20_util/bitset/cons/16020.cc: ...here.
2677         * testsuite/23_containers/bitset/cons/2.cc: Moved to...
2678         * testsuite/20_util/bitset/cons/2.cc: ...here.
2679         * testsuite/23_containers/bitset/cons/3.cc: Moved to...
2680         * testsuite/20_util/bitset/cons/3.cc: ...here.
2681         * testsuite/23_containers/bitset/cons/38244.cc: Moved to...
2682         * testsuite/20_util/bitset/cons/38244.cc: ...here.
2683         * testsuite/23_containers/bitset/cons/50268.cc: Moved to...
2684         * testsuite/20_util/bitset/cons/50268.cc: ...here.
2685         * testsuite/23_containers/bitset/cons/6282.cc: Moved to...
2686         * testsuite/20_util/bitset/cons/6282.cc: ...here.
2687         * testsuite/23_containers/bitset/cons/constexpr.cc: Moved to...
2688         * testsuite/20_util/bitset/cons/constexpr.cc: ...here.
2689         * testsuite/23_containers/bitset/cons/dr1325-1.cc: Moved to...
2690         * testsuite/20_util/bitset/cons/dr1325-1.cc: ...here.
2691         * testsuite/23_containers/bitset/cons/dr1325-2.cc: Moved to...
2692         * testsuite/20_util/bitset/cons/dr1325-2.cc: ...here.
2693         * testsuite/23_containers/bitset/cons/dr396.cc: Moved to...
2694         * testsuite/20_util/bitset/cons/dr396.cc: ...here.
2695         * testsuite/23_containers/bitset/debug/invalidation/1.cc: Moved to...
2696         * testsuite/20_util/bitset/debug/invalidation/1.cc: ...here.
2697         * testsuite/23_containers/bitset/ext/15361.cc: Moved to...
2698         * testsuite/20_util/bitset/ext/15361.cc: ...here.
2699         * testsuite/23_containers/bitset/hash/1.cc: Moved to...
2700         * testsuite/20_util/bitset/hash/1.cc: ...here.
2701         * testsuite/23_containers/bitset/input/1.cc: Moved to...
2702         * testsuite/20_util/bitset/io/input.cc: ...here.
2703         * testsuite/23_containers/bitset/count/6124.cc: Moved to...
2704         * testsuite/20_util/bitset/observers/6124.cc: ...here.
2705         * testsuite/23_containers/bitset/all/1.cc: Moved to...
2706         * testsuite/20_util/bitset/observers/all.cc: ...here.
2707         * testsuite/23_containers/bitset/test/1.cc: Moved to...
2708         * testsuite/20_util/bitset/observers/test.cc: ...here.
2709         * testsuite/23_containers/bitset/operations/1.cc: Moved to...
2710         * testsuite/20_util/bitset/operations/1.cc: ...here.
2711         * testsuite/23_containers/bitset/operations/13838.cc: Moved to...
2712         * testsuite/20_util/bitset/operations/13838.cc: ...here.
2713         * testsuite/23_containers/bitset/operations/2.cc: Moved to...
2714         * testsuite/20_util/bitset/operations/2.cc: ...here.
2715         * testsuite/23_containers/bitset/operations/96303.cc: Moved to...
2716         * testsuite/20_util/bitset/operations/96303.cc: ...here.
2717         * testsuite/23_containers/bitset/operations/constexpr-2.cc: Moved to...
2718         * testsuite/20_util/bitset/operations/constexpr-2.cc: ...here.
2719         * testsuite/23_containers/bitset/operations/constexpr.cc: Moved to...
2720         * testsuite/20_util/bitset/operations/constexpr.cc: ...here.
2721         * testsuite/23_containers/bitset/requirements/constexpr_functions.cc: Moved to...
2722         * testsuite/20_util/bitset/requirements/constexpr_functions.cc: ...here.
2723         * testsuite/23_containers/bitset/requirements/explicit_instantiation/1.cc: Moved to...
2724         * testsuite/20_util/bitset/requirements/explicit_instantiation/1.cc: ...here.
2725         * testsuite/23_containers/bitset/requirements/explicit_instantiation/1_c++0x.cc: Moved to...
2726         * testsuite/20_util/bitset/requirements/explicit_instantiation/1_c++0x.cc: ...here.
2727         * testsuite/23_containers/headers/bitset/synopsis.cc: Moved to...
2728         * testsuite/20_util/headers/bitset/synopsis.cc: ...here.
2730 2022-09-22  François Dumont  <fdumont@gcc.gnu.org>
2732         * python/libstdcxx/v6/printers.py: Remove ptinter registration for non-existing
2733         types std::__debug::unique_ptr, std::__debug::stack, std::__debug::queue,
2734         std::__debug::priority_queue.
2736 2022-09-21  Jonathan Wakely  <jwakely@redhat.com>
2738         PR libstdc++/91456
2739         * testsuite/20_util/function/91456.cc: Add comment with PR
2740         number.
2741         * testsuite/20_util/is_invocable/91456.cc: Likewise. Replace
2742         std::function checks with std::is_invocable_r checks.
2744 2022-09-21  Jonathan Wakely  <jwakely@redhat.com>
2746         * testsuite/17_intro/headers/c++1998/all_attributes.cc: Remove
2747         unnecessary main function.
2748         * testsuite/17_intro/headers/c++2011/all_attributes.cc:
2749         Likewise.
2750         * testsuite/17_intro/headers/c++2014/all_attributes.cc:
2751         Likewise.
2752         * testsuite/17_intro/headers/c++2017/all_attributes.cc:
2753         Likewise.
2754         * testsuite/17_intro/headers/c++2020/all_attributes.cc:
2755         Likewise.
2757 2022-09-21  Jonathan Wakely  <jwakely@redhat.com>
2759         * testsuite/20_util/headers/memory/synopsis.cc: Add declarations
2760         from C++11 and later.
2762 2022-09-21  Jonathan Wakely  <jwakely@redhat.com>
2764         * doc/xml/manual/documentation_hacking.xml: Remove trailing
2765         whitespace.
2766         * doc/xml/manual/policy_data_structures.xml: Likewise.
2768 2022-09-21  Jonathan Wakely  <jwakely@redhat.com>
2770         * include/c_compatibility/stdlib.h [!_GLIBCXX_HOSTED]: Add
2771         using-declaration for _Exit.
2773 2022-09-21  Jonathan Wakely  <jwakely@redhat.com>
2775         * testsuite/18_support/uncaught_exception/14026.cc: Qualify
2776         call to std::abort.
2778 2022-09-21  Jonathan Wakely  <jwakely@redhat.com>
2780         * include/bits/ranges_base.h: Include <initializer_list>.
2782 2022-09-20  Jonathan Wakely  <jwakely@redhat.com>
2784         * include/c_global/cstdlib [!_GLIBCXX_HOSTED] (quick_exit): Fix
2785         missing space.
2787 2022-09-16  Jonathan Wakely  <jwakely@redhat.com>
2789         PR libstdc++/106953
2790         * include/backward/auto_ptr.h [!_GLIBCXX_HOSTED]: Do not define
2791         shared_ptr members.
2792         * include/bits/alloc_traits.h [!_GLIBCXX_HOSTED]: Do not declare
2793         std::allocator_traits<std::allocator<T>> specializations for
2794         freestanding.
2795         * include/bits/memoryfwd.h [!_GLIBCXX_HOSTED] (allocator): Do
2796         not declare for freestanding.
2797         * include/bits/stl_algo.h [!_GLIBCXX_HOSTED] (stable_partition):
2798         Do not define for freestanding.
2799         [!_GLIBCXX_HOSTED] (merge, stable_sort): Do not use temporary
2800         buffers for freestanding.
2801         * include/bits/stl_algobase.h [!_GLIBCXX_HOSTED]: Do not declare
2802         streambuf iterators and overloaded algorithms using them.
2803         * include/bits/stl_uninitialized.h [!_GLIBCXX_HOSTED]: Do not
2804         define specialized overloads for std::allocator.
2805         * include/bits/unique_ptr.h [!_GLIBCXX_HOSTED] (make_unique)
2806         (make_unique_for_overwrite, operator<<): Do not define for
2807         freestanding.
2808         * include/c_global/cstdlib [!_GLIBCXX_HOSTED] (_Exit): Declare.
2809         Use _GLIBCXX_NOTHROW instead of throw().
2810         * include/debug/assertions.h [!_GLIBCXX_HOSTED]: Ignore
2811         _GLIBCXX_DEBUG for freestanding.
2812         * include/debug/debug.h [!_GLIBCXX_DEBUG]: Likewise.
2813         * include/std/bit [!_GLIBCXX_HOSTED]: Do not use the custom
2814         __int_traits if <ext/numeric_traits.h> is available.
2815         * include/std/functional [!_GLIBCXX_HOSTED]: Do not include
2816         headers that aren't valid for freestanding.
2817         (boyer_moore_searcher, boyer_moore_horspool_searcher): Do not
2818         define for freestanding.
2819         * include/std/iterator [!_GLIBCXX_HOSTED]: Do not include
2820         headers that aren't valid for freestanding.
2821         * include/std/memory [!_GLIBCXX_HOSTED]: Likewise.
2822         * include/std/ranges [!_GLIBCXX_HOSTED] (istream_view): Do not
2823         define for freestanding.
2824         (views::__detail::__is_basic_string_view) [!_GLIBCXX_HOSTED]:
2825         Do not define partial specialization for freestanding.
2827 2022-09-16  Jonathan Wakely  <jwakely@redhat.com>
2829         * include/bits/alloc_traits.h (__alloc_swap)
2830         (__shrink_to_fit_aux): Move here, from ...
2831         * include/bits/allocator.h: ... here.
2832         * include/ext/alloc_traits.h: Do not include allocator.h.
2834 2022-09-16  Jonathan Wakely  <jwakely@redhat.com>
2836         * include/bits/stl_algo.h: Include <bits/stl_algobase.h>.
2837         * include/bits/stl_tempbuf.h: Include headers for __try and
2838         __catch macros, std::pair, and __gnu_cxx::__numeric_traits.
2839         * include/bits/stream_iterator.h: Include <iosfwd> and headers
2840         for std::addressof and std::iterator.
2841         * include/bits/streambuf_iterator.h: Include header for
2842         std::iterator.
2843         * include/std/iterator: Do not include <iosfwd>.
2845 2022-09-16  Jonathan Wakely  <jwakely@redhat.com>
2847         * testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc:
2848         Store value with non-zero padding bits after construction.
2850 2022-09-16  Jonathan Wakely  <jwakely@redhat.com>
2852         * include/tr1/random.h (__detail::_Adaptor::_BEngine): Remove.
2853         (__detail::_Adaptor::_M_g): Make public.
2854         (__detail::_Adaptor<_Engine*, _Dist>): Remove partial
2855         specialization.
2856         (variate_generate::_Value): New helper to simplify handling of
2857         _Engine* and _Engine& template arguments.
2858         (variate_generate::engine_value_type): Define to underlying
2859         engine type, not adapted type.
2860         (variate_generate::engine()): Return underlying engine instead
2861         of adaptor.
2862         * testsuite/tr1/5_numerical_facilities/random/variate_generator/37986.cc:
2863         Fix comment.
2864         * testsuite/tr1/5_numerical_facilities/random/variate_generator/requirements/typedefs.cc:
2865         Check member typedefs have the correct types.
2867 2022-09-16  Jonathan Wakely  <jwakely@redhat.com>
2869         * include/debug/formatter.h [_GLIBCXX_DEBUG_BACKTRACE]
2870         (_Error_formatter): Use 0 as null pointer constant.
2872 2022-09-16  Jonathan Wakely  <jwakely@redhat.com>
2874         * include/bits/allocator.h (__alloc_neq): Remove.
2875         * include/bits/stl_list.h (list::_M_check_equal_allocators):
2876         Compare allocators directly, without __alloc_neq.
2878 2022-09-16  Jonathan Wakely  <jwakely@redhat.com>
2880         * doc/doxygen/user.cfg.in (PREDEFINED): Remove __allocator_base.
2881         * include/bits/allocator.h: Fix nesting of Doxygen commands.
2883 2022-09-16  Jonathan Wakely  <jwakely@redhat.com>
2885         * doc/xml/manual/abi.xml: Document GLIBCXX_3.4.30 and
2886         GLIBCXX_3.4.31 versions.
2887         * doc/html/manual/abi.html: Regenerate.
2889 2022-09-15  Jonathan Wakely  <jwakely@redhat.com>
2891         * include/std/memory: Do not include <bits/stl_algobase.h>.
2893 2022-09-15  Jonathan Wakely  <jwakely@redhat.com>
2895         * include/bits/shared_ptr_atomic.h (_GLIBCXX_TSAN_MUTEX_PRE_LOCK):
2896         Replace with ...
2897         (_GLIBCXX_TSAN_MUTEX_TRY_LOCK): ... this, add try_lock flag.
2898         (_GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED): New macro using
2899         try_lock_failed flag
2900         (_GLIBCXX_TSAN_MUTEX_POST_LOCK): Rename to ...
2901         (_GLIBCXX_TSAN_MUTEX_LOCKED): ... this.
2902         (_GLIBCXX_TSAN_MUTEX_PRE_UNLOCK): Remove invalid flag.
2903         (_GLIBCXX_TSAN_MUTEX_POST_UNLOCK): Remove invalid flag.
2904         (_Sp_atomic::_Atomic_count::lock): Use new macros.
2906 2022-09-15  Patrick Palka  <ppalka@redhat.com>
2908         * include/bits/ranges_algo.h (__adjacent_find_fn, adjacent_find):
2909         Move to ...
2910         * include/bits/ranges_util.h: ... here.
2911         * include/std/ranges (chunk_by_view): Define.
2912         (chunk_by_view::_Iterator): Define.
2913         (__detail::__can_chunk_by_view): Define.
2914         (_ChunkBy, chunk_by): Define.
2915         * testsuite/std/ranges/adaptors/chunk_by/1.cc: New test.
2917 2022-09-15  François Dumont  <fdumont@gcc.gnu.org>
2919         * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc:
2920         Adapt dg-prune-output to _GLIBCXX_INLINE_VERSION mode.
2922 2022-09-15  François Dumont  <fdumont@gcc.gnu.org>
2924         * config/abi/pre/gnu-versioned-namespace.ver: Remove obsolete std::__detail::__8
2925         symbols.
2927 2022-09-14  Jonathan Wakely  <jwakely@redhat.com>
2929         * include/bits/shared_ptr_atomic.h (_GLIBCXX_TSAN_MUTEX_DESTROY)
2930         (_GLIBCXX_TSAN_MUTEX_PRE_LOCK, _GLIBCXX_TSAN_MUTEX_POST_LOCK)
2931         (_GLIBCXX_TSAN_MUTEX_PRE_UNLOCK, _GLIBCXX_TSAN_MUTEX_POST_UNLOCK)
2932         (_GLIBCXX_TSAN_MUTEX_PRE_SIGNAL, _GLIBCXX_TSAN_MUTEX_POST_SIGNAL):
2933         Define macros for TSan annotation functions.
2934         (_Sp_atomic::_Atomic_count): Add annotations.
2936 2022-09-14  Jonathan Wakely  <jwakely@redhat.com>
2938         * include/bits/stl_tempbuf.h: Include <new>.
2940 2022-09-14  Jonathan Wakely  <jwakely@redhat.com>
2942         * testsuite/17_intro/names.cc: Explain why poison pragma can't
2943         be used.
2945 2022-09-14  Jonathan Wakely  <jwakely@redhat.com>
2947         * include/std/future
2948         (_State_baseV2::__setter(exception_ptr&, promise&)): Add
2949         assertion for LWG 2276 precondition.
2950         * testsuite/30_threads/promise/members/set_exception_neg.cc:
2951         New test.
2953 2022-09-14  Jonathan Wakely  <jwakely@redhat.com>
2955         * doc/xml/manual/intro.xml: Document LWG 1203.
2956         * doc/html/*: Regenerate.
2958 2022-09-14  Philipp Fent  <fent@in.tum.de>
2960         * python/libstdcxx/v6/printers.py (access_streambuf_ptrs):
2961         New helper function.
2962         (StdStringBufPrinter, StdStringStreamPrinter): New printers.
2963         (build_libstdcxx_dictionary): Register stringstream printers.
2964         * testsuite/libstdc++-prettyprinters/debug.cc: Check string
2965         streams.
2966         * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
2967         * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2969 2022-09-13  Patrick Palka  <ppalka@redhat.com>
2971         * include/std/ranges (__detail::__slide_caches_nothing): Define.
2972         (__detail::__slide_caches_last): Define.
2973         (__detail::__slide_caches_first): Define.
2974         (slide_view): Define.
2975         (enable_borrowed_range<slide_view>): Define.
2976         (slide_view::_Iterator): Define.
2977         (slide_view::_Sentinel): Define.
2978         (views::__detail::__can_slide_view): Define.
2979         (views::_Slide, views::slide): Define.
2980         * testsuite/std/ranges/adaptors/slide/1.cc: New test.
2982 2022-09-13  Patrick Palka  <ppalka@redhat.com>
2984         * include/std/ranges (__detail::__div_ceil): Define.
2985         (chunk_view): Define.
2986         (chunk_view::_OuterIter): Define.
2987         (chunk_view::_OuterIter::value_type): Define.
2988         (chunk_view::_InnerIter): Define.
2989         (chunk_view<_Vp>): Define partial specialization for forward
2990         ranges.
2991         (enable_borrowed_range<chunk_view>): Define.
2992         (chunk_view<_Vp>::_Iterator): Define.
2993         (views::__detail::__can_chunk_view): Define.
2994         (views::_Chunk, views::chunk): Define.
2995         * testsuite/std/ranges/adaptors/chunk/1.cc: New test.
2997 2022-09-13  Patrick Palka  <ppalka@redhat.com>
2999         * include/std/ranges (join_view::_Iterator::_M_satisfy):
3000         Adjust resetting _M_inner as per LWG 3569.
3001         (join_view::_Iterator::_M_inner): Wrap in std::optional
3002         as per LWG 3569.
3003         (join_view::_Iterator::_Iterator): Relax constraints as
3004         per LWG 3569.
3005         (join_view::_Iterator::operator*): Adjust as per LWG 3569.
3006         (join_view::_Iterator::operator->): Likewise.
3007         (join_view::_Iterator::operator++): Likewise.
3008         (join_view::_Iterator::operator--): Likewise.
3009         (join_view::_Iterator::iter_move): Likewise.
3010         (join_view::_Iterator::iter_swap): Likewise.
3011         * testsuite/std/ranges/adaptors/join.cc (test14): New test.
3013 2022-09-13  Patrick Palka  <ppalka@redhat.com>
3015         * include/debug/safe_iterator.h (_GLIBCXX_DEBUG_VERIFY_OPERANDS):
3016         Add parentheses to avoid -Wparentheses warning.
3018 2022-09-12  Patrick Palka  <ppalka@redhat.com>
3020         PR libstdc++/106320
3021         * testsuite/std/ranges/adaptors/join.cc (test13): New test.
3023 2022-09-12  Jonathan Wakely  <jwakely@redhat.com>
3025         * testsuite/19_diagnostics/error_code/cons/lwg3629.cc: Fix
3026         comments.
3027         * testsuite/19_diagnostics/error_condition/cons/lwg3629.cc:
3028         Likewise.
3030 2022-09-12  Jakub Jelinek  <jakub@redhat.com>
3032         PR tree-optimization/105329
3033         * acinclude.m4 (libtool_VERSION): Change to 6:31:0.
3034         * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Don't export
3035         std::basic_string methods with name length of 15.
3036         (GLIBCXX_3.4.31): Export std::basic_string::_M_replace_cold.
3037         * testsuite/util/testsuite_abi.cc (check_version): Handle
3038         GLIBCXX_3.4.31.
3039         * include/bits/basic_string.h (std::basic_string::_M_replace_cold):
3040         Declare.
3041         * include/bits/basic_string.tcc (std::basic_string::_M_replace_cold):
3042         Define and export even for C++20.
3043         (std::basic_string::_M_replace): Use __builtin_expect, outline
3044         the overlapping case to _M_replace_cold.
3045         * configure: Regenerated.
3047 2022-09-09  Jonathan Wakely  <jwakely@redhat.com>
3049         * include/bits/atomic_base.h (__atomic_impl::__compare_exchange):
3050         Rename __weak to __is_weak.
3051         * testsuite/17_intro/names.cc: Add __weak and __strong.
3053 2022-09-09  Patrick Palka  <ppalka@redhat.com>
3055         PR libstdc++/106803
3056         * include/std/ranges (views::_ZipTransform::operator()): Correct
3057         return type in the empty case.
3058         (views::_AdjacentTransform::operator()): Likewise.
3060 2022-09-09  Patrick Palka  <ppalka@redhat.com>
3062         PR libstdc++/106798
3063         * include/std/ranges (adjacent_view::_Iterator::_Iterator): Fix
3064         typo.
3065         * testsuite/std/ranges/adaptors/adjacent/1.cc (test04): New test.
3067 2022-09-09  Patrick Palka  <ppalka@redhat.com>
3069         PR libstdc++/106766
3070         * include/std/ranges (zip_view::_Iterator::operator-): Use
3071         __to_unsigned_like instead of make_unsigned_t.
3072         (zip_view::_Sentinel::operator-): Likewise.
3073         * testsuite/std/ranges/zip/1.cc (test04): New test.
3075 2022-09-08  François Dumont  <fdumont@gcc.gnu.org>
3077         * testsuite/util/testsuite_performance.h (__gnu_test::MallocInfo): New.
3078         (__gnu_test::malloc_info): New, replace mallinfo on current platform
3079         supporting it and use mallinfo2 when glibc >= 2.33.
3081 2022-09-08  Jonathan Wakely  <jwakely@redhat.com>
3083         PR c++/106838
3084         * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc:
3085         Prune additional errors from front-end.
3086         * testsuite/20_util/is_move_constructible/incomplete_neg.cc:
3087         Likewise.
3088         * testsuite/20_util/is_nothrow_swappable/incomplete_neg.cc:
3089         Likewise.
3090         * testsuite/20_util/is_nothrow_swappable_with/incomplete_neg.cc:
3091         Likewise.
3092         * testsuite/20_util/is_swappable_with/incomplete_neg.cc:
3093         Likewise.
3095 2022-09-08  Jonathan Wakely  <jwakely@redhat.com>
3097         * include/c_global/cstddef (byte): Add always_inline attribute
3098         to all operator overloads.
3099         (to_integer): Add always_inline attribute.
3101 2022-09-08  Thomas Rodgers  <trodgers@redhat.com>
3102             Jakub Jelinek  <jakub@redhat.com>
3103             Jonathan Wakely  <jwakely@redhat.com>
3105         * include/bits/atomic_base.h (__atomic_impl::__maybe_has_padding):
3106         New function.
3107         (__atomic_impl::clear_padding): Likewise.
3108         (__atomic_impl::__compare_exchange): Likewise.
3109         (__atomic_impl::compare_exchange_weak): Delegate to
3110         __compare_exchange.
3111         (__atomic_impl::compare_exchange_strong): Likewise.
3112         * include/std/atomic (atomic<T>::atomic(T)): Clear padding when
3113         possible in a constexpr function.
3114         (atomic::store): Clear padding.
3115         (atomic::exchange): Likewise.
3116         (atomic::compare_exchange_weak): Use __compare_exchange.
3117         (atomic::compare_exchange_strong): Likewise.
3118         * testsuite/29_atomics/atomic/compare_exchange_padding.cc: New
3119         test.
3120         * testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc:
3121         New test.
3123 2022-09-08  Jonathan Wakely  <jwakely@redhat.com>
3125         * include/std/system_error (__adl_only::make_error_code): Add
3126         deleted function.
3127         (__adl_only::make_error_condition): Likewise.
3128         (error_code::error_code(ErrorCodeEnum)): Add using-declaration
3129         for deleted function.
3130         (error_condition::error_condition(ErrorConditionEnum)):
3131         Likewise.
3132         * testsuite/19_diagnostics/error_code/cons/lwg3629.cc: New test.
3133         * testsuite/19_diagnostics/error_condition/cons/lwg3629.cc: New test.
3135 2022-09-07  Jonathan Wakely  <jwakely@redhat.com>
3137         * include/std/barrier: Add missing runtime exception.
3139 2022-09-07  Patrick Palka  <ppalka@redhat.com>
3141         * include/std/type_traits (is_reference): Make the primary
3142         template derive from false_type.  Define two partial
3143         specializations that derive from true_type.
3145 2022-09-07  Patrick Palka  <ppalka@redhat.com>
3147         * include/std/type_traits (__is_void_helper): Remove.
3148         (is_void): Make the primary template derive from false_type,
3149         and define four explicit specializations that derive from
3150         true_type.
3151         (__is_null_pointer_helper, is_null_pointer): Likewise.
3153 2022-09-07  Jason Merrill  <jason@redhat.com>
3155         * libsupc++/dyncast.cc (__dynamic_cast): Avoid virtual function
3156         call in simple success case.
3158 2022-09-06  Philipp Fent  <fent@in.tum.de>
3160         * testsuite/libstdc++-prettyprinters/48362.cc: Fix expected
3161         tuple indices.
3162         * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
3164 2022-09-05  Jonathan Wakely  <jwakely@redhat.com>
3166         * include/std/type_traits (__success_type, __failure_type): Move
3167         definitions later in the file.
3169 2022-09-05  Jonathan Wakely  <jwakely@redhat.com>
3171         * include/std/type_traits (is_trivial_v, is_trivially_copyable_v)
3172         (is_standard_layout_v, is_pod_v, is_literal_type_v): Use
3173         built-in instead of class template.
3174         (is_same_v): Add partial specialization for true case.
3176 2022-09-02  Patrick Palka  <ppalka@redhat.com>
3178         * include/std/tuple (tuple::_UseOtherCtor): Use ::type when
3179         deriving from __and_, __or_ or __not_.
3180         * include/std/type_traits (negation): Likewise.
3181         (is_unsigned): Likewise.
3182         (__is_implicitly_default_constructible): Likewise.
3183         (is_trivially_destructible): Likewise.
3184         (__is_nt_invocable_impl): Likewise.
3186 2022-09-02  Jonathan Wakely  <jwakely@redhat.com>
3188         * include/std/type_traits (is_constructible_v)
3189         (is_default_constructible_v, is_copy_constructible_v)
3190         (is_move_constructible_v): Define using __is_constructible.
3191         (is_assignable_v, is_copy_assignable_v, is_move_assignable_v):
3192         Define using __is_assignable.
3193         (is_trivially_constructible_v)
3194         (is_trivially_default_constructible_v)
3195         (is_trivially_copy_constructible_v)
3196         (is_trivially_move_constructible_v): Define using
3197         __is_trivially_constructible.
3198         (is_trivially_assignable_v, is_trivially_copy_assignable_v)
3199         (is_trivially_move_assignable_v): Define using
3200         __is_trivially_assignable.
3201         (is_nothrow_constructible_v)
3202         (is_nothrow_default_constructible_v)
3203         (is_nothrow_copy_constructible_v)
3204         (is_nothrow_move_constructible_v): Define using
3205         __is_nothrow_constructible.
3206         (is_nothrow_assignable_v, is_nothrow_copy_assignable_v)
3207         (is_nothrow_move_assignable_v): Define using
3208         __is_nothrow_assignable.
3210 2022-09-02  Patrick Palka  <ppalka@redhat.com>
3212         * include/std/type_traits (__or_, __and_, __not_): Redefine as a
3213         class template instead of as an alias template.
3214         * testsuite/20_util/logical_traits/requirements/short_circuit.cc:
3215         Add more tests for conjunction and disjunction.  Add corresponding
3216         tests for __and_ and __or_.
3218 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
3220         * include/std/ranges (adjacent_transform_view::_Iterator): Add
3221         typename keyword before dependent qualified-id.
3223 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
3225         * include/std/type_traits (__is_referenceable): Remove.
3226         (__add_lvalue_reference_helper, __add_rvalue_reference_helper):
3227         Use __void_t instead of __is_referenceable.
3228         (__add_pointer_helper): Likewise.
3229         (add_pointer): Add partial specializations for reference types.
3231 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
3233         * include/std/type_traits (__is_constructible_impl): Replace
3234         class template with alias template.
3235         (is_default_constructible, is_nothrow_constructible)
3236         (is_nothrow_constructible): Simplify base-specifier.
3237         (__is_copy_constructible_impl, __is_move_constructible_impl)
3238         (__is_nothrow_copy_constructible_impl)
3239         (__is_nothrow_move_constructible_impl): Remove class templates.
3240         (is_copy_constructible, is_move_constructible)
3241         (is_nothrow_constructible, is_nothrow_default_constructible)
3242         (is_nothrow_copy_constructible, is_nothrow_move_constructible):
3243         Adjust base-specifiers to use __is_constructible_impl.
3244         (__is_copy_assignable_impl, __is_move_assignable_impl)
3245         (__is_nt_copy_assignable_impl, __is_nt_move_assignable_impl):
3246         Remove class templates.
3247         (__is_assignable_impl): New alias template.
3248         (is_assignable, is_copy_assignable, is_move_assignable):
3249         Adjust base-specifiers to use new alias template.
3250         (is_nothrow_copy_assignable, is_nothrow_move_assignable):
3251         Adjust base-specifiers to use existing alias template.
3252         (__is_trivially_constructible_impl): New alias template.
3253         (is_trivially_constructible, is_trivially_default_constructible)
3254         (is_trivially_copy_constructible)
3255         (is_trivially_move_constructible): Adjust base-specifiers to use
3256         new alias template.
3257         (__is_trivially_assignable_impl): New alias template.
3258         (is_trivially_assignable, is_trivially_copy_assignable)
3259         (is_trivially_move_assignable): Adjust base-specifier to use
3260         new alias template.
3261         (__add_lval_ref_t, __add_rval_ref_t): New alias templates.
3262         (add_lvalue_reference, add_rvalue_reference): Use new alias
3263         templates.
3265 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
3267         * include/std/type_traits (__decay_selector): Add partial
3268         specializations for array types. Only check for function types
3269         when not dealing with an array.
3270         (decay): Add partial specializations for reference types.
3272 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
3274         * include/std/type_traits (is_lvalue_reference_v)
3275         (is_rvalue_reference_v, is_reference_v, is_const_v)
3276         (is_volatile_v): Define using partial specializations instead
3277         of instantiating class templates.
3279 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
3281         * include/std/type_traits (is_enum_v, is_class_v, is_union_v)
3282         (is_empty_v, is_polymoprhic_v, is_abstract_v, is_final_v)
3283         (is_base_of_v, is_aggregate_v): Use built-in directly instead of
3284         instantiating class template.
3286 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
3288         * include/std/type_traits (is_scoped_enum): Remove workaround.
3290 2022-09-01  Patrick Palka  <ppalka@redhat.com>
3292         * include/std/ranges (__detail::__unarize): Define.
3293         (adjacent_view::_Iterator): Befriend adjacent_transform_view.
3294         (adjacent_transform_view): Define.
3295         (adjacent_transform_view::_Iterator): Define.
3296         (adjacent_transform_view::_Sentinel): Define.
3297         (views::__detail::__can_adjacent_transform_view): Define.
3298         (views::_AdjacentTransform): Define.
3299         (views::adjacent_transform): Define.
3300         (views::pairwise_transform): Define.
3301         * testsuite/std/ranges/adaptors/adjacent_transform/1.cc: New test.
3303 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
3305         * include/std/type_traits (__is_array_known_bounds): Add partial
3306         specialization instead of using std::extent.
3307         (__is_array_unknown_bounds): Likewise.
3308         (extent): Add partial specializations to stop recursion after
3309         the result is found.
3310         (is_array_v): Add partial specializations instead of
3311         instantiating the class template.
3312         (rank_v, extent_v): Likewise.
3313         (is_bounded_array_v, is_unbounded_array_v): Likewise.
3314         (is_bounded_array, is_unbounded_array): Define in terms of the
3315         variable templates.
3317 2022-08-31  Patrick Palka  <ppalka@redhat.com>
3319         * include/bits/ranges_base.h (__advance_fn::operator()): Add
3320         parentheses in assert condition to avoid -Wparentheses warning.
3321         * include/std/ranges: (take_view::take_view): Uglify 'base'.
3322         (take_while_view::take_while_view): Likewise.
3323         (elements_view::elements_view): Likewise.
3324         (views::_Zip::operator()): Adjust position of [[nodiscard]] for
3325         compatibility with -fconcepts-ts.
3326         (zip_transform_view::_Sentinel): Uglify 'OtherConst'.
3327         (views::_ZipTransform::operator()): Adjust position of
3328         [[nodiscard]] for compatibilty with -fconcepts-ts.
3330 2022-08-31  Martin Liska  <mliska@suse.cz>
3332         * configure: Regenerate.
3333         * crossconfig.m4: Remove deprecated ports.
3335 2022-08-31  François Dumont  <fdumont@gcc.gnu.org>
3337         * include/debug/debug.h: Use nullptr rather than '0' in checks in post-C++11.
3338         * include/debug/string: Likewise.
3339         * testsuite/21_strings/basic_string/operations/ends_with/char.cc: Use __gnu_test::string.
3340         * testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc: Likewise.
3341         * testsuite/21_strings/basic_string/operations/ends_with/wchar_t.cc: Likewise.
3342         * testsuite/21_strings/basic_string/operations/starts_with/wchar_t.cc: Likewise.
3343         * testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc: Likewise.
3344         * testsuite/21_strings/basic_string/operations/starts_with/char.cc: Likewise..
3346 2022-08-31  Patrick Palka  <ppalka@redhat.com>
3348         * include/std/ranges (adjacent_view): Define.
3349         (enable_borrowed_range<adjacent_view>): Define.
3350         (__detail::__repeated_tuple): Define.
3351         (adjacent_view::_Iterator): Define.
3352         (adjacent_view::_Sentinel): Define.
3353         (views::__detail::__can_adjacent_view): Define.
3354         (views::_Adjacent): Define.
3355         (views::adjacent): Define.
3356         (views::pairwise): Define.
3357         * testsuite/std/ranges/adaptors/adjacent/1.cc: New test.
3359 2022-08-31  François Dumont  <fdumont@gcc.gnu.org>
3361         * include/debug/formatter.h
3362         [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_state): Declare.
3363         [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_create_state): Declare.
3364         [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_callback): Define.
3365         [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_error_callback): Define.
3366         [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_func): Define.
3367         [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full): Declare.
3368         [_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_state): New.
3369         [_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_full): New.
3370         * src/c++11/debug.cc [_GLIBCXX_HAVE_STACKTRACE](print_backtrace): New.
3371         (_Error_formatter::_M_error()): Adapt.
3372         * src/libbacktrace/Makefile.am: Add backtrace.c.
3373         * src/libbacktrace/Makefile.in: Regenerate.
3374         * src/libbacktrace/backtrace-rename.h (backtrace_full): New.
3375         * testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc: New test.
3376         * doc/xml/manual/debug_mode.xml: Document _GLIBCXX_DEBUG_BACKTRACE.
3377         * doc/xml/manual/using.xml: Likewise.
3379 2022-08-31  Patrick Palka  <ppalka@redhat.com>
3381         * testsuite/20_util/logical_traits/requirements/short_circuit.cc: New test.
3383 2022-08-31  Jonathan Wakely  <jwakely@redhat.com>
3385         * include/bits/refwrap.h (reference_wrapper::operator()): Add
3386         noexcept-specifier and use __invoke_result instead of result_of.
3387         * testsuite/20_util/reference_wrapper/invoke-noexcept.cc: New test.
3389 2022-08-31  Jonathan Wakely  <jwakely@redhat.com>
3391         * testsuite/20_util/reference_wrapper/invoke-2.cc: Improve
3392         comments.
3393         * testsuite/20_util/reference_wrapper/invoke-3.cc: Likewise.
3394         * testsuite/20_util/reference_wrapper/invoke.cc: Likewise.
3396 2022-08-31  Jonathan Wakely  <jwakely@redhat.com>
3398         * include/bits/basic_string.h (basic_string): Add nodiscard
3399         attribute to all relevant functions.
3400         * include/std/string_view (basic_string_view): Likewise.
3401         * testsuite/21_strings/basic_string/capacity/1.cc: Cast unused
3402         results to void.
3403         * testsuite/21_strings/basic_string/capacity/char/1.cc:
3404         Likewise.
3405         * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
3406         Likewise.
3407         * testsuite/21_strings/basic_string/cons/char/self_move.cc:
3408         Likewise.
3409         * testsuite/21_strings/basic_string/element_access/char/1.cc:
3410         Likewise.
3411         * testsuite/21_strings/basic_string/element_access/char/21674.cc:
3412         Likewise.
3413         * testsuite/21_strings/basic_string/element_access/wchar_t/1.cc:
3414         Likewise.
3415         * testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc:
3416         Likewise.
3417         * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
3418         * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
3419         * testsuite/21_strings/basic_string/operations/contains/nonnull.cc:
3420         Add -Wno-unused-result to options.
3421         * testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc:
3422         Likewise.
3423         * testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc:
3424         Likewise.
3425         * testsuite/21_strings/basic_string/operators/char/1.cc: Cast
3426         unused results to void.
3427         * testsuite/21_strings/basic_string/operators/wchar_t/1.cc:
3428         Likewise.
3429         * testsuite/21_strings/basic_string_view/capacity/1.cc:
3430         Likewise.
3431         * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
3432         Likewise.
3433         * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
3434         Likewise.
3435         * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
3436         Likewise.
3437         * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
3438         Likewise.
3439         * testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc:
3440         Likewise.
3441         Add -Wno-unused-result to options.
3442         * testsuite/21_strings/basic_string_view/operations/ends_with/nonnull.cc:
3443         Likewise.
3444         * testsuite/21_strings/basic_string_view/operations/starts_with/nonnull.cc:
3445         Likewise.
3446         * testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc: Cast
3447         unused results to void.
3448         * testsuite/27_io/basic_stringbuf/sputbackc/wchar_t/1.cc:
3449         Likewise.
3450         * testsuite/27_io/basic_stringbuf/sungetc/char/1.cc: Likewise.
3451         * testsuite/27_io/basic_stringbuf/sungetc/wchar_t/1.cc:
3452         Likewise.
3454 2022-08-27  Patrick Palka  <ppalka@redhat.com>
3456         * testsuite/20_util/logical_traits/requirements/base_classes.cc: New test.
3458 2022-08-26  Patrick Palka  <ppalka@redhat.com>
3460         * include/std/ranges (zip_view::_Iterator::operator<): Remove
3461         as per LWG 3692.
3462         (zip_view::_Iterator::operator>): Likewise.
3463         (zip_view::_Iterator::operator<=): Likewise.
3464         (zip_view::_Iterator::operator>=): Likewise.
3465         (zip_view::_Iterator::operator<=>): Remove three_way_comparable
3466         constraint as per LWG 3692.
3467         (zip_transform_view::_Iterator): Ditto as per LWG 3702.
3469 2022-08-26  Patrick Palka  <ppalka@redhat.com>
3471         * include/std/ranges (zip_view::_Iterator): Befriend
3472         zip_transform_view.
3473         (__detail::__range_iter_cat): Define.
3474         (zip_transform_view): Define.
3475         (zip_transform_view::_Iterator): Define.
3476         (zip_transform_view::_Sentinel): Define.
3477         (views::__detail::__can_zip_transform_view): Define.
3478         (views::_ZipTransform): Define.
3479         (views::zip_transform): Define.
3480         * testsuite/std/ranges/zip_transform/1.cc: New test.
3482 2022-08-26  Patrick Palka  <ppalka@redhat.com>
3484         * include/std/type_traits (enable_if, __enable_if_t): Define them
3485         earlier.
3486         (__detail::__first_t): Define.
3487         (__detail::__or_fn, __detail::__and_fn): Declare.
3488         (__or_, __and_): Redefine as alias templates in terms of __or_fn
3489         and __and_fn.
3490         (__not_): Redefine as an alias template.
3491         (__detail::__disjunction_impl, __detail::__conjunction_impl):
3492         Define.
3493         (conjuction, disjunction): Redefine in terms of __disjunction_impl
3494         and __conjunction_impl.
3496 2022-08-26  Jonathan Wakely  <jwakely@redhat.com>
3498         * include/std/system_error (error_code::_Check): New alias
3499         template for constructor SFINAE constraint.
3500         (error_code::error_code(ErrorCodeEnum)): Use it.
3501         (error_code::operator=(ErrorCodeEnum)): Remove.
3502         (error_condition::_Check): New alias template for constraint.
3503         (error_condition::error_condition(ErrorConditionEnum)): Use it.
3504         (error_condition::operator=(ErrorConditionEnum)): Remove.
3505         * testsuite/19_diagnostics/error_code/cons/1.cc: Check
3506         constructor taking user-defined error enum.
3507         * testsuite/19_diagnostics/error_condition/cons/1.cc: Likewise.
3509 2022-08-26  Jonathan Wakely  <jwakely@redhat.com>
3511         * include/bits/basic_string.h (starts_with, ends_with, contains):
3512         Add nonnull attribute.
3513         * include/bits/cow_string.h (starts_with, ends_with, contains):
3514         Likewise.
3515         * include/std/string_view (starts_with, ends_with, contains):
3516         Likewise.
3517         * testsuite/21_strings/basic_string/operations/contains/nonnull.cc
3518         * testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc
3519         * testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc
3520         * testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc
3521         * testsuite/21_strings/basic_string_view/operations/ends_with/nonnull.cc
3522         * testsuite/21_strings/basic_string_view/operations/starts_with/nonnull.cc
3524 2022-08-25  Patrick Palka  <ppalka@redhat.com>
3526         * include/std/ranges (lazy_split_view::_OuterIter::_M_current):
3527         Remove redundant comment.
3528         (lazy_split_view::_M_current): Likewise.
3529         (common_view::common_view): Remove commented out view-converting
3530         constructor as per LWG3405.
3531         (elements_view::_Iterator::_Iterator): Uglify 'current' and 'i'.
3533 2022-08-24  Patrick Palka  <ppalka@redhat.com>
3535         * include/bits/ranges_algo.h (__min_fn, min): Move to ...
3536         * include/bits/ranges_util.h: ... here, in order to avoid
3537         including all of ranges_algo.h from <ranges>.
3538         * include/std/ranges (__detail::__zip_is_common): Define for
3539         C++23 as per P2321R2.
3540         (__detail::__tuple_or_pair): Likewise.
3541         (__detail::__tuple_or_pair_t): Likewise.
3542         (__detail::__tuple_transform): Likewise.
3543         (__detail::__tuple_for_each): Likewise.
3544         (zip_view): Likewise.
3545         (enable_borrowed_range<zip_view>): Likewise.
3546         (__detail::__all_random_access): Likewise.
3547         (__detail::__all_bidirectional): Likewise.
3548         (__detail::__all_forward): Likewise.
3549         (__detail::__zip_view_iter_cat): Likewise.
3550         (zip_view::_Iterator): Likewise.
3551         (zip_view::_Sentinel): Likewise.
3552         * testsuite/std/ranges/zip/1.cc: New test.
3554 2022-08-24  Jonathan Wakely  <jwakely@redhat.com>
3556         Revert:
3557         2022-08-24  Will Hawkins  <whh8b@obs.cr>
3559         * include/bits/basic_string.h (operator+(const string&, const char*)):
3560         Remove naive implementation.
3561         * include/bits/basic_string.tcc (operator+(const string&, const char*)):
3562         Add single-allocation implementation.
3564 2022-08-24  Patrick Palka  <ppalka@redhat.com>
3566         * include/bits/stl_pair.h (pair::swap const): Add non-standard
3567         is_swappable_v constraints.
3568         * include/std/tuple (tuple::swap const): Likewise.
3569         * testsuite/20_util/tuple/cons/noexcept_specs.cc: Correct some
3570         asserts in C++23 mode.
3572 2022-08-24  Jonathan Wakely  <jwakely@redhat.com>
3574         * include/bits/stl_algo.h (__stable_sort): Cast size to
3575         iterator's difference type.
3576         * testsuite/25_algorithms/stable_sort/4.cc: New test.
3578 2022-08-24  Will Hawkins  <whh8b@obs.cr>
3580         * include/bits/basic_string.h (operator+(const string&, const char*)):
3581         Remove naive implementation.
3582         * include/bits/basic_string.tcc (operator+(const string&, const char*)):
3583         Add single-allocation implementation.
3585 2022-08-24  Jonathan Wakely  <jwakely@redhat.com>
3587         * testsuite/20_util/duration_cast/rounding.cc: Check abs with
3588         non-reduced duration.
3590 2022-08-23  Patrick Palka  <ppalka@redhat.com>
3592         * include/bits/stl_bvector.h (_Bit_reference::operator=): Define
3593         const overload for C++23 as per P2321R2.
3594         * include/bits/stl_pair.h (pair::swap): Likewise.
3595         (pair::pair): Define additional converting constructors for
3596         C++23 as per P2321R2.
3597         (pair::operator=): Define const overloads for C++23 as per
3598         P2321R2.
3599         (swap): Define overload taking const pair& for C++23 as per
3600         P2321R2.
3601         (basic_common_reference): Define partial specialization for
3602         pair for C++23 as per P2321R2.
3603         (common_type): Likewise.
3604         * include/bits/uses_allocator_args.h
3605         (uses_allocator_construction_args): Define additional pair
3606         overloads for C++23 as per P2321R2.
3607         * include/std/tuple (_Tuple_impl::_Tuple_impl): Define
3608         additional converting constructors for C++23 as per P2321R2.
3609         (_Tuple_impl::_M_assign): Define const overloads for C++23
3610         as per P2321R2.
3611         (_Tuple_impl::_M_swap): Likewise.
3612         (tuple::__constructible): Define as a convenient renaming of
3613         _TCC<true>::__constructible.
3614         (tuple::__convertible): As above but for _TCC<true>::__convertible.
3615         (tuple::tuple): Define additional converting constructors for
3616         C++23 as per P2321R2.
3617         (tuple::operator=): Define const overloads for C++23 as per
3618         P2321R2.
3619         (tuple::swap): Likewise.
3620         (basic_common_reference): Define partial specialization for
3621         tuple for C++23 as per P2321R2.
3622         (common_type): Likewise.
3623         * testsuite/20_util/pair/p2321r2.cc: New test.
3624         * testsuite/20_util/tuple/p2321r2.cc: New test.
3625         * testsuite/23_containers/vector/bool/element_access/1.cc: New test.
3627 2022-08-23  Patrick Palka  <ppalka@redhat.com>
3629         * include/std/tuple (_TupleConstraints::__convertible): Define.
3630         (_TupleConstraints::__constructible): Define.
3631         (_TupleConstraints::__is_explicitly_constructible): Redefine this
3632         in terms of __convertible and __constructible.
3633         (_TupleConstraints::__is_implicitly_constructible): Likewise.
3635 2022-08-23  Jonathan Wakely  <jwakely@redhat.com>
3637         PR libstdc++/106589
3638         * include/std/variant (__do_visit): Handle is_void<R> for zero
3639         argument case.
3640         * testsuite/20_util/variant/visit_r.cc: Check std::visit<void>(v).
3642 2022-08-22  Jonathan Wakely  <jwakely@redhat.com>
3644         PR libstdc++/105678
3645         * doc/xml/manual/using.xml: Document -lstdc++_libbacktrace
3646         requirement for using std::stacktrace. Also adjust -frtti and
3647         -fexceptions to document non-default (i.e. negative) forms.
3648         * doc/html/*: Regenerate.
3650 2022-08-22  Jonathan Wakely  <jwakely@redhat.com>
3652         PR libstdc++/106695
3653         * include/bits/std_thread.h (thread::_State_impl): Forward
3654         individual arguments to _Invoker constructor.
3655         (thread::_Invoker): Add constructor. Delete copies.
3656         * include/std/future (__future_base::_Deferred_state): Forward
3657         individual arguments to _Invoker constructor.
3658         (__future_base::_Async_state_impl): Likewise.
3659         * testsuite/30_threads/async/106695.cc: New test.
3660         * testsuite/30_threads/thread/106695.cc: New test.
3662 2022-08-22  Jonathan Wakely  <jwakely@redhat.com>
3664         PR libstdc++/106607
3665         * include/bits/regex_compiler.tcc (_Compiler::_M_cur_int_value):
3666         Use built-ins to check for integer overflow in back-reference
3667         number.
3668         * testsuite/28_regex/basic_regex/106607.cc: New test.
3670 2022-08-17  Keef Aragon  <keef.aragon@konscious.net>
3672         * libsupc++/eh_alloc.cc (pool::free): Inverse comparison.
3674 2022-08-08  François Dumont  <fdumont@gcc.gnu.org>
3676         * include/debug/formatter.h (__singular_value_init): New _Iterator_state enum entry.
3677         (_Parameter<>(const _Safe_iterator<>&, const char*, _Is_iterator)): Check if iterator
3678         parameter is value-initialized.
3679         (_Parameter<>(const _Safe_local_iterator<>&, const char*, _Is_iterator)): Likewise.
3680         * include/debug/safe_iterator.h (_Safe_iterator<>::_M_value_initialized()): New. Adapt
3681         checks.
3682         * include/debug/safe_local_iterator.h (_Safe_local_iterator<>::_M_value_initialized()): New.
3683         Adapt checks.
3684         * src/c++11/debug.cc (_Safe_iterator_base::_M_reset): Do not reset _M_version.
3685         (print_field(PrintContext&, const _Parameter&, const char*)): Adapt state_names.
3686         * testsuite/23_containers/deque/debug/iterator1_neg.cc: New test.
3687         * testsuite/23_containers/deque/debug/iterator2_neg.cc: New test.
3688         * testsuite/23_containers/forward_list/debug/iterator1_neg.cc: New test.
3689         * testsuite/23_containers/forward_list/debug/iterator2_neg.cc: New test.
3690         * testsuite/23_containers/forward_list/debug/iterator3_neg.cc: New test.
3692 2022-08-05  Jonathan Wakely  <jwakely@redhat.com>
3694         * include/experimental/scope (__cpp_lib_experimental_scope):
3695         Define.
3696         * testsuite/experimental/scopeguard/uniqueres.cc: Check macro.
3698 2022-08-05  Jonathan Wakely  <jwakely@redhat.com>
3700         * include/Makefile.am: Add new header.
3701         * include/Makefile.in: Regenerate.
3702         * include/experimental/scope: New file.
3703         * testsuite/experimental/scopeguard/uniqueres.cc: New test.
3704         * testsuite/experimental/scopeguard/exit.cc: New test.
3706 2022-08-04  Jonathan Wakely  <jwakely@redhat.com>
3708         * include/std/string_view (basic_string_view(Range&&)): Add
3709         explicit as per P2499R0.
3710         * testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc:
3711         Adjust implicit conversions. Check implicit conversions fail.
3712         * testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc:
3713         Likewise.
3715 2022-08-04  Jonathan Wakely  <jwakely@redhat.com>
3717         * include/bits/fs_dir.h (directory_iterator): Add comparison
3718         with std::default_sentinel_t. Remove redundant operator!= for
3719         C++20.
3720         * (recursive_directory_iterator): Likewise.
3721         * include/bits/iterator_concepts.h [!__cpp_lib_concepts]
3722         (default_sentinel_t, default_sentinel): Define even if concepts
3723         are not supported.
3724         * include/bits/regex.h (regex_iterator): Add comparison with
3725         std::default_sentinel_t. Remove redundant operator!= for C++20.
3726         (regex_token_iterator): Likewise.
3727         (regex_token_iterator::_M_end_of_seq()): Add noexcept.
3728         * testsuite/27_io/filesystem/iterators/lwg3719.cc: New test.
3729         * testsuite/28_regex/iterators/regex_iterator/lwg3719.cc:
3730         New test.
3731         * testsuite/28_regex/iterators/regex_token_iterator/lwg3719.cc:
3732         New test.
3734 2022-08-04  Jonathan Wakely  <jwakely@redhat.com>
3736         * include/std/expected (unexpected::_M_val): Rename to _M_unex.
3737         (bad_expected_access::_M_val): Likewise.
3739 2022-08-04  Jonathan Wakely  <jwakely@redhat.com>
3741         * include/bits/ios_base.h (__cpp_lib_ios_noreplace): Update
3742         value to 202207L.
3743         * include/std/version (__cpp_lib_ios_noreplace): Likewise.
3744         * testsuite/27_io/basic_ofstream/open/char/noreplace.cc: Check
3745         for new value.
3746         * testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc:
3747         Likewise.
3749 2022-08-04  Jonathan Wakely  <jwakely@redhat.com>
3751         PR libstdc++/106183
3752         * include/bits/atomic_wait.h (__waiter_pool_base::_M_notify):
3753         Move increment of _M_ver here.
3754         [!_GLIBCXX_HAVE_PLATFORM_WAIT]: Lock mutex around increment.
3755         Use relaxed memory order and always notify all waiters.
3756         (__waiter_base::_M_do_wait) [!_GLIBCXX_HAVE_PLATFORM_WAIT]:
3757         Check value again after locking mutex.
3758         (__waiter_base::_M_notify): Remove increment of _M_ver.
3760 2022-08-04  Ulrich Drepper  <drepper@gmail.com>
3762         * python/libstdcxx/v6/printers.py (class StdTuplePrinter): Use
3763         zero-based indeces just like std:get takes.
3765 2022-07-29  Jonathan Wakely  <jwakely@redhat.com>
3767         PR libstdc++/104443
3768         * include/bits/stl_iterator.h (common_iterator::operator->):
3769         Change return type to just auto.
3771 2022-07-26  Thomas Rodgers  <trodgers@redhat.com>
3773         * include/bits/atomic_wait.h (__atomic_spin): Merge spin loops.
3775 2022-07-20  Jonathan Wakely  <jwakely@redhat.com>
3777         PR libstdc++/100823
3778         * include/bits/stl_iterator.h (common_iterator): Define
3779         destructor, copy constructor and move constructor as trivial
3780         when the underlying types allow.
3781         * testsuite/24_iterators/common_iterator/100823.cc: Check
3782         triviality of special members.
3784 2022-07-20  Jonathan Wakely  <jwakely@redhat.com>
3786         PR libstdc++/100823
3787         * include/bits/stl_iterator.h (common_iterator): Define move
3788         constructor and move assignment operator.
3789         (common_iterator::_M_assign): New function implementing
3790         assignment.
3791         (common_iterator::operator=): Use _M_assign.
3792         (common_iterator::_S_valueless): New constant.
3793         * testsuite/24_iterators/common_iterator/100823.cc: New test.
3795 2022-07-20  Jonathan Wakely  <jwakely@redhat.com>
3797         * include/bits/stl_iterator.h (common_iterator): Fix incorrect
3798         uses of is_nothrow_assignable_v. Fix inconsistent constraints on
3799         friend declaration. Do not move argument in copy constructor.
3800         * testsuite/24_iterators/common_iterator/1.cc: Check for
3801         noexcept constructibnle/assignable.
3803 2022-07-19  François Dumont  <fdumont@gcc.gnu.org>
3805         * include/debug/debug.h [_GLIBCXX_DEBUG](__glibcxx_requires_string): Define
3806         using _GLIBCXX_DEBUG_PEDASSERT.
3807         [_GLIBCXX_DEBUG](__glibcxx_requires_string_len): Likewise.
3808         * include/debug/macros.h
3809         (__glibcxx_check_string, __glibcxx_check_string_len): Move...
3810         * include/debug/string
3811         (__glibcxx_check_string, __glibcxx_check_string_len): ...here. And define depending
3812         on _GLIBCXX_DEBUG_PEDANTIC no matter if _GLIBCXX_DEBUG is defined.
3813         Add using of std::string find, rfind, find_first_of, find_last_of, find_first_not_of
3814         and find_last_not_of. Remove debug implementations having no debug assertion.
3815         * testsuite/util/testsuite_string.h: New file. Provides __gnu_test::string and
3816         __gnu_test::wtring which definition depends on _GLIBCXX_DEBUG.
3817         * testsuite/21_strings/basic_string/debug/find1_neg.cc: New test case.
3818         * testsuite/21_strings/basic_string/debug/find2_neg.cc: New test case.
3819         * testsuite/21_strings/basic_string/operations/find/char/1.cc:
3820         Include <testsuite_string.h> and use __gnu_test::string.
3821         * testsuite/21_strings/basic_string/operations/find/char/2.cc: Likewise.
3822         * testsuite/21_strings/basic_string/operations/find/char/3.cc: Likewise.
3823         * testsuite/21_strings/basic_string/operations/find/char/4.cc: Likewise.
3824         * testsuite/21_strings/basic_string/operations/find/char/5.cc: Likewise.
3825         * testsuite/21_strings/basic_string/operations/find/char/6.cc: Likewise.
3826         * testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc:
3827         Include <testsuite_string.h> and use __gnu_test::wstring.
3828         * testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc: Likewise.
3829         * testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc: Likewise.
3830         * testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc: Likewise.
3831         * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc: Likewise.
3832         * testsuite/21_strings/basic_string/operations/find/wchar_t/6.cc: Likewise.
3834 2022-07-19  Jonathan Wakely  <jwakely@redhat.com>
3836         * include/std/type_traits (__cpp_lib_reference_from_temporary)
3837         (reference_constructs_from_temporary)
3838         (reference_converts_from_temporary): Only define when the
3839         built-ins are available.
3841 2022-07-19  Marco Falke  <falke.marco@gmail.com>
3843         * include/std/charconv (__from_chars_alnum_to_val): Replace
3844         implicit conversion from int to unsigned char with explicit
3845         cast.
3847 2022-07-19  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3849         * configure: Regnerate.
3850         * configure.ac (newlib, *-rtems*): Remove HAVE_POLL.
3852 2022-07-18  François Dumont  <fdumont@gcc.gnu.org>
3854         * include/bits/stl_algo.h
3855         (__merge_adaptive): Adapt to merge only when buffer is large enough..
3856         (__merge_adaptive_resize): New, adapt merge when buffer is too small.
3857         (__inplace_merge): Adapt, use latter.
3858         (__stable_sort_adaptive): Adapt to sort only when buffer is large enough.
3859         (__stable_sort_adaptive_resize): New, adapt sort when buffer is too small.
3860         (__stable_sort): Adapt, use latter.
3862 2022-07-15  Marek Polacek  <polacek@redhat.com>
3864         PR c++/104477
3865         * include/std/type_traits (reference_constructs_from_temporary,
3866         reference_converts_from_temporary): New class templates.
3867         (reference_constructs_from_temporary_v,
3868         reference_converts_from_temporary_v): New variable templates.
3869         (__cpp_lib_reference_from_temporary): Define for C++23.
3870         * include/std/version (__cpp_lib_reference_from_temporary): Define for
3871         C++23.
3872         * testsuite/20_util/variable_templates_for_traits.cc: Test
3873         reference_constructs_from_temporary_v and
3874         reference_converts_from_temporary_v.
3875         * testsuite/20_util/reference_from_temporary/value.cc: New test.
3876         * testsuite/20_util/reference_from_temporary/value2.cc: New test.
3877         * testsuite/20_util/reference_from_temporary/version.cc: New test.
3879 2022-07-12  Jonathan Wakely  <jwakely@redhat.com>
3881         PR libstdc++/106248
3882         * include/std/istream [C++17] (operator>>(istream&, char*)):
3883         Set eofbit if we stopped extracting at EOF.
3884         * testsuite/27_io/basic_istream/extractors_character/char/pr106248.cc:
3885         New test.
3886         * testsuite/27_io/basic_istream/extractors_character/wchar_t/pr106248.cc:
3887         New test.
3889 2022-07-12  Jonathan Wakely  <jwakely@redhat.com>
3891         * include/bits/stl_iterator.h (__iter_to_alloc_t): Replace
3892         add_const_t with const-qualifier.
3893         * include/bits/utility.h (tuple_element<N, cv T>): Likewise for
3894         all cv-qualifiers.
3895         * include/std/type_traits (add_const, add_volatile): Replace
3896         typedef-declaration with using-declaration.
3897         (add_cv): Replace add_const and add_volatile with cv-qualifiers.
3898         * include/std/variant (variant_alternative<N, cv T>): Replace
3899         add_const_t, add_volatile_t and add_cv_t etc. with cv-qualifiers.
3901 2022-07-09  François Dumont  <fdumont@gcc.gnu.org>
3903         * include/std/string: Remove obsolete comment about char_traits.h including
3904         stl_algobase.h.
3906 2022-07-07  Jonathan Wakely  <jwakely@redhat.com>
3908         PR c++/89074
3909         * include/bits/char_traits.h (__gnu_cxx::char_traits::move):
3910         Remove workaround for front-end bug.
3912 2022-07-05  Alexandre Oliva  <oliva@adacore.com>
3914         * testsuite/util/testsuite_fs.h (nonexistent_path): Explain
3915         why we need the typecast.
3917 2022-07-05  Alexandre Oliva  <oliva@adacore.com>
3919         * testsuite/util/testsuite_fs.h (nonexistent_path): Convert
3920         the getpid result to an integral type.
3922 2022-07-01  Jonathan Wakely  <jwakely@redhat.com>
3924         PR libstdc++/106162
3925         * include/Makefile.am (largefile-config.h): Add
3926         stamp-${host_alias} prerequisite.
3927         * include/Makefile.in: Regenerate.
3929 2022-07-01  Jonathan Wakely  <jwakely@redhat.com>
3931         * include/bits/fs_ops.h: Add nodiscard to all pure functions.
3932         * include/experimental/bits/fs_ops.h: Likewise.
3933         * testsuite/27_io/filesystem/operations/all.cc: Do not discard
3934         results of absolute and canonical.
3935         * testsuite/27_io/filesystem/operations/absolute.cc: Cast
3936         discarded result to void.
3937         * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
3938         * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
3939         * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3940         * testsuite/27_io/filesystem/operations/read_symlink.cc:
3941         Likewise.
3942         * testsuite/27_io/filesystem/operations/status.cc: Likewise.
3943         * testsuite/27_io/filesystem/operations/symlink_status.cc:
3944         Likewise.
3945         * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3946         Likewise.
3947         * testsuite/experimental/filesystem/operations/canonical.cc:
3948         Likewise.
3949         * testsuite/experimental/filesystem/operations/exists.cc:
3950         Likewise.
3951         * testsuite/experimental/filesystem/operations/is_empty.cc:
3952         Likewise.
3953         * testsuite/experimental/filesystem/operations/read_symlink.cc:
3954         Likewise.
3955         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
3956         Likewise.
3958 2022-07-01  Sebastian Huber  <sebastian.huber@embedded-brains.de>
3960         * configure: Regnerate.
3961         * configure.ac (newlib, *-rtems*): Enable TLS support for all RTEMS
3962         targets except bfin, lm32, mips, moxie, or1k, and v850.
3963         For all RTEMS targets, define HAVE_ALIGNED_ALLOC, HAVE_AT_QUICK_EXIT,
3964         HAVE_LINK, HAVE_POLL, HAVE_QUICK_EXIT, HAVE_READLINK, HAVE_SETENV,
3965         HAVE_SLEEP, HAVE_SOCKATMARK, HAVE_STRERROR_L, HAVE_SYMLINK,
3966         HAVE_TRUNCATE, and HAVE_USLEEP.
3967         * crossconfig.m4 (*-rtems*): Remove.
3969 2022-06-30  Jonathan Wakely  <jwakely@redhat.com>
3971         * include/bits/utility.h: Fix comment typos.
3973 2022-06-30  Jonathan Wakely  <jwakely@redhat.com>
3975         * src/c++17/fs_ops.cc (fs::temp_directory_path()): Include path
3976         in exception.
3977         (fs::temp_directory_path(error_code&)): Rearrange to more
3978         closely match the structure of the first overload.
3979         * src/filesystem/ops.cc (fs::temp_directory_path): Likewise.
3980         * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3981         Check that exception contains the path.
3982         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
3983         Likewise.
3985 2022-06-30  Jonathan Wakely  <jwakely@redhat.com>
3987         PR libstdc++/88881
3988         * src/filesystem/ops.cc (has_trailing_slash): New helper
3989         function.
3990         (fs::status): Strip trailing slashes.
3991         (fs::symlink_status): Likewise.
3992         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
3993         Clean the environment before each test and use TMP instead of
3994         TMPDIR so the test passes on Windows.
3996 2022-06-28  Jonathan Wakely  <jwakely@redhat.com>
3998         * src/filesystem/dir-common.h (_Dir_base::_At_path):
3999         Use char_type consistently for paths.
4001 2022-06-28  Jonathan Wakely  <jwakely@redhat.com>
4003         * src/c++17/fs_dir.cc (_Dir::dir_and_pathname):: Replace with
4004         current() returning _At_path.
4005         (_Dir::_Dir, _Dir::open_subdir, _Dir::do_unlink): Adjust.
4006         * src/filesystem/dir-common.h (_Dir_base::_At_path): New class.
4007         (_Dir_base::_Dir_Base, _Dir_base::openat): Use _At_path.
4008         * src/filesystem/dir.cc (_Dir::dir_and_pathname): Replace with
4009         current() returning _At_path.
4010         (_Dir::_Dir, _Dir::open_subdir): Adjust.
4012 2022-06-28  Jonathan Wakely  <jwakely@redhat.com>
4014         * src/c++17/fs_dir.cc (_Dir::_Dir) [!_GLIBCXX_HAVE_OPENAT]:
4015         Always store pathname if we don't have openat or unlinkat,
4016         because the full path is needed to open sub-directories and
4017         remove entries.
4019 2022-06-28  Jonathan Wakely  <jwakely@redhat.com>
4021         * testsuite/20_util/from_chars/4.cc: Only use log2 if C99 math
4022         functions are available.
4024 2022-06-27  Alexandre Oliva  <oliva@adacore.com>
4026         * testsuite/20_util/to_chars/long_double.cc: Use cmath
4027         long double overloads for nexttoward and ldexp.
4029 2022-06-27  Alexandre Oliva  <oliva@adacore.com>
4031         * testsuite/experimental/simd/standard_abi_usable.cc: Require
4032         cmath support.
4033         * testsuite/experimental/simd/standard_abi_usable_2.cc:
4034         Likewise.
4036 2022-06-27  Alexandre Oliva  <oliva@adacore.com>
4038         * testsuite/26_numerics/complex/proj.cc: Skip test in the
4039         circumstances in which the implementation of proj is known to
4040         be broken.
4042 2022-06-27  Alexandre Oliva  <oliva@adacore.com>
4044         * src/c++17/fs_dir.cc (dir_and_pathname): Use dirfd if
4045         _GLIBCXX_HAVE_OPENAT.
4047 2022-06-27  Alexandre Oliva  <oliva@adacore.com>
4049         * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc
4050         (test06): Don't create symlinks when NO_SYMLINKS is defined.
4052 2022-06-27  Alexandre Oliva  <oliva@adacore.com>
4054         * testsuite/lib/dg-options.exp (add_options_for_net_ts):
4055         Add -Wl,--gc-sections for RTEMS targets.
4056         * testsuite/experimental/net/timer/waitable/dest.cc: Link-time
4057         xfail on RTEMS.
4058         * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
4059         * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
4060         Execution-time xfail on RTEMS.
4061         * testsuite/experimental/net/internet/resolver/ops/reverse.cc:
4062         Likewise.
4064 2022-06-27  Jonathan Wakely  <jwakely@redhat.com>
4066         * testsuite/ext/mt_allocator/22309_thread.cc: Include <string>.
4068 2022-06-27  Joel Brobecker  <brobecker@adacore.com>
4069             Jonathan Wakely  <jwakely@redhat.com>
4071         * testsuite/util/testsuite_fs.h (__gnu_test::nonexistent_path):
4072         Always include a counter in the filename returned.
4074 2022-06-27  Jonathan Wakely  <jwakely@redhat.com>
4076         * include/bits/move_only_function.h (_Never_valueless_alt):
4077         Define partial specialization for std::move_only_function.
4079 2022-06-27  Jonathan Wakely  <jwakely@redhat.com>
4081         * include/std/variant (_Build_FUN::_S_fun): Define fallback case
4082         as deleted.
4083         (__accepted_index, _Extra_visit_slot_needed): Replace class
4084         templates with variable templates.
4086 2022-06-27  Jonathan Wakely  <jwakely@redhat.com>
4088         * include/bits/fs_path.h (__is_path_iter_src): Replace class
4089         template with variable template.
4091 2022-06-27  Jonathan Wakely  <jwakely@redhat.com>
4093         * include/bits/chrono.h (is_clock_v): Define to false.
4094         (is_clock_v<T>): Define partial specialization for true cases.
4095         (is_clock): Define in terms of is_clock_v.
4097 2022-06-24  Xi Ruoyao  <xry111@xry111.site>
4099         * scripts/extract_symvers.in: Use grep -E instead of egrep.
4100         * scripts/run_doxygen: Likewise.
4102 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
4104         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for
4105         openat.
4106         * configure, config.h.in: Rebuilt.
4107         * src/filesystem/dir-common.h (openat): Use ::openat if
4108         _GLIBCXX_HAVE_OPENAT.
4109         * src/filesystem/dir.cc (dir_and_pathname): Use dirfd if
4110         _GLIBCXX_HAVE_OPENAT.
4112 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
4114         * testsuite/27_io/filesystem/operations/rename.cc: xfail on
4115         rtems.
4116         * testsuite/experimental/filesystem/operations/rename.cc:
4117         Likewise.
4119 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
4121         * testsuite/util/testsuite_fs.h (NO_LAST_WRITE_TIME): Define
4122         when appropriate.
4123         * testsuite/lib/libstdc++.exp
4124         (check_v3_target_fs_last_write_time): New.
4125         * testsuite/lib/dg-options.exp (dg-require-target-fs-lwt):
4126         New.
4127         * testsuite/27_io/filesystem/operations/last_write_time.cc:
4128         Skip the test if the features are unavailable.
4129         * testsuite/experimental/filesystem/operations/last_write_time.cc:
4130         Likewise.
4132 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
4134         * testsuite/util/testsuite_fs.h (NO_SPACE): Define if
4135         appropriate.
4136         * testsuite/lib/libstdc++.exp (check_v3_target_fs_space): New.
4137         * testsuite/lib/dg-options.exp (dg-require-target-fs-space):
4138         New.
4139         * testsuite/27_io/filesystem/operations/space.cc: Require
4140         target-fs-space.
4141         * testsuite/experimental/filesystem/operations/space.cc:
4142         Likewise.
4144 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
4146         * testsuite/util/testsuite_fs.h (NO_SYMLINKS): Define on
4147         mingw and when create_symlink is a dummy.
4148         * testsuite/27_io/filesystem/operations/symlink_status.cc:
4149         Drop mingw xfail.
4150         (test01, test02): Don't create symlinks when NO_SYMLINKS is
4151         defined.
4152         * testsuite/27_io/filesystem/operations/canonical.cc (test03):
4153         Likewise.
4154         * testsuite/27_io/filesystem/operations/copy.cc (test02):
4155         Likewise.
4156         * testsuite/27_io/filesystem/operations/create_directories.cc
4157         (test04): Likewise.
4158         * testsuite/27_io/filesystem/operations/create_directory.cc
4159         (test01): Likewise.
4160         * testsuite/27_io/filesystem/operations/permissions.cc
4161         (test03, test04): Likewise.
4162         * testsuite/27_io/filesystem/operations/remove.cc (test01):
4163         Likewise.
4164         * testsuite/27_io/filesystem/operations/remove_all.cc (test01):
4165         Likewise.
4166         * testsuite/27_io/filesystem/operations/rename.cc
4167         (test_symlinks): Likewise.
4168         * testsuite/27_io/filesystem/operations/weakly_canonical.cc
4169         (test01): Likewise.
4170         * testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
4171         (test06): Likewise.
4172         * testsuite/experimental/filesystem/operations/copy.cc
4173         (test01): Likewise.
4174         * testsuite/experimental/filesystem/operations/create_directories.cc
4175         (test04): Likewise.
4176         * testsuite/experimental/filesystem/operations/create_directory.cc
4177         (test01): Likewise.
4178         * testsuite/experimental/filesystem/operations/permissions.cc
4179         (test03, test04): Likewise.
4180         * testsuite/experimental/filesystem/operations/remove.cc
4181         (test01): Likewise.
4182         * testsuite/experimental/filesystem/operations/remove_all.cc
4183         (test01): Likewise.
4184         * testsuite/experimental/filesystem/operations/rename.cc
4185         (test01): Likewise.
4186         * testsuite/lib/libstdc++.exp
4187         (v3_check_preprocessor_condition): Add optional inc parameter.
4188         Add it to the test program after include bits/c++config.h.
4189         (check_v3_target_fs_symlinks): New.
4190         * testsuite/lib/dg-options.exp
4191         (dg-require-target-fs-symlinks): New.
4192         * testsuite/27_io/filesystem/operations/read_symlink.cc:
4193         Replace mingw xfail with require target-fs-symlinks.
4194         * testsuite/experimental/filesystem/operations/read_symlink.cc:
4195         Likewise.
4197 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
4199         * testsuite/27_io/filesystem/operations/copy.cc (test02):
4200         Select TO after creating FROM.
4201         (test03, test04): Likewise.
4202         * testsuite/experimental/filesystem/operations/copy.cc
4203         (test02, test03, test04): Likewise.
4205 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
4207         * testsuite/30_threads/thread/native_handle/cancel.cc: Add an
4208         explicit cancellation point in case sleep_for lacks one.
4210 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
4212         * testsuite/lib/dg-options.exp (add_options_for_net_ts): Add
4213         -lbsd for RTEMS targets.
4215 2022-06-23  Jonathan Wakely  <jwakely@redhat.com>
4217         * testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
4218         rmdir to remove directories.
4219         * testsuite/experimental/filesystem/iterators/error_reporting.cc:
4220         Likewise.
4222 2022-06-23  Jonathan Wakely  <jwakely@redhat.com>
4224         * testsuite/26_numerics/random/random_device/entropy.cc: Use
4225         numeric_limits<unsigned>::digits.
4227 2022-06-22  Alexandre Oliva  <oliva@adacore.com>
4229         * libsupc++/eh_globals.cc [!_GLIBCXX_HAVE_TLS]
4230         (__eh_globals_init::~__eh_globals_init): Clear _S_init first.
4232 2022-06-22  Alexandre Oliva  <oliva@adacore.com>
4234         * testsuite/30_threads/this_thread/60421.cc (test02): Call
4235         sched_yield.
4237 2022-06-22  Alexandre Oliva  <oliva@adacore.com>
4239         * testsuite/20_util/to_chars/long_double.cc: Require cmath.
4241 2022-06-22  Alexandre Oliva  <oliva@adacore.com>
4243         * testsuite/23_containers/bitset/cons/dr1325-2.cc: Work around
4244         global struct bitset.
4245         * testsuite/23_containers/bitset/ext/15361.cc: Likewise.
4246         * testsuite/23_containers/bitset/input/1.cc: Likewise.
4247         * testsuite/23_containers/bitset/to_string/1.cc: Likewise.
4248         * testsuite/23_containers/bitset/to_string/dr396.cc: Likewise.
4250 2022-06-17  Jonathan Wakely  <jwakely@redhat.com>
4252         * testsuite/21_strings/basic_string/cons/char/105995.cc: Add
4253         missing #include.
4255 2022-06-16  Jonathan Wakely  <jwakely@redhat.com>
4257         PR libstdc++/105995
4258         * include/bits/basic_string.h (_M_use_local_data): Initialize
4259         the entire SSO buffer.
4260         * testsuite/21_strings/basic_string/cons/char/105995.cc: New test.
4262 2022-06-16  Jonathan Wakely  <jwakely@redhat.com>
4264         PR libstdc++/101482
4265         * include/ext/vstring.h (operator==): Always check lengths
4266         before comparing.
4268 2022-06-15  François Dumont  <fdumont@gcc.gnu.org>
4270         PR libstdc++/105717
4271         * include/bits/hashtable_policy.h (_ConvertToValueType): New.
4272         * include/bits/hashtable.h (_Hashtable<>::_M_insert_unique_aux): New.
4273         (_Hashtable<>::_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Use latters.
4274         (_Hashtable<>::_M_insert(_Arg&&, const _NodeGenerator&, false_type)): Likewise.
4275         (_Hashtable(_InputIterator, _InputIterator, size_type, const _Hash&, const _Equal&,
4276         const allocator_type&, true_type)): Use this.insert range.
4277         (_Hashtable(_InputIterator, _InputIterator, size_type, const _Hash&, const _Equal&,
4278         const allocator_type&, false_type)): Use _M_insert.
4279         * testsuite/23_containers/unordered_map/cons/56112.cc: Check how many times conversion
4280         is done.
4281         * testsuite/23_containers/unordered_map/insert/105717.cc: New test.
4282         * testsuite/23_containers/unordered_set/insert/105717.cc: New test.
4284 2022-06-14  Jonathan Wakely  <jwakely@redhat.com>
4286         PR libstdc++/62187
4287         * include/bits/basic_string.h (operator==): Always compare
4288         lengths before checking string contents.
4289         [!__cpp_lib_three_way_comparison] (operator==, operator!=):
4290         Reorder arguments.
4292 2022-06-14  Jonathan Wakely  <jwakely@redhat.com>
4294         PR libstdc++/59048
4295         * include/bits/basic_string.h (compare): Define inline.
4296         * include/bits/basic_string.tcc (compare): Remove out-of-line
4297         definitions.
4298         * include/bits/cow_string.h (compare): Define inline.
4299         * testsuite/21_strings/basic_string/operations/compare/char/3.cc:
4300         New test.
4302 2022-06-14  Jonathan Wakely  <jwakely@redhat.com>
4304         * include/bits/new_allocator.h: Fix indentation.
4305         * include/ext/malloc_allocator.h: Likewise.
4307 2022-06-14  Jonathan Wakely  <jwakely@redhat.com>
4309         PR libstdc++/105957
4310         * include/bits/allocator.h (allocator::allocate): Check for
4311         overflow in constexpr allocation.
4312         * testsuite/20_util/allocator/105975.cc: New test.
4314 2022-06-13  Mark Mentovai  <mark@mentovai.com>
4316         * include/experimental/bits/fs_path.h (__detail::__null_terminated):
4317         Rename to __nul_terminated to avoid colliding with a macro in
4318         Apple's SDK.
4320 2022-06-13  Jonathan Wakely  <jwakely@redhat.com>
4322         * include/std/atomic (__atomic_val_t): Use __type_identity_t
4323         instead of atomic<T>::value_type, as per LWG 3220.
4324         * testsuite/29_atomics/atomic/lwg3220.cc: New test.
4326 2022-06-10  Jonathan Wakely  <jwakely@redhat.com>
4328         PR libstdc++/105844
4329         * include/experimental/numeric (experimental::gcd): Simplify
4330         assertions. Use __abs_r instead of __absu.
4331         (experimental::lcm): Likewise. Remove use of __detail::__lcm so
4332         overflow can be detected.
4333         * include/std/numeric (__detail::__absu): Rename to __abs_r and
4334         change to allow signed result type, so overflow can be detected.
4335         (__detail::__lcm): Remove.
4336         (gcd): Simplify assertions. Use __abs_r instead of __absu.
4337         (lcm): Likewise. Remove use of __detail::__lcm so overflow can
4338         be detected.
4339         * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
4340         * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
4341         * testsuite/26_numerics/gcd/105844.cc: New test.
4342         * testsuite/26_numerics/lcm/105844.cc: New test.
4344 2022-06-10  Jonathan Wakely  <jwakely@redhat.com>
4346         PR libstdc++/105880
4347         * libsupc++/eh_globals.cc (eh_globals): Ensure constant init and
4348         prevent destruction during termination.
4349         (__eh_globals_init::_M_init): Replace with static member _S_init.
4350         (__cxxabiv1::__cxa_get_globals_fast): Update.
4351         (__cxxabiv1::__cxa_get_globals): Likewise.
4353 2022-06-10  Jonathan Wakely  <jwakely@redhat.com>
4355         * include/bits/basic_string.h (__hash_str_base): New class
4356         template.
4357         (hash<basic_string<C, char_traits<C>, A>>): Define partial
4358         specialization for each of the standard character types.
4359         (hash<string>, hash<wstring>, hash<u8string>, hash<u16string>)
4360         (hash<u32string>): Remove explicit specializations.
4361         * include/std/string (__hash_string_base): Remove class
4362         template.
4363         (hash<pmr::string>, hash<pmr::wstring>, hash<pmr::u8string>)
4364         (hash<pmr::u16string>, hash<pmr::u32string>): Remove explicit
4365         specializations.
4366         * testsuite/21_strings/basic_string/hash/hash.cc: Test with
4367         custom allocators.
4368         * testsuite/21_strings/basic_string/hash/hash_char8_t.cc:
4369         Likewise.
4371 2022-05-27  Jonathan Wakely  <jwakely@redhat.com>
4373         PR libstdc++/105671
4374         * include/std/sstream (basic_stringbuf::_M_high_mark): Add
4375         always_inline attribute.
4377 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
4379         PR libstdc++/105681
4380         * include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:
4381         Limit ga_sizes array to values that fit in size_t.
4382         * include/ext/random [__SIZE_WIDTH < 32] (sfmt86243)
4383         (sfmt86243_64, sfmt132049, sfmt132049_64, sfmt216091)
4384         (sfmt216091_64): Do not declare.
4386 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
4388         * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Make
4389         lookup for ios_errc and future_errc check versioned namespace.
4390         (StdAtomicPrinter): Strip versioned namespace from typename.
4392 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
4394         * src/c++11/Makefile.am: Add new source file.
4395         * src/c++11/Makefile.in: Regenerate.
4396         * src/c++11/cxx11-ios_failure.cc (iostream_category):
4397         Move to ...
4398         * src/c++11/ios_errcat.cc: New file.
4399         * testsuite/27_io/ios_base/failure/error_code.cc: Check that
4400         std::iostream_category() is defined and used for std::io_errc.
4402 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
4404         * include/bits/stl_iterator.h (counted_iterator::operator++(int)):
4405         Add 'constexpr' as per LWG 3643.
4406         * testsuite/24_iterators/counted_iterator/lwg3643.cc: New test.
4408 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
4410         * include/bits/functional_hash.h (__is_fast_hash): Add doxygen
4411         comment.
4412         * include/bits/hashtable.h: Do not include <bits/stl_function.h>
4413         here.
4414         * include/bits/hashtable_policy.h: Include <bits/stl_pair.h> and
4415         <bits/functional_hash.h>.
4416         * include/bits/unordered_map.h: Include required headers.
4417         * include/bits/unordered_set.h: Likewise.
4418         * include/std/unordered_map: Do not include headers for indirect
4419         dependencies.
4420         * include/std/unordered_set: Likewise.
4422 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
4424         * include/bits/ranges_algobase.h: Do not include
4425         <bits/stl_iterator_base_types.h>.
4426         * include/std/string: Likewise.
4427         * include/std/variant: Likewise.
4429 2022-05-26  Nathan Sidwell  <nathan@acm.org>
4431         * include/bits/hashtable.h: Include required headers.
4432         * include/bits/hashtable_policy.h: Likewise.
4433         * include/bits/stl_heap.h: Likewise.
4434         * include/bits/stl_iterator_base_funcs.h: Likewise.
4436 2022-05-26  François Dumont  <fdumont@gcc.gnu.org>
4438         * python/libstdcxx/v6/printers.py (StdSpanPrinter.__init__):
4439         Strip typename from version namespace.
4441 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
4443         * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Strip
4444         versioned namespace from the template argument too.
4446 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
4448         * testsuite/21_strings/basic_string/modifiers/pop_back/char/1.cc:
4449         Moved to...
4450         * testsuite/21_strings/basic_string/modifiers/pop_back/char.cc:
4451         ...here.
4452         * testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t/1.cc:
4453         Moved to...
4454         * testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t.cc:
4455         ...here.
4456         * testsuite/21_strings/basic_string/modifiers/swap/wchar_t/constexpr.cc:
4457         Moved to...
4458         * testsuite/21_strings/basic_string/modifiers/swap/constexpr-wchar_t.cc:
4459         ...here.
4460         * testsuite/21_strings/basic_string/modifiers/swap/char/constexpr.cc:
4461         Moved to...
4462         * testsuite/21_strings/basic_string/modifiers/swap/constexpr.cc:
4463         ...here.
4464         * testsuite/21_strings/basic_string/operations/contains/char/1.cc:
4465         Moved to...
4466         * testsuite/21_strings/basic_string/operations/contains/char.cc:
4467         ...here.
4468         * testsuite/21_strings/basic_string/operations/contains/wchar_t/1.cc:
4469         Moved to...
4470         * testsuite/21_strings/basic_string/operations/contains/wchar_t.cc:
4471         ...here.
4472         * testsuite/21_strings/basic_string/operations/data/char/1.cc:
4473         Moved to...
4474         * testsuite/21_strings/basic_string/operations/data/char.cc:
4475         ...here.
4476         * testsuite/21_strings/basic_string/operations/data/wchar_t/1.cc:
4477         Moved to...
4478         * testsuite/21_strings/basic_string/operations/data/wchar_t.cc:
4479         ...here.
4480         * testsuite/21_strings/basic_string/operations/ends_with/char/1.cc:
4481         Moved to...
4482         * testsuite/21_strings/basic_string/operations/ends_with/char.cc:
4483         ...here.
4484         * testsuite/21_strings/basic_string/operations/ends_with/wchar_t/1.cc:
4485         Moved to...
4486         * testsuite/21_strings/basic_string/operations/ends_with/wchar_t.cc:
4487         ...here.
4488         * testsuite/21_strings/basic_string/operations/starts_with/char/1.cc:
4489         Moved to...
4490         * testsuite/21_strings/basic_string/operations/starts_with/char.cc:
4491         ...here.
4492         * testsuite/21_strings/basic_string/operations/starts_with/wchar_t/1.cc:
4493         Moved to...
4494         * testsuite/21_strings/basic_string/operations/starts_with/wchar_t.cc:
4495         ...here.
4496         * testsuite/21_strings/basic_string/operations/substr/char/1.cc:
4497         Moved to...
4498         * testsuite/21_strings/basic_string/operations/substr/char.cc:
4499         ...here.
4500         * testsuite/21_strings/basic_string/operations/substr/wchar_t/1.cc:
4501         Moved to...
4502         * testsuite/21_strings/basic_string/operations/substr/wchar_t.cc:
4503         ...here.
4504         * testsuite/21_strings/basic_string/range_access/char/1.cc:
4505         Moved to...
4506         * testsuite/21_strings/basic_string/range_access/char.cc:
4507         ...here.
4508         * testsuite/21_strings/basic_string/range_access/wchar_t/1.cc:
4509         Moved to...
4510         * testsuite/21_strings/basic_string/range_access/wchar_t.cc:
4511         ...here.
4512         * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
4513         Moved to...
4514         * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char.cc:
4515         ...here.
4516         * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
4517         Moved to...
4518         * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t.cc:
4519         ...here.
4520         * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
4521         Moved to...
4522         * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char.cc:
4523         ...here.
4524         * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
4525         Moved to...
4526         * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t.cc:
4527         ...here.
4528         * testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc:
4529         Moved to...
4530         * testsuite/21_strings/basic_string_view/modifiers/swap/char.cc:
4531         ...here.
4532         * testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc:
4533         Moved to...
4534         * testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t.cc:
4535         ...here.
4536         * testsuite/21_strings/basic_string_view/operations/contains/char/1.cc:
4537         Moved to...
4538         * testsuite/21_strings/basic_string_view/operations/contains/char.cc:
4539         ...here.
4540         * testsuite/21_strings/basic_string_view/operations/contains/wchar_t/1.cc:
4541         Moved to...
4542         * testsuite/21_strings/basic_string_view/operations/contains/wchar_t.cc:
4543         ...here.
4544         * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
4545         Moved to...
4546         * testsuite/21_strings/basic_string_view/operations/data/char.cc:
4547         ...here.
4548         * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
4549         Moved to...
4550         * testsuite/21_strings/basic_string_view/operations/data/wchar_t.cc:
4551         ...here.
4552         * testsuite/21_strings/basic_string_view/operations/ends_with/char/1.cc:
4553         Moved to...
4554         * testsuite/21_strings/basic_string_view/operations/ends_with/char.cc:
4555         ...here.
4556         * testsuite/21_strings/basic_string_view/operations/ends_with/wchar_t/1.cc:
4557         Moved to...
4558         * testsuite/21_strings/basic_string_view/operations/ends_with/wchar_t.cc:
4559         ...here.
4560         * testsuite/21_strings/basic_string_view/operations/starts_with/char/1.cc:
4561         Moved to...
4562         * testsuite/21_strings/basic_string_view/operations/starts_with/char.cc:
4563         ...here.
4564         * testsuite/21_strings/basic_string_view/operations/starts_with/wchar_t/1.cc:
4565         Moved to...
4566         * testsuite/21_strings/basic_string_view/operations/starts_with/wchar_t.cc:
4567         ...here.
4568         * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
4569         Moved to...
4570         * testsuite/21_strings/basic_string_view/operations/substr/char.cc:
4571         ...here.
4572         * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
4573         Moved to...
4574         * testsuite/21_strings/basic_string_view/operations/substr/wchar_t.cc:
4575         ...here.
4576         * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
4577         Moved to...
4578         * testsuite/21_strings/basic_string_view/range_access/char.cc:
4579         ...here.
4580         * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
4581         Moved to...
4582         * testsuite/21_strings/basic_string_view/range_access/wchar_t.cc:
4583         ...here.
4584         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char/1.cc:
4585         Moved to...
4586         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char.cc:
4587         ...here.
4588         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t/1.cc:
4589         Moved to...
4590         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t.cc:
4591         ...here.
4592         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t/1.cc:
4593         Moved to...
4594         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t.cc:
4595         ...here.
4596         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char8_t/1.cc:
4597         Moved to...
4598         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char8_t.cc:
4599         ...here.
4600         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/1.cc:
4601         Moved to...
4602         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/int.cc:
4603         ...here.
4604         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t/1.cc:
4605         Moved to...
4606         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t.cc:
4607         ...here.
4608         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
4609         Moved to...
4610         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char.cc:
4611         ...here.
4612         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
4613         Moved to...
4614         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t.cc:
4615         ...here.
4616         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
4617         Moved to...
4618         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t.cc:
4619         ...here.
4620         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
4621         Moved to...
4622         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t.cc:
4623         ...here.
4624         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
4625         Moved to...
4626         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/int.cc:
4627         ...here.
4628         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
4629         Moved to...
4630         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t.cc:
4631         ...here.
4632         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char/1.cc:
4633         Moved to...
4634         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char.cc:
4635         ...here.
4636         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char16_t/1.cc:
4637         Moved to...
4638         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char16_t.cc:
4639         ...here.
4640         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char32_t/1.cc:
4641         Moved to...
4642         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char32_t.cc:
4643         ...here.
4644         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char8_t/1.cc:
4645         Moved to...
4646         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char8_t.cc:
4647         ...here.
4648         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/short/1.cc:
4649         Moved to...
4650         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/short.cc:
4651         ...here.
4652         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/wchar_t/1.cc:
4653         Moved to...
4654         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/wchar_t.cc:
4655         ...here.
4657 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
4659         * testsuite/20_util/duration/requirements/explicit_instantiation/explicit_instantiation.cc:
4660         Moved to...
4661         * testsuite/20_util/duration/requirements/explicit_instantiation.cc: ...here.
4662         * testsuite/20_util/time_point/requirements/explicit_instantiation/explicit_instantiation.cc:
4663         Moved to...
4664         * testsuite/20_util/time_point/requirements/explicit_instantiation.cc: ...here.
4665         * testsuite/20_util/unique_ptr/requirements/explicit_instantiation/explicit_instantiation.cc:
4666         Moved to...
4667         * testsuite/20_util/unique_ptr/requirements/explicit_instantiation.cc: ...here.
4669 2022-05-25  Jason Merrill  <jason@redhat.com>
4671         * testsuite/20_util/function_objects/constexpr_searcher.cc: Add
4672         constexpr.
4674 2022-05-20  Jonathan Wakely  <jwakely@redhat.com>
4676         * testsuite/26_numerics/random/bernoulli_distribution/operators/values.cc:
4677         Run fewer iterations for simulator targets.
4678         * testsuite/26_numerics/random/binomial_distribution/operators/values.cc:
4679         Likewise.
4680         * testsuite/26_numerics/random/discrete_distribution/operators/values.cc:
4681         Likewise.
4682         * testsuite/26_numerics/random/geometric_distribution/operators/values.cc:
4683         Likewise.
4684         * testsuite/26_numerics/random/negative_binomial_distribution/operators/values.cc:
4685         Likewise.
4686         * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
4687         Likewise.
4688         * testsuite/26_numerics/random/uniform_int_distribution/operators/values.cc:
4689         Likewise.
4691 2022-05-19  Jonathan Wakely  <jwakely@redhat.com>
4693         * include/bits/char_traits.h: Only include <cstdint> when
4694         necessary.
4695         * include/std/stacktrace: Use __UINTPTR_TYPE__ instead of
4696         uintptr_t.
4697         * src/c++11/cow-stdexcept.cc: Include <stdint.h>.
4698         * src/c++17/floating_to_chars.cc: Likewise.
4699         * testsuite/20_util/assume_aligned/1.cc: Include <cstdint>.
4700         * testsuite/20_util/assume_aligned/3.cc: Likewise.
4701         * testsuite/20_util/shared_ptr/creation/array.cc: Likewise.
4703 2022-05-19  Jonathan Wakely  <jwakely@redhat.com>
4705         * include/bits/basic_string.h: Do not include <ext/atomicity.h>
4706         here.
4707         * include/bits/cow_string.h: Include it here.
4709 2022-05-19  Jonathan Wakely  <jwakely@redhat.com>
4711         * include/Makefile.am: Add new header.
4712         * include/Makefile.in: Regenerate.
4713         * include/bits/memory_resource.h: New file.
4714         * include/std/deque: Include <bits/memory_resource.h>.
4715         * include/std/forward_list: Likewise.
4716         * include/std/list: Likewise.
4717         * include/std/map: Likewise.
4718         * include/std/memory_resource (pmr::memory_resource): Move to
4719         new <bits/memory_resource.h> header.
4720         (pmr::polymorphic_allocator): Likewise.
4721         * include/std/regex: Likewise.
4722         * include/std/set: Likewise.
4723         * include/std/stacktrace: Likewise.
4724         * include/std/string: Likewise.
4725         * include/std/unordered_map: Likewise.
4726         * include/std/unordered_set: Likewise.
4727         * include/std/vector: Likewise.
4728         * testsuite/21_strings/basic_string/types/pmr_typedefs.cc:
4729         Remove <memory_resource> header and check construction.
4730         * testsuite/23_containers/deque/types/pmr_typedefs.cc: Likewise.
4731         * testsuite/23_containers/forward_list/pmr_typedefs.cc:
4732         Likewise.
4733         * testsuite/23_containers/list/pmr_typedefs.cc: Likewise.
4734         * testsuite/23_containers/map/pmr_typedefs.cc: Likewise.
4735         * testsuite/23_containers/multimap/pmr_typedefs.cc: Likewise.
4736         * testsuite/23_containers/multiset/pmr_typedefs.cc: Likewise.
4737         * testsuite/23_containers/set/pmr_typedefs.cc: Likewise.
4738         * testsuite/23_containers/unordered_map/pmr_typedefs.cc:
4739         Likewise.
4740         * testsuite/23_containers/unordered_multimap/pmr_typedefs.cc:
4741         Likewise.
4742         * testsuite/23_containers/unordered_multiset/pmr_typedefs.cc:
4743         Likewise.
4744         * testsuite/23_containers/unordered_set/pmr_typedefs.cc:
4745         Likewise.
4746         * testsuite/23_containers/vector/pmr_typedefs.cc: Likewise.
4747         * testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
4749 2022-05-19  Jonathan Wakely  <jwakely@redhat.com>
4751         * include/std/memory_resource (polymorphic_allocator): Add
4752         non-template equality operator, as proposed for LWG 3683.
4753         * testsuite/20_util/polymorphic_allocator/lwg3683.cc: New test.
4755 2022-05-17  Jonathan Wakely  <jwakely@redhat.com>
4757         * src/c++17/memory_resource.cc (set_default_resource): Use
4758         memory_order_acq_rel.
4759         (get_default_resource): Use memory_order_acquire.
4761 2022-05-17  Jonathan Wakely  <jwakely@redhat.com>
4763         * include/std/memory_resource (new_delete_resource): Add
4764         nodiscard, returns_nonnull and const attributes.
4765         (null_memory_resource): Likewise.
4766         (set_default_resource, get_default_resource): Add returns_nonnull
4767         attribute.
4768         (memory_resource::is_equal): Add nodiscard attribute.
4769         (operator==, operator!=): Likewise.
4771 2022-05-17  Jonathan Wakely  <jwakely@redhat.com>
4773         * include/bits/ios_base.h (io_category): Add const and nodiscard
4774         attributes.
4775         (make_error_code, make_error_condition): Add nodiscard.
4776         * include/std/future (future_category): Add const and nodiscard.
4777         (make_error_code, make_error_condition): Add nodiscard.
4778         * include/std/system_error (generic_category system_category):
4779         Add nodiscard. Replace _GLIBCXX_CONST with C++11 attribute.
4780         (error_code::value, error_code::category, error_code::operator bool)
4781         (error_condition::value, error_condition::category)
4782         (error_condition::operator bool, make_error_code)
4783         (make_error_condition, operator==, operator!=, operator<=>): Add
4784         nodiscard.
4786 2022-05-17  Jonathan Wakely  <jwakely@redhat.com>
4788         * testsuite/20_util/expected/synopsis.cc: Skip for versioned
4789         namespace.
4790         * testsuite/27_io/headers/iosfwd/synopsis.cc: Likewise.
4792 2022-05-17  Jonathan Wakely  <jwakely@redhat.com>
4794         * src/Makefile.am [ENABLE_SYMVERS_GNU_NAMESPACE] (cxx11_sources):
4795         Do not build the compatibility*-c++0x.cc objects.
4796         * src/Makefile.in: Regenerate.
4797         * src/c++11/compatibility-c++0x.cc [_GLIBCXX_INLINE_VERSION]:
4798         Refuse to build for the versioned namespace.
4799         * src/c++11/compatibility-chrono.cc: Likewise.
4800         * src/c++11/compatibility-condvar.cc: Likewise.
4801         * src/c++11/compatibility-thread-c++0x.cc: Likewise.
4802         * src/c++11/chrono.cc (system_clock, steady_clock):
4803         Use macros to define in inline namespace _V2, matching the
4804         declarations in <system_error>.
4805         * src/c++11/system_error.cc (system_category, generic_category):
4806         Likewise.
4808 2022-05-16  Jonathan Wakely  <jwakely@redhat.com>
4810         * doc/xml/manual/prerequisites.xml: Fix attributes for external
4811         hyperlink.
4812         * doc/html/manual/setup.html: Regenerate.
4814 2022-05-16  Jonathan Wakely  <jwakely@redhat.com>
4816         * doc/xml/manual/status_cxx2023.xml: Update with gcc-12 support.
4817         * doc/html/*: Regenerate.
4819 2022-05-16  Jonathan Wakely  <jwakely@redhat.com>
4821         * doc/xml/manual/intro.xml: Include new chapter.
4822         * doc/xml/manual/status_cxx2020.xml: Tweak release numbers.
4823         * doc/xml/manual/status_cxx2023.xml: New file.
4824         * doc/html/*: Regenerate.
4826 2022-05-16  Jonathan Wakely  <jwakely@redhat.com>
4828         * doc/html/manual/status.html: Regenerate.
4829         * doc/xml/manual/status_cxx2020.xml: Fix supported version for
4830         C++20 bit operations.
4832 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4834         * include/bits/std_thread.h (thread::_State, thread::_State_ptr):
4835         Declare as private unless _GLIBCXX_THREAD_IMPL is defined.
4836         * src/c++11/thread.cc (_GLIBCXX_THREAD_IMPL): Define.
4838 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4840         * include/std/future (launch): Make operators noexcept.
4842 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4844         * doc/doxygen/user.cfg.in (PREDEFINED): Replace __exception_ptr
4845         with "__unspecified__".
4846         * libsupc++/exception_ptr.h: Improve doxygen docs.
4847         (__exception_ptr::swap): Also declare in namespace std.
4849 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4851         * libsupc++/nested_exception.h (throw_with_nested) [C++17]: Use
4852         if-constexpr instead of tag dispatching.
4853         (rethrow_if_nested) [C++17]: Likewise.
4854         (rethrow_if_nested) [!__cpp_rtti]: Do not use dynamic_cast if it
4855         would require RTTI.
4856         * testsuite/18_support/nested_exception/rethrow_if_nested-term.cc:
4857         New test.
4859 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4861         * doc/doxygen/user.cfg.in (PREDEFINED): Define
4862         _GTHREAD_USE_MUTEX_TIMEDLOCK macro.
4863         * include/bits/std_mutex.h (mutex, lock_guard): Use @since and
4864         @headerfile.
4865         * include/bits/unique_lock.h (unique_lock): Likewise.
4866         * include/std/mutex (recursive_mutex, timed_mutex)
4867         (recursive_timed_mutex, scoped_lock): Likewise.
4869 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4871         * doc/doxygen/user.cfg.in (PREDEFINED): Define
4872         _GLIBCXX23_CONSTEXPR macro.
4873         * include/backward/auto_ptr.h (auto_ptr): Use @deprecated.
4874         * include/bits/unique_ptr.h (default_delete): Use @since and
4875         @headerfile.
4876         * include/std/scoped_allocator: Remove @ingroup from @file
4877         block.
4879 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4881         * include/bits/std_thread.h (thread, thread::id): Improve
4882         doxygen docs.
4883         * include/std/future: Likewise.
4884         * include/std/thread (jthread): Likewise.
4886 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4888         * include/bits/ostream_insert.h: Mark helper functions as
4889         undocumented by Doxygen.
4890         * include/bits/stl_algo.h: Use markdown for formatting and mark
4891         helper functions as undocumented.
4892         * include/bits/stl_numeric.h:  Likewise.
4893         * include/bits/stl_pair.h (pair): Add @headerfile.
4895 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4897         * doc/doxygen/user.cfg.in (PREDEFINED): Define __allocator_base
4898         so that Doxygen shows the right base-class for std::allocator.
4899         * include/bits/alloc_traits.h: Improve doxygen docs.
4900         * include/bits/allocator.h: Likewise.
4901         * include/bits/new_allocator.h: Likewise.
4902         * include/ext/new_allocator.h: Likewise.
4904 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4906         * doc/doxygen/user.cfg.in (PREDEFINED): Define macro
4907         _GLIBCXX_DOXYGEN_ONLY to expand its argument.
4908         * include/bits/c++config (_GLIBCXX_DOXYGEN_ONLY): Define.
4909         * include/bits/regex.h: Improve doxygen docs.
4910         * include/bits/regex_constants.h: Likewise.
4911         * include/bits/regex_error.h: Likewise.
4913 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4915         * include/std/atomic: Suppress doxygen docs for
4916         implementation details.
4917         * include/bits/atomic_base.h: Likewise.
4918         * include/bits/shared_ptr_atomic.h: Use markdown. Fix grouping
4919         so that std::atomic is not added to the pointer abstractions
4920         group.
4922 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4924         * include/std/system_error: Improve doxygen comments.
4926 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4928         * include/bits/ptr_traits.h: Add some doxygen comments.
4930 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4932         * doc/doxygen/user.cfg.in (PREDEFINED): Expand new macros to
4933         nothing.
4934         * include/bits/c++config (_GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE)
4935         (_GLIBCXX_END_INLINE_ABI_NAMESPACE): Define new macros.
4936         * include/bits/algorithmfwd.h (_V2::__rotate): Use new macros
4937         for the namespace.
4938         * include/bits/chrono.h (chrono::_V2::system_clock): Likewise.
4939         * include/bits/stl_algo.h (_V2::__rotate): Likewise.
4940         * include/std/condition_variable (_V2::condition_variable_any):
4941         Likewise.
4942         * include/std/system_error (_V2::error_category): Likewise.
4944 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4946         * include/bits/mofunc_impl.h: Fix doxygen command.
4948 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
4950         * doc/doxygen/user.cfg.in (GROUP_NESTED_COMPOUNDS): Set to NO.
4951         (CLASS_DIAGRAMS): Remove obsolete option.
4953 2022-05-12  Jonathan Wakely  <jwakely@redhat.com>
4955         * config/locale/dragonfly/numeric_members.cc: Remove whitespace.
4956         * config/locale/gnu/numeric_members.cc: Likewise.
4957         * include/bits/locale_facets_nonio.h: Likewise.
4958         * libsupc++/typeinfo: Likewise.
4960 2022-05-10  Jonathan Wakely  <jwakely@redhat.com>
4962         PR libstdc++/105284
4963         * include/std/iosfwd: Add declarations for <spanstream> class
4964         templates and typedefs.
4965         * include/std/spanstream (basic_spanbuf, basic_ispanstream)
4966         (basic_ospanstream, basic_spanstream): Remove default template
4967         arguments.
4968         * testsuite/27_io/headers/iosfwd/synopsis.cc: Add <spanstream>
4969         declarations.
4970         * testsuite/27_io/headers/iosfwd/types.cc: Check <spanstream>
4971         default arguments.
4973 2022-05-10  Jonathan Wakely  <jwakely@redhat.com>
4975         PR libstdc++/105284
4976         * include/std/iosfwd: Add declarations for <synstream> class
4977         templates and typedefs.
4978         * include/std/syncstream (basic_syncbuf, basic_osyncstream):
4979         Remove default template arguments.
4980         * testsuite/27_io/headers/iosfwd/synopsis.cc: New test.
4981         * testsuite/27_io/headers/iosfwd/types.cc: New test.
4983 2022-05-06  Jonathan Wakely  <jwakely@redhat.com>
4985         * include/bits/random.tcc (operator==): Only check
4986         normal_distribution::_M_saved_available once.
4987         * testsuite/26_numerics/random/normal_distribution/operators/equal.cc:
4988         Check equality after state changes.
4989         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
4990         lineno.
4992 2022-05-06  Jonathan Wakely  <jwakely@redhat.com>
4994         PR libstdc++/105502
4995         * include/bits/random.tcc
4996         (operator>>(basic_istream<C,T>&, normal_distribution<R>&)):
4997         Update state when __state_avail is false.
4998         * testsuite/26_numerics/random/normal_distribution/operators/serialize.cc:
4999         Check that deserialized object equals serialized one.
5001 2022-05-06  Alexandre Oliva  <oliva@adacore.com>
5003         * include/experimental/bits/simd.h [__ALTIVEC__]: Require VSX
5004         for double, long long, and 64-bit long intrinsic types.
5005         [__ALTIVEC__] (__intrinsic_type): Mention 128-bit in
5006         preexisting long double diagnostic, adjust no-VSX double
5007         diagnostic to cover 64-bit long double as well.
5009 2022-05-06  Jonathan Wakely  <jwakely@redhat.com>
5011         PR libstdc++/104731
5012         * testsuite/27_io/filesystem/iterators/error_reporting.cc:
5013         Use a trailing char array as storage for dirent::d_name.
5015 2022-05-06  Jonathan Wakely  <jwakely@redhat.com>
5017         * include/std/stacktrace: Do not include <cxxabi.h>.
5018         (__cxa_demangle): Declare.
5020 2022-05-06  Jonathan Wakely  <jwakely@redhat.com>
5022         PR libstdc++/99871
5023         * include/bits/specfun.h: Use visibility attribute on namespace,
5024         instead of pragma push/pop.
5025         * libsupc++/compare: Likewise.
5026         * libsupc++/exception: Likewise.
5027         * libsupc++/exception.h: Likewise.
5028         * libsupc++/exception_ptr.h: Likewise.
5029         * libsupc++/initializer_list: Likewise.
5030         * libsupc++/nested_exception.h: Likewise.
5032 2022-05-06  Jonathan Wakely  <jwakely@redhat.com>
5034         * doc/xml/manual/test.xml: Remove requirement for copyright and
5035         GPL notice in tests.
5036         * doc/html/manual/test.html: Regenerate.
5038 2022-05-05  Jonathan Wakely  <jwakely@redhat.com>
5040         * include/experimental/memory_resource [!__cpp_rtti]
5041         (__resource_adaptor_imp::do_is_equal): Do not use dynamic_cast
5042         when RTTI is disabled.
5043         * testsuite/17_intro/freestanding.cc: Require RTTI.
5044         * testsuite/18_support/exception/38732.cc: Likewise.
5045         * testsuite/18_support/exception_ptr/rethrow_exception.cc:
5046         Likewise.
5047         * testsuite/18_support/nested_exception/68139.cc: Likewise.
5048         * testsuite/18_support/nested_exception/rethrow_if_nested.cc:
5049         Likewise.
5050         * testsuite/18_support/type_info/103240.cc: Likewise.
5051         * testsuite/18_support/type_info/fundamental.cc: Likewise.
5052         * testsuite/18_support/type_info/hash_code.cc: Likewise.
5053         * testsuite/20_util/any/assign/emplace.cc: Likewise.
5054         * testsuite/20_util/any/cons/in_place.cc: Likewise.
5055         * testsuite/20_util/any/misc/any_cast.cc: Likewise.
5056         * testsuite/20_util/any/observers/type.cc: Likewise.
5057         * testsuite/20_util/function/1.cc: Likewise.
5058         * testsuite/20_util/function/2.cc: Likewise.
5059         * testsuite/20_util/function/3.cc: Likewise.
5060         * testsuite/20_util/function/4.cc: Likewise.
5061         * testsuite/20_util/function/5.cc: Likewise.
5062         * testsuite/20_util/function/6.cc: Likewise.
5063         * testsuite/20_util/function/7.cc: Likewise.
5064         * testsuite/20_util/function/8.cc: Likewise.
5065         * testsuite/20_util/polymorphic_allocator/resource.cc: Likewise.
5066         * testsuite/20_util/shared_ptr/casts/1.cc: Likewise.
5067         * testsuite/20_util/shared_ptr/casts/rval.cc: Likewise.
5068         * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc:
5069         Likewise.
5070         * testsuite/20_util/shared_ptr/misc/get_deleter.cc: Likewise.
5071         * testsuite/20_util/typeindex/comparison_operators.cc: Likewise.
5072         * testsuite/20_util/typeindex/comparison_operators_c++20.cc:
5073         Likewise.
5074         * testsuite/20_util/typeindex/hash.cc: Likewise.
5075         * testsuite/20_util/typeindex/hash_code.cc: Likewise.
5076         * testsuite/20_util/typeindex/name.cc: Likewise.
5077         * testsuite/22_locale/ctype/is/string/89728_neg.cc: Likewise.
5078         * testsuite/22_locale/global_templates/standard_facet_hierarchies.cc:
5079         Likewise.
5080         * testsuite/22_locale/global_templates/user_facet_hierarchies.cc:
5081         Likewise.
5082         * testsuite/22_locale/locale/13630.cc: Check type without using
5083         RTTI.
5084         * testsuite/23_containers/array/requirements/non_default_constructible.cc:
5085         Require RTTI.
5086         * testsuite/27_io/basic_ostream/emit/1.cc: Likewise.
5087         * testsuite/27_io/fpos/14320-1.cc: Check type without using RTTI.
5088         * testsuite/27_io/fpos/mbstate_t/12065.cc: Require RTTI.
5089         * testsuite/27_io/ios_base/failure/dual_abi.cc: Likewise.
5090         * testsuite/experimental/any/misc/any_cast.cc: Likewise.
5091         * testsuite/experimental/any/observers/type.cc: Likewise.
5092         * testsuite/experimental/memory_resource/resource_adaptor.cc:
5093         Likewise.
5094         * testsuite/lib/libstdc++.exp (check_effective_target_rtti):
5095         Define new proc.
5096         * testsuite/tr1/3_function_objects/function/1.cc: Likewise.
5097         * testsuite/tr1/3_function_objects/function/2.cc: Likewise.
5098         * testsuite/tr1/3_function_objects/function/3.cc: Likewise.
5099         * testsuite/tr1/3_function_objects/function/4.cc: Likewise.
5100         * testsuite/tr1/3_function_objects/function/5.cc: Likewise.
5101         * testsuite/tr1/3_function_objects/function/6.cc: Likewise.
5102         * testsuite/tr1/3_function_objects/function/7.cc: Likewise.
5103         * testsuite/tr1/3_function_objects/function/8.cc: Likewise.
5104         * testsuite/tr2/bases/value.cc: Likewise.
5105         * testsuite/tr2/direct_bases/value.cc: Likewise.
5106         * testsuite/util/exception/safety.h [!__cpp_rtti]: Don't print
5107         types without RTTI.
5109 2022-05-04  Jonathan Wakely  <jwakely@redhat.com>
5111         PR libstdc++/104719
5112         * include/std/array (array::size(), array::max_size())
5113         (array::empty(), array::data()): Add  always_inline attribute.
5115 2022-05-04  Jonathan Wakely  <jwakely@redhat.com>
5117         PR libstdc++/104719
5118         * include/std/array (__array_traits::_S_ref): Remove.
5119         (__array_traits::_S_ptr): Remove.
5120         (__array_traits<T, 0>::_Type): Define operator[] and operator T*
5121         to provide an array-like API.
5122         (array::_AT_Type): Remove public typeef.
5123         (array::operator[], array::at, array::front, array::back): Use
5124         index operator to access _M_elems instead of _S_ref.
5125         (array::data): Use implicit conversion from _M_elems to pointer.
5126         (swap(array&, array&)): Use __enable_if_t helper.
5127         (get<I>): Use index operator to access _M_elems.
5128         * testsuite/23_containers/array/tuple_interface/get_neg.cc:
5129         Adjust dg-error line numbers.
5131 2022-05-03  Alexandre Oliva  <oliva@adacore.com>
5133         PR c++/105324
5134         * testsuite/20_util/from_chars/pr105324.cc: Guard test body
5135         with conditional for floating-point overloads of from_char.
5137 2022-05-02  Patrick Palka  <ppalka@redhat.com>
5139         PR libstdc++/103911
5140         * src/c++17/floating_from_chars.cc (find_end_of_float): Accept
5141         two delimeters for the exponent part in the form of a possibly
5142         NULL string of length two.  Don't use std::tolower.
5143         (pattern): Adjust calls to find_end_of_float accordingly.
5145 2022-05-02  Patrick Palka  <ppalka@redhat.com>
5147         PR libstdc++/105441
5148         * src/c++17/floating_from_chars.cc (__floating_from_chars_hex):
5149         Also accept 'P' as the start of the exponent.
5150         * testsuite/20_util/from_chars/7.cc: Add corresponding testcase.
5152 2022-04-29  Jonathan Wakely  <jwakely@redhat.com>
5154         PR libstdc++/105417
5155         * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt:
5156         Regenerate.
5157         * src/c++11/compatibility-ldbl-alt128.cc [_GLIBCXX_USE_DUAL_ABI]:
5158         Define __gnu_ieee128::num_get<C>::_M_extract_int[abi:cxx11]<I>
5159         symbols as aliases for corresponding symbols without abi-tag.
5161 2022-04-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5163         * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
5164         * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
5165         Likewise.
5166         * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
5167         * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
5168         Likewise.
5170 2022-04-28  Jonathan Wakely  <jwakely@redhat.com>
5172         PR libstdc++/99290
5173         * src/c++17/fs_ops.cc (fs::copy): Pass error_code to
5174         directory_iterator constructor, and check on each iteration.
5175         * src/filesystem/ops.cc (fs::copy): Likewise.
5176         * testsuite/27_io/filesystem/operations/copy.cc: Check for
5177         errors during recursion.
5178         * testsuite/experimental/filesystem/operations/copy.cc:
5179         Likewise.
5181 2022-04-28  François Dumont  <fdumont@gcc.gnu.org>
5183         * config/abi/pre/gnu-versioned-namespace.ver: Remove
5184         std::random_device::* pattern.
5186 2022-04-27  Jakub Jelinek  <jakub@redhat.com>
5188         * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
5189         * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
5190         * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
5191         * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
5192         * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
5193         * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
5194         * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
5195         * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
5197 2022-04-27  Jonathan Wakely  <jwakely@redhat.com>
5199         * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Add
5200         support for atomic<shared_ptr<T>> and atomic<weak_ptr<T>>.
5201         (StdAtomicPrinter): New printer.
5202         (build_libstdcxx_dictionary): Register new printer.
5203         * testsuite/libstdc++-prettyprinters/cxx11.cc: Test std::atomic.
5204         * testsuite/libstdc++-prettyprinters/cxx20.cc: Test atomic smart
5205         pointers.
5207 2022-04-26  Jonathan Wakely  <jwakely@redhat.com>
5209         * include/bits/shared_ptr_atomic.h (atomic<shared_ptr>): Add
5210         constructor for constant initialization from nullptr_t.
5211         * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
5212         Check for new constructor.
5214 2022-04-26  Jonathan Wakely  <jwakely@redhat.com>
5216         * include/bits/fs_path.h (hash<filesystem::path>): Define.
5217         * testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
5218         Check std::hash specialization.
5220 2022-04-25  Jonathan Wakely  <jwakely@redhat.com>
5222         * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define
5223         conditionally.
5224         * include/bits/unique_ptr.h (__cpp_lib_constexpr_memory):
5225         Define for C++23.
5226         (default_delete, default_delete<T[]>, __uniq_ptr_impl)
5227         (unique_ptr, unique_ptr<T[], D>): Add constexpr to all member
5228         functions.
5229         * include/std/version (__cpp_lib_constexpr_memory): Define new
5230         value for C++23.
5231         * testsuite/20_util/unique_ptr/assign/constexpr.cc: New test.
5232         * testsuite/20_util/unique_ptr/comparison/constexpr.cc: New test.
5233         * testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc: New test.
5234         * testsuite/20_util/unique_ptr/creation/constexpr.cc: New test.
5235         * testsuite/20_util/unique_ptr/modifiers/constexpr.cc: New test.
5236         * testsuite/20_util/unique_ptr/specialized_algorithms/constexpr.cc:
5237         New test.
5239 2022-04-25  Jonathan Wakely  <jwakely@redhat.com>
5241         PR libstdc++/105375
5242         * include/std/future (packaged_task): Add deduction guides.
5243         * testsuite/30_threads/packaged_task/cons/deduction.cc: New test.
5245 2022-04-25  Philipp Fent  <fent@in.tum.de>
5247         * python/libstdcxx/v6/printers.py (StdSpanPrinter._iterator):
5248         Rename as iterator.
5249         (StdInitializerListPrinter): Define new printer.
5250         (build_libstdcxx_dictionary): Register new printer.
5251         * testsuite/libstdc++-prettyprinters/cxx11.cc: Check printer for
5252         initializer_list.
5254 2022-04-22  Thomas W Rodgers  <trodgers@redhat.com>
5256         PR libstdc++/102994
5257         * include/bits/atomic_base.h (atomic_flag::notify_one,
5258         notify_all): Remove const qualification.
5259         (__atomic_base::notify_one, notify_all): Likewise.
5260         * include/std/atomic (atomic<bool>::notify_one, notify_all):
5261         Likewise.
5262         (atomic::notify_one, notify_all): Likewise.
5263         (atomic<T*>::notify_one, notify_all): Likewise.
5264         (atomic_notify_one, atomic_notify_all): Likewise.
5265         * testsuite/29_atomics/atomic/wait_notify/102994.cc: Adjust test
5266         to account for change in notify_one/notify_all signature.
5268 2022-04-21  Patrick Palka  <ppalka@redhat.com>
5270         * include/std/charconv (__from_chars_alnum_to_val_table):
5271         Simplify initialization of __lower/__upper_letters.
5272         (__from_chars_alnum_to_val): Default the template parameter to
5273         false.
5274         * src/c++17/floating_from_chars.cc (starts_with_ci): Don't
5275         assume the uppercase and lowercase letters are contiguous.
5276         (__floating_from_chars_hex): Likewise.
5278 2022-04-21  Patrick Palka  <ppalka@redhat.com>
5280         PR c++/105297
5281         PR c++/105322
5282         * include/std/charconv (__from_chars_alnum_to_val): Make
5283         initializer for __table dependent in an artificial way.
5285 2022-04-21  Jonathan Wakely  <jwakely@redhat.com>
5287         PR libstdc++/105324
5288         * src/c++17/floating_from_chars.cc (buffer_resource::do_allocate):
5289         Remove assertion.
5290         * testsuite/20_util/from_chars/pr105324.cc: New test.
5292 2022-04-20  Jonathan Wakely  <jwakely@redhat.com>
5294         * testsuite/21_strings/basic_string_view/operations/copy/char/constexpr.cc:
5295         Check correct feature test macro.
5297 2022-04-20  Jonathan Wakely  <jwakely@redhat.com>
5299         PR libstdc++/93602
5300         * doc/xml/manual/prerequisites.xml: Document libiconv
5301         workarounds.
5302         * doc/html/manual/setup.html: Regenerate.
5303         * src/Makefile.am (CXXLINK): Add $(LTLIBICONV).
5304         * src/Makefile.in: Regenerate.
5306 2022-04-19  Patrick Palka  <ppalka@redhat.com>
5308         * src/c++17/floating_to_chars.cc (_GLIBCXX_ASSERTIONS): Don't
5309         define.
5310         (__floating_to_chars_shortest): Add __builtin_unreachable calls to
5311         squelch false-positive -Wmaybe-uninitialized and -Wreturn-type
5312         warnings.
5313         (__floating_to_chars_precision): Likewise.
5315 2022-04-19  Philipp Fent  <fent@in.tum.de>
5317         * python/libstdcxx/v6/printers.py (StdSpanPrinter): Define.
5318         * testsuite/libstdc++-prettyprinters/cxx20.cc: Test it.
5320 2022-04-19  Jonathan Wakely  <jwakely@redhat.com>
5322         * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Fix shell operators.
5323         * configure: Regenerate.
5325 2022-04-18  Patrick Palka  <ppalka@redhat.com>
5327         * include/std/charconv (__from_chars_pow2_base): Manually
5328         unroll the first iteration of the main loop and simplify
5329         accordingly.
5331 2022-04-15  Patrick Palka  <ppalka@redhat.com>
5333         PR libstdc++/104858
5334         * include/bits/ranges_algo.h (__minmax_fn): Avoid dereferencing
5335         __first twice at the start.
5336         * testsuite/25_algorithms/minmax/constrained.cc (test06): New test.
5338 2022-04-15  Patrick Palka  <ppalka@redhat.com>
5340         * include/std/charconv (__from_chars_alnum_to_val_table): Define.
5341         (__from_chars_alnum_to_val): Define.
5342         (__from_chars_binary): Rename to ...
5343         (__from_chars_pow2_base): ... this.  Generalize to handle any
5344         power-of-two base using __from_chars_alnum_to_val.
5345         (__from_chars_digit): Optimize digit recognition to a single
5346         test instead of two tests.  Use [[__unlikely___]] attribute.
5347         (__from_chars_alpha_to_num): Remove.
5348         (__from_chars_alnum): Use __from_chars_alnum_to_val.  Use a
5349         nested loop for the overflow case.  Maintain a lower bound
5350         on the number of available bits in the result and use it to
5351         omit the overflow check.
5352         (from_chars): Adjust appropriately.
5353         * src/c++17/floating_from_chars.cc (ascii_to_hexit): Remove.
5354         (__floating_from_chars_hex): Use __from_chars_alnum_to_val
5355         to recognize a hex digit instead.
5357 2022-04-14  Palmer Dabbelt  <palmer@rivosinc.com>
5359         * acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Force auto to mutex
5360         for RISC-V.
5361         * configure: Regenerate.
5363 2022-04-14  Jonathan Wakely  <jwakely@redhat.com>
5365         * doc/xml/manual/intro.xml: Fix comment.
5367 2022-04-14  Jonathan Wakely  <jwakely@redhat.com>
5369         * include/precompiled/stdc++.h: Include <stacktrace> and
5370         <stdatomic.h> for C++23.
5372 2022-04-14  Jonathan Wakely  <jwakely@redhat.com>
5374         PR libstdc++/105269
5375         * include/bits/stl_vector.h (__cpp_lib_constexpr_vector):
5376         Define.
5377         * include/c_compatibility/stdatomic.h (__cpp_lib_stdatomic_h):
5378         Define.
5379         * include/std/optional (__cpp_lib_optional): Define new value
5380         for C++23.
5381         (__cpp_lib_monadic_optional): Remove.
5382         * include/std/version (__cpp_lib_constexpr_vector): Define.
5383         (__cpp_lib_stdatomic_h): Define.
5384         (__cpp_lib_optional): Define new value for C++23.
5385         (__cpp_lib_monadic_optional): Remove.
5386         * testsuite/20_util/optional/monadic/and_then.cc: Adjust.
5387         * testsuite/20_util/optional/requirements.cc: Adjust for C++23.
5388         * testsuite/20_util/optional/version.cc: Likewise.
5389         * testsuite/23_containers/vector/cons/constexpr.cc: Check
5390         feature test macro.
5391         * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc:
5392         Likewise.
5393         * testsuite/20_util/optional/monadic/version.cc: Removed.
5394         * testsuite/23_containers/vector/requirements/version.cc: New test.
5395         * testsuite/29_atomics/headers/stdatomic.h/version.cc: New test.
5397 2022-04-12  Jonathan Wakely  <jwakely@redhat.com>
5399         * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Check for mmap.
5400         * config.h.in: Regenerate.
5401         * configure: Regenerate.
5403 2022-04-12  Jonathan Wakely  <jwakely@redhat.com>
5405         * include/std/stacktrace (basic_stacktrace::current): Reallocate
5406         a smaller container if the unused capacity is larger than the
5407         used size.
5409 2022-04-12  Jonathan Wakely  <jwakely@redhat.com>
5411         * include/std/stacktrace (basic_stacktrace): Use _Impl::_M_clone
5412         or _Impl::_M_assign to initialize elements in allocated storage.
5413         (basic_stacktrace::_M_clear()): Use _Impl::_M_resize instead of
5414         _Impl::_M_destroy.
5415         (basic_stacktrace::_Impl::_M_destroy()): Replace with ...
5416         (basic_stacktrace::_Impl::_M_resize(size_type, allocator&)): New
5417         function.
5418         (basic_stacktrace::_Impl::_M_push_back): Use _M_xclone. Construct
5419         new element using allocator.
5420         (basic_stacktrace::_Impl::_M_clone): New function.
5421         (basic_stacktrace::_Impl::_M_xclone): New function.
5422         (basic_stacktrace::_Impl::_M_assign): New function.
5424 2022-04-12  Jonathan Wakely  <jwakely@redhat.com>
5426         * include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
5427         Use nothrow new instead of try block for std::allocator.
5428         (basic_stacktrace::_Impl::_M_deallocate): Use delete for
5429         std::allocator.
5431 2022-04-12  Jonathan Wakely  <jwakely@redhat.com>
5433         * include/std/stacktrace (basic_stacktrace::current): Replace
5434         calls to _M_reserve and _S_curr_cb with call to _M_prepare.
5435         Check return value of backtrace_simple when max depth given.
5436         (basic_stacktrace::_M_reserve): Remove.
5437         (basic_stacktrace::_S_curr_cb): Remove.
5438         (basic_stacktrace::_M_prepare(size_type)): New function to
5439         reserve initial capacity and return callback.
5440         (basic_stacktrace::_Impl::_M_allocate): Remove check for 0 < n
5441         and remove redundant zeroing of _M_frames and _M_capacity.
5442         (basic_stacktrace::_Impl::_M_push_back): Add [[unlikely]]
5443         attribute. Assign _Impl instead of swapping.
5444         * testsuite/19_diagnostics/stacktrace/current.cc: New test.
5446 2022-04-11  Jonathan Wakely  <jwakely@redhat.com>
5448         * include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
5449         Change [[unlikely]] attribute to [[likely]].
5451 2022-04-11  Jonathan Wakely  <jwakely@redhat.com>
5453         PR libstdc++/105031
5454         * include/std/stacktrace (basic_stacktrace::basic_stacktrace):
5455         Fix allocator usage in constructors.
5456         (basic_stacktrace::operator=(const basic_stacktrace&)): Do not
5457         try to reallocate using const allocator.
5458         (basic_stacktrace::operator=(basic_stacktrace&&)): Fix
5459         if-constexpr with non-constant condition. Do not allocate new
5460         storage if allocator propagates. Do not set _M_size if
5461         allocation fails.
5462         (basic_stacktrace::swap(basic_stacktrace&)): Fix typo. Add
5463         assertion that non-propagating allocators are equal.
5464         * testsuite/19_diagnostics/stacktrace/stacktrace.cc: New test.
5466 2022-04-11  Jonathan Wakely  <jwakely@redhat.com>
5468         * include/std/stacktrace (basic_stacktrace::current): Duplicate
5469         implementation into each overload. Add noinline attribute and
5470         skip current frame.
5471         (basic_stacktrace::max_size()): Call _Impl::_S_max_size.
5472         (basic_stacktrace::_S_curr_cb()): New function defining lambda.
5473         (basic_stacktrace::_Impl::_S_max_size): New function defining
5474         maximum size in terms of allocator and size_type.
5475         (basic_stacktrace::_Impl::_M_allocate): Check against
5476         max_size().
5477         * testsuite/19_diagnostics/stacktrace/entry.cc: Call function
5478         for non-constexpr checks. Check line number is correct.
5480 2022-04-11  Jonathan Wakely  <jwakely@redhat.com>
5482         * testsuite/20_util/stacktrace/entry.cc: Moved to...
5483         * testsuite/19_diagnostics/stacktrace/entry.cc: ...here.
5484         * testsuite/20_util/stacktrace/synopsis.cc: Moved to...
5485         * testsuite/19_diagnostics/stacktrace/synopsis.cc: ...here.
5486         * testsuite/20_util/stacktrace/version.cc: Moved to...
5487         * testsuite/19_diagnostics/stacktrace/version.cc: ...here.
5489 2022-04-11  Jonathan Wakely  <jwakely@redhat.com>
5491         * include/experimental/bits/fs_path.h (path): Define special
5492         members after path::_Cmpt is complete.
5494 2022-04-08  Jonathan Wakely  <jwakely@redhat.com>
5496         PR libstdc++/105153
5497         * include/std/expected
5498         (expected<void,E>::expected(expected<U,G>&&)): Fix constraints.
5499         * testsuite/20_util/expected/cons.cc: Check constructor.
5501 2022-04-08  Jonathan Wakely  <jwakely@redhat.com>
5503         PR libstdc++/105154
5504         * include/std/expected (expected<void, E>::swap): Set
5505         _M_has_value to false for objects that previously had a value.
5506         * testsuite/20_util/expected/swap.cc: Fix test to check void
5507         specialization.
5509 2022-04-08  Jonathan Wakely  <jwakely@redhat.com>
5511         PR libstdc++/105146
5512         * include/std/expected (bad_expected_access): Move constructor
5513         parameter.
5514         * testsuite/20_util/expected/bad.cc: New test.
5516 2022-04-07  Hans-Peter Nilsson  <hp@axis.com>
5518         * testsuite/20_util/expected/requirements.cc: Correct minimal-size
5519         test.
5521 2022-04-02  Jakub Jelinek  <jakub@redhat.com>
5523         PR libstdc++/105128
5524         * include/std/source_location (std::source_location::__impl): Move
5525         definition before using __builtin_ret_type.
5527 2022-04-01  Jonathan Wakely  <jwakely@redhat.com>
5529         * include/std/utility (unreachable): Define for C++23.
5530         * include/std/version (__cpp_lib_unreachable): Define.
5531         * src/c++11/debug.cc (__glibcxx_assert_fail): Check for valid
5532         arguments. Handle only the function being given.
5533         * testsuite/20_util/unreachable/1.cc: New test.
5534         * testsuite/20_util/unreachable/version.cc: New test.
5536 2022-04-01  Jonathan Wakely  <jwakely@redhat.com>
5538         * include/experimental/bits/fs_fwd.h (copy_file): Remove
5539         incorrect noexcept from declaration.
5540         * include/experimental/bits/fs_path.h (path::begin, path::end):
5541         Add noexcept to declarations, to match definitions.
5543 2022-04-01  Timm Bäder  <tbaeder@redhat.com>
5545         * include/bits/fs_ops.h: Fix filename in Doxygen comment.
5546         * include/experimental/bits/fs_ops.h: Likewise.
5548 2022-03-31  Jonathan Wakely  <jwakely@redhat.com>
5550         * libsupc++/new_opa.cc (aligned_alloc): Add comment.
5552 2022-03-29  Jonathan Wakely  <jwakely@redhat.com>
5554         * testsuite/18_support/exception/38732.cc: Disable for C++23.
5555         * testsuite/18_support/headers/exception/synopsis.cc: Likewise.
5556         * testsuite/18_support/unexpected_handler.cc: Likewise.
5558 2022-03-29  Jonathan Wakely  <jwakely@redhat.com>
5560         * libsupc++/compare (_Strong_order) [!__cpp_using_enum]: Add
5561         static data members for _Fp_fmt enumerators.
5563 2022-03-29  Jonathan Wakely  <jwakely@redhat.com>
5565         * include/std/version (__cpp_lib_variant): Fix conditions to
5566         match <variant>.
5567         (__cpp_lib_expected): Fix condition to match <expected>.
5569 2022-03-28  Jonathan Wakely  <jwakely@redhat.com>
5571         * testsuite/20_util/optional/monadic/and_then.cc: Fix typo.
5572         * testsuite/20_util/optional/monadic/transform.cc: Likewise.
5573         * testsuite/22_locale/codecvt/always_noconv/char/1.cc: Likewise.
5574         * testsuite/22_locale/codecvt/encoding/char/1.cc: Likewise.
5575         * testsuite/22_locale/codecvt/in/char/1.cc: Likewise.
5576         * testsuite/22_locale/codecvt/max_length/char/1.cc: Likewise.
5577         * testsuite/22_locale/codecvt/out/char/1.cc: Likewise.
5578         * testsuite/22_locale/codecvt/unshift/char/1.cc: Likewise.
5580 2022-03-27  Jonathan Wakely  <jwakely@redhat.com>
5582         * doc/doxygen/user.cfg.in: Add new header.
5583         * include/Makefile.am: Likewise.
5584         * include/Makefile.in: Regenerate.
5585         * include/precompiled/stdc++.h: Add new header.
5586         * include/std/version (__cpp_lib_expected): Define.
5587         * libsupc++/exception [__cplusplus > 202002] (unexpected)
5588         (unexpected_handler, set_unexpected): Do not declare for C++23.
5589         * include/std/expected: New file.
5590         * testsuite/20_util/expected/assign.cc: New test.
5591         * testsuite/20_util/expected/cons.cc: New test.
5592         * testsuite/20_util/expected/illformed_neg.cc: New test.
5593         * testsuite/20_util/expected/observers.cc: New test.
5594         * testsuite/20_util/expected/requirements.cc: New test.
5595         * testsuite/20_util/expected/swap.cc: New test.
5596         * testsuite/20_util/expected/synopsis.cc: New test.
5597         * testsuite/20_util/expected/unexpected.cc: New test.
5598         * testsuite/20_util/expected/version.cc: New test.
5600 2022-03-25  Jonathan Wakely  <jwakely@redhat.com>
5602         * include/std/bit (bit_cast, byteswap, endian): Add doxygen
5603         comments.
5605 2022-03-23  Jonathan Wakely  <jwakely@redhat.com>
5607         PR libstdc++/105027
5608         * include/std/bit (bit_cast): Add constraints.
5609         * testsuite/26_numerics/bit/bit.cast/105027.cc: New test.
5611 2022-03-23  Jonathan Wakely  <jwakely@redhat.com>
5613         * include/std/version [!_GLIBCXX_HOSTED]
5614         (__cpp_lib_hardware_interference_size): Define for freestanding.
5615         (__cpp_lib_bit_cast): Likewise.
5616         (__cpp_lib_is_layout_compatible): Likewise.
5617         (__cpp_lib_is_pointer_interconvertible): Likewise.
5618         (__cpp_lib_adaptor_iterator_pair_constructor): Do not define for
5619         freestanding.
5620         (__cpp_lib_invoke_r): Likewise.
5621         (__cpp_lib_ios_noreplace): Likewise.
5622         (__cpp_lib_monadic_optional): Likewise.
5623         (__cpp_lib_move_only_function): Likewise.
5624         (__cpp_lib_spanstream): Likewise.
5625         (__cpp_lib_stacktrace): Likewise.
5626         (__cpp_lib_string_contains): Likewise.
5627         (__cpp_lib_string_resize_and_overwrite): Likewise.
5628         (__cpp_lib_to_underlying): Likewise.
5630 2022-03-23  Jonathan Wakely  <jwakely@redhat.com>
5632         PR libstdc++/105021
5633         * include/bits/atomic_base.h [!_GLIBCXX_HOSTED]: Do not include
5634         <bits/atomic_wait.h> for freestanding.
5636 2022-03-22  Hans-Peter Nilsson  <hp@axis.com>
5638         * testsuite/20_util/from_chars/6.cc (test01) [FE_DOWNWARD]:
5639         Conditionalize call to fesetround.
5641 2022-03-21  Jakub Jelinek  <jakub@redhat.com>
5643         PR libstdc++/104990
5644         * include/bits/locale_facets_nonio.tcc (get): Don't check if do_get
5645         isn't overloaded if __clang__ is defined.
5647 2022-03-18  Jonathan Wakely  <jwakely@redhat.com>
5649         PR libstdc++/104242
5650         * include/std/any (any(T&&)): Revert change to constraints.
5651         * testsuite/20_util/any/cons/104242.cc: New test.
5653 2022-03-18  Jonathan Wakely  <jwakely@redhat.com>
5655         PR libstdc++/92546
5656         * include/pstl/glue_algorithm_defs.h: Replace <functional> with
5657         <bits/stl_pair.h>.
5658         * include/pstl/utils.h: Replace <iterator> with <type_traits>.
5659         (__pstl::__internal::__except_handler): Use std::__terminate
5660         instead of std::terminate.
5661         * src/c++17/fs_path.cc: Include <array>.
5662         * testsuite/25_algorithms/adjacent_find/constexpr.cc: Include
5663         <functional>.
5664         * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
5665         * testsuite/25_algorithms/clamp/constrained.cc: Likewise.
5666         * testsuite/25_algorithms/equal/constrained.cc: Likewise.
5667         * testsuite/25_algorithms/for_each/constrained.cc: Likewise.
5668         * testsuite/25_algorithms/includes/constrained.cc: Likewise.
5669         * testsuite/25_algorithms/is_heap/constexpr.cc: Likewise.
5670         * testsuite/25_algorithms/is_heap_until/constexpr.cc: Likewise.
5671         * testsuite/25_algorithms/is_permutation/constrained.cc: Include
5672         <iterator>.
5673         * testsuite/25_algorithms/is_sorted/constexpr.cc: Include
5674         <functional>.
5675         * testsuite/25_algorithms/is_sorted_until/constexpr.cc:
5676         Likewise.
5677         * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
5678         Likewise.
5679         * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
5680         Likewise.
5681         * testsuite/25_algorithms/lexicographical_compare_three_way/1.cc:
5682         Include <array>.
5683         * testsuite/25_algorithms/lower_bound/constexpr.cc: Include
5684         <functional>.
5685         * testsuite/25_algorithms/max/constrained.cc: Likewise.
5686         * testsuite/25_algorithms/max_element/constrained.cc: Likewise.
5687         * testsuite/25_algorithms/min/constrained.cc: Likewise.
5688         * testsuite/25_algorithms/min_element/constrained.cc: Likewise.
5689         * testsuite/25_algorithms/minmax_element/constrained.cc:
5690         Likewise.
5691         * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
5692         * testsuite/25_algorithms/move/93872.cc: Likewise.
5693         * testsuite/25_algorithms/move_backward/93872.cc: Include
5694         <iterator>.
5695         * testsuite/25_algorithms/nth_element/constexpr.cc: Include
5696         <functional>.
5697         * testsuite/25_algorithms/partial_sort/constexpr.cc: Likewise.
5698         * testsuite/25_algorithms/partial_sort_copy/constexpr.cc:
5699         Likewise.
5700         * testsuite/25_algorithms/search/constexpr.cc: Likewise.
5701         * testsuite/25_algorithms/search_n/constrained.cc: Likewise.
5702         * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
5703         * testsuite/25_algorithms/set_difference/constrained.cc:
5704         Likewise.
5705         * testsuite/25_algorithms/set_intersection/constexpr.cc:
5706         Likewise.
5707         * testsuite/25_algorithms/set_intersection/constrained.cc:
5708         Likewise.
5709         * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
5710         Likewise.
5711         * testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
5712         * testsuite/25_algorithms/set_union/constrained.cc: Likewise.
5713         * testsuite/25_algorithms/sort/constexpr.cc: Likewise.
5714         * testsuite/25_algorithms/sort_heap/constexpr.cc: Likewise.
5715         * testsuite/25_algorithms/transform/constrained.cc: Likewise.
5716         * testsuite/25_algorithms/unique/constexpr.cc: Likewise.
5717         * testsuite/25_algorithms/unique/constrained.cc: Likewise.
5718         * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
5719         * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
5720         * testsuite/std/ranges/adaptors/elements.cc: Include <vector>.
5721         * testsuite/std/ranges/adaptors/lazy_split.cc: Likewise.
5722         * testsuite/std/ranges/adaptors/split.cc: Likewise.
5724 2022-03-17  Jonathan Wakely  <jwakely@redhat.com>
5726         PR libstdc++/92546
5727         * include/bits/fs_path.h (path::make_preferred): Use
5728         handwritten loop instead of std::replace.
5730 2022-03-17  Jonathan Wakely  <jwakely@redhat.com>
5732         PR middle-end/104966
5733         * include/bits/locale_facets_nonio.tcc
5734         (__moneypunct_cache::_M_cache): Replace try-catch with RAII and
5735         make all string copies before any stores to *this.
5737 2022-03-17  Jonathan Wakely  <jwakely@redhat.com>
5739         * testsuite/util/testsuite_character.h: Fix comment.
5741 2022-03-16  Jonathan Wakely  <jwakely@redhat.com>
5743         PR libstdc++/103407
5744         * config/abi/pre/gnu.ver: Make version for std::from_chars
5745         depend on HAVE_USELOCALE macro.
5746         * testsuite/util/testsuite_abi.cc (compare_symbols): Treat
5747         std::from_chars for floating-point types as undesignated if
5748         not found in the baseline symbols file.
5750 2022-03-16  Jonathan Wakely  <jwakely@redhat.com>
5752         * include/std/charconv (__cpp_lib_to_chars): Only define when
5753         both from_chars and to_chars are supported for floating-point
5754         types.
5755         (from_chars, to_chars): Adjust preprocessor conditions guarding
5756         declarations.
5757         * include/std/version (__cpp_lib_to_chars): Adjust condition to
5758         match <charconv> definition.
5759         * src/c++17/floating_from_chars.cc (from_chars_strtod): New
5760         function template.
5761         (from_chars): Simplify preprocessor checks and use
5762         from_chars_strtod when appropriate.
5764 2022-03-14  Jonathan Wakely  <jwakely@redhat.com>
5766         PR libstdc++/104875
5767         * src/c++11/codecvt.cc (read_utf8_code_point): Use char32_t to
5768         hold octets that will be left-shifted.
5770 2022-03-10  Jonathan Wakely  <jwakely@redhat.com>
5772         PR libstdc++/104870
5773         * src/c++17/floating_from_chars.cc: Check __SIZE_WIDTH__ >= 32
5774         before using fast_float.
5776 2022-03-10  Detlef Vollmann  <dv@vollmann.ch>
5778         PR libstdc++/104866
5779         * include/bits/this_thread_sleep.h: Fix order of #endif and
5780         closing brace of namespace.
5782 2022-03-10  Jonathan Wakely  <jwakely@redhat.com>
5784         * libsupc++/compare (_Strong_order::_S_fp_cmp) [__vax__]:
5785         Handle NaN.
5787 2022-03-10  Jonathan Wakely  <jwakely@redhat.com>
5789         * libsupc++/compare (_Strong_ordering::_S_fp_cmp) [__vax__]: Use
5790         <=> comparison.
5792 2022-03-09  Patrick Palka  <ppalka@redhat.com>
5794         PR libstdc++/104859
5795         * src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
5796         Be explicit when narrowing the shifted effective_mantissa,
5797         since it may have an integer-class type.
5799 2022-03-08  Jonathan Wakely  <jwakely@redhat.com>
5801         * include/bits/uses_allocator_args.h: Remove incorrect copyright
5802         notice.
5804 2022-03-07  Jonathan Wakely  <jwakely@redhat.com>
5806         PR libstdc++/104807
5807         * include/bits/c++config (__terminate, __glibcxx_assert_fail):
5808         Replace _GLIBCXX_VISIBILITY on function with visibility pragma.
5809         (__is_constant_evaluated): Add visibility pragma.
5811 2022-03-07  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
5813         * config/locale/vxworks/ctype_members.cc: Remove <iostream>
5814         include.
5816 2022-03-05  Jonathan Wakely  <jwakely@redhat.com>
5818         * include/bits/c++config (__glibcxx_assert_fail): Add visibility
5819         attribute.
5820         (__terminate): Likewise.
5822 2022-03-04  Jonathan Wakely  <jwakely@redhat.com>
5824         * libsupc++/compare (strong_order::_S_fp_cmp): Move typedef
5825         inside #if condition.
5827 2022-03-03  Jonathan Wakely  <jwakely@redhat.com>
5829         PR libstdc++/104748
5830         * testsuite/std/ranges/adaptors/all.cc: Use non-debug vector for
5831         constexpr test.
5833 2022-03-03  Jonathan Wakely  <jwakely@redhat.com>
5835         * testsuite/17_intro/names.cc (func): Undef on AIX.
5837 2022-03-03  Jonathan Wakely  <jwakely@redhat.com>
5839         PR libstdc++/96526
5840         * libsupc++/compare (strong_order): Add missing support for
5841         floating-point types.
5842         * testsuite/18_support/comparisons/algorithms/strong_order_floats.cc:
5843         New test.
5845 2022-03-01  Jonathan Wakely  <jwakely@redhat.com>
5847         PR middle-end/103984
5848         * include/bits/regex_compiler.h (_BracketMatcher::_M_char): Use
5849         default member initializer.
5851 2022-02-24  Jonathan Wakely  <jwakely@redhat.com>
5853         PR libstdc++/104602
5854         * include/std/source_location (source_location::current): Use
5855         deduced type of __builtin_source_location().
5857 2022-02-22  Patrick Palka  <ppalka@redhat.com>
5859         * include/bits/ranges_base.h (__detail::__is_initializer_list):
5860         Define.
5861         (viewable_range): Adjust as per P2415R2.
5862         * include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value.
5863         * include/std/ranges (owning_view): Define as per P2415R2.
5864         (enable_borrowed_range<owning_view>): Likewise.
5865         (views::__detail::__can_subrange): Replace with ...
5866         (views::__detail::__can_owning_view): ... this.
5867         (views::_All::_S_noexcept): Sync with operator().
5868         (views::_All::operator()): Use owning_view instead of subrange
5869         as per P2415R2.
5870         * include/std/version (__cpp_lib_ranges): Adjust value.
5871         * testsuite/std/ranges/adaptors/all.cc (test06): Adjust now that
5872         views::all uses owning_view instead of subrange.
5873         (test08): New test.
5874         * testsuite/std/ranges/adaptors/lazy_split.cc (test09): Adjust
5875         now that rvalue non-view non-borrowed ranges are viewable.
5876         * testsuite/std/ranges/adaptors/split.cc (test06): Likewise.
5878 2022-02-17  Jonathan Wakely  <jwakely@redhat.com>
5880         PR libstdc++/104559
5881         * doc/xml/manual/evolution.xml: Document deprecation.
5882         * doc/html/manual/api.html: Regenerate.
5883         * include/bits/stl_bvector.h (insert(const_iterator, const bool&)):
5884         Remove default argument.
5885         (insert(const_iterator)): New overload with deprecated attribute.
5886         * testsuite/23_containers/vector/bool/modifiers/insert/104559.cc:
5887         New test.
5889 2022-02-17  Jonathan Wakely  <jwakely@redhat.com>
5891         * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Replace
5892         code that call cat->name() on std::error_category objects.
5893         Identify known categories by symbol name and use a hardcoded
5894         name. Print error code values as enumerators where appopriate.
5895         * testsuite/libstdc++-prettyprinters/cxx11.cc: Adjust expected
5896         name of custom category. Check io_errc and future_errc errors.
5898 2022-02-15  Jonathan Wakely  <jwakely@redhat.com>
5900         PR libstdc++/104542
5901         * include/bits/uses_allocator_args.h (make_obj_using_allocator)
5902         (uninitialized_construct_using_allocator): Add constexpr.
5903         * testsuite/20_util/uses_allocator/make_obj.cc: Check constexpr.
5904         * testsuite/20_util/uses_allocator/uninitialized_construct.cc: New test.
5906 2022-02-14  Jonathan Wakely  <jwakely@redhat.com>
5908         PR libstdc++/100912
5909         * config/locale/gnu/c_locale.h (__convert_from_v): Use inline
5910         namespace for IEEE128 long double mode.
5911         * config/os/gnu-linux/ldbl-ieee128-extra.ver: Add new symbol
5912         version and export __gnu_cxx_ieee128::__convert_from_v.
5913         * include/bits/locale_facets_nonio.tcc (money_put::__do_put):
5914         Make __ibm128 overload use snprintf directly
5915         * testsuite/util/testsuite_abi.cc: Add new symbol version.
5916         Remove stable IEEE128/LDBL versions.
5918 2022-02-14  Jonathan Wakely  <jwakely@redhat.com>
5920         PR libstdc++/103891
5921         * include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
5922         Remove.
5923         * include/std/variant: Check feature test macros instead.
5924         * include/std/version: Likewise.
5926 2022-02-14  Jonathan Wakely  <jwakely@redhat.com>
5928         * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
5929         Fix typo.
5931 2022-02-14  Jonathan Wakely  <jwakely@redhat.com>
5933         * src/c++17/floating_to_chars.cc (FLOAT128_TO_CHARS): Depend on
5934         LONG_DOUBLE_ALT128_COMPAT instead of USE_FLOAT128.
5936 2022-02-11  Jonathan Wakely  <jwakely@redhat.com>
5938         * testsuite/20_util/temporary_buffer.cc: Fix dg-warning target
5939         selector.
5941 2022-02-11  Jonathan Wakely  <jwakely@redhat.com>
5943         * testsuite/20_util/monotonic_buffer_resource/allocate.cc:
5944         Ignore -Walloc-larger-than warning.
5945         * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
5946         Likewise.
5947         * testsuite/29_atomics/atomic/cons/user_pod.cc: Compile with -O1
5948         to avoid linker error for __atomic_is_lock_free.
5950 2022-02-10  Thomas Rodgers  <rodgert@appliantology.com>
5952         * include/bits/atomic_wait.h (__waiter_base::_S_do_spin,
5953         __waiter_base::_S_do_spin_v): Change memory order from relaxed
5954         to acquire.
5956 2022-02-10  Jonathan Wakely  <jwakely@redhat.com>
5958         * include/c_compatibility/stdatomic.h (atomic_fetch_xor): Add
5959         using-declaration.
5960         (atomic_fetch_xor_explicit): Likewise.
5961         * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Check
5962         arithmetic and logical operations for atomic_int.
5964 2022-02-10  Jonathan Wakely  <jwakely@redhat.com>
5966         * src/filesystem/dir-common.h (_GLIBCXX_HAVE_DIRFD): Undefine
5967         when <dirent.h> is not available.
5968         (_GLIBCXX_HAVE_UNLINKAT):  Likewise.
5970 2022-02-09  Thomas Rodgers  <rodgert@appliantology.com>
5972         PR libstdc++/104442
5973         * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): Move spin
5974         loop inside do loop so that threads failing the wait, reload
5975         _M_ver.
5977 2022-02-08  Jonathan Wakely  <jwakely@redhat.com>
5979         * src/c++17/fs_dir.cc (_Dir(DIR*, const path&)): Change first
5980         parameter to _Dir_base&&.
5981         * src/filesystem/dir-common.h (_Dir_base(DIR*)): Remove.
5982         * src/filesystem/dir.cc (_Dir(DIR*, const path&)): Change first
5983         parameter to _Dir_base&&.
5985 2022-02-08  Jonathan Wakely  <jwakely@redhat.com>
5987         * acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Add comment about
5988         checking for CAS on correct word size.
5990 2022-02-08  Jonathan Wakely  <jwakely@redhat.com>
5992         * testsuite/experimental/filesystem/operations/create_directories.cc:
5993         Adjust expected results for Windows.
5995 2022-02-08  Jonathan Wakely  <jwakely@redhat.com>
5997         PR libstdc++/104161
5998         * src/c++17/fs_dir.cc (fs::recursive_directory_iterator::__erase):
5999         [i_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Refresh entry._M_type member,
6000         instead of checking for errno values indicating a directory.
6001         * src/c++17/fs_ops.cc (fs::remove_all(const path&)): Use similar
6002         logic to non-throwing overload.
6003         (fs::remove_all(const path&, error_code&)): Add comments.
6004         * src/filesystem/ops-common.h: Likewise.
6006 2022-02-04  Jonathan Wakely  <jwakely@redhat.com>
6008         * src/filesystem/dir-common.h (_Dir_base::openat): Change return
6009         type to use portable posix::DIR alias.
6011 2022-02-04  Jonathan Wakely  <jwakely@redhat.com>
6013         * include/c_compatibility/stdatomic.h [__clang__]: Use
6014         #include_next <stdatomic.h>.
6016 2022-02-04  Jonathan Wakely  <jwakely@redhat.com>
6018         * include/experimental/bits/fs_ops.h (fs::copy_file): Remove
6019         noexcept.
6020         (fs::create_directories): Likewise.
6021         (fs::remove_all): Likewise.
6022         * src/filesystem/ops.cc (fs::copy_file): Remove noexcept.
6023         (fs::create_directories): Likewise.
6024         (fs::remove_all): Likewise.
6026 2022-02-04  Jonathan Wakely  <jwakely@redhat.com>
6028         PR libstdc++/104161
6029         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for dirfd
6030         and unlinkat.
6031         * config.h.in: Regenerate.
6032         * configure: Regenerate.
6033         * include/bits/fs_dir.h (recursive_directory_iterator): Declare
6034         remove_all overloads as friends.
6035         (recursive_directory_iterator::__erase): Declare new member
6036         function.
6037         * include/bits/fs_fwd.h (remove, remove_all): Declare.
6038         * src/c++17/fs_dir.cc (_Dir): Add filename_only parameter to
6039         constructor. Pass file descriptor argument to base constructor.
6040         (_Dir::dir_and_pathname, _Dir::open_subdir, _Dir::do_unlink)
6041         (_Dir::unlink, _Dir::rmdir): Define new member functions.
6042         (directory_iterator): Pass filename_only argument to _Dir
6043         constructor.
6044         (recursive_directory_iterator::_Dir_stack): Adjust constructor
6045         parameters to take a _Dir rvalue instead of creating one.
6046         (_Dir_stack::orig): Add data member for storing original path.
6047         (_Dir_stack::report_error): Define new member function.
6048         (__directory_iterator_nofollow): Move here from dir-common.h and
6049         fix value to be a power of two.
6050         (__directory_iterator_filename_only): Define new constant.
6051         (recursive_directory_iterator): Construct _Dir object and move
6052         into _M_dirs stack. Pass skip_permission_denied argument to first
6053         advance call.
6054         (recursive_directory_iterator::increment): Use _Dir::open_subdir.
6055         (recursive_directory_iterator::__erase): Define new member
6056         function.
6057         * src/c++17/fs_ops.cc (ErrorReporter, do_remove_all): Remove.
6058         (fs::remove_all): Use new recursive_directory_iterator::__erase
6059         member function.
6060         * src/filesystem/dir-common.h (_Dir_base): Add int parameter to
6061         constructor and use openat to implement nofollow semantics.
6062         (_Dir_base::fdcwd, _Dir_base::set_close_on_exec, _Dir_base::openat):
6063         Define new member functions.
6064         (__directory_iterator_nofollow): Move to fs_dir.cc.
6065         * src/filesystem/dir.cc (_Dir): Pass file descriptor argument to
6066         base constructor.
6067         (_Dir::dir_and_pathname, _Dir::open_subdir): Define new member
6068         functions.
6069         (recursive_directory_iterator::_Dir_stack): Adjust constructor
6070         parameters to take a _Dir rvalue instead of creating one.
6071         (recursive_directory_iterator): Check for new nofollow option.
6072         Construct _Dir object and move into _M_dirs stack. Pass
6073         skip_permission_denied argument to first advance call.
6074         (recursive_directory_iterator::increment): Use _Dir::open_subdir.
6075         * src/filesystem/ops.cc (fs::remove_all): Use C++17 remove_all.
6077 2022-02-04  Jonathan Wakely  <jwakely@redhat.com>
6079         * include/bits/allocator.h: Qualify std::allocator_traits in
6080         deprecated warnings.
6081         * libsupc++/exception (uncaught_exception): Add suggestion to
6082         deprecated warning.
6084 2022-02-02  Jonathan Wakely  <jwakely@redhat.com>
6086         * src/c++17/fs_dir.cc (fs::recursive_directory_iterator::pop):
6087         Add [[maybe_unused]] attribute.
6088         * src/filesystem/dir.cc (fs::recursive_directory_iterator::pop):
6089         Likewise.
6091 2022-02-02  Jonathan Wakely  <jwakely@redhat.com>
6093         * testsuite/23_containers/multiset/operators/cmp_c++20.cc: Use
6094         custom comparison function for multiset.
6095         * testsuite/23_containers/set/operators/cmp_c++20.cc: Use custom
6096         comparison function for set.
6098 2022-02-02  Jonathan Wakely  <jwakely@redhat.com>
6100         * include/bits/boost_concept_check.h (_OutputIteratorConcept):
6101         Change member function to data member of function pointer type.
6103 2022-02-02  Martin Sebor  <msebor@redhat.com>
6105         PR libstdc++/101831
6106         * include/std/array (begin): Declare const member function attribute
6107         const.
6108         (end, rbegin, rend, size, max_size, empty, data): Same.
6109         * testsuite/23_containers/array/capacity/empty.cc: Add test cases.
6110         * testsuite/23_containers/array/capacity/max_size.cc: Same.
6111         * testsuite/23_containers/array/capacity/size.cc: Same.
6112         * testsuite/23_containers/array/iterators/begin_end.cc: New test.
6114 2022-02-02  Jonathan Wakely  <jwakely@redhat.com>
6116         * testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
6117         autoconf macro to check whether d_type is present.
6118         * testsuite/experimental/filesystem/iterators/error_reporting.cc:
6119         Likewise.
6121 2022-02-01  Jonathan Wakely  <jwakely@redhat.com>
6123         * testsuite/27_io/filesystem/iterators/97731.cc: New test.
6124         * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
6125         Check follow_directory_symlink option.
6126         * testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc:
6127         Likewise.
6129 2022-02-01  Jonathan Wakely  <jwakely@redhat.com>
6131         * src/c++17/fs_dir.cc (recursive_directory_iterator::increment):
6132         Reset state to past-the-end iterator on error.
6133         (fs::recursive_directory_iterator::pop(error_code&)): Likewise.
6134         (fs::recursive_directory_iterator::pop()): Check _M_dirs before
6135         it might get reset.
6136         * src/filesystem/dir.cc (recursive_directory_iterator): Likewise,
6137         for the TS implementation.
6138         * testsuite/27_io/filesystem/iterators/error_reporting.cc: New test.
6139         * testsuite/experimental/filesystem/iterators/error_reporting.cc: New test.
6141 2022-02-01  Jonathan Wakely  <jwakely@redhat.com>
6143         * include/bits/fs_fwd.h (filesystem::perms): Fix comment.
6145 2022-02-01  Jonathan Wakely  <jwakely@redhat.com>
6147         PR libstdc++/104301
6148         * acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Print different messages
6149         for stdio_pure and stdio_posix options.
6150         * configure: Regenerate.
6152 2022-02-01  Thomas Rodgers  <rodgert@appliantology.com>
6154         * include/bits/atomic_wait.h: Change memory order from
6155         Acquire/Release with relaxed loads to SeqCst+Release for
6156         accesses to the waiter's count.
6158 2022-01-31  Martin Liska  <mliska@suse.cz>
6160         * acinclude.m4: Detect *_ld_is_mold and use it.
6161         * configure: Regenerate.
6163 2022-01-30  Hans-Peter Nilsson  <hp@axis.com>
6165         * testsuite/27_io/basic_istream/get/char/lwg3464.cc: Don't run on
6166         simulator targets.
6167         * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: Likewise.
6169 2022-01-27  Jonathan Wakely  <jwakely@redhat.com>
6171         PR libstdc++/100516
6172         * include/bits/deque.tcc (_M_range_initialize<ForwardIterator>):
6173         Add __builtin_unreachable to loop.
6174         * testsuite/23_containers/deque/100516.cc: New test.
6176 2022-01-27  Jonathan Wakely  <jwakely@redhat.com>
6178         * include/bits/ranges_base.h (ranges::advance): Avoid signed
6179         overflow. Do nothing if already equal to desired result.
6180         * testsuite/24_iterators/range_operations/advance_overflow.cc:
6181         New test.
6183 2022-01-27  Martin Liska  <mliska@suse.cz>
6185         PR libstdc++/104259
6186         * acinclude.m4: Fix typo.
6187         * configure: Regenerate.
6189 2022-01-25  Jonathan Wakely  <jwakely@redhat.com>
6191         PR libstdc++/104019
6192         * include/bits/istream.tcc (basic_istream::sentry): Add braces
6193         around try-block.
6194         * include/bits/shared_ptr_base.h (_Sp_counted_array_base::_M_init):
6195         Add pragmas to disable bogus warnings from PR 61596.
6197 2022-01-25  Jonathan Wakely  <jwakely@redhat.com>
6199         PR libstdc++/104217
6200         * src/c++17/fs_ops.cc (_GNU_SOURCE): Define.
6201         * src/filesystem/dir.cc (_GNU_SOURCE): Define.
6202         * src/filesystem/ops.cc (_GNU_SOURCE): Define.
6204 2022-01-25  Jonathan Wakely  <jwakely@redhat.com>
6206         PR libstdc++/104161
6207         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for
6208         fdopendir.
6209         * config.h.in: Regenerate.
6210         * configure: Regenerate.
6211         * src/c++17/fs_dir.cc (_Dir): Add nofollow flag to constructor
6212         and pass it to base class constructor.
6213         (directory_iterator): Pass nofollow flag to _Dir constructor.
6214         (fs::recursive_directory_iterator::increment): Likewise.
6215         * src/c++17/fs_ops.cc (do_remove_all): Use nofollow option for
6216         directory_iterator constructor. Move error check outside loop.
6217         * src/filesystem/dir-common.h (_Dir_base): Add nofollow flag to
6218         constructor and when it's set use ::open with O_NOFOLLOW and
6219         O_DIRECTORY.
6220         * src/filesystem/dir.cc (_Dir): Add nofollow flag to constructor
6221         and pass it to base class constructor.
6222         (directory_iterator): Pass nofollow flag to _Dir constructor.
6223         (fs::recursive_directory_iterator::increment): Likewise.
6224         * src/filesystem/ops.cc (remove_all): Use nofollow option for
6225         directory_iterator constructor. Move error check outside loop.
6227 2022-01-23  Jonathan Wakely  <jwakely@redhat.com>
6229         PR libstdc++/104032
6230         * include/std/spanstream (basic_spanbuf(basic_spanbuf&&)): Use
6231         mem-initializer for _M_buf.
6232         (basic_spanbuf::Operator=(basic_spanbuf&&)): Fix ill-formed
6233         member access.
6234         * testsuite/27_io/spanstream/2.cc: New test.
6236 2022-01-23  Jonathan Wakely  <jwakely@redhat.com>
6238         * src/c++17/floating_from_chars.cc (USE_STRTOD_FOR_FROM_CHARS):
6239         Define macro for case where std::from_chars is implemented in
6240         terms of strtod, strtof or strtold.
6241         (buffer_resource, valid_fmt, find_end_of_float, pattern)
6242         (from_chars_impl, make_result, reserve_string): Do not define
6243         unless USE_STRTOD_FOR_FROM_CHARS is defined.
6244         (from_chars): Define when at least one of USE_LIB_FAST_FLOAT and
6245         USE_STRTOD_FOR_FROM_CHARS is defined, instead of
6246         _GLIBCXX_HAVE_USELOCALE. Use fast_float for long double when it
6247         is binary64.
6249 2022-01-23  Jonathan Wakely  <jwakely@redhat.com>
6251         PR libstdc++/104174
6252         * include/bits/hashtable_policy.h (_Map_base): Add partial
6253         specialization for maps with const key types.
6254         * testsuite/23_containers/unordered_map/104174.cc: New test.
6256 2022-01-23  Jonathan Wakely  <jwakely@redhat.com>
6258         PR libstdc++/104019
6259         * include/bits/shared_ptr_base.h (_Sp_counted_base<>::_M_release):
6260         Set members to zero without type punning.
6262 2022-01-21  Jonathan Wakely  <jwakely@redhat.com>
6264         * testsuite/20_util/shared_ptr/cons/array.cc: Fix comment.
6266 2022-01-21  Jonathan Wakely  <jwakely@redhat.com>
6268         PR libstdc++/87193
6269         PR libstdc++/104019
6270         * include/bits/alloc_traits.h (__cpp_lib_allocator_traits_is_always_equal):
6271         Define as type long.
6272         * include/bits/allocator.h (__cpp_lib_incomplete_container_elements):
6273         Likewise.
6274         * include/bits/basic_string.h (__cpp_lib_string_udls): Likewise.
6275         * include/bits/chrono.h (__cpp_lib_chrono): Likewise.
6276         (__cpp_lib_chrono_udls): Likewise.
6277         * include/bits/move.h (__cpp_lib_addressof_constexpr): Likewise.
6278         * include/bits/node_handle.h (__cpp_lib_node_extract): Likewise.
6279         * include/bits/range_access.h (__cpp_lib_nonmember_container_access):
6280         Likewise.
6281         * include/bits/shared_ptr.h (__cpp_lib_enable_shared_from_this):
6282         Likewise.
6283         * include/bits/stl_algo.h (__cpp_lib_clamp): Likewise.
6284         (__cpp_lib_sample): Likewise.
6285         * include/bits/stl_algobase.h (__cpp_lib_robust_nonmodifying_seq_ops):
6286         Likewise.
6287         * include/bits/stl_function.h (__cpp_lib_transparent_operators):
6288         Likewise.
6289         * include/bits/stl_iterator.h (__cpp_lib_make_reverse_iterator):
6290         Likewise.
6291         * include/bits/stl_map.h (__cpp_lib_map_try_emplace):
6292         Likewise.
6293         * include/bits/stl_tree.h (__cpp_lib_generic_associative_lookup):
6294         Likewise.
6295         * include/bits/unique_ptr.h (__cpp_lib_make_unique):
6296         Likewise.
6297         * include/bits/unordered_map.h (__cpp_lib_unordered_map_try_emplace):
6298         Likewise.
6299         * include/c_global/cmath (__cpp_lib_hypot): Likewise.
6300         * include/c_global/cstddef (__cpp_lib_byte): Likewise.
6301         * include/std/atomic (__cpp_lib_atomic_is_always_lock_free):
6302         Likewise.
6303         * include/std/complex (__cpp_lib_complex_udls): Likewise.
6304         * include/std/filesystem (__cpp_lib_filesystem): Likewise.
6305         * include/std/functional (__cpp_lib_not_fn): Likewise.
6306         (__cpp_lib_boyer_moore_searcher): Likewise.
6307         * include/std/iomanip (__cpp_lib_quoted_string_io): Likewise.
6308         * include/std/mutex (__cpp_lib_scoped_lock): Likewise.
6309         * include/std/numeric (__cpp_lib_gcd_lcm): Likewise.
6310         (__cpp_lib_gcd, __cpp_lib_lcm): Likewise.
6311         * include/std/tuple (__cpp_lib_apply): Likewise.
6312         (__cpp_lib_make_from_tuple): Likewise.
6313         * include/std/type_traits (__cpp_lib_integral_constant_callable)
6314         (__cpp_lib_bool_constant, __cpp_lib_logical_traits)
6315         (__cpp_lib_is_null_pointer, __cpp_lib_transformation_trait_aliases)
6316         (__cpp_lib_result_of_sfinae, __cpp_lib_void_t)
6317         (__cpp_lib_is_swappable, __cpp_lib_is_invocable)
6318         (__cpp_lib_has_unique_object_representations)
6319         (__cpp_lib_is_aggregate): Likewise.
6320         * include/std/version: Likewise.
6321         * libsupc++/new (__cpp_lib_launder): Likewise.
6323 2022-01-21  Jonathan Wakely  <jwakely@redhat.com>
6325         * include/std/version (__cpp_lib_shared_ptr_arrays): Fix
6326         condition for C++17 definition.
6328 2022-01-21  Jonathan Wakely  <jwakely@redhat.com>
6330         * include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count):
6331         Add constexpr.
6332         (_Sp_atomic::_M_ptr): Add default member-initializer.
6333         * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
6334         Check constant initialization.
6335         * testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: Likewise.
6337 2022-01-20  Jonathan Wakely  <jwakely@redhat.com>
6339         * src/c++11/cxx11-ios_failure.cc (__constinit): Define as
6340         equivalent attribute for Clang.
6341         * src/c++11/future.cc (__constinit): Likewise.
6342         * src/c++11/system_error.cc (__constinit): Likewise.
6343         * src/c++17/memory_resource.cc (__constinit): Likewise.
6345 2022-01-20  Jonathan Wakely  <jwakely@redhat.com>
6347         * scripts/testsuite_flags.in: Only add src/filesystem/.libs and
6348         src/libbacktrace/.libs to LDFLAGS if those directories exist.
6350 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
6352         * configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Remove -gdwarf-4
6353         from default flags.
6354         * configure: Regenerate.
6356 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
6358         PR libstdc++/104123
6359         * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Include
6360         <stddef.h>.
6362 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
6364         * scripts/testsuite_flags.in: Add src/libbacktrace/.libs to
6365         linker search paths.
6366         * src/Makefile.am: Fix src/debug/libbacktrace build.
6367         * src/Makefile.in: Regenerate.
6368         * src/libbacktrace/Makefile.am: Use per-library CPPFLAGS
6369         variable. Use symlinks for the source files.
6370         * src/libbacktrace/Makefile.in: Regenerate.
6372 2022-01-19  Matthias Kretz  <m.kretz@gsi.de>
6374         * include/experimental/bits/simd.h (__floating_point_flags): Do
6375         not rely on math_errhandling to expand to a constant expression.
6377 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
6379         * doc/xml/manual/evolution.xml: Document deprecations.
6380         * doc/xml/manual/status_cxx2017.xml: Update status.
6381         * doc/html/*: Regenerate.
6383 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
6385         * include/bits/stl_tempbuf.h (get_temporary_buffer): Change
6386         _GLIBCXX14_DEPRECATED to _GLIBCXX17_DEPRECATED.
6388 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
6390         * include/bits/stl_pair.h (_PCC::_DeprConsPair): Remove unused
6391         function.
6393 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
6395         PR libstdc++/104101
6396         * include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count::lock):
6397         Only use __thread_relax if __cpp_lib_atomic_wait is defined.
6399 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
6401         PR libstdc++/104099
6402         * include/bits/basic_string.h (basic_string(nullptr_t)): Only
6403         define for C++23.
6404         (operator=(nullptr_t)): Likewise.
6405         * include/bits/cow_string.h: Likewise.
6406         * include/std/string_view (basic_string_view(nullptr_t)):
6407         Likewise.
6408         * testsuite/21_strings/basic_string/cons/char/nullptr.cc: Adjust
6409         expected error. Add examples that become ill-formed in C++23.
6410         * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
6411         Adjust expected errors.
6412         * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
6413         Likewise.
6415 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
6417         PR libstdc++/104098
6418         * include/bits/stl_iterator.h (reverse_iterator): Check
6419         __cpp_lib_concepts instead of __cplusplus.
6421 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
6423         PR libstdc++/101124
6424         * include/bits/stl_pair.h (pair): Adjust constraints on
6425         deprecated constructors accepting literal zero as null pointer
6426         constant. Improve wording of deprecated attribute.
6427         * testsuite/20_util/pair/cons/99957.cc: Check that deprecated
6428         constructors do not cause ambiguities for copyable types.
6430 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
6432         * include/bits/stl_function.h (ptr_fun): Fix suggestion for
6433         non-deprecated alternative.
6435 2022-01-18  Tom Honermann  <tom@honermann.net>
6437         * acinclude.m4: Define config macros if uchar.h provides
6438         c8rtomb() and mbrtoc8().
6439         * config.h.in: Regenerate.
6440         * configure: Regenerate.
6441         * include/c_compatibility/uchar.h (c8rtomb, mbrtoc8): Define.
6442         * include/c_global/cuchar (c8rtomb, mbrtoc8): Likewise.
6443         * include/c_std/cuchar (c8rtomb, mbrtoc8): Likewise.
6444         * testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc:
6445         New test.
6446         * testsuite/21_strings/headers/cuchar/functions_std_fchar8_t.cc:
6447         New test.
6449 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
6451         * include/Makefile.am: Install new header.
6452         * include/Makefile.in: Regenerate.
6453         * include/c_compatibility/stdatomic.h: New file.
6454         * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: New test.
6456 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
6458         PR libstdc++/104080
6459         * src/c++17/fast_float/LOCAL_PATCHES: Update.
6460         * src/c++17/fast_float/fast_float.h (FASTFLOAT_IS_BIG_ENDIAN):
6461         Define in terms of __BYTE_ORDER__.
6463 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
6465         PR libstdc++/104080
6466         * src/c++17/fast_float/LOCAL_PATCHES: UPDATE.
6467         * src/c++17/fast_float/fast_float.h (round): Use explicit
6468         template argument list for std::min.
6470 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
6472         * doc/xml/manual/status_cxx2017.xml: Update C++17 status.
6473         * doc/xml/manual/status_cxx2020.xml: Use 12.1 instead of 12 for
6474         upcoming release.
6475         * doc/html/manual/status.html: Regenerate.
6477 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
6479         * acinclude.m4 (GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING): Improve
6480         comments.
6481         * configure: Regenerate.
6483 2022-01-17  Patrick Palka  <ppalka@redhat.com>
6485         * src/c++17/floating_from_chars.cc: (USE_LIB_FAST_FLOAT):
6486         Conditionally define, and use it to conditionally include
6487         fast_float.
6488         (from_chars): Use fast_float for float and double when
6489         USE_LIB_FAST_FLOAT.
6491 2022-01-17  Patrick Palka  <ppalka@redhat.com>
6493         * src/c++17/fast_float/LOCAL_PATCHES: Update.
6494         * src/c++17/fast_float/fast_float.h (from_chars_advanced): In
6495         case of over/underflow, return errc::result_out_of_range and don't
6496         modify 'value'.
6498 2022-01-17  Patrick Palka  <ppalka@redhat.com>
6500         * src/c++17/fast_float/LOCAL_PATCHES: Update.
6501         * src/c++17/fast_float/fast_float.h: Apply local modifications.
6503 2022-01-17  Patrick Palka  <ppalka@redhat.com>
6505         * src/c++17/fast_float/LOCAL_PATCHES: New file.
6506         * src/c++17/fast_float/MERGE: New file.
6507         * src/c++17/fast_float/README.md: New file, copied from the
6508         fast_float repository.
6509         * src/c++17/fast_float/fast_float.h: New file, an amalgamation
6510         of the fast_float library.
6512 2022-01-17  Patrick Palka  <ppalka@redhat.com>
6514         * src/c++17/floating_from_chars.cc: Include <bit>.
6515         (ascii_to_hexit, starts_with_ci): Conditionally define.
6516         (__floating_from_chars_hex):  Conditionally define.
6517         (from_chars): Use __floating_from_chars_hex for
6518         chars_format::hex parsing of binary32/64 float/double.
6519         (testsuite/20_util/from_chars/7.cc): New test.
6520         * testsuite/20_util/from_chars/7.cc: New file.
6522 2022-01-17  Jonathan Wakely  <jwakely@redhat.com>
6524         * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): New macro.
6525         * configure.ac: Use GLIBCXX_ENABLE_BACKTRACE.
6526         * include/Makefile.am: Add new header.
6527         * include/Makefile.in: Regenerate.
6528         * include/std/stacktrace: New header.
6529         * include/std/version (__cpp_lib_stacktrace): Define.
6530         * Makefile.in: Regenerate.
6531         * config.h.in: Regenerate.
6532         * configure: Regenerate.
6533         * doc/Makefile.in: Regenerate.
6534         * libsupc++/Makefile.in: Regenerate.
6535         * po/Makefile.in: Regenerate.
6536         * python/Makefile.in: Regenerate.
6537         * src/Makefile.am: Regenerate.
6538         * src/Makefile.in: Regenerate.
6539         * src/c++11/Makefile.in: Regenerate.
6540         * src/c++17/Makefile.in: Regenerate.
6541         * src/c++20/Makefile.in: Regenerate.
6542         * src/c++98/Makefile.in: Regenerate.
6543         * src/filesystem/Makefile.in: Regenerate.
6544         * testsuite/Makefile.in: Regenerate.
6545         * src/libbacktrace/Makefile.am: New file.
6546         * src/libbacktrace/Makefile.in: New file.
6547         * src/libbacktrace/backtrace-rename.h: New file.
6548         * src/libbacktrace/backtrace-supported.h.in: New file.
6549         * src/libbacktrace/config.h.in: New file.
6550         * testsuite/lib/libstdc++.exp (check_effective_target_stacktrace):
6551         New proc.
6552         * testsuite/20_util/stacktrace/entry.cc: New test.
6553         * testsuite/20_util/stacktrace/synopsis.cc: New test.
6554         * testsuite/20_util/stacktrace/version.cc: New test.
6556 2022-01-17  Jonathan Wakely  <jwakely@redhat.com>
6558         * doc/xml/manual/status_cxx2020.xml: Use final C++20 option
6559         names.
6560         * doc/html/manual/status.html: Regenerate.
6562 2022-01-17  Jonathan Wakely  <jwakely@redhat.com>
6564         PR libstdc++/103650
6565         * include/Makefile.am: Rename LT_OBJDIR and STDC_HEADERS.
6566         * include/Makefile.in: Regenerate.
6567         * testsuite/17_intro/headers/c++1998/103650.cc: New test.
6569 2022-01-17  Matthias Kretz  <m.kretz@gsi.de>
6571         * include/experimental/bits/simd.h (__floating_point_flags): Do
6572         not rely on the presence of the math_errhandling macro.
6574 2022-01-17  Jonathan Wakely  <jwakely@redhat.com>
6576         * include/bits/shared_ptr_atomic.h (_Sp_atomic): Add typename
6577         to qualified-id for dependent type.
6579 2022-01-17  Jonathan Wakely  <jwakely@redhat.com>
6581         * doc/xml/manual/status_cxx2020.xml: Update.
6582         * doc/html/manual/status.html: Regenerate.
6584 2022-01-17  Jonathan Wakely  <jwakely@redhat.com>
6585             Thomas Rodgers  <trodgers@redhat.com>
6587         * include/bits/shared_ptr_atomic.h (__cpp_lib_atomic_shared_ptr):
6588         New macro.
6589         (_Sp_atomic): New class template.
6590         (atomic<shared_ptr<T>>, atomic<weak_ptr<T>>): New partial
6591         specializations.
6592         * include/bits/shared_ptr_base.h (__shared_count, __weak_count)
6593         (__shared_ptr, __weak_ptr): Declare _Sp_atomic as a friend.
6594         * include/std/version (__cpp_lib_atomic_shared_ptr): New macro.
6595         * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc: New
6596         test.
6597         * testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: New test.
6599 2022-01-15  Matthias Kretz  <m.kretz@gsi.de>
6601         * include/experimental/bits/simd.h: Move feature detection bools
6602         and add __have_avx512bitalg, __have_avx512vbmi2,
6603         __have_avx512vbmi, __have_avx512ifma, __have_avx512cd,
6604         __have_avx512vnni, __have_avx512vpopcntdq.
6605         (__detail::__machine_flags): New function which returns a unique
6606         uint64 depending on relevant -m and -f flags.
6607         (__detail::__odr_helper): New type alias for either an anonymous
6608         type or a type specialized with the __machine_flags number.
6609         (_SimdIntOperators): Change template parameters from _Impl to
6610         _Tp, _Abi because _Impl now has an __odr_helper parameter which
6611         may be _OdrEnforcer from the anonymous namespace, which makes
6612         for a bad base class.
6613         (many): Either add __odr_helper template parameter or mark as
6614         always_inline.
6615         * include/experimental/bits/simd_detail.h: Add defines for
6616         AVX512BITALG, AVX512VBMI2, AVX512VBMI, AVX512IFMA, AVX512CD,
6617         AVX512VNNI, AVX512VPOPCNTDQ, and AVX512VP2INTERSECT.
6618         * include/experimental/bits/simd_builtin.h: Add __odr_helper
6619         template parameter or mark as always_inline.
6620         * include/experimental/bits/simd_fixed_size.h: Ditto.
6621         * include/experimental/bits/simd_math.h: Ditto.
6622         * include/experimental/bits/simd_scalar.h: Ditto.
6623         * include/experimental/bits/simd_neon.h: Add __odr_helper
6624         template parameter.
6625         * include/experimental/bits/simd_ppc.h: Ditto.
6626         * include/experimental/bits/simd_x86.h: Ditto.
6628 2022-01-14  Uroš Bizjak  <ubizjak@gmail.com>
6630         * testsuite/22_locale/numpunct/members/char/3.cc:
6631         Require pt_PT locale instead of nl_NL.
6632         (test02): Use pt_PT locale instead of nl_NL.
6634 2022-01-14  Jonathan Wakely  <jwakely@redhat.com>
6636         PR libstdc++/91260
6637         PR libstdc++/91383
6638         PR libstdc++/95065
6639         * include/backward/binders.h (bind1st, bind2nd): Add deprecated
6640         attribute.
6641         * include/bits/refwrap.h (_Maybe_unary_or_binary_function):
6642         Disable deprecated warnings for base classes.
6643         (_Reference_wrapper_base): Likewise.
6644         * include/bits/shared_ptr_base.h (_Sp_owner_less): Likewise.
6645         * include/bits/stl_bvector.h (_Bit_iterator_base): Likewise.
6646         * include/bits/stl_function.h (unary_function, binary_function):
6647         Add deprecated attribute.
6648         (unary_negate, not1, binary_negate, not2, ptr_fun)
6649         (pointer_to_unary_function, pointer_to_binary_function)
6650         (mem_fun_t, const_mem_fun_t, mem_fun_ref_t, const_mem_fun_ref_t)
6651         (mem_fun1_t, const_mem_fun1_t, mem_fun_ref1_t)
6652         (const_mem_fun1_ref_t, mem_fun, mem_fun_ref): Add deprecated
6653         attributes.
6654         * include/bits/stl_iterator.h: Disable deprecated warnings for
6655         std::iterator base classes.
6656         * include/bits/stl_iterator_base_types.h (iterator): Add
6657         deprecated attribute.
6658         * include/bits/stl_map.h (map::value_compare): Disable
6659         deprecated warnings for base class.
6660         * include/bits/stl_multimap.h (multimap::value_compare):
6661         Likewise.
6662         * include/bits/stl_raw_storage_iter.h (raw_storage_iterator):
6663         Add deprecated attribute.
6664         * include/bits/stl_tempbuf.h (get_temporary_buffer): Likewise.
6665         * include/bits/stream_iterator.h: Disable deprecated warnings.
6666         * include/bits/streambuf_iterator.h: Likewise.
6667         * include/ext/bitmap_allocator.h: Remove unary_function base
6668         classes.
6669         * include/ext/functional: Disable deprecated warnings.
6670         * include/ext/rope: Likewise.
6671         * include/ext/throw_allocator.h: Likewise.
6672         * include/std/type_traits (result_of): Add deprecated attribute.
6673         * include/tr1/functional: Disable deprecated warnings.
6674         * include/tr1/functional_hash.h: Likewise.
6675         * testsuite/20_util/function_objects/binders/1.cc: Add
6676         -Wno-disable-deprecations.
6677         * testsuite/20_util/function_objects/binders/3113.cc: Likewise.
6678         * testsuite/20_util/function_objects/constexpr.cc: Add
6679         dg-warning.
6680         * testsuite/20_util/raw_storage_iterator/base.cc: Likewise.
6681         * testsuite/20_util/raw_storage_iterator/dr2127.cc: Likewise.
6682         * testsuite/20_util/raw_storage_iterator/requirements/base_classes.cc:
6683         Likewise.
6684         * testsuite/20_util/raw_storage_iterator/requirements/explicit_instantiation/1.cc:
6685         Likewise.
6686         * testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc:
6687         Likewise.
6688         * testsuite/20_util/reference_wrapper/24803.cc:
6689         Likewise.
6690         * testsuite/20_util/reference_wrapper/typedefs.cc: Enable for
6691         C++20 and check for absence of nested types.
6692         * testsuite/20_util/shared_ptr/comparison/less.cc: Remove
6693         std::binary_function base class.
6694         * testsuite/20_util/temporary_buffer.cc: Add dg-warning.
6695         * testsuite/21_strings/basic_string/cons/char/69092.cc: Remove
6696         std::iterator base class.
6697         * testsuite/24_iterators/back_insert_iterator/requirements/base_classes.cc:
6698         Likewise.
6699         * testsuite/24_iterators/front_insert_iterator/requirements/base_classes.cc:
6700         Likewise.
6701         * testsuite/24_iterators/insert_iterator/requirements/base_classes.cc:
6702         Likewise.
6703         * testsuite/24_iterators/istream_iterator/requirements/base_classes.cc:
6704         Likewise.
6705         * testsuite/24_iterators/istreambuf_iterator/92285.cc:
6706         Likewise.
6707         * testsuite/24_iterators/istreambuf_iterator/requirements/base_classes.cc:
6708         Likewise.
6709         * testsuite/24_iterators/ostream_iterator/requirements/base_classes.cc:
6710         Likewise.
6711         * testsuite/24_iterators/ostreambuf_iterator/requirements/base_classes.cc:
6712         Likewise.
6713         * testsuite/24_iterators/reverse_iterator/requirements/base_classes.cc:
6714         Likewise.
6715         * testsuite/25_algorithms/copy/34595.cc:
6716         Likewise.
6717         * testsuite/25_algorithms/minmax/3.cc: Remove std::binary_function
6718         base class.
6719         * testsuite/25_algorithms/all_of/requirements/explicit_instantiation/2.cc:
6720         Disable deprecated warnings.
6721         * testsuite/25_algorithms/all_of/requirements/explicit_instantiation/pod.cc:
6722         Likewise.
6723         * testsuite/25_algorithms/any_of/requirements/explicit_instantiation/2.cc:
6724         Likewise.
6725         * testsuite/25_algorithms/any_of/requirements/explicit_instantiation/pod.cc:
6726         Likewise.
6727         * testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/2.cc:
6728         Likewise.
6729         * testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/pod.cc:
6730         Likewise.
6731         * testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc:
6732         Likewise.
6733         * testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc:
6734         Likewise.
6735         * testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc:
6736         Likewise.
6737         * testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc:
6738         Likewise.
6739         * testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc:
6740         Likewise.
6741         * testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc:
6742         Likewise.
6743         * testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc:
6744         Likewise.
6745         * testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc:
6746         Likewise.
6747         * testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/2.cc:
6748         Likewise.
6749         * testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/pod.cc:
6750         Likewise.
6751         * testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc:
6752         Likewise.
6753         * testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc:
6754         Likewise.
6755         * testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/2.cc:
6756         Likewise.
6757         * testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/pod.cc:
6758         Likewise.
6759         * testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/2.cc:
6760         Likewise.
6761         * testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/pod.cc:
6762         Likewise.
6763         * testsuite/25_algorithms/none_of/requirements/explicit_instantiation/2.cc:
6764         Likewise.
6765         * testsuite/25_algorithms/none_of/requirements/explicit_instantiation/pod.cc:
6766         Likewise.
6767         * testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc:
6768         Likewise.
6769         * testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc:
6770         Likewise.
6771         * testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/2.cc:
6772         Likewise.
6773         * testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/pod.cc:
6774         Likewise.
6775         * testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/2.cc:
6776         Likewise.
6777         * testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/pod.cc:
6778         Likewise.
6779         * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
6780         Likewise.
6781         * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
6782         Likewise.
6783         * testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc:
6784         Likewise.
6785         * testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc:
6786         Likewise.
6787         * testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc:
6788         Likewise.
6789         * testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc:
6790         Likewise.
6791         * testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc:
6792         Likewise.
6793         * testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc:
6794         Likewise.
6795         * testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc:
6796         Likewise.
6797         * testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc:
6798         Likewise.
6799         * testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc:
6800         Likewise.
6801         * testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc:
6802         Likewise.
6803         * testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc:
6804         Likewise.
6805         * testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc:
6806         Likewise.
6807         * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc:
6808         Likewise.
6809         * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc:
6810         Likewise.
6811         * testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc:
6812         Likewise.
6813         * testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc:
6814         Likewise.
6815         * testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc: Add
6816         dg-warning.
6817         * testsuite/ext/pb_ds/example/priority_queue_erase_if.cc:
6818         Likewise.
6819         * testsuite/ext/pb_ds/example/priority_queue_split_join.cc:
6820         Likewise.
6821         * testsuite/tr1/3_function_objects/reference_wrapper/typedefs.cc:
6822         Disable deprecated warnings.
6823         * testsuite/tr1/6_containers/hash/requirements/base_classes.cc:
6824         Likewise.
6825         * testsuite/util/regression/trait/erase_if_fn.hpp: Remove
6826         std::unary_function base classes.
6827         * testsuite/util/testsuite_iterators.h (output_iterator_wrapper):
6828         Remove std::iterator base classes.
6830 2022-01-14  Jonathan Wakely  <jwakely@redhat.com>
6832         * include/bits/shared_ptr.h (__cpp_lib_shared_ptr_weak_type):
6833         Correct type of macro value.
6834         (shared_ptr): Add additional friend declarations.
6835         (make_shared, allocate_shared): Constrain existing overloads and
6836         remove static_assert.
6837         * include/bits/shared_ptr_base.h (__cpp_lib_smart_ptr_for_overwrite):
6838         New macro.
6839         (_Sp_counted_ptr_inplace<T, Alloc, Lp>): New partial
6840         specialization for use with make_shared_for_overwrite.
6841         (__cpp_lib_shared_ptr_arrays): Update value for C++20.
6842         (_Sp_counted_array_base): New class template.
6843         (_Sp_counted_array): New class template.
6844         (__shared_count(_Tp*&, const _Sp_counted_array_base&, _Init)):
6845         New constructor for allocating shared arrays.
6846         (__shared_ptr(const _Sp_counted_array_base&, _Init)): Likewise.
6847         * include/std/version (__cpp_lib_shared_ptr_weak_type): Correct
6848         type.
6849         (__cpp_lib_shared_ptr_arrays): Update value for C++20.
6850         (__cpp_lib_smart_ptr_for_overwrite): New macro.
6851         * testsuite/20_util/shared_ptr/creation/99006.cc: Adjust
6852         expected errors.
6853         * testsuite/20_util/shared_ptr/creation/array.cc: New test.
6854         * testsuite/20_util/shared_ptr/creation/overwrite.cc: New test.
6855         * testsuite/20_util/shared_ptr/creation/version.cc: New test.
6856         * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: Check
6857         feature test macro. Test non-trivial default-initialization.
6859 2022-01-14  Jonathan Wakely  <jwakely@redhat.com>
6861         * include/bits/stl_construct.h (_Construct, _Construct_novalue):
6862         Also cast away cv-qualifiers when converting pointer to void.
6863         * testsuite/20_util/allocator/void.cc: Test construct function
6864         with cv-qualified types.
6866 2022-01-14  Jonathan Wakely  <jwakely@redhat.com>
6868         PR libstdc++/103992
6869         * include/bits/stl_iterator.h (common_iterator): Use
6870         std::construct_at instead of placement new.
6871         * testsuite/24_iterators/common_iterator/1.cc: Check copy
6872         construction is usable in constant expressions.
6874 2022-01-14  Jonathan Wakely  <jwakely@redhat.com>
6876         * doc/xml/manual/status_cxx2011.xml: Document new tokens
6877         accepted by std::random_device constructor.
6878         * doc/html/manual/status.html: Regenerate.
6880 2022-01-12  Patrick Palka  <ppalka@redhat.com>
6882         * testsuite/20_util/to_chars/103955.cc: Add explicit dg-do
6883         directive.
6885 2022-01-12  Patrick Palka  <ppalka@redhat.com>
6887         PR libstdc++/103955
6888         * src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
6889         Track the excess precision separately from the effective
6890         precision.  Avoid overflow in bounds check by splitting it into
6891         two checks.
6892         (__floating_to_chars_precision): Avoid overflow in bounds checks
6893         similarly.
6894         * testsuite/20_util/to_chars/103955.cc: New test.
6896 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
6898         PR libstdc++/103726
6899         * include/Makefile.am: Install <source_location> for
6900         freestanding.
6901         * include/Makefile.in: Regenerate.
6902         * include/std/version (__cpp_lib_source_location): Define for
6903         freestanding.
6905 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
6907         * include/std/ranges (ranges::lazy_split_view::_InnerIter::end()):
6908         Add neoxcept (LWG 3593).
6910 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
6912         * include/std/ranges (ranges::__detail::__box): Add constexpr to
6913         assignment operators (LWG 3572).
6914         * testsuite/std/ranges/adaptors/filter.cc: Check assignment of a
6915         view that uses copyable-box.
6917 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
6919         PR libstdc++/103726
6920         * include/Makefile.am: Install <coroutine> for freestanding.
6921         * include/Makefile.in: Regenerate.
6922         * include/std/coroutine: Adjust headers and preprocessor
6923         conditions.
6924         (__coroutine_traits_impl): Use concepts when available.
6925         [_GLIBCXX_HOSTED] (hash<coroutine_handle>): Define.
6927 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
6929         * include/std/ostream (operator<<(basic_ostream&, charT)):
6930         Use unformatted input if no padding is needed.
6931         (operator<<(basic_ostream<char>&, char)): Likewise.
6933 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
6935         PR libstdc++/103891
6936         * include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
6937         Define.
6938         * include/std/variant (__cpp_lib_variant): Only define C++20
6939         value when the compiler is known to support conditionally
6940         trivial destructors.
6941         * include/std/version (__cpp_lib_variant): Likewise.
6943 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
6945         * include/bits/stl_iterator.h (common_iterator): Add constexpr
6946         to all member functions (LWG 3574).
6947         * testsuite/24_iterators/common_iterator/1.cc: Evaluate some
6948         tests as constant expressions.
6949         * testsuite/24_iterators/common_iterator/2.cc: Likewise.
6951 2022-01-10  Jakub Jelinek  <jakub@redhat.com>
6953         PR libstdc++/77760
6954         * include/bits/locale_facets_nonio.h (__time_get_state): New struct.
6955         (time_get::_M_extract_via_format): Declare new method with
6956         __time_get_state& as an extra argument.
6957         * include/bits/locale_facets_nonio.tcc (_M_extract_via_format): Add
6958         __state argument, set various fields in it while parsing.  Handle %j,
6959         %U, %w and %W, fix up handling of %y, %Y and %C, don't adjust tm_hour
6960         for %p immediately.  Add a wrapper around the method without the
6961         __state argument for backwards compatibility.
6962         (_M_extract_num): Remove all __len == 4 special cases.
6963         (time_get::do_get_time, time_get::do_get_date, time_get::do_get): Zero
6964         initialize __state, pass it to _M_extract_via_format and finalize it
6965         at the end.
6966         (do_get_year): For 1-2 digit parsed years, map 0-68 to 2000-2068,
6967         69-99 to 1969-1999.  For 3-4 digit parsed years use that as year.
6968         (get): If do_get isn't overloaded from the locale_facets_nonio.tcc
6969         version, don't call do_get but call _M_extract_via_format instead to
6970         pass around state.
6971         * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export _M_extract_via_format
6972         with extra __time_get_state and __time_get_state::_M_finalize_state.
6973         * src/c++98/locale_facets.cc (is_leap, day_of_the_week,
6974         day_of_the_year): New functions in anon namespace.
6975         (mon_yday): New var in anon namespace.
6976         (__time_get_state::_M_finalize_state): Define.
6977         * testsuite/22_locale/time_get/get/char/4.cc: New test.
6978         * testsuite/22_locale/time_get/get/wchar_t/4.cc: New test.
6979         * testsuite/22_locale/time_get/get_year/char/1.cc (test01): Parse 197
6980         as year 197AD instead of error.
6981         * testsuite/22_locale/time_get/get_year/char/5.cc (test01): Parse 1 as
6982         year 2001 instead of error.
6983         * testsuite/22_locale/time_get/get_year/char/6.cc: New test.
6984         * testsuite/22_locale/time_get/get_year/wchar_t/1.cc (test01): Parse
6985         197 as year 197AD instead of error.
6986         * testsuite/22_locale/time_get/get_year/wchar_t/5.cc (test01): Parse
6987         1 as year 2001 instead of error.
6988         * testsuite/22_locale/time_get/get_year/wchar_t/6.cc: New test.
6990 2022-01-10  Jonathan Wakely  <jwakely@redhat.com>
6992         PR libstdc++/103866
6993         * acinclude.m4 (GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS): Do
6994         nothing for freestanding builds.
6995         (GLIBCXX_ENABLE_HOSTED): Define FREESTANDING_FLAGS.
6996         * configure.ac: Do not use AC_LIBTOOL_DLOPEN when configured
6997         with --without-headers.  Do not use GCC_HEADER_STDINT for
6998         freestanding builds.
6999         * libsupc++/Makefile.am (HOSTED_CXXFLAGS): Use -ffreestanding
7000         for freestanding builds.
7001         * configure: Regenerate.
7002         * Makefile.in: Regenerate.
7003         * doc/Makefile.in: Regenerate.
7004         * include/Makefile.in: Regenerate.
7005         * libsupc++/Makefile.in: Regenerate.
7006         * po/Makefile.in: Regenerate.
7007         * python/Makefile.in: Regenerate.
7008         * src/Makefile.in: Regenerate.
7009         * src/c++11/Makefile.in: Regenerate.
7010         * src/c++17/Makefile.in: Regenerate.
7011         * src/c++20/Makefile.in: Regenerate.
7012         * src/c++98/Makefile.in: Regenerate.
7013         * src/filesystem/Makefile.in: Regenerate.
7014         * testsuite/Makefile.in: Regenerate.
7016 2022-01-10  Jonathan Wakely  <jwakely@redhat.com>
7018         * testsuite/28_regex/algorithms/regex_replace/char/103664.cc:
7019         Add dg-timeout-factor directive.
7020         * testsuite/28_regex/basic_regex/84110.cc: Likewise.
7021         * testsuite/28_regex/basic_regex/ctors/char/other.cc: Likewise.
7022         * testsuite/28_regex/match_results/102667.cc: Likewise.
7024 2022-01-10  Jonathan Wakely  <jwakely@redhat.com>
7026         * doc/xml/manual/using.xml: Update documentation around default
7027         -std option.
7028         * doc/html/*: Regenerate.
7030 2022-01-10  Jonathan Wakely  <jwakely@redhat.com>
7032         PR libstdc++/100017
7033         * src/c++17/Makefile.am (AM_CXXFLAGS): Add -nostdinc++.
7034         * src/c++17/Makefile.in: Regenerate.
7036 2022-01-09  Sandra Loosemore  <sandra@codesourcery.com>
7038         * testsuite/18_support/type_info/constexpr.cc: Add explicit
7039         -fdelete-null-pointer-checks option.
7041 2022-01-06  Pavel I. Kryukov  <pavel.kryukov@phystech.edu>
7042             Jonathan Wakely  <jwakely@redhat.com>
7044         PR libstdc++/103853
7045         * include/bits/forward_list.tcc (forward_list::merge): Check for
7046         self-merge.
7047         * testsuite/23_containers/forward_list/operations/merge.cc: New test.
7049 2022-01-06  Jonathan Wakely  <jwakely@redhat.com>
7051         * include/bits/regex.h (basic_regex, match_results): Qualify
7052         name in friend declaration, to work around Clang bug.
7054 2022-01-06  Jonathan Wakely  <jwakely@redhat.com>
7056         * testsuite/ext/rope/pthread7-rope.cc: Add dg-timeout-factor.
7058 2022-01-06  Jonathan Wakely  <jwakely@redhat.com>
7060         PR libstdc++/103911
7061         * include/std/charconv (__from_chars_alpha_to_num): Return
7062         char instead of unsigned char. Change invalid return value to
7063         127 instead of using numeric trait.
7064         (__from_chars_alnum): Fix comment. Do not use std::isdigit.
7065         Change type of variable to char.
7067 2022-01-05  François Dumont  <fdumont@gcc.gnu.org>
7069         PR libstdc++/68303
7070         * include/bits/hashtable_policy.h
7071         (_Hashtable_hash_traits<_Hash>): New.
7072         (_Hash_code_base<>::_M_hash_code(const _Hash_node_value<>&)): New.
7073         (_Hashtable_base<>::_M_key_equals): New.
7074         (_Hashtable_base<>::_M_equals): Use latter.
7075         (_Hashtable_base<>::_M_key_equals_tr): New.
7076         (_Hashtable_base<>::_M_equals_tr): Use latter.
7077         * include/bits/hashtable.h
7078         (_Hashtable<>::__small_size_threshold()): New, use _Hashtable_hash_traits.
7079         (_Hashtable<>::find): Loop through elements to look for key if size is lower
7080         than __small_size_threshold().
7081         (_Hashtable<>::_M_emplace(true_type, _Args&&...)): Likewise.
7082         (_Hashtable<>::_M_insert_unique(_Kt&&, _Args&&, const _NodeGenerator&)): Likewise.
7083         (_Hashtable<>::_M_compute_hash_code(const_iterator, const key_type&)): New.
7084         (_Hashtable<>::_M_emplace(const_iterator, false_type, _Args&&...)): Use latter.
7085         (_Hashtable<>::_M_find_before_node(const key_type&)): New.
7086         (_Hashtable<>::_M_erase(true_type, const key_type&)): Use latter.
7087         (_Hashtable<>::_M_erase(false_type, const key_type&)): Likewise.
7088         * src/c++11/hashtable_c++0x.cc: Include <bits/functional_hash.h>.
7089         * testsuite/util/testsuite_performance.h
7090         (report_performance): Use 9 width to display memory.
7091         * testsuite/performance/23_containers/insert_erase/unordered_small_size.cc:
7092         New performance test case.
7094 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
7096         PR libstdc++/103919
7097         * include/bits/basic_string.h (basic_string(const T&, size_t, size_t)):
7098         Relax constraints on string_view parameter.
7099         * include/bits/cow_string.h (basic_string(const T&, size_t, size_t)):
7100         Likewise.
7101         * testsuite/21_strings/basic_string/cons/char/103919.cc: New test.
7103 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
7105         * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export new symbol for
7106         ARM EABI.
7107         * include/bits/c++config (_GLIBCXX23_CONSTEXPR): Define.
7108         * include/std/version (__cpp_lib_constexpr_typeinfo): Define.
7109         * libsupc++/tinfo.cc: Add #error to ensure non-inline definition
7110         is emitted.
7111         (type_info::__equal): Define alias symbol.
7112         * libsupc++/typeinfo (type_info::before): Combine different
7113         implementations into one.
7114         (type_info::operator==): Likewise. Use address equality for
7115         constant evaluation. Call __equal for targets that require the
7116         definition to be non-inline.
7117         * testsuite/18_support/type_info/constexpr.cc: New test.
7119 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
7121         * src/c++11/cxx11-ios_failure.cc (io_error_category): Define
7122         class and virtual functions as 'final'.
7123         (io_category_instance): Use constinit union to make the object
7124         immortal.
7125         * src/c++11/future.cc (future_error_category): Define class and
7126         virtual functions as 'final'.
7127         (future_category_instance): Use constinit union.
7129 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
7131         * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Strip
7132         versioned namespace from the type name that is printed.
7134 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
7136         * python/libstdcxx/v6/printers.py (StdRegexStatePrinter): New
7137         printer for std::regex NFA states.
7139 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
7141         * testsuite/23_containers/forward_list/operations/1.cc: Fill in
7142         placeholders in comments.
7143         * testsuite/23_containers/forward_list/operations/2.cc:
7144         Likewise.
7145         * testsuite/23_containers/forward_list/operations/3.cc:
7146         Likewise.
7147         * testsuite/23_containers/forward_list/operations/4.cc:
7148         Likewise.
7149         * testsuite/23_containers/forward_list/operations/5.cc:
7150         Likewise.
7151         * testsuite/23_containers/forward_list/operations/6.cc:
7152         Likewise.
7153         * testsuite/23_containers/forward_list/operations/7.cc:
7154         Likewise.
7156 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
7158         PR libstdc++/103848
7159         * include/bits/stl_deque.h (operator-): Do not use 0 as null
7160         pointer constant.
7162 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
7164         * include/bits/alloc_traits.h (allocator_traits<allocator<void>>):
7165         Use std::_Construct for construct.
7167 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
7169         PR libstdc++/103877
7170         * doc/xml/faq.xml: Add '-x c++' to preprocessor command.
7171         * doc/html/faq.html: Regenerate.
7173 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
7175         * include/bits/regex.h (__regex_algo_impl): Change __policy and
7176         __match_mode template parameters to be function parameters.
7177         (regex_match, regex_search): Pass policy and match mode as
7178         function arguments.
7179         * include/bits/regex.tcc (__regex_algo_impl): Change template
7180         parameters to function parameters.
7181         * include/bits/regex_compiler.h (_RegexTranslatorBase): Use
7182         'if constexpr' for conditions using template parameters.
7183         (_RegexTranslator): Likewise.
7184         * include/bits/regex_executor.tcc (_Executor::_M_handle_accept):
7185         Likewise.
7186         * testsuite/util/testsuite_regex.h (regex_match_debug)
7187         (regex_search_debug): Move template arguments to function
7188         arguments.
7190 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
7192         * testsuite/util/testsuite_regex.h (regex_match_debug): Compare
7193         results even if the match failed.
7195 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
7197         * include/bits/regex_compiler.tcc: Adjust all calls to
7198         __throw_regex_error.
7199         * include/bits/regex_error.h (__throw_regex_error): Add noreturn
7200         attribute.
7201         * include/bits/regex_scanner.tcc: Likewise.
7202         * src/c++11/regex.cc (desc): New helper function.
7203         (regex_error::regex_error(error_type)): Use desc to get a string
7204         corresponding to the error code.
7207 Copyright (C) 2022 Free Software Foundation, Inc.
7209 Copying and distribution of this file, with or without modification,
7210 are permitted in any medium without royalty provided the copyright
7211 notice and this notice are preserved.