d: Fix #error You must define PREFERRED_DEBUGGING_TYPE if DWARF is not supported
[official-gcc.git] / libstdc++-v3 / ChangeLog
blob2547cd68ca12543727496620323b06aad694608e
1 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
3         * include/std/ranges (adjacent_transform_view::_Iterator): Add
4         typename keyword before dependent qualified-id.
6 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
8         * include/std/type_traits (__is_referenceable): Remove.
9         (__add_lvalue_reference_helper, __add_rvalue_reference_helper):
10         Use __void_t instead of __is_referenceable.
11         (__add_pointer_helper): Likewise.
12         (add_pointer): Add partial specializations for reference types.
14 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
16         * include/std/type_traits (__is_constructible_impl): Replace
17         class template with alias template.
18         (is_default_constructible, is_nothrow_constructible)
19         (is_nothrow_constructible): Simplify base-specifier.
20         (__is_copy_constructible_impl, __is_move_constructible_impl)
21         (__is_nothrow_copy_constructible_impl)
22         (__is_nothrow_move_constructible_impl): Remove class templates.
23         (is_copy_constructible, is_move_constructible)
24         (is_nothrow_constructible, is_nothrow_default_constructible)
25         (is_nothrow_copy_constructible, is_nothrow_move_constructible):
26         Adjust base-specifiers to use __is_constructible_impl.
27         (__is_copy_assignable_impl, __is_move_assignable_impl)
28         (__is_nt_copy_assignable_impl, __is_nt_move_assignable_impl):
29         Remove class templates.
30         (__is_assignable_impl): New alias template.
31         (is_assignable, is_copy_assignable, is_move_assignable):
32         Adjust base-specifiers to use new alias template.
33         (is_nothrow_copy_assignable, is_nothrow_move_assignable):
34         Adjust base-specifiers to use existing alias template.
35         (__is_trivially_constructible_impl): New alias template.
36         (is_trivially_constructible, is_trivially_default_constructible)
37         (is_trivially_copy_constructible)
38         (is_trivially_move_constructible): Adjust base-specifiers to use
39         new alias template.
40         (__is_trivially_assignable_impl): New alias template.
41         (is_trivially_assignable, is_trivially_copy_assignable)
42         (is_trivially_move_assignable): Adjust base-specifier to use
43         new alias template.
44         (__add_lval_ref_t, __add_rval_ref_t): New alias templates.
45         (add_lvalue_reference, add_rvalue_reference): Use new alias
46         templates.
48 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
50         * include/std/type_traits (__decay_selector): Add partial
51         specializations for array types. Only check for function types
52         when not dealing with an array.
53         (decay): Add partial specializations for reference types.
55 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
57         * include/std/type_traits (is_lvalue_reference_v)
58         (is_rvalue_reference_v, is_reference_v, is_const_v)
59         (is_volatile_v): Define using partial specializations instead
60         of instantiating class templates.
62 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
64         * include/std/type_traits (is_enum_v, is_class_v, is_union_v)
65         (is_empty_v, is_polymoprhic_v, is_abstract_v, is_final_v)
66         (is_base_of_v, is_aggregate_v): Use built-in directly instead of
67         instantiating class template.
69 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
71         * include/std/type_traits (is_scoped_enum): Remove workaround.
73 2022-09-01  Patrick Palka  <ppalka@redhat.com>
75         * include/std/ranges (__detail::__unarize): Define.
76         (adjacent_view::_Iterator): Befriend adjacent_transform_view.
77         (adjacent_transform_view): Define.
78         (adjacent_transform_view::_Iterator): Define.
79         (adjacent_transform_view::_Sentinel): Define.
80         (views::__detail::__can_adjacent_transform_view): Define.
81         (views::_AdjacentTransform): Define.
82         (views::adjacent_transform): Define.
83         (views::pairwise_transform): Define.
84         * testsuite/std/ranges/adaptors/adjacent_transform/1.cc: New test.
86 2022-09-01  Jonathan Wakely  <jwakely@redhat.com>
88         * include/std/type_traits (__is_array_known_bounds): Add partial
89         specialization instead of using std::extent.
90         (__is_array_unknown_bounds): Likewise.
91         (extent): Add partial specializations to stop recursion after
92         the result is found.
93         (is_array_v): Add partial specializations instead of
94         instantiating the class template.
95         (rank_v, extent_v): Likewise.
96         (is_bounded_array_v, is_unbounded_array_v): Likewise.
97         (is_bounded_array, is_unbounded_array): Define in terms of the
98         variable templates.
100 2022-08-31  Patrick Palka  <ppalka@redhat.com>
102         * include/bits/ranges_base.h (__advance_fn::operator()): Add
103         parentheses in assert condition to avoid -Wparentheses warning.
104         * include/std/ranges: (take_view::take_view): Uglify 'base'.
105         (take_while_view::take_while_view): Likewise.
106         (elements_view::elements_view): Likewise.
107         (views::_Zip::operator()): Adjust position of [[nodiscard]] for
108         compatibility with -fconcepts-ts.
109         (zip_transform_view::_Sentinel): Uglify 'OtherConst'.
110         (views::_ZipTransform::operator()): Adjust position of
111         [[nodiscard]] for compatibilty with -fconcepts-ts.
113 2022-08-31  Martin Liska  <mliska@suse.cz>
115         * configure: Regenerate.
116         * crossconfig.m4: Remove deprecated ports.
118 2022-08-31  François Dumont  <fdumont@gcc.gnu.org>
120         * include/debug/debug.h: Use nullptr rather than '0' in checks in post-C++11.
121         * include/debug/string: Likewise.
122         * testsuite/21_strings/basic_string/operations/ends_with/char.cc: Use __gnu_test::string.
123         * testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc: Likewise.
124         * testsuite/21_strings/basic_string/operations/ends_with/wchar_t.cc: Likewise.
125         * testsuite/21_strings/basic_string/operations/starts_with/wchar_t.cc: Likewise.
126         * testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc: Likewise.
127         * testsuite/21_strings/basic_string/operations/starts_with/char.cc: Likewise..
129 2022-08-31  Patrick Palka  <ppalka@redhat.com>
131         * include/std/ranges (adjacent_view): Define.
132         (enable_borrowed_range<adjacent_view>): Define.
133         (__detail::__repeated_tuple): Define.
134         (adjacent_view::_Iterator): Define.
135         (adjacent_view::_Sentinel): Define.
136         (views::__detail::__can_adjacent_view): Define.
137         (views::_Adjacent): Define.
138         (views::adjacent): Define.
139         (views::pairwise): Define.
140         * testsuite/std/ranges/adaptors/adjacent/1.cc: New test.
142 2022-08-31  François Dumont  <fdumont@gcc.gnu.org>
144         * include/debug/formatter.h
145         [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_state): Declare.
146         [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_create_state): Declare.
147         [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_callback): Define.
148         [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_error_callback): Define.
149         [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_func): Define.
150         [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full): Declare.
151         [_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_state): New.
152         [_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_full): New.
153         * src/c++11/debug.cc [_GLIBCXX_HAVE_STACKTRACE](print_backtrace): New.
154         (_Error_formatter::_M_error()): Adapt.
155         * src/libbacktrace/Makefile.am: Add backtrace.c.
156         * src/libbacktrace/Makefile.in: Regenerate.
157         * src/libbacktrace/backtrace-rename.h (backtrace_full): New.
158         * testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc: New test.
159         * doc/xml/manual/debug_mode.xml: Document _GLIBCXX_DEBUG_BACKTRACE.
160         * doc/xml/manual/using.xml: Likewise.
162 2022-08-31  Patrick Palka  <ppalka@redhat.com>
164         * testsuite/20_util/logical_traits/requirements/short_circuit.cc: New test.
166 2022-08-31  Jonathan Wakely  <jwakely@redhat.com>
168         * include/bits/refwrap.h (reference_wrapper::operator()): Add
169         noexcept-specifier and use __invoke_result instead of result_of.
170         * testsuite/20_util/reference_wrapper/invoke-noexcept.cc: New test.
172 2022-08-31  Jonathan Wakely  <jwakely@redhat.com>
174         * testsuite/20_util/reference_wrapper/invoke-2.cc: Improve
175         comments.
176         * testsuite/20_util/reference_wrapper/invoke-3.cc: Likewise.
177         * testsuite/20_util/reference_wrapper/invoke.cc: Likewise.
179 2022-08-31  Jonathan Wakely  <jwakely@redhat.com>
181         * include/bits/basic_string.h (basic_string): Add nodiscard
182         attribute to all relevant functions.
183         * include/std/string_view (basic_string_view): Likewise.
184         * testsuite/21_strings/basic_string/capacity/1.cc: Cast unused
185         results to void.
186         * testsuite/21_strings/basic_string/capacity/char/1.cc:
187         Likewise.
188         * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
189         Likewise.
190         * testsuite/21_strings/basic_string/cons/char/self_move.cc:
191         Likewise.
192         * testsuite/21_strings/basic_string/element_access/char/1.cc:
193         Likewise.
194         * testsuite/21_strings/basic_string/element_access/char/21674.cc:
195         Likewise.
196         * testsuite/21_strings/basic_string/element_access/wchar_t/1.cc:
197         Likewise.
198         * testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc:
199         Likewise.
200         * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
201         * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
202         * testsuite/21_strings/basic_string/operations/contains/nonnull.cc:
203         Add -Wno-unused-result to options.
204         * testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc:
205         Likewise.
206         * testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc:
207         Likewise.
208         * testsuite/21_strings/basic_string/operators/char/1.cc: Cast
209         unused results to void.
210         * testsuite/21_strings/basic_string/operators/wchar_t/1.cc:
211         Likewise.
212         * testsuite/21_strings/basic_string_view/capacity/1.cc:
213         Likewise.
214         * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
215         Likewise.
216         * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
217         Likewise.
218         * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
219         Likewise.
220         * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
221         Likewise.
222         * testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc:
223         Likewise.
224         Add -Wno-unused-result to options.
225         * testsuite/21_strings/basic_string_view/operations/ends_with/nonnull.cc:
226         Likewise.
227         * testsuite/21_strings/basic_string_view/operations/starts_with/nonnull.cc:
228         Likewise.
229         * testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc: Cast
230         unused results to void.
231         * testsuite/27_io/basic_stringbuf/sputbackc/wchar_t/1.cc:
232         Likewise.
233         * testsuite/27_io/basic_stringbuf/sungetc/char/1.cc: Likewise.
234         * testsuite/27_io/basic_stringbuf/sungetc/wchar_t/1.cc:
235         Likewise.
237 2022-08-27  Patrick Palka  <ppalka@redhat.com>
239         * testsuite/20_util/logical_traits/requirements/base_classes.cc: New test.
241 2022-08-26  Patrick Palka  <ppalka@redhat.com>
243         * include/std/ranges (zip_view::_Iterator::operator<): Remove
244         as per LWG 3692.
245         (zip_view::_Iterator::operator>): Likewise.
246         (zip_view::_Iterator::operator<=): Likewise.
247         (zip_view::_Iterator::operator>=): Likewise.
248         (zip_view::_Iterator::operator<=>): Remove three_way_comparable
249         constraint as per LWG 3692.
250         (zip_transform_view::_Iterator): Ditto as per LWG 3702.
252 2022-08-26  Patrick Palka  <ppalka@redhat.com>
254         * include/std/ranges (zip_view::_Iterator): Befriend
255         zip_transform_view.
256         (__detail::__range_iter_cat): Define.
257         (zip_transform_view): Define.
258         (zip_transform_view::_Iterator): Define.
259         (zip_transform_view::_Sentinel): Define.
260         (views::__detail::__can_zip_transform_view): Define.
261         (views::_ZipTransform): Define.
262         (views::zip_transform): Define.
263         * testsuite/std/ranges/zip_transform/1.cc: New test.
265 2022-08-26  Patrick Palka  <ppalka@redhat.com>
267         * include/std/type_traits (enable_if, __enable_if_t): Define them
268         earlier.
269         (__detail::__first_t): Define.
270         (__detail::__or_fn, __detail::__and_fn): Declare.
271         (__or_, __and_): Redefine as alias templates in terms of __or_fn
272         and __and_fn.
273         (__not_): Redefine as an alias template.
274         (__detail::__disjunction_impl, __detail::__conjunction_impl):
275         Define.
276         (conjuction, disjunction): Redefine in terms of __disjunction_impl
277         and __conjunction_impl.
279 2022-08-26  Jonathan Wakely  <jwakely@redhat.com>
281         * include/std/system_error (error_code::_Check): New alias
282         template for constructor SFINAE constraint.
283         (error_code::error_code(ErrorCodeEnum)): Use it.
284         (error_code::operator=(ErrorCodeEnum)): Remove.
285         (error_condition::_Check): New alias template for constraint.
286         (error_condition::error_condition(ErrorConditionEnum)): Use it.
287         (error_condition::operator=(ErrorConditionEnum)): Remove.
288         * testsuite/19_diagnostics/error_code/cons/1.cc: Check
289         constructor taking user-defined error enum.
290         * testsuite/19_diagnostics/error_condition/cons/1.cc: Likewise.
292 2022-08-26  Jonathan Wakely  <jwakely@redhat.com>
294         * include/bits/basic_string.h (starts_with, ends_with, contains):
295         Add nonnull attribute.
296         * include/bits/cow_string.h (starts_with, ends_with, contains):
297         Likewise.
298         * include/std/string_view (starts_with, ends_with, contains):
299         Likewise.
300         * testsuite/21_strings/basic_string/operations/contains/nonnull.cc
301         * testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc
302         * testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc
303         * testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc
304         * testsuite/21_strings/basic_string_view/operations/ends_with/nonnull.cc
305         * testsuite/21_strings/basic_string_view/operations/starts_with/nonnull.cc
307 2022-08-25  Patrick Palka  <ppalka@redhat.com>
309         * include/std/ranges (lazy_split_view::_OuterIter::_M_current):
310         Remove redundant comment.
311         (lazy_split_view::_M_current): Likewise.
312         (common_view::common_view): Remove commented out view-converting
313         constructor as per LWG3405.
314         (elements_view::_Iterator::_Iterator): Uglify 'current' and 'i'.
316 2022-08-24  Patrick Palka  <ppalka@redhat.com>
318         * include/bits/ranges_algo.h (__min_fn, min): Move to ...
319         * include/bits/ranges_util.h: ... here, in order to avoid
320         including all of ranges_algo.h from <ranges>.
321         * include/std/ranges (__detail::__zip_is_common): Define for
322         C++23 as per P2321R2.
323         (__detail::__tuple_or_pair): Likewise.
324         (__detail::__tuple_or_pair_t): Likewise.
325         (__detail::__tuple_transform): Likewise.
326         (__detail::__tuple_for_each): Likewise.
327         (zip_view): Likewise.
328         (enable_borrowed_range<zip_view>): Likewise.
329         (__detail::__all_random_access): Likewise.
330         (__detail::__all_bidirectional): Likewise.
331         (__detail::__all_forward): Likewise.
332         (__detail::__zip_view_iter_cat): Likewise.
333         (zip_view::_Iterator): Likewise.
334         (zip_view::_Sentinel): Likewise.
335         * testsuite/std/ranges/zip/1.cc: New test.
337 2022-08-24  Jonathan Wakely  <jwakely@redhat.com>
339         Revert:
340         2022-08-24  Will Hawkins  <whh8b@obs.cr>
342         * include/bits/basic_string.h (operator+(const string&, const char*)):
343         Remove naive implementation.
344         * include/bits/basic_string.tcc (operator+(const string&, const char*)):
345         Add single-allocation implementation.
347 2022-08-24  Patrick Palka  <ppalka@redhat.com>
349         * include/bits/stl_pair.h (pair::swap const): Add non-standard
350         is_swappable_v constraints.
351         * include/std/tuple (tuple::swap const): Likewise.
352         * testsuite/20_util/tuple/cons/noexcept_specs.cc: Correct some
353         asserts in C++23 mode.
355 2022-08-24  Jonathan Wakely  <jwakely@redhat.com>
357         * include/bits/stl_algo.h (__stable_sort): Cast size to
358         iterator's difference type.
359         * testsuite/25_algorithms/stable_sort/4.cc: New test.
361 2022-08-24  Will Hawkins  <whh8b@obs.cr>
363         * include/bits/basic_string.h (operator+(const string&, const char*)):
364         Remove naive implementation.
365         * include/bits/basic_string.tcc (operator+(const string&, const char*)):
366         Add single-allocation implementation.
368 2022-08-24  Jonathan Wakely  <jwakely@redhat.com>
370         * testsuite/20_util/duration_cast/rounding.cc: Check abs with
371         non-reduced duration.
373 2022-08-23  Patrick Palka  <ppalka@redhat.com>
375         * include/bits/stl_bvector.h (_Bit_reference::operator=): Define
376         const overload for C++23 as per P2321R2.
377         * include/bits/stl_pair.h (pair::swap): Likewise.
378         (pair::pair): Define additional converting constructors for
379         C++23 as per P2321R2.
380         (pair::operator=): Define const overloads for C++23 as per
381         P2321R2.
382         (swap): Define overload taking const pair& for C++23 as per
383         P2321R2.
384         (basic_common_reference): Define partial specialization for
385         pair for C++23 as per P2321R2.
386         (common_type): Likewise.
387         * include/bits/uses_allocator_args.h
388         (uses_allocator_construction_args): Define additional pair
389         overloads for C++23 as per P2321R2.
390         * include/std/tuple (_Tuple_impl::_Tuple_impl): Define
391         additional converting constructors for C++23 as per P2321R2.
392         (_Tuple_impl::_M_assign): Define const overloads for C++23
393         as per P2321R2.
394         (_Tuple_impl::_M_swap): Likewise.
395         (tuple::__constructible): Define as a convenient renaming of
396         _TCC<true>::__constructible.
397         (tuple::__convertible): As above but for _TCC<true>::__convertible.
398         (tuple::tuple): Define additional converting constructors for
399         C++23 as per P2321R2.
400         (tuple::operator=): Define const overloads for C++23 as per
401         P2321R2.
402         (tuple::swap): Likewise.
403         (basic_common_reference): Define partial specialization for
404         tuple for C++23 as per P2321R2.
405         (common_type): Likewise.
406         * testsuite/20_util/pair/p2321r2.cc: New test.
407         * testsuite/20_util/tuple/p2321r2.cc: New test.
408         * testsuite/23_containers/vector/bool/element_access/1.cc: New test.
410 2022-08-23  Patrick Palka  <ppalka@redhat.com>
412         * include/std/tuple (_TupleConstraints::__convertible): Define.
413         (_TupleConstraints::__constructible): Define.
414         (_TupleConstraints::__is_explicitly_constructible): Redefine this
415         in terms of __convertible and __constructible.
416         (_TupleConstraints::__is_implicitly_constructible): Likewise.
418 2022-08-23  Jonathan Wakely  <jwakely@redhat.com>
420         PR libstdc++/106589
421         * include/std/variant (__do_visit): Handle is_void<R> for zero
422         argument case.
423         * testsuite/20_util/variant/visit_r.cc: Check std::visit<void>(v).
425 2022-08-22  Jonathan Wakely  <jwakely@redhat.com>
427         PR libstdc++/105678
428         * doc/xml/manual/using.xml: Document -lstdc++_libbacktrace
429         requirement for using std::stacktrace. Also adjust -frtti and
430         -fexceptions to document non-default (i.e. negative) forms.
431         * doc/html/*: Regenerate.
433 2022-08-22  Jonathan Wakely  <jwakely@redhat.com>
435         PR libstdc++/106695
436         * include/bits/std_thread.h (thread::_State_impl): Forward
437         individual arguments to _Invoker constructor.
438         (thread::_Invoker): Add constructor. Delete copies.
439         * include/std/future (__future_base::_Deferred_state): Forward
440         individual arguments to _Invoker constructor.
441         (__future_base::_Async_state_impl): Likewise.
442         * testsuite/30_threads/async/106695.cc: New test.
443         * testsuite/30_threads/thread/106695.cc: New test.
445 2022-08-22  Jonathan Wakely  <jwakely@redhat.com>
447         PR libstdc++/106607
448         * include/bits/regex_compiler.tcc (_Compiler::_M_cur_int_value):
449         Use built-ins to check for integer overflow in back-reference
450         number.
451         * testsuite/28_regex/basic_regex/106607.cc: New test.
453 2022-08-17  Keef Aragon  <keef.aragon@konscious.net>
455         * libsupc++/eh_alloc.cc (pool::free): Inverse comparison.
457 2022-08-08  François Dumont  <fdumont@gcc.gnu.org>
459         * include/debug/formatter.h (__singular_value_init): New _Iterator_state enum entry.
460         (_Parameter<>(const _Safe_iterator<>&, const char*, _Is_iterator)): Check if iterator
461         parameter is value-initialized.
462         (_Parameter<>(const _Safe_local_iterator<>&, const char*, _Is_iterator)): Likewise.
463         * include/debug/safe_iterator.h (_Safe_iterator<>::_M_value_initialized()): New. Adapt
464         checks.
465         * include/debug/safe_local_iterator.h (_Safe_local_iterator<>::_M_value_initialized()): New.
466         Adapt checks.
467         * src/c++11/debug.cc (_Safe_iterator_base::_M_reset): Do not reset _M_version.
468         (print_field(PrintContext&, const _Parameter&, const char*)): Adapt state_names.
469         * testsuite/23_containers/deque/debug/iterator1_neg.cc: New test.
470         * testsuite/23_containers/deque/debug/iterator2_neg.cc: New test.
471         * testsuite/23_containers/forward_list/debug/iterator1_neg.cc: New test.
472         * testsuite/23_containers/forward_list/debug/iterator2_neg.cc: New test.
473         * testsuite/23_containers/forward_list/debug/iterator3_neg.cc: New test.
475 2022-08-05  Jonathan Wakely  <jwakely@redhat.com>
477         * include/experimental/scope (__cpp_lib_experimental_scope):
478         Define.
479         * testsuite/experimental/scopeguard/uniqueres.cc: Check macro.
481 2022-08-05  Jonathan Wakely  <jwakely@redhat.com>
483         * include/Makefile.am: Add new header.
484         * include/Makefile.in: Regenerate.
485         * include/experimental/scope: New file.
486         * testsuite/experimental/scopeguard/uniqueres.cc: New test.
487         * testsuite/experimental/scopeguard/exit.cc: New test.
489 2022-08-04  Jonathan Wakely  <jwakely@redhat.com>
491         * include/std/string_view (basic_string_view(Range&&)): Add
492         explicit as per P2499R0.
493         * testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc:
494         Adjust implicit conversions. Check implicit conversions fail.
495         * testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc:
496         Likewise.
498 2022-08-04  Jonathan Wakely  <jwakely@redhat.com>
500         * include/bits/fs_dir.h (directory_iterator): Add comparison
501         with std::default_sentinel_t. Remove redundant operator!= for
502         C++20.
503         * (recursive_directory_iterator): Likewise.
504         * include/bits/iterator_concepts.h [!__cpp_lib_concepts]
505         (default_sentinel_t, default_sentinel): Define even if concepts
506         are not supported.
507         * include/bits/regex.h (regex_iterator): Add comparison with
508         std::default_sentinel_t. Remove redundant operator!= for C++20.
509         (regex_token_iterator): Likewise.
510         (regex_token_iterator::_M_end_of_seq()): Add noexcept.
511         * testsuite/27_io/filesystem/iterators/lwg3719.cc: New test.
512         * testsuite/28_regex/iterators/regex_iterator/lwg3719.cc:
513         New test.
514         * testsuite/28_regex/iterators/regex_token_iterator/lwg3719.cc:
515         New test.
517 2022-08-04  Jonathan Wakely  <jwakely@redhat.com>
519         * include/std/expected (unexpected::_M_val): Rename to _M_unex.
520         (bad_expected_access::_M_val): Likewise.
522 2022-08-04  Jonathan Wakely  <jwakely@redhat.com>
524         * include/bits/ios_base.h (__cpp_lib_ios_noreplace): Update
525         value to 202207L.
526         * include/std/version (__cpp_lib_ios_noreplace): Likewise.
527         * testsuite/27_io/basic_ofstream/open/char/noreplace.cc: Check
528         for new value.
529         * testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc:
530         Likewise.
532 2022-08-04  Jonathan Wakely  <jwakely@redhat.com>
534         PR libstdc++/106183
535         * include/bits/atomic_wait.h (__waiter_pool_base::_M_notify):
536         Move increment of _M_ver here.
537         [!_GLIBCXX_HAVE_PLATFORM_WAIT]: Lock mutex around increment.
538         Use relaxed memory order and always notify all waiters.
539         (__waiter_base::_M_do_wait) [!_GLIBCXX_HAVE_PLATFORM_WAIT]:
540         Check value again after locking mutex.
541         (__waiter_base::_M_notify): Remove increment of _M_ver.
543 2022-08-04  Ulrich Drepper  <drepper@gmail.com>
545         * python/libstdcxx/v6/printers.py (class StdTuplePrinter): Use
546         zero-based indeces just like std:get takes.
548 2022-07-29  Jonathan Wakely  <jwakely@redhat.com>
550         PR libstdc++/104443
551         * include/bits/stl_iterator.h (common_iterator::operator->):
552         Change return type to just auto.
554 2022-07-26  Thomas Rodgers  <trodgers@redhat.com>
556         * include/bits/atomic_wait.h (__atomic_spin): Merge spin loops.
558 2022-07-20  Jonathan Wakely  <jwakely@redhat.com>
560         PR libstdc++/100823
561         * include/bits/stl_iterator.h (common_iterator): Define
562         destructor, copy constructor and move constructor as trivial
563         when the underlying types allow.
564         * testsuite/24_iterators/common_iterator/100823.cc: Check
565         triviality of special members.
567 2022-07-20  Jonathan Wakely  <jwakely@redhat.com>
569         PR libstdc++/100823
570         * include/bits/stl_iterator.h (common_iterator): Define move
571         constructor and move assignment operator.
572         (common_iterator::_M_assign): New function implementing
573         assignment.
574         (common_iterator::operator=): Use _M_assign.
575         (common_iterator::_S_valueless): New constant.
576         * testsuite/24_iterators/common_iterator/100823.cc: New test.
578 2022-07-20  Jonathan Wakely  <jwakely@redhat.com>
580         * include/bits/stl_iterator.h (common_iterator): Fix incorrect
581         uses of is_nothrow_assignable_v. Fix inconsistent constraints on
582         friend declaration. Do not move argument in copy constructor.
583         * testsuite/24_iterators/common_iterator/1.cc: Check for
584         noexcept constructibnle/assignable.
586 2022-07-19  François Dumont  <fdumont@gcc.gnu.org>
588         * include/debug/debug.h [_GLIBCXX_DEBUG](__glibcxx_requires_string): Define
589         using _GLIBCXX_DEBUG_PEDASSERT.
590         [_GLIBCXX_DEBUG](__glibcxx_requires_string_len): Likewise.
591         * include/debug/macros.h
592         (__glibcxx_check_string, __glibcxx_check_string_len): Move...
593         * include/debug/string
594         (__glibcxx_check_string, __glibcxx_check_string_len): ...here. And define depending
595         on _GLIBCXX_DEBUG_PEDANTIC no matter if _GLIBCXX_DEBUG is defined.
596         Add using of std::string find, rfind, find_first_of, find_last_of, find_first_not_of
597         and find_last_not_of. Remove debug implementations having no debug assertion.
598         * testsuite/util/testsuite_string.h: New file. Provides __gnu_test::string and
599         __gnu_test::wtring which definition depends on _GLIBCXX_DEBUG.
600         * testsuite/21_strings/basic_string/debug/find1_neg.cc: New test case.
601         * testsuite/21_strings/basic_string/debug/find2_neg.cc: New test case.
602         * testsuite/21_strings/basic_string/operations/find/char/1.cc:
603         Include <testsuite_string.h> and use __gnu_test::string.
604         * testsuite/21_strings/basic_string/operations/find/char/2.cc: Likewise.
605         * testsuite/21_strings/basic_string/operations/find/char/3.cc: Likewise.
606         * testsuite/21_strings/basic_string/operations/find/char/4.cc: Likewise.
607         * testsuite/21_strings/basic_string/operations/find/char/5.cc: Likewise.
608         * testsuite/21_strings/basic_string/operations/find/char/6.cc: Likewise.
609         * testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc:
610         Include <testsuite_string.h> and use __gnu_test::wstring.
611         * testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc: Likewise.
612         * testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc: Likewise.
613         * testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc: Likewise.
614         * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc: Likewise.
615         * testsuite/21_strings/basic_string/operations/find/wchar_t/6.cc: Likewise.
617 2022-07-19  Jonathan Wakely  <jwakely@redhat.com>
619         * include/std/type_traits (__cpp_lib_reference_from_temporary)
620         (reference_constructs_from_temporary)
621         (reference_converts_from_temporary): Only define when the
622         built-ins are available.
624 2022-07-19  Marco Falke  <falke.marco@gmail.com>
626         * include/std/charconv (__from_chars_alnum_to_val): Replace
627         implicit conversion from int to unsigned char with explicit
628         cast.
630 2022-07-19  Sebastian Huber  <sebastian.huber@embedded-brains.de>
632         * configure: Regnerate.
633         * configure.ac (newlib, *-rtems*): Remove HAVE_POLL.
635 2022-07-18  François Dumont  <fdumont@gcc.gnu.org>
637         * include/bits/stl_algo.h
638         (__merge_adaptive): Adapt to merge only when buffer is large enough..
639         (__merge_adaptive_resize): New, adapt merge when buffer is too small.
640         (__inplace_merge): Adapt, use latter.
641         (__stable_sort_adaptive): Adapt to sort only when buffer is large enough.
642         (__stable_sort_adaptive_resize): New, adapt sort when buffer is too small.
643         (__stable_sort): Adapt, use latter.
645 2022-07-15  Marek Polacek  <polacek@redhat.com>
647         PR c++/104477
648         * include/std/type_traits (reference_constructs_from_temporary,
649         reference_converts_from_temporary): New class templates.
650         (reference_constructs_from_temporary_v,
651         reference_converts_from_temporary_v): New variable templates.
652         (__cpp_lib_reference_from_temporary): Define for C++23.
653         * include/std/version (__cpp_lib_reference_from_temporary): Define for
654         C++23.
655         * testsuite/20_util/variable_templates_for_traits.cc: Test
656         reference_constructs_from_temporary_v and
657         reference_converts_from_temporary_v.
658         * testsuite/20_util/reference_from_temporary/value.cc: New test.
659         * testsuite/20_util/reference_from_temporary/value2.cc: New test.
660         * testsuite/20_util/reference_from_temporary/version.cc: New test.
662 2022-07-12  Jonathan Wakely  <jwakely@redhat.com>
664         PR libstdc++/106248
665         * include/std/istream [C++17] (operator>>(istream&, char*)):
666         Set eofbit if we stopped extracting at EOF.
667         * testsuite/27_io/basic_istream/extractors_character/char/pr106248.cc:
668         New test.
669         * testsuite/27_io/basic_istream/extractors_character/wchar_t/pr106248.cc:
670         New test.
672 2022-07-12  Jonathan Wakely  <jwakely@redhat.com>
674         * include/bits/stl_iterator.h (__iter_to_alloc_t): Replace
675         add_const_t with const-qualifier.
676         * include/bits/utility.h (tuple_element<N, cv T>): Likewise for
677         all cv-qualifiers.
678         * include/std/type_traits (add_const, add_volatile): Replace
679         typedef-declaration with using-declaration.
680         (add_cv): Replace add_const and add_volatile with cv-qualifiers.
681         * include/std/variant (variant_alternative<N, cv T>): Replace
682         add_const_t, add_volatile_t and add_cv_t etc. with cv-qualifiers.
684 2022-07-09  François Dumont  <fdumont@gcc.gnu.org>
686         * include/std/string: Remove obsolete comment about char_traits.h including
687         stl_algobase.h.
689 2022-07-07  Jonathan Wakely  <jwakely@redhat.com>
691         PR c++/89074
692         * include/bits/char_traits.h (__gnu_cxx::char_traits::move):
693         Remove workaround for front-end bug.
695 2022-07-05  Alexandre Oliva  <oliva@adacore.com>
697         * testsuite/util/testsuite_fs.h (nonexistent_path): Explain
698         why we need the typecast.
700 2022-07-05  Alexandre Oliva  <oliva@adacore.com>
702         * testsuite/util/testsuite_fs.h (nonexistent_path): Convert
703         the getpid result to an integral type.
705 2022-07-01  Jonathan Wakely  <jwakely@redhat.com>
707         PR libstdc++/106162
708         * include/Makefile.am (largefile-config.h): Add
709         stamp-${host_alias} prerequisite.
710         * include/Makefile.in: Regenerate.
712 2022-07-01  Jonathan Wakely  <jwakely@redhat.com>
714         * include/bits/fs_ops.h: Add nodiscard to all pure functions.
715         * include/experimental/bits/fs_ops.h: Likewise.
716         * testsuite/27_io/filesystem/operations/all.cc: Do not discard
717         results of absolute and canonical.
718         * testsuite/27_io/filesystem/operations/absolute.cc: Cast
719         discarded result to void.
720         * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
721         * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
722         * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
723         * testsuite/27_io/filesystem/operations/read_symlink.cc:
724         Likewise.
725         * testsuite/27_io/filesystem/operations/status.cc: Likewise.
726         * testsuite/27_io/filesystem/operations/symlink_status.cc:
727         Likewise.
728         * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
729         Likewise.
730         * testsuite/experimental/filesystem/operations/canonical.cc:
731         Likewise.
732         * testsuite/experimental/filesystem/operations/exists.cc:
733         Likewise.
734         * testsuite/experimental/filesystem/operations/is_empty.cc:
735         Likewise.
736         * testsuite/experimental/filesystem/operations/read_symlink.cc:
737         Likewise.
738         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
739         Likewise.
741 2022-07-01  Sebastian Huber  <sebastian.huber@embedded-brains.de>
743         * configure: Regnerate.
744         * configure.ac (newlib, *-rtems*): Enable TLS support for all RTEMS
745         targets except bfin, lm32, mips, moxie, or1k, and v850.
746         For all RTEMS targets, define HAVE_ALIGNED_ALLOC, HAVE_AT_QUICK_EXIT,
747         HAVE_LINK, HAVE_POLL, HAVE_QUICK_EXIT, HAVE_READLINK, HAVE_SETENV,
748         HAVE_SLEEP, HAVE_SOCKATMARK, HAVE_STRERROR_L, HAVE_SYMLINK,
749         HAVE_TRUNCATE, and HAVE_USLEEP.
750         * crossconfig.m4 (*-rtems*): Remove.
752 2022-06-30  Jonathan Wakely  <jwakely@redhat.com>
754         * include/bits/utility.h: Fix comment typos.
756 2022-06-30  Jonathan Wakely  <jwakely@redhat.com>
758         * src/c++17/fs_ops.cc (fs::temp_directory_path()): Include path
759         in exception.
760         (fs::temp_directory_path(error_code&)): Rearrange to more
761         closely match the structure of the first overload.
762         * src/filesystem/ops.cc (fs::temp_directory_path): Likewise.
763         * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
764         Check that exception contains the path.
765         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
766         Likewise.
768 2022-06-30  Jonathan Wakely  <jwakely@redhat.com>
770         PR libstdc++/88881
771         * src/filesystem/ops.cc (has_trailing_slash): New helper
772         function.
773         (fs::status): Strip trailing slashes.
774         (fs::symlink_status): Likewise.
775         * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
776         Clean the environment before each test and use TMP instead of
777         TMPDIR so the test passes on Windows.
779 2022-06-28  Jonathan Wakely  <jwakely@redhat.com>
781         * src/filesystem/dir-common.h (_Dir_base::_At_path):
782         Use char_type consistently for paths.
784 2022-06-28  Jonathan Wakely  <jwakely@redhat.com>
786         * src/c++17/fs_dir.cc (_Dir::dir_and_pathname):: Replace with
787         current() returning _At_path.
788         (_Dir::_Dir, _Dir::open_subdir, _Dir::do_unlink): Adjust.
789         * src/filesystem/dir-common.h (_Dir_base::_At_path): New class.
790         (_Dir_base::_Dir_Base, _Dir_base::openat): Use _At_path.
791         * src/filesystem/dir.cc (_Dir::dir_and_pathname): Replace with
792         current() returning _At_path.
793         (_Dir::_Dir, _Dir::open_subdir): Adjust.
795 2022-06-28  Jonathan Wakely  <jwakely@redhat.com>
797         * src/c++17/fs_dir.cc (_Dir::_Dir) [!_GLIBCXX_HAVE_OPENAT]:
798         Always store pathname if we don't have openat or unlinkat,
799         because the full path is needed to open sub-directories and
800         remove entries.
802 2022-06-28  Jonathan Wakely  <jwakely@redhat.com>
804         * testsuite/20_util/from_chars/4.cc: Only use log2 if C99 math
805         functions are available.
807 2022-06-27  Alexandre Oliva  <oliva@adacore.com>
809         * testsuite/20_util/to_chars/long_double.cc: Use cmath
810         long double overloads for nexttoward and ldexp.
812 2022-06-27  Alexandre Oliva  <oliva@adacore.com>
814         * testsuite/experimental/simd/standard_abi_usable.cc: Require
815         cmath support.
816         * testsuite/experimental/simd/standard_abi_usable_2.cc:
817         Likewise.
819 2022-06-27  Alexandre Oliva  <oliva@adacore.com>
821         * testsuite/26_numerics/complex/proj.cc: Skip test in the
822         circumstances in which the implementation of proj is known to
823         be broken.
825 2022-06-27  Alexandre Oliva  <oliva@adacore.com>
827         * src/c++17/fs_dir.cc (dir_and_pathname): Use dirfd if
828         _GLIBCXX_HAVE_OPENAT.
830 2022-06-27  Alexandre Oliva  <oliva@adacore.com>
832         * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc
833         (test06): Don't create symlinks when NO_SYMLINKS is defined.
835 2022-06-27  Alexandre Oliva  <oliva@adacore.com>
837         * testsuite/lib/dg-options.exp (add_options_for_net_ts):
838         Add -Wl,--gc-sections for RTEMS targets.
839         * testsuite/experimental/net/timer/waitable/dest.cc: Link-time
840         xfail on RTEMS.
841         * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
842         * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
843         Execution-time xfail on RTEMS.
844         * testsuite/experimental/net/internet/resolver/ops/reverse.cc:
845         Likewise.
847 2022-06-27  Jonathan Wakely  <jwakely@redhat.com>
849         * testsuite/ext/mt_allocator/22309_thread.cc: Include <string>.
851 2022-06-27  Joel Brobecker  <brobecker@adacore.com>
852             Jonathan Wakely  <jwakely@redhat.com>
854         * testsuite/util/testsuite_fs.h (__gnu_test::nonexistent_path):
855         Always include a counter in the filename returned.
857 2022-06-27  Jonathan Wakely  <jwakely@redhat.com>
859         * include/bits/move_only_function.h (_Never_valueless_alt):
860         Define partial specialization for std::move_only_function.
862 2022-06-27  Jonathan Wakely  <jwakely@redhat.com>
864         * include/std/variant (_Build_FUN::_S_fun): Define fallback case
865         as deleted.
866         (__accepted_index, _Extra_visit_slot_needed): Replace class
867         templates with variable templates.
869 2022-06-27  Jonathan Wakely  <jwakely@redhat.com>
871         * include/bits/fs_path.h (__is_path_iter_src): Replace class
872         template with variable template.
874 2022-06-27  Jonathan Wakely  <jwakely@redhat.com>
876         * include/bits/chrono.h (is_clock_v): Define to false.
877         (is_clock_v<T>): Define partial specialization for true cases.
878         (is_clock): Define in terms of is_clock_v.
880 2022-06-24  Xi Ruoyao  <xry111@xry111.site>
882         * scripts/extract_symvers.in: Use grep -E instead of egrep.
883         * scripts/run_doxygen: Likewise.
885 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
887         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for
888         openat.
889         * configure, config.h.in: Rebuilt.
890         * src/filesystem/dir-common.h (openat): Use ::openat if
891         _GLIBCXX_HAVE_OPENAT.
892         * src/filesystem/dir.cc (dir_and_pathname): Use dirfd if
893         _GLIBCXX_HAVE_OPENAT.
895 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
897         * testsuite/27_io/filesystem/operations/rename.cc: xfail on
898         rtems.
899         * testsuite/experimental/filesystem/operations/rename.cc:
900         Likewise.
902 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
904         * testsuite/util/testsuite_fs.h (NO_LAST_WRITE_TIME): Define
905         when appropriate.
906         * testsuite/lib/libstdc++.exp
907         (check_v3_target_fs_last_write_time): New.
908         * testsuite/lib/dg-options.exp (dg-require-target-fs-lwt):
909         New.
910         * testsuite/27_io/filesystem/operations/last_write_time.cc:
911         Skip the test if the features are unavailable.
912         * testsuite/experimental/filesystem/operations/last_write_time.cc:
913         Likewise.
915 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
917         * testsuite/util/testsuite_fs.h (NO_SPACE): Define if
918         appropriate.
919         * testsuite/lib/libstdc++.exp (check_v3_target_fs_space): New.
920         * testsuite/lib/dg-options.exp (dg-require-target-fs-space):
921         New.
922         * testsuite/27_io/filesystem/operations/space.cc: Require
923         target-fs-space.
924         * testsuite/experimental/filesystem/operations/space.cc:
925         Likewise.
927 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
929         * testsuite/util/testsuite_fs.h (NO_SYMLINKS): Define on
930         mingw and when create_symlink is a dummy.
931         * testsuite/27_io/filesystem/operations/symlink_status.cc:
932         Drop mingw xfail.
933         (test01, test02): Don't create symlinks when NO_SYMLINKS is
934         defined.
935         * testsuite/27_io/filesystem/operations/canonical.cc (test03):
936         Likewise.
937         * testsuite/27_io/filesystem/operations/copy.cc (test02):
938         Likewise.
939         * testsuite/27_io/filesystem/operations/create_directories.cc
940         (test04): Likewise.
941         * testsuite/27_io/filesystem/operations/create_directory.cc
942         (test01): Likewise.
943         * testsuite/27_io/filesystem/operations/permissions.cc
944         (test03, test04): Likewise.
945         * testsuite/27_io/filesystem/operations/remove.cc (test01):
946         Likewise.
947         * testsuite/27_io/filesystem/operations/remove_all.cc (test01):
948         Likewise.
949         * testsuite/27_io/filesystem/operations/rename.cc
950         (test_symlinks): Likewise.
951         * testsuite/27_io/filesystem/operations/weakly_canonical.cc
952         (test01): Likewise.
953         * testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
954         (test06): Likewise.
955         * testsuite/experimental/filesystem/operations/copy.cc
956         (test01): Likewise.
957         * testsuite/experimental/filesystem/operations/create_directories.cc
958         (test04): Likewise.
959         * testsuite/experimental/filesystem/operations/create_directory.cc
960         (test01): Likewise.
961         * testsuite/experimental/filesystem/operations/permissions.cc
962         (test03, test04): Likewise.
963         * testsuite/experimental/filesystem/operations/remove.cc
964         (test01): Likewise.
965         * testsuite/experimental/filesystem/operations/remove_all.cc
966         (test01): Likewise.
967         * testsuite/experimental/filesystem/operations/rename.cc
968         (test01): Likewise.
969         * testsuite/lib/libstdc++.exp
970         (v3_check_preprocessor_condition): Add optional inc parameter.
971         Add it to the test program after include bits/c++config.h.
972         (check_v3_target_fs_symlinks): New.
973         * testsuite/lib/dg-options.exp
974         (dg-require-target-fs-symlinks): New.
975         * testsuite/27_io/filesystem/operations/read_symlink.cc:
976         Replace mingw xfail with require target-fs-symlinks.
977         * testsuite/experimental/filesystem/operations/read_symlink.cc:
978         Likewise.
980 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
982         * testsuite/27_io/filesystem/operations/copy.cc (test02):
983         Select TO after creating FROM.
984         (test03, test04): Likewise.
985         * testsuite/experimental/filesystem/operations/copy.cc
986         (test02, test03, test04): Likewise.
988 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
990         * testsuite/30_threads/thread/native_handle/cancel.cc: Add an
991         explicit cancellation point in case sleep_for lacks one.
993 2022-06-24  Alexandre Oliva  <oliva@adacore.com>
995         * testsuite/lib/dg-options.exp (add_options_for_net_ts): Add
996         -lbsd for RTEMS targets.
998 2022-06-23  Jonathan Wakely  <jwakely@redhat.com>
1000         * testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
1001         rmdir to remove directories.
1002         * testsuite/experimental/filesystem/iterators/error_reporting.cc:
1003         Likewise.
1005 2022-06-23  Jonathan Wakely  <jwakely@redhat.com>
1007         * testsuite/26_numerics/random/random_device/entropy.cc: Use
1008         numeric_limits<unsigned>::digits.
1010 2022-06-22  Alexandre Oliva  <oliva@adacore.com>
1012         * libsupc++/eh_globals.cc [!_GLIBCXX_HAVE_TLS]
1013         (__eh_globals_init::~__eh_globals_init): Clear _S_init first.
1015 2022-06-22  Alexandre Oliva  <oliva@adacore.com>
1017         * testsuite/30_threads/this_thread/60421.cc (test02): Call
1018         sched_yield.
1020 2022-06-22  Alexandre Oliva  <oliva@adacore.com>
1022         * testsuite/20_util/to_chars/long_double.cc: Require cmath.
1024 2022-06-22  Alexandre Oliva  <oliva@adacore.com>
1026         * testsuite/23_containers/bitset/cons/dr1325-2.cc: Work around
1027         global struct bitset.
1028         * testsuite/23_containers/bitset/ext/15361.cc: Likewise.
1029         * testsuite/23_containers/bitset/input/1.cc: Likewise.
1030         * testsuite/23_containers/bitset/to_string/1.cc: Likewise.
1031         * testsuite/23_containers/bitset/to_string/dr396.cc: Likewise.
1033 2022-06-17  Jonathan Wakely  <jwakely@redhat.com>
1035         * testsuite/21_strings/basic_string/cons/char/105995.cc: Add
1036         missing #include.
1038 2022-06-16  Jonathan Wakely  <jwakely@redhat.com>
1040         PR libstdc++/105995
1041         * include/bits/basic_string.h (_M_use_local_data): Initialize
1042         the entire SSO buffer.
1043         * testsuite/21_strings/basic_string/cons/char/105995.cc: New test.
1045 2022-06-16  Jonathan Wakely  <jwakely@redhat.com>
1047         PR libstdc++/101482
1048         * include/ext/vstring.h (operator==): Always check lengths
1049         before comparing.
1051 2022-06-15  François Dumont  <fdumont@gcc.gnu.org>
1053         PR libstdc++/105717
1054         * include/bits/hashtable_policy.h (_ConvertToValueType): New.
1055         * include/bits/hashtable.h (_Hashtable<>::_M_insert_unique_aux): New.
1056         (_Hashtable<>::_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Use latters.
1057         (_Hashtable<>::_M_insert(_Arg&&, const _NodeGenerator&, false_type)): Likewise.
1058         (_Hashtable(_InputIterator, _InputIterator, size_type, const _Hash&, const _Equal&,
1059         const allocator_type&, true_type)): Use this.insert range.
1060         (_Hashtable(_InputIterator, _InputIterator, size_type, const _Hash&, const _Equal&,
1061         const allocator_type&, false_type)): Use _M_insert.
1062         * testsuite/23_containers/unordered_map/cons/56112.cc: Check how many times conversion
1063         is done.
1064         * testsuite/23_containers/unordered_map/insert/105717.cc: New test.
1065         * testsuite/23_containers/unordered_set/insert/105717.cc: New test.
1067 2022-06-14  Jonathan Wakely  <jwakely@redhat.com>
1069         PR libstdc++/62187
1070         * include/bits/basic_string.h (operator==): Always compare
1071         lengths before checking string contents.
1072         [!__cpp_lib_three_way_comparison] (operator==, operator!=):
1073         Reorder arguments.
1075 2022-06-14  Jonathan Wakely  <jwakely@redhat.com>
1077         PR libstdc++/59048
1078         * include/bits/basic_string.h (compare): Define inline.
1079         * include/bits/basic_string.tcc (compare): Remove out-of-line
1080         definitions.
1081         * include/bits/cow_string.h (compare): Define inline.
1082         * testsuite/21_strings/basic_string/operations/compare/char/3.cc:
1083         New test.
1085 2022-06-14  Jonathan Wakely  <jwakely@redhat.com>
1087         * include/bits/new_allocator.h: Fix indentation.
1088         * include/ext/malloc_allocator.h: Likewise.
1090 2022-06-14  Jonathan Wakely  <jwakely@redhat.com>
1092         PR libstdc++/105957
1093         * include/bits/allocator.h (allocator::allocate): Check for
1094         overflow in constexpr allocation.
1095         * testsuite/20_util/allocator/105975.cc: New test.
1097 2022-06-13  Mark Mentovai  <mark@mentovai.com>
1099         * include/experimental/bits/fs_path.h (__detail::__null_terminated):
1100         Rename to __nul_terminated to avoid colliding with a macro in
1101         Apple's SDK.
1103 2022-06-13  Jonathan Wakely  <jwakely@redhat.com>
1105         * include/std/atomic (__atomic_val_t): Use __type_identity_t
1106         instead of atomic<T>::value_type, as per LWG 3220.
1107         * testsuite/29_atomics/atomic/lwg3220.cc: New test.
1109 2022-06-10  Jonathan Wakely  <jwakely@redhat.com>
1111         PR libstdc++/105844
1112         * include/experimental/numeric (experimental::gcd): Simplify
1113         assertions. Use __abs_r instead of __absu.
1114         (experimental::lcm): Likewise. Remove use of __detail::__lcm so
1115         overflow can be detected.
1116         * include/std/numeric (__detail::__absu): Rename to __abs_r and
1117         change to allow signed result type, so overflow can be detected.
1118         (__detail::__lcm): Remove.
1119         (gcd): Simplify assertions. Use __abs_r instead of __absu.
1120         (lcm): Likewise. Remove use of __detail::__lcm so overflow can
1121         be detected.
1122         * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
1123         * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1124         * testsuite/26_numerics/gcd/105844.cc: New test.
1125         * testsuite/26_numerics/lcm/105844.cc: New test.
1127 2022-06-10  Jonathan Wakely  <jwakely@redhat.com>
1129         PR libstdc++/105880
1130         * libsupc++/eh_globals.cc (eh_globals): Ensure constant init and
1131         prevent destruction during termination.
1132         (__eh_globals_init::_M_init): Replace with static member _S_init.
1133         (__cxxabiv1::__cxa_get_globals_fast): Update.
1134         (__cxxabiv1::__cxa_get_globals): Likewise.
1136 2022-06-10  Jonathan Wakely  <jwakely@redhat.com>
1138         * include/bits/basic_string.h (__hash_str_base): New class
1139         template.
1140         (hash<basic_string<C, char_traits<C>, A>>): Define partial
1141         specialization for each of the standard character types.
1142         (hash<string>, hash<wstring>, hash<u8string>, hash<u16string>)
1143         (hash<u32string>): Remove explicit specializations.
1144         * include/std/string (__hash_string_base): Remove class
1145         template.
1146         (hash<pmr::string>, hash<pmr::wstring>, hash<pmr::u8string>)
1147         (hash<pmr::u16string>, hash<pmr::u32string>): Remove explicit
1148         specializations.
1149         * testsuite/21_strings/basic_string/hash/hash.cc: Test with
1150         custom allocators.
1151         * testsuite/21_strings/basic_string/hash/hash_char8_t.cc:
1152         Likewise.
1154 2022-05-27  Jonathan Wakely  <jwakely@redhat.com>
1156         PR libstdc++/105671
1157         * include/std/sstream (basic_stringbuf::_M_high_mark): Add
1158         always_inline attribute.
1160 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
1162         PR libstdc++/105681
1163         * include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:
1164         Limit ga_sizes array to values that fit in size_t.
1165         * include/ext/random [__SIZE_WIDTH < 32] (sfmt86243)
1166         (sfmt86243_64, sfmt132049, sfmt132049_64, sfmt216091)
1167         (sfmt216091_64): Do not declare.
1169 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
1171         * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Make
1172         lookup for ios_errc and future_errc check versioned namespace.
1173         (StdAtomicPrinter): Strip versioned namespace from typename.
1175 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
1177         * src/c++11/Makefile.am: Add new source file.
1178         * src/c++11/Makefile.in: Regenerate.
1179         * src/c++11/cxx11-ios_failure.cc (iostream_category):
1180         Move to ...
1181         * src/c++11/ios_errcat.cc: New file.
1182         * testsuite/27_io/ios_base/failure/error_code.cc: Check that
1183         std::iostream_category() is defined and used for std::io_errc.
1185 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
1187         * include/bits/stl_iterator.h (counted_iterator::operator++(int)):
1188         Add 'constexpr' as per LWG 3643.
1189         * testsuite/24_iterators/counted_iterator/lwg3643.cc: New test.
1191 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
1193         * include/bits/functional_hash.h (__is_fast_hash): Add doxygen
1194         comment.
1195         * include/bits/hashtable.h: Do not include <bits/stl_function.h>
1196         here.
1197         * include/bits/hashtable_policy.h: Include <bits/stl_pair.h> and
1198         <bits/functional_hash.h>.
1199         * include/bits/unordered_map.h: Include required headers.
1200         * include/bits/unordered_set.h: Likewise.
1201         * include/std/unordered_map: Do not include headers for indirect
1202         dependencies.
1203         * include/std/unordered_set: Likewise.
1205 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
1207         * include/bits/ranges_algobase.h: Do not include
1208         <bits/stl_iterator_base_types.h>.
1209         * include/std/string: Likewise.
1210         * include/std/variant: Likewise.
1212 2022-05-26  Nathan Sidwell  <nathan@acm.org>
1214         * include/bits/hashtable.h: Include required headers.
1215         * include/bits/hashtable_policy.h: Likewise.
1216         * include/bits/stl_heap.h: Likewise.
1217         * include/bits/stl_iterator_base_funcs.h: Likewise.
1219 2022-05-26  François Dumont  <fdumont@gcc.gnu.org>
1221         * python/libstdcxx/v6/printers.py (StdSpanPrinter.__init__):
1222         Strip typename from version namespace.
1224 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
1226         * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Strip
1227         versioned namespace from the template argument too.
1229 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
1231         * testsuite/21_strings/basic_string/modifiers/pop_back/char/1.cc:
1232         Moved to...
1233         * testsuite/21_strings/basic_string/modifiers/pop_back/char.cc:
1234         ...here.
1235         * testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t/1.cc:
1236         Moved to...
1237         * testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t.cc:
1238         ...here.
1239         * testsuite/21_strings/basic_string/modifiers/swap/wchar_t/constexpr.cc:
1240         Moved to...
1241         * testsuite/21_strings/basic_string/modifiers/swap/constexpr-wchar_t.cc:
1242         ...here.
1243         * testsuite/21_strings/basic_string/modifiers/swap/char/constexpr.cc:
1244         Moved to...
1245         * testsuite/21_strings/basic_string/modifiers/swap/constexpr.cc:
1246         ...here.
1247         * testsuite/21_strings/basic_string/operations/contains/char/1.cc:
1248         Moved to...
1249         * testsuite/21_strings/basic_string/operations/contains/char.cc:
1250         ...here.
1251         * testsuite/21_strings/basic_string/operations/contains/wchar_t/1.cc:
1252         Moved to...
1253         * testsuite/21_strings/basic_string/operations/contains/wchar_t.cc:
1254         ...here.
1255         * testsuite/21_strings/basic_string/operations/data/char/1.cc:
1256         Moved to...
1257         * testsuite/21_strings/basic_string/operations/data/char.cc:
1258         ...here.
1259         * testsuite/21_strings/basic_string/operations/data/wchar_t/1.cc:
1260         Moved to...
1261         * testsuite/21_strings/basic_string/operations/data/wchar_t.cc:
1262         ...here.
1263         * testsuite/21_strings/basic_string/operations/ends_with/char/1.cc:
1264         Moved to...
1265         * testsuite/21_strings/basic_string/operations/ends_with/char.cc:
1266         ...here.
1267         * testsuite/21_strings/basic_string/operations/ends_with/wchar_t/1.cc:
1268         Moved to...
1269         * testsuite/21_strings/basic_string/operations/ends_with/wchar_t.cc:
1270         ...here.
1271         * testsuite/21_strings/basic_string/operations/starts_with/char/1.cc:
1272         Moved to...
1273         * testsuite/21_strings/basic_string/operations/starts_with/char.cc:
1274         ...here.
1275         * testsuite/21_strings/basic_string/operations/starts_with/wchar_t/1.cc:
1276         Moved to...
1277         * testsuite/21_strings/basic_string/operations/starts_with/wchar_t.cc:
1278         ...here.
1279         * testsuite/21_strings/basic_string/operations/substr/char/1.cc:
1280         Moved to...
1281         * testsuite/21_strings/basic_string/operations/substr/char.cc:
1282         ...here.
1283         * testsuite/21_strings/basic_string/operations/substr/wchar_t/1.cc:
1284         Moved to...
1285         * testsuite/21_strings/basic_string/operations/substr/wchar_t.cc:
1286         ...here.
1287         * testsuite/21_strings/basic_string/range_access/char/1.cc:
1288         Moved to...
1289         * testsuite/21_strings/basic_string/range_access/char.cc:
1290         ...here.
1291         * testsuite/21_strings/basic_string/range_access/wchar_t/1.cc:
1292         Moved to...
1293         * testsuite/21_strings/basic_string/range_access/wchar_t.cc:
1294         ...here.
1295         * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
1296         Moved to...
1297         * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char.cc:
1298         ...here.
1299         * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
1300         Moved to...
1301         * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t.cc:
1302         ...here.
1303         * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
1304         Moved to...
1305         * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char.cc:
1306         ...here.
1307         * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
1308         Moved to...
1309         * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t.cc:
1310         ...here.
1311         * testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc:
1312         Moved to...
1313         * testsuite/21_strings/basic_string_view/modifiers/swap/char.cc:
1314         ...here.
1315         * testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc:
1316         Moved to...
1317         * testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t.cc:
1318         ...here.
1319         * testsuite/21_strings/basic_string_view/operations/contains/char/1.cc:
1320         Moved to...
1321         * testsuite/21_strings/basic_string_view/operations/contains/char.cc:
1322         ...here.
1323         * testsuite/21_strings/basic_string_view/operations/contains/wchar_t/1.cc:
1324         Moved to...
1325         * testsuite/21_strings/basic_string_view/operations/contains/wchar_t.cc:
1326         ...here.
1327         * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
1328         Moved to...
1329         * testsuite/21_strings/basic_string_view/operations/data/char.cc:
1330         ...here.
1331         * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
1332         Moved to...
1333         * testsuite/21_strings/basic_string_view/operations/data/wchar_t.cc:
1334         ...here.
1335         * testsuite/21_strings/basic_string_view/operations/ends_with/char/1.cc:
1336         Moved to...
1337         * testsuite/21_strings/basic_string_view/operations/ends_with/char.cc:
1338         ...here.
1339         * testsuite/21_strings/basic_string_view/operations/ends_with/wchar_t/1.cc:
1340         Moved to...
1341         * testsuite/21_strings/basic_string_view/operations/ends_with/wchar_t.cc:
1342         ...here.
1343         * testsuite/21_strings/basic_string_view/operations/starts_with/char/1.cc:
1344         Moved to...
1345         * testsuite/21_strings/basic_string_view/operations/starts_with/char.cc:
1346         ...here.
1347         * testsuite/21_strings/basic_string_view/operations/starts_with/wchar_t/1.cc:
1348         Moved to...
1349         * testsuite/21_strings/basic_string_view/operations/starts_with/wchar_t.cc:
1350         ...here.
1351         * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
1352         Moved to...
1353         * testsuite/21_strings/basic_string_view/operations/substr/char.cc:
1354         ...here.
1355         * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
1356         Moved to...
1357         * testsuite/21_strings/basic_string_view/operations/substr/wchar_t.cc:
1358         ...here.
1359         * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
1360         Moved to...
1361         * testsuite/21_strings/basic_string_view/range_access/char.cc:
1362         ...here.
1363         * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
1364         Moved to...
1365         * testsuite/21_strings/basic_string_view/range_access/wchar_t.cc:
1366         ...here.
1367         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char/1.cc:
1368         Moved to...
1369         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char.cc:
1370         ...here.
1371         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t/1.cc:
1372         Moved to...
1373         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t.cc:
1374         ...here.
1375         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t/1.cc:
1376         Moved to...
1377         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t.cc:
1378         ...here.
1379         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char8_t/1.cc:
1380         Moved to...
1381         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char8_t.cc:
1382         ...here.
1383         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/1.cc:
1384         Moved to...
1385         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/int.cc:
1386         ...here.
1387         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t/1.cc:
1388         Moved to...
1389         * testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t.cc:
1390         ...here.
1391         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
1392         Moved to...
1393         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char.cc:
1394         ...here.
1395         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
1396         Moved to...
1397         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t.cc:
1398         ...here.
1399         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
1400         Moved to...
1401         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t.cc:
1402         ...here.
1403         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
1404         Moved to...
1405         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t.cc:
1406         ...here.
1407         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
1408         Moved to...
1409         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/int.cc:
1410         ...here.
1411         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
1412         Moved to...
1413         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t.cc:
1414         ...here.
1415         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char/1.cc:
1416         Moved to...
1417         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char.cc:
1418         ...here.
1419         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char16_t/1.cc:
1420         Moved to...
1421         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char16_t.cc:
1422         ...here.
1423         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char32_t/1.cc:
1424         Moved to...
1425         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char32_t.cc:
1426         ...here.
1427         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char8_t/1.cc:
1428         Moved to...
1429         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char8_t.cc:
1430         ...here.
1431         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/short/1.cc:
1432         Moved to...
1433         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/short.cc:
1434         ...here.
1435         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/wchar_t/1.cc:
1436         Moved to...
1437         * testsuite/21_strings/char_traits/requirements/explicit_instantiation/wchar_t.cc:
1438         ...here.
1440 2022-05-26  Jonathan Wakely  <jwakely@redhat.com>
1442         * testsuite/20_util/duration/requirements/explicit_instantiation/explicit_instantiation.cc:
1443         Moved to...
1444         * testsuite/20_util/duration/requirements/explicit_instantiation.cc: ...here.
1445         * testsuite/20_util/time_point/requirements/explicit_instantiation/explicit_instantiation.cc:
1446         Moved to...
1447         * testsuite/20_util/time_point/requirements/explicit_instantiation.cc: ...here.
1448         * testsuite/20_util/unique_ptr/requirements/explicit_instantiation/explicit_instantiation.cc:
1449         Moved to...
1450         * testsuite/20_util/unique_ptr/requirements/explicit_instantiation.cc: ...here.
1452 2022-05-25  Jason Merrill  <jason@redhat.com>
1454         * testsuite/20_util/function_objects/constexpr_searcher.cc: Add
1455         constexpr.
1457 2022-05-20  Jonathan Wakely  <jwakely@redhat.com>
1459         * testsuite/26_numerics/random/bernoulli_distribution/operators/values.cc:
1460         Run fewer iterations for simulator targets.
1461         * testsuite/26_numerics/random/binomial_distribution/operators/values.cc:
1462         Likewise.
1463         * testsuite/26_numerics/random/discrete_distribution/operators/values.cc:
1464         Likewise.
1465         * testsuite/26_numerics/random/geometric_distribution/operators/values.cc:
1466         Likewise.
1467         * testsuite/26_numerics/random/negative_binomial_distribution/operators/values.cc:
1468         Likewise.
1469         * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1470         Likewise.
1471         * testsuite/26_numerics/random/uniform_int_distribution/operators/values.cc:
1472         Likewise.
1474 2022-05-19  Jonathan Wakely  <jwakely@redhat.com>
1476         * include/bits/char_traits.h: Only include <cstdint> when
1477         necessary.
1478         * include/std/stacktrace: Use __UINTPTR_TYPE__ instead of
1479         uintptr_t.
1480         * src/c++11/cow-stdexcept.cc: Include <stdint.h>.
1481         * src/c++17/floating_to_chars.cc: Likewise.
1482         * testsuite/20_util/assume_aligned/1.cc: Include <cstdint>.
1483         * testsuite/20_util/assume_aligned/3.cc: Likewise.
1484         * testsuite/20_util/shared_ptr/creation/array.cc: Likewise.
1486 2022-05-19  Jonathan Wakely  <jwakely@redhat.com>
1488         * include/bits/basic_string.h: Do not include <ext/atomicity.h>
1489         here.
1490         * include/bits/cow_string.h: Include it here.
1492 2022-05-19  Jonathan Wakely  <jwakely@redhat.com>
1494         * include/Makefile.am: Add new header.
1495         * include/Makefile.in: Regenerate.
1496         * include/bits/memory_resource.h: New file.
1497         * include/std/deque: Include <bits/memory_resource.h>.
1498         * include/std/forward_list: Likewise.
1499         * include/std/list: Likewise.
1500         * include/std/map: Likewise.
1501         * include/std/memory_resource (pmr::memory_resource): Move to
1502         new <bits/memory_resource.h> header.
1503         (pmr::polymorphic_allocator): Likewise.
1504         * include/std/regex: Likewise.
1505         * include/std/set: Likewise.
1506         * include/std/stacktrace: Likewise.
1507         * include/std/string: Likewise.
1508         * include/std/unordered_map: Likewise.
1509         * include/std/unordered_set: Likewise.
1510         * include/std/vector: Likewise.
1511         * testsuite/21_strings/basic_string/types/pmr_typedefs.cc:
1512         Remove <memory_resource> header and check construction.
1513         * testsuite/23_containers/deque/types/pmr_typedefs.cc: Likewise.
1514         * testsuite/23_containers/forward_list/pmr_typedefs.cc:
1515         Likewise.
1516         * testsuite/23_containers/list/pmr_typedefs.cc: Likewise.
1517         * testsuite/23_containers/map/pmr_typedefs.cc: Likewise.
1518         * testsuite/23_containers/multimap/pmr_typedefs.cc: Likewise.
1519         * testsuite/23_containers/multiset/pmr_typedefs.cc: Likewise.
1520         * testsuite/23_containers/set/pmr_typedefs.cc: Likewise.
1521         * testsuite/23_containers/unordered_map/pmr_typedefs.cc:
1522         Likewise.
1523         * testsuite/23_containers/unordered_multimap/pmr_typedefs.cc:
1524         Likewise.
1525         * testsuite/23_containers/unordered_multiset/pmr_typedefs.cc:
1526         Likewise.
1527         * testsuite/23_containers/unordered_set/pmr_typedefs.cc:
1528         Likewise.
1529         * testsuite/23_containers/vector/pmr_typedefs.cc: Likewise.
1530         * testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
1532 2022-05-19  Jonathan Wakely  <jwakely@redhat.com>
1534         * include/std/memory_resource (polymorphic_allocator): Add
1535         non-template equality operator, as proposed for LWG 3683.
1536         * testsuite/20_util/polymorphic_allocator/lwg3683.cc: New test.
1538 2022-05-17  Jonathan Wakely  <jwakely@redhat.com>
1540         * src/c++17/memory_resource.cc (set_default_resource): Use
1541         memory_order_acq_rel.
1542         (get_default_resource): Use memory_order_acquire.
1544 2022-05-17  Jonathan Wakely  <jwakely@redhat.com>
1546         * include/std/memory_resource (new_delete_resource): Add
1547         nodiscard, returns_nonnull and const attributes.
1548         (null_memory_resource): Likewise.
1549         (set_default_resource, get_default_resource): Add returns_nonnull
1550         attribute.
1551         (memory_resource::is_equal): Add nodiscard attribute.
1552         (operator==, operator!=): Likewise.
1554 2022-05-17  Jonathan Wakely  <jwakely@redhat.com>
1556         * include/bits/ios_base.h (io_category): Add const and nodiscard
1557         attributes.
1558         (make_error_code, make_error_condition): Add nodiscard.
1559         * include/std/future (future_category): Add const and nodiscard.
1560         (make_error_code, make_error_condition): Add nodiscard.
1561         * include/std/system_error (generic_category system_category):
1562         Add nodiscard. Replace _GLIBCXX_CONST with C++11 attribute.
1563         (error_code::value, error_code::category, error_code::operator bool)
1564         (error_condition::value, error_condition::category)
1565         (error_condition::operator bool, make_error_code)
1566         (make_error_condition, operator==, operator!=, operator<=>): Add
1567         nodiscard.
1569 2022-05-17  Jonathan Wakely  <jwakely@redhat.com>
1571         * testsuite/20_util/expected/synopsis.cc: Skip for versioned
1572         namespace.
1573         * testsuite/27_io/headers/iosfwd/synopsis.cc: Likewise.
1575 2022-05-17  Jonathan Wakely  <jwakely@redhat.com>
1577         * src/Makefile.am [ENABLE_SYMVERS_GNU_NAMESPACE] (cxx11_sources):
1578         Do not build the compatibility*-c++0x.cc objects.
1579         * src/Makefile.in: Regenerate.
1580         * src/c++11/compatibility-c++0x.cc [_GLIBCXX_INLINE_VERSION]:
1581         Refuse to build for the versioned namespace.
1582         * src/c++11/compatibility-chrono.cc: Likewise.
1583         * src/c++11/compatibility-condvar.cc: Likewise.
1584         * src/c++11/compatibility-thread-c++0x.cc: Likewise.
1585         * src/c++11/chrono.cc (system_clock, steady_clock):
1586         Use macros to define in inline namespace _V2, matching the
1587         declarations in <system_error>.
1588         * src/c++11/system_error.cc (system_category, generic_category):
1589         Likewise.
1591 2022-05-16  Jonathan Wakely  <jwakely@redhat.com>
1593         * doc/xml/manual/prerequisites.xml: Fix attributes for external
1594         hyperlink.
1595         * doc/html/manual/setup.html: Regenerate.
1597 2022-05-16  Jonathan Wakely  <jwakely@redhat.com>
1599         * doc/xml/manual/status_cxx2023.xml: Update with gcc-12 support.
1600         * doc/html/*: Regenerate.
1602 2022-05-16  Jonathan Wakely  <jwakely@redhat.com>
1604         * doc/xml/manual/intro.xml: Include new chapter.
1605         * doc/xml/manual/status_cxx2020.xml: Tweak release numbers.
1606         * doc/xml/manual/status_cxx2023.xml: New file.
1607         * doc/html/*: Regenerate.
1609 2022-05-16  Jonathan Wakely  <jwakely@redhat.com>
1611         * doc/html/manual/status.html: Regenerate.
1612         * doc/xml/manual/status_cxx2020.xml: Fix supported version for
1613         C++20 bit operations.
1615 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1617         * include/bits/std_thread.h (thread::_State, thread::_State_ptr):
1618         Declare as private unless _GLIBCXX_THREAD_IMPL is defined.
1619         * src/c++11/thread.cc (_GLIBCXX_THREAD_IMPL): Define.
1621 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1623         * include/std/future (launch): Make operators noexcept.
1625 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1627         * doc/doxygen/user.cfg.in (PREDEFINED): Replace __exception_ptr
1628         with "__unspecified__".
1629         * libsupc++/exception_ptr.h: Improve doxygen docs.
1630         (__exception_ptr::swap): Also declare in namespace std.
1632 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1634         * libsupc++/nested_exception.h (throw_with_nested) [C++17]: Use
1635         if-constexpr instead of tag dispatching.
1636         (rethrow_if_nested) [C++17]: Likewise.
1637         (rethrow_if_nested) [!__cpp_rtti]: Do not use dynamic_cast if it
1638         would require RTTI.
1639         * testsuite/18_support/nested_exception/rethrow_if_nested-term.cc:
1640         New test.
1642 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1644         * doc/doxygen/user.cfg.in (PREDEFINED): Define
1645         _GTHREAD_USE_MUTEX_TIMEDLOCK macro.
1646         * include/bits/std_mutex.h (mutex, lock_guard): Use @since and
1647         @headerfile.
1648         * include/bits/unique_lock.h (unique_lock): Likewise.
1649         * include/std/mutex (recursive_mutex, timed_mutex)
1650         (recursive_timed_mutex, scoped_lock): Likewise.
1652 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1654         * doc/doxygen/user.cfg.in (PREDEFINED): Define
1655         _GLIBCXX23_CONSTEXPR macro.
1656         * include/backward/auto_ptr.h (auto_ptr): Use @deprecated.
1657         * include/bits/unique_ptr.h (default_delete): Use @since and
1658         @headerfile.
1659         * include/std/scoped_allocator: Remove @ingroup from @file
1660         block.
1662 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1664         * include/bits/std_thread.h (thread, thread::id): Improve
1665         doxygen docs.
1666         * include/std/future: Likewise.
1667         * include/std/thread (jthread): Likewise.
1669 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1671         * include/bits/ostream_insert.h: Mark helper functions as
1672         undocumented by Doxygen.
1673         * include/bits/stl_algo.h: Use markdown for formatting and mark
1674         helper functions as undocumented.
1675         * include/bits/stl_numeric.h:  Likewise.
1676         * include/bits/stl_pair.h (pair): Add @headerfile.
1678 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1680         * doc/doxygen/user.cfg.in (PREDEFINED): Define __allocator_base
1681         so that Doxygen shows the right base-class for std::allocator.
1682         * include/bits/alloc_traits.h: Improve doxygen docs.
1683         * include/bits/allocator.h: Likewise.
1684         * include/bits/new_allocator.h: Likewise.
1685         * include/ext/new_allocator.h: Likewise.
1687 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1689         * doc/doxygen/user.cfg.in (PREDEFINED): Define macro
1690         _GLIBCXX_DOXYGEN_ONLY to expand its argument.
1691         * include/bits/c++config (_GLIBCXX_DOXYGEN_ONLY): Define.
1692         * include/bits/regex.h: Improve doxygen docs.
1693         * include/bits/regex_constants.h: Likewise.
1694         * include/bits/regex_error.h: Likewise.
1696 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1698         * include/std/atomic: Suppress doxygen docs for
1699         implementation details.
1700         * include/bits/atomic_base.h: Likewise.
1701         * include/bits/shared_ptr_atomic.h: Use markdown. Fix grouping
1702         so that std::atomic is not added to the pointer abstractions
1703         group.
1705 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1707         * include/std/system_error: Improve doxygen comments.
1709 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1711         * include/bits/ptr_traits.h: Add some doxygen comments.
1713 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1715         * doc/doxygen/user.cfg.in (PREDEFINED): Expand new macros to
1716         nothing.
1717         * include/bits/c++config (_GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE)
1718         (_GLIBCXX_END_INLINE_ABI_NAMESPACE): Define new macros.
1719         * include/bits/algorithmfwd.h (_V2::__rotate): Use new macros
1720         for the namespace.
1721         * include/bits/chrono.h (chrono::_V2::system_clock): Likewise.
1722         * include/bits/stl_algo.h (_V2::__rotate): Likewise.
1723         * include/std/condition_variable (_V2::condition_variable_any):
1724         Likewise.
1725         * include/std/system_error (_V2::error_category): Likewise.
1727 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1729         * include/bits/mofunc_impl.h: Fix doxygen command.
1731 2022-05-13  Jonathan Wakely  <jwakely@redhat.com>
1733         * doc/doxygen/user.cfg.in (GROUP_NESTED_COMPOUNDS): Set to NO.
1734         (CLASS_DIAGRAMS): Remove obsolete option.
1736 2022-05-12  Jonathan Wakely  <jwakely@redhat.com>
1738         * config/locale/dragonfly/numeric_members.cc: Remove whitespace.
1739         * config/locale/gnu/numeric_members.cc: Likewise.
1740         * include/bits/locale_facets_nonio.h: Likewise.
1741         * libsupc++/typeinfo: Likewise.
1743 2022-05-10  Jonathan Wakely  <jwakely@redhat.com>
1745         PR libstdc++/105284
1746         * include/std/iosfwd: Add declarations for <spanstream> class
1747         templates and typedefs.
1748         * include/std/spanstream (basic_spanbuf, basic_ispanstream)
1749         (basic_ospanstream, basic_spanstream): Remove default template
1750         arguments.
1751         * testsuite/27_io/headers/iosfwd/synopsis.cc: Add <spanstream>
1752         declarations.
1753         * testsuite/27_io/headers/iosfwd/types.cc: Check <spanstream>
1754         default arguments.
1756 2022-05-10  Jonathan Wakely  <jwakely@redhat.com>
1758         PR libstdc++/105284
1759         * include/std/iosfwd: Add declarations for <synstream> class
1760         templates and typedefs.
1761         * include/std/syncstream (basic_syncbuf, basic_osyncstream):
1762         Remove default template arguments.
1763         * testsuite/27_io/headers/iosfwd/synopsis.cc: New test.
1764         * testsuite/27_io/headers/iosfwd/types.cc: New test.
1766 2022-05-06  Jonathan Wakely  <jwakely@redhat.com>
1768         * include/bits/random.tcc (operator==): Only check
1769         normal_distribution::_M_saved_available once.
1770         * testsuite/26_numerics/random/normal_distribution/operators/equal.cc:
1771         Check equality after state changes.
1772         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
1773         lineno.
1775 2022-05-06  Jonathan Wakely  <jwakely@redhat.com>
1777         PR libstdc++/105502
1778         * include/bits/random.tcc
1779         (operator>>(basic_istream<C,T>&, normal_distribution<R>&)):
1780         Update state when __state_avail is false.
1781         * testsuite/26_numerics/random/normal_distribution/operators/serialize.cc:
1782         Check that deserialized object equals serialized one.
1784 2022-05-06  Alexandre Oliva  <oliva@adacore.com>
1786         * include/experimental/bits/simd.h [__ALTIVEC__]: Require VSX
1787         for double, long long, and 64-bit long intrinsic types.
1788         [__ALTIVEC__] (__intrinsic_type): Mention 128-bit in
1789         preexisting long double diagnostic, adjust no-VSX double
1790         diagnostic to cover 64-bit long double as well.
1792 2022-05-06  Jonathan Wakely  <jwakely@redhat.com>
1794         PR libstdc++/104731
1795         * testsuite/27_io/filesystem/iterators/error_reporting.cc:
1796         Use a trailing char array as storage for dirent::d_name.
1798 2022-05-06  Jonathan Wakely  <jwakely@redhat.com>
1800         * include/std/stacktrace: Do not include <cxxabi.h>.
1801         (__cxa_demangle): Declare.
1803 2022-05-06  Jonathan Wakely  <jwakely@redhat.com>
1805         PR libstdc++/99871
1806         * include/bits/specfun.h: Use visibility attribute on namespace,
1807         instead of pragma push/pop.
1808         * libsupc++/compare: Likewise.
1809         * libsupc++/exception: Likewise.
1810         * libsupc++/exception.h: Likewise.
1811         * libsupc++/exception_ptr.h: Likewise.
1812         * libsupc++/initializer_list: Likewise.
1813         * libsupc++/nested_exception.h: Likewise.
1815 2022-05-06  Jonathan Wakely  <jwakely@redhat.com>
1817         * doc/xml/manual/test.xml: Remove requirement for copyright and
1818         GPL notice in tests.
1819         * doc/html/manual/test.html: Regenerate.
1821 2022-05-05  Jonathan Wakely  <jwakely@redhat.com>
1823         * include/experimental/memory_resource [!__cpp_rtti]
1824         (__resource_adaptor_imp::do_is_equal): Do not use dynamic_cast
1825         when RTTI is disabled.
1826         * testsuite/17_intro/freestanding.cc: Require RTTI.
1827         * testsuite/18_support/exception/38732.cc: Likewise.
1828         * testsuite/18_support/exception_ptr/rethrow_exception.cc:
1829         Likewise.
1830         * testsuite/18_support/nested_exception/68139.cc: Likewise.
1831         * testsuite/18_support/nested_exception/rethrow_if_nested.cc:
1832         Likewise.
1833         * testsuite/18_support/type_info/103240.cc: Likewise.
1834         * testsuite/18_support/type_info/fundamental.cc: Likewise.
1835         * testsuite/18_support/type_info/hash_code.cc: Likewise.
1836         * testsuite/20_util/any/assign/emplace.cc: Likewise.
1837         * testsuite/20_util/any/cons/in_place.cc: Likewise.
1838         * testsuite/20_util/any/misc/any_cast.cc: Likewise.
1839         * testsuite/20_util/any/observers/type.cc: Likewise.
1840         * testsuite/20_util/function/1.cc: Likewise.
1841         * testsuite/20_util/function/2.cc: Likewise.
1842         * testsuite/20_util/function/3.cc: Likewise.
1843         * testsuite/20_util/function/4.cc: Likewise.
1844         * testsuite/20_util/function/5.cc: Likewise.
1845         * testsuite/20_util/function/6.cc: Likewise.
1846         * testsuite/20_util/function/7.cc: Likewise.
1847         * testsuite/20_util/function/8.cc: Likewise.
1848         * testsuite/20_util/polymorphic_allocator/resource.cc: Likewise.
1849         * testsuite/20_util/shared_ptr/casts/1.cc: Likewise.
1850         * testsuite/20_util/shared_ptr/casts/rval.cc: Likewise.
1851         * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc:
1852         Likewise.
1853         * testsuite/20_util/shared_ptr/misc/get_deleter.cc: Likewise.
1854         * testsuite/20_util/typeindex/comparison_operators.cc: Likewise.
1855         * testsuite/20_util/typeindex/comparison_operators_c++20.cc:
1856         Likewise.
1857         * testsuite/20_util/typeindex/hash.cc: Likewise.
1858         * testsuite/20_util/typeindex/hash_code.cc: Likewise.
1859         * testsuite/20_util/typeindex/name.cc: Likewise.
1860         * testsuite/22_locale/ctype/is/string/89728_neg.cc: Likewise.
1861         * testsuite/22_locale/global_templates/standard_facet_hierarchies.cc:
1862         Likewise.
1863         * testsuite/22_locale/global_templates/user_facet_hierarchies.cc:
1864         Likewise.
1865         * testsuite/22_locale/locale/13630.cc: Check type without using
1866         RTTI.
1867         * testsuite/23_containers/array/requirements/non_default_constructible.cc:
1868         Require RTTI.
1869         * testsuite/27_io/basic_ostream/emit/1.cc: Likewise.
1870         * testsuite/27_io/fpos/14320-1.cc: Check type without using RTTI.
1871         * testsuite/27_io/fpos/mbstate_t/12065.cc: Require RTTI.
1872         * testsuite/27_io/ios_base/failure/dual_abi.cc: Likewise.
1873         * testsuite/experimental/any/misc/any_cast.cc: Likewise.
1874         * testsuite/experimental/any/observers/type.cc: Likewise.
1875         * testsuite/experimental/memory_resource/resource_adaptor.cc:
1876         Likewise.
1877         * testsuite/lib/libstdc++.exp (check_effective_target_rtti):
1878         Define new proc.
1879         * testsuite/tr1/3_function_objects/function/1.cc: Likewise.
1880         * testsuite/tr1/3_function_objects/function/2.cc: Likewise.
1881         * testsuite/tr1/3_function_objects/function/3.cc: Likewise.
1882         * testsuite/tr1/3_function_objects/function/4.cc: Likewise.
1883         * testsuite/tr1/3_function_objects/function/5.cc: Likewise.
1884         * testsuite/tr1/3_function_objects/function/6.cc: Likewise.
1885         * testsuite/tr1/3_function_objects/function/7.cc: Likewise.
1886         * testsuite/tr1/3_function_objects/function/8.cc: Likewise.
1887         * testsuite/tr2/bases/value.cc: Likewise.
1888         * testsuite/tr2/direct_bases/value.cc: Likewise.
1889         * testsuite/util/exception/safety.h [!__cpp_rtti]: Don't print
1890         types without RTTI.
1892 2022-05-04  Jonathan Wakely  <jwakely@redhat.com>
1894         PR libstdc++/104719
1895         * include/std/array (array::size(), array::max_size())
1896         (array::empty(), array::data()): Add  always_inline attribute.
1898 2022-05-04  Jonathan Wakely  <jwakely@redhat.com>
1900         PR libstdc++/104719
1901         * include/std/array (__array_traits::_S_ref): Remove.
1902         (__array_traits::_S_ptr): Remove.
1903         (__array_traits<T, 0>::_Type): Define operator[] and operator T*
1904         to provide an array-like API.
1905         (array::_AT_Type): Remove public typeef.
1906         (array::operator[], array::at, array::front, array::back): Use
1907         index operator to access _M_elems instead of _S_ref.
1908         (array::data): Use implicit conversion from _M_elems to pointer.
1909         (swap(array&, array&)): Use __enable_if_t helper.
1910         (get<I>): Use index operator to access _M_elems.
1911         * testsuite/23_containers/array/tuple_interface/get_neg.cc:
1912         Adjust dg-error line numbers.
1914 2022-05-03  Alexandre Oliva  <oliva@adacore.com>
1916         PR c++/105324
1917         * testsuite/20_util/from_chars/pr105324.cc: Guard test body
1918         with conditional for floating-point overloads of from_char.
1920 2022-05-02  Patrick Palka  <ppalka@redhat.com>
1922         PR libstdc++/103911
1923         * src/c++17/floating_from_chars.cc (find_end_of_float): Accept
1924         two delimeters for the exponent part in the form of a possibly
1925         NULL string of length two.  Don't use std::tolower.
1926         (pattern): Adjust calls to find_end_of_float accordingly.
1928 2022-05-02  Patrick Palka  <ppalka@redhat.com>
1930         PR libstdc++/105441
1931         * src/c++17/floating_from_chars.cc (__floating_from_chars_hex):
1932         Also accept 'P' as the start of the exponent.
1933         * testsuite/20_util/from_chars/7.cc: Add corresponding testcase.
1935 2022-04-29  Jonathan Wakely  <jwakely@redhat.com>
1937         PR libstdc++/105417
1938         * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt:
1939         Regenerate.
1940         * src/c++11/compatibility-ldbl-alt128.cc [_GLIBCXX_USE_DUAL_ABI]:
1941         Define __gnu_ieee128::num_get<C>::_M_extract_int[abi:cxx11]<I>
1942         symbols as aliases for corresponding symbols without abi-tag.
1944 2022-04-29  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1946         * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
1947         * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
1948         Likewise.
1949         * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
1950         * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
1951         Likewise.
1953 2022-04-28  Jonathan Wakely  <jwakely@redhat.com>
1955         PR libstdc++/99290
1956         * src/c++17/fs_ops.cc (fs::copy): Pass error_code to
1957         directory_iterator constructor, and check on each iteration.
1958         * src/filesystem/ops.cc (fs::copy): Likewise.
1959         * testsuite/27_io/filesystem/operations/copy.cc: Check for
1960         errors during recursion.
1961         * testsuite/experimental/filesystem/operations/copy.cc:
1962         Likewise.
1964 2022-04-28  François Dumont  <fdumont@gcc.gnu.org>
1966         * config/abi/pre/gnu-versioned-namespace.ver: Remove
1967         std::random_device::* pattern.
1969 2022-04-27  Jakub Jelinek  <jakub@redhat.com>
1971         * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1972         * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1973         * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1974         * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1975         * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1976         * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1977         * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1978         * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1980 2022-04-27  Jonathan Wakely  <jwakely@redhat.com>
1982         * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Add
1983         support for atomic<shared_ptr<T>> and atomic<weak_ptr<T>>.
1984         (StdAtomicPrinter): New printer.
1985         (build_libstdcxx_dictionary): Register new printer.
1986         * testsuite/libstdc++-prettyprinters/cxx11.cc: Test std::atomic.
1987         * testsuite/libstdc++-prettyprinters/cxx20.cc: Test atomic smart
1988         pointers.
1990 2022-04-26  Jonathan Wakely  <jwakely@redhat.com>
1992         * include/bits/shared_ptr_atomic.h (atomic<shared_ptr>): Add
1993         constructor for constant initialization from nullptr_t.
1994         * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
1995         Check for new constructor.
1997 2022-04-26  Jonathan Wakely  <jwakely@redhat.com>
1999         * include/bits/fs_path.h (hash<filesystem::path>): Define.
2000         * testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
2001         Check std::hash specialization.
2003 2022-04-25  Jonathan Wakely  <jwakely@redhat.com>
2005         * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define
2006         conditionally.
2007         * include/bits/unique_ptr.h (__cpp_lib_constexpr_memory):
2008         Define for C++23.
2009         (default_delete, default_delete<T[]>, __uniq_ptr_impl)
2010         (unique_ptr, unique_ptr<T[], D>): Add constexpr to all member
2011         functions.
2012         * include/std/version (__cpp_lib_constexpr_memory): Define new
2013         value for C++23.
2014         * testsuite/20_util/unique_ptr/assign/constexpr.cc: New test.
2015         * testsuite/20_util/unique_ptr/comparison/constexpr.cc: New test.
2016         * testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc: New test.
2017         * testsuite/20_util/unique_ptr/creation/constexpr.cc: New test.
2018         * testsuite/20_util/unique_ptr/modifiers/constexpr.cc: New test.
2019         * testsuite/20_util/unique_ptr/specialized_algorithms/constexpr.cc:
2020         New test.
2022 2022-04-25  Jonathan Wakely  <jwakely@redhat.com>
2024         PR libstdc++/105375
2025         * include/std/future (packaged_task): Add deduction guides.
2026         * testsuite/30_threads/packaged_task/cons/deduction.cc: New test.
2028 2022-04-25  Philipp Fent  <fent@in.tum.de>
2030         * python/libstdcxx/v6/printers.py (StdSpanPrinter._iterator):
2031         Rename as iterator.
2032         (StdInitializerListPrinter): Define new printer.
2033         (build_libstdcxx_dictionary): Register new printer.
2034         * testsuite/libstdc++-prettyprinters/cxx11.cc: Check printer for
2035         initializer_list.
2037 2022-04-22  Thomas W Rodgers  <trodgers@redhat.com>
2039         PR libstdc++/102994
2040         * include/bits/atomic_base.h (atomic_flag::notify_one,
2041         notify_all): Remove const qualification.
2042         (__atomic_base::notify_one, notify_all): Likewise.
2043         * include/std/atomic (atomic<bool>::notify_one, notify_all):
2044         Likewise.
2045         (atomic::notify_one, notify_all): Likewise.
2046         (atomic<T*>::notify_one, notify_all): Likewise.
2047         (atomic_notify_one, atomic_notify_all): Likewise.
2048         * testsuite/29_atomics/atomic/wait_notify/102994.cc: Adjust test
2049         to account for change in notify_one/notify_all signature.
2051 2022-04-21  Patrick Palka  <ppalka@redhat.com>
2053         * include/std/charconv (__from_chars_alnum_to_val_table):
2054         Simplify initialization of __lower/__upper_letters.
2055         (__from_chars_alnum_to_val): Default the template parameter to
2056         false.
2057         * src/c++17/floating_from_chars.cc (starts_with_ci): Don't
2058         assume the uppercase and lowercase letters are contiguous.
2059         (__floating_from_chars_hex): Likewise.
2061 2022-04-21  Patrick Palka  <ppalka@redhat.com>
2063         PR c++/105297
2064         PR c++/105322
2065         * include/std/charconv (__from_chars_alnum_to_val): Make
2066         initializer for __table dependent in an artificial way.
2068 2022-04-21  Jonathan Wakely  <jwakely@redhat.com>
2070         PR libstdc++/105324
2071         * src/c++17/floating_from_chars.cc (buffer_resource::do_allocate):
2072         Remove assertion.
2073         * testsuite/20_util/from_chars/pr105324.cc: New test.
2075 2022-04-20  Jonathan Wakely  <jwakely@redhat.com>
2077         * testsuite/21_strings/basic_string_view/operations/copy/char/constexpr.cc:
2078         Check correct feature test macro.
2080 2022-04-20  Jonathan Wakely  <jwakely@redhat.com>
2082         PR libstdc++/93602
2083         * doc/xml/manual/prerequisites.xml: Document libiconv
2084         workarounds.
2085         * doc/html/manual/setup.html: Regenerate.
2086         * src/Makefile.am (CXXLINK): Add $(LTLIBICONV).
2087         * src/Makefile.in: Regenerate.
2089 2022-04-19  Patrick Palka  <ppalka@redhat.com>
2091         * src/c++17/floating_to_chars.cc (_GLIBCXX_ASSERTIONS): Don't
2092         define.
2093         (__floating_to_chars_shortest): Add __builtin_unreachable calls to
2094         squelch false-positive -Wmaybe-uninitialized and -Wreturn-type
2095         warnings.
2096         (__floating_to_chars_precision): Likewise.
2098 2022-04-19  Philipp Fent  <fent@in.tum.de>
2100         * python/libstdcxx/v6/printers.py (StdSpanPrinter): Define.
2101         * testsuite/libstdc++-prettyprinters/cxx20.cc: Test it.
2103 2022-04-19  Jonathan Wakely  <jwakely@redhat.com>
2105         * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Fix shell operators.
2106         * configure: Regenerate.
2108 2022-04-18  Patrick Palka  <ppalka@redhat.com>
2110         * include/std/charconv (__from_chars_pow2_base): Manually
2111         unroll the first iteration of the main loop and simplify
2112         accordingly.
2114 2022-04-15  Patrick Palka  <ppalka@redhat.com>
2116         PR libstdc++/104858
2117         * include/bits/ranges_algo.h (__minmax_fn): Avoid dereferencing
2118         __first twice at the start.
2119         * testsuite/25_algorithms/minmax/constrained.cc (test06): New test.
2121 2022-04-15  Patrick Palka  <ppalka@redhat.com>
2123         * include/std/charconv (__from_chars_alnum_to_val_table): Define.
2124         (__from_chars_alnum_to_val): Define.
2125         (__from_chars_binary): Rename to ...
2126         (__from_chars_pow2_base): ... this.  Generalize to handle any
2127         power-of-two base using __from_chars_alnum_to_val.
2128         (__from_chars_digit): Optimize digit recognition to a single
2129         test instead of two tests.  Use [[__unlikely___]] attribute.
2130         (__from_chars_alpha_to_num): Remove.
2131         (__from_chars_alnum): Use __from_chars_alnum_to_val.  Use a
2132         nested loop for the overflow case.  Maintain a lower bound
2133         on the number of available bits in the result and use it to
2134         omit the overflow check.
2135         (from_chars): Adjust appropriately.
2136         * src/c++17/floating_from_chars.cc (ascii_to_hexit): Remove.
2137         (__floating_from_chars_hex): Use __from_chars_alnum_to_val
2138         to recognize a hex digit instead.
2140 2022-04-14  Palmer Dabbelt  <palmer@rivosinc.com>
2142         * acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Force auto to mutex
2143         for RISC-V.
2144         * configure: Regenerate.
2146 2022-04-14  Jonathan Wakely  <jwakely@redhat.com>
2148         * doc/xml/manual/intro.xml: Fix comment.
2150 2022-04-14  Jonathan Wakely  <jwakely@redhat.com>
2152         * include/precompiled/stdc++.h: Include <stacktrace> and
2153         <stdatomic.h> for C++23.
2155 2022-04-14  Jonathan Wakely  <jwakely@redhat.com>
2157         PR libstdc++/105269
2158         * include/bits/stl_vector.h (__cpp_lib_constexpr_vector):
2159         Define.
2160         * include/c_compatibility/stdatomic.h (__cpp_lib_stdatomic_h):
2161         Define.
2162         * include/std/optional (__cpp_lib_optional): Define new value
2163         for C++23.
2164         (__cpp_lib_monadic_optional): Remove.
2165         * include/std/version (__cpp_lib_constexpr_vector): Define.
2166         (__cpp_lib_stdatomic_h): Define.
2167         (__cpp_lib_optional): Define new value for C++23.
2168         (__cpp_lib_monadic_optional): Remove.
2169         * testsuite/20_util/optional/monadic/and_then.cc: Adjust.
2170         * testsuite/20_util/optional/requirements.cc: Adjust for C++23.
2171         * testsuite/20_util/optional/version.cc: Likewise.
2172         * testsuite/23_containers/vector/cons/constexpr.cc: Check
2173         feature test macro.
2174         * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc:
2175         Likewise.
2176         * testsuite/20_util/optional/monadic/version.cc: Removed.
2177         * testsuite/23_containers/vector/requirements/version.cc: New test.
2178         * testsuite/29_atomics/headers/stdatomic.h/version.cc: New test.
2180 2022-04-12  Jonathan Wakely  <jwakely@redhat.com>
2182         * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Check for mmap.
2183         * config.h.in: Regenerate.
2184         * configure: Regenerate.
2186 2022-04-12  Jonathan Wakely  <jwakely@redhat.com>
2188         * include/std/stacktrace (basic_stacktrace::current): Reallocate
2189         a smaller container if the unused capacity is larger than the
2190         used size.
2192 2022-04-12  Jonathan Wakely  <jwakely@redhat.com>
2194         * include/std/stacktrace (basic_stacktrace): Use _Impl::_M_clone
2195         or _Impl::_M_assign to initialize elements in allocated storage.
2196         (basic_stacktrace::_M_clear()): Use _Impl::_M_resize instead of
2197         _Impl::_M_destroy.
2198         (basic_stacktrace::_Impl::_M_destroy()): Replace with ...
2199         (basic_stacktrace::_Impl::_M_resize(size_type, allocator&)): New
2200         function.
2201         (basic_stacktrace::_Impl::_M_push_back): Use _M_xclone. Construct
2202         new element using allocator.
2203         (basic_stacktrace::_Impl::_M_clone): New function.
2204         (basic_stacktrace::_Impl::_M_xclone): New function.
2205         (basic_stacktrace::_Impl::_M_assign): New function.
2207 2022-04-12  Jonathan Wakely  <jwakely@redhat.com>
2209         * include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
2210         Use nothrow new instead of try block for std::allocator.
2211         (basic_stacktrace::_Impl::_M_deallocate): Use delete for
2212         std::allocator.
2214 2022-04-12  Jonathan Wakely  <jwakely@redhat.com>
2216         * include/std/stacktrace (basic_stacktrace::current): Replace
2217         calls to _M_reserve and _S_curr_cb with call to _M_prepare.
2218         Check return value of backtrace_simple when max depth given.
2219         (basic_stacktrace::_M_reserve): Remove.
2220         (basic_stacktrace::_S_curr_cb): Remove.
2221         (basic_stacktrace::_M_prepare(size_type)): New function to
2222         reserve initial capacity and return callback.
2223         (basic_stacktrace::_Impl::_M_allocate): Remove check for 0 < n
2224         and remove redundant zeroing of _M_frames and _M_capacity.
2225         (basic_stacktrace::_Impl::_M_push_back): Add [[unlikely]]
2226         attribute. Assign _Impl instead of swapping.
2227         * testsuite/19_diagnostics/stacktrace/current.cc: New test.
2229 2022-04-11  Jonathan Wakely  <jwakely@redhat.com>
2231         * include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
2232         Change [[unlikely]] attribute to [[likely]].
2234 2022-04-11  Jonathan Wakely  <jwakely@redhat.com>
2236         PR libstdc++/105031
2237         * include/std/stacktrace (basic_stacktrace::basic_stacktrace):
2238         Fix allocator usage in constructors.
2239         (basic_stacktrace::operator=(const basic_stacktrace&)): Do not
2240         try to reallocate using const allocator.
2241         (basic_stacktrace::operator=(basic_stacktrace&&)): Fix
2242         if-constexpr with non-constant condition. Do not allocate new
2243         storage if allocator propagates. Do not set _M_size if
2244         allocation fails.
2245         (basic_stacktrace::swap(basic_stacktrace&)): Fix typo. Add
2246         assertion that non-propagating allocators are equal.
2247         * testsuite/19_diagnostics/stacktrace/stacktrace.cc: New test.
2249 2022-04-11  Jonathan Wakely  <jwakely@redhat.com>
2251         * include/std/stacktrace (basic_stacktrace::current): Duplicate
2252         implementation into each overload. Add noinline attribute and
2253         skip current frame.
2254         (basic_stacktrace::max_size()): Call _Impl::_S_max_size.
2255         (basic_stacktrace::_S_curr_cb()): New function defining lambda.
2256         (basic_stacktrace::_Impl::_S_max_size): New function defining
2257         maximum size in terms of allocator and size_type.
2258         (basic_stacktrace::_Impl::_M_allocate): Check against
2259         max_size().
2260         * testsuite/19_diagnostics/stacktrace/entry.cc: Call function
2261         for non-constexpr checks. Check line number is correct.
2263 2022-04-11  Jonathan Wakely  <jwakely@redhat.com>
2265         * testsuite/20_util/stacktrace/entry.cc: Moved to...
2266         * testsuite/19_diagnostics/stacktrace/entry.cc: ...here.
2267         * testsuite/20_util/stacktrace/synopsis.cc: Moved to...
2268         * testsuite/19_diagnostics/stacktrace/synopsis.cc: ...here.
2269         * testsuite/20_util/stacktrace/version.cc: Moved to...
2270         * testsuite/19_diagnostics/stacktrace/version.cc: ...here.
2272 2022-04-11  Jonathan Wakely  <jwakely@redhat.com>
2274         * include/experimental/bits/fs_path.h (path): Define special
2275         members after path::_Cmpt is complete.
2277 2022-04-08  Jonathan Wakely  <jwakely@redhat.com>
2279         PR libstdc++/105153
2280         * include/std/expected
2281         (expected<void,E>::expected(expected<U,G>&&)): Fix constraints.
2282         * testsuite/20_util/expected/cons.cc: Check constructor.
2284 2022-04-08  Jonathan Wakely  <jwakely@redhat.com>
2286         PR libstdc++/105154
2287         * include/std/expected (expected<void, E>::swap): Set
2288         _M_has_value to false for objects that previously had a value.
2289         * testsuite/20_util/expected/swap.cc: Fix test to check void
2290         specialization.
2292 2022-04-08  Jonathan Wakely  <jwakely@redhat.com>
2294         PR libstdc++/105146
2295         * include/std/expected (bad_expected_access): Move constructor
2296         parameter.
2297         * testsuite/20_util/expected/bad.cc: New test.
2299 2022-04-07  Hans-Peter Nilsson  <hp@axis.com>
2301         * testsuite/20_util/expected/requirements.cc: Correct minimal-size
2302         test.
2304 2022-04-02  Jakub Jelinek  <jakub@redhat.com>
2306         PR libstdc++/105128
2307         * include/std/source_location (std::source_location::__impl): Move
2308         definition before using __builtin_ret_type.
2310 2022-04-01  Jonathan Wakely  <jwakely@redhat.com>
2312         * include/std/utility (unreachable): Define for C++23.
2313         * include/std/version (__cpp_lib_unreachable): Define.
2314         * src/c++11/debug.cc (__glibcxx_assert_fail): Check for valid
2315         arguments. Handle only the function being given.
2316         * testsuite/20_util/unreachable/1.cc: New test.
2317         * testsuite/20_util/unreachable/version.cc: New test.
2319 2022-04-01  Jonathan Wakely  <jwakely@redhat.com>
2321         * include/experimental/bits/fs_fwd.h (copy_file): Remove
2322         incorrect noexcept from declaration.
2323         * include/experimental/bits/fs_path.h (path::begin, path::end):
2324         Add noexcept to declarations, to match definitions.
2326 2022-04-01  Timm Bäder  <tbaeder@redhat.com>
2328         * include/bits/fs_ops.h: Fix filename in Doxygen comment.
2329         * include/experimental/bits/fs_ops.h: Likewise.
2331 2022-03-31  Jonathan Wakely  <jwakely@redhat.com>
2333         * libsupc++/new_opa.cc (aligned_alloc): Add comment.
2335 2022-03-29  Jonathan Wakely  <jwakely@redhat.com>
2337         * testsuite/18_support/exception/38732.cc: Disable for C++23.
2338         * testsuite/18_support/headers/exception/synopsis.cc: Likewise.
2339         * testsuite/18_support/unexpected_handler.cc: Likewise.
2341 2022-03-29  Jonathan Wakely  <jwakely@redhat.com>
2343         * libsupc++/compare (_Strong_order) [!__cpp_using_enum]: Add
2344         static data members for _Fp_fmt enumerators.
2346 2022-03-29  Jonathan Wakely  <jwakely@redhat.com>
2348         * include/std/version (__cpp_lib_variant): Fix conditions to
2349         match <variant>.
2350         (__cpp_lib_expected): Fix condition to match <expected>.
2352 2022-03-28  Jonathan Wakely  <jwakely@redhat.com>
2354         * testsuite/20_util/optional/monadic/and_then.cc: Fix typo.
2355         * testsuite/20_util/optional/monadic/transform.cc: Likewise.
2356         * testsuite/22_locale/codecvt/always_noconv/char/1.cc: Likewise.
2357         * testsuite/22_locale/codecvt/encoding/char/1.cc: Likewise.
2358         * testsuite/22_locale/codecvt/in/char/1.cc: Likewise.
2359         * testsuite/22_locale/codecvt/max_length/char/1.cc: Likewise.
2360         * testsuite/22_locale/codecvt/out/char/1.cc: Likewise.
2361         * testsuite/22_locale/codecvt/unshift/char/1.cc: Likewise.
2363 2022-03-27  Jonathan Wakely  <jwakely@redhat.com>
2365         * doc/doxygen/user.cfg.in: Add new header.
2366         * include/Makefile.am: Likewise.
2367         * include/Makefile.in: Regenerate.
2368         * include/precompiled/stdc++.h: Add new header.
2369         * include/std/version (__cpp_lib_expected): Define.
2370         * libsupc++/exception [__cplusplus > 202002] (unexpected)
2371         (unexpected_handler, set_unexpected): Do not declare for C++23.
2372         * include/std/expected: New file.
2373         * testsuite/20_util/expected/assign.cc: New test.
2374         * testsuite/20_util/expected/cons.cc: New test.
2375         * testsuite/20_util/expected/illformed_neg.cc: New test.
2376         * testsuite/20_util/expected/observers.cc: New test.
2377         * testsuite/20_util/expected/requirements.cc: New test.
2378         * testsuite/20_util/expected/swap.cc: New test.
2379         * testsuite/20_util/expected/synopsis.cc: New test.
2380         * testsuite/20_util/expected/unexpected.cc: New test.
2381         * testsuite/20_util/expected/version.cc: New test.
2383 2022-03-25  Jonathan Wakely  <jwakely@redhat.com>
2385         * include/std/bit (bit_cast, byteswap, endian): Add doxygen
2386         comments.
2388 2022-03-23  Jonathan Wakely  <jwakely@redhat.com>
2390         PR libstdc++/105027
2391         * include/std/bit (bit_cast): Add constraints.
2392         * testsuite/26_numerics/bit/bit.cast/105027.cc: New test.
2394 2022-03-23  Jonathan Wakely  <jwakely@redhat.com>
2396         * include/std/version [!_GLIBCXX_HOSTED]
2397         (__cpp_lib_hardware_interference_size): Define for freestanding.
2398         (__cpp_lib_bit_cast): Likewise.
2399         (__cpp_lib_is_layout_compatible): Likewise.
2400         (__cpp_lib_is_pointer_interconvertible): Likewise.
2401         (__cpp_lib_adaptor_iterator_pair_constructor): Do not define for
2402         freestanding.
2403         (__cpp_lib_invoke_r): Likewise.
2404         (__cpp_lib_ios_noreplace): Likewise.
2405         (__cpp_lib_monadic_optional): Likewise.
2406         (__cpp_lib_move_only_function): Likewise.
2407         (__cpp_lib_spanstream): Likewise.
2408         (__cpp_lib_stacktrace): Likewise.
2409         (__cpp_lib_string_contains): Likewise.
2410         (__cpp_lib_string_resize_and_overwrite): Likewise.
2411         (__cpp_lib_to_underlying): Likewise.
2413 2022-03-23  Jonathan Wakely  <jwakely@redhat.com>
2415         PR libstdc++/105021
2416         * include/bits/atomic_base.h [!_GLIBCXX_HOSTED]: Do not include
2417         <bits/atomic_wait.h> for freestanding.
2419 2022-03-22  Hans-Peter Nilsson  <hp@axis.com>
2421         * testsuite/20_util/from_chars/6.cc (test01) [FE_DOWNWARD]:
2422         Conditionalize call to fesetround.
2424 2022-03-21  Jakub Jelinek  <jakub@redhat.com>
2426         PR libstdc++/104990
2427         * include/bits/locale_facets_nonio.tcc (get): Don't check if do_get
2428         isn't overloaded if __clang__ is defined.
2430 2022-03-18  Jonathan Wakely  <jwakely@redhat.com>
2432         PR libstdc++/104242
2433         * include/std/any (any(T&&)): Revert change to constraints.
2434         * testsuite/20_util/any/cons/104242.cc: New test.
2436 2022-03-18  Jonathan Wakely  <jwakely@redhat.com>
2438         PR libstdc++/92546
2439         * include/pstl/glue_algorithm_defs.h: Replace <functional> with
2440         <bits/stl_pair.h>.
2441         * include/pstl/utils.h: Replace <iterator> with <type_traits>.
2442         (__pstl::__internal::__except_handler): Use std::__terminate
2443         instead of std::terminate.
2444         * src/c++17/fs_path.cc: Include <array>.
2445         * testsuite/25_algorithms/adjacent_find/constexpr.cc: Include
2446         <functional>.
2447         * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
2448         * testsuite/25_algorithms/clamp/constrained.cc: Likewise.
2449         * testsuite/25_algorithms/equal/constrained.cc: Likewise.
2450         * testsuite/25_algorithms/for_each/constrained.cc: Likewise.
2451         * testsuite/25_algorithms/includes/constrained.cc: Likewise.
2452         * testsuite/25_algorithms/is_heap/constexpr.cc: Likewise.
2453         * testsuite/25_algorithms/is_heap_until/constexpr.cc: Likewise.
2454         * testsuite/25_algorithms/is_permutation/constrained.cc: Include
2455         <iterator>.
2456         * testsuite/25_algorithms/is_sorted/constexpr.cc: Include
2457         <functional>.
2458         * testsuite/25_algorithms/is_sorted_until/constexpr.cc:
2459         Likewise.
2460         * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
2461         Likewise.
2462         * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
2463         Likewise.
2464         * testsuite/25_algorithms/lexicographical_compare_three_way/1.cc:
2465         Include <array>.
2466         * testsuite/25_algorithms/lower_bound/constexpr.cc: Include
2467         <functional>.
2468         * testsuite/25_algorithms/max/constrained.cc: Likewise.
2469         * testsuite/25_algorithms/max_element/constrained.cc: Likewise.
2470         * testsuite/25_algorithms/min/constrained.cc: Likewise.
2471         * testsuite/25_algorithms/min_element/constrained.cc: Likewise.
2472         * testsuite/25_algorithms/minmax_element/constrained.cc:
2473         Likewise.
2474         * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
2475         * testsuite/25_algorithms/move/93872.cc: Likewise.
2476         * testsuite/25_algorithms/move_backward/93872.cc: Include
2477         <iterator>.
2478         * testsuite/25_algorithms/nth_element/constexpr.cc: Include
2479         <functional>.
2480         * testsuite/25_algorithms/partial_sort/constexpr.cc: Likewise.
2481         * testsuite/25_algorithms/partial_sort_copy/constexpr.cc:
2482         Likewise.
2483         * testsuite/25_algorithms/search/constexpr.cc: Likewise.
2484         * testsuite/25_algorithms/search_n/constrained.cc: Likewise.
2485         * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
2486         * testsuite/25_algorithms/set_difference/constrained.cc:
2487         Likewise.
2488         * testsuite/25_algorithms/set_intersection/constexpr.cc:
2489         Likewise.
2490         * testsuite/25_algorithms/set_intersection/constrained.cc:
2491         Likewise.
2492         * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
2493         Likewise.
2494         * testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
2495         * testsuite/25_algorithms/set_union/constrained.cc: Likewise.
2496         * testsuite/25_algorithms/sort/constexpr.cc: Likewise.
2497         * testsuite/25_algorithms/sort_heap/constexpr.cc: Likewise.
2498         * testsuite/25_algorithms/transform/constrained.cc: Likewise.
2499         * testsuite/25_algorithms/unique/constexpr.cc: Likewise.
2500         * testsuite/25_algorithms/unique/constrained.cc: Likewise.
2501         * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
2502         * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
2503         * testsuite/std/ranges/adaptors/elements.cc: Include <vector>.
2504         * testsuite/std/ranges/adaptors/lazy_split.cc: Likewise.
2505         * testsuite/std/ranges/adaptors/split.cc: Likewise.
2507 2022-03-17  Jonathan Wakely  <jwakely@redhat.com>
2509         PR libstdc++/92546
2510         * include/bits/fs_path.h (path::make_preferred): Use
2511         handwritten loop instead of std::replace.
2513 2022-03-17  Jonathan Wakely  <jwakely@redhat.com>
2515         PR middle-end/104966
2516         * include/bits/locale_facets_nonio.tcc
2517         (__moneypunct_cache::_M_cache): Replace try-catch with RAII and
2518         make all string copies before any stores to *this.
2520 2022-03-17  Jonathan Wakely  <jwakely@redhat.com>
2522         * testsuite/util/testsuite_character.h: Fix comment.
2524 2022-03-16  Jonathan Wakely  <jwakely@redhat.com>
2526         PR libstdc++/103407
2527         * config/abi/pre/gnu.ver: Make version for std::from_chars
2528         depend on HAVE_USELOCALE macro.
2529         * testsuite/util/testsuite_abi.cc (compare_symbols): Treat
2530         std::from_chars for floating-point types as undesignated if
2531         not found in the baseline symbols file.
2533 2022-03-16  Jonathan Wakely  <jwakely@redhat.com>
2535         * include/std/charconv (__cpp_lib_to_chars): Only define when
2536         both from_chars and to_chars are supported for floating-point
2537         types.
2538         (from_chars, to_chars): Adjust preprocessor conditions guarding
2539         declarations.
2540         * include/std/version (__cpp_lib_to_chars): Adjust condition to
2541         match <charconv> definition.
2542         * src/c++17/floating_from_chars.cc (from_chars_strtod): New
2543         function template.
2544         (from_chars): Simplify preprocessor checks and use
2545         from_chars_strtod when appropriate.
2547 2022-03-14  Jonathan Wakely  <jwakely@redhat.com>
2549         PR libstdc++/104875
2550         * src/c++11/codecvt.cc (read_utf8_code_point): Use char32_t to
2551         hold octets that will be left-shifted.
2553 2022-03-10  Jonathan Wakely  <jwakely@redhat.com>
2555         PR libstdc++/104870
2556         * src/c++17/floating_from_chars.cc: Check __SIZE_WIDTH__ >= 32
2557         before using fast_float.
2559 2022-03-10  Detlef Vollmann  <dv@vollmann.ch>
2561         PR libstdc++/104866
2562         * include/bits/this_thread_sleep.h: Fix order of #endif and
2563         closing brace of namespace.
2565 2022-03-10  Jonathan Wakely  <jwakely@redhat.com>
2567         * libsupc++/compare (_Strong_order::_S_fp_cmp) [__vax__]:
2568         Handle NaN.
2570 2022-03-10  Jonathan Wakely  <jwakely@redhat.com>
2572         * libsupc++/compare (_Strong_ordering::_S_fp_cmp) [__vax__]: Use
2573         <=> comparison.
2575 2022-03-09  Patrick Palka  <ppalka@redhat.com>
2577         PR libstdc++/104859
2578         * src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
2579         Be explicit when narrowing the shifted effective_mantissa,
2580         since it may have an integer-class type.
2582 2022-03-08  Jonathan Wakely  <jwakely@redhat.com>
2584         * include/bits/uses_allocator_args.h: Remove incorrect copyright
2585         notice.
2587 2022-03-07  Jonathan Wakely  <jwakely@redhat.com>
2589         PR libstdc++/104807
2590         * include/bits/c++config (__terminate, __glibcxx_assert_fail):
2591         Replace _GLIBCXX_VISIBILITY on function with visibility pragma.
2592         (__is_constant_evaluated): Add visibility pragma.
2594 2022-03-07  Rasmus Villemoes  <rasmus.villemoes@prevas.dk>
2596         * config/locale/vxworks/ctype_members.cc: Remove <iostream>
2597           include.
2599 2022-03-05  Jonathan Wakely  <jwakely@redhat.com>
2601         * include/bits/c++config (__glibcxx_assert_fail): Add visibility
2602         attribute.
2603         (__terminate): Likewise.
2605 2022-03-04  Jonathan Wakely  <jwakely@redhat.com>
2607         * libsupc++/compare (strong_order::_S_fp_cmp): Move typedef
2608         inside #if condition.
2610 2022-03-03  Jonathan Wakely  <jwakely@redhat.com>
2612         PR libstdc++/104748
2613         * testsuite/std/ranges/adaptors/all.cc: Use non-debug vector for
2614         constexpr test.
2616 2022-03-03  Jonathan Wakely  <jwakely@redhat.com>
2618         * testsuite/17_intro/names.cc (func): Undef on AIX.
2620 2022-03-03  Jonathan Wakely  <jwakely@redhat.com>
2622         PR libstdc++/96526
2623         * libsupc++/compare (strong_order): Add missing support for
2624         floating-point types.
2625         * testsuite/18_support/comparisons/algorithms/strong_order_floats.cc:
2626         New test.
2628 2022-03-01  Jonathan Wakely  <jwakely@redhat.com>
2630         PR middle-end/103984
2631         * include/bits/regex_compiler.h (_BracketMatcher::_M_char): Use
2632         default member initializer.
2634 2022-02-24  Jonathan Wakely  <jwakely@redhat.com>
2636         PR libstdc++/104602
2637         * include/std/source_location (source_location::current): Use
2638         deduced type of __builtin_source_location().
2640 2022-02-22  Patrick Palka  <ppalka@redhat.com>
2642         * include/bits/ranges_base.h (__detail::__is_initializer_list):
2643         Define.
2644         (viewable_range): Adjust as per P2415R2.
2645         * include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value.
2646         * include/std/ranges (owning_view): Define as per P2415R2.
2647         (enable_borrowed_range<owning_view>): Likewise.
2648         (views::__detail::__can_subrange): Replace with ...
2649         (views::__detail::__can_owning_view): ... this.
2650         (views::_All::_S_noexcept): Sync with operator().
2651         (views::_All::operator()): Use owning_view instead of subrange
2652         as per P2415R2.
2653         * include/std/version (__cpp_lib_ranges): Adjust value.
2654         * testsuite/std/ranges/adaptors/all.cc (test06): Adjust now that
2655         views::all uses owning_view instead of subrange.
2656         (test08): New test.
2657         * testsuite/std/ranges/adaptors/lazy_split.cc (test09): Adjust
2658         now that rvalue non-view non-borrowed ranges are viewable.
2659         * testsuite/std/ranges/adaptors/split.cc (test06): Likewise.
2661 2022-02-17  Jonathan Wakely  <jwakely@redhat.com>
2663         PR libstdc++/104559
2664         * doc/xml/manual/evolution.xml: Document deprecation.
2665         * doc/html/manual/api.html: Regenerate.
2666         * include/bits/stl_bvector.h (insert(const_iterator, const bool&)):
2667         Remove default argument.
2668         (insert(const_iterator)): New overload with deprecated attribute.
2669         * testsuite/23_containers/vector/bool/modifiers/insert/104559.cc:
2670         New test.
2672 2022-02-17  Jonathan Wakely  <jwakely@redhat.com>
2674         * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Replace
2675         code that call cat->name() on std::error_category objects.
2676         Identify known categories by symbol name and use a hardcoded
2677         name. Print error code values as enumerators where appopriate.
2678         * testsuite/libstdc++-prettyprinters/cxx11.cc: Adjust expected
2679         name of custom category. Check io_errc and future_errc errors.
2681 2022-02-15  Jonathan Wakely  <jwakely@redhat.com>
2683         PR libstdc++/104542
2684         * include/bits/uses_allocator_args.h (make_obj_using_allocator)
2685         (uninitialized_construct_using_allocator): Add constexpr.
2686         * testsuite/20_util/uses_allocator/make_obj.cc: Check constexpr.
2687         * testsuite/20_util/uses_allocator/uninitialized_construct.cc: New test.
2689 2022-02-14  Jonathan Wakely  <jwakely@redhat.com>
2691         PR libstdc++/100912
2692         * config/locale/gnu/c_locale.h (__convert_from_v): Use inline
2693         namespace for IEEE128 long double mode.
2694         * config/os/gnu-linux/ldbl-ieee128-extra.ver: Add new symbol
2695         version and export __gnu_cxx_ieee128::__convert_from_v.
2696         * include/bits/locale_facets_nonio.tcc (money_put::__do_put):
2697         Make __ibm128 overload use snprintf directly
2698         * testsuite/util/testsuite_abi.cc: Add new symbol version.
2699         Remove stable IEEE128/LDBL versions.
2701 2022-02-14  Jonathan Wakely  <jwakely@redhat.com>
2703         PR libstdc++/103891
2704         * include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
2705         Remove.
2706         * include/std/variant: Check feature test macros instead.
2707         * include/std/version: Likewise.
2709 2022-02-14  Jonathan Wakely  <jwakely@redhat.com>
2711         * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
2712         Fix typo.
2714 2022-02-14  Jonathan Wakely  <jwakely@redhat.com>
2716         * src/c++17/floating_to_chars.cc (FLOAT128_TO_CHARS): Depend on
2717         LONG_DOUBLE_ALT128_COMPAT instead of USE_FLOAT128.
2719 2022-02-11  Jonathan Wakely  <jwakely@redhat.com>
2721         * testsuite/20_util/temporary_buffer.cc: Fix dg-warning target
2722         selector.
2724 2022-02-11  Jonathan Wakely  <jwakely@redhat.com>
2726         * testsuite/20_util/monotonic_buffer_resource/allocate.cc:
2727         Ignore -Walloc-larger-than warning.
2728         * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
2729         Likewise.
2730         * testsuite/29_atomics/atomic/cons/user_pod.cc: Compile with -O1
2731         to avoid linker error for __atomic_is_lock_free.
2733 2022-02-10  Thomas Rodgers  <rodgert@appliantology.com>
2735         * include/bits/atomic_wait.h (__waiter_base::_S_do_spin,
2736         __waiter_base::_S_do_spin_v): Change memory order from relaxed
2737         to acquire.
2739 2022-02-10  Jonathan Wakely  <jwakely@redhat.com>
2741         * include/c_compatibility/stdatomic.h (atomic_fetch_xor): Add
2742         using-declaration.
2743         (atomic_fetch_xor_explicit): Likewise.
2744         * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Check
2745         arithmetic and logical operations for atomic_int.
2747 2022-02-10  Jonathan Wakely  <jwakely@redhat.com>
2749         * src/filesystem/dir-common.h (_GLIBCXX_HAVE_DIRFD): Undefine
2750         when <dirent.h> is not available.
2751         (_GLIBCXX_HAVE_UNLINKAT):  Likewise.
2753 2022-02-09  Thomas Rodgers  <rodgert@appliantology.com>
2755         PR libstdc++/104442
2756         * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): Move spin
2757          loop inside do loop so that threads failing the wait, reload
2758          _M_ver.
2760 2022-02-08  Jonathan Wakely  <jwakely@redhat.com>
2762         * src/c++17/fs_dir.cc (_Dir(DIR*, const path&)): Change first
2763         parameter to _Dir_base&&.
2764         * src/filesystem/dir-common.h (_Dir_base(DIR*)): Remove.
2765         * src/filesystem/dir.cc (_Dir(DIR*, const path&)): Change first
2766         parameter to _Dir_base&&.
2768 2022-02-08  Jonathan Wakely  <jwakely@redhat.com>
2770         * acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Add comment about
2771         checking for CAS on correct word size.
2773 2022-02-08  Jonathan Wakely  <jwakely@redhat.com>
2775         * testsuite/experimental/filesystem/operations/create_directories.cc:
2776         Adjust expected results for Windows.
2778 2022-02-08  Jonathan Wakely  <jwakely@redhat.com>
2780         PR libstdc++/104161
2781         * src/c++17/fs_dir.cc (fs::recursive_directory_iterator::__erase):
2782         [i_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Refresh entry._M_type member,
2783         instead of checking for errno values indicating a directory.
2784         * src/c++17/fs_ops.cc (fs::remove_all(const path&)): Use similar
2785         logic to non-throwing overload.
2786         (fs::remove_all(const path&, error_code&)): Add comments.
2787         * src/filesystem/ops-common.h: Likewise.
2789 2022-02-04  Jonathan Wakely  <jwakely@redhat.com>
2791         * src/filesystem/dir-common.h (_Dir_base::openat): Change return
2792         type to use portable posix::DIR alias.
2794 2022-02-04  Jonathan Wakely  <jwakely@redhat.com>
2796         * include/c_compatibility/stdatomic.h [__clang__]: Use
2797         #include_next <stdatomic.h>.
2799 2022-02-04  Jonathan Wakely  <jwakely@redhat.com>
2801         * include/experimental/bits/fs_ops.h (fs::copy_file): Remove
2802         noexcept.
2803         (fs::create_directories): Likewise.
2804         (fs::remove_all): Likewise.
2805         * src/filesystem/ops.cc (fs::copy_file): Remove noexcept.
2806         (fs::create_directories): Likewise.
2807         (fs::remove_all): Likewise.
2809 2022-02-04  Jonathan Wakely  <jwakely@redhat.com>
2811         PR libstdc++/104161
2812         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for dirfd
2813         and unlinkat.
2814         * config.h.in: Regenerate.
2815         * configure: Regenerate.
2816         * include/bits/fs_dir.h (recursive_directory_iterator): Declare
2817         remove_all overloads as friends.
2818         (recursive_directory_iterator::__erase): Declare new member
2819         function.
2820         * include/bits/fs_fwd.h (remove, remove_all): Declare.
2821         * src/c++17/fs_dir.cc (_Dir): Add filename_only parameter to
2822         constructor. Pass file descriptor argument to base constructor.
2823         (_Dir::dir_and_pathname, _Dir::open_subdir, _Dir::do_unlink)
2824         (_Dir::unlink, _Dir::rmdir): Define new member functions.
2825         (directory_iterator): Pass filename_only argument to _Dir
2826         constructor.
2827         (recursive_directory_iterator::_Dir_stack): Adjust constructor
2828         parameters to take a _Dir rvalue instead of creating one.
2829         (_Dir_stack::orig): Add data member for storing original path.
2830         (_Dir_stack::report_error): Define new member function.
2831         (__directory_iterator_nofollow): Move here from dir-common.h and
2832         fix value to be a power of two.
2833         (__directory_iterator_filename_only): Define new constant.
2834         (recursive_directory_iterator): Construct _Dir object and move
2835         into _M_dirs stack. Pass skip_permission_denied argument to first
2836         advance call.
2837         (recursive_directory_iterator::increment): Use _Dir::open_subdir.
2838         (recursive_directory_iterator::__erase): Define new member
2839         function.
2840         * src/c++17/fs_ops.cc (ErrorReporter, do_remove_all): Remove.
2841         (fs::remove_all): Use new recursive_directory_iterator::__erase
2842         member function.
2843         * src/filesystem/dir-common.h (_Dir_base): Add int parameter to
2844         constructor and use openat to implement nofollow semantics.
2845         (_Dir_base::fdcwd, _Dir_base::set_close_on_exec, _Dir_base::openat):
2846         Define new member functions.
2847         (__directory_iterator_nofollow): Move to fs_dir.cc.
2848         * src/filesystem/dir.cc (_Dir): Pass file descriptor argument to
2849         base constructor.
2850         (_Dir::dir_and_pathname, _Dir::open_subdir): Define new member
2851         functions.
2852         (recursive_directory_iterator::_Dir_stack): Adjust constructor
2853         parameters to take a _Dir rvalue instead of creating one.
2854         (recursive_directory_iterator): Check for new nofollow option.
2855         Construct _Dir object and move into _M_dirs stack. Pass
2856         skip_permission_denied argument to first advance call.
2857         (recursive_directory_iterator::increment): Use _Dir::open_subdir.
2858         * src/filesystem/ops.cc (fs::remove_all): Use C++17 remove_all.
2860 2022-02-04  Jonathan Wakely  <jwakely@redhat.com>
2862         * include/bits/allocator.h: Qualify std::allocator_traits in
2863         deprecated warnings.
2864         * libsupc++/exception (uncaught_exception): Add suggestion to
2865         deprecated warning.
2867 2022-02-02  Jonathan Wakely  <jwakely@redhat.com>
2869         * src/c++17/fs_dir.cc (fs::recursive_directory_iterator::pop):
2870         Add [[maybe_unused]] attribute.
2871         * src/filesystem/dir.cc (fs::recursive_directory_iterator::pop):
2872         Likewise.
2874 2022-02-02  Jonathan Wakely  <jwakely@redhat.com>
2876         * testsuite/23_containers/multiset/operators/cmp_c++20.cc: Use
2877         custom comparison function for multiset.
2878         * testsuite/23_containers/set/operators/cmp_c++20.cc: Use custom
2879         comparison function for set.
2881 2022-02-02  Jonathan Wakely  <jwakely@redhat.com>
2883         * include/bits/boost_concept_check.h (_OutputIteratorConcept):
2884         Change member function to data member of function pointer type.
2886 2022-02-02  Martin Sebor  <msebor@redhat.com>
2888         PR libstdc++/101831
2889         * include/std/array (begin): Declare const member function attribute
2890         const.
2891         (end, rbegin, rend, size, max_size, empty, data): Same.
2892         * testsuite/23_containers/array/capacity/empty.cc: Add test cases.
2893         * testsuite/23_containers/array/capacity/max_size.cc: Same.
2894         * testsuite/23_containers/array/capacity/size.cc: Same.
2895         * testsuite/23_containers/array/iterators/begin_end.cc: New test.
2897 2022-02-02  Jonathan Wakely  <jwakely@redhat.com>
2899         * testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
2900         autoconf macro to check whether d_type is present.
2901         * testsuite/experimental/filesystem/iterators/error_reporting.cc:
2902         Likewise.
2904 2022-02-01  Jonathan Wakely  <jwakely@redhat.com>
2906         * testsuite/27_io/filesystem/iterators/97731.cc: New test.
2907         * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2908         Check follow_directory_symlink option.
2909         * testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc:
2910         Likewise.
2912 2022-02-01  Jonathan Wakely  <jwakely@redhat.com>
2914         * src/c++17/fs_dir.cc (recursive_directory_iterator::increment):
2915         Reset state to past-the-end iterator on error.
2916         (fs::recursive_directory_iterator::pop(error_code&)): Likewise.
2917         (fs::recursive_directory_iterator::pop()): Check _M_dirs before
2918         it might get reset.
2919         * src/filesystem/dir.cc (recursive_directory_iterator): Likewise,
2920         for the TS implementation.
2921         * testsuite/27_io/filesystem/iterators/error_reporting.cc: New test.
2922         * testsuite/experimental/filesystem/iterators/error_reporting.cc: New test.
2924 2022-02-01  Jonathan Wakely  <jwakely@redhat.com>
2926         * include/bits/fs_fwd.h (filesystem::perms): Fix comment.
2928 2022-02-01  Jonathan Wakely  <jwakely@redhat.com>
2930         PR libstdc++/104301
2931         * acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Print different messages
2932         for stdio_pure and stdio_posix options.
2933         * configure: Regenerate.
2935 2022-02-01  Thomas Rodgers  <rodgert@appliantology.com>
2937         * include/bits/atomic_wait.h: Change memory order from
2938         Acquire/Release with relaxed loads to SeqCst+Release for
2939         accesses to the waiter's count.
2941 2022-01-31  Martin Liska  <mliska@suse.cz>
2943         * acinclude.m4: Detect *_ld_is_mold and use it.
2944         * configure: Regenerate.
2946 2022-01-30  Hans-Peter Nilsson  <hp@axis.com>
2948         * testsuite/27_io/basic_istream/get/char/lwg3464.cc: Don't run on
2949         simulator targets.
2950         * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: Likewise.
2952 2022-01-27  Jonathan Wakely  <jwakely@redhat.com>
2954         PR libstdc++/100516
2955         * include/bits/deque.tcc (_M_range_initialize<ForwardIterator>):
2956         Add __builtin_unreachable to loop.
2957         * testsuite/23_containers/deque/100516.cc: New test.
2959 2022-01-27  Jonathan Wakely  <jwakely@redhat.com>
2961         * include/bits/ranges_base.h (ranges::advance): Avoid signed
2962         overflow. Do nothing if already equal to desired result.
2963         * testsuite/24_iterators/range_operations/advance_overflow.cc:
2964         New test.
2966 2022-01-27  Martin Liska  <mliska@suse.cz>
2968         PR libstdc++/104259
2969         * acinclude.m4: Fix typo.
2970         * configure: Regenerate.
2972 2022-01-25  Jonathan Wakely  <jwakely@redhat.com>
2974         PR libstdc++/104019
2975         * include/bits/istream.tcc (basic_istream::sentry): Add braces
2976         around try-block.
2977         * include/bits/shared_ptr_base.h (_Sp_counted_array_base::_M_init):
2978         Add pragmas to disable bogus warnings from PR 61596.
2980 2022-01-25  Jonathan Wakely  <jwakely@redhat.com>
2982         PR libstdc++/104217
2983         * src/c++17/fs_ops.cc (_GNU_SOURCE): Define.
2984         * src/filesystem/dir.cc (_GNU_SOURCE): Define.
2985         * src/filesystem/ops.cc (_GNU_SOURCE): Define.
2987 2022-01-25  Jonathan Wakely  <jwakely@redhat.com>
2989         PR libstdc++/104161
2990         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for
2991         fdopendir.
2992         * config.h.in: Regenerate.
2993         * configure: Regenerate.
2994         * src/c++17/fs_dir.cc (_Dir): Add nofollow flag to constructor
2995         and pass it to base class constructor.
2996         (directory_iterator): Pass nofollow flag to _Dir constructor.
2997         (fs::recursive_directory_iterator::increment): Likewise.
2998         * src/c++17/fs_ops.cc (do_remove_all): Use nofollow option for
2999         directory_iterator constructor. Move error check outside loop.
3000         * src/filesystem/dir-common.h (_Dir_base): Add nofollow flag to
3001         constructor and when it's set use ::open with O_NOFOLLOW and
3002         O_DIRECTORY.
3003         * src/filesystem/dir.cc (_Dir): Add nofollow flag to constructor
3004         and pass it to base class constructor.
3005         (directory_iterator): Pass nofollow flag to _Dir constructor.
3006         (fs::recursive_directory_iterator::increment): Likewise.
3007         * src/filesystem/ops.cc (remove_all): Use nofollow option for
3008         directory_iterator constructor. Move error check outside loop.
3010 2022-01-23  Jonathan Wakely  <jwakely@redhat.com>
3012         PR libstdc++/104032
3013         * include/std/spanstream (basic_spanbuf(basic_spanbuf&&)): Use
3014         mem-initializer for _M_buf.
3015         (basic_spanbuf::Operator=(basic_spanbuf&&)): Fix ill-formed
3016         member access.
3017         * testsuite/27_io/spanstream/2.cc: New test.
3019 2022-01-23  Jonathan Wakely  <jwakely@redhat.com>
3021         * src/c++17/floating_from_chars.cc (USE_STRTOD_FOR_FROM_CHARS):
3022         Define macro for case where std::from_chars is implemented in
3023         terms of strtod, strtof or strtold.
3024         (buffer_resource, valid_fmt, find_end_of_float, pattern)
3025         (from_chars_impl, make_result, reserve_string): Do not define
3026         unless USE_STRTOD_FOR_FROM_CHARS is defined.
3027         (from_chars): Define when at least one of USE_LIB_FAST_FLOAT and
3028         USE_STRTOD_FOR_FROM_CHARS is defined, instead of
3029         _GLIBCXX_HAVE_USELOCALE. Use fast_float for long double when it
3030         is binary64.
3032 2022-01-23  Jonathan Wakely  <jwakely@redhat.com>
3034         PR libstdc++/104174
3035         * include/bits/hashtable_policy.h (_Map_base): Add partial
3036         specialization for maps with const key types.
3037         * testsuite/23_containers/unordered_map/104174.cc: New test.
3039 2022-01-23  Jonathan Wakely  <jwakely@redhat.com>
3041         PR libstdc++/104019
3042         * include/bits/shared_ptr_base.h (_Sp_counted_base<>::_M_release):
3043         Set members to zero without type punning.
3045 2022-01-21  Jonathan Wakely  <jwakely@redhat.com>
3047         * testsuite/20_util/shared_ptr/cons/array.cc: Fix comment.
3049 2022-01-21  Jonathan Wakely  <jwakely@redhat.com>
3051         PR libstdc++/87193
3052         PR libstdc++/104019
3053         * include/bits/alloc_traits.h (__cpp_lib_allocator_traits_is_always_equal):
3054         Define as type long.
3055         * include/bits/allocator.h (__cpp_lib_incomplete_container_elements):
3056         Likewise.
3057         * include/bits/basic_string.h (__cpp_lib_string_udls): Likewise.
3058         * include/bits/chrono.h (__cpp_lib_chrono): Likewise.
3059         (__cpp_lib_chrono_udls): Likewise.
3060         * include/bits/move.h (__cpp_lib_addressof_constexpr): Likewise.
3061         * include/bits/node_handle.h (__cpp_lib_node_extract): Likewise.
3062         * include/bits/range_access.h (__cpp_lib_nonmember_container_access):
3063         Likewise.
3064         * include/bits/shared_ptr.h (__cpp_lib_enable_shared_from_this):
3065         Likewise.
3066         * include/bits/stl_algo.h (__cpp_lib_clamp): Likewise.
3067         (__cpp_lib_sample): Likewise.
3068         * include/bits/stl_algobase.h (__cpp_lib_robust_nonmodifying_seq_ops):
3069         Likewise.
3070         * include/bits/stl_function.h (__cpp_lib_transparent_operators):
3071         Likewise.
3072         * include/bits/stl_iterator.h (__cpp_lib_make_reverse_iterator):
3073         Likewise.
3074         * include/bits/stl_map.h (__cpp_lib_map_try_emplace):
3075         Likewise.
3076         * include/bits/stl_tree.h (__cpp_lib_generic_associative_lookup):
3077         Likewise.
3078         * include/bits/unique_ptr.h (__cpp_lib_make_unique):
3079         Likewise.
3080         * include/bits/unordered_map.h (__cpp_lib_unordered_map_try_emplace):
3081         Likewise.
3082         * include/c_global/cmath (__cpp_lib_hypot): Likewise.
3083         * include/c_global/cstddef (__cpp_lib_byte): Likewise.
3084         * include/std/atomic (__cpp_lib_atomic_is_always_lock_free):
3085         Likewise.
3086         * include/std/complex (__cpp_lib_complex_udls): Likewise.
3087         * include/std/filesystem (__cpp_lib_filesystem): Likewise.
3088         * include/std/functional (__cpp_lib_not_fn): Likewise.
3089         (__cpp_lib_boyer_moore_searcher): Likewise.
3090         * include/std/iomanip (__cpp_lib_quoted_string_io): Likewise.
3091         * include/std/mutex (__cpp_lib_scoped_lock): Likewise.
3092         * include/std/numeric (__cpp_lib_gcd_lcm): Likewise.
3093         (__cpp_lib_gcd, __cpp_lib_lcm): Likewise.
3094         * include/std/tuple (__cpp_lib_apply): Likewise.
3095         (__cpp_lib_make_from_tuple): Likewise.
3096         * include/std/type_traits (__cpp_lib_integral_constant_callable)
3097         (__cpp_lib_bool_constant, __cpp_lib_logical_traits)
3098         (__cpp_lib_is_null_pointer, __cpp_lib_transformation_trait_aliases)
3099         (__cpp_lib_result_of_sfinae, __cpp_lib_void_t)
3100         (__cpp_lib_is_swappable, __cpp_lib_is_invocable)
3101         (__cpp_lib_has_unique_object_representations)
3102         (__cpp_lib_is_aggregate): Likewise.
3103         * include/std/version: Likewise.
3104         * libsupc++/new (__cpp_lib_launder): Likewise.
3106 2022-01-21  Jonathan Wakely  <jwakely@redhat.com>
3108         * include/std/version (__cpp_lib_shared_ptr_arrays): Fix
3109         condition for C++17 definition.
3111 2022-01-21  Jonathan Wakely  <jwakely@redhat.com>
3113         * include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count):
3114         Add constexpr.
3115         (_Sp_atomic::_M_ptr): Add default member-initializer.
3116         * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
3117         Check constant initialization.
3118         * testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: Likewise.
3120 2022-01-20  Jonathan Wakely  <jwakely@redhat.com>
3122         * src/c++11/cxx11-ios_failure.cc (__constinit): Define as
3123         equivalent attribute for Clang.
3124         * src/c++11/future.cc (__constinit): Likewise.
3125         * src/c++11/system_error.cc (__constinit): Likewise.
3126         * src/c++17/memory_resource.cc (__constinit): Likewise.
3128 2022-01-20  Jonathan Wakely  <jwakely@redhat.com>
3130         * scripts/testsuite_flags.in: Only add src/filesystem/.libs and
3131         src/libbacktrace/.libs to LDFLAGS if those directories exist.
3133 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
3135         * configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Remove -gdwarf-4
3136         from default flags.
3137         * configure: Regenerate.
3139 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
3141         PR libstdc++/104123
3142         * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Include
3143         <stddef.h>.
3145 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
3147         * scripts/testsuite_flags.in: Add src/libbacktrace/.libs to
3148         linker search paths.
3149         * src/Makefile.am: Fix src/debug/libbacktrace build.
3150         * src/Makefile.in: Regenerate.
3151         * src/libbacktrace/Makefile.am: Use per-library CPPFLAGS
3152         variable. Use symlinks for the source files.
3153         * src/libbacktrace/Makefile.in: Regenerate.
3155 2022-01-19  Matthias Kretz  <m.kretz@gsi.de>
3157         * include/experimental/bits/simd.h (__floating_point_flags): Do
3158         not rely on math_errhandling to expand to a constant expression.
3160 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
3162         * doc/xml/manual/evolution.xml: Document deprecations.
3163         * doc/xml/manual/status_cxx2017.xml: Update status.
3164         * doc/html/*: Regenerate.
3166 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
3168         * include/bits/stl_tempbuf.h (get_temporary_buffer): Change
3169         _GLIBCXX14_DEPRECATED to _GLIBCXX17_DEPRECATED.
3171 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
3173         * include/bits/stl_pair.h (_PCC::_DeprConsPair): Remove unused
3174         function.
3176 2022-01-19  Jonathan Wakely  <jwakely@redhat.com>
3178         PR libstdc++/104101
3179         * include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count::lock):
3180         Only use __thread_relax if __cpp_lib_atomic_wait is defined.
3182 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
3184         PR libstdc++/104099
3185         * include/bits/basic_string.h (basic_string(nullptr_t)): Only
3186         define for C++23.
3187         (operator=(nullptr_t)): Likewise.
3188         * include/bits/cow_string.h: Likewise.
3189         * include/std/string_view (basic_string_view(nullptr_t)):
3190         Likewise.
3191         * testsuite/21_strings/basic_string/cons/char/nullptr.cc: Adjust
3192         expected error. Add examples that become ill-formed in C++23.
3193         * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
3194         Adjust expected errors.
3195         * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
3196         Likewise.
3198 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
3200         PR libstdc++/104098
3201         * include/bits/stl_iterator.h (reverse_iterator): Check
3202         __cpp_lib_concepts instead of __cplusplus.
3204 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
3206         PR libstdc++/101124
3207         * include/bits/stl_pair.h (pair): Adjust constraints on
3208         deprecated constructors accepting literal zero as null pointer
3209         constant. Improve wording of deprecated attribute.
3210         * testsuite/20_util/pair/cons/99957.cc: Check that deprecated
3211         constructors do not cause ambiguities for copyable types.
3213 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
3215         * include/bits/stl_function.h (ptr_fun): Fix suggestion for
3216         non-deprecated alternative.
3218 2022-01-18  Tom Honermann  <tom@honermann.net>
3220         * acinclude.m4: Define config macros if uchar.h provides
3221         c8rtomb() and mbrtoc8().
3222         * config.h.in: Regenerate.
3223         * configure: Regenerate.
3224         * include/c_compatibility/uchar.h (c8rtomb, mbrtoc8): Define.
3225         * include/c_global/cuchar (c8rtomb, mbrtoc8): Likewise.
3226         * include/c_std/cuchar (c8rtomb, mbrtoc8): Likewise.
3227         * testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc:
3228         New test.
3229         * testsuite/21_strings/headers/cuchar/functions_std_fchar8_t.cc:
3230         New test.
3232 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
3234         * include/Makefile.am: Install new header.
3235         * include/Makefile.in: Regenerate.
3236         * include/c_compatibility/stdatomic.h: New file.
3237         * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: New test.
3239 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
3241         PR libstdc++/104080
3242         * src/c++17/fast_float/LOCAL_PATCHES: Update.
3243         * src/c++17/fast_float/fast_float.h (FASTFLOAT_IS_BIG_ENDIAN):
3244         Define in terms of __BYTE_ORDER__.
3246 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
3248         PR libstdc++/104080
3249         * src/c++17/fast_float/LOCAL_PATCHES: UPDATE.
3250         * src/c++17/fast_float/fast_float.h (round): Use explicit
3251         template argument list for std::min.
3253 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
3255         * doc/xml/manual/status_cxx2017.xml: Update C++17 status.
3256         * doc/xml/manual/status_cxx2020.xml: Use 12.1 instead of 12 for
3257         upcoming release.
3258         * doc/html/manual/status.html: Regenerate.
3260 2022-01-18  Jonathan Wakely  <jwakely@redhat.com>
3262         * acinclude.m4 (GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING): Improve
3263         comments.
3264         * configure: Regenerate.
3266 2022-01-17  Patrick Palka  <ppalka@redhat.com>
3268         * src/c++17/floating_from_chars.cc: (USE_LIB_FAST_FLOAT):
3269         Conditionally define, and use it to conditionally include
3270         fast_float.
3271         (from_chars): Use fast_float for float and double when
3272         USE_LIB_FAST_FLOAT.
3274 2022-01-17  Patrick Palka  <ppalka@redhat.com>
3276         * src/c++17/fast_float/LOCAL_PATCHES: Update.
3277         * src/c++17/fast_float/fast_float.h (from_chars_advanced): In
3278         case of over/underflow, return errc::result_out_of_range and don't
3279         modify 'value'.
3281 2022-01-17  Patrick Palka  <ppalka@redhat.com>
3283         * src/c++17/fast_float/LOCAL_PATCHES: Update.
3284         * src/c++17/fast_float/fast_float.h: Apply local modifications.
3286 2022-01-17  Patrick Palka  <ppalka@redhat.com>
3288         * src/c++17/fast_float/LOCAL_PATCHES: New file.
3289         * src/c++17/fast_float/MERGE: New file.
3290         * src/c++17/fast_float/README.md: New file, copied from the
3291         fast_float repository.
3292         * src/c++17/fast_float/fast_float.h: New file, an amalgamation
3293         of the fast_float library.
3295 2022-01-17  Patrick Palka  <ppalka@redhat.com>
3297         * src/c++17/floating_from_chars.cc: Include <bit>.
3298         (ascii_to_hexit, starts_with_ci): Conditionally define.
3299         (__floating_from_chars_hex):  Conditionally define.
3300         (from_chars): Use __floating_from_chars_hex for
3301         chars_format::hex parsing of binary32/64 float/double.
3302         (testsuite/20_util/from_chars/7.cc): New test.
3303         * testsuite/20_util/from_chars/7.cc: New file.
3305 2022-01-17  Jonathan Wakely  <jwakely@redhat.com>
3307         * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): New macro.
3308         * configure.ac: Use GLIBCXX_ENABLE_BACKTRACE.
3309         * include/Makefile.am: Add new header.
3310         * include/Makefile.in: Regenerate.
3311         * include/std/stacktrace: New header.
3312         * include/std/version (__cpp_lib_stacktrace): Define.
3313         * Makefile.in: Regenerate.
3314         * config.h.in: Regenerate.
3315         * configure: Regenerate.
3316         * doc/Makefile.in: Regenerate.
3317         * libsupc++/Makefile.in: Regenerate.
3318         * po/Makefile.in: Regenerate.
3319         * python/Makefile.in: Regenerate.
3320         * src/Makefile.am: Regenerate.
3321         * src/Makefile.in: Regenerate.
3322         * src/c++11/Makefile.in: Regenerate.
3323         * src/c++17/Makefile.in: Regenerate.
3324         * src/c++20/Makefile.in: Regenerate.
3325         * src/c++98/Makefile.in: Regenerate.
3326         * src/filesystem/Makefile.in: Regenerate.
3327         * testsuite/Makefile.in: Regenerate.
3328         * src/libbacktrace/Makefile.am: New file.
3329         * src/libbacktrace/Makefile.in: New file.
3330         * src/libbacktrace/backtrace-rename.h: New file.
3331         * src/libbacktrace/backtrace-supported.h.in: New file.
3332         * src/libbacktrace/config.h.in: New file.
3333         * testsuite/lib/libstdc++.exp (check_effective_target_stacktrace):
3334         New proc.
3335         * testsuite/20_util/stacktrace/entry.cc: New test.
3336         * testsuite/20_util/stacktrace/synopsis.cc: New test.
3337         * testsuite/20_util/stacktrace/version.cc: New test.
3339 2022-01-17  Jonathan Wakely  <jwakely@redhat.com>
3341         * doc/xml/manual/status_cxx2020.xml: Use final C++20 option
3342         names.
3343         * doc/html/manual/status.html: Regenerate.
3345 2022-01-17  Jonathan Wakely  <jwakely@redhat.com>
3347         PR libstdc++/103650
3348         * include/Makefile.am: Rename LT_OBJDIR and STDC_HEADERS.
3349         * include/Makefile.in: Regenerate.
3350         * testsuite/17_intro/headers/c++1998/103650.cc: New test.
3352 2022-01-17  Matthias Kretz  <m.kretz@gsi.de>
3354         * include/experimental/bits/simd.h (__floating_point_flags): Do
3355         not rely on the presence of the math_errhandling macro.
3357 2022-01-17  Jonathan Wakely  <jwakely@redhat.com>
3359         * include/bits/shared_ptr_atomic.h (_Sp_atomic): Add typename
3360         to qualified-id for dependent type.
3362 2022-01-17  Jonathan Wakely  <jwakely@redhat.com>
3364         * doc/xml/manual/status_cxx2020.xml: Update.
3365         * doc/html/manual/status.html: Regenerate.
3367 2022-01-17  Jonathan Wakely  <jwakely@redhat.com>
3368             Thomas Rodgers  <trodgers@redhat.com>
3370         * include/bits/shared_ptr_atomic.h (__cpp_lib_atomic_shared_ptr):
3371         New macro.
3372         (_Sp_atomic): New class template.
3373         (atomic<shared_ptr<T>>, atomic<weak_ptr<T>>): New partial
3374         specializations.
3375         * include/bits/shared_ptr_base.h (__shared_count, __weak_count)
3376         (__shared_ptr, __weak_ptr): Declare _Sp_atomic as a friend.
3377         * include/std/version (__cpp_lib_atomic_shared_ptr): New macro.
3378         * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc: New
3379         test.
3380         * testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: New test.
3382 2022-01-15  Matthias Kretz  <m.kretz@gsi.de>
3384         * include/experimental/bits/simd.h: Move feature detection bools
3385         and add __have_avx512bitalg, __have_avx512vbmi2,
3386         __have_avx512vbmi, __have_avx512ifma, __have_avx512cd,
3387         __have_avx512vnni, __have_avx512vpopcntdq.
3388         (__detail::__machine_flags): New function which returns a unique
3389         uint64 depending on relevant -m and -f flags.
3390         (__detail::__odr_helper): New type alias for either an anonymous
3391         type or a type specialized with the __machine_flags number.
3392         (_SimdIntOperators): Change template parameters from _Impl to
3393         _Tp, _Abi because _Impl now has an __odr_helper parameter which
3394         may be _OdrEnforcer from the anonymous namespace, which makes
3395         for a bad base class.
3396         (many): Either add __odr_helper template parameter or mark as
3397         always_inline.
3398         * include/experimental/bits/simd_detail.h: Add defines for
3399         AVX512BITALG, AVX512VBMI2, AVX512VBMI, AVX512IFMA, AVX512CD,
3400         AVX512VNNI, AVX512VPOPCNTDQ, and AVX512VP2INTERSECT.
3401         * include/experimental/bits/simd_builtin.h: Add __odr_helper
3402         template parameter or mark as always_inline.
3403         * include/experimental/bits/simd_fixed_size.h: Ditto.
3404         * include/experimental/bits/simd_math.h: Ditto.
3405         * include/experimental/bits/simd_scalar.h: Ditto.
3406         * include/experimental/bits/simd_neon.h: Add __odr_helper
3407         template parameter.
3408         * include/experimental/bits/simd_ppc.h: Ditto.
3409         * include/experimental/bits/simd_x86.h: Ditto.
3411 2022-01-14  Uroš Bizjak  <ubizjak@gmail.com>
3413         * testsuite/22_locale/numpunct/members/char/3.cc:
3414         Require pt_PT locale instead of nl_NL.
3415         (test02): Use pt_PT locale instead of nl_NL.
3417 2022-01-14  Jonathan Wakely  <jwakely@redhat.com>
3419         PR libstdc++/91260
3420         PR libstdc++/91383
3421         PR libstdc++/95065
3422         * include/backward/binders.h (bind1st, bind2nd): Add deprecated
3423         attribute.
3424         * include/bits/refwrap.h (_Maybe_unary_or_binary_function):
3425         Disable deprecated warnings for base classes.
3426         (_Reference_wrapper_base): Likewise.
3427         * include/bits/shared_ptr_base.h (_Sp_owner_less): Likewise.
3428         * include/bits/stl_bvector.h (_Bit_iterator_base): Likewise.
3429         * include/bits/stl_function.h (unary_function, binary_function):
3430         Add deprecated attribute.
3431         (unary_negate, not1, binary_negate, not2, ptr_fun)
3432         (pointer_to_unary_function, pointer_to_binary_function)
3433         (mem_fun_t, const_mem_fun_t, mem_fun_ref_t, const_mem_fun_ref_t)
3434         (mem_fun1_t, const_mem_fun1_t, mem_fun_ref1_t)
3435         (const_mem_fun1_ref_t, mem_fun, mem_fun_ref): Add deprecated
3436         attributes.
3437         * include/bits/stl_iterator.h: Disable deprecated warnings for
3438         std::iterator base classes.
3439         * include/bits/stl_iterator_base_types.h (iterator): Add
3440         deprecated attribute.
3441         * include/bits/stl_map.h (map::value_compare): Disable
3442         deprecated warnings for base class.
3443         * include/bits/stl_multimap.h (multimap::value_compare):
3444         Likewise.
3445         * include/bits/stl_raw_storage_iter.h (raw_storage_iterator):
3446         Add deprecated attribute.
3447         * include/bits/stl_tempbuf.h (get_temporary_buffer): Likewise.
3448         * include/bits/stream_iterator.h: Disable deprecated warnings.
3449         * include/bits/streambuf_iterator.h: Likewise.
3450         * include/ext/bitmap_allocator.h: Remove unary_function base
3451         classes.
3452         * include/ext/functional: Disable deprecated warnings.
3453         * include/ext/rope: Likewise.
3454         * include/ext/throw_allocator.h: Likewise.
3455         * include/std/type_traits (result_of): Add deprecated attribute.
3456         * include/tr1/functional: Disable deprecated warnings.
3457         * include/tr1/functional_hash.h: Likewise.
3458         * testsuite/20_util/function_objects/binders/1.cc: Add
3459         -Wno-disable-deprecations.
3460         * testsuite/20_util/function_objects/binders/3113.cc: Likewise.
3461         * testsuite/20_util/function_objects/constexpr.cc: Add
3462         dg-warning.
3463         * testsuite/20_util/raw_storage_iterator/base.cc: Likewise.
3464         * testsuite/20_util/raw_storage_iterator/dr2127.cc: Likewise.
3465         * testsuite/20_util/raw_storage_iterator/requirements/base_classes.cc:
3466         Likewise.
3467         * testsuite/20_util/raw_storage_iterator/requirements/explicit_instantiation/1.cc:
3468         Likewise.
3469         * testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc:
3470         Likewise.
3471         * testsuite/20_util/reference_wrapper/24803.cc:
3472         Likewise.
3473         * testsuite/20_util/reference_wrapper/typedefs.cc: Enable for
3474         C++20 and check for absence of nested types.
3475         * testsuite/20_util/shared_ptr/comparison/less.cc: Remove
3476         std::binary_function base class.
3477         * testsuite/20_util/temporary_buffer.cc: Add dg-warning.
3478         * testsuite/21_strings/basic_string/cons/char/69092.cc: Remove
3479         std::iterator base class.
3480         * testsuite/24_iterators/back_insert_iterator/requirements/base_classes.cc:
3481         Likewise.
3482         * testsuite/24_iterators/front_insert_iterator/requirements/base_classes.cc:
3483         Likewise.
3484         * testsuite/24_iterators/insert_iterator/requirements/base_classes.cc:
3485         Likewise.
3486         * testsuite/24_iterators/istream_iterator/requirements/base_classes.cc:
3487         Likewise.
3488         * testsuite/24_iterators/istreambuf_iterator/92285.cc:
3489         Likewise.
3490         * testsuite/24_iterators/istreambuf_iterator/requirements/base_classes.cc:
3491         Likewise.
3492         * testsuite/24_iterators/ostream_iterator/requirements/base_classes.cc:
3493         Likewise.
3494         * testsuite/24_iterators/ostreambuf_iterator/requirements/base_classes.cc:
3495         Likewise.
3496         * testsuite/24_iterators/reverse_iterator/requirements/base_classes.cc:
3497         Likewise.
3498         * testsuite/25_algorithms/copy/34595.cc:
3499         Likewise.
3500         * testsuite/25_algorithms/minmax/3.cc: Remove std::binary_function
3501         base class.
3502         * testsuite/25_algorithms/all_of/requirements/explicit_instantiation/2.cc:
3503         Disable deprecated warnings.
3504         * testsuite/25_algorithms/all_of/requirements/explicit_instantiation/pod.cc:
3505         Likewise.
3506         * testsuite/25_algorithms/any_of/requirements/explicit_instantiation/2.cc:
3507         Likewise.
3508         * testsuite/25_algorithms/any_of/requirements/explicit_instantiation/pod.cc:
3509         Likewise.
3510         * testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/2.cc:
3511         Likewise.
3512         * testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/pod.cc:
3513         Likewise.
3514         * testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc:
3515         Likewise.
3516         * testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc:
3517         Likewise.
3518         * testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc:
3519         Likewise.
3520         * testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc:
3521         Likewise.
3522         * testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc:
3523         Likewise.
3524         * testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc:
3525         Likewise.
3526         * testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc:
3527         Likewise.
3528         * testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc:
3529         Likewise.
3530         * testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/2.cc:
3531         Likewise.
3532         * testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/pod.cc:
3533         Likewise.
3534         * testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc:
3535         Likewise.
3536         * testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc:
3537         Likewise.
3538         * testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/2.cc:
3539         Likewise.
3540         * testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/pod.cc:
3541         Likewise.
3542         * testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/2.cc:
3543         Likewise.
3544         * testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/pod.cc:
3545         Likewise.
3546         * testsuite/25_algorithms/none_of/requirements/explicit_instantiation/2.cc:
3547         Likewise.
3548         * testsuite/25_algorithms/none_of/requirements/explicit_instantiation/pod.cc:
3549         Likewise.
3550         * testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc:
3551         Likewise.
3552         * testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc:
3553         Likewise.
3554         * testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/2.cc:
3555         Likewise.
3556         * testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/pod.cc:
3557         Likewise.
3558         * testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/2.cc:
3559         Likewise.
3560         * testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/pod.cc:
3561         Likewise.
3562         * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
3563         Likewise.
3564         * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
3565         Likewise.
3566         * testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc:
3567         Likewise.
3568         * testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc:
3569         Likewise.
3570         * testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc:
3571         Likewise.
3572         * testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc:
3573         Likewise.
3574         * testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc:
3575         Likewise.
3576         * testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc:
3577         Likewise.
3578         * testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc:
3579         Likewise.
3580         * testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc:
3581         Likewise.
3582         * testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc:
3583         Likewise.
3584         * testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc:
3585         Likewise.
3586         * testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc:
3587         Likewise.
3588         * testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc:
3589         Likewise.
3590         * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc:
3591         Likewise.
3592         * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc:
3593         Likewise.
3594         * testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc:
3595         Likewise.
3596         * testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc:
3597         Likewise.
3598         * testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc: Add
3599         dg-warning.
3600         * testsuite/ext/pb_ds/example/priority_queue_erase_if.cc:
3601         Likewise.
3602         * testsuite/ext/pb_ds/example/priority_queue_split_join.cc:
3603         Likewise.
3604         * testsuite/tr1/3_function_objects/reference_wrapper/typedefs.cc:
3605         Disable deprecated warnings.
3606         * testsuite/tr1/6_containers/hash/requirements/base_classes.cc:
3607         Likewise.
3608         * testsuite/util/regression/trait/erase_if_fn.hpp: Remove
3609         std::unary_function base classes.
3610         * testsuite/util/testsuite_iterators.h (output_iterator_wrapper):
3611         Remove std::iterator base classes.
3613 2022-01-14  Jonathan Wakely  <jwakely@redhat.com>
3615         * include/bits/shared_ptr.h (__cpp_lib_shared_ptr_weak_type):
3616         Correct type of macro value.
3617         (shared_ptr): Add additional friend declarations.
3618         (make_shared, allocate_shared): Constrain existing overloads and
3619         remove static_assert.
3620         * include/bits/shared_ptr_base.h (__cpp_lib_smart_ptr_for_overwrite):
3621         New macro.
3622         (_Sp_counted_ptr_inplace<T, Alloc, Lp>): New partial
3623         specialization for use with make_shared_for_overwrite.
3624         (__cpp_lib_shared_ptr_arrays): Update value for C++20.
3625         (_Sp_counted_array_base): New class template.
3626         (_Sp_counted_array): New class template.
3627         (__shared_count(_Tp*&, const _Sp_counted_array_base&, _Init)):
3628         New constructor for allocating shared arrays.
3629         (__shared_ptr(const _Sp_counted_array_base&, _Init)): Likewise.
3630         * include/std/version (__cpp_lib_shared_ptr_weak_type): Correct
3631         type.
3632         (__cpp_lib_shared_ptr_arrays): Update value for C++20.
3633         (__cpp_lib_smart_ptr_for_overwrite): New macro.
3634         * testsuite/20_util/shared_ptr/creation/99006.cc: Adjust
3635         expected errors.
3636         * testsuite/20_util/shared_ptr/creation/array.cc: New test.
3637         * testsuite/20_util/shared_ptr/creation/overwrite.cc: New test.
3638         * testsuite/20_util/shared_ptr/creation/version.cc: New test.
3639         * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: Check
3640         feature test macro. Test non-trivial default-initialization.
3642 2022-01-14  Jonathan Wakely  <jwakely@redhat.com>
3644         * include/bits/stl_construct.h (_Construct, _Construct_novalue):
3645         Also cast away cv-qualifiers when converting pointer to void.
3646         * testsuite/20_util/allocator/void.cc: Test construct function
3647         with cv-qualified types.
3649 2022-01-14  Jonathan Wakely  <jwakely@redhat.com>
3651         PR libstdc++/103992
3652         * include/bits/stl_iterator.h (common_iterator): Use
3653         std::construct_at instead of placement new.
3654         * testsuite/24_iterators/common_iterator/1.cc: Check copy
3655         construction is usable in constant expressions.
3657 2022-01-14  Jonathan Wakely  <jwakely@redhat.com>
3659         * doc/xml/manual/status_cxx2011.xml: Document new tokens
3660         accepted by std::random_device constructor.
3661         * doc/html/manual/status.html: Regenerate.
3663 2022-01-12  Patrick Palka  <ppalka@redhat.com>
3665         * testsuite/20_util/to_chars/103955.cc: Add explicit dg-do
3666         directive.
3668 2022-01-12  Patrick Palka  <ppalka@redhat.com>
3670         PR libstdc++/103955
3671         * src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
3672         Track the excess precision separately from the effective
3673         precision.  Avoid overflow in bounds check by splitting it into
3674         two checks.
3675         (__floating_to_chars_precision): Avoid overflow in bounds checks
3676         similarly.
3677         * testsuite/20_util/to_chars/103955.cc: New test.
3679 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
3681         PR libstdc++/103726
3682         * include/Makefile.am: Install <source_location> for
3683         freestanding.
3684         * include/Makefile.in: Regenerate.
3685         * include/std/version (__cpp_lib_source_location): Define for
3686         freestanding.
3688 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
3690         * include/std/ranges (ranges::lazy_split_view::_InnerIter::end()):
3691         Add neoxcept (LWG 3593).
3693 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
3695         * include/std/ranges (ranges::__detail::__box): Add constexpr to
3696         assignment operators (LWG 3572).
3697         * testsuite/std/ranges/adaptors/filter.cc: Check assignment of a
3698         view that uses copyable-box.
3700 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
3702         PR libstdc++/103726
3703         * include/Makefile.am: Install <coroutine> for freestanding.
3704         * include/Makefile.in: Regenerate.
3705         * include/std/coroutine: Adjust headers and preprocessor
3706         conditions.
3707         (__coroutine_traits_impl): Use concepts when available.
3708         [_GLIBCXX_HOSTED] (hash<coroutine_handle>): Define.
3710 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
3712         * include/std/ostream (operator<<(basic_ostream&, charT)):
3713         Use unformatted input if no padding is needed.
3714         (operator<<(basic_ostream<char>&, char)): Likewise.
3716 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
3718         PR libstdc++/103891
3719         * include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
3720         Define.
3721         * include/std/variant (__cpp_lib_variant): Only define C++20
3722         value when the compiler is known to support conditionally
3723         trivial destructors.
3724         * include/std/version (__cpp_lib_variant): Likewise.
3726 2022-01-11  Jonathan Wakely  <jwakely@redhat.com>
3728         * include/bits/stl_iterator.h (common_iterator): Add constexpr
3729         to all member functions (LWG 3574).
3730         * testsuite/24_iterators/common_iterator/1.cc: Evaluate some
3731         tests as constant expressions.
3732         * testsuite/24_iterators/common_iterator/2.cc: Likewise.
3734 2022-01-10  Jakub Jelinek  <jakub@redhat.com>
3736         PR libstdc++/77760
3737         * include/bits/locale_facets_nonio.h (__time_get_state): New struct.
3738         (time_get::_M_extract_via_format): Declare new method with
3739         __time_get_state& as an extra argument.
3740         * include/bits/locale_facets_nonio.tcc (_M_extract_via_format): Add
3741         __state argument, set various fields in it while parsing.  Handle %j,
3742         %U, %w and %W, fix up handling of %y, %Y and %C, don't adjust tm_hour
3743         for %p immediately.  Add a wrapper around the method without the
3744         __state argument for backwards compatibility.
3745         (_M_extract_num): Remove all __len == 4 special cases.
3746         (time_get::do_get_time, time_get::do_get_date, time_get::do_get): Zero
3747         initialize __state, pass it to _M_extract_via_format and finalize it
3748         at the end.
3749         (do_get_year): For 1-2 digit parsed years, map 0-68 to 2000-2068,
3750         69-99 to 1969-1999.  For 3-4 digit parsed years use that as year.
3751         (get): If do_get isn't overloaded from the locale_facets_nonio.tcc
3752         version, don't call do_get but call _M_extract_via_format instead to
3753         pass around state.
3754         * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export _M_extract_via_format
3755         with extra __time_get_state and __time_get_state::_M_finalize_state.
3756         * src/c++98/locale_facets.cc (is_leap, day_of_the_week,
3757         day_of_the_year): New functions in anon namespace.
3758         (mon_yday): New var in anon namespace.
3759         (__time_get_state::_M_finalize_state): Define.
3760         * testsuite/22_locale/time_get/get/char/4.cc: New test.
3761         * testsuite/22_locale/time_get/get/wchar_t/4.cc: New test.
3762         * testsuite/22_locale/time_get/get_year/char/1.cc (test01): Parse 197
3763         as year 197AD instead of error.
3764         * testsuite/22_locale/time_get/get_year/char/5.cc (test01): Parse 1 as
3765         year 2001 instead of error.
3766         * testsuite/22_locale/time_get/get_year/char/6.cc: New test.
3767         * testsuite/22_locale/time_get/get_year/wchar_t/1.cc (test01): Parse
3768         197 as year 197AD instead of error.
3769         * testsuite/22_locale/time_get/get_year/wchar_t/5.cc (test01): Parse
3770         1 as year 2001 instead of error.
3771         * testsuite/22_locale/time_get/get_year/wchar_t/6.cc: New test.
3773 2022-01-10  Jonathan Wakely  <jwakely@redhat.com>
3775         PR libstdc++/103866
3776         * acinclude.m4 (GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS): Do
3777         nothing for freestanding builds.
3778         (GLIBCXX_ENABLE_HOSTED): Define FREESTANDING_FLAGS.
3779         * configure.ac: Do not use AC_LIBTOOL_DLOPEN when configured
3780         with --without-headers.  Do not use GCC_HEADER_STDINT for
3781         freestanding builds.
3782         * libsupc++/Makefile.am (HOSTED_CXXFLAGS): Use -ffreestanding
3783         for freestanding builds.
3784         * configure: Regenerate.
3785         * Makefile.in: Regenerate.
3786         * doc/Makefile.in: Regenerate.
3787         * include/Makefile.in: Regenerate.
3788         * libsupc++/Makefile.in: Regenerate.
3789         * po/Makefile.in: Regenerate.
3790         * python/Makefile.in: Regenerate.
3791         * src/Makefile.in: Regenerate.
3792         * src/c++11/Makefile.in: Regenerate.
3793         * src/c++17/Makefile.in: Regenerate.
3794         * src/c++20/Makefile.in: Regenerate.
3795         * src/c++98/Makefile.in: Regenerate.
3796         * src/filesystem/Makefile.in: Regenerate.
3797         * testsuite/Makefile.in: Regenerate.
3799 2022-01-10  Jonathan Wakely  <jwakely@redhat.com>
3801         * testsuite/28_regex/algorithms/regex_replace/char/103664.cc:
3802         Add dg-timeout-factor directive.
3803         * testsuite/28_regex/basic_regex/84110.cc: Likewise.
3804         * testsuite/28_regex/basic_regex/ctors/char/other.cc: Likewise.
3805         * testsuite/28_regex/match_results/102667.cc: Likewise.
3807 2022-01-10  Jonathan Wakely  <jwakely@redhat.com>
3809         * doc/xml/manual/using.xml: Update documentation around default
3810         -std option.
3811         * doc/html/*: Regenerate.
3813 2022-01-10  Jonathan Wakely  <jwakely@redhat.com>
3815         PR libstdc++/100017
3816         * src/c++17/Makefile.am (AM_CXXFLAGS): Add -nostdinc++.
3817         * src/c++17/Makefile.in: Regenerate.
3819 2022-01-09  Sandra Loosemore  <sandra@codesourcery.com>
3821         * testsuite/18_support/type_info/constexpr.cc: Add explicit
3822         -fdelete-null-pointer-checks option.
3824 2022-01-06  Pavel I. Kryukov  <pavel.kryukov@phystech.edu>
3825             Jonathan Wakely  <jwakely@redhat.com>
3827         PR libstdc++/103853
3828         * include/bits/forward_list.tcc (forward_list::merge): Check for
3829         self-merge.
3830         * testsuite/23_containers/forward_list/operations/merge.cc: New test.
3832 2022-01-06  Jonathan Wakely  <jwakely@redhat.com>
3834         * include/bits/regex.h (basic_regex, match_results): Qualify
3835         name in friend declaration, to work around Clang bug.
3837 2022-01-06  Jonathan Wakely  <jwakely@redhat.com>
3839         * testsuite/ext/rope/pthread7-rope.cc: Add dg-timeout-factor.
3841 2022-01-06  Jonathan Wakely  <jwakely@redhat.com>
3843         PR libstdc++/103911
3844         * include/std/charconv (__from_chars_alpha_to_num): Return
3845         char instead of unsigned char. Change invalid return value to
3846         127 instead of using numeric trait.
3847         (__from_chars_alnum): Fix comment. Do not use std::isdigit.
3848         Change type of variable to char.
3850 2022-01-05  François Dumont  <fdumont@gcc.gnu.org>
3852         PR libstdc++/68303
3853         * include/bits/hashtable_policy.h
3854         (_Hashtable_hash_traits<_Hash>): New.
3855         (_Hash_code_base<>::_M_hash_code(const _Hash_node_value<>&)): New.
3856         (_Hashtable_base<>::_M_key_equals): New.
3857         (_Hashtable_base<>::_M_equals): Use latter.
3858         (_Hashtable_base<>::_M_key_equals_tr): New.
3859         (_Hashtable_base<>::_M_equals_tr): Use latter.
3860         * include/bits/hashtable.h
3861         (_Hashtable<>::__small_size_threshold()): New, use _Hashtable_hash_traits.
3862         (_Hashtable<>::find): Loop through elements to look for key if size is lower
3863         than __small_size_threshold().
3864         (_Hashtable<>::_M_emplace(true_type, _Args&&...)): Likewise.
3865         (_Hashtable<>::_M_insert_unique(_Kt&&, _Args&&, const _NodeGenerator&)): Likewise.
3866         (_Hashtable<>::_M_compute_hash_code(const_iterator, const key_type&)): New.
3867         (_Hashtable<>::_M_emplace(const_iterator, false_type, _Args&&...)): Use latter.
3868         (_Hashtable<>::_M_find_before_node(const key_type&)): New.
3869         (_Hashtable<>::_M_erase(true_type, const key_type&)): Use latter.
3870         (_Hashtable<>::_M_erase(false_type, const key_type&)): Likewise.
3871         * src/c++11/hashtable_c++0x.cc: Include <bits/functional_hash.h>.
3872         * testsuite/util/testsuite_performance.h
3873         (report_performance): Use 9 width to display memory.
3874         * testsuite/performance/23_containers/insert_erase/unordered_small_size.cc:
3875         New performance test case.
3877 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
3879         PR libstdc++/103919
3880         * include/bits/basic_string.h (basic_string(const T&, size_t, size_t)):
3881         Relax constraints on string_view parameter.
3882         * include/bits/cow_string.h (basic_string(const T&, size_t, size_t)):
3883         Likewise.
3884         * testsuite/21_strings/basic_string/cons/char/103919.cc: New test.
3886 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
3888         * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export new symbol for
3889         ARM EABI.
3890         * include/bits/c++config (_GLIBCXX23_CONSTEXPR): Define.
3891         * include/std/version (__cpp_lib_constexpr_typeinfo): Define.
3892         * libsupc++/tinfo.cc: Add #error to ensure non-inline definition
3893         is emitted.
3894         (type_info::__equal): Define alias symbol.
3895         * libsupc++/typeinfo (type_info::before): Combine different
3896         implementations into one.
3897         (type_info::operator==): Likewise. Use address equality for
3898         constant evaluation. Call __equal for targets that require the
3899         definition to be non-inline.
3900         * testsuite/18_support/type_info/constexpr.cc: New test.
3902 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
3904         * src/c++11/cxx11-ios_failure.cc (io_error_category): Define
3905         class and virtual functions as 'final'.
3906         (io_category_instance): Use constinit union to make the object
3907         immortal.
3908         * src/c++11/future.cc (future_error_category): Define class and
3909         virtual functions as 'final'.
3910         (future_category_instance): Use constinit union.
3912 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
3914         * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Strip
3915         versioned namespace from the type name that is printed.
3917 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
3919         * python/libstdcxx/v6/printers.py (StdRegexStatePrinter): New
3920         printer for std::regex NFA states.
3922 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
3924         * testsuite/23_containers/forward_list/operations/1.cc: Fill in
3925         placeholders in comments.
3926         * testsuite/23_containers/forward_list/operations/2.cc:
3927         Likewise.
3928         * testsuite/23_containers/forward_list/operations/3.cc:
3929         Likewise.
3930         * testsuite/23_containers/forward_list/operations/4.cc:
3931         Likewise.
3932         * testsuite/23_containers/forward_list/operations/5.cc:
3933         Likewise.
3934         * testsuite/23_containers/forward_list/operations/6.cc:
3935         Likewise.
3936         * testsuite/23_containers/forward_list/operations/7.cc:
3937         Likewise.
3939 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
3941         PR libstdc++/103848
3942         * include/bits/stl_deque.h (operator-): Do not use 0 as null
3943         pointer constant.
3945 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
3947         * include/bits/alloc_traits.h (allocator_traits<allocator<void>>):
3948         Use std::_Construct for construct.
3950 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
3952         PR libstdc++/103877
3953         * doc/xml/faq.xml: Add '-x c++' to preprocessor command.
3954         * doc/html/faq.html: Regenerate.
3956 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
3958         * include/bits/regex.h (__regex_algo_impl): Change __policy and
3959         __match_mode template parameters to be function parameters.
3960         (regex_match, regex_search): Pass policy and match mode as
3961         function arguments.
3962         * include/bits/regex.tcc (__regex_algo_impl): Change template
3963         parameters to function parameters.
3964         * include/bits/regex_compiler.h (_RegexTranslatorBase): Use
3965         'if constexpr' for conditions using template parameters.
3966         (_RegexTranslator): Likewise.
3967         * include/bits/regex_executor.tcc (_Executor::_M_handle_accept):
3968         Likewise.
3969         * testsuite/util/testsuite_regex.h (regex_match_debug)
3970         (regex_search_debug): Move template arguments to function
3971         arguments.
3973 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
3975         * testsuite/util/testsuite_regex.h (regex_match_debug): Compare
3976         results even if the match failed.
3978 2022-01-05  Jonathan Wakely  <jwakely@redhat.com>
3980         * include/bits/regex_compiler.tcc: Adjust all calls to
3981         __throw_regex_error.
3982         * include/bits/regex_error.h (__throw_regex_error): Add noreturn
3983         attribute.
3984         * include/bits/regex_scanner.tcc: Likewise.
3985         * src/c++11/regex.cc (desc): New helper function.
3986         (regex_error::regex_error(error_type)): Use desc to get a string
3987         corresponding to the error code.
3990 Copyright (C) 2022 Free Software Foundation, Inc.
3992 Copying and distribution of this file, with or without modification,
3993 are permitted in any medium without royalty provided the copyright
3994 notice and this notice are preserved.