1 2022-08-31 Patrick Palka <ppalka@redhat.com>
3 * include/bits/ranges_base.h (__advance_fn::operator()): Add
4 parentheses in assert condition to avoid -Wparentheses warning.
5 * include/std/ranges: (take_view::take_view): Uglify 'base'.
6 (take_while_view::take_while_view): Likewise.
7 (elements_view::elements_view): Likewise.
8 (views::_Zip::operator()): Adjust position of [[nodiscard]] for
9 compatibility with -fconcepts-ts.
10 (zip_transform_view::_Sentinel): Uglify 'OtherConst'.
11 (views::_ZipTransform::operator()): Adjust position of
12 [[nodiscard]] for compatibilty with -fconcepts-ts.
14 2022-08-31 Martin Liska <mliska@suse.cz>
16 * configure: Regenerate.
17 * crossconfig.m4: Remove deprecated ports.
19 2022-08-31 François Dumont <fdumont@gcc.gnu.org>
21 * include/debug/debug.h: Use nullptr rather than '0' in checks in post-C++11.
22 * include/debug/string: Likewise.
23 * testsuite/21_strings/basic_string/operations/ends_with/char.cc: Use __gnu_test::string.
24 * testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc: Likewise.
25 * testsuite/21_strings/basic_string/operations/ends_with/wchar_t.cc: Likewise.
26 * testsuite/21_strings/basic_string/operations/starts_with/wchar_t.cc: Likewise.
27 * testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc: Likewise.
28 * testsuite/21_strings/basic_string/operations/starts_with/char.cc: Likewise..
30 2022-08-31 Patrick Palka <ppalka@redhat.com>
32 * include/std/ranges (adjacent_view): Define.
33 (enable_borrowed_range<adjacent_view>): Define.
34 (__detail::__repeated_tuple): Define.
35 (adjacent_view::_Iterator): Define.
36 (adjacent_view::_Sentinel): Define.
37 (views::__detail::__can_adjacent_view): Define.
38 (views::_Adjacent): Define.
39 (views::adjacent): Define.
40 (views::pairwise): Define.
41 * testsuite/std/ranges/adaptors/adjacent/1.cc: New test.
43 2022-08-31 François Dumont <fdumont@gcc.gnu.org>
45 * include/debug/formatter.h
46 [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_state): Declare.
47 [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_create_state): Declare.
48 [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_callback): Define.
49 [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_error_callback): Define.
50 [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_func): Define.
51 [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full): Declare.
52 [_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_state): New.
53 [_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_full): New.
54 * src/c++11/debug.cc [_GLIBCXX_HAVE_STACKTRACE](print_backtrace): New.
55 (_Error_formatter::_M_error()): Adapt.
56 * src/libbacktrace/Makefile.am: Add backtrace.c.
57 * src/libbacktrace/Makefile.in: Regenerate.
58 * src/libbacktrace/backtrace-rename.h (backtrace_full): New.
59 * testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc: New test.
60 * doc/xml/manual/debug_mode.xml: Document _GLIBCXX_DEBUG_BACKTRACE.
61 * doc/xml/manual/using.xml: Likewise.
63 2022-08-31 Patrick Palka <ppalka@redhat.com>
65 * testsuite/20_util/logical_traits/requirements/short_circuit.cc: New test.
67 2022-08-31 Jonathan Wakely <jwakely@redhat.com>
69 * include/bits/refwrap.h (reference_wrapper::operator()): Add
70 noexcept-specifier and use __invoke_result instead of result_of.
71 * testsuite/20_util/reference_wrapper/invoke-noexcept.cc: New test.
73 2022-08-31 Jonathan Wakely <jwakely@redhat.com>
75 * testsuite/20_util/reference_wrapper/invoke-2.cc: Improve
77 * testsuite/20_util/reference_wrapper/invoke-3.cc: Likewise.
78 * testsuite/20_util/reference_wrapper/invoke.cc: Likewise.
80 2022-08-31 Jonathan Wakely <jwakely@redhat.com>
82 * include/bits/basic_string.h (basic_string): Add nodiscard
83 attribute to all relevant functions.
84 * include/std/string_view (basic_string_view): Likewise.
85 * testsuite/21_strings/basic_string/capacity/1.cc: Cast unused
87 * testsuite/21_strings/basic_string/capacity/char/1.cc:
89 * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
91 * testsuite/21_strings/basic_string/cons/char/self_move.cc:
93 * testsuite/21_strings/basic_string/element_access/char/1.cc:
95 * testsuite/21_strings/basic_string/element_access/char/21674.cc:
97 * testsuite/21_strings/basic_string/element_access/wchar_t/1.cc:
99 * testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc:
101 * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
102 * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
103 * testsuite/21_strings/basic_string/operations/contains/nonnull.cc:
104 Add -Wno-unused-result to options.
105 * testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc:
107 * testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc:
109 * testsuite/21_strings/basic_string/operators/char/1.cc: Cast
110 unused results to void.
111 * testsuite/21_strings/basic_string/operators/wchar_t/1.cc:
113 * testsuite/21_strings/basic_string_view/capacity/1.cc:
115 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
117 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
119 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
121 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
123 * testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc:
125 Add -Wno-unused-result to options.
126 * testsuite/21_strings/basic_string_view/operations/ends_with/nonnull.cc:
128 * testsuite/21_strings/basic_string_view/operations/starts_with/nonnull.cc:
130 * testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc: Cast
131 unused results to void.
132 * testsuite/27_io/basic_stringbuf/sputbackc/wchar_t/1.cc:
134 * testsuite/27_io/basic_stringbuf/sungetc/char/1.cc: Likewise.
135 * testsuite/27_io/basic_stringbuf/sungetc/wchar_t/1.cc:
138 2022-08-27 Patrick Palka <ppalka@redhat.com>
140 * testsuite/20_util/logical_traits/requirements/base_classes.cc: New test.
142 2022-08-26 Patrick Palka <ppalka@redhat.com>
144 * include/std/ranges (zip_view::_Iterator::operator<): Remove
146 (zip_view::_Iterator::operator>): Likewise.
147 (zip_view::_Iterator::operator<=): Likewise.
148 (zip_view::_Iterator::operator>=): Likewise.
149 (zip_view::_Iterator::operator<=>): Remove three_way_comparable
150 constraint as per LWG 3692.
151 (zip_transform_view::_Iterator): Ditto as per LWG 3702.
153 2022-08-26 Patrick Palka <ppalka@redhat.com>
155 * include/std/ranges (zip_view::_Iterator): Befriend
157 (__detail::__range_iter_cat): Define.
158 (zip_transform_view): Define.
159 (zip_transform_view::_Iterator): Define.
160 (zip_transform_view::_Sentinel): Define.
161 (views::__detail::__can_zip_transform_view): Define.
162 (views::_ZipTransform): Define.
163 (views::zip_transform): Define.
164 * testsuite/std/ranges/zip_transform/1.cc: New test.
166 2022-08-26 Patrick Palka <ppalka@redhat.com>
168 * include/std/type_traits (enable_if, __enable_if_t): Define them
170 (__detail::__first_t): Define.
171 (__detail::__or_fn, __detail::__and_fn): Declare.
172 (__or_, __and_): Redefine as alias templates in terms of __or_fn
174 (__not_): Redefine as an alias template.
175 (__detail::__disjunction_impl, __detail::__conjunction_impl):
177 (conjuction, disjunction): Redefine in terms of __disjunction_impl
178 and __conjunction_impl.
180 2022-08-26 Jonathan Wakely <jwakely@redhat.com>
182 * include/std/system_error (error_code::_Check): New alias
183 template for constructor SFINAE constraint.
184 (error_code::error_code(ErrorCodeEnum)): Use it.
185 (error_code::operator=(ErrorCodeEnum)): Remove.
186 (error_condition::_Check): New alias template for constraint.
187 (error_condition::error_condition(ErrorConditionEnum)): Use it.
188 (error_condition::operator=(ErrorConditionEnum)): Remove.
189 * testsuite/19_diagnostics/error_code/cons/1.cc: Check
190 constructor taking user-defined error enum.
191 * testsuite/19_diagnostics/error_condition/cons/1.cc: Likewise.
193 2022-08-26 Jonathan Wakely <jwakely@redhat.com>
195 * include/bits/basic_string.h (starts_with, ends_with, contains):
196 Add nonnull attribute.
197 * include/bits/cow_string.h (starts_with, ends_with, contains):
199 * include/std/string_view (starts_with, ends_with, contains):
201 * testsuite/21_strings/basic_string/operations/contains/nonnull.cc
202 * testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc
203 * testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc
204 * testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc
205 * testsuite/21_strings/basic_string_view/operations/ends_with/nonnull.cc
206 * testsuite/21_strings/basic_string_view/operations/starts_with/nonnull.cc
208 2022-08-25 Patrick Palka <ppalka@redhat.com>
210 * include/std/ranges (lazy_split_view::_OuterIter::_M_current):
211 Remove redundant comment.
212 (lazy_split_view::_M_current): Likewise.
213 (common_view::common_view): Remove commented out view-converting
214 constructor as per LWG3405.
215 (elements_view::_Iterator::_Iterator): Uglify 'current' and 'i'.
217 2022-08-24 Patrick Palka <ppalka@redhat.com>
219 * include/bits/ranges_algo.h (__min_fn, min): Move to ...
220 * include/bits/ranges_util.h: ... here, in order to avoid
221 including all of ranges_algo.h from <ranges>.
222 * include/std/ranges (__detail::__zip_is_common): Define for
223 C++23 as per P2321R2.
224 (__detail::__tuple_or_pair): Likewise.
225 (__detail::__tuple_or_pair_t): Likewise.
226 (__detail::__tuple_transform): Likewise.
227 (__detail::__tuple_for_each): Likewise.
228 (zip_view): Likewise.
229 (enable_borrowed_range<zip_view>): Likewise.
230 (__detail::__all_random_access): Likewise.
231 (__detail::__all_bidirectional): Likewise.
232 (__detail::__all_forward): Likewise.
233 (__detail::__zip_view_iter_cat): Likewise.
234 (zip_view::_Iterator): Likewise.
235 (zip_view::_Sentinel): Likewise.
236 * testsuite/std/ranges/zip/1.cc: New test.
238 2022-08-24 Jonathan Wakely <jwakely@redhat.com>
241 2022-08-24 Will Hawkins <whh8b@obs.cr>
243 * include/bits/basic_string.h (operator+(const string&, const char*)):
244 Remove naive implementation.
245 * include/bits/basic_string.tcc (operator+(const string&, const char*)):
246 Add single-allocation implementation.
248 2022-08-24 Patrick Palka <ppalka@redhat.com>
250 * include/bits/stl_pair.h (pair::swap const): Add non-standard
251 is_swappable_v constraints.
252 * include/std/tuple (tuple::swap const): Likewise.
253 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Correct some
254 asserts in C++23 mode.
256 2022-08-24 Jonathan Wakely <jwakely@redhat.com>
258 * include/bits/stl_algo.h (__stable_sort): Cast size to
259 iterator's difference type.
260 * testsuite/25_algorithms/stable_sort/4.cc: New test.
262 2022-08-24 Will Hawkins <whh8b@obs.cr>
264 * include/bits/basic_string.h (operator+(const string&, const char*)):
265 Remove naive implementation.
266 * include/bits/basic_string.tcc (operator+(const string&, const char*)):
267 Add single-allocation implementation.
269 2022-08-24 Jonathan Wakely <jwakely@redhat.com>
271 * testsuite/20_util/duration_cast/rounding.cc: Check abs with
272 non-reduced duration.
274 2022-08-23 Patrick Palka <ppalka@redhat.com>
276 * include/bits/stl_bvector.h (_Bit_reference::operator=): Define
277 const overload for C++23 as per P2321R2.
278 * include/bits/stl_pair.h (pair::swap): Likewise.
279 (pair::pair): Define additional converting constructors for
280 C++23 as per P2321R2.
281 (pair::operator=): Define const overloads for C++23 as per
283 (swap): Define overload taking const pair& for C++23 as per
285 (basic_common_reference): Define partial specialization for
286 pair for C++23 as per P2321R2.
287 (common_type): Likewise.
288 * include/bits/uses_allocator_args.h
289 (uses_allocator_construction_args): Define additional pair
290 overloads for C++23 as per P2321R2.
291 * include/std/tuple (_Tuple_impl::_Tuple_impl): Define
292 additional converting constructors for C++23 as per P2321R2.
293 (_Tuple_impl::_M_assign): Define const overloads for C++23
295 (_Tuple_impl::_M_swap): Likewise.
296 (tuple::__constructible): Define as a convenient renaming of
297 _TCC<true>::__constructible.
298 (tuple::__convertible): As above but for _TCC<true>::__convertible.
299 (tuple::tuple): Define additional converting constructors for
300 C++23 as per P2321R2.
301 (tuple::operator=): Define const overloads for C++23 as per
303 (tuple::swap): Likewise.
304 (basic_common_reference): Define partial specialization for
305 tuple for C++23 as per P2321R2.
306 (common_type): Likewise.
307 * testsuite/20_util/pair/p2321r2.cc: New test.
308 * testsuite/20_util/tuple/p2321r2.cc: New test.
309 * testsuite/23_containers/vector/bool/element_access/1.cc: New test.
311 2022-08-23 Patrick Palka <ppalka@redhat.com>
313 * include/std/tuple (_TupleConstraints::__convertible): Define.
314 (_TupleConstraints::__constructible): Define.
315 (_TupleConstraints::__is_explicitly_constructible): Redefine this
316 in terms of __convertible and __constructible.
317 (_TupleConstraints::__is_implicitly_constructible): Likewise.
319 2022-08-23 Jonathan Wakely <jwakely@redhat.com>
322 * include/std/variant (__do_visit): Handle is_void<R> for zero
324 * testsuite/20_util/variant/visit_r.cc: Check std::visit<void>(v).
326 2022-08-22 Jonathan Wakely <jwakely@redhat.com>
329 * doc/xml/manual/using.xml: Document -lstdc++_libbacktrace
330 requirement for using std::stacktrace. Also adjust -frtti and
331 -fexceptions to document non-default (i.e. negative) forms.
332 * doc/html/*: Regenerate.
334 2022-08-22 Jonathan Wakely <jwakely@redhat.com>
337 * include/bits/std_thread.h (thread::_State_impl): Forward
338 individual arguments to _Invoker constructor.
339 (thread::_Invoker): Add constructor. Delete copies.
340 * include/std/future (__future_base::_Deferred_state): Forward
341 individual arguments to _Invoker constructor.
342 (__future_base::_Async_state_impl): Likewise.
343 * testsuite/30_threads/async/106695.cc: New test.
344 * testsuite/30_threads/thread/106695.cc: New test.
346 2022-08-22 Jonathan Wakely <jwakely@redhat.com>
349 * include/bits/regex_compiler.tcc (_Compiler::_M_cur_int_value):
350 Use built-ins to check for integer overflow in back-reference
352 * testsuite/28_regex/basic_regex/106607.cc: New test.
354 2022-08-17 Keef Aragon <keef.aragon@konscious.net>
356 * libsupc++/eh_alloc.cc (pool::free): Inverse comparison.
358 2022-08-08 François Dumont <fdumont@gcc.gnu.org>
360 * include/debug/formatter.h (__singular_value_init): New _Iterator_state enum entry.
361 (_Parameter<>(const _Safe_iterator<>&, const char*, _Is_iterator)): Check if iterator
362 parameter is value-initialized.
363 (_Parameter<>(const _Safe_local_iterator<>&, const char*, _Is_iterator)): Likewise.
364 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_value_initialized()): New. Adapt
366 * include/debug/safe_local_iterator.h (_Safe_local_iterator<>::_M_value_initialized()): New.
368 * src/c++11/debug.cc (_Safe_iterator_base::_M_reset): Do not reset _M_version.
369 (print_field(PrintContext&, const _Parameter&, const char*)): Adapt state_names.
370 * testsuite/23_containers/deque/debug/iterator1_neg.cc: New test.
371 * testsuite/23_containers/deque/debug/iterator2_neg.cc: New test.
372 * testsuite/23_containers/forward_list/debug/iterator1_neg.cc: New test.
373 * testsuite/23_containers/forward_list/debug/iterator2_neg.cc: New test.
374 * testsuite/23_containers/forward_list/debug/iterator3_neg.cc: New test.
376 2022-08-05 Jonathan Wakely <jwakely@redhat.com>
378 * include/experimental/scope (__cpp_lib_experimental_scope):
380 * testsuite/experimental/scopeguard/uniqueres.cc: Check macro.
382 2022-08-05 Jonathan Wakely <jwakely@redhat.com>
384 * include/Makefile.am: Add new header.
385 * include/Makefile.in: Regenerate.
386 * include/experimental/scope: New file.
387 * testsuite/experimental/scopeguard/uniqueres.cc: New test.
388 * testsuite/experimental/scopeguard/exit.cc: New test.
390 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
392 * include/std/string_view (basic_string_view(Range&&)): Add
393 explicit as per P2499R0.
394 * testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc:
395 Adjust implicit conversions. Check implicit conversions fail.
396 * testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc:
399 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
401 * include/bits/fs_dir.h (directory_iterator): Add comparison
402 with std::default_sentinel_t. Remove redundant operator!= for
404 * (recursive_directory_iterator): Likewise.
405 * include/bits/iterator_concepts.h [!__cpp_lib_concepts]
406 (default_sentinel_t, default_sentinel): Define even if concepts
408 * include/bits/regex.h (regex_iterator): Add comparison with
409 std::default_sentinel_t. Remove redundant operator!= for C++20.
410 (regex_token_iterator): Likewise.
411 (regex_token_iterator::_M_end_of_seq()): Add noexcept.
412 * testsuite/27_io/filesystem/iterators/lwg3719.cc: New test.
413 * testsuite/28_regex/iterators/regex_iterator/lwg3719.cc:
415 * testsuite/28_regex/iterators/regex_token_iterator/lwg3719.cc:
418 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
420 * include/std/expected (unexpected::_M_val): Rename to _M_unex.
421 (bad_expected_access::_M_val): Likewise.
423 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
425 * include/bits/ios_base.h (__cpp_lib_ios_noreplace): Update
427 * include/std/version (__cpp_lib_ios_noreplace): Likewise.
428 * testsuite/27_io/basic_ofstream/open/char/noreplace.cc: Check
430 * testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc:
433 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
436 * include/bits/atomic_wait.h (__waiter_pool_base::_M_notify):
437 Move increment of _M_ver here.
438 [!_GLIBCXX_HAVE_PLATFORM_WAIT]: Lock mutex around increment.
439 Use relaxed memory order and always notify all waiters.
440 (__waiter_base::_M_do_wait) [!_GLIBCXX_HAVE_PLATFORM_WAIT]:
441 Check value again after locking mutex.
442 (__waiter_base::_M_notify): Remove increment of _M_ver.
444 2022-08-04 Ulrich Drepper <drepper@gmail.com>
446 * python/libstdcxx/v6/printers.py (class StdTuplePrinter): Use
447 zero-based indeces just like std:get takes.
449 2022-07-29 Jonathan Wakely <jwakely@redhat.com>
452 * include/bits/stl_iterator.h (common_iterator::operator->):
453 Change return type to just auto.
455 2022-07-26 Thomas Rodgers <trodgers@redhat.com>
457 * include/bits/atomic_wait.h (__atomic_spin): Merge spin loops.
459 2022-07-20 Jonathan Wakely <jwakely@redhat.com>
462 * include/bits/stl_iterator.h (common_iterator): Define
463 destructor, copy constructor and move constructor as trivial
464 when the underlying types allow.
465 * testsuite/24_iterators/common_iterator/100823.cc: Check
466 triviality of special members.
468 2022-07-20 Jonathan Wakely <jwakely@redhat.com>
471 * include/bits/stl_iterator.h (common_iterator): Define move
472 constructor and move assignment operator.
473 (common_iterator::_M_assign): New function implementing
475 (common_iterator::operator=): Use _M_assign.
476 (common_iterator::_S_valueless): New constant.
477 * testsuite/24_iterators/common_iterator/100823.cc: New test.
479 2022-07-20 Jonathan Wakely <jwakely@redhat.com>
481 * include/bits/stl_iterator.h (common_iterator): Fix incorrect
482 uses of is_nothrow_assignable_v. Fix inconsistent constraints on
483 friend declaration. Do not move argument in copy constructor.
484 * testsuite/24_iterators/common_iterator/1.cc: Check for
485 noexcept constructibnle/assignable.
487 2022-07-19 François Dumont <fdumont@gcc.gnu.org>
489 * include/debug/debug.h [_GLIBCXX_DEBUG](__glibcxx_requires_string): Define
490 using _GLIBCXX_DEBUG_PEDASSERT.
491 [_GLIBCXX_DEBUG](__glibcxx_requires_string_len): Likewise.
492 * include/debug/macros.h
493 (__glibcxx_check_string, __glibcxx_check_string_len): Move...
494 * include/debug/string
495 (__glibcxx_check_string, __glibcxx_check_string_len): ...here. And define depending
496 on _GLIBCXX_DEBUG_PEDANTIC no matter if _GLIBCXX_DEBUG is defined.
497 Add using of std::string find, rfind, find_first_of, find_last_of, find_first_not_of
498 and find_last_not_of. Remove debug implementations having no debug assertion.
499 * testsuite/util/testsuite_string.h: New file. Provides __gnu_test::string and
500 __gnu_test::wtring which definition depends on _GLIBCXX_DEBUG.
501 * testsuite/21_strings/basic_string/debug/find1_neg.cc: New test case.
502 * testsuite/21_strings/basic_string/debug/find2_neg.cc: New test case.
503 * testsuite/21_strings/basic_string/operations/find/char/1.cc:
504 Include <testsuite_string.h> and use __gnu_test::string.
505 * testsuite/21_strings/basic_string/operations/find/char/2.cc: Likewise.
506 * testsuite/21_strings/basic_string/operations/find/char/3.cc: Likewise.
507 * testsuite/21_strings/basic_string/operations/find/char/4.cc: Likewise.
508 * testsuite/21_strings/basic_string/operations/find/char/5.cc: Likewise.
509 * testsuite/21_strings/basic_string/operations/find/char/6.cc: Likewise.
510 * testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc:
511 Include <testsuite_string.h> and use __gnu_test::wstring.
512 * testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc: Likewise.
513 * testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc: Likewise.
514 * testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc: Likewise.
515 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc: Likewise.
516 * testsuite/21_strings/basic_string/operations/find/wchar_t/6.cc: Likewise.
518 2022-07-19 Jonathan Wakely <jwakely@redhat.com>
520 * include/std/type_traits (__cpp_lib_reference_from_temporary)
521 (reference_constructs_from_temporary)
522 (reference_converts_from_temporary): Only define when the
523 built-ins are available.
525 2022-07-19 Marco Falke <falke.marco@gmail.com>
527 * include/std/charconv (__from_chars_alnum_to_val): Replace
528 implicit conversion from int to unsigned char with explicit
531 2022-07-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
533 * configure: Regnerate.
534 * configure.ac (newlib, *-rtems*): Remove HAVE_POLL.
536 2022-07-18 François Dumont <fdumont@gcc.gnu.org>
538 * include/bits/stl_algo.h
539 (__merge_adaptive): Adapt to merge only when buffer is large enough..
540 (__merge_adaptive_resize): New, adapt merge when buffer is too small.
541 (__inplace_merge): Adapt, use latter.
542 (__stable_sort_adaptive): Adapt to sort only when buffer is large enough.
543 (__stable_sort_adaptive_resize): New, adapt sort when buffer is too small.
544 (__stable_sort): Adapt, use latter.
546 2022-07-15 Marek Polacek <polacek@redhat.com>
549 * include/std/type_traits (reference_constructs_from_temporary,
550 reference_converts_from_temporary): New class templates.
551 (reference_constructs_from_temporary_v,
552 reference_converts_from_temporary_v): New variable templates.
553 (__cpp_lib_reference_from_temporary): Define for C++23.
554 * include/std/version (__cpp_lib_reference_from_temporary): Define for
556 * testsuite/20_util/variable_templates_for_traits.cc: Test
557 reference_constructs_from_temporary_v and
558 reference_converts_from_temporary_v.
559 * testsuite/20_util/reference_from_temporary/value.cc: New test.
560 * testsuite/20_util/reference_from_temporary/value2.cc: New test.
561 * testsuite/20_util/reference_from_temporary/version.cc: New test.
563 2022-07-12 Jonathan Wakely <jwakely@redhat.com>
566 * include/std/istream [C++17] (operator>>(istream&, char*)):
567 Set eofbit if we stopped extracting at EOF.
568 * testsuite/27_io/basic_istream/extractors_character/char/pr106248.cc:
570 * testsuite/27_io/basic_istream/extractors_character/wchar_t/pr106248.cc:
573 2022-07-12 Jonathan Wakely <jwakely@redhat.com>
575 * include/bits/stl_iterator.h (__iter_to_alloc_t): Replace
576 add_const_t with const-qualifier.
577 * include/bits/utility.h (tuple_element<N, cv T>): Likewise for
579 * include/std/type_traits (add_const, add_volatile): Replace
580 typedef-declaration with using-declaration.
581 (add_cv): Replace add_const and add_volatile with cv-qualifiers.
582 * include/std/variant (variant_alternative<N, cv T>): Replace
583 add_const_t, add_volatile_t and add_cv_t etc. with cv-qualifiers.
585 2022-07-09 François Dumont <fdumont@gcc.gnu.org>
587 * include/std/string: Remove obsolete comment about char_traits.h including
590 2022-07-07 Jonathan Wakely <jwakely@redhat.com>
593 * include/bits/char_traits.h (__gnu_cxx::char_traits::move):
594 Remove workaround for front-end bug.
596 2022-07-05 Alexandre Oliva <oliva@adacore.com>
598 * testsuite/util/testsuite_fs.h (nonexistent_path): Explain
599 why we need the typecast.
601 2022-07-05 Alexandre Oliva <oliva@adacore.com>
603 * testsuite/util/testsuite_fs.h (nonexistent_path): Convert
604 the getpid result to an integral type.
606 2022-07-01 Jonathan Wakely <jwakely@redhat.com>
609 * include/Makefile.am (largefile-config.h): Add
610 stamp-${host_alias} prerequisite.
611 * include/Makefile.in: Regenerate.
613 2022-07-01 Jonathan Wakely <jwakely@redhat.com>
615 * include/bits/fs_ops.h: Add nodiscard to all pure functions.
616 * include/experimental/bits/fs_ops.h: Likewise.
617 * testsuite/27_io/filesystem/operations/all.cc: Do not discard
618 results of absolute and canonical.
619 * testsuite/27_io/filesystem/operations/absolute.cc: Cast
620 discarded result to void.
621 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
622 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
623 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
624 * testsuite/27_io/filesystem/operations/read_symlink.cc:
626 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
627 * testsuite/27_io/filesystem/operations/symlink_status.cc:
629 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
631 * testsuite/experimental/filesystem/operations/canonical.cc:
633 * testsuite/experimental/filesystem/operations/exists.cc:
635 * testsuite/experimental/filesystem/operations/is_empty.cc:
637 * testsuite/experimental/filesystem/operations/read_symlink.cc:
639 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
642 2022-07-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
644 * configure: Regnerate.
645 * configure.ac (newlib, *-rtems*): Enable TLS support for all RTEMS
646 targets except bfin, lm32, mips, moxie, or1k, and v850.
647 For all RTEMS targets, define HAVE_ALIGNED_ALLOC, HAVE_AT_QUICK_EXIT,
648 HAVE_LINK, HAVE_POLL, HAVE_QUICK_EXIT, HAVE_READLINK, HAVE_SETENV,
649 HAVE_SLEEP, HAVE_SOCKATMARK, HAVE_STRERROR_L, HAVE_SYMLINK,
650 HAVE_TRUNCATE, and HAVE_USLEEP.
651 * crossconfig.m4 (*-rtems*): Remove.
653 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
655 * include/bits/utility.h: Fix comment typos.
657 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
659 * src/c++17/fs_ops.cc (fs::temp_directory_path()): Include path
661 (fs::temp_directory_path(error_code&)): Rearrange to more
662 closely match the structure of the first overload.
663 * src/filesystem/ops.cc (fs::temp_directory_path): Likewise.
664 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
665 Check that exception contains the path.
666 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
669 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
672 * src/filesystem/ops.cc (has_trailing_slash): New helper
674 (fs::status): Strip trailing slashes.
675 (fs::symlink_status): Likewise.
676 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
677 Clean the environment before each test and use TMP instead of
678 TMPDIR so the test passes on Windows.
680 2022-06-28 Jonathan Wakely <jwakely@redhat.com>
682 * src/filesystem/dir-common.h (_Dir_base::_At_path):
683 Use char_type consistently for paths.
685 2022-06-28 Jonathan Wakely <jwakely@redhat.com>
687 * src/c++17/fs_dir.cc (_Dir::dir_and_pathname):: Replace with
688 current() returning _At_path.
689 (_Dir::_Dir, _Dir::open_subdir, _Dir::do_unlink): Adjust.
690 * src/filesystem/dir-common.h (_Dir_base::_At_path): New class.
691 (_Dir_base::_Dir_Base, _Dir_base::openat): Use _At_path.
692 * src/filesystem/dir.cc (_Dir::dir_and_pathname): Replace with
693 current() returning _At_path.
694 (_Dir::_Dir, _Dir::open_subdir): Adjust.
696 2022-06-28 Jonathan Wakely <jwakely@redhat.com>
698 * src/c++17/fs_dir.cc (_Dir::_Dir) [!_GLIBCXX_HAVE_OPENAT]:
699 Always store pathname if we don't have openat or unlinkat,
700 because the full path is needed to open sub-directories and
703 2022-06-28 Jonathan Wakely <jwakely@redhat.com>
705 * testsuite/20_util/from_chars/4.cc: Only use log2 if C99 math
706 functions are available.
708 2022-06-27 Alexandre Oliva <oliva@adacore.com>
710 * testsuite/20_util/to_chars/long_double.cc: Use cmath
711 long double overloads for nexttoward and ldexp.
713 2022-06-27 Alexandre Oliva <oliva@adacore.com>
715 * testsuite/experimental/simd/standard_abi_usable.cc: Require
717 * testsuite/experimental/simd/standard_abi_usable_2.cc:
720 2022-06-27 Alexandre Oliva <oliva@adacore.com>
722 * testsuite/26_numerics/complex/proj.cc: Skip test in the
723 circumstances in which the implementation of proj is known to
726 2022-06-27 Alexandre Oliva <oliva@adacore.com>
728 * src/c++17/fs_dir.cc (dir_and_pathname): Use dirfd if
729 _GLIBCXX_HAVE_OPENAT.
731 2022-06-27 Alexandre Oliva <oliva@adacore.com>
733 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc
734 (test06): Don't create symlinks when NO_SYMLINKS is defined.
736 2022-06-27 Alexandre Oliva <oliva@adacore.com>
738 * testsuite/lib/dg-options.exp (add_options_for_net_ts):
739 Add -Wl,--gc-sections for RTEMS targets.
740 * testsuite/experimental/net/timer/waitable/dest.cc: Link-time
742 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
743 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
744 Execution-time xfail on RTEMS.
745 * testsuite/experimental/net/internet/resolver/ops/reverse.cc:
748 2022-06-27 Jonathan Wakely <jwakely@redhat.com>
750 * testsuite/ext/mt_allocator/22309_thread.cc: Include <string>.
752 2022-06-27 Joel Brobecker <brobecker@adacore.com>
753 Jonathan Wakely <jwakely@redhat.com>
755 * testsuite/util/testsuite_fs.h (__gnu_test::nonexistent_path):
756 Always include a counter in the filename returned.
758 2022-06-27 Jonathan Wakely <jwakely@redhat.com>
760 * include/bits/move_only_function.h (_Never_valueless_alt):
761 Define partial specialization for std::move_only_function.
763 2022-06-27 Jonathan Wakely <jwakely@redhat.com>
765 * include/std/variant (_Build_FUN::_S_fun): Define fallback case
767 (__accepted_index, _Extra_visit_slot_needed): Replace class
768 templates with variable templates.
770 2022-06-27 Jonathan Wakely <jwakely@redhat.com>
772 * include/bits/fs_path.h (__is_path_iter_src): Replace class
773 template with variable template.
775 2022-06-27 Jonathan Wakely <jwakely@redhat.com>
777 * include/bits/chrono.h (is_clock_v): Define to false.
778 (is_clock_v<T>): Define partial specialization for true cases.
779 (is_clock): Define in terms of is_clock_v.
781 2022-06-24 Xi Ruoyao <xry111@xry111.site>
783 * scripts/extract_symvers.in: Use grep -E instead of egrep.
784 * scripts/run_doxygen: Likewise.
786 2022-06-24 Alexandre Oliva <oliva@adacore.com>
788 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for
790 * configure, config.h.in: Rebuilt.
791 * src/filesystem/dir-common.h (openat): Use ::openat if
792 _GLIBCXX_HAVE_OPENAT.
793 * src/filesystem/dir.cc (dir_and_pathname): Use dirfd if
794 _GLIBCXX_HAVE_OPENAT.
796 2022-06-24 Alexandre Oliva <oliva@adacore.com>
798 * testsuite/27_io/filesystem/operations/rename.cc: xfail on
800 * testsuite/experimental/filesystem/operations/rename.cc:
803 2022-06-24 Alexandre Oliva <oliva@adacore.com>
805 * testsuite/util/testsuite_fs.h (NO_LAST_WRITE_TIME): Define
807 * testsuite/lib/libstdc++.exp
808 (check_v3_target_fs_last_write_time): New.
809 * testsuite/lib/dg-options.exp (dg-require-target-fs-lwt):
811 * testsuite/27_io/filesystem/operations/last_write_time.cc:
812 Skip the test if the features are unavailable.
813 * testsuite/experimental/filesystem/operations/last_write_time.cc:
816 2022-06-24 Alexandre Oliva <oliva@adacore.com>
818 * testsuite/util/testsuite_fs.h (NO_SPACE): Define if
820 * testsuite/lib/libstdc++.exp (check_v3_target_fs_space): New.
821 * testsuite/lib/dg-options.exp (dg-require-target-fs-space):
823 * testsuite/27_io/filesystem/operations/space.cc: Require
825 * testsuite/experimental/filesystem/operations/space.cc:
828 2022-06-24 Alexandre Oliva <oliva@adacore.com>
830 * testsuite/util/testsuite_fs.h (NO_SYMLINKS): Define on
831 mingw and when create_symlink is a dummy.
832 * testsuite/27_io/filesystem/operations/symlink_status.cc:
834 (test01, test02): Don't create symlinks when NO_SYMLINKS is
836 * testsuite/27_io/filesystem/operations/canonical.cc (test03):
838 * testsuite/27_io/filesystem/operations/copy.cc (test02):
840 * testsuite/27_io/filesystem/operations/create_directories.cc
842 * testsuite/27_io/filesystem/operations/create_directory.cc
844 * testsuite/27_io/filesystem/operations/permissions.cc
845 (test03, test04): Likewise.
846 * testsuite/27_io/filesystem/operations/remove.cc (test01):
848 * testsuite/27_io/filesystem/operations/remove_all.cc (test01):
850 * testsuite/27_io/filesystem/operations/rename.cc
851 (test_symlinks): Likewise.
852 * testsuite/27_io/filesystem/operations/weakly_canonical.cc
854 * testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
856 * testsuite/experimental/filesystem/operations/copy.cc
858 * testsuite/experimental/filesystem/operations/create_directories.cc
860 * testsuite/experimental/filesystem/operations/create_directory.cc
862 * testsuite/experimental/filesystem/operations/permissions.cc
863 (test03, test04): Likewise.
864 * testsuite/experimental/filesystem/operations/remove.cc
866 * testsuite/experimental/filesystem/operations/remove_all.cc
868 * testsuite/experimental/filesystem/operations/rename.cc
870 * testsuite/lib/libstdc++.exp
871 (v3_check_preprocessor_condition): Add optional inc parameter.
872 Add it to the test program after include bits/c++config.h.
873 (check_v3_target_fs_symlinks): New.
874 * testsuite/lib/dg-options.exp
875 (dg-require-target-fs-symlinks): New.
876 * testsuite/27_io/filesystem/operations/read_symlink.cc:
877 Replace mingw xfail with require target-fs-symlinks.
878 * testsuite/experimental/filesystem/operations/read_symlink.cc:
881 2022-06-24 Alexandre Oliva <oliva@adacore.com>
883 * testsuite/27_io/filesystem/operations/copy.cc (test02):
884 Select TO after creating FROM.
885 (test03, test04): Likewise.
886 * testsuite/experimental/filesystem/operations/copy.cc
887 (test02, test03, test04): Likewise.
889 2022-06-24 Alexandre Oliva <oliva@adacore.com>
891 * testsuite/30_threads/thread/native_handle/cancel.cc: Add an
892 explicit cancellation point in case sleep_for lacks one.
894 2022-06-24 Alexandre Oliva <oliva@adacore.com>
896 * testsuite/lib/dg-options.exp (add_options_for_net_ts): Add
897 -lbsd for RTEMS targets.
899 2022-06-23 Jonathan Wakely <jwakely@redhat.com>
901 * testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
902 rmdir to remove directories.
903 * testsuite/experimental/filesystem/iterators/error_reporting.cc:
906 2022-06-23 Jonathan Wakely <jwakely@redhat.com>
908 * testsuite/26_numerics/random/random_device/entropy.cc: Use
909 numeric_limits<unsigned>::digits.
911 2022-06-22 Alexandre Oliva <oliva@adacore.com>
913 * libsupc++/eh_globals.cc [!_GLIBCXX_HAVE_TLS]
914 (__eh_globals_init::~__eh_globals_init): Clear _S_init first.
916 2022-06-22 Alexandre Oliva <oliva@adacore.com>
918 * testsuite/30_threads/this_thread/60421.cc (test02): Call
921 2022-06-22 Alexandre Oliva <oliva@adacore.com>
923 * testsuite/20_util/to_chars/long_double.cc: Require cmath.
925 2022-06-22 Alexandre Oliva <oliva@adacore.com>
927 * testsuite/23_containers/bitset/cons/dr1325-2.cc: Work around
928 global struct bitset.
929 * testsuite/23_containers/bitset/ext/15361.cc: Likewise.
930 * testsuite/23_containers/bitset/input/1.cc: Likewise.
931 * testsuite/23_containers/bitset/to_string/1.cc: Likewise.
932 * testsuite/23_containers/bitset/to_string/dr396.cc: Likewise.
934 2022-06-17 Jonathan Wakely <jwakely@redhat.com>
936 * testsuite/21_strings/basic_string/cons/char/105995.cc: Add
939 2022-06-16 Jonathan Wakely <jwakely@redhat.com>
942 * include/bits/basic_string.h (_M_use_local_data): Initialize
943 the entire SSO buffer.
944 * testsuite/21_strings/basic_string/cons/char/105995.cc: New test.
946 2022-06-16 Jonathan Wakely <jwakely@redhat.com>
949 * include/ext/vstring.h (operator==): Always check lengths
952 2022-06-15 François Dumont <fdumont@gcc.gnu.org>
955 * include/bits/hashtable_policy.h (_ConvertToValueType): New.
956 * include/bits/hashtable.h (_Hashtable<>::_M_insert_unique_aux): New.
957 (_Hashtable<>::_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Use latters.
958 (_Hashtable<>::_M_insert(_Arg&&, const _NodeGenerator&, false_type)): Likewise.
959 (_Hashtable(_InputIterator, _InputIterator, size_type, const _Hash&, const _Equal&,
960 const allocator_type&, true_type)): Use this.insert range.
961 (_Hashtable(_InputIterator, _InputIterator, size_type, const _Hash&, const _Equal&,
962 const allocator_type&, false_type)): Use _M_insert.
963 * testsuite/23_containers/unordered_map/cons/56112.cc: Check how many times conversion
965 * testsuite/23_containers/unordered_map/insert/105717.cc: New test.
966 * testsuite/23_containers/unordered_set/insert/105717.cc: New test.
968 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
971 * include/bits/basic_string.h (operator==): Always compare
972 lengths before checking string contents.
973 [!__cpp_lib_three_way_comparison] (operator==, operator!=):
976 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
979 * include/bits/basic_string.h (compare): Define inline.
980 * include/bits/basic_string.tcc (compare): Remove out-of-line
982 * include/bits/cow_string.h (compare): Define inline.
983 * testsuite/21_strings/basic_string/operations/compare/char/3.cc:
986 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
988 * include/bits/new_allocator.h: Fix indentation.
989 * include/ext/malloc_allocator.h: Likewise.
991 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
994 * include/bits/allocator.h (allocator::allocate): Check for
995 overflow in constexpr allocation.
996 * testsuite/20_util/allocator/105975.cc: New test.
998 2022-06-13 Mark Mentovai <mark@mentovai.com>
1000 * include/experimental/bits/fs_path.h (__detail::__null_terminated):
1001 Rename to __nul_terminated to avoid colliding with a macro in
1004 2022-06-13 Jonathan Wakely <jwakely@redhat.com>
1006 * include/std/atomic (__atomic_val_t): Use __type_identity_t
1007 instead of atomic<T>::value_type, as per LWG 3220.
1008 * testsuite/29_atomics/atomic/lwg3220.cc: New test.
1010 2022-06-10 Jonathan Wakely <jwakely@redhat.com>
1013 * include/experimental/numeric (experimental::gcd): Simplify
1014 assertions. Use __abs_r instead of __absu.
1015 (experimental::lcm): Likewise. Remove use of __detail::__lcm so
1016 overflow can be detected.
1017 * include/std/numeric (__detail::__absu): Rename to __abs_r and
1018 change to allow signed result type, so overflow can be detected.
1019 (__detail::__lcm): Remove.
1020 (gcd): Simplify assertions. Use __abs_r instead of __absu.
1021 (lcm): Likewise. Remove use of __detail::__lcm so overflow can
1023 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
1024 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1025 * testsuite/26_numerics/gcd/105844.cc: New test.
1026 * testsuite/26_numerics/lcm/105844.cc: New test.
1028 2022-06-10 Jonathan Wakely <jwakely@redhat.com>
1031 * libsupc++/eh_globals.cc (eh_globals): Ensure constant init and
1032 prevent destruction during termination.
1033 (__eh_globals_init::_M_init): Replace with static member _S_init.
1034 (__cxxabiv1::__cxa_get_globals_fast): Update.
1035 (__cxxabiv1::__cxa_get_globals): Likewise.
1037 2022-06-10 Jonathan Wakely <jwakely@redhat.com>
1039 * include/bits/basic_string.h (__hash_str_base): New class
1041 (hash<basic_string<C, char_traits<C>, A>>): Define partial
1042 specialization for each of the standard character types.
1043 (hash<string>, hash<wstring>, hash<u8string>, hash<u16string>)
1044 (hash<u32string>): Remove explicit specializations.
1045 * include/std/string (__hash_string_base): Remove class
1047 (hash<pmr::string>, hash<pmr::wstring>, hash<pmr::u8string>)
1048 (hash<pmr::u16string>, hash<pmr::u32string>): Remove explicit
1050 * testsuite/21_strings/basic_string/hash/hash.cc: Test with
1052 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc:
1055 2022-05-27 Jonathan Wakely <jwakely@redhat.com>
1058 * include/std/sstream (basic_stringbuf::_M_high_mark): Add
1059 always_inline attribute.
1061 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1064 * include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:
1065 Limit ga_sizes array to values that fit in size_t.
1066 * include/ext/random [__SIZE_WIDTH < 32] (sfmt86243)
1067 (sfmt86243_64, sfmt132049, sfmt132049_64, sfmt216091)
1068 (sfmt216091_64): Do not declare.
1070 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1072 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Make
1073 lookup for ios_errc and future_errc check versioned namespace.
1074 (StdAtomicPrinter): Strip versioned namespace from typename.
1076 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1078 * src/c++11/Makefile.am: Add new source file.
1079 * src/c++11/Makefile.in: Regenerate.
1080 * src/c++11/cxx11-ios_failure.cc (iostream_category):
1082 * src/c++11/ios_errcat.cc: New file.
1083 * testsuite/27_io/ios_base/failure/error_code.cc: Check that
1084 std::iostream_category() is defined and used for std::io_errc.
1086 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1088 * include/bits/stl_iterator.h (counted_iterator::operator++(int)):
1089 Add 'constexpr' as per LWG 3643.
1090 * testsuite/24_iterators/counted_iterator/lwg3643.cc: New test.
1092 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1094 * include/bits/functional_hash.h (__is_fast_hash): Add doxygen
1096 * include/bits/hashtable.h: Do not include <bits/stl_function.h>
1098 * include/bits/hashtable_policy.h: Include <bits/stl_pair.h> and
1099 <bits/functional_hash.h>.
1100 * include/bits/unordered_map.h: Include required headers.
1101 * include/bits/unordered_set.h: Likewise.
1102 * include/std/unordered_map: Do not include headers for indirect
1104 * include/std/unordered_set: Likewise.
1106 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1108 * include/bits/ranges_algobase.h: Do not include
1109 <bits/stl_iterator_base_types.h>.
1110 * include/std/string: Likewise.
1111 * include/std/variant: Likewise.
1113 2022-05-26 Nathan Sidwell <nathan@acm.org>
1115 * include/bits/hashtable.h: Include required headers.
1116 * include/bits/hashtable_policy.h: Likewise.
1117 * include/bits/stl_heap.h: Likewise.
1118 * include/bits/stl_iterator_base_funcs.h: Likewise.
1120 2022-05-26 François Dumont <fdumont@gcc.gnu.org>
1122 * python/libstdcxx/v6/printers.py (StdSpanPrinter.__init__):
1123 Strip typename from version namespace.
1125 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1127 * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Strip
1128 versioned namespace from the template argument too.
1130 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1132 * testsuite/21_strings/basic_string/modifiers/pop_back/char/1.cc:
1134 * testsuite/21_strings/basic_string/modifiers/pop_back/char.cc:
1136 * testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t/1.cc:
1138 * testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t.cc:
1140 * testsuite/21_strings/basic_string/modifiers/swap/wchar_t/constexpr.cc:
1142 * testsuite/21_strings/basic_string/modifiers/swap/constexpr-wchar_t.cc:
1144 * testsuite/21_strings/basic_string/modifiers/swap/char/constexpr.cc:
1146 * testsuite/21_strings/basic_string/modifiers/swap/constexpr.cc:
1148 * testsuite/21_strings/basic_string/operations/contains/char/1.cc:
1150 * testsuite/21_strings/basic_string/operations/contains/char.cc:
1152 * testsuite/21_strings/basic_string/operations/contains/wchar_t/1.cc:
1154 * testsuite/21_strings/basic_string/operations/contains/wchar_t.cc:
1156 * testsuite/21_strings/basic_string/operations/data/char/1.cc:
1158 * testsuite/21_strings/basic_string/operations/data/char.cc:
1160 * testsuite/21_strings/basic_string/operations/data/wchar_t/1.cc:
1162 * testsuite/21_strings/basic_string/operations/data/wchar_t.cc:
1164 * testsuite/21_strings/basic_string/operations/ends_with/char/1.cc:
1166 * testsuite/21_strings/basic_string/operations/ends_with/char.cc:
1168 * testsuite/21_strings/basic_string/operations/ends_with/wchar_t/1.cc:
1170 * testsuite/21_strings/basic_string/operations/ends_with/wchar_t.cc:
1172 * testsuite/21_strings/basic_string/operations/starts_with/char/1.cc:
1174 * testsuite/21_strings/basic_string/operations/starts_with/char.cc:
1176 * testsuite/21_strings/basic_string/operations/starts_with/wchar_t/1.cc:
1178 * testsuite/21_strings/basic_string/operations/starts_with/wchar_t.cc:
1180 * testsuite/21_strings/basic_string/operations/substr/char/1.cc:
1182 * testsuite/21_strings/basic_string/operations/substr/char.cc:
1184 * testsuite/21_strings/basic_string/operations/substr/wchar_t/1.cc:
1186 * testsuite/21_strings/basic_string/operations/substr/wchar_t.cc:
1188 * testsuite/21_strings/basic_string/range_access/char/1.cc:
1190 * testsuite/21_strings/basic_string/range_access/char.cc:
1192 * testsuite/21_strings/basic_string/range_access/wchar_t/1.cc:
1194 * testsuite/21_strings/basic_string/range_access/wchar_t.cc:
1196 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
1198 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char.cc:
1200 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
1202 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t.cc:
1204 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
1206 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char.cc:
1208 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
1210 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t.cc:
1212 * testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc:
1214 * testsuite/21_strings/basic_string_view/modifiers/swap/char.cc:
1216 * testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc:
1218 * testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t.cc:
1220 * testsuite/21_strings/basic_string_view/operations/contains/char/1.cc:
1222 * testsuite/21_strings/basic_string_view/operations/contains/char.cc:
1224 * testsuite/21_strings/basic_string_view/operations/contains/wchar_t/1.cc:
1226 * testsuite/21_strings/basic_string_view/operations/contains/wchar_t.cc:
1228 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
1230 * testsuite/21_strings/basic_string_view/operations/data/char.cc:
1232 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
1234 * testsuite/21_strings/basic_string_view/operations/data/wchar_t.cc:
1236 * testsuite/21_strings/basic_string_view/operations/ends_with/char/1.cc:
1238 * testsuite/21_strings/basic_string_view/operations/ends_with/char.cc:
1240 * testsuite/21_strings/basic_string_view/operations/ends_with/wchar_t/1.cc:
1242 * testsuite/21_strings/basic_string_view/operations/ends_with/wchar_t.cc:
1244 * testsuite/21_strings/basic_string_view/operations/starts_with/char/1.cc:
1246 * testsuite/21_strings/basic_string_view/operations/starts_with/char.cc:
1248 * testsuite/21_strings/basic_string_view/operations/starts_with/wchar_t/1.cc:
1250 * testsuite/21_strings/basic_string_view/operations/starts_with/wchar_t.cc:
1252 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
1254 * testsuite/21_strings/basic_string_view/operations/substr/char.cc:
1256 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
1258 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t.cc:
1260 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
1262 * testsuite/21_strings/basic_string_view/range_access/char.cc:
1264 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
1266 * testsuite/21_strings/basic_string_view/range_access/wchar_t.cc:
1268 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char/1.cc:
1270 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char.cc:
1272 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t/1.cc:
1274 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t.cc:
1276 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t/1.cc:
1278 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t.cc:
1280 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char8_t/1.cc:
1282 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char8_t.cc:
1284 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/1.cc:
1286 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/int.cc:
1288 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t/1.cc:
1290 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t.cc:
1292 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
1294 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char.cc:
1296 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
1298 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t.cc:
1300 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
1302 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t.cc:
1304 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
1306 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t.cc:
1308 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
1310 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/int.cc:
1312 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
1314 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t.cc:
1316 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char/1.cc:
1318 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char.cc:
1320 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char16_t/1.cc:
1322 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char16_t.cc:
1324 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char32_t/1.cc:
1326 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char32_t.cc:
1328 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char8_t/1.cc:
1330 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char8_t.cc:
1332 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/short/1.cc:
1334 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/short.cc:
1336 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/wchar_t/1.cc:
1338 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/wchar_t.cc:
1341 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1343 * testsuite/20_util/duration/requirements/explicit_instantiation/explicit_instantiation.cc:
1345 * testsuite/20_util/duration/requirements/explicit_instantiation.cc: ...here.
1346 * testsuite/20_util/time_point/requirements/explicit_instantiation/explicit_instantiation.cc:
1348 * testsuite/20_util/time_point/requirements/explicit_instantiation.cc: ...here.
1349 * testsuite/20_util/unique_ptr/requirements/explicit_instantiation/explicit_instantiation.cc:
1351 * testsuite/20_util/unique_ptr/requirements/explicit_instantiation.cc: ...here.
1353 2022-05-25 Jason Merrill <jason@redhat.com>
1355 * testsuite/20_util/function_objects/constexpr_searcher.cc: Add
1358 2022-05-20 Jonathan Wakely <jwakely@redhat.com>
1360 * testsuite/26_numerics/random/bernoulli_distribution/operators/values.cc:
1361 Run fewer iterations for simulator targets.
1362 * testsuite/26_numerics/random/binomial_distribution/operators/values.cc:
1364 * testsuite/26_numerics/random/discrete_distribution/operators/values.cc:
1366 * testsuite/26_numerics/random/geometric_distribution/operators/values.cc:
1368 * testsuite/26_numerics/random/negative_binomial_distribution/operators/values.cc:
1370 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
1372 * testsuite/26_numerics/random/uniform_int_distribution/operators/values.cc:
1375 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
1377 * include/bits/char_traits.h: Only include <cstdint> when
1379 * include/std/stacktrace: Use __UINTPTR_TYPE__ instead of
1381 * src/c++11/cow-stdexcept.cc: Include <stdint.h>.
1382 * src/c++17/floating_to_chars.cc: Likewise.
1383 * testsuite/20_util/assume_aligned/1.cc: Include <cstdint>.
1384 * testsuite/20_util/assume_aligned/3.cc: Likewise.
1385 * testsuite/20_util/shared_ptr/creation/array.cc: Likewise.
1387 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
1389 * include/bits/basic_string.h: Do not include <ext/atomicity.h>
1391 * include/bits/cow_string.h: Include it here.
1393 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
1395 * include/Makefile.am: Add new header.
1396 * include/Makefile.in: Regenerate.
1397 * include/bits/memory_resource.h: New file.
1398 * include/std/deque: Include <bits/memory_resource.h>.
1399 * include/std/forward_list: Likewise.
1400 * include/std/list: Likewise.
1401 * include/std/map: Likewise.
1402 * include/std/memory_resource (pmr::memory_resource): Move to
1403 new <bits/memory_resource.h> header.
1404 (pmr::polymorphic_allocator): Likewise.
1405 * include/std/regex: Likewise.
1406 * include/std/set: Likewise.
1407 * include/std/stacktrace: Likewise.
1408 * include/std/string: Likewise.
1409 * include/std/unordered_map: Likewise.
1410 * include/std/unordered_set: Likewise.
1411 * include/std/vector: Likewise.
1412 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc:
1413 Remove <memory_resource> header and check construction.
1414 * testsuite/23_containers/deque/types/pmr_typedefs.cc: Likewise.
1415 * testsuite/23_containers/forward_list/pmr_typedefs.cc:
1417 * testsuite/23_containers/list/pmr_typedefs.cc: Likewise.
1418 * testsuite/23_containers/map/pmr_typedefs.cc: Likewise.
1419 * testsuite/23_containers/multimap/pmr_typedefs.cc: Likewise.
1420 * testsuite/23_containers/multiset/pmr_typedefs.cc: Likewise.
1421 * testsuite/23_containers/set/pmr_typedefs.cc: Likewise.
1422 * testsuite/23_containers/unordered_map/pmr_typedefs.cc:
1424 * testsuite/23_containers/unordered_multimap/pmr_typedefs.cc:
1426 * testsuite/23_containers/unordered_multiset/pmr_typedefs.cc:
1428 * testsuite/23_containers/unordered_set/pmr_typedefs.cc:
1430 * testsuite/23_containers/vector/pmr_typedefs.cc: Likewise.
1431 * testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
1433 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
1435 * include/std/memory_resource (polymorphic_allocator): Add
1436 non-template equality operator, as proposed for LWG 3683.
1437 * testsuite/20_util/polymorphic_allocator/lwg3683.cc: New test.
1439 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
1441 * src/c++17/memory_resource.cc (set_default_resource): Use
1442 memory_order_acq_rel.
1443 (get_default_resource): Use memory_order_acquire.
1445 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
1447 * include/std/memory_resource (new_delete_resource): Add
1448 nodiscard, returns_nonnull and const attributes.
1449 (null_memory_resource): Likewise.
1450 (set_default_resource, get_default_resource): Add returns_nonnull
1452 (memory_resource::is_equal): Add nodiscard attribute.
1453 (operator==, operator!=): Likewise.
1455 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
1457 * include/bits/ios_base.h (io_category): Add const and nodiscard
1459 (make_error_code, make_error_condition): Add nodiscard.
1460 * include/std/future (future_category): Add const and nodiscard.
1461 (make_error_code, make_error_condition): Add nodiscard.
1462 * include/std/system_error (generic_category system_category):
1463 Add nodiscard. Replace _GLIBCXX_CONST with C++11 attribute.
1464 (error_code::value, error_code::category, error_code::operator bool)
1465 (error_condition::value, error_condition::category)
1466 (error_condition::operator bool, make_error_code)
1467 (make_error_condition, operator==, operator!=, operator<=>): Add
1470 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
1472 * testsuite/20_util/expected/synopsis.cc: Skip for versioned
1474 * testsuite/27_io/headers/iosfwd/synopsis.cc: Likewise.
1476 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
1478 * src/Makefile.am [ENABLE_SYMVERS_GNU_NAMESPACE] (cxx11_sources):
1479 Do not build the compatibility*-c++0x.cc objects.
1480 * src/Makefile.in: Regenerate.
1481 * src/c++11/compatibility-c++0x.cc [_GLIBCXX_INLINE_VERSION]:
1482 Refuse to build for the versioned namespace.
1483 * src/c++11/compatibility-chrono.cc: Likewise.
1484 * src/c++11/compatibility-condvar.cc: Likewise.
1485 * src/c++11/compatibility-thread-c++0x.cc: Likewise.
1486 * src/c++11/chrono.cc (system_clock, steady_clock):
1487 Use macros to define in inline namespace _V2, matching the
1488 declarations in <system_error>.
1489 * src/c++11/system_error.cc (system_category, generic_category):
1492 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
1494 * doc/xml/manual/prerequisites.xml: Fix attributes for external
1496 * doc/html/manual/setup.html: Regenerate.
1498 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
1500 * doc/xml/manual/status_cxx2023.xml: Update with gcc-12 support.
1501 * doc/html/*: Regenerate.
1503 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
1505 * doc/xml/manual/intro.xml: Include new chapter.
1506 * doc/xml/manual/status_cxx2020.xml: Tweak release numbers.
1507 * doc/xml/manual/status_cxx2023.xml: New file.
1508 * doc/html/*: Regenerate.
1510 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
1512 * doc/html/manual/status.html: Regenerate.
1513 * doc/xml/manual/status_cxx2020.xml: Fix supported version for
1514 C++20 bit operations.
1516 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1518 * include/bits/std_thread.h (thread::_State, thread::_State_ptr):
1519 Declare as private unless _GLIBCXX_THREAD_IMPL is defined.
1520 * src/c++11/thread.cc (_GLIBCXX_THREAD_IMPL): Define.
1522 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1524 * include/std/future (launch): Make operators noexcept.
1526 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1528 * doc/doxygen/user.cfg.in (PREDEFINED): Replace __exception_ptr
1529 with "__unspecified__".
1530 * libsupc++/exception_ptr.h: Improve doxygen docs.
1531 (__exception_ptr::swap): Also declare in namespace std.
1533 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1535 * libsupc++/nested_exception.h (throw_with_nested) [C++17]: Use
1536 if-constexpr instead of tag dispatching.
1537 (rethrow_if_nested) [C++17]: Likewise.
1538 (rethrow_if_nested) [!__cpp_rtti]: Do not use dynamic_cast if it
1540 * testsuite/18_support/nested_exception/rethrow_if_nested-term.cc:
1543 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1545 * doc/doxygen/user.cfg.in (PREDEFINED): Define
1546 _GTHREAD_USE_MUTEX_TIMEDLOCK macro.
1547 * include/bits/std_mutex.h (mutex, lock_guard): Use @since and
1549 * include/bits/unique_lock.h (unique_lock): Likewise.
1550 * include/std/mutex (recursive_mutex, timed_mutex)
1551 (recursive_timed_mutex, scoped_lock): Likewise.
1553 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1555 * doc/doxygen/user.cfg.in (PREDEFINED): Define
1556 _GLIBCXX23_CONSTEXPR macro.
1557 * include/backward/auto_ptr.h (auto_ptr): Use @deprecated.
1558 * include/bits/unique_ptr.h (default_delete): Use @since and
1560 * include/std/scoped_allocator: Remove @ingroup from @file
1563 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1565 * include/bits/std_thread.h (thread, thread::id): Improve
1567 * include/std/future: Likewise.
1568 * include/std/thread (jthread): Likewise.
1570 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1572 * include/bits/ostream_insert.h: Mark helper functions as
1573 undocumented by Doxygen.
1574 * include/bits/stl_algo.h: Use markdown for formatting and mark
1575 helper functions as undocumented.
1576 * include/bits/stl_numeric.h: Likewise.
1577 * include/bits/stl_pair.h (pair): Add @headerfile.
1579 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1581 * doc/doxygen/user.cfg.in (PREDEFINED): Define __allocator_base
1582 so that Doxygen shows the right base-class for std::allocator.
1583 * include/bits/alloc_traits.h: Improve doxygen docs.
1584 * include/bits/allocator.h: Likewise.
1585 * include/bits/new_allocator.h: Likewise.
1586 * include/ext/new_allocator.h: Likewise.
1588 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1590 * doc/doxygen/user.cfg.in (PREDEFINED): Define macro
1591 _GLIBCXX_DOXYGEN_ONLY to expand its argument.
1592 * include/bits/c++config (_GLIBCXX_DOXYGEN_ONLY): Define.
1593 * include/bits/regex.h: Improve doxygen docs.
1594 * include/bits/regex_constants.h: Likewise.
1595 * include/bits/regex_error.h: Likewise.
1597 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1599 * include/std/atomic: Suppress doxygen docs for
1600 implementation details.
1601 * include/bits/atomic_base.h: Likewise.
1602 * include/bits/shared_ptr_atomic.h: Use markdown. Fix grouping
1603 so that std::atomic is not added to the pointer abstractions
1606 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1608 * include/std/system_error: Improve doxygen comments.
1610 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1612 * include/bits/ptr_traits.h: Add some doxygen comments.
1614 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1616 * doc/doxygen/user.cfg.in (PREDEFINED): Expand new macros to
1618 * include/bits/c++config (_GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE)
1619 (_GLIBCXX_END_INLINE_ABI_NAMESPACE): Define new macros.
1620 * include/bits/algorithmfwd.h (_V2::__rotate): Use new macros
1622 * include/bits/chrono.h (chrono::_V2::system_clock): Likewise.
1623 * include/bits/stl_algo.h (_V2::__rotate): Likewise.
1624 * include/std/condition_variable (_V2::condition_variable_any):
1626 * include/std/system_error (_V2::error_category): Likewise.
1628 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1630 * include/bits/mofunc_impl.h: Fix doxygen command.
1632 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
1634 * doc/doxygen/user.cfg.in (GROUP_NESTED_COMPOUNDS): Set to NO.
1635 (CLASS_DIAGRAMS): Remove obsolete option.
1637 2022-05-12 Jonathan Wakely <jwakely@redhat.com>
1639 * config/locale/dragonfly/numeric_members.cc: Remove whitespace.
1640 * config/locale/gnu/numeric_members.cc: Likewise.
1641 * include/bits/locale_facets_nonio.h: Likewise.
1642 * libsupc++/typeinfo: Likewise.
1644 2022-05-10 Jonathan Wakely <jwakely@redhat.com>
1647 * include/std/iosfwd: Add declarations for <spanstream> class
1648 templates and typedefs.
1649 * include/std/spanstream (basic_spanbuf, basic_ispanstream)
1650 (basic_ospanstream, basic_spanstream): Remove default template
1652 * testsuite/27_io/headers/iosfwd/synopsis.cc: Add <spanstream>
1654 * testsuite/27_io/headers/iosfwd/types.cc: Check <spanstream>
1657 2022-05-10 Jonathan Wakely <jwakely@redhat.com>
1660 * include/std/iosfwd: Add declarations for <synstream> class
1661 templates and typedefs.
1662 * include/std/syncstream (basic_syncbuf, basic_osyncstream):
1663 Remove default template arguments.
1664 * testsuite/27_io/headers/iosfwd/synopsis.cc: New test.
1665 * testsuite/27_io/headers/iosfwd/types.cc: New test.
1667 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
1669 * include/bits/random.tcc (operator==): Only check
1670 normal_distribution::_M_saved_available once.
1671 * testsuite/26_numerics/random/normal_distribution/operators/equal.cc:
1672 Check equality after state changes.
1673 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
1676 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
1679 * include/bits/random.tcc
1680 (operator>>(basic_istream<C,T>&, normal_distribution<R>&)):
1681 Update state when __state_avail is false.
1682 * testsuite/26_numerics/random/normal_distribution/operators/serialize.cc:
1683 Check that deserialized object equals serialized one.
1685 2022-05-06 Alexandre Oliva <oliva@adacore.com>
1687 * include/experimental/bits/simd.h [__ALTIVEC__]: Require VSX
1688 for double, long long, and 64-bit long intrinsic types.
1689 [__ALTIVEC__] (__intrinsic_type): Mention 128-bit in
1690 preexisting long double diagnostic, adjust no-VSX double
1691 diagnostic to cover 64-bit long double as well.
1693 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
1696 * testsuite/27_io/filesystem/iterators/error_reporting.cc:
1697 Use a trailing char array as storage for dirent::d_name.
1699 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
1701 * include/std/stacktrace: Do not include <cxxabi.h>.
1702 (__cxa_demangle): Declare.
1704 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
1707 * include/bits/specfun.h: Use visibility attribute on namespace,
1708 instead of pragma push/pop.
1709 * libsupc++/compare: Likewise.
1710 * libsupc++/exception: Likewise.
1711 * libsupc++/exception.h: Likewise.
1712 * libsupc++/exception_ptr.h: Likewise.
1713 * libsupc++/initializer_list: Likewise.
1714 * libsupc++/nested_exception.h: Likewise.
1716 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
1718 * doc/xml/manual/test.xml: Remove requirement for copyright and
1719 GPL notice in tests.
1720 * doc/html/manual/test.html: Regenerate.
1722 2022-05-05 Jonathan Wakely <jwakely@redhat.com>
1724 * include/experimental/memory_resource [!__cpp_rtti]
1725 (__resource_adaptor_imp::do_is_equal): Do not use dynamic_cast
1726 when RTTI is disabled.
1727 * testsuite/17_intro/freestanding.cc: Require RTTI.
1728 * testsuite/18_support/exception/38732.cc: Likewise.
1729 * testsuite/18_support/exception_ptr/rethrow_exception.cc:
1731 * testsuite/18_support/nested_exception/68139.cc: Likewise.
1732 * testsuite/18_support/nested_exception/rethrow_if_nested.cc:
1734 * testsuite/18_support/type_info/103240.cc: Likewise.
1735 * testsuite/18_support/type_info/fundamental.cc: Likewise.
1736 * testsuite/18_support/type_info/hash_code.cc: Likewise.
1737 * testsuite/20_util/any/assign/emplace.cc: Likewise.
1738 * testsuite/20_util/any/cons/in_place.cc: Likewise.
1739 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
1740 * testsuite/20_util/any/observers/type.cc: Likewise.
1741 * testsuite/20_util/function/1.cc: Likewise.
1742 * testsuite/20_util/function/2.cc: Likewise.
1743 * testsuite/20_util/function/3.cc: Likewise.
1744 * testsuite/20_util/function/4.cc: Likewise.
1745 * testsuite/20_util/function/5.cc: Likewise.
1746 * testsuite/20_util/function/6.cc: Likewise.
1747 * testsuite/20_util/function/7.cc: Likewise.
1748 * testsuite/20_util/function/8.cc: Likewise.
1749 * testsuite/20_util/polymorphic_allocator/resource.cc: Likewise.
1750 * testsuite/20_util/shared_ptr/casts/1.cc: Likewise.
1751 * testsuite/20_util/shared_ptr/casts/rval.cc: Likewise.
1752 * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc:
1754 * testsuite/20_util/shared_ptr/misc/get_deleter.cc: Likewise.
1755 * testsuite/20_util/typeindex/comparison_operators.cc: Likewise.
1756 * testsuite/20_util/typeindex/comparison_operators_c++20.cc:
1758 * testsuite/20_util/typeindex/hash.cc: Likewise.
1759 * testsuite/20_util/typeindex/hash_code.cc: Likewise.
1760 * testsuite/20_util/typeindex/name.cc: Likewise.
1761 * testsuite/22_locale/ctype/is/string/89728_neg.cc: Likewise.
1762 * testsuite/22_locale/global_templates/standard_facet_hierarchies.cc:
1764 * testsuite/22_locale/global_templates/user_facet_hierarchies.cc:
1766 * testsuite/22_locale/locale/13630.cc: Check type without using
1768 * testsuite/23_containers/array/requirements/non_default_constructible.cc:
1770 * testsuite/27_io/basic_ostream/emit/1.cc: Likewise.
1771 * testsuite/27_io/fpos/14320-1.cc: Check type without using RTTI.
1772 * testsuite/27_io/fpos/mbstate_t/12065.cc: Require RTTI.
1773 * testsuite/27_io/ios_base/failure/dual_abi.cc: Likewise.
1774 * testsuite/experimental/any/misc/any_cast.cc: Likewise.
1775 * testsuite/experimental/any/observers/type.cc: Likewise.
1776 * testsuite/experimental/memory_resource/resource_adaptor.cc:
1778 * testsuite/lib/libstdc++.exp (check_effective_target_rtti):
1780 * testsuite/tr1/3_function_objects/function/1.cc: Likewise.
1781 * testsuite/tr1/3_function_objects/function/2.cc: Likewise.
1782 * testsuite/tr1/3_function_objects/function/3.cc: Likewise.
1783 * testsuite/tr1/3_function_objects/function/4.cc: Likewise.
1784 * testsuite/tr1/3_function_objects/function/5.cc: Likewise.
1785 * testsuite/tr1/3_function_objects/function/6.cc: Likewise.
1786 * testsuite/tr1/3_function_objects/function/7.cc: Likewise.
1787 * testsuite/tr1/3_function_objects/function/8.cc: Likewise.
1788 * testsuite/tr2/bases/value.cc: Likewise.
1789 * testsuite/tr2/direct_bases/value.cc: Likewise.
1790 * testsuite/util/exception/safety.h [!__cpp_rtti]: Don't print
1793 2022-05-04 Jonathan Wakely <jwakely@redhat.com>
1796 * include/std/array (array::size(), array::max_size())
1797 (array::empty(), array::data()): Add always_inline attribute.
1799 2022-05-04 Jonathan Wakely <jwakely@redhat.com>
1802 * include/std/array (__array_traits::_S_ref): Remove.
1803 (__array_traits::_S_ptr): Remove.
1804 (__array_traits<T, 0>::_Type): Define operator[] and operator T*
1805 to provide an array-like API.
1806 (array::_AT_Type): Remove public typeef.
1807 (array::operator[], array::at, array::front, array::back): Use
1808 index operator to access _M_elems instead of _S_ref.
1809 (array::data): Use implicit conversion from _M_elems to pointer.
1810 (swap(array&, array&)): Use __enable_if_t helper.
1811 (get<I>): Use index operator to access _M_elems.
1812 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
1813 Adjust dg-error line numbers.
1815 2022-05-03 Alexandre Oliva <oliva@adacore.com>
1818 * testsuite/20_util/from_chars/pr105324.cc: Guard test body
1819 with conditional for floating-point overloads of from_char.
1821 2022-05-02 Patrick Palka <ppalka@redhat.com>
1824 * src/c++17/floating_from_chars.cc (find_end_of_float): Accept
1825 two delimeters for the exponent part in the form of a possibly
1826 NULL string of length two. Don't use std::tolower.
1827 (pattern): Adjust calls to find_end_of_float accordingly.
1829 2022-05-02 Patrick Palka <ppalka@redhat.com>
1832 * src/c++17/floating_from_chars.cc (__floating_from_chars_hex):
1833 Also accept 'P' as the start of the exponent.
1834 * testsuite/20_util/from_chars/7.cc: Add corresponding testcase.
1836 2022-04-29 Jonathan Wakely <jwakely@redhat.com>
1839 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt:
1841 * src/c++11/compatibility-ldbl-alt128.cc [_GLIBCXX_USE_DUAL_ABI]:
1842 Define __gnu_ieee128::num_get<C>::_M_extract_int[abi:cxx11]<I>
1843 symbols as aliases for corresponding symbols without abi-tag.
1845 2022-04-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1847 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
1848 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
1850 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
1851 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
1854 2022-04-28 Jonathan Wakely <jwakely@redhat.com>
1857 * src/c++17/fs_ops.cc (fs::copy): Pass error_code to
1858 directory_iterator constructor, and check on each iteration.
1859 * src/filesystem/ops.cc (fs::copy): Likewise.
1860 * testsuite/27_io/filesystem/operations/copy.cc: Check for
1861 errors during recursion.
1862 * testsuite/experimental/filesystem/operations/copy.cc:
1865 2022-04-28 François Dumont <fdumont@gcc.gnu.org>
1867 * config/abi/pre/gnu-versioned-namespace.ver: Remove
1868 std::random_device::* pattern.
1870 2022-04-27 Jakub Jelinek <jakub@redhat.com>
1872 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
1873 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
1874 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
1875 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
1876 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
1877 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
1878 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
1879 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
1881 2022-04-27 Jonathan Wakely <jwakely@redhat.com>
1883 * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Add
1884 support for atomic<shared_ptr<T>> and atomic<weak_ptr<T>>.
1885 (StdAtomicPrinter): New printer.
1886 (build_libstdcxx_dictionary): Register new printer.
1887 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test std::atomic.
1888 * testsuite/libstdc++-prettyprinters/cxx20.cc: Test atomic smart
1891 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
1893 * include/bits/shared_ptr_atomic.h (atomic<shared_ptr>): Add
1894 constructor for constant initialization from nullptr_t.
1895 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
1896 Check for new constructor.
1898 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
1900 * include/bits/fs_path.h (hash<filesystem::path>): Define.
1901 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
1902 Check std::hash specialization.
1904 2022-04-25 Jonathan Wakely <jwakely@redhat.com>
1906 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define
1908 * include/bits/unique_ptr.h (__cpp_lib_constexpr_memory):
1910 (default_delete, default_delete<T[]>, __uniq_ptr_impl)
1911 (unique_ptr, unique_ptr<T[], D>): Add constexpr to all member
1913 * include/std/version (__cpp_lib_constexpr_memory): Define new
1915 * testsuite/20_util/unique_ptr/assign/constexpr.cc: New test.
1916 * testsuite/20_util/unique_ptr/comparison/constexpr.cc: New test.
1917 * testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc: New test.
1918 * testsuite/20_util/unique_ptr/creation/constexpr.cc: New test.
1919 * testsuite/20_util/unique_ptr/modifiers/constexpr.cc: New test.
1920 * testsuite/20_util/unique_ptr/specialized_algorithms/constexpr.cc:
1923 2022-04-25 Jonathan Wakely <jwakely@redhat.com>
1926 * include/std/future (packaged_task): Add deduction guides.
1927 * testsuite/30_threads/packaged_task/cons/deduction.cc: New test.
1929 2022-04-25 Philipp Fent <fent@in.tum.de>
1931 * python/libstdcxx/v6/printers.py (StdSpanPrinter._iterator):
1933 (StdInitializerListPrinter): Define new printer.
1934 (build_libstdcxx_dictionary): Register new printer.
1935 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check printer for
1938 2022-04-22 Thomas W Rodgers <trodgers@redhat.com>
1941 * include/bits/atomic_base.h (atomic_flag::notify_one,
1942 notify_all): Remove const qualification.
1943 (__atomic_base::notify_one, notify_all): Likewise.
1944 * include/std/atomic (atomic<bool>::notify_one, notify_all):
1946 (atomic::notify_one, notify_all): Likewise.
1947 (atomic<T*>::notify_one, notify_all): Likewise.
1948 (atomic_notify_one, atomic_notify_all): Likewise.
1949 * testsuite/29_atomics/atomic/wait_notify/102994.cc: Adjust test
1950 to account for change in notify_one/notify_all signature.
1952 2022-04-21 Patrick Palka <ppalka@redhat.com>
1954 * include/std/charconv (__from_chars_alnum_to_val_table):
1955 Simplify initialization of __lower/__upper_letters.
1956 (__from_chars_alnum_to_val): Default the template parameter to
1958 * src/c++17/floating_from_chars.cc (starts_with_ci): Don't
1959 assume the uppercase and lowercase letters are contiguous.
1960 (__floating_from_chars_hex): Likewise.
1962 2022-04-21 Patrick Palka <ppalka@redhat.com>
1966 * include/std/charconv (__from_chars_alnum_to_val): Make
1967 initializer for __table dependent in an artificial way.
1969 2022-04-21 Jonathan Wakely <jwakely@redhat.com>
1972 * src/c++17/floating_from_chars.cc (buffer_resource::do_allocate):
1974 * testsuite/20_util/from_chars/pr105324.cc: New test.
1976 2022-04-20 Jonathan Wakely <jwakely@redhat.com>
1978 * testsuite/21_strings/basic_string_view/operations/copy/char/constexpr.cc:
1979 Check correct feature test macro.
1981 2022-04-20 Jonathan Wakely <jwakely@redhat.com>
1984 * doc/xml/manual/prerequisites.xml: Document libiconv
1986 * doc/html/manual/setup.html: Regenerate.
1987 * src/Makefile.am (CXXLINK): Add $(LTLIBICONV).
1988 * src/Makefile.in: Regenerate.
1990 2022-04-19 Patrick Palka <ppalka@redhat.com>
1992 * src/c++17/floating_to_chars.cc (_GLIBCXX_ASSERTIONS): Don't
1994 (__floating_to_chars_shortest): Add __builtin_unreachable calls to
1995 squelch false-positive -Wmaybe-uninitialized and -Wreturn-type
1997 (__floating_to_chars_precision): Likewise.
1999 2022-04-19 Philipp Fent <fent@in.tum.de>
2001 * python/libstdcxx/v6/printers.py (StdSpanPrinter): Define.
2002 * testsuite/libstdc++-prettyprinters/cxx20.cc: Test it.
2004 2022-04-19 Jonathan Wakely <jwakely@redhat.com>
2006 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Fix shell operators.
2007 * configure: Regenerate.
2009 2022-04-18 Patrick Palka <ppalka@redhat.com>
2011 * include/std/charconv (__from_chars_pow2_base): Manually
2012 unroll the first iteration of the main loop and simplify
2015 2022-04-15 Patrick Palka <ppalka@redhat.com>
2018 * include/bits/ranges_algo.h (__minmax_fn): Avoid dereferencing
2019 __first twice at the start.
2020 * testsuite/25_algorithms/minmax/constrained.cc (test06): New test.
2022 2022-04-15 Patrick Palka <ppalka@redhat.com>
2024 * include/std/charconv (__from_chars_alnum_to_val_table): Define.
2025 (__from_chars_alnum_to_val): Define.
2026 (__from_chars_binary): Rename to ...
2027 (__from_chars_pow2_base): ... this. Generalize to handle any
2028 power-of-two base using __from_chars_alnum_to_val.
2029 (__from_chars_digit): Optimize digit recognition to a single
2030 test instead of two tests. Use [[__unlikely___]] attribute.
2031 (__from_chars_alpha_to_num): Remove.
2032 (__from_chars_alnum): Use __from_chars_alnum_to_val. Use a
2033 nested loop for the overflow case. Maintain a lower bound
2034 on the number of available bits in the result and use it to
2035 omit the overflow check.
2036 (from_chars): Adjust appropriately.
2037 * src/c++17/floating_from_chars.cc (ascii_to_hexit): Remove.
2038 (__floating_from_chars_hex): Use __from_chars_alnum_to_val
2039 to recognize a hex digit instead.
2041 2022-04-14 Palmer Dabbelt <palmer@rivosinc.com>
2043 * acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Force auto to mutex
2045 * configure: Regenerate.
2047 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
2049 * doc/xml/manual/intro.xml: Fix comment.
2051 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
2053 * include/precompiled/stdc++.h: Include <stacktrace> and
2054 <stdatomic.h> for C++23.
2056 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
2059 * include/bits/stl_vector.h (__cpp_lib_constexpr_vector):
2061 * include/c_compatibility/stdatomic.h (__cpp_lib_stdatomic_h):
2063 * include/std/optional (__cpp_lib_optional): Define new value
2065 (__cpp_lib_monadic_optional): Remove.
2066 * include/std/version (__cpp_lib_constexpr_vector): Define.
2067 (__cpp_lib_stdatomic_h): Define.
2068 (__cpp_lib_optional): Define new value for C++23.
2069 (__cpp_lib_monadic_optional): Remove.
2070 * testsuite/20_util/optional/monadic/and_then.cc: Adjust.
2071 * testsuite/20_util/optional/requirements.cc: Adjust for C++23.
2072 * testsuite/20_util/optional/version.cc: Likewise.
2073 * testsuite/23_containers/vector/cons/constexpr.cc: Check
2075 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc:
2077 * testsuite/20_util/optional/monadic/version.cc: Removed.
2078 * testsuite/23_containers/vector/requirements/version.cc: New test.
2079 * testsuite/29_atomics/headers/stdatomic.h/version.cc: New test.
2081 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
2083 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Check for mmap.
2084 * config.h.in: Regenerate.
2085 * configure: Regenerate.
2087 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
2089 * include/std/stacktrace (basic_stacktrace::current): Reallocate
2090 a smaller container if the unused capacity is larger than the
2093 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
2095 * include/std/stacktrace (basic_stacktrace): Use _Impl::_M_clone
2096 or _Impl::_M_assign to initialize elements in allocated storage.
2097 (basic_stacktrace::_M_clear()): Use _Impl::_M_resize instead of
2099 (basic_stacktrace::_Impl::_M_destroy()): Replace with ...
2100 (basic_stacktrace::_Impl::_M_resize(size_type, allocator&)): New
2102 (basic_stacktrace::_Impl::_M_push_back): Use _M_xclone. Construct
2103 new element using allocator.
2104 (basic_stacktrace::_Impl::_M_clone): New function.
2105 (basic_stacktrace::_Impl::_M_xclone): New function.
2106 (basic_stacktrace::_Impl::_M_assign): New function.
2108 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
2110 * include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
2111 Use nothrow new instead of try block for std::allocator.
2112 (basic_stacktrace::_Impl::_M_deallocate): Use delete for
2115 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
2117 * include/std/stacktrace (basic_stacktrace::current): Replace
2118 calls to _M_reserve and _S_curr_cb with call to _M_prepare.
2119 Check return value of backtrace_simple when max depth given.
2120 (basic_stacktrace::_M_reserve): Remove.
2121 (basic_stacktrace::_S_curr_cb): Remove.
2122 (basic_stacktrace::_M_prepare(size_type)): New function to
2123 reserve initial capacity and return callback.
2124 (basic_stacktrace::_Impl::_M_allocate): Remove check for 0 < n
2125 and remove redundant zeroing of _M_frames and _M_capacity.
2126 (basic_stacktrace::_Impl::_M_push_back): Add [[unlikely]]
2127 attribute. Assign _Impl instead of swapping.
2128 * testsuite/19_diagnostics/stacktrace/current.cc: New test.
2130 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
2132 * include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
2133 Change [[unlikely]] attribute to [[likely]].
2135 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
2138 * include/std/stacktrace (basic_stacktrace::basic_stacktrace):
2139 Fix allocator usage in constructors.
2140 (basic_stacktrace::operator=(const basic_stacktrace&)): Do not
2141 try to reallocate using const allocator.
2142 (basic_stacktrace::operator=(basic_stacktrace&&)): Fix
2143 if-constexpr with non-constant condition. Do not allocate new
2144 storage if allocator propagates. Do not set _M_size if
2146 (basic_stacktrace::swap(basic_stacktrace&)): Fix typo. Add
2147 assertion that non-propagating allocators are equal.
2148 * testsuite/19_diagnostics/stacktrace/stacktrace.cc: New test.
2150 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
2152 * include/std/stacktrace (basic_stacktrace::current): Duplicate
2153 implementation into each overload. Add noinline attribute and
2155 (basic_stacktrace::max_size()): Call _Impl::_S_max_size.
2156 (basic_stacktrace::_S_curr_cb()): New function defining lambda.
2157 (basic_stacktrace::_Impl::_S_max_size): New function defining
2158 maximum size in terms of allocator and size_type.
2159 (basic_stacktrace::_Impl::_M_allocate): Check against
2161 * testsuite/19_diagnostics/stacktrace/entry.cc: Call function
2162 for non-constexpr checks. Check line number is correct.
2164 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
2166 * testsuite/20_util/stacktrace/entry.cc: Moved to...
2167 * testsuite/19_diagnostics/stacktrace/entry.cc: ...here.
2168 * testsuite/20_util/stacktrace/synopsis.cc: Moved to...
2169 * testsuite/19_diagnostics/stacktrace/synopsis.cc: ...here.
2170 * testsuite/20_util/stacktrace/version.cc: Moved to...
2171 * testsuite/19_diagnostics/stacktrace/version.cc: ...here.
2173 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
2175 * include/experimental/bits/fs_path.h (path): Define special
2176 members after path::_Cmpt is complete.
2178 2022-04-08 Jonathan Wakely <jwakely@redhat.com>
2181 * include/std/expected
2182 (expected<void,E>::expected(expected<U,G>&&)): Fix constraints.
2183 * testsuite/20_util/expected/cons.cc: Check constructor.
2185 2022-04-08 Jonathan Wakely <jwakely@redhat.com>
2188 * include/std/expected (expected<void, E>::swap): Set
2189 _M_has_value to false for objects that previously had a value.
2190 * testsuite/20_util/expected/swap.cc: Fix test to check void
2193 2022-04-08 Jonathan Wakely <jwakely@redhat.com>
2196 * include/std/expected (bad_expected_access): Move constructor
2198 * testsuite/20_util/expected/bad.cc: New test.
2200 2022-04-07 Hans-Peter Nilsson <hp@axis.com>
2202 * testsuite/20_util/expected/requirements.cc: Correct minimal-size
2205 2022-04-02 Jakub Jelinek <jakub@redhat.com>
2208 * include/std/source_location (std::source_location::__impl): Move
2209 definition before using __builtin_ret_type.
2211 2022-04-01 Jonathan Wakely <jwakely@redhat.com>
2213 * include/std/utility (unreachable): Define for C++23.
2214 * include/std/version (__cpp_lib_unreachable): Define.
2215 * src/c++11/debug.cc (__glibcxx_assert_fail): Check for valid
2216 arguments. Handle only the function being given.
2217 * testsuite/20_util/unreachable/1.cc: New test.
2218 * testsuite/20_util/unreachable/version.cc: New test.
2220 2022-04-01 Jonathan Wakely <jwakely@redhat.com>
2222 * include/experimental/bits/fs_fwd.h (copy_file): Remove
2223 incorrect noexcept from declaration.
2224 * include/experimental/bits/fs_path.h (path::begin, path::end):
2225 Add noexcept to declarations, to match definitions.
2227 2022-04-01 Timm Bäder <tbaeder@redhat.com>
2229 * include/bits/fs_ops.h: Fix filename in Doxygen comment.
2230 * include/experimental/bits/fs_ops.h: Likewise.
2232 2022-03-31 Jonathan Wakely <jwakely@redhat.com>
2234 * libsupc++/new_opa.cc (aligned_alloc): Add comment.
2236 2022-03-29 Jonathan Wakely <jwakely@redhat.com>
2238 * testsuite/18_support/exception/38732.cc: Disable for C++23.
2239 * testsuite/18_support/headers/exception/synopsis.cc: Likewise.
2240 * testsuite/18_support/unexpected_handler.cc: Likewise.
2242 2022-03-29 Jonathan Wakely <jwakely@redhat.com>
2244 * libsupc++/compare (_Strong_order) [!__cpp_using_enum]: Add
2245 static data members for _Fp_fmt enumerators.
2247 2022-03-29 Jonathan Wakely <jwakely@redhat.com>
2249 * include/std/version (__cpp_lib_variant): Fix conditions to
2251 (__cpp_lib_expected): Fix condition to match <expected>.
2253 2022-03-28 Jonathan Wakely <jwakely@redhat.com>
2255 * testsuite/20_util/optional/monadic/and_then.cc: Fix typo.
2256 * testsuite/20_util/optional/monadic/transform.cc: Likewise.
2257 * testsuite/22_locale/codecvt/always_noconv/char/1.cc: Likewise.
2258 * testsuite/22_locale/codecvt/encoding/char/1.cc: Likewise.
2259 * testsuite/22_locale/codecvt/in/char/1.cc: Likewise.
2260 * testsuite/22_locale/codecvt/max_length/char/1.cc: Likewise.
2261 * testsuite/22_locale/codecvt/out/char/1.cc: Likewise.
2262 * testsuite/22_locale/codecvt/unshift/char/1.cc: Likewise.
2264 2022-03-27 Jonathan Wakely <jwakely@redhat.com>
2266 * doc/doxygen/user.cfg.in: Add new header.
2267 * include/Makefile.am: Likewise.
2268 * include/Makefile.in: Regenerate.
2269 * include/precompiled/stdc++.h: Add new header.
2270 * include/std/version (__cpp_lib_expected): Define.
2271 * libsupc++/exception [__cplusplus > 202002] (unexpected)
2272 (unexpected_handler, set_unexpected): Do not declare for C++23.
2273 * include/std/expected: New file.
2274 * testsuite/20_util/expected/assign.cc: New test.
2275 * testsuite/20_util/expected/cons.cc: New test.
2276 * testsuite/20_util/expected/illformed_neg.cc: New test.
2277 * testsuite/20_util/expected/observers.cc: New test.
2278 * testsuite/20_util/expected/requirements.cc: New test.
2279 * testsuite/20_util/expected/swap.cc: New test.
2280 * testsuite/20_util/expected/synopsis.cc: New test.
2281 * testsuite/20_util/expected/unexpected.cc: New test.
2282 * testsuite/20_util/expected/version.cc: New test.
2284 2022-03-25 Jonathan Wakely <jwakely@redhat.com>
2286 * include/std/bit (bit_cast, byteswap, endian): Add doxygen
2289 2022-03-23 Jonathan Wakely <jwakely@redhat.com>
2292 * include/std/bit (bit_cast): Add constraints.
2293 * testsuite/26_numerics/bit/bit.cast/105027.cc: New test.
2295 2022-03-23 Jonathan Wakely <jwakely@redhat.com>
2297 * include/std/version [!_GLIBCXX_HOSTED]
2298 (__cpp_lib_hardware_interference_size): Define for freestanding.
2299 (__cpp_lib_bit_cast): Likewise.
2300 (__cpp_lib_is_layout_compatible): Likewise.
2301 (__cpp_lib_is_pointer_interconvertible): Likewise.
2302 (__cpp_lib_adaptor_iterator_pair_constructor): Do not define for
2304 (__cpp_lib_invoke_r): Likewise.
2305 (__cpp_lib_ios_noreplace): Likewise.
2306 (__cpp_lib_monadic_optional): Likewise.
2307 (__cpp_lib_move_only_function): Likewise.
2308 (__cpp_lib_spanstream): Likewise.
2309 (__cpp_lib_stacktrace): Likewise.
2310 (__cpp_lib_string_contains): Likewise.
2311 (__cpp_lib_string_resize_and_overwrite): Likewise.
2312 (__cpp_lib_to_underlying): Likewise.
2314 2022-03-23 Jonathan Wakely <jwakely@redhat.com>
2317 * include/bits/atomic_base.h [!_GLIBCXX_HOSTED]: Do not include
2318 <bits/atomic_wait.h> for freestanding.
2320 2022-03-22 Hans-Peter Nilsson <hp@axis.com>
2322 * testsuite/20_util/from_chars/6.cc (test01) [FE_DOWNWARD]:
2323 Conditionalize call to fesetround.
2325 2022-03-21 Jakub Jelinek <jakub@redhat.com>
2328 * include/bits/locale_facets_nonio.tcc (get): Don't check if do_get
2329 isn't overloaded if __clang__ is defined.
2331 2022-03-18 Jonathan Wakely <jwakely@redhat.com>
2334 * include/std/any (any(T&&)): Revert change to constraints.
2335 * testsuite/20_util/any/cons/104242.cc: New test.
2337 2022-03-18 Jonathan Wakely <jwakely@redhat.com>
2340 * include/pstl/glue_algorithm_defs.h: Replace <functional> with
2342 * include/pstl/utils.h: Replace <iterator> with <type_traits>.
2343 (__pstl::__internal::__except_handler): Use std::__terminate
2344 instead of std::terminate.
2345 * src/c++17/fs_path.cc: Include <array>.
2346 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Include
2348 * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
2349 * testsuite/25_algorithms/clamp/constrained.cc: Likewise.
2350 * testsuite/25_algorithms/equal/constrained.cc: Likewise.
2351 * testsuite/25_algorithms/for_each/constrained.cc: Likewise.
2352 * testsuite/25_algorithms/includes/constrained.cc: Likewise.
2353 * testsuite/25_algorithms/is_heap/constexpr.cc: Likewise.
2354 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Likewise.
2355 * testsuite/25_algorithms/is_permutation/constrained.cc: Include
2357 * testsuite/25_algorithms/is_sorted/constexpr.cc: Include
2359 * testsuite/25_algorithms/is_sorted_until/constexpr.cc:
2361 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
2363 * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
2365 * testsuite/25_algorithms/lexicographical_compare_three_way/1.cc:
2367 * testsuite/25_algorithms/lower_bound/constexpr.cc: Include
2369 * testsuite/25_algorithms/max/constrained.cc: Likewise.
2370 * testsuite/25_algorithms/max_element/constrained.cc: Likewise.
2371 * testsuite/25_algorithms/min/constrained.cc: Likewise.
2372 * testsuite/25_algorithms/min_element/constrained.cc: Likewise.
2373 * testsuite/25_algorithms/minmax_element/constrained.cc:
2375 * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
2376 * testsuite/25_algorithms/move/93872.cc: Likewise.
2377 * testsuite/25_algorithms/move_backward/93872.cc: Include
2379 * testsuite/25_algorithms/nth_element/constexpr.cc: Include
2381 * testsuite/25_algorithms/partial_sort/constexpr.cc: Likewise.
2382 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc:
2384 * testsuite/25_algorithms/search/constexpr.cc: Likewise.
2385 * testsuite/25_algorithms/search_n/constrained.cc: Likewise.
2386 * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
2387 * testsuite/25_algorithms/set_difference/constrained.cc:
2389 * testsuite/25_algorithms/set_intersection/constexpr.cc:
2391 * testsuite/25_algorithms/set_intersection/constrained.cc:
2393 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
2395 * testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
2396 * testsuite/25_algorithms/set_union/constrained.cc: Likewise.
2397 * testsuite/25_algorithms/sort/constexpr.cc: Likewise.
2398 * testsuite/25_algorithms/sort_heap/constexpr.cc: Likewise.
2399 * testsuite/25_algorithms/transform/constrained.cc: Likewise.
2400 * testsuite/25_algorithms/unique/constexpr.cc: Likewise.
2401 * testsuite/25_algorithms/unique/constrained.cc: Likewise.
2402 * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
2403 * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
2404 * testsuite/std/ranges/adaptors/elements.cc: Include <vector>.
2405 * testsuite/std/ranges/adaptors/lazy_split.cc: Likewise.
2406 * testsuite/std/ranges/adaptors/split.cc: Likewise.
2408 2022-03-17 Jonathan Wakely <jwakely@redhat.com>
2411 * include/bits/fs_path.h (path::make_preferred): Use
2412 handwritten loop instead of std::replace.
2414 2022-03-17 Jonathan Wakely <jwakely@redhat.com>
2416 PR middle-end/104966
2417 * include/bits/locale_facets_nonio.tcc
2418 (__moneypunct_cache::_M_cache): Replace try-catch with RAII and
2419 make all string copies before any stores to *this.
2421 2022-03-17 Jonathan Wakely <jwakely@redhat.com>
2423 * testsuite/util/testsuite_character.h: Fix comment.
2425 2022-03-16 Jonathan Wakely <jwakely@redhat.com>
2428 * config/abi/pre/gnu.ver: Make version for std::from_chars
2429 depend on HAVE_USELOCALE macro.
2430 * testsuite/util/testsuite_abi.cc (compare_symbols): Treat
2431 std::from_chars for floating-point types as undesignated if
2432 not found in the baseline symbols file.
2434 2022-03-16 Jonathan Wakely <jwakely@redhat.com>
2436 * include/std/charconv (__cpp_lib_to_chars): Only define when
2437 both from_chars and to_chars are supported for floating-point
2439 (from_chars, to_chars): Adjust preprocessor conditions guarding
2441 * include/std/version (__cpp_lib_to_chars): Adjust condition to
2442 match <charconv> definition.
2443 * src/c++17/floating_from_chars.cc (from_chars_strtod): New
2445 (from_chars): Simplify preprocessor checks and use
2446 from_chars_strtod when appropriate.
2448 2022-03-14 Jonathan Wakely <jwakely@redhat.com>
2451 * src/c++11/codecvt.cc (read_utf8_code_point): Use char32_t to
2452 hold octets that will be left-shifted.
2454 2022-03-10 Jonathan Wakely <jwakely@redhat.com>
2457 * src/c++17/floating_from_chars.cc: Check __SIZE_WIDTH__ >= 32
2458 before using fast_float.
2460 2022-03-10 Detlef Vollmann <dv@vollmann.ch>
2463 * include/bits/this_thread_sleep.h: Fix order of #endif and
2464 closing brace of namespace.
2466 2022-03-10 Jonathan Wakely <jwakely@redhat.com>
2468 * libsupc++/compare (_Strong_order::_S_fp_cmp) [__vax__]:
2471 2022-03-10 Jonathan Wakely <jwakely@redhat.com>
2473 * libsupc++/compare (_Strong_ordering::_S_fp_cmp) [__vax__]: Use
2476 2022-03-09 Patrick Palka <ppalka@redhat.com>
2479 * src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
2480 Be explicit when narrowing the shifted effective_mantissa,
2481 since it may have an integer-class type.
2483 2022-03-08 Jonathan Wakely <jwakely@redhat.com>
2485 * include/bits/uses_allocator_args.h: Remove incorrect copyright
2488 2022-03-07 Jonathan Wakely <jwakely@redhat.com>
2491 * include/bits/c++config (__terminate, __glibcxx_assert_fail):
2492 Replace _GLIBCXX_VISIBILITY on function with visibility pragma.
2493 (__is_constant_evaluated): Add visibility pragma.
2495 2022-03-07 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
2497 * config/locale/vxworks/ctype_members.cc: Remove <iostream>
2500 2022-03-05 Jonathan Wakely <jwakely@redhat.com>
2502 * include/bits/c++config (__glibcxx_assert_fail): Add visibility
2504 (__terminate): Likewise.
2506 2022-03-04 Jonathan Wakely <jwakely@redhat.com>
2508 * libsupc++/compare (strong_order::_S_fp_cmp): Move typedef
2509 inside #if condition.
2511 2022-03-03 Jonathan Wakely <jwakely@redhat.com>
2514 * testsuite/std/ranges/adaptors/all.cc: Use non-debug vector for
2517 2022-03-03 Jonathan Wakely <jwakely@redhat.com>
2519 * testsuite/17_intro/names.cc (func): Undef on AIX.
2521 2022-03-03 Jonathan Wakely <jwakely@redhat.com>
2524 * libsupc++/compare (strong_order): Add missing support for
2525 floating-point types.
2526 * testsuite/18_support/comparisons/algorithms/strong_order_floats.cc:
2529 2022-03-01 Jonathan Wakely <jwakely@redhat.com>
2531 PR middle-end/103984
2532 * include/bits/regex_compiler.h (_BracketMatcher::_M_char): Use
2533 default member initializer.
2535 2022-02-24 Jonathan Wakely <jwakely@redhat.com>
2538 * include/std/source_location (source_location::current): Use
2539 deduced type of __builtin_source_location().
2541 2022-02-22 Patrick Palka <ppalka@redhat.com>
2543 * include/bits/ranges_base.h (__detail::__is_initializer_list):
2545 (viewable_range): Adjust as per P2415R2.
2546 * include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value.
2547 * include/std/ranges (owning_view): Define as per P2415R2.
2548 (enable_borrowed_range<owning_view>): Likewise.
2549 (views::__detail::__can_subrange): Replace with ...
2550 (views::__detail::__can_owning_view): ... this.
2551 (views::_All::_S_noexcept): Sync with operator().
2552 (views::_All::operator()): Use owning_view instead of subrange
2554 * include/std/version (__cpp_lib_ranges): Adjust value.
2555 * testsuite/std/ranges/adaptors/all.cc (test06): Adjust now that
2556 views::all uses owning_view instead of subrange.
2558 * testsuite/std/ranges/adaptors/lazy_split.cc (test09): Adjust
2559 now that rvalue non-view non-borrowed ranges are viewable.
2560 * testsuite/std/ranges/adaptors/split.cc (test06): Likewise.
2562 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
2565 * doc/xml/manual/evolution.xml: Document deprecation.
2566 * doc/html/manual/api.html: Regenerate.
2567 * include/bits/stl_bvector.h (insert(const_iterator, const bool&)):
2568 Remove default argument.
2569 (insert(const_iterator)): New overload with deprecated attribute.
2570 * testsuite/23_containers/vector/bool/modifiers/insert/104559.cc:
2573 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
2575 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Replace
2576 code that call cat->name() on std::error_category objects.
2577 Identify known categories by symbol name and use a hardcoded
2578 name. Print error code values as enumerators where appopriate.
2579 * testsuite/libstdc++-prettyprinters/cxx11.cc: Adjust expected
2580 name of custom category. Check io_errc and future_errc errors.
2582 2022-02-15 Jonathan Wakely <jwakely@redhat.com>
2585 * include/bits/uses_allocator_args.h (make_obj_using_allocator)
2586 (uninitialized_construct_using_allocator): Add constexpr.
2587 * testsuite/20_util/uses_allocator/make_obj.cc: Check constexpr.
2588 * testsuite/20_util/uses_allocator/uninitialized_construct.cc: New test.
2590 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
2593 * config/locale/gnu/c_locale.h (__convert_from_v): Use inline
2594 namespace for IEEE128 long double mode.
2595 * config/os/gnu-linux/ldbl-ieee128-extra.ver: Add new symbol
2596 version and export __gnu_cxx_ieee128::__convert_from_v.
2597 * include/bits/locale_facets_nonio.tcc (money_put::__do_put):
2598 Make __ibm128 overload use snprintf directly
2599 * testsuite/util/testsuite_abi.cc: Add new symbol version.
2600 Remove stable IEEE128/LDBL versions.
2602 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
2605 * include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
2607 * include/std/variant: Check feature test macros instead.
2608 * include/std/version: Likewise.
2610 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
2612 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
2615 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
2617 * src/c++17/floating_to_chars.cc (FLOAT128_TO_CHARS): Depend on
2618 LONG_DOUBLE_ALT128_COMPAT instead of USE_FLOAT128.
2620 2022-02-11 Jonathan Wakely <jwakely@redhat.com>
2622 * testsuite/20_util/temporary_buffer.cc: Fix dg-warning target
2625 2022-02-11 Jonathan Wakely <jwakely@redhat.com>
2627 * testsuite/20_util/monotonic_buffer_resource/allocate.cc:
2628 Ignore -Walloc-larger-than warning.
2629 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
2631 * testsuite/29_atomics/atomic/cons/user_pod.cc: Compile with -O1
2632 to avoid linker error for __atomic_is_lock_free.
2634 2022-02-10 Thomas Rodgers <rodgert@appliantology.com>
2636 * include/bits/atomic_wait.h (__waiter_base::_S_do_spin,
2637 __waiter_base::_S_do_spin_v): Change memory order from relaxed
2640 2022-02-10 Jonathan Wakely <jwakely@redhat.com>
2642 * include/c_compatibility/stdatomic.h (atomic_fetch_xor): Add
2644 (atomic_fetch_xor_explicit): Likewise.
2645 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Check
2646 arithmetic and logical operations for atomic_int.
2648 2022-02-10 Jonathan Wakely <jwakely@redhat.com>
2650 * src/filesystem/dir-common.h (_GLIBCXX_HAVE_DIRFD): Undefine
2651 when <dirent.h> is not available.
2652 (_GLIBCXX_HAVE_UNLINKAT): Likewise.
2654 2022-02-09 Thomas Rodgers <rodgert@appliantology.com>
2657 * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): Move spin
2658 loop inside do loop so that threads failing the wait, reload
2661 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
2663 * src/c++17/fs_dir.cc (_Dir(DIR*, const path&)): Change first
2664 parameter to _Dir_base&&.
2665 * src/filesystem/dir-common.h (_Dir_base(DIR*)): Remove.
2666 * src/filesystem/dir.cc (_Dir(DIR*, const path&)): Change first
2667 parameter to _Dir_base&&.
2669 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
2671 * acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Add comment about
2672 checking for CAS on correct word size.
2674 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
2676 * testsuite/experimental/filesystem/operations/create_directories.cc:
2677 Adjust expected results for Windows.
2679 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
2682 * src/c++17/fs_dir.cc (fs::recursive_directory_iterator::__erase):
2683 [i_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Refresh entry._M_type member,
2684 instead of checking for errno values indicating a directory.
2685 * src/c++17/fs_ops.cc (fs::remove_all(const path&)): Use similar
2686 logic to non-throwing overload.
2687 (fs::remove_all(const path&, error_code&)): Add comments.
2688 * src/filesystem/ops-common.h: Likewise.
2690 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
2692 * src/filesystem/dir-common.h (_Dir_base::openat): Change return
2693 type to use portable posix::DIR alias.
2695 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
2697 * include/c_compatibility/stdatomic.h [__clang__]: Use
2698 #include_next <stdatomic.h>.
2700 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
2702 * include/experimental/bits/fs_ops.h (fs::copy_file): Remove
2704 (fs::create_directories): Likewise.
2705 (fs::remove_all): Likewise.
2706 * src/filesystem/ops.cc (fs::copy_file): Remove noexcept.
2707 (fs::create_directories): Likewise.
2708 (fs::remove_all): Likewise.
2710 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
2713 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for dirfd
2715 * config.h.in: Regenerate.
2716 * configure: Regenerate.
2717 * include/bits/fs_dir.h (recursive_directory_iterator): Declare
2718 remove_all overloads as friends.
2719 (recursive_directory_iterator::__erase): Declare new member
2721 * include/bits/fs_fwd.h (remove, remove_all): Declare.
2722 * src/c++17/fs_dir.cc (_Dir): Add filename_only parameter to
2723 constructor. Pass file descriptor argument to base constructor.
2724 (_Dir::dir_and_pathname, _Dir::open_subdir, _Dir::do_unlink)
2725 (_Dir::unlink, _Dir::rmdir): Define new member functions.
2726 (directory_iterator): Pass filename_only argument to _Dir
2728 (recursive_directory_iterator::_Dir_stack): Adjust constructor
2729 parameters to take a _Dir rvalue instead of creating one.
2730 (_Dir_stack::orig): Add data member for storing original path.
2731 (_Dir_stack::report_error): Define new member function.
2732 (__directory_iterator_nofollow): Move here from dir-common.h and
2733 fix value to be a power of two.
2734 (__directory_iterator_filename_only): Define new constant.
2735 (recursive_directory_iterator): Construct _Dir object and move
2736 into _M_dirs stack. Pass skip_permission_denied argument to first
2738 (recursive_directory_iterator::increment): Use _Dir::open_subdir.
2739 (recursive_directory_iterator::__erase): Define new member
2741 * src/c++17/fs_ops.cc (ErrorReporter, do_remove_all): Remove.
2742 (fs::remove_all): Use new recursive_directory_iterator::__erase
2744 * src/filesystem/dir-common.h (_Dir_base): Add int parameter to
2745 constructor and use openat to implement nofollow semantics.
2746 (_Dir_base::fdcwd, _Dir_base::set_close_on_exec, _Dir_base::openat):
2747 Define new member functions.
2748 (__directory_iterator_nofollow): Move to fs_dir.cc.
2749 * src/filesystem/dir.cc (_Dir): Pass file descriptor argument to
2751 (_Dir::dir_and_pathname, _Dir::open_subdir): Define new member
2753 (recursive_directory_iterator::_Dir_stack): Adjust constructor
2754 parameters to take a _Dir rvalue instead of creating one.
2755 (recursive_directory_iterator): Check for new nofollow option.
2756 Construct _Dir object and move into _M_dirs stack. Pass
2757 skip_permission_denied argument to first advance call.
2758 (recursive_directory_iterator::increment): Use _Dir::open_subdir.
2759 * src/filesystem/ops.cc (fs::remove_all): Use C++17 remove_all.
2761 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
2763 * include/bits/allocator.h: Qualify std::allocator_traits in
2764 deprecated warnings.
2765 * libsupc++/exception (uncaught_exception): Add suggestion to
2768 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
2770 * src/c++17/fs_dir.cc (fs::recursive_directory_iterator::pop):
2771 Add [[maybe_unused]] attribute.
2772 * src/filesystem/dir.cc (fs::recursive_directory_iterator::pop):
2775 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
2777 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: Use
2778 custom comparison function for multiset.
2779 * testsuite/23_containers/set/operators/cmp_c++20.cc: Use custom
2780 comparison function for set.
2782 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
2784 * include/bits/boost_concept_check.h (_OutputIteratorConcept):
2785 Change member function to data member of function pointer type.
2787 2022-02-02 Martin Sebor <msebor@redhat.com>
2790 * include/std/array (begin): Declare const member function attribute
2792 (end, rbegin, rend, size, max_size, empty, data): Same.
2793 * testsuite/23_containers/array/capacity/empty.cc: Add test cases.
2794 * testsuite/23_containers/array/capacity/max_size.cc: Same.
2795 * testsuite/23_containers/array/capacity/size.cc: Same.
2796 * testsuite/23_containers/array/iterators/begin_end.cc: New test.
2798 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
2800 * testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
2801 autoconf macro to check whether d_type is present.
2802 * testsuite/experimental/filesystem/iterators/error_reporting.cc:
2805 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
2807 * testsuite/27_io/filesystem/iterators/97731.cc: New test.
2808 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2809 Check follow_directory_symlink option.
2810 * testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc:
2813 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
2815 * src/c++17/fs_dir.cc (recursive_directory_iterator::increment):
2816 Reset state to past-the-end iterator on error.
2817 (fs::recursive_directory_iterator::pop(error_code&)): Likewise.
2818 (fs::recursive_directory_iterator::pop()): Check _M_dirs before
2820 * src/filesystem/dir.cc (recursive_directory_iterator): Likewise,
2821 for the TS implementation.
2822 * testsuite/27_io/filesystem/iterators/error_reporting.cc: New test.
2823 * testsuite/experimental/filesystem/iterators/error_reporting.cc: New test.
2825 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
2827 * include/bits/fs_fwd.h (filesystem::perms): Fix comment.
2829 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
2832 * acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Print different messages
2833 for stdio_pure and stdio_posix options.
2834 * configure: Regenerate.
2836 2022-02-01 Thomas Rodgers <rodgert@appliantology.com>
2838 * include/bits/atomic_wait.h: Change memory order from
2839 Acquire/Release with relaxed loads to SeqCst+Release for
2840 accesses to the waiter's count.
2842 2022-01-31 Martin Liska <mliska@suse.cz>
2844 * acinclude.m4: Detect *_ld_is_mold and use it.
2845 * configure: Regenerate.
2847 2022-01-30 Hans-Peter Nilsson <hp@axis.com>
2849 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: Don't run on
2851 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: Likewise.
2853 2022-01-27 Jonathan Wakely <jwakely@redhat.com>
2856 * include/bits/deque.tcc (_M_range_initialize<ForwardIterator>):
2857 Add __builtin_unreachable to loop.
2858 * testsuite/23_containers/deque/100516.cc: New test.
2860 2022-01-27 Jonathan Wakely <jwakely@redhat.com>
2862 * include/bits/ranges_base.h (ranges::advance): Avoid signed
2863 overflow. Do nothing if already equal to desired result.
2864 * testsuite/24_iterators/range_operations/advance_overflow.cc:
2867 2022-01-27 Martin Liska <mliska@suse.cz>
2870 * acinclude.m4: Fix typo.
2871 * configure: Regenerate.
2873 2022-01-25 Jonathan Wakely <jwakely@redhat.com>
2876 * include/bits/istream.tcc (basic_istream::sentry): Add braces
2878 * include/bits/shared_ptr_base.h (_Sp_counted_array_base::_M_init):
2879 Add pragmas to disable bogus warnings from PR 61596.
2881 2022-01-25 Jonathan Wakely <jwakely@redhat.com>
2884 * src/c++17/fs_ops.cc (_GNU_SOURCE): Define.
2885 * src/filesystem/dir.cc (_GNU_SOURCE): Define.
2886 * src/filesystem/ops.cc (_GNU_SOURCE): Define.
2888 2022-01-25 Jonathan Wakely <jwakely@redhat.com>
2891 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for
2893 * config.h.in: Regenerate.
2894 * configure: Regenerate.
2895 * src/c++17/fs_dir.cc (_Dir): Add nofollow flag to constructor
2896 and pass it to base class constructor.
2897 (directory_iterator): Pass nofollow flag to _Dir constructor.
2898 (fs::recursive_directory_iterator::increment): Likewise.
2899 * src/c++17/fs_ops.cc (do_remove_all): Use nofollow option for
2900 directory_iterator constructor. Move error check outside loop.
2901 * src/filesystem/dir-common.h (_Dir_base): Add nofollow flag to
2902 constructor and when it's set use ::open with O_NOFOLLOW and
2904 * src/filesystem/dir.cc (_Dir): Add nofollow flag to constructor
2905 and pass it to base class constructor.
2906 (directory_iterator): Pass nofollow flag to _Dir constructor.
2907 (fs::recursive_directory_iterator::increment): Likewise.
2908 * src/filesystem/ops.cc (remove_all): Use nofollow option for
2909 directory_iterator constructor. Move error check outside loop.
2911 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
2914 * include/std/spanstream (basic_spanbuf(basic_spanbuf&&)): Use
2915 mem-initializer for _M_buf.
2916 (basic_spanbuf::Operator=(basic_spanbuf&&)): Fix ill-formed
2918 * testsuite/27_io/spanstream/2.cc: New test.
2920 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
2922 * src/c++17/floating_from_chars.cc (USE_STRTOD_FOR_FROM_CHARS):
2923 Define macro for case where std::from_chars is implemented in
2924 terms of strtod, strtof or strtold.
2925 (buffer_resource, valid_fmt, find_end_of_float, pattern)
2926 (from_chars_impl, make_result, reserve_string): Do not define
2927 unless USE_STRTOD_FOR_FROM_CHARS is defined.
2928 (from_chars): Define when at least one of USE_LIB_FAST_FLOAT and
2929 USE_STRTOD_FOR_FROM_CHARS is defined, instead of
2930 _GLIBCXX_HAVE_USELOCALE. Use fast_float for long double when it
2933 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
2936 * include/bits/hashtable_policy.h (_Map_base): Add partial
2937 specialization for maps with const key types.
2938 * testsuite/23_containers/unordered_map/104174.cc: New test.
2940 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
2943 * include/bits/shared_ptr_base.h (_Sp_counted_base<>::_M_release):
2944 Set members to zero without type punning.
2946 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
2948 * testsuite/20_util/shared_ptr/cons/array.cc: Fix comment.
2950 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
2954 * include/bits/alloc_traits.h (__cpp_lib_allocator_traits_is_always_equal):
2955 Define as type long.
2956 * include/bits/allocator.h (__cpp_lib_incomplete_container_elements):
2958 * include/bits/basic_string.h (__cpp_lib_string_udls): Likewise.
2959 * include/bits/chrono.h (__cpp_lib_chrono): Likewise.
2960 (__cpp_lib_chrono_udls): Likewise.
2961 * include/bits/move.h (__cpp_lib_addressof_constexpr): Likewise.
2962 * include/bits/node_handle.h (__cpp_lib_node_extract): Likewise.
2963 * include/bits/range_access.h (__cpp_lib_nonmember_container_access):
2965 * include/bits/shared_ptr.h (__cpp_lib_enable_shared_from_this):
2967 * include/bits/stl_algo.h (__cpp_lib_clamp): Likewise.
2968 (__cpp_lib_sample): Likewise.
2969 * include/bits/stl_algobase.h (__cpp_lib_robust_nonmodifying_seq_ops):
2971 * include/bits/stl_function.h (__cpp_lib_transparent_operators):
2973 * include/bits/stl_iterator.h (__cpp_lib_make_reverse_iterator):
2975 * include/bits/stl_map.h (__cpp_lib_map_try_emplace):
2977 * include/bits/stl_tree.h (__cpp_lib_generic_associative_lookup):
2979 * include/bits/unique_ptr.h (__cpp_lib_make_unique):
2981 * include/bits/unordered_map.h (__cpp_lib_unordered_map_try_emplace):
2983 * include/c_global/cmath (__cpp_lib_hypot): Likewise.
2984 * include/c_global/cstddef (__cpp_lib_byte): Likewise.
2985 * include/std/atomic (__cpp_lib_atomic_is_always_lock_free):
2987 * include/std/complex (__cpp_lib_complex_udls): Likewise.
2988 * include/std/filesystem (__cpp_lib_filesystem): Likewise.
2989 * include/std/functional (__cpp_lib_not_fn): Likewise.
2990 (__cpp_lib_boyer_moore_searcher): Likewise.
2991 * include/std/iomanip (__cpp_lib_quoted_string_io): Likewise.
2992 * include/std/mutex (__cpp_lib_scoped_lock): Likewise.
2993 * include/std/numeric (__cpp_lib_gcd_lcm): Likewise.
2994 (__cpp_lib_gcd, __cpp_lib_lcm): Likewise.
2995 * include/std/tuple (__cpp_lib_apply): Likewise.
2996 (__cpp_lib_make_from_tuple): Likewise.
2997 * include/std/type_traits (__cpp_lib_integral_constant_callable)
2998 (__cpp_lib_bool_constant, __cpp_lib_logical_traits)
2999 (__cpp_lib_is_null_pointer, __cpp_lib_transformation_trait_aliases)
3000 (__cpp_lib_result_of_sfinae, __cpp_lib_void_t)
3001 (__cpp_lib_is_swappable, __cpp_lib_is_invocable)
3002 (__cpp_lib_has_unique_object_representations)
3003 (__cpp_lib_is_aggregate): Likewise.
3004 * include/std/version: Likewise.
3005 * libsupc++/new (__cpp_lib_launder): Likewise.
3007 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
3009 * include/std/version (__cpp_lib_shared_ptr_arrays): Fix
3010 condition for C++17 definition.
3012 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
3014 * include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count):
3016 (_Sp_atomic::_M_ptr): Add default member-initializer.
3017 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
3018 Check constant initialization.
3019 * testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: Likewise.
3021 2022-01-20 Jonathan Wakely <jwakely@redhat.com>
3023 * src/c++11/cxx11-ios_failure.cc (__constinit): Define as
3024 equivalent attribute for Clang.
3025 * src/c++11/future.cc (__constinit): Likewise.
3026 * src/c++11/system_error.cc (__constinit): Likewise.
3027 * src/c++17/memory_resource.cc (__constinit): Likewise.
3029 2022-01-20 Jonathan Wakely <jwakely@redhat.com>
3031 * scripts/testsuite_flags.in: Only add src/filesystem/.libs and
3032 src/libbacktrace/.libs to LDFLAGS if those directories exist.
3034 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3036 * configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Remove -gdwarf-4
3038 * configure: Regenerate.
3040 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3043 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Include
3046 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3048 * scripts/testsuite_flags.in: Add src/libbacktrace/.libs to
3049 linker search paths.
3050 * src/Makefile.am: Fix src/debug/libbacktrace build.
3051 * src/Makefile.in: Regenerate.
3052 * src/libbacktrace/Makefile.am: Use per-library CPPFLAGS
3053 variable. Use symlinks for the source files.
3054 * src/libbacktrace/Makefile.in: Regenerate.
3056 2022-01-19 Matthias Kretz <m.kretz@gsi.de>
3058 * include/experimental/bits/simd.h (__floating_point_flags): Do
3059 not rely on math_errhandling to expand to a constant expression.
3061 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3063 * doc/xml/manual/evolution.xml: Document deprecations.
3064 * doc/xml/manual/status_cxx2017.xml: Update status.
3065 * doc/html/*: Regenerate.
3067 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3069 * include/bits/stl_tempbuf.h (get_temporary_buffer): Change
3070 _GLIBCXX14_DEPRECATED to _GLIBCXX17_DEPRECATED.
3072 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3074 * include/bits/stl_pair.h (_PCC::_DeprConsPair): Remove unused
3077 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3080 * include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count::lock):
3081 Only use __thread_relax if __cpp_lib_atomic_wait is defined.
3083 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3086 * include/bits/basic_string.h (basic_string(nullptr_t)): Only
3088 (operator=(nullptr_t)): Likewise.
3089 * include/bits/cow_string.h: Likewise.
3090 * include/std/string_view (basic_string_view(nullptr_t)):
3092 * testsuite/21_strings/basic_string/cons/char/nullptr.cc: Adjust
3093 expected error. Add examples that become ill-formed in C++23.
3094 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
3095 Adjust expected errors.
3096 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
3099 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3102 * include/bits/stl_iterator.h (reverse_iterator): Check
3103 __cpp_lib_concepts instead of __cplusplus.
3105 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3108 * include/bits/stl_pair.h (pair): Adjust constraints on
3109 deprecated constructors accepting literal zero as null pointer
3110 constant. Improve wording of deprecated attribute.
3111 * testsuite/20_util/pair/cons/99957.cc: Check that deprecated
3112 constructors do not cause ambiguities for copyable types.
3114 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3116 * include/bits/stl_function.h (ptr_fun): Fix suggestion for
3117 non-deprecated alternative.
3119 2022-01-18 Tom Honermann <tom@honermann.net>
3121 * acinclude.m4: Define config macros if uchar.h provides
3122 c8rtomb() and mbrtoc8().
3123 * config.h.in: Regenerate.
3124 * configure: Regenerate.
3125 * include/c_compatibility/uchar.h (c8rtomb, mbrtoc8): Define.
3126 * include/c_global/cuchar (c8rtomb, mbrtoc8): Likewise.
3127 * include/c_std/cuchar (c8rtomb, mbrtoc8): Likewise.
3128 * testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc:
3130 * testsuite/21_strings/headers/cuchar/functions_std_fchar8_t.cc:
3133 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3135 * include/Makefile.am: Install new header.
3136 * include/Makefile.in: Regenerate.
3137 * include/c_compatibility/stdatomic.h: New file.
3138 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: New test.
3140 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3143 * src/c++17/fast_float/LOCAL_PATCHES: Update.
3144 * src/c++17/fast_float/fast_float.h (FASTFLOAT_IS_BIG_ENDIAN):
3145 Define in terms of __BYTE_ORDER__.
3147 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3150 * src/c++17/fast_float/LOCAL_PATCHES: UPDATE.
3151 * src/c++17/fast_float/fast_float.h (round): Use explicit
3152 template argument list for std::min.
3154 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3156 * doc/xml/manual/status_cxx2017.xml: Update C++17 status.
3157 * doc/xml/manual/status_cxx2020.xml: Use 12.1 instead of 12 for
3159 * doc/html/manual/status.html: Regenerate.
3161 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3163 * acinclude.m4 (GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING): Improve
3165 * configure: Regenerate.
3167 2022-01-17 Patrick Palka <ppalka@redhat.com>
3169 * src/c++17/floating_from_chars.cc: (USE_LIB_FAST_FLOAT):
3170 Conditionally define, and use it to conditionally include
3172 (from_chars): Use fast_float for float and double when
3175 2022-01-17 Patrick Palka <ppalka@redhat.com>
3177 * src/c++17/fast_float/LOCAL_PATCHES: Update.
3178 * src/c++17/fast_float/fast_float.h (from_chars_advanced): In
3179 case of over/underflow, return errc::result_out_of_range and don't
3182 2022-01-17 Patrick Palka <ppalka@redhat.com>
3184 * src/c++17/fast_float/LOCAL_PATCHES: Update.
3185 * src/c++17/fast_float/fast_float.h: Apply local modifications.
3187 2022-01-17 Patrick Palka <ppalka@redhat.com>
3189 * src/c++17/fast_float/LOCAL_PATCHES: New file.
3190 * src/c++17/fast_float/MERGE: New file.
3191 * src/c++17/fast_float/README.md: New file, copied from the
3192 fast_float repository.
3193 * src/c++17/fast_float/fast_float.h: New file, an amalgamation
3194 of the fast_float library.
3196 2022-01-17 Patrick Palka <ppalka@redhat.com>
3198 * src/c++17/floating_from_chars.cc: Include <bit>.
3199 (ascii_to_hexit, starts_with_ci): Conditionally define.
3200 (__floating_from_chars_hex): Conditionally define.
3201 (from_chars): Use __floating_from_chars_hex for
3202 chars_format::hex parsing of binary32/64 float/double.
3203 (testsuite/20_util/from_chars/7.cc): New test.
3204 * testsuite/20_util/from_chars/7.cc: New file.
3206 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
3208 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): New macro.
3209 * configure.ac: Use GLIBCXX_ENABLE_BACKTRACE.
3210 * include/Makefile.am: Add new header.
3211 * include/Makefile.in: Regenerate.
3212 * include/std/stacktrace: New header.
3213 * include/std/version (__cpp_lib_stacktrace): Define.
3214 * Makefile.in: Regenerate.
3215 * config.h.in: Regenerate.
3216 * configure: Regenerate.
3217 * doc/Makefile.in: Regenerate.
3218 * libsupc++/Makefile.in: Regenerate.
3219 * po/Makefile.in: Regenerate.
3220 * python/Makefile.in: Regenerate.
3221 * src/Makefile.am: Regenerate.
3222 * src/Makefile.in: Regenerate.
3223 * src/c++11/Makefile.in: Regenerate.
3224 * src/c++17/Makefile.in: Regenerate.
3225 * src/c++20/Makefile.in: Regenerate.
3226 * src/c++98/Makefile.in: Regenerate.
3227 * src/filesystem/Makefile.in: Regenerate.
3228 * testsuite/Makefile.in: Regenerate.
3229 * src/libbacktrace/Makefile.am: New file.
3230 * src/libbacktrace/Makefile.in: New file.
3231 * src/libbacktrace/backtrace-rename.h: New file.
3232 * src/libbacktrace/backtrace-supported.h.in: New file.
3233 * src/libbacktrace/config.h.in: New file.
3234 * testsuite/lib/libstdc++.exp (check_effective_target_stacktrace):
3236 * testsuite/20_util/stacktrace/entry.cc: New test.
3237 * testsuite/20_util/stacktrace/synopsis.cc: New test.
3238 * testsuite/20_util/stacktrace/version.cc: New test.
3240 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
3242 * doc/xml/manual/status_cxx2020.xml: Use final C++20 option
3244 * doc/html/manual/status.html: Regenerate.
3246 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
3249 * include/Makefile.am: Rename LT_OBJDIR and STDC_HEADERS.
3250 * include/Makefile.in: Regenerate.
3251 * testsuite/17_intro/headers/c++1998/103650.cc: New test.
3253 2022-01-17 Matthias Kretz <m.kretz@gsi.de>
3255 * include/experimental/bits/simd.h (__floating_point_flags): Do
3256 not rely on the presence of the math_errhandling macro.
3258 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
3260 * include/bits/shared_ptr_atomic.h (_Sp_atomic): Add typename
3261 to qualified-id for dependent type.
3263 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
3265 * doc/xml/manual/status_cxx2020.xml: Update.
3266 * doc/html/manual/status.html: Regenerate.
3268 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
3269 Thomas Rodgers <trodgers@redhat.com>
3271 * include/bits/shared_ptr_atomic.h (__cpp_lib_atomic_shared_ptr):
3273 (_Sp_atomic): New class template.
3274 (atomic<shared_ptr<T>>, atomic<weak_ptr<T>>): New partial
3276 * include/bits/shared_ptr_base.h (__shared_count, __weak_count)
3277 (__shared_ptr, __weak_ptr): Declare _Sp_atomic as a friend.
3278 * include/std/version (__cpp_lib_atomic_shared_ptr): New macro.
3279 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc: New
3281 * testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: New test.
3283 2022-01-15 Matthias Kretz <m.kretz@gsi.de>
3285 * include/experimental/bits/simd.h: Move feature detection bools
3286 and add __have_avx512bitalg, __have_avx512vbmi2,
3287 __have_avx512vbmi, __have_avx512ifma, __have_avx512cd,
3288 __have_avx512vnni, __have_avx512vpopcntdq.
3289 (__detail::__machine_flags): New function which returns a unique
3290 uint64 depending on relevant -m and -f flags.
3291 (__detail::__odr_helper): New type alias for either an anonymous
3292 type or a type specialized with the __machine_flags number.
3293 (_SimdIntOperators): Change template parameters from _Impl to
3294 _Tp, _Abi because _Impl now has an __odr_helper parameter which
3295 may be _OdrEnforcer from the anonymous namespace, which makes
3296 for a bad base class.
3297 (many): Either add __odr_helper template parameter or mark as
3299 * include/experimental/bits/simd_detail.h: Add defines for
3300 AVX512BITALG, AVX512VBMI2, AVX512VBMI, AVX512IFMA, AVX512CD,
3301 AVX512VNNI, AVX512VPOPCNTDQ, and AVX512VP2INTERSECT.
3302 * include/experimental/bits/simd_builtin.h: Add __odr_helper
3303 template parameter or mark as always_inline.
3304 * include/experimental/bits/simd_fixed_size.h: Ditto.
3305 * include/experimental/bits/simd_math.h: Ditto.
3306 * include/experimental/bits/simd_scalar.h: Ditto.
3307 * include/experimental/bits/simd_neon.h: Add __odr_helper
3309 * include/experimental/bits/simd_ppc.h: Ditto.
3310 * include/experimental/bits/simd_x86.h: Ditto.
3312 2022-01-14 Uroš Bizjak <ubizjak@gmail.com>
3314 * testsuite/22_locale/numpunct/members/char/3.cc:
3315 Require pt_PT locale instead of nl_NL.
3316 (test02): Use pt_PT locale instead of nl_NL.
3318 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
3323 * include/backward/binders.h (bind1st, bind2nd): Add deprecated
3325 * include/bits/refwrap.h (_Maybe_unary_or_binary_function):
3326 Disable deprecated warnings for base classes.
3327 (_Reference_wrapper_base): Likewise.
3328 * include/bits/shared_ptr_base.h (_Sp_owner_less): Likewise.
3329 * include/bits/stl_bvector.h (_Bit_iterator_base): Likewise.
3330 * include/bits/stl_function.h (unary_function, binary_function):
3331 Add deprecated attribute.
3332 (unary_negate, not1, binary_negate, not2, ptr_fun)
3333 (pointer_to_unary_function, pointer_to_binary_function)
3334 (mem_fun_t, const_mem_fun_t, mem_fun_ref_t, const_mem_fun_ref_t)
3335 (mem_fun1_t, const_mem_fun1_t, mem_fun_ref1_t)
3336 (const_mem_fun1_ref_t, mem_fun, mem_fun_ref): Add deprecated
3338 * include/bits/stl_iterator.h: Disable deprecated warnings for
3339 std::iterator base classes.
3340 * include/bits/stl_iterator_base_types.h (iterator): Add
3341 deprecated attribute.
3342 * include/bits/stl_map.h (map::value_compare): Disable
3343 deprecated warnings for base class.
3344 * include/bits/stl_multimap.h (multimap::value_compare):
3346 * include/bits/stl_raw_storage_iter.h (raw_storage_iterator):
3347 Add deprecated attribute.
3348 * include/bits/stl_tempbuf.h (get_temporary_buffer): Likewise.
3349 * include/bits/stream_iterator.h: Disable deprecated warnings.
3350 * include/bits/streambuf_iterator.h: Likewise.
3351 * include/ext/bitmap_allocator.h: Remove unary_function base
3353 * include/ext/functional: Disable deprecated warnings.
3354 * include/ext/rope: Likewise.
3355 * include/ext/throw_allocator.h: Likewise.
3356 * include/std/type_traits (result_of): Add deprecated attribute.
3357 * include/tr1/functional: Disable deprecated warnings.
3358 * include/tr1/functional_hash.h: Likewise.
3359 * testsuite/20_util/function_objects/binders/1.cc: Add
3360 -Wno-disable-deprecations.
3361 * testsuite/20_util/function_objects/binders/3113.cc: Likewise.
3362 * testsuite/20_util/function_objects/constexpr.cc: Add
3364 * testsuite/20_util/raw_storage_iterator/base.cc: Likewise.
3365 * testsuite/20_util/raw_storage_iterator/dr2127.cc: Likewise.
3366 * testsuite/20_util/raw_storage_iterator/requirements/base_classes.cc:
3368 * testsuite/20_util/raw_storage_iterator/requirements/explicit_instantiation/1.cc:
3370 * testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc:
3372 * testsuite/20_util/reference_wrapper/24803.cc:
3374 * testsuite/20_util/reference_wrapper/typedefs.cc: Enable for
3375 C++20 and check for absence of nested types.
3376 * testsuite/20_util/shared_ptr/comparison/less.cc: Remove
3377 std::binary_function base class.
3378 * testsuite/20_util/temporary_buffer.cc: Add dg-warning.
3379 * testsuite/21_strings/basic_string/cons/char/69092.cc: Remove
3380 std::iterator base class.
3381 * testsuite/24_iterators/back_insert_iterator/requirements/base_classes.cc:
3383 * testsuite/24_iterators/front_insert_iterator/requirements/base_classes.cc:
3385 * testsuite/24_iterators/insert_iterator/requirements/base_classes.cc:
3387 * testsuite/24_iterators/istream_iterator/requirements/base_classes.cc:
3389 * testsuite/24_iterators/istreambuf_iterator/92285.cc:
3391 * testsuite/24_iterators/istreambuf_iterator/requirements/base_classes.cc:
3393 * testsuite/24_iterators/ostream_iterator/requirements/base_classes.cc:
3395 * testsuite/24_iterators/ostreambuf_iterator/requirements/base_classes.cc:
3397 * testsuite/24_iterators/reverse_iterator/requirements/base_classes.cc:
3399 * testsuite/25_algorithms/copy/34595.cc:
3401 * testsuite/25_algorithms/minmax/3.cc: Remove std::binary_function
3403 * testsuite/25_algorithms/all_of/requirements/explicit_instantiation/2.cc:
3404 Disable deprecated warnings.
3405 * testsuite/25_algorithms/all_of/requirements/explicit_instantiation/pod.cc:
3407 * testsuite/25_algorithms/any_of/requirements/explicit_instantiation/2.cc:
3409 * testsuite/25_algorithms/any_of/requirements/explicit_instantiation/pod.cc:
3411 * testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/2.cc:
3413 * testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/pod.cc:
3415 * testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc:
3417 * testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc:
3419 * testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc:
3421 * testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc:
3423 * testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc:
3425 * testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc:
3427 * testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc:
3429 * testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc:
3431 * testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/2.cc:
3433 * testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/pod.cc:
3435 * testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc:
3437 * testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc:
3439 * testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/2.cc:
3441 * testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/pod.cc:
3443 * testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/2.cc:
3445 * testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/pod.cc:
3447 * testsuite/25_algorithms/none_of/requirements/explicit_instantiation/2.cc:
3449 * testsuite/25_algorithms/none_of/requirements/explicit_instantiation/pod.cc:
3451 * testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc:
3453 * testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc:
3455 * testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/2.cc:
3457 * testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/pod.cc:
3459 * testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/2.cc:
3461 * testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/pod.cc:
3463 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
3465 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
3467 * testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc:
3469 * testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc:
3471 * testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc:
3473 * testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc:
3475 * testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc:
3477 * testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc:
3479 * testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc:
3481 * testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc:
3483 * testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc:
3485 * testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc:
3487 * testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc:
3489 * testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc:
3491 * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc:
3493 * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc:
3495 * testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc:
3497 * testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc:
3499 * testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc: Add
3501 * testsuite/ext/pb_ds/example/priority_queue_erase_if.cc:
3503 * testsuite/ext/pb_ds/example/priority_queue_split_join.cc:
3505 * testsuite/tr1/3_function_objects/reference_wrapper/typedefs.cc:
3506 Disable deprecated warnings.
3507 * testsuite/tr1/6_containers/hash/requirements/base_classes.cc:
3509 * testsuite/util/regression/trait/erase_if_fn.hpp: Remove
3510 std::unary_function base classes.
3511 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper):
3512 Remove std::iterator base classes.
3514 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
3516 * include/bits/shared_ptr.h (__cpp_lib_shared_ptr_weak_type):
3517 Correct type of macro value.
3518 (shared_ptr): Add additional friend declarations.
3519 (make_shared, allocate_shared): Constrain existing overloads and
3520 remove static_assert.
3521 * include/bits/shared_ptr_base.h (__cpp_lib_smart_ptr_for_overwrite):
3523 (_Sp_counted_ptr_inplace<T, Alloc, Lp>): New partial
3524 specialization for use with make_shared_for_overwrite.
3525 (__cpp_lib_shared_ptr_arrays): Update value for C++20.
3526 (_Sp_counted_array_base): New class template.
3527 (_Sp_counted_array): New class template.
3528 (__shared_count(_Tp*&, const _Sp_counted_array_base&, _Init)):
3529 New constructor for allocating shared arrays.
3530 (__shared_ptr(const _Sp_counted_array_base&, _Init)): Likewise.
3531 * include/std/version (__cpp_lib_shared_ptr_weak_type): Correct
3533 (__cpp_lib_shared_ptr_arrays): Update value for C++20.
3534 (__cpp_lib_smart_ptr_for_overwrite): New macro.
3535 * testsuite/20_util/shared_ptr/creation/99006.cc: Adjust
3537 * testsuite/20_util/shared_ptr/creation/array.cc: New test.
3538 * testsuite/20_util/shared_ptr/creation/overwrite.cc: New test.
3539 * testsuite/20_util/shared_ptr/creation/version.cc: New test.
3540 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: Check
3541 feature test macro. Test non-trivial default-initialization.
3543 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
3545 * include/bits/stl_construct.h (_Construct, _Construct_novalue):
3546 Also cast away cv-qualifiers when converting pointer to void.
3547 * testsuite/20_util/allocator/void.cc: Test construct function
3548 with cv-qualified types.
3550 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
3553 * include/bits/stl_iterator.h (common_iterator): Use
3554 std::construct_at instead of placement new.
3555 * testsuite/24_iterators/common_iterator/1.cc: Check copy
3556 construction is usable in constant expressions.
3558 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
3560 * doc/xml/manual/status_cxx2011.xml: Document new tokens
3561 accepted by std::random_device constructor.
3562 * doc/html/manual/status.html: Regenerate.
3564 2022-01-12 Patrick Palka <ppalka@redhat.com>
3566 * testsuite/20_util/to_chars/103955.cc: Add explicit dg-do
3569 2022-01-12 Patrick Palka <ppalka@redhat.com>
3572 * src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
3573 Track the excess precision separately from the effective
3574 precision. Avoid overflow in bounds check by splitting it into
3576 (__floating_to_chars_precision): Avoid overflow in bounds checks
3578 * testsuite/20_util/to_chars/103955.cc: New test.
3580 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3583 * include/Makefile.am: Install <source_location> for
3585 * include/Makefile.in: Regenerate.
3586 * include/std/version (__cpp_lib_source_location): Define for
3589 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3591 * include/std/ranges (ranges::lazy_split_view::_InnerIter::end()):
3592 Add neoxcept (LWG 3593).
3594 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3596 * include/std/ranges (ranges::__detail::__box): Add constexpr to
3597 assignment operators (LWG 3572).
3598 * testsuite/std/ranges/adaptors/filter.cc: Check assignment of a
3599 view that uses copyable-box.
3601 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3604 * include/Makefile.am: Install <coroutine> for freestanding.
3605 * include/Makefile.in: Regenerate.
3606 * include/std/coroutine: Adjust headers and preprocessor
3608 (__coroutine_traits_impl): Use concepts when available.
3609 [_GLIBCXX_HOSTED] (hash<coroutine_handle>): Define.
3611 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3613 * include/std/ostream (operator<<(basic_ostream&, charT)):
3614 Use unformatted input if no padding is needed.
3615 (operator<<(basic_ostream<char>&, char)): Likewise.
3617 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3620 * include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
3622 * include/std/variant (__cpp_lib_variant): Only define C++20
3623 value when the compiler is known to support conditionally
3624 trivial destructors.
3625 * include/std/version (__cpp_lib_variant): Likewise.
3627 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
3629 * include/bits/stl_iterator.h (common_iterator): Add constexpr
3630 to all member functions (LWG 3574).
3631 * testsuite/24_iterators/common_iterator/1.cc: Evaluate some
3632 tests as constant expressions.
3633 * testsuite/24_iterators/common_iterator/2.cc: Likewise.
3635 2022-01-10 Jakub Jelinek <jakub@redhat.com>
3638 * include/bits/locale_facets_nonio.h (__time_get_state): New struct.
3639 (time_get::_M_extract_via_format): Declare new method with
3640 __time_get_state& as an extra argument.
3641 * include/bits/locale_facets_nonio.tcc (_M_extract_via_format): Add
3642 __state argument, set various fields in it while parsing. Handle %j,
3643 %U, %w and %W, fix up handling of %y, %Y and %C, don't adjust tm_hour
3644 for %p immediately. Add a wrapper around the method without the
3645 __state argument for backwards compatibility.
3646 (_M_extract_num): Remove all __len == 4 special cases.
3647 (time_get::do_get_time, time_get::do_get_date, time_get::do_get): Zero
3648 initialize __state, pass it to _M_extract_via_format and finalize it
3650 (do_get_year): For 1-2 digit parsed years, map 0-68 to 2000-2068,
3651 69-99 to 1969-1999. For 3-4 digit parsed years use that as year.
3652 (get): If do_get isn't overloaded from the locale_facets_nonio.tcc
3653 version, don't call do_get but call _M_extract_via_format instead to
3655 * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export _M_extract_via_format
3656 with extra __time_get_state and __time_get_state::_M_finalize_state.
3657 * src/c++98/locale_facets.cc (is_leap, day_of_the_week,
3658 day_of_the_year): New functions in anon namespace.
3659 (mon_yday): New var in anon namespace.
3660 (__time_get_state::_M_finalize_state): Define.
3661 * testsuite/22_locale/time_get/get/char/4.cc: New test.
3662 * testsuite/22_locale/time_get/get/wchar_t/4.cc: New test.
3663 * testsuite/22_locale/time_get/get_year/char/1.cc (test01): Parse 197
3664 as year 197AD instead of error.
3665 * testsuite/22_locale/time_get/get_year/char/5.cc (test01): Parse 1 as
3666 year 2001 instead of error.
3667 * testsuite/22_locale/time_get/get_year/char/6.cc: New test.
3668 * testsuite/22_locale/time_get/get_year/wchar_t/1.cc (test01): Parse
3669 197 as year 197AD instead of error.
3670 * testsuite/22_locale/time_get/get_year/wchar_t/5.cc (test01): Parse
3671 1 as year 2001 instead of error.
3672 * testsuite/22_locale/time_get/get_year/wchar_t/6.cc: New test.
3674 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
3677 * acinclude.m4 (GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS): Do
3678 nothing for freestanding builds.
3679 (GLIBCXX_ENABLE_HOSTED): Define FREESTANDING_FLAGS.
3680 * configure.ac: Do not use AC_LIBTOOL_DLOPEN when configured
3681 with --without-headers. Do not use GCC_HEADER_STDINT for
3682 freestanding builds.
3683 * libsupc++/Makefile.am (HOSTED_CXXFLAGS): Use -ffreestanding
3684 for freestanding builds.
3685 * configure: Regenerate.
3686 * Makefile.in: Regenerate.
3687 * doc/Makefile.in: Regenerate.
3688 * include/Makefile.in: Regenerate.
3689 * libsupc++/Makefile.in: Regenerate.
3690 * po/Makefile.in: Regenerate.
3691 * python/Makefile.in: Regenerate.
3692 * src/Makefile.in: Regenerate.
3693 * src/c++11/Makefile.in: Regenerate.
3694 * src/c++17/Makefile.in: Regenerate.
3695 * src/c++20/Makefile.in: Regenerate.
3696 * src/c++98/Makefile.in: Regenerate.
3697 * src/filesystem/Makefile.in: Regenerate.
3698 * testsuite/Makefile.in: Regenerate.
3700 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
3702 * testsuite/28_regex/algorithms/regex_replace/char/103664.cc:
3703 Add dg-timeout-factor directive.
3704 * testsuite/28_regex/basic_regex/84110.cc: Likewise.
3705 * testsuite/28_regex/basic_regex/ctors/char/other.cc: Likewise.
3706 * testsuite/28_regex/match_results/102667.cc: Likewise.
3708 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
3710 * doc/xml/manual/using.xml: Update documentation around default
3712 * doc/html/*: Regenerate.
3714 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
3717 * src/c++17/Makefile.am (AM_CXXFLAGS): Add -nostdinc++.
3718 * src/c++17/Makefile.in: Regenerate.
3720 2022-01-09 Sandra Loosemore <sandra@codesourcery.com>
3722 * testsuite/18_support/type_info/constexpr.cc: Add explicit
3723 -fdelete-null-pointer-checks option.
3725 2022-01-06 Pavel I. Kryukov <pavel.kryukov@phystech.edu>
3726 Jonathan Wakely <jwakely@redhat.com>
3729 * include/bits/forward_list.tcc (forward_list::merge): Check for
3731 * testsuite/23_containers/forward_list/operations/merge.cc: New test.
3733 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
3735 * include/bits/regex.h (basic_regex, match_results): Qualify
3736 name in friend declaration, to work around Clang bug.
3738 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
3740 * testsuite/ext/rope/pthread7-rope.cc: Add dg-timeout-factor.
3742 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
3745 * include/std/charconv (__from_chars_alpha_to_num): Return
3746 char instead of unsigned char. Change invalid return value to
3747 127 instead of using numeric trait.
3748 (__from_chars_alnum): Fix comment. Do not use std::isdigit.
3749 Change type of variable to char.
3751 2022-01-05 François Dumont <fdumont@gcc.gnu.org>
3754 * include/bits/hashtable_policy.h
3755 (_Hashtable_hash_traits<_Hash>): New.
3756 (_Hash_code_base<>::_M_hash_code(const _Hash_node_value<>&)): New.
3757 (_Hashtable_base<>::_M_key_equals): New.
3758 (_Hashtable_base<>::_M_equals): Use latter.
3759 (_Hashtable_base<>::_M_key_equals_tr): New.
3760 (_Hashtable_base<>::_M_equals_tr): Use latter.
3761 * include/bits/hashtable.h
3762 (_Hashtable<>::__small_size_threshold()): New, use _Hashtable_hash_traits.
3763 (_Hashtable<>::find): Loop through elements to look for key if size is lower
3764 than __small_size_threshold().
3765 (_Hashtable<>::_M_emplace(true_type, _Args&&...)): Likewise.
3766 (_Hashtable<>::_M_insert_unique(_Kt&&, _Args&&, const _NodeGenerator&)): Likewise.
3767 (_Hashtable<>::_M_compute_hash_code(const_iterator, const key_type&)): New.
3768 (_Hashtable<>::_M_emplace(const_iterator, false_type, _Args&&...)): Use latter.
3769 (_Hashtable<>::_M_find_before_node(const key_type&)): New.
3770 (_Hashtable<>::_M_erase(true_type, const key_type&)): Use latter.
3771 (_Hashtable<>::_M_erase(false_type, const key_type&)): Likewise.
3772 * src/c++11/hashtable_c++0x.cc: Include <bits/functional_hash.h>.
3773 * testsuite/util/testsuite_performance.h
3774 (report_performance): Use 9 width to display memory.
3775 * testsuite/performance/23_containers/insert_erase/unordered_small_size.cc:
3776 New performance test case.
3778 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3781 * include/bits/basic_string.h (basic_string(const T&, size_t, size_t)):
3782 Relax constraints on string_view parameter.
3783 * include/bits/cow_string.h (basic_string(const T&, size_t, size_t)):
3785 * testsuite/21_strings/basic_string/cons/char/103919.cc: New test.
3787 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3789 * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export new symbol for
3791 * include/bits/c++config (_GLIBCXX23_CONSTEXPR): Define.
3792 * include/std/version (__cpp_lib_constexpr_typeinfo): Define.
3793 * libsupc++/tinfo.cc: Add #error to ensure non-inline definition
3795 (type_info::__equal): Define alias symbol.
3796 * libsupc++/typeinfo (type_info::before): Combine different
3797 implementations into one.
3798 (type_info::operator==): Likewise. Use address equality for
3799 constant evaluation. Call __equal for targets that require the
3800 definition to be non-inline.
3801 * testsuite/18_support/type_info/constexpr.cc: New test.
3803 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3805 * src/c++11/cxx11-ios_failure.cc (io_error_category): Define
3806 class and virtual functions as 'final'.
3807 (io_category_instance): Use constinit union to make the object
3809 * src/c++11/future.cc (future_error_category): Define class and
3810 virtual functions as 'final'.
3811 (future_category_instance): Use constinit union.
3813 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3815 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Strip
3816 versioned namespace from the type name that is printed.
3818 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3820 * python/libstdcxx/v6/printers.py (StdRegexStatePrinter): New
3821 printer for std::regex NFA states.
3823 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3825 * testsuite/23_containers/forward_list/operations/1.cc: Fill in
3826 placeholders in comments.
3827 * testsuite/23_containers/forward_list/operations/2.cc:
3829 * testsuite/23_containers/forward_list/operations/3.cc:
3831 * testsuite/23_containers/forward_list/operations/4.cc:
3833 * testsuite/23_containers/forward_list/operations/5.cc:
3835 * testsuite/23_containers/forward_list/operations/6.cc:
3837 * testsuite/23_containers/forward_list/operations/7.cc:
3840 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3843 * include/bits/stl_deque.h (operator-): Do not use 0 as null
3846 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3848 * include/bits/alloc_traits.h (allocator_traits<allocator<void>>):
3849 Use std::_Construct for construct.
3851 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3854 * doc/xml/faq.xml: Add '-x c++' to preprocessor command.
3855 * doc/html/faq.html: Regenerate.
3857 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3859 * include/bits/regex.h (__regex_algo_impl): Change __policy and
3860 __match_mode template parameters to be function parameters.
3861 (regex_match, regex_search): Pass policy and match mode as
3863 * include/bits/regex.tcc (__regex_algo_impl): Change template
3864 parameters to function parameters.
3865 * include/bits/regex_compiler.h (_RegexTranslatorBase): Use
3866 'if constexpr' for conditions using template parameters.
3867 (_RegexTranslator): Likewise.
3868 * include/bits/regex_executor.tcc (_Executor::_M_handle_accept):
3870 * testsuite/util/testsuite_regex.h (regex_match_debug)
3871 (regex_search_debug): Move template arguments to function
3874 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3876 * testsuite/util/testsuite_regex.h (regex_match_debug): Compare
3877 results even if the match failed.
3879 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
3881 * include/bits/regex_compiler.tcc: Adjust all calls to
3882 __throw_regex_error.
3883 * include/bits/regex_error.h (__throw_regex_error): Add noreturn
3885 * include/bits/regex_scanner.tcc: Likewise.
3886 * src/c++11/regex.cc (desc): New helper function.
3887 (regex_error::regex_error(error_type)): Use desc to get a string
3888 corresponding to the error code.
3891 Copyright (C) 2022 Free Software Foundation, Inc.
3893 Copying and distribution of this file, with or without modification,
3894 are permitted in any medium without royalty provided the copyright
3895 notice and this notice are preserved.