1 2024-01-24 Huanghui Nie <nnnjkk@gmail.com>
2 Théo Papadopoulo <papadopoulo@gmail.com>
4 * include/bits/hashtable.h (_Hahstable<>::_M_remove_bucket_begin): Remove
5 _M_before_begin check and cleanup implementation.
7 2024-01-22 Jonathan Wakely <jwakely@redhat.com>
9 * testsuite/std/time/clock/file/io.cc: Fix expected result in
10 assertion and call test_format() from main.
12 2024-01-21 Jonathan Wakely <jwakely@redhat.com>
15 * include/bits/chrono_io.h (__formatter_chrono::_M_S): Fix
16 printing of subseconds with floating-point rep.
17 (__formatter_chrono::_M_format_to_ostream): Do not write
18 time_point specializations directly to the ostream.
19 (formatter<chrono::sys_time<D>, C>::parse): Do not allow an
20 empty chrono-spec if the type fails to meet the constraints for
21 writing to an ostream with operator<<.
22 * testsuite/std/time/clock/file/io.cc: Check formatting
23 non-integral times with empty chrono-specs.
24 * testsuite/std/time/clock/gps/io.cc: Likewise.
25 * testsuite/std/time/clock/utc/io.cc: Likewise.
26 * testsuite/std/time/hh_mm_ss/io.cc: Likewise.
28 2024-01-21 Jonathan Wakely <jwakely@redhat.com>
30 * include/bits/chrono.h (__file_clock::from_sys)
31 (__file_clock::to_sys, __file_clock::_S_from_sys)
32 (__file_clock::_S_to_sys): Use common_type for return type.
33 * testsuite/std/time/clock/file/members.cc: Check round trip
34 conversion for time with lower precision that seconds.
36 2024-01-21 Jonathan Wakely <jwakely@redhat.com>
39 * include/std/format (__formatter_fp::format): Fix logic for
41 * testsuite/std/format/functions/format.cc: Check buggy cases of
42 alternate forms with g presentation type.
44 2024-01-20 Marek Polacek <polacek@redhat.com>
47 * include/std/ranges: Add #pragma to disable -Wdangling-reference with
48 std::ranges::views::__adaptor::operator|.
50 2024-01-19 Jonathan Wakely <jwakely@redhat.com>
52 * include/std/format (_Spec::_M_parse_fill_and_align): Do not
53 use CTAD for _Utf32_view.
55 2024-01-19 Jonathan Wakely <jwakely@redhat.com>
58 * include/std/tuple (__glibcxx_no_dangling_refs) [C++17]: Fix
60 * testsuite/20_util/tuple/dangling_ref.cc: Check tuples with one
61 element and three elements. Check allocator-extended
64 2024-01-19 Patrick Palka <ppalka@redhat.com>
66 * include/precompiled/stdc++.h [_GLIBCXX_HOSTED]: Include
67 <print> and <text_encoding> for C++23 and C++26 respectively.
69 2024-01-18 Patrick Palka <ppalka@redhat.com>
71 * include/bits/stl_pair.h [__cplusplus > 202002L]:
72 Guard P2321R2 changes with __glibcxx_ranges_zip instead.
74 2024-01-18 Patrick Palka <ppalka@redhat.com>
76 * include/std/tuple [__cplusplus > 202002L]: Guard P2321R2
77 changes with __cpp_lib_ranges_zip instead.
79 2024-01-18 Patrick Palka <ppalka@redhat.com>
82 * include/debug/safe_base.h (_Safe_sequence_base::_M_swap):
83 Remove _GLIBCXX20_CONSTEXPR from non-inline member function.
84 * include/debug/safe_iterator.h
85 (_GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_BEGIN): Define.
86 (_GLIBCXX20_CONSTEXPR_NON_LITERAL_SCOPE_END): Define.
87 (_Safe_iterator::operator=): Use them around the code path that
88 defines a variable of type __gnu_cxx::__scoped_lock.
89 (_Safe_iterator::operator++): Likewise.
90 (_Safe_iterator::operator--): Likewise.
91 (_Safe_iterator::operator+=): Likewise.
92 (_Safe_iterator::operator-=): Likewise.
93 * testsuite/23_containers/vector/element_access/constexpr.cc
94 (test_iterators): Test more iterator operations.
95 * testsuite/23_containers/vector/bool/element_access/constexpr.cc
96 (test_iterators): Likewise.
97 * testsuite/std/ranges/adaptors/all.cc (test08) [_GLIBCXX_DEBUG]:
100 2024-01-18 Jonathan Wakely <jwakely@redhat.com>
102 * include/bits/unicode.h (__charset_alias_match): Initialize
105 2024-01-18 Jonathan Wakely <jwakely@redhat.com>
108 * testsuite/std/format/functions/format.cc: Use signed char
111 2024-01-17 Jonathan Wakely <jwakely@redhat.com>
114 * acinclude.m4 (GLIBCXX_CONFIGURE): Add c++26 directory.
115 (GLIBCXX_CHECK_TEXT_ENCODING): Define.
116 * config.h.in: Regenerate.
117 * configure: Regenerate.
118 * configure.ac: Use GLIBCXX_CHECK_TEXT_ENCODING.
119 * include/Makefile.am: Add new headers.
120 * include/Makefile.in: Regenerate.
121 * include/bits/locale_classes.h (locale::encoding): Declare new
123 * include/bits/unicode.h (__charset_alias_match): New function.
124 * include/bits/text_encoding-data.h: New file.
125 * include/bits/version.def (text_encoding): Define.
126 * include/bits/version.h: Regenerate.
127 * include/std/text_encoding: New file.
128 * src/Makefile.am: Add new subdirectory.
129 * src/Makefile.in: Regenerate.
130 * src/c++26/Makefile.am: New file.
131 * src/c++26/Makefile.in: New file.
132 * src/c++26/text_encoding.cc: New file.
133 * src/experimental/Makefile.am: Include c++26 convenience
135 * src/experimental/Makefile.in: Regenerate.
136 * python/libstdcxx/v6/printers.py (StdTextEncodingPrinter): New
138 * scripts/gen_text_encoding_data.py: New file.
139 * testsuite/22_locale/locale/encoding.cc: New test.
140 * testsuite/ext/unicode/charset_alias_match.cc: New test.
141 * testsuite/std/text_encoding/cons.cc: New test.
142 * testsuite/std/text_encoding/members.cc: New test.
143 * testsuite/std/text_encoding/requirements.cc: New test.
145 2024-01-17 Jonathan Wakely <jwakely@redhat.com>
147 * include/bits/unicode.h (_Grapheme_cluster_view): Require view.
148 Do not use CTAD for _Utf32_view.
149 (__format_width, __truncate): Do not use CTAD.
150 (enable_borrowed_range<_Utf_view<T, R>>): Define specialization.
151 (enable_borrowed_range<_Grapheme_cluster_view<R>>): Likewise.
153 2024-01-17 Patrick Palka <ppalka@redhat.com>
155 * include/std/ranges (views::_CartesianProduct::operator()):
156 Adjust identity case as per P2540R1.
157 * testsuite/std/ranges/cartesian_product/1.cc (test01):
158 Adjust expected result of the identity case.
160 2024-01-15 Patrick Palka <ppalka@redhat.com>
162 * include/std/variant (__detail::__variant::_Variadic_union):
163 Add bool __trivially_destructible template parameter.
164 (__detail::__variant::_Variadic_union::~_Variadic_union):
165 Use __trivially_destructible in constraints instead.
166 (__detail::__variant::_Variant_storage): Pass
167 __trivially_destructible value to _Variadic_union.
169 2024-01-15 Patrick Palka <ppalka@redhat.com>
171 * include/bits/stl_iterator.h (const_iterator): Define conversion
172 operators as per P2836R1.
173 * include/bits/version.def (ranges_as_const): Update value.
174 * include/bits/version.h: Regenerate.
175 * testsuite/24_iterators/const_iterator/1.cc (test04): New test.
176 * testsuite/std/ranges/adaptors/as_const/1.cc: Adjust expected
177 value of __cpp_lib_ranges_as_const.
178 * testsuite/std/ranges/version_c++23.cc: Likewise.
180 2024-01-15 Jonathan Wakely <jwakely@redhat.com>
183 * include/std/tuple (__assignable, __is_nothrow_assignable):
184 Move pre-C++20 definitions adjacent to their use.
186 2024-01-15 Jonathan Wakely <jwakely@redhat.com>
189 * include/std/format (basic_format_arg): Use __formattable
190 variable template instead of __format::__formattable_with
193 2024-01-15 Jonathan Wakely <jwakely@redhat.com>
195 * src/c++20/tzdata.zi: Import new file from 2023d release.
196 * src/c++20/tzdb.cc (tzdb_list::_Node::_S_read_leap_seconds)
197 Update expiry date for leap seconds list.
199 2024-01-13 Jonathan Wakely <jwakely@redhat.com>
202 * include/std/tuple (tuple): Add checks for dangling references.
203 Reimplement constraints and constant expressions using C++20
205 * include/std/type_traits [C++20]
206 (__is_implicitly_default_constructible_v): Define.
207 (__is_implicitly_default_constructible): Use variable template.
208 * testsuite/20_util/tuple/dangling_ref.cc: New test.
210 2024-01-13 Patrick Palka <ppalka@redhat.com>
214 * include/bits/version.def (bind_back): Define.
215 * include/bits/version.h: Regenerate.
216 * include/std/functional (_Bind_back): Define for C++23.
217 (bind_back): Likewise.
218 * testsuite/20_util/function_objects/bind_back/1.cc: New test
219 (adapted from corresponding bind_front test).
220 * testsuite/20_util/function_objects/bind_back/111327.cc: Likewise.
222 2024-01-13 Patrick Palka <ppalka@redhat.com>
224 * include/std/functional (_Bind_front): Remove =default special
225 member function declarations.
226 (_Bind_front::operator()): Implement using C++23 deducing this
228 * testsuite/20_util/function_objects/bind_front/111327.cc:
229 Adjust testcase to expect better errors in C++23 mode.
231 2024-01-13 Patrick Palka <ppalka@redhat.com>
233 * include/std/ranges (views::__adaptor::operator|): Perform
234 perfect forwarding of arguments.
235 (views::__adaptor::_RangeAdaptor::operator()): Pass dummy
236 first argument to _Partial.
237 (views::__adaptor::_Partial::_Partial): Likewise. Add dummy
239 (views::__adaptor::_Pipe::_Pipe): Perform perfect forwarding
241 (to): Pass dummy first argument to _Partial.
243 2024-01-13 Jonathan Wakely <jwakely@redhat.com>
246 * include/bits/random.tcc (subtract_with_carry_engine::seed):
247 Implement proposed resolution of LWG 4014.
248 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
250 * testsuite/26_numerics/random/subtract_with_carry_engine/cons/lwg3809.cc:
251 Check for expected result of 64-bit engine with seed that
252 doesn't fit in 32-bits.
254 2024-01-12 Jonathan Wakely <jwakely@redhat.com>
257 * include/std/format (__format::_Runtime_format_string): Add
258 constructor and disable copy operations.
259 (basic_format_string(_Runtime_format_string)): Add noexcept and
260 take parameter by value not rvalue reference.
261 (runtime_format): Add noexcept.
262 * testsuite/std/format/runtime_format.cc: Check noexcept. Check
263 that construction is only possible from prvalues, not xvalues.
265 2024-01-12 Jonathan Wakely <jwakely@redhat.com>
268 * include/bits/stl_pair.h (pair::pair(U1&&, U2&&)) [C++23]: Add
269 default template arguments, as per P1951R1.
270 * testsuite/20_util/pair/cons/default_tmpl_args.cc: New test.
272 2024-01-12 Jonathan Wakely <jwakely@redhat.com>
274 * include/std/format (__format::_Arg_store): Fix PR number in
275 comment. Simplify preprocessor code.
277 2024-01-11 Jonathan Wakely <jwakely@redhat.com>
279 * doc/xml/manual/evolution.xml: Fix spelling.
280 * doc/html/manual/api.html: Regenerate.
282 2024-01-11 Jonathan Wakely <jwakely@redhat.com>
284 * doc/xml/manual/evolution.xml: Document addition of
286 * doc/html/*: Regenerate.
288 2024-01-11 Marcus Haehnel <marcus.haehnel@kernkonzept.com>
290 * libsupc++/eh_unex_handler.cc: Adjust definition type to
293 2024-01-11 Michael Levine <mlevine55@bloomberg.net>
295 * include/std/ranges (__glibcxx_want_ranges_iota): Remove
296 duplicate definition.
298 2024-01-11 François Dumont <fdumont@gcc.gnu.org>
302 (_Safe_iterator_base::_M_attach): Reset _M_version to 0 if attaching to null
304 (_Safe_iterator_base::_M_attach_single): Likewise.
305 (_Safe_local_iterator_base::_M_attach): Likewise.
306 (_Safe_local_iterator_base::_M_attach_single): Likewise.
307 * testsuite/23_containers/map/debug/112477.cc: New test case.
309 2024-01-11 Patrick Palka <ppalka@redhat.com>
311 * include/bits/move.h (__like_t): Define in C++23 mode.
312 * include/std/ranges (views::__adaptor::Partial::operator()):
313 Implement using C++23 deducing this when available.
314 (views::__adaptor::_Pipe::operator()): Likewise.
315 * testsuite/std/ranges/adaptors/100577.cc: Adjust testcase to
316 accept new "no match for call" errors issued in C++23 mode.
317 * testsuite/std/ranges/adaptors/lazy_split_neg.cc: Likewise.
319 2024-01-11 Jonathan Wakely <jwakely@redhat.com>
321 * python/libstdcxx/v6/printers.py (StdIntegralConstantPrinter):
322 Add printer for std::integral_constant.
323 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test it.
325 2024-01-11 Jonathan Wakely <jwakely@redhat.com>
328 * libsupc++/new_opa.cc: Prefer to use posix_memalign if
331 2024-01-11 Ken Matsui <kmatsui@gcc.gnu.org>
333 * src/filesystem/ops-common.h (stat_type): Use using.
335 2024-01-11 Ken Matsui <kmatsui@gcc.gnu.org>
338 * src/c++17/fs_ops.cc (fs::equivalent): Use || instead of &&.
339 * src/filesystem/ops.cc (fs::equivalent): Likewise.
340 * testsuite/27_io/filesystem/operations/equivalent.cc: Handle
342 * testsuite/experimental/filesystem/operations/equivalent.cc:
345 2024-01-11 Ken Matsui <kmatsui@gcc.gnu.org>
347 * include/std/type_traits (is_compound): Do not use __not_.
348 (is_compound_v): Use is_fundamental_v instead.
350 2024-01-11 Patrick Palka <ppalka@redhat.com>
352 * include/bits/utility.h (_Nth_type): Use
353 _GLIBCXX_USE_BUILTIN_TRAIT instead of __has_builtin.
355 2024-01-09 Jonathan Wakely <jwakely@redhat.com>
357 * include/bits/unicode-data.h: Regenerate.
358 * include/bits/unicode.h (_Utf_iterator::operator++()): Fix off
360 (__incb_property): Add missing check for values before the
362 (__is_extended_pictographic): Invert return values to fix
364 (_Grapheme_cluster_view::_Iterator): Remove second iterator
365 member and find end of cluster lazily.
366 * testsuite/ext/unicode/grapheme_view.cc: New test.
367 * testsuite/ext/unicode/properties.cc: New test.
368 * testsuite/ext/unicode/view.cc: New test.
370 2024-01-09 Andreas Schwab <schwab@linux-m68k.org>
372 * scripts/extract_symvers.in: Require final colon to only match
373 .dsynsym in the header of the dynamic symtab.
375 2024-01-09 Jonathan Wakely <jwakely@redhat.com>
377 * include/bits/chrono_io.h (__formatter_chrono::_M_F): Simplify
378 handling of string returned from std::format.
379 (__formatter_chrono::_M_R_T): Likewise.
381 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
383 * include/bits/unicode.h (__null_sentinel): Remove.
384 * testsuite/17_intro/names.cc: Add __null_sentinel.
386 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
388 * include/std/format (__format::_Runtime_format_string): Define
390 (basic_format_string): Add non-consteval constructor for runtime
392 (runtime_format): Define new function for C++26.
393 * testsuite/std/format/runtime_format.cc: New test.
395 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
397 * include/bits/chrono_io.h (__formatter_chrono): Always use
398 lvalue arguments to make_format_args.
399 * include/std/format (make_format_args): Change parameter pack
400 from forwarding references to lvalue references. Remove use of
401 remove_reference_t which is now unnecessary.
402 (format_to, formatted_size): Remove incorrect forwarding of
404 * include/std/ostream (print): Remove forwarding of arguments.
405 * include/std/print (print): Likewise.
406 * testsuite/20_util/duration/io.cc: Use lvalues as arguments to
408 * testsuite/std/format/arguments/args.cc: Likewise.
409 * testsuite/std/format/arguments/lwg3810.cc: Likewise.
410 * testsuite/std/format/functions/format.cc: Likewise.
411 * testsuite/std/format/functions/vformat_to.cc: Likewise.
412 * testsuite/std/format/string.cc: Likewise.
413 * testsuite/std/time/day/io.cc: Likewise.
414 * testsuite/std/time/month/io.cc: Likewise.
415 * testsuite/std/time/weekday/io.cc: Likewise.
416 * testsuite/std/time/year/io.cc: Likewise.
417 * testsuite/std/time/year_month_day/io.cc: Likewise.
418 * testsuite/std/format/arguments/args_neg.cc: New test.
420 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
422 * include/Makefile.am: Add new headers.
423 * include/Makefile.in: Regenerate.
424 * include/bits/unicode.h: New file.
425 * include/bits/unicode-data.h: New file.
426 * include/std/format: Include <bits/unicode.h>.
427 (__literal_encoding_is_utf8): Move to <bits/unicode.h>.
428 (_Spec::_M_fill): Change type to char32_t.
429 (_Spec::_M_parse_fill_and_align): Read a Unicode scalar value
430 instead of a single character.
431 (__write_padded): Change __fill_char parameter to char32_t and
432 encode it into the output.
433 (__formatter_str::format): Use new __unicode::__field_width and
434 __unicode::__truncate functions.
435 * include/std/ostream: Adjust namespace qualification for
436 __literal_encoding_is_utf8.
437 * include/std/print: Likewise.
438 * src/c++23/print.cc: Add [[unlikely]] attribute to error path.
439 * testsuite/ext/unicode/view.cc: New test.
440 * testsuite/std/format/functions/format.cc: Add missing examples
441 from the standard demonstrating alignment with non-ASCII
442 characters. Add examples checking correct handling of extended
445 2024-01-08 Jonathan Wakely <jwakely@redhat.com>
447 * include/bits/version.def (format_uchar): Define.
448 * include/bits/version.h: Regenerate.
449 * include/std/format (formatter<C, C>::format): Check for
450 _Pres_c and call _M_format_character directly. Cast C to its
451 unsigned equivalent for formatting as an integer.
452 (formatter<char, wchar_t>::format): Likewise.
453 (basic_format_arg(T&)): Store char arguments as unsigned char
454 for formatting to a wide string.
455 * testsuite/std/format/functions/format.cc: Adjust test. Check
458 2024-01-07 Jonathan Wakely <jwakely@redhat.com>
461 * libsupc++/unwind-cxx.h (__cxa_call_terminate): Change first
464 2024-01-07 Jonathan Wakely <jwakely@redhat.com>
466 * testsuite/20_util/variant/87619.cc: Remove dg-timeout-factor.
468 2024-01-07 Jonathan Wakely <jwakely@redhat.com>
470 * include/std/type_traits (is_trivially_destructible_v): Use
471 built-in directly when concepts are supported.
472 * testsuite/20_util/is_trivially_destructible/value_v.cc: New
475 2024-01-06 Gwenole Beauchesne <gb.devel@gmail.com>
477 * testsuite/tr1/8_c_compatibility/cinttypes/functions.cc: Use
478 nonnull arguments to strtoimax() and wcstoimax() functions.
480 2024-01-05 Jonathan Wakely <jwakely@redhat.com>
482 * src/c++17/fs_path.cc (path::_List::reserve): Limit maximum
483 size and check for overflows in arithmetic.
484 (path::operator/=(const path&)): Remove redundant exponential
487 2024-01-05 Martin Küttler <martin.kuettler@kernkonzept.com>
489 * src/c++17/fs_path.cc (path::_List::reserve): Avoid
490 floating-point arithmetic.
492 2024-01-05 Jonathan Wakely <jwakely@redhat.com>
495 * include/std/type_traits (is_convertible_v): Guard use of
496 built-in with preprocessor check.
498 2024-01-05 Jonathan Wakely <jwakely@redhat.com>
501 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Use
502 __builtin_constant_p to check for unrelated pointers that cannot
503 be compared during constant evaluation.
504 * testsuite/21_strings/char_traits/requirements/113200.cc: New
507 2024-01-05 Cassio Neri <cassio.neri@gmail.com>
509 * include/std/chrono: Fix + and - for months and weekdays.
510 * testsuite/std/time/month/1.cc: Add constexpr tests against overflow.
511 * testsuite/std/time/month/2.cc: New test for extreme values.
512 * testsuite/std/time/weekday/1.cc: Add constexpr tests against overflow.
513 * testsuite/std/time/weekday/2.cc: New test for extreme values.
515 2024-01-05 Jonathan Wakely <jwakely@redhat.com>
518 * include/bits/locale_classes.tcc (__try_use_facet): Use
519 if-constexpr for C++11 and up.
521 2024-01-05 Ken Matsui <kmatsui@gcc.gnu.org>
523 * include/std/type_traits: Use _GLIBCXX_USE_BUILTIN_TRAIT.
525 2024-01-04 Arsen Arsenović <arsen@aarsen.me>
527 * include/std/generator (_Subyield_state::_M_jump_in): Fix typo
528 reported by Will Hawkins <hawkinsw@obs.cr>.
530 2024-01-04 Arsen Arsenović <arsen@aarsen.me>
532 * include/std/generator (_Stateless_alloc): Rename typename _A
535 2024-01-03 Patrick Palka <ppalka@redhat.com>
538 * testsuite/std/ranges/iota/max_size_type.cc (test02): Reduce
539 'limit' to 100 from 1000 and adjust 'log2_limit' accordingly.
543 Copyright (C) 2024 Free Software Foundation, Inc.
545 Copying and distribution of this file, with or without modification,
546 are permitted in any medium without royalty provided the copyright
547 notice and this notice are preserved.