1 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
3 * include/bits/char_traits.h: Only include <cstdint> when
5 * include/std/stacktrace: Use __UINTPTR_TYPE__ instead of
7 * src/c++11/cow-stdexcept.cc: Include <stdint.h>.
8 * src/c++17/floating_to_chars.cc: Likewise.
9 * testsuite/20_util/assume_aligned/1.cc: Include <cstdint>.
10 * testsuite/20_util/assume_aligned/3.cc: Likewise.
11 * testsuite/20_util/shared_ptr/creation/array.cc: Likewise.
13 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
15 * include/bits/basic_string.h: Do not include <ext/atomicity.h>
17 * include/bits/cow_string.h: Include it here.
19 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
21 * include/Makefile.am: Add new header.
22 * include/Makefile.in: Regenerate.
23 * include/bits/memory_resource.h: New file.
24 * include/std/deque: Include <bits/memory_resource.h>.
25 * include/std/forward_list: Likewise.
26 * include/std/list: Likewise.
27 * include/std/map: Likewise.
28 * include/std/memory_resource (pmr::memory_resource): Move to
29 new <bits/memory_resource.h> header.
30 (pmr::polymorphic_allocator): Likewise.
31 * include/std/regex: Likewise.
32 * include/std/set: Likewise.
33 * include/std/stacktrace: Likewise.
34 * include/std/string: Likewise.
35 * include/std/unordered_map: Likewise.
36 * include/std/unordered_set: Likewise.
37 * include/std/vector: Likewise.
38 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc:
39 Remove <memory_resource> header and check construction.
40 * testsuite/23_containers/deque/types/pmr_typedefs.cc: Likewise.
41 * testsuite/23_containers/forward_list/pmr_typedefs.cc:
43 * testsuite/23_containers/list/pmr_typedefs.cc: Likewise.
44 * testsuite/23_containers/map/pmr_typedefs.cc: Likewise.
45 * testsuite/23_containers/multimap/pmr_typedefs.cc: Likewise.
46 * testsuite/23_containers/multiset/pmr_typedefs.cc: Likewise.
47 * testsuite/23_containers/set/pmr_typedefs.cc: Likewise.
48 * testsuite/23_containers/unordered_map/pmr_typedefs.cc:
50 * testsuite/23_containers/unordered_multimap/pmr_typedefs.cc:
52 * testsuite/23_containers/unordered_multiset/pmr_typedefs.cc:
54 * testsuite/23_containers/unordered_set/pmr_typedefs.cc:
56 * testsuite/23_containers/vector/pmr_typedefs.cc: Likewise.
57 * testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
59 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
61 * include/std/memory_resource (polymorphic_allocator): Add
62 non-template equality operator, as proposed for LWG 3683.
63 * testsuite/20_util/polymorphic_allocator/lwg3683.cc: New test.
65 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
67 * src/c++17/memory_resource.cc (set_default_resource): Use
69 (get_default_resource): Use memory_order_acquire.
71 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
73 * include/std/memory_resource (new_delete_resource): Add
74 nodiscard, returns_nonnull and const attributes.
75 (null_memory_resource): Likewise.
76 (set_default_resource, get_default_resource): Add returns_nonnull
78 (memory_resource::is_equal): Add nodiscard attribute.
79 (operator==, operator!=): Likewise.
81 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
83 * include/bits/ios_base.h (io_category): Add const and nodiscard
85 (make_error_code, make_error_condition): Add nodiscard.
86 * include/std/future (future_category): Add const and nodiscard.
87 (make_error_code, make_error_condition): Add nodiscard.
88 * include/std/system_error (generic_category system_category):
89 Add nodiscard. Replace _GLIBCXX_CONST with C++11 attribute.
90 (error_code::value, error_code::category, error_code::operator bool)
91 (error_condition::value, error_condition::category)
92 (error_condition::operator bool, make_error_code)
93 (make_error_condition, operator==, operator!=, operator<=>): Add
96 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
98 * testsuite/20_util/expected/synopsis.cc: Skip for versioned
100 * testsuite/27_io/headers/iosfwd/synopsis.cc: Likewise.
102 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
104 * src/Makefile.am [ENABLE_SYMVERS_GNU_NAMESPACE] (cxx11_sources):
105 Do not build the compatibility*-c++0x.cc objects.
106 * src/Makefile.in: Regenerate.
107 * src/c++11/compatibility-c++0x.cc [_GLIBCXX_INLINE_VERSION]:
108 Refuse to build for the versioned namespace.
109 * src/c++11/compatibility-chrono.cc: Likewise.
110 * src/c++11/compatibility-condvar.cc: Likewise.
111 * src/c++11/compatibility-thread-c++0x.cc: Likewise.
112 * src/c++11/chrono.cc (system_clock, steady_clock):
113 Use macros to define in inline namespace _V2, matching the
114 declarations in <system_error>.
115 * src/c++11/system_error.cc (system_category, generic_category):
118 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
120 * doc/xml/manual/prerequisites.xml: Fix attributes for external
122 * doc/html/manual/setup.html: Regenerate.
124 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
126 * doc/xml/manual/status_cxx2023.xml: Update with gcc-12 support.
127 * doc/html/*: Regenerate.
129 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
131 * doc/xml/manual/intro.xml: Include new chapter.
132 * doc/xml/manual/status_cxx2020.xml: Tweak release numbers.
133 * doc/xml/manual/status_cxx2023.xml: New file.
134 * doc/html/*: Regenerate.
136 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
138 * doc/html/manual/status.html: Regenerate.
139 * doc/xml/manual/status_cxx2020.xml: Fix supported version for
140 C++20 bit operations.
142 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
144 * include/bits/std_thread.h (thread::_State, thread::_State_ptr):
145 Declare as private unless _GLIBCXX_THREAD_IMPL is defined.
146 * src/c++11/thread.cc (_GLIBCXX_THREAD_IMPL): Define.
148 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
150 * include/std/future (launch): Make operators noexcept.
152 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
154 * doc/doxygen/user.cfg.in (PREDEFINED): Replace __exception_ptr
155 with "__unspecified__".
156 * libsupc++/exception_ptr.h: Improve doxygen docs.
157 (__exception_ptr::swap): Also declare in namespace std.
159 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
161 * libsupc++/nested_exception.h (throw_with_nested) [C++17]: Use
162 if-constexpr instead of tag dispatching.
163 (rethrow_if_nested) [C++17]: Likewise.
164 (rethrow_if_nested) [!__cpp_rtti]: Do not use dynamic_cast if it
166 * testsuite/18_support/nested_exception/rethrow_if_nested-term.cc:
169 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
171 * doc/doxygen/user.cfg.in (PREDEFINED): Define
172 _GTHREAD_USE_MUTEX_TIMEDLOCK macro.
173 * include/bits/std_mutex.h (mutex, lock_guard): Use @since and
175 * include/bits/unique_lock.h (unique_lock): Likewise.
176 * include/std/mutex (recursive_mutex, timed_mutex)
177 (recursive_timed_mutex, scoped_lock): Likewise.
179 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
181 * doc/doxygen/user.cfg.in (PREDEFINED): Define
182 _GLIBCXX23_CONSTEXPR macro.
183 * include/backward/auto_ptr.h (auto_ptr): Use @deprecated.
184 * include/bits/unique_ptr.h (default_delete): Use @since and
186 * include/std/scoped_allocator: Remove @ingroup from @file
189 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
191 * include/bits/std_thread.h (thread, thread::id): Improve
193 * include/std/future: Likewise.
194 * include/std/thread (jthread): Likewise.
196 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
198 * include/bits/ostream_insert.h: Mark helper functions as
199 undocumented by Doxygen.
200 * include/bits/stl_algo.h: Use markdown for formatting and mark
201 helper functions as undocumented.
202 * include/bits/stl_numeric.h: Likewise.
203 * include/bits/stl_pair.h (pair): Add @headerfile.
205 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
207 * doc/doxygen/user.cfg.in (PREDEFINED): Define __allocator_base
208 so that Doxygen shows the right base-class for std::allocator.
209 * include/bits/alloc_traits.h: Improve doxygen docs.
210 * include/bits/allocator.h: Likewise.
211 * include/bits/new_allocator.h: Likewise.
212 * include/ext/new_allocator.h: Likewise.
214 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
216 * doc/doxygen/user.cfg.in (PREDEFINED): Define macro
217 _GLIBCXX_DOXYGEN_ONLY to expand its argument.
218 * include/bits/c++config (_GLIBCXX_DOXYGEN_ONLY): Define.
219 * include/bits/regex.h: Improve doxygen docs.
220 * include/bits/regex_constants.h: Likewise.
221 * include/bits/regex_error.h: Likewise.
223 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
225 * include/std/atomic: Suppress doxygen docs for
226 implementation details.
227 * include/bits/atomic_base.h: Likewise.
228 * include/bits/shared_ptr_atomic.h: Use markdown. Fix grouping
229 so that std::atomic is not added to the pointer abstractions
232 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
234 * include/std/system_error: Improve doxygen comments.
236 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
238 * include/bits/ptr_traits.h: Add some doxygen comments.
240 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
242 * doc/doxygen/user.cfg.in (PREDEFINED): Expand new macros to
244 * include/bits/c++config (_GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE)
245 (_GLIBCXX_END_INLINE_ABI_NAMESPACE): Define new macros.
246 * include/bits/algorithmfwd.h (_V2::__rotate): Use new macros
248 * include/bits/chrono.h (chrono::_V2::system_clock): Likewise.
249 * include/bits/stl_algo.h (_V2::__rotate): Likewise.
250 * include/std/condition_variable (_V2::condition_variable_any):
252 * include/std/system_error (_V2::error_category): Likewise.
254 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
256 * include/bits/mofunc_impl.h: Fix doxygen command.
258 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
260 * doc/doxygen/user.cfg.in (GROUP_NESTED_COMPOUNDS): Set to NO.
261 (CLASS_DIAGRAMS): Remove obsolete option.
263 2022-05-12 Jonathan Wakely <jwakely@redhat.com>
265 * config/locale/dragonfly/numeric_members.cc: Remove whitespace.
266 * config/locale/gnu/numeric_members.cc: Likewise.
267 * include/bits/locale_facets_nonio.h: Likewise.
268 * libsupc++/typeinfo: Likewise.
270 2022-05-10 Jonathan Wakely <jwakely@redhat.com>
273 * include/std/iosfwd: Add declarations for <spanstream> class
274 templates and typedefs.
275 * include/std/spanstream (basic_spanbuf, basic_ispanstream)
276 (basic_ospanstream, basic_spanstream): Remove default template
278 * testsuite/27_io/headers/iosfwd/synopsis.cc: Add <spanstream>
280 * testsuite/27_io/headers/iosfwd/types.cc: Check <spanstream>
283 2022-05-10 Jonathan Wakely <jwakely@redhat.com>
286 * include/std/iosfwd: Add declarations for <synstream> class
287 templates and typedefs.
288 * include/std/syncstream (basic_syncbuf, basic_osyncstream):
289 Remove default template arguments.
290 * testsuite/27_io/headers/iosfwd/synopsis.cc: New test.
291 * testsuite/27_io/headers/iosfwd/types.cc: New test.
293 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
295 * include/bits/random.tcc (operator==): Only check
296 normal_distribution::_M_saved_available once.
297 * testsuite/26_numerics/random/normal_distribution/operators/equal.cc:
298 Check equality after state changes.
299 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
302 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
305 * include/bits/random.tcc
306 (operator>>(basic_istream<C,T>&, normal_distribution<R>&)):
307 Update state when __state_avail is false.
308 * testsuite/26_numerics/random/normal_distribution/operators/serialize.cc:
309 Check that deserialized object equals serialized one.
311 2022-05-06 Alexandre Oliva <oliva@adacore.com>
313 * include/experimental/bits/simd.h [__ALTIVEC__]: Require VSX
314 for double, long long, and 64-bit long intrinsic types.
315 [__ALTIVEC__] (__intrinsic_type): Mention 128-bit in
316 preexisting long double diagnostic, adjust no-VSX double
317 diagnostic to cover 64-bit long double as well.
319 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
322 * testsuite/27_io/filesystem/iterators/error_reporting.cc:
323 Use a trailing char array as storage for dirent::d_name.
325 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
327 * include/std/stacktrace: Do not include <cxxabi.h>.
328 (__cxa_demangle): Declare.
330 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
333 * include/bits/specfun.h: Use visibility attribute on namespace,
334 instead of pragma push/pop.
335 * libsupc++/compare: Likewise.
336 * libsupc++/exception: Likewise.
337 * libsupc++/exception.h: Likewise.
338 * libsupc++/exception_ptr.h: Likewise.
339 * libsupc++/initializer_list: Likewise.
340 * libsupc++/nested_exception.h: Likewise.
342 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
344 * doc/xml/manual/test.xml: Remove requirement for copyright and
346 * doc/html/manual/test.html: Regenerate.
348 2022-05-05 Jonathan Wakely <jwakely@redhat.com>
350 * include/experimental/memory_resource [!__cpp_rtti]
351 (__resource_adaptor_imp::do_is_equal): Do not use dynamic_cast
352 when RTTI is disabled.
353 * testsuite/17_intro/freestanding.cc: Require RTTI.
354 * testsuite/18_support/exception/38732.cc: Likewise.
355 * testsuite/18_support/exception_ptr/rethrow_exception.cc:
357 * testsuite/18_support/nested_exception/68139.cc: Likewise.
358 * testsuite/18_support/nested_exception/rethrow_if_nested.cc:
360 * testsuite/18_support/type_info/103240.cc: Likewise.
361 * testsuite/18_support/type_info/fundamental.cc: Likewise.
362 * testsuite/18_support/type_info/hash_code.cc: Likewise.
363 * testsuite/20_util/any/assign/emplace.cc: Likewise.
364 * testsuite/20_util/any/cons/in_place.cc: Likewise.
365 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
366 * testsuite/20_util/any/observers/type.cc: Likewise.
367 * testsuite/20_util/function/1.cc: Likewise.
368 * testsuite/20_util/function/2.cc: Likewise.
369 * testsuite/20_util/function/3.cc: Likewise.
370 * testsuite/20_util/function/4.cc: Likewise.
371 * testsuite/20_util/function/5.cc: Likewise.
372 * testsuite/20_util/function/6.cc: Likewise.
373 * testsuite/20_util/function/7.cc: Likewise.
374 * testsuite/20_util/function/8.cc: Likewise.
375 * testsuite/20_util/polymorphic_allocator/resource.cc: Likewise.
376 * testsuite/20_util/shared_ptr/casts/1.cc: Likewise.
377 * testsuite/20_util/shared_ptr/casts/rval.cc: Likewise.
378 * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc:
380 * testsuite/20_util/shared_ptr/misc/get_deleter.cc: Likewise.
381 * testsuite/20_util/typeindex/comparison_operators.cc: Likewise.
382 * testsuite/20_util/typeindex/comparison_operators_c++20.cc:
384 * testsuite/20_util/typeindex/hash.cc: Likewise.
385 * testsuite/20_util/typeindex/hash_code.cc: Likewise.
386 * testsuite/20_util/typeindex/name.cc: Likewise.
387 * testsuite/22_locale/ctype/is/string/89728_neg.cc: Likewise.
388 * testsuite/22_locale/global_templates/standard_facet_hierarchies.cc:
390 * testsuite/22_locale/global_templates/user_facet_hierarchies.cc:
392 * testsuite/22_locale/locale/13630.cc: Check type without using
394 * testsuite/23_containers/array/requirements/non_default_constructible.cc:
396 * testsuite/27_io/basic_ostream/emit/1.cc: Likewise.
397 * testsuite/27_io/fpos/14320-1.cc: Check type without using RTTI.
398 * testsuite/27_io/fpos/mbstate_t/12065.cc: Require RTTI.
399 * testsuite/27_io/ios_base/failure/dual_abi.cc: Likewise.
400 * testsuite/experimental/any/misc/any_cast.cc: Likewise.
401 * testsuite/experimental/any/observers/type.cc: Likewise.
402 * testsuite/experimental/memory_resource/resource_adaptor.cc:
404 * testsuite/lib/libstdc++.exp (check_effective_target_rtti):
406 * testsuite/tr1/3_function_objects/function/1.cc: Likewise.
407 * testsuite/tr1/3_function_objects/function/2.cc: Likewise.
408 * testsuite/tr1/3_function_objects/function/3.cc: Likewise.
409 * testsuite/tr1/3_function_objects/function/4.cc: Likewise.
410 * testsuite/tr1/3_function_objects/function/5.cc: Likewise.
411 * testsuite/tr1/3_function_objects/function/6.cc: Likewise.
412 * testsuite/tr1/3_function_objects/function/7.cc: Likewise.
413 * testsuite/tr1/3_function_objects/function/8.cc: Likewise.
414 * testsuite/tr2/bases/value.cc: Likewise.
415 * testsuite/tr2/direct_bases/value.cc: Likewise.
416 * testsuite/util/exception/safety.h [!__cpp_rtti]: Don't print
419 2022-05-04 Jonathan Wakely <jwakely@redhat.com>
422 * include/std/array (array::size(), array::max_size())
423 (array::empty(), array::data()): Add always_inline attribute.
425 2022-05-04 Jonathan Wakely <jwakely@redhat.com>
428 * include/std/array (__array_traits::_S_ref): Remove.
429 (__array_traits::_S_ptr): Remove.
430 (__array_traits<T, 0>::_Type): Define operator[] and operator T*
431 to provide an array-like API.
432 (array::_AT_Type): Remove public typeef.
433 (array::operator[], array::at, array::front, array::back): Use
434 index operator to access _M_elems instead of _S_ref.
435 (array::data): Use implicit conversion from _M_elems to pointer.
436 (swap(array&, array&)): Use __enable_if_t helper.
437 (get<I>): Use index operator to access _M_elems.
438 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
439 Adjust dg-error line numbers.
441 2022-05-03 Alexandre Oliva <oliva@adacore.com>
444 * testsuite/20_util/from_chars/pr105324.cc: Guard test body
445 with conditional for floating-point overloads of from_char.
447 2022-05-02 Patrick Palka <ppalka@redhat.com>
450 * src/c++17/floating_from_chars.cc (find_end_of_float): Accept
451 two delimeters for the exponent part in the form of a possibly
452 NULL string of length two. Don't use std::tolower.
453 (pattern): Adjust calls to find_end_of_float accordingly.
455 2022-05-02 Patrick Palka <ppalka@redhat.com>
458 * src/c++17/floating_from_chars.cc (__floating_from_chars_hex):
459 Also accept 'P' as the start of the exponent.
460 * testsuite/20_util/from_chars/7.cc: Add corresponding testcase.
462 2022-04-29 Jonathan Wakely <jwakely@redhat.com>
465 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt:
467 * src/c++11/compatibility-ldbl-alt128.cc [_GLIBCXX_USE_DUAL_ABI]:
468 Define __gnu_ieee128::num_get<C>::_M_extract_int[abi:cxx11]<I>
469 symbols as aliases for corresponding symbols without abi-tag.
471 2022-04-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
473 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
474 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
476 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
477 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
480 2022-04-28 Jonathan Wakely <jwakely@redhat.com>
483 * src/c++17/fs_ops.cc (fs::copy): Pass error_code to
484 directory_iterator constructor, and check on each iteration.
485 * src/filesystem/ops.cc (fs::copy): Likewise.
486 * testsuite/27_io/filesystem/operations/copy.cc: Check for
487 errors during recursion.
488 * testsuite/experimental/filesystem/operations/copy.cc:
491 2022-04-28 François Dumont <fdumont@gcc.gnu.org>
493 * config/abi/pre/gnu-versioned-namespace.ver: Remove
494 std::random_device::* pattern.
496 2022-04-27 Jakub Jelinek <jakub@redhat.com>
498 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
499 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
500 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
501 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
502 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
503 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
504 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
505 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
507 2022-04-27 Jonathan Wakely <jwakely@redhat.com>
509 * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Add
510 support for atomic<shared_ptr<T>> and atomic<weak_ptr<T>>.
511 (StdAtomicPrinter): New printer.
512 (build_libstdcxx_dictionary): Register new printer.
513 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test std::atomic.
514 * testsuite/libstdc++-prettyprinters/cxx20.cc: Test atomic smart
517 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
519 * include/bits/shared_ptr_atomic.h (atomic<shared_ptr>): Add
520 constructor for constant initialization from nullptr_t.
521 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
522 Check for new constructor.
524 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
526 * include/bits/fs_path.h (hash<filesystem::path>): Define.
527 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
528 Check std::hash specialization.
530 2022-04-25 Jonathan Wakely <jwakely@redhat.com>
532 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define
534 * include/bits/unique_ptr.h (__cpp_lib_constexpr_memory):
536 (default_delete, default_delete<T[]>, __uniq_ptr_impl)
537 (unique_ptr, unique_ptr<T[], D>): Add constexpr to all member
539 * include/std/version (__cpp_lib_constexpr_memory): Define new
541 * testsuite/20_util/unique_ptr/assign/constexpr.cc: New test.
542 * testsuite/20_util/unique_ptr/comparison/constexpr.cc: New test.
543 * testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc: New test.
544 * testsuite/20_util/unique_ptr/creation/constexpr.cc: New test.
545 * testsuite/20_util/unique_ptr/modifiers/constexpr.cc: New test.
546 * testsuite/20_util/unique_ptr/specialized_algorithms/constexpr.cc:
549 2022-04-25 Jonathan Wakely <jwakely@redhat.com>
552 * include/std/future (packaged_task): Add deduction guides.
553 * testsuite/30_threads/packaged_task/cons/deduction.cc: New test.
555 2022-04-25 Philipp Fent <fent@in.tum.de>
557 * python/libstdcxx/v6/printers.py (StdSpanPrinter._iterator):
559 (StdInitializerListPrinter): Define new printer.
560 (build_libstdcxx_dictionary): Register new printer.
561 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check printer for
564 2022-04-22 Thomas W Rodgers <trodgers@redhat.com>
567 * include/bits/atomic_base.h (atomic_flag::notify_one,
568 notify_all): Remove const qualification.
569 (__atomic_base::notify_one, notify_all): Likewise.
570 * include/std/atomic (atomic<bool>::notify_one, notify_all):
572 (atomic::notify_one, notify_all): Likewise.
573 (atomic<T*>::notify_one, notify_all): Likewise.
574 (atomic_notify_one, atomic_notify_all): Likewise.
575 * testsuite/29_atomics/atomic/wait_notify/102994.cc: Adjust test
576 to account for change in notify_one/notify_all signature.
578 2022-04-21 Patrick Palka <ppalka@redhat.com>
580 * include/std/charconv (__from_chars_alnum_to_val_table):
581 Simplify initialization of __lower/__upper_letters.
582 (__from_chars_alnum_to_val): Default the template parameter to
584 * src/c++17/floating_from_chars.cc (starts_with_ci): Don't
585 assume the uppercase and lowercase letters are contiguous.
586 (__floating_from_chars_hex): Likewise.
588 2022-04-21 Patrick Palka <ppalka@redhat.com>
592 * include/std/charconv (__from_chars_alnum_to_val): Make
593 initializer for __table dependent in an artificial way.
595 2022-04-21 Jonathan Wakely <jwakely@redhat.com>
598 * src/c++17/floating_from_chars.cc (buffer_resource::do_allocate):
600 * testsuite/20_util/from_chars/pr105324.cc: New test.
602 2022-04-20 Jonathan Wakely <jwakely@redhat.com>
604 * testsuite/21_strings/basic_string_view/operations/copy/char/constexpr.cc:
605 Check correct feature test macro.
607 2022-04-20 Jonathan Wakely <jwakely@redhat.com>
610 * doc/xml/manual/prerequisites.xml: Document libiconv
612 * doc/html/manual/setup.html: Regenerate.
613 * src/Makefile.am (CXXLINK): Add $(LTLIBICONV).
614 * src/Makefile.in: Regenerate.
616 2022-04-19 Patrick Palka <ppalka@redhat.com>
618 * src/c++17/floating_to_chars.cc (_GLIBCXX_ASSERTIONS): Don't
620 (__floating_to_chars_shortest): Add __builtin_unreachable calls to
621 squelch false-positive -Wmaybe-uninitialized and -Wreturn-type
623 (__floating_to_chars_precision): Likewise.
625 2022-04-19 Philipp Fent <fent@in.tum.de>
627 * python/libstdcxx/v6/printers.py (StdSpanPrinter): Define.
628 * testsuite/libstdc++-prettyprinters/cxx20.cc: Test it.
630 2022-04-19 Jonathan Wakely <jwakely@redhat.com>
632 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Fix shell operators.
633 * configure: Regenerate.
635 2022-04-18 Patrick Palka <ppalka@redhat.com>
637 * include/std/charconv (__from_chars_pow2_base): Manually
638 unroll the first iteration of the main loop and simplify
641 2022-04-15 Patrick Palka <ppalka@redhat.com>
644 * include/bits/ranges_algo.h (__minmax_fn): Avoid dereferencing
645 __first twice at the start.
646 * testsuite/25_algorithms/minmax/constrained.cc (test06): New test.
648 2022-04-15 Patrick Palka <ppalka@redhat.com>
650 * include/std/charconv (__from_chars_alnum_to_val_table): Define.
651 (__from_chars_alnum_to_val): Define.
652 (__from_chars_binary): Rename to ...
653 (__from_chars_pow2_base): ... this. Generalize to handle any
654 power-of-two base using __from_chars_alnum_to_val.
655 (__from_chars_digit): Optimize digit recognition to a single
656 test instead of two tests. Use [[__unlikely___]] attribute.
657 (__from_chars_alpha_to_num): Remove.
658 (__from_chars_alnum): Use __from_chars_alnum_to_val. Use a
659 nested loop for the overflow case. Maintain a lower bound
660 on the number of available bits in the result and use it to
661 omit the overflow check.
662 (from_chars): Adjust appropriately.
663 * src/c++17/floating_from_chars.cc (ascii_to_hexit): Remove.
664 (__floating_from_chars_hex): Use __from_chars_alnum_to_val
665 to recognize a hex digit instead.
667 2022-04-14 Palmer Dabbelt <palmer@rivosinc.com>
669 * acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Force auto to mutex
671 * configure: Regenerate.
673 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
675 * doc/xml/manual/intro.xml: Fix comment.
677 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
679 * include/precompiled/stdc++.h: Include <stacktrace> and
680 <stdatomic.h> for C++23.
682 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
685 * include/bits/stl_vector.h (__cpp_lib_constexpr_vector):
687 * include/c_compatibility/stdatomic.h (__cpp_lib_stdatomic_h):
689 * include/std/optional (__cpp_lib_optional): Define new value
691 (__cpp_lib_monadic_optional): Remove.
692 * include/std/version (__cpp_lib_constexpr_vector): Define.
693 (__cpp_lib_stdatomic_h): Define.
694 (__cpp_lib_optional): Define new value for C++23.
695 (__cpp_lib_monadic_optional): Remove.
696 * testsuite/20_util/optional/monadic/and_then.cc: Adjust.
697 * testsuite/20_util/optional/requirements.cc: Adjust for C++23.
698 * testsuite/20_util/optional/version.cc: Likewise.
699 * testsuite/23_containers/vector/cons/constexpr.cc: Check
701 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc:
703 * testsuite/20_util/optional/monadic/version.cc: Removed.
704 * testsuite/23_containers/vector/requirements/version.cc: New test.
705 * testsuite/29_atomics/headers/stdatomic.h/version.cc: New test.
707 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
709 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Check for mmap.
710 * config.h.in: Regenerate.
711 * configure: Regenerate.
713 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
715 * include/std/stacktrace (basic_stacktrace::current): Reallocate
716 a smaller container if the unused capacity is larger than the
719 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
721 * include/std/stacktrace (basic_stacktrace): Use _Impl::_M_clone
722 or _Impl::_M_assign to initialize elements in allocated storage.
723 (basic_stacktrace::_M_clear()): Use _Impl::_M_resize instead of
725 (basic_stacktrace::_Impl::_M_destroy()): Replace with ...
726 (basic_stacktrace::_Impl::_M_resize(size_type, allocator&)): New
728 (basic_stacktrace::_Impl::_M_push_back): Use _M_xclone. Construct
729 new element using allocator.
730 (basic_stacktrace::_Impl::_M_clone): New function.
731 (basic_stacktrace::_Impl::_M_xclone): New function.
732 (basic_stacktrace::_Impl::_M_assign): New function.
734 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
736 * include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
737 Use nothrow new instead of try block for std::allocator.
738 (basic_stacktrace::_Impl::_M_deallocate): Use delete for
741 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
743 * include/std/stacktrace (basic_stacktrace::current): Replace
744 calls to _M_reserve and _S_curr_cb with call to _M_prepare.
745 Check return value of backtrace_simple when max depth given.
746 (basic_stacktrace::_M_reserve): Remove.
747 (basic_stacktrace::_S_curr_cb): Remove.
748 (basic_stacktrace::_M_prepare(size_type)): New function to
749 reserve initial capacity and return callback.
750 (basic_stacktrace::_Impl::_M_allocate): Remove check for 0 < n
751 and remove redundant zeroing of _M_frames and _M_capacity.
752 (basic_stacktrace::_Impl::_M_push_back): Add [[unlikely]]
753 attribute. Assign _Impl instead of swapping.
754 * testsuite/19_diagnostics/stacktrace/current.cc: New test.
756 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
758 * include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
759 Change [[unlikely]] attribute to [[likely]].
761 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
764 * include/std/stacktrace (basic_stacktrace::basic_stacktrace):
765 Fix allocator usage in constructors.
766 (basic_stacktrace::operator=(const basic_stacktrace&)): Do not
767 try to reallocate using const allocator.
768 (basic_stacktrace::operator=(basic_stacktrace&&)): Fix
769 if-constexpr with non-constant condition. Do not allocate new
770 storage if allocator propagates. Do not set _M_size if
772 (basic_stacktrace::swap(basic_stacktrace&)): Fix typo. Add
773 assertion that non-propagating allocators are equal.
774 * testsuite/19_diagnostics/stacktrace/stacktrace.cc: New test.
776 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
778 * include/std/stacktrace (basic_stacktrace::current): Duplicate
779 implementation into each overload. Add noinline attribute and
781 (basic_stacktrace::max_size()): Call _Impl::_S_max_size.
782 (basic_stacktrace::_S_curr_cb()): New function defining lambda.
783 (basic_stacktrace::_Impl::_S_max_size): New function defining
784 maximum size in terms of allocator and size_type.
785 (basic_stacktrace::_Impl::_M_allocate): Check against
787 * testsuite/19_diagnostics/stacktrace/entry.cc: Call function
788 for non-constexpr checks. Check line number is correct.
790 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
792 * testsuite/20_util/stacktrace/entry.cc: Moved to...
793 * testsuite/19_diagnostics/stacktrace/entry.cc: ...here.
794 * testsuite/20_util/stacktrace/synopsis.cc: Moved to...
795 * testsuite/19_diagnostics/stacktrace/synopsis.cc: ...here.
796 * testsuite/20_util/stacktrace/version.cc: Moved to...
797 * testsuite/19_diagnostics/stacktrace/version.cc: ...here.
799 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
801 * include/experimental/bits/fs_path.h (path): Define special
802 members after path::_Cmpt is complete.
804 2022-04-08 Jonathan Wakely <jwakely@redhat.com>
807 * include/std/expected
808 (expected<void,E>::expected(expected<U,G>&&)): Fix constraints.
809 * testsuite/20_util/expected/cons.cc: Check constructor.
811 2022-04-08 Jonathan Wakely <jwakely@redhat.com>
814 * include/std/expected (expected<void, E>::swap): Set
815 _M_has_value to false for objects that previously had a value.
816 * testsuite/20_util/expected/swap.cc: Fix test to check void
819 2022-04-08 Jonathan Wakely <jwakely@redhat.com>
822 * include/std/expected (bad_expected_access): Move constructor
824 * testsuite/20_util/expected/bad.cc: New test.
826 2022-04-07 Hans-Peter Nilsson <hp@axis.com>
828 * testsuite/20_util/expected/requirements.cc: Correct minimal-size
831 2022-04-02 Jakub Jelinek <jakub@redhat.com>
834 * include/std/source_location (std::source_location::__impl): Move
835 definition before using __builtin_ret_type.
837 2022-04-01 Jonathan Wakely <jwakely@redhat.com>
839 * include/std/utility (unreachable): Define for C++23.
840 * include/std/version (__cpp_lib_unreachable): Define.
841 * src/c++11/debug.cc (__glibcxx_assert_fail): Check for valid
842 arguments. Handle only the function being given.
843 * testsuite/20_util/unreachable/1.cc: New test.
844 * testsuite/20_util/unreachable/version.cc: New test.
846 2022-04-01 Jonathan Wakely <jwakely@redhat.com>
848 * include/experimental/bits/fs_fwd.h (copy_file): Remove
849 incorrect noexcept from declaration.
850 * include/experimental/bits/fs_path.h (path::begin, path::end):
851 Add noexcept to declarations, to match definitions.
853 2022-04-01 Timm Bäder <tbaeder@redhat.com>
855 * include/bits/fs_ops.h: Fix filename in Doxygen comment.
856 * include/experimental/bits/fs_ops.h: Likewise.
858 2022-03-31 Jonathan Wakely <jwakely@redhat.com>
860 * libsupc++/new_opa.cc (aligned_alloc): Add comment.
862 2022-03-29 Jonathan Wakely <jwakely@redhat.com>
864 * testsuite/18_support/exception/38732.cc: Disable for C++23.
865 * testsuite/18_support/headers/exception/synopsis.cc: Likewise.
866 * testsuite/18_support/unexpected_handler.cc: Likewise.
868 2022-03-29 Jonathan Wakely <jwakely@redhat.com>
870 * libsupc++/compare (_Strong_order) [!__cpp_using_enum]: Add
871 static data members for _Fp_fmt enumerators.
873 2022-03-29 Jonathan Wakely <jwakely@redhat.com>
875 * include/std/version (__cpp_lib_variant): Fix conditions to
877 (__cpp_lib_expected): Fix condition to match <expected>.
879 2022-03-28 Jonathan Wakely <jwakely@redhat.com>
881 * testsuite/20_util/optional/monadic/and_then.cc: Fix typo.
882 * testsuite/20_util/optional/monadic/transform.cc: Likewise.
883 * testsuite/22_locale/codecvt/always_noconv/char/1.cc: Likewise.
884 * testsuite/22_locale/codecvt/encoding/char/1.cc: Likewise.
885 * testsuite/22_locale/codecvt/in/char/1.cc: Likewise.
886 * testsuite/22_locale/codecvt/max_length/char/1.cc: Likewise.
887 * testsuite/22_locale/codecvt/out/char/1.cc: Likewise.
888 * testsuite/22_locale/codecvt/unshift/char/1.cc: Likewise.
890 2022-03-27 Jonathan Wakely <jwakely@redhat.com>
892 * doc/doxygen/user.cfg.in: Add new header.
893 * include/Makefile.am: Likewise.
894 * include/Makefile.in: Regenerate.
895 * include/precompiled/stdc++.h: Add new header.
896 * include/std/version (__cpp_lib_expected): Define.
897 * libsupc++/exception [__cplusplus > 202002] (unexpected)
898 (unexpected_handler, set_unexpected): Do not declare for C++23.
899 * include/std/expected: New file.
900 * testsuite/20_util/expected/assign.cc: New test.
901 * testsuite/20_util/expected/cons.cc: New test.
902 * testsuite/20_util/expected/illformed_neg.cc: New test.
903 * testsuite/20_util/expected/observers.cc: New test.
904 * testsuite/20_util/expected/requirements.cc: New test.
905 * testsuite/20_util/expected/swap.cc: New test.
906 * testsuite/20_util/expected/synopsis.cc: New test.
907 * testsuite/20_util/expected/unexpected.cc: New test.
908 * testsuite/20_util/expected/version.cc: New test.
910 2022-03-25 Jonathan Wakely <jwakely@redhat.com>
912 * include/std/bit (bit_cast, byteswap, endian): Add doxygen
915 2022-03-23 Jonathan Wakely <jwakely@redhat.com>
918 * include/std/bit (bit_cast): Add constraints.
919 * testsuite/26_numerics/bit/bit.cast/105027.cc: New test.
921 2022-03-23 Jonathan Wakely <jwakely@redhat.com>
923 * include/std/version [!_GLIBCXX_HOSTED]
924 (__cpp_lib_hardware_interference_size): Define for freestanding.
925 (__cpp_lib_bit_cast): Likewise.
926 (__cpp_lib_is_layout_compatible): Likewise.
927 (__cpp_lib_is_pointer_interconvertible): Likewise.
928 (__cpp_lib_adaptor_iterator_pair_constructor): Do not define for
930 (__cpp_lib_invoke_r): Likewise.
931 (__cpp_lib_ios_noreplace): Likewise.
932 (__cpp_lib_monadic_optional): Likewise.
933 (__cpp_lib_move_only_function): Likewise.
934 (__cpp_lib_spanstream): Likewise.
935 (__cpp_lib_stacktrace): Likewise.
936 (__cpp_lib_string_contains): Likewise.
937 (__cpp_lib_string_resize_and_overwrite): Likewise.
938 (__cpp_lib_to_underlying): Likewise.
940 2022-03-23 Jonathan Wakely <jwakely@redhat.com>
943 * include/bits/atomic_base.h [!_GLIBCXX_HOSTED]: Do not include
944 <bits/atomic_wait.h> for freestanding.
946 2022-03-22 Hans-Peter Nilsson <hp@axis.com>
948 * testsuite/20_util/from_chars/6.cc (test01) [FE_DOWNWARD]:
949 Conditionalize call to fesetround.
951 2022-03-21 Jakub Jelinek <jakub@redhat.com>
954 * include/bits/locale_facets_nonio.tcc (get): Don't check if do_get
955 isn't overloaded if __clang__ is defined.
957 2022-03-18 Jonathan Wakely <jwakely@redhat.com>
960 * include/std/any (any(T&&)): Revert change to constraints.
961 * testsuite/20_util/any/cons/104242.cc: New test.
963 2022-03-18 Jonathan Wakely <jwakely@redhat.com>
966 * include/pstl/glue_algorithm_defs.h: Replace <functional> with
968 * include/pstl/utils.h: Replace <iterator> with <type_traits>.
969 (__pstl::__internal::__except_handler): Use std::__terminate
970 instead of std::terminate.
971 * src/c++17/fs_path.cc: Include <array>.
972 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Include
974 * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
975 * testsuite/25_algorithms/clamp/constrained.cc: Likewise.
976 * testsuite/25_algorithms/equal/constrained.cc: Likewise.
977 * testsuite/25_algorithms/for_each/constrained.cc: Likewise.
978 * testsuite/25_algorithms/includes/constrained.cc: Likewise.
979 * testsuite/25_algorithms/is_heap/constexpr.cc: Likewise.
980 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Likewise.
981 * testsuite/25_algorithms/is_permutation/constrained.cc: Include
983 * testsuite/25_algorithms/is_sorted/constexpr.cc: Include
985 * testsuite/25_algorithms/is_sorted_until/constexpr.cc:
987 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
989 * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
991 * testsuite/25_algorithms/lexicographical_compare_three_way/1.cc:
993 * testsuite/25_algorithms/lower_bound/constexpr.cc: Include
995 * testsuite/25_algorithms/max/constrained.cc: Likewise.
996 * testsuite/25_algorithms/max_element/constrained.cc: Likewise.
997 * testsuite/25_algorithms/min/constrained.cc: Likewise.
998 * testsuite/25_algorithms/min_element/constrained.cc: Likewise.
999 * testsuite/25_algorithms/minmax_element/constrained.cc:
1001 * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
1002 * testsuite/25_algorithms/move/93872.cc: Likewise.
1003 * testsuite/25_algorithms/move_backward/93872.cc: Include
1005 * testsuite/25_algorithms/nth_element/constexpr.cc: Include
1007 * testsuite/25_algorithms/partial_sort/constexpr.cc: Likewise.
1008 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc:
1010 * testsuite/25_algorithms/search/constexpr.cc: Likewise.
1011 * testsuite/25_algorithms/search_n/constrained.cc: Likewise.
1012 * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
1013 * testsuite/25_algorithms/set_difference/constrained.cc:
1015 * testsuite/25_algorithms/set_intersection/constexpr.cc:
1017 * testsuite/25_algorithms/set_intersection/constrained.cc:
1019 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
1021 * testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
1022 * testsuite/25_algorithms/set_union/constrained.cc: Likewise.
1023 * testsuite/25_algorithms/sort/constexpr.cc: Likewise.
1024 * testsuite/25_algorithms/sort_heap/constexpr.cc: Likewise.
1025 * testsuite/25_algorithms/transform/constrained.cc: Likewise.
1026 * testsuite/25_algorithms/unique/constexpr.cc: Likewise.
1027 * testsuite/25_algorithms/unique/constrained.cc: Likewise.
1028 * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
1029 * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
1030 * testsuite/std/ranges/adaptors/elements.cc: Include <vector>.
1031 * testsuite/std/ranges/adaptors/lazy_split.cc: Likewise.
1032 * testsuite/std/ranges/adaptors/split.cc: Likewise.
1034 2022-03-17 Jonathan Wakely <jwakely@redhat.com>
1037 * include/bits/fs_path.h (path::make_preferred): Use
1038 handwritten loop instead of std::replace.
1040 2022-03-17 Jonathan Wakely <jwakely@redhat.com>
1042 PR middle-end/104966
1043 * include/bits/locale_facets_nonio.tcc
1044 (__moneypunct_cache::_M_cache): Replace try-catch with RAII and
1045 make all string copies before any stores to *this.
1047 2022-03-17 Jonathan Wakely <jwakely@redhat.com>
1049 * testsuite/util/testsuite_character.h: Fix comment.
1051 2022-03-16 Jonathan Wakely <jwakely@redhat.com>
1054 * config/abi/pre/gnu.ver: Make version for std::from_chars
1055 depend on HAVE_USELOCALE macro.
1056 * testsuite/util/testsuite_abi.cc (compare_symbols): Treat
1057 std::from_chars for floating-point types as undesignated if
1058 not found in the baseline symbols file.
1060 2022-03-16 Jonathan Wakely <jwakely@redhat.com>
1062 * include/std/charconv (__cpp_lib_to_chars): Only define when
1063 both from_chars and to_chars are supported for floating-point
1065 (from_chars, to_chars): Adjust preprocessor conditions guarding
1067 * include/std/version (__cpp_lib_to_chars): Adjust condition to
1068 match <charconv> definition.
1069 * src/c++17/floating_from_chars.cc (from_chars_strtod): New
1071 (from_chars): Simplify preprocessor checks and use
1072 from_chars_strtod when appropriate.
1074 2022-03-14 Jonathan Wakely <jwakely@redhat.com>
1077 * src/c++11/codecvt.cc (read_utf8_code_point): Use char32_t to
1078 hold octets that will be left-shifted.
1080 2022-03-10 Jonathan Wakely <jwakely@redhat.com>
1083 * src/c++17/floating_from_chars.cc: Check __SIZE_WIDTH__ >= 32
1084 before using fast_float.
1086 2022-03-10 Detlef Vollmann <dv@vollmann.ch>
1089 * include/bits/this_thread_sleep.h: Fix order of #endif and
1090 closing brace of namespace.
1092 2022-03-10 Jonathan Wakely <jwakely@redhat.com>
1094 * libsupc++/compare (_Strong_order::_S_fp_cmp) [__vax__]:
1097 2022-03-10 Jonathan Wakely <jwakely@redhat.com>
1099 * libsupc++/compare (_Strong_ordering::_S_fp_cmp) [__vax__]: Use
1102 2022-03-09 Patrick Palka <ppalka@redhat.com>
1105 * src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
1106 Be explicit when narrowing the shifted effective_mantissa,
1107 since it may have an integer-class type.
1109 2022-03-08 Jonathan Wakely <jwakely@redhat.com>
1111 * include/bits/uses_allocator_args.h: Remove incorrect copyright
1114 2022-03-07 Jonathan Wakely <jwakely@redhat.com>
1117 * include/bits/c++config (__terminate, __glibcxx_assert_fail):
1118 Replace _GLIBCXX_VISIBILITY on function with visibility pragma.
1119 (__is_constant_evaluated): Add visibility pragma.
1121 2022-03-07 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
1123 * config/locale/vxworks/ctype_members.cc: Remove <iostream>
1126 2022-03-05 Jonathan Wakely <jwakely@redhat.com>
1128 * include/bits/c++config (__glibcxx_assert_fail): Add visibility
1130 (__terminate): Likewise.
1132 2022-03-04 Jonathan Wakely <jwakely@redhat.com>
1134 * libsupc++/compare (strong_order::_S_fp_cmp): Move typedef
1135 inside #if condition.
1137 2022-03-03 Jonathan Wakely <jwakely@redhat.com>
1140 * testsuite/std/ranges/adaptors/all.cc: Use non-debug vector for
1143 2022-03-03 Jonathan Wakely <jwakely@redhat.com>
1145 * testsuite/17_intro/names.cc (func): Undef on AIX.
1147 2022-03-03 Jonathan Wakely <jwakely@redhat.com>
1150 * libsupc++/compare (strong_order): Add missing support for
1151 floating-point types.
1152 * testsuite/18_support/comparisons/algorithms/strong_order_floats.cc:
1155 2022-03-01 Jonathan Wakely <jwakely@redhat.com>
1157 PR middle-end/103984
1158 * include/bits/regex_compiler.h (_BracketMatcher::_M_char): Use
1159 default member initializer.
1161 2022-02-24 Jonathan Wakely <jwakely@redhat.com>
1164 * include/std/source_location (source_location::current): Use
1165 deduced type of __builtin_source_location().
1167 2022-02-22 Patrick Palka <ppalka@redhat.com>
1169 * include/bits/ranges_base.h (__detail::__is_initializer_list):
1171 (viewable_range): Adjust as per P2415R2.
1172 * include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value.
1173 * include/std/ranges (owning_view): Define as per P2415R2.
1174 (enable_borrowed_range<owning_view>): Likewise.
1175 (views::__detail::__can_subrange): Replace with ...
1176 (views::__detail::__can_owning_view): ... this.
1177 (views::_All::_S_noexcept): Sync with operator().
1178 (views::_All::operator()): Use owning_view instead of subrange
1180 * include/std/version (__cpp_lib_ranges): Adjust value.
1181 * testsuite/std/ranges/adaptors/all.cc (test06): Adjust now that
1182 views::all uses owning_view instead of subrange.
1184 * testsuite/std/ranges/adaptors/lazy_split.cc (test09): Adjust
1185 now that rvalue non-view non-borrowed ranges are viewable.
1186 * testsuite/std/ranges/adaptors/split.cc (test06): Likewise.
1188 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
1191 * doc/xml/manual/evolution.xml: Document deprecation.
1192 * doc/html/manual/api.html: Regenerate.
1193 * include/bits/stl_bvector.h (insert(const_iterator, const bool&)):
1194 Remove default argument.
1195 (insert(const_iterator)): New overload with deprecated attribute.
1196 * testsuite/23_containers/vector/bool/modifiers/insert/104559.cc:
1199 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
1201 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Replace
1202 code that call cat->name() on std::error_category objects.
1203 Identify known categories by symbol name and use a hardcoded
1204 name. Print error code values as enumerators where appopriate.
1205 * testsuite/libstdc++-prettyprinters/cxx11.cc: Adjust expected
1206 name of custom category. Check io_errc and future_errc errors.
1208 2022-02-15 Jonathan Wakely <jwakely@redhat.com>
1211 * include/bits/uses_allocator_args.h (make_obj_using_allocator)
1212 (uninitialized_construct_using_allocator): Add constexpr.
1213 * testsuite/20_util/uses_allocator/make_obj.cc: Check constexpr.
1214 * testsuite/20_util/uses_allocator/uninitialized_construct.cc: New test.
1216 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
1219 * config/locale/gnu/c_locale.h (__convert_from_v): Use inline
1220 namespace for IEEE128 long double mode.
1221 * config/os/gnu-linux/ldbl-ieee128-extra.ver: Add new symbol
1222 version and export __gnu_cxx_ieee128::__convert_from_v.
1223 * include/bits/locale_facets_nonio.tcc (money_put::__do_put):
1224 Make __ibm128 overload use snprintf directly
1225 * testsuite/util/testsuite_abi.cc: Add new symbol version.
1226 Remove stable IEEE128/LDBL versions.
1228 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
1231 * include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
1233 * include/std/variant: Check feature test macros instead.
1234 * include/std/version: Likewise.
1236 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
1238 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
1241 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
1243 * src/c++17/floating_to_chars.cc (FLOAT128_TO_CHARS): Depend on
1244 LONG_DOUBLE_ALT128_COMPAT instead of USE_FLOAT128.
1246 2022-02-11 Jonathan Wakely <jwakely@redhat.com>
1248 * testsuite/20_util/temporary_buffer.cc: Fix dg-warning target
1251 2022-02-11 Jonathan Wakely <jwakely@redhat.com>
1253 * testsuite/20_util/monotonic_buffer_resource/allocate.cc:
1254 Ignore -Walloc-larger-than warning.
1255 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
1257 * testsuite/29_atomics/atomic/cons/user_pod.cc: Compile with -O1
1258 to avoid linker error for __atomic_is_lock_free.
1260 2022-02-10 Thomas Rodgers <rodgert@appliantology.com>
1262 * include/bits/atomic_wait.h (__waiter_base::_S_do_spin,
1263 __waiter_base::_S_do_spin_v): Change memory order from relaxed
1266 2022-02-10 Jonathan Wakely <jwakely@redhat.com>
1268 * include/c_compatibility/stdatomic.h (atomic_fetch_xor): Add
1270 (atomic_fetch_xor_explicit): Likewise.
1271 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Check
1272 arithmetic and logical operations for atomic_int.
1274 2022-02-10 Jonathan Wakely <jwakely@redhat.com>
1276 * src/filesystem/dir-common.h (_GLIBCXX_HAVE_DIRFD): Undefine
1277 when <dirent.h> is not available.
1278 (_GLIBCXX_HAVE_UNLINKAT): Likewise.
1280 2022-02-09 Thomas Rodgers <rodgert@appliantology.com>
1283 * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): Move spin
1284 loop inside do loop so that threads failing the wait, reload
1287 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
1289 * src/c++17/fs_dir.cc (_Dir(DIR*, const path&)): Change first
1290 parameter to _Dir_base&&.
1291 * src/filesystem/dir-common.h (_Dir_base(DIR*)): Remove.
1292 * src/filesystem/dir.cc (_Dir(DIR*, const path&)): Change first
1293 parameter to _Dir_base&&.
1295 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
1297 * acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Add comment about
1298 checking for CAS on correct word size.
1300 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
1302 * testsuite/experimental/filesystem/operations/create_directories.cc:
1303 Adjust expected results for Windows.
1305 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
1308 * src/c++17/fs_dir.cc (fs::recursive_directory_iterator::__erase):
1309 [i_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Refresh entry._M_type member,
1310 instead of checking for errno values indicating a directory.
1311 * src/c++17/fs_ops.cc (fs::remove_all(const path&)): Use similar
1312 logic to non-throwing overload.
1313 (fs::remove_all(const path&, error_code&)): Add comments.
1314 * src/filesystem/ops-common.h: Likewise.
1316 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
1318 * src/filesystem/dir-common.h (_Dir_base::openat): Change return
1319 type to use portable posix::DIR alias.
1321 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
1323 * include/c_compatibility/stdatomic.h [__clang__]: Use
1324 #include_next <stdatomic.h>.
1326 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
1328 * include/experimental/bits/fs_ops.h (fs::copy_file): Remove
1330 (fs::create_directories): Likewise.
1331 (fs::remove_all): Likewise.
1332 * src/filesystem/ops.cc (fs::copy_file): Remove noexcept.
1333 (fs::create_directories): Likewise.
1334 (fs::remove_all): Likewise.
1336 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
1339 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for dirfd
1341 * config.h.in: Regenerate.
1342 * configure: Regenerate.
1343 * include/bits/fs_dir.h (recursive_directory_iterator): Declare
1344 remove_all overloads as friends.
1345 (recursive_directory_iterator::__erase): Declare new member
1347 * include/bits/fs_fwd.h (remove, remove_all): Declare.
1348 * src/c++17/fs_dir.cc (_Dir): Add filename_only parameter to
1349 constructor. Pass file descriptor argument to base constructor.
1350 (_Dir::dir_and_pathname, _Dir::open_subdir, _Dir::do_unlink)
1351 (_Dir::unlink, _Dir::rmdir): Define new member functions.
1352 (directory_iterator): Pass filename_only argument to _Dir
1354 (recursive_directory_iterator::_Dir_stack): Adjust constructor
1355 parameters to take a _Dir rvalue instead of creating one.
1356 (_Dir_stack::orig): Add data member for storing original path.
1357 (_Dir_stack::report_error): Define new member function.
1358 (__directory_iterator_nofollow): Move here from dir-common.h and
1359 fix value to be a power of two.
1360 (__directory_iterator_filename_only): Define new constant.
1361 (recursive_directory_iterator): Construct _Dir object and move
1362 into _M_dirs stack. Pass skip_permission_denied argument to first
1364 (recursive_directory_iterator::increment): Use _Dir::open_subdir.
1365 (recursive_directory_iterator::__erase): Define new member
1367 * src/c++17/fs_ops.cc (ErrorReporter, do_remove_all): Remove.
1368 (fs::remove_all): Use new recursive_directory_iterator::__erase
1370 * src/filesystem/dir-common.h (_Dir_base): Add int parameter to
1371 constructor and use openat to implement nofollow semantics.
1372 (_Dir_base::fdcwd, _Dir_base::set_close_on_exec, _Dir_base::openat):
1373 Define new member functions.
1374 (__directory_iterator_nofollow): Move to fs_dir.cc.
1375 * src/filesystem/dir.cc (_Dir): Pass file descriptor argument to
1377 (_Dir::dir_and_pathname, _Dir::open_subdir): Define new member
1379 (recursive_directory_iterator::_Dir_stack): Adjust constructor
1380 parameters to take a _Dir rvalue instead of creating one.
1381 (recursive_directory_iterator): Check for new nofollow option.
1382 Construct _Dir object and move into _M_dirs stack. Pass
1383 skip_permission_denied argument to first advance call.
1384 (recursive_directory_iterator::increment): Use _Dir::open_subdir.
1385 * src/filesystem/ops.cc (fs::remove_all): Use C++17 remove_all.
1387 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
1389 * include/bits/allocator.h: Qualify std::allocator_traits in
1390 deprecated warnings.
1391 * libsupc++/exception (uncaught_exception): Add suggestion to
1394 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
1396 * src/c++17/fs_dir.cc (fs::recursive_directory_iterator::pop):
1397 Add [[maybe_unused]] attribute.
1398 * src/filesystem/dir.cc (fs::recursive_directory_iterator::pop):
1401 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
1403 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: Use
1404 custom comparison function for multiset.
1405 * testsuite/23_containers/set/operators/cmp_c++20.cc: Use custom
1406 comparison function for set.
1408 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
1410 * include/bits/boost_concept_check.h (_OutputIteratorConcept):
1411 Change member function to data member of function pointer type.
1413 2022-02-02 Martin Sebor <msebor@redhat.com>
1416 * include/std/array (begin): Declare const member function attribute
1418 (end, rbegin, rend, size, max_size, empty, data): Same.
1419 * testsuite/23_containers/array/capacity/empty.cc: Add test cases.
1420 * testsuite/23_containers/array/capacity/max_size.cc: Same.
1421 * testsuite/23_containers/array/capacity/size.cc: Same.
1422 * testsuite/23_containers/array/iterators/begin_end.cc: New test.
1424 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
1426 * testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
1427 autoconf macro to check whether d_type is present.
1428 * testsuite/experimental/filesystem/iterators/error_reporting.cc:
1431 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
1433 * testsuite/27_io/filesystem/iterators/97731.cc: New test.
1434 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
1435 Check follow_directory_symlink option.
1436 * testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc:
1439 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
1441 * src/c++17/fs_dir.cc (recursive_directory_iterator::increment):
1442 Reset state to past-the-end iterator on error.
1443 (fs::recursive_directory_iterator::pop(error_code&)): Likewise.
1444 (fs::recursive_directory_iterator::pop()): Check _M_dirs before
1446 * src/filesystem/dir.cc (recursive_directory_iterator): Likewise,
1447 for the TS implementation.
1448 * testsuite/27_io/filesystem/iterators/error_reporting.cc: New test.
1449 * testsuite/experimental/filesystem/iterators/error_reporting.cc: New test.
1451 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
1453 * include/bits/fs_fwd.h (filesystem::perms): Fix comment.
1455 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
1458 * acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Print different messages
1459 for stdio_pure and stdio_posix options.
1460 * configure: Regenerate.
1462 2022-02-01 Thomas Rodgers <rodgert@appliantology.com>
1464 * include/bits/atomic_wait.h: Change memory order from
1465 Acquire/Release with relaxed loads to SeqCst+Release for
1466 accesses to the waiter's count.
1468 2022-01-31 Martin Liska <mliska@suse.cz>
1470 * acinclude.m4: Detect *_ld_is_mold and use it.
1471 * configure: Regenerate.
1473 2022-01-30 Hans-Peter Nilsson <hp@axis.com>
1475 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: Don't run on
1477 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: Likewise.
1479 2022-01-27 Jonathan Wakely <jwakely@redhat.com>
1482 * include/bits/deque.tcc (_M_range_initialize<ForwardIterator>):
1483 Add __builtin_unreachable to loop.
1484 * testsuite/23_containers/deque/100516.cc: New test.
1486 2022-01-27 Jonathan Wakely <jwakely@redhat.com>
1488 * include/bits/ranges_base.h (ranges::advance): Avoid signed
1489 overflow. Do nothing if already equal to desired result.
1490 * testsuite/24_iterators/range_operations/advance_overflow.cc:
1493 2022-01-27 Martin Liska <mliska@suse.cz>
1496 * acinclude.m4: Fix typo.
1497 * configure: Regenerate.
1499 2022-01-25 Jonathan Wakely <jwakely@redhat.com>
1502 * include/bits/istream.tcc (basic_istream::sentry): Add braces
1504 * include/bits/shared_ptr_base.h (_Sp_counted_array_base::_M_init):
1505 Add pragmas to disable bogus warnings from PR 61596.
1507 2022-01-25 Jonathan Wakely <jwakely@redhat.com>
1510 * src/c++17/fs_ops.cc (_GNU_SOURCE): Define.
1511 * src/filesystem/dir.cc (_GNU_SOURCE): Define.
1512 * src/filesystem/ops.cc (_GNU_SOURCE): Define.
1514 2022-01-25 Jonathan Wakely <jwakely@redhat.com>
1517 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for
1519 * config.h.in: Regenerate.
1520 * configure: Regenerate.
1521 * src/c++17/fs_dir.cc (_Dir): Add nofollow flag to constructor
1522 and pass it to base class constructor.
1523 (directory_iterator): Pass nofollow flag to _Dir constructor.
1524 (fs::recursive_directory_iterator::increment): Likewise.
1525 * src/c++17/fs_ops.cc (do_remove_all): Use nofollow option for
1526 directory_iterator constructor. Move error check outside loop.
1527 * src/filesystem/dir-common.h (_Dir_base): Add nofollow flag to
1528 constructor and when it's set use ::open with O_NOFOLLOW and
1530 * src/filesystem/dir.cc (_Dir): Add nofollow flag to constructor
1531 and pass it to base class constructor.
1532 (directory_iterator): Pass nofollow flag to _Dir constructor.
1533 (fs::recursive_directory_iterator::increment): Likewise.
1534 * src/filesystem/ops.cc (remove_all): Use nofollow option for
1535 directory_iterator constructor. Move error check outside loop.
1537 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
1540 * include/std/spanstream (basic_spanbuf(basic_spanbuf&&)): Use
1541 mem-initializer for _M_buf.
1542 (basic_spanbuf::Operator=(basic_spanbuf&&)): Fix ill-formed
1544 * testsuite/27_io/spanstream/2.cc: New test.
1546 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
1548 * src/c++17/floating_from_chars.cc (USE_STRTOD_FOR_FROM_CHARS):
1549 Define macro for case where std::from_chars is implemented in
1550 terms of strtod, strtof or strtold.
1551 (buffer_resource, valid_fmt, find_end_of_float, pattern)
1552 (from_chars_impl, make_result, reserve_string): Do not define
1553 unless USE_STRTOD_FOR_FROM_CHARS is defined.
1554 (from_chars): Define when at least one of USE_LIB_FAST_FLOAT and
1555 USE_STRTOD_FOR_FROM_CHARS is defined, instead of
1556 _GLIBCXX_HAVE_USELOCALE. Use fast_float for long double when it
1559 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
1562 * include/bits/hashtable_policy.h (_Map_base): Add partial
1563 specialization for maps with const key types.
1564 * testsuite/23_containers/unordered_map/104174.cc: New test.
1566 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
1569 * include/bits/shared_ptr_base.h (_Sp_counted_base<>::_M_release):
1570 Set members to zero without type punning.
1572 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
1574 * testsuite/20_util/shared_ptr/cons/array.cc: Fix comment.
1576 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
1580 * include/bits/alloc_traits.h (__cpp_lib_allocator_traits_is_always_equal):
1581 Define as type long.
1582 * include/bits/allocator.h (__cpp_lib_incomplete_container_elements):
1584 * include/bits/basic_string.h (__cpp_lib_string_udls): Likewise.
1585 * include/bits/chrono.h (__cpp_lib_chrono): Likewise.
1586 (__cpp_lib_chrono_udls): Likewise.
1587 * include/bits/move.h (__cpp_lib_addressof_constexpr): Likewise.
1588 * include/bits/node_handle.h (__cpp_lib_node_extract): Likewise.
1589 * include/bits/range_access.h (__cpp_lib_nonmember_container_access):
1591 * include/bits/shared_ptr.h (__cpp_lib_enable_shared_from_this):
1593 * include/bits/stl_algo.h (__cpp_lib_clamp): Likewise.
1594 (__cpp_lib_sample): Likewise.
1595 * include/bits/stl_algobase.h (__cpp_lib_robust_nonmodifying_seq_ops):
1597 * include/bits/stl_function.h (__cpp_lib_transparent_operators):
1599 * include/bits/stl_iterator.h (__cpp_lib_make_reverse_iterator):
1601 * include/bits/stl_map.h (__cpp_lib_map_try_emplace):
1603 * include/bits/stl_tree.h (__cpp_lib_generic_associative_lookup):
1605 * include/bits/unique_ptr.h (__cpp_lib_make_unique):
1607 * include/bits/unordered_map.h (__cpp_lib_unordered_map_try_emplace):
1609 * include/c_global/cmath (__cpp_lib_hypot): Likewise.
1610 * include/c_global/cstddef (__cpp_lib_byte): Likewise.
1611 * include/std/atomic (__cpp_lib_atomic_is_always_lock_free):
1613 * include/std/complex (__cpp_lib_complex_udls): Likewise.
1614 * include/std/filesystem (__cpp_lib_filesystem): Likewise.
1615 * include/std/functional (__cpp_lib_not_fn): Likewise.
1616 (__cpp_lib_boyer_moore_searcher): Likewise.
1617 * include/std/iomanip (__cpp_lib_quoted_string_io): Likewise.
1618 * include/std/mutex (__cpp_lib_scoped_lock): Likewise.
1619 * include/std/numeric (__cpp_lib_gcd_lcm): Likewise.
1620 (__cpp_lib_gcd, __cpp_lib_lcm): Likewise.
1621 * include/std/tuple (__cpp_lib_apply): Likewise.
1622 (__cpp_lib_make_from_tuple): Likewise.
1623 * include/std/type_traits (__cpp_lib_integral_constant_callable)
1624 (__cpp_lib_bool_constant, __cpp_lib_logical_traits)
1625 (__cpp_lib_is_null_pointer, __cpp_lib_transformation_trait_aliases)
1626 (__cpp_lib_result_of_sfinae, __cpp_lib_void_t)
1627 (__cpp_lib_is_swappable, __cpp_lib_is_invocable)
1628 (__cpp_lib_has_unique_object_representations)
1629 (__cpp_lib_is_aggregate): Likewise.
1630 * include/std/version: Likewise.
1631 * libsupc++/new (__cpp_lib_launder): Likewise.
1633 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
1635 * include/std/version (__cpp_lib_shared_ptr_arrays): Fix
1636 condition for C++17 definition.
1638 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
1640 * include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count):
1642 (_Sp_atomic::_M_ptr): Add default member-initializer.
1643 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
1644 Check constant initialization.
1645 * testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: Likewise.
1647 2022-01-20 Jonathan Wakely <jwakely@redhat.com>
1649 * src/c++11/cxx11-ios_failure.cc (__constinit): Define as
1650 equivalent attribute for Clang.
1651 * src/c++11/future.cc (__constinit): Likewise.
1652 * src/c++11/system_error.cc (__constinit): Likewise.
1653 * src/c++17/memory_resource.cc (__constinit): Likewise.
1655 2022-01-20 Jonathan Wakely <jwakely@redhat.com>
1657 * scripts/testsuite_flags.in: Only add src/filesystem/.libs and
1658 src/libbacktrace/.libs to LDFLAGS if those directories exist.
1660 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
1662 * configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Remove -gdwarf-4
1664 * configure: Regenerate.
1666 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
1669 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Include
1672 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
1674 * scripts/testsuite_flags.in: Add src/libbacktrace/.libs to
1675 linker search paths.
1676 * src/Makefile.am: Fix src/debug/libbacktrace build.
1677 * src/Makefile.in: Regenerate.
1678 * src/libbacktrace/Makefile.am: Use per-library CPPFLAGS
1679 variable. Use symlinks for the source files.
1680 * src/libbacktrace/Makefile.in: Regenerate.
1682 2022-01-19 Matthias Kretz <m.kretz@gsi.de>
1684 * include/experimental/bits/simd.h (__floating_point_flags): Do
1685 not rely on math_errhandling to expand to a constant expression.
1687 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
1689 * doc/xml/manual/evolution.xml: Document deprecations.
1690 * doc/xml/manual/status_cxx2017.xml: Update status.
1691 * doc/html/*: Regenerate.
1693 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
1695 * include/bits/stl_tempbuf.h (get_temporary_buffer): Change
1696 _GLIBCXX14_DEPRECATED to _GLIBCXX17_DEPRECATED.
1698 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
1700 * include/bits/stl_pair.h (_PCC::_DeprConsPair): Remove unused
1703 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
1706 * include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count::lock):
1707 Only use __thread_relax if __cpp_lib_atomic_wait is defined.
1709 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
1712 * include/bits/basic_string.h (basic_string(nullptr_t)): Only
1714 (operator=(nullptr_t)): Likewise.
1715 * include/bits/cow_string.h: Likewise.
1716 * include/std/string_view (basic_string_view(nullptr_t)):
1718 * testsuite/21_strings/basic_string/cons/char/nullptr.cc: Adjust
1719 expected error. Add examples that become ill-formed in C++23.
1720 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
1721 Adjust expected errors.
1722 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
1725 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
1728 * include/bits/stl_iterator.h (reverse_iterator): Check
1729 __cpp_lib_concepts instead of __cplusplus.
1731 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
1734 * include/bits/stl_pair.h (pair): Adjust constraints on
1735 deprecated constructors accepting literal zero as null pointer
1736 constant. Improve wording of deprecated attribute.
1737 * testsuite/20_util/pair/cons/99957.cc: Check that deprecated
1738 constructors do not cause ambiguities for copyable types.
1740 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
1742 * include/bits/stl_function.h (ptr_fun): Fix suggestion for
1743 non-deprecated alternative.
1745 2022-01-18 Tom Honermann <tom@honermann.net>
1747 * acinclude.m4: Define config macros if uchar.h provides
1748 c8rtomb() and mbrtoc8().
1749 * config.h.in: Regenerate.
1750 * configure: Regenerate.
1751 * include/c_compatibility/uchar.h (c8rtomb, mbrtoc8): Define.
1752 * include/c_global/cuchar (c8rtomb, mbrtoc8): Likewise.
1753 * include/c_std/cuchar (c8rtomb, mbrtoc8): Likewise.
1754 * testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc:
1756 * testsuite/21_strings/headers/cuchar/functions_std_fchar8_t.cc:
1759 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
1761 * include/Makefile.am: Install new header.
1762 * include/Makefile.in: Regenerate.
1763 * include/c_compatibility/stdatomic.h: New file.
1764 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: New test.
1766 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
1769 * src/c++17/fast_float/LOCAL_PATCHES: Update.
1770 * src/c++17/fast_float/fast_float.h (FASTFLOAT_IS_BIG_ENDIAN):
1771 Define in terms of __BYTE_ORDER__.
1773 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
1776 * src/c++17/fast_float/LOCAL_PATCHES: UPDATE.
1777 * src/c++17/fast_float/fast_float.h (round): Use explicit
1778 template argument list for std::min.
1780 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
1782 * doc/xml/manual/status_cxx2017.xml: Update C++17 status.
1783 * doc/xml/manual/status_cxx2020.xml: Use 12.1 instead of 12 for
1785 * doc/html/manual/status.html: Regenerate.
1787 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
1789 * acinclude.m4 (GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING): Improve
1791 * configure: Regenerate.
1793 2022-01-17 Patrick Palka <ppalka@redhat.com>
1795 * src/c++17/floating_from_chars.cc: (USE_LIB_FAST_FLOAT):
1796 Conditionally define, and use it to conditionally include
1798 (from_chars): Use fast_float for float and double when
1801 2022-01-17 Patrick Palka <ppalka@redhat.com>
1803 * src/c++17/fast_float/LOCAL_PATCHES: Update.
1804 * src/c++17/fast_float/fast_float.h (from_chars_advanced): In
1805 case of over/underflow, return errc::result_out_of_range and don't
1808 2022-01-17 Patrick Palka <ppalka@redhat.com>
1810 * src/c++17/fast_float/LOCAL_PATCHES: Update.
1811 * src/c++17/fast_float/fast_float.h: Apply local modifications.
1813 2022-01-17 Patrick Palka <ppalka@redhat.com>
1815 * src/c++17/fast_float/LOCAL_PATCHES: New file.
1816 * src/c++17/fast_float/MERGE: New file.
1817 * src/c++17/fast_float/README.md: New file, copied from the
1818 fast_float repository.
1819 * src/c++17/fast_float/fast_float.h: New file, an amalgamation
1820 of the fast_float library.
1822 2022-01-17 Patrick Palka <ppalka@redhat.com>
1824 * src/c++17/floating_from_chars.cc: Include <bit>.
1825 (ascii_to_hexit, starts_with_ci): Conditionally define.
1826 (__floating_from_chars_hex): Conditionally define.
1827 (from_chars): Use __floating_from_chars_hex for
1828 chars_format::hex parsing of binary32/64 float/double.
1829 (testsuite/20_util/from_chars/7.cc): New test.
1830 * testsuite/20_util/from_chars/7.cc: New file.
1832 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
1834 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): New macro.
1835 * configure.ac: Use GLIBCXX_ENABLE_BACKTRACE.
1836 * include/Makefile.am: Add new header.
1837 * include/Makefile.in: Regenerate.
1838 * include/std/stacktrace: New header.
1839 * include/std/version (__cpp_lib_stacktrace): Define.
1840 * Makefile.in: Regenerate.
1841 * config.h.in: Regenerate.
1842 * configure: Regenerate.
1843 * doc/Makefile.in: Regenerate.
1844 * libsupc++/Makefile.in: Regenerate.
1845 * po/Makefile.in: Regenerate.
1846 * python/Makefile.in: Regenerate.
1847 * src/Makefile.am: Regenerate.
1848 * src/Makefile.in: Regenerate.
1849 * src/c++11/Makefile.in: Regenerate.
1850 * src/c++17/Makefile.in: Regenerate.
1851 * src/c++20/Makefile.in: Regenerate.
1852 * src/c++98/Makefile.in: Regenerate.
1853 * src/filesystem/Makefile.in: Regenerate.
1854 * testsuite/Makefile.in: Regenerate.
1855 * src/libbacktrace/Makefile.am: New file.
1856 * src/libbacktrace/Makefile.in: New file.
1857 * src/libbacktrace/backtrace-rename.h: New file.
1858 * src/libbacktrace/backtrace-supported.h.in: New file.
1859 * src/libbacktrace/config.h.in: New file.
1860 * testsuite/lib/libstdc++.exp (check_effective_target_stacktrace):
1862 * testsuite/20_util/stacktrace/entry.cc: New test.
1863 * testsuite/20_util/stacktrace/synopsis.cc: New test.
1864 * testsuite/20_util/stacktrace/version.cc: New test.
1866 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
1868 * doc/xml/manual/status_cxx2020.xml: Use final C++20 option
1870 * doc/html/manual/status.html: Regenerate.
1872 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
1875 * include/Makefile.am: Rename LT_OBJDIR and STDC_HEADERS.
1876 * include/Makefile.in: Regenerate.
1877 * testsuite/17_intro/headers/c++1998/103650.cc: New test.
1879 2022-01-17 Matthias Kretz <m.kretz@gsi.de>
1881 * include/experimental/bits/simd.h (__floating_point_flags): Do
1882 not rely on the presence of the math_errhandling macro.
1884 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
1886 * include/bits/shared_ptr_atomic.h (_Sp_atomic): Add typename
1887 to qualified-id for dependent type.
1889 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
1891 * doc/xml/manual/status_cxx2020.xml: Update.
1892 * doc/html/manual/status.html: Regenerate.
1894 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
1895 Thomas Rodgers <trodgers@redhat.com>
1897 * include/bits/shared_ptr_atomic.h (__cpp_lib_atomic_shared_ptr):
1899 (_Sp_atomic): New class template.
1900 (atomic<shared_ptr<T>>, atomic<weak_ptr<T>>): New partial
1902 * include/bits/shared_ptr_base.h (__shared_count, __weak_count)
1903 (__shared_ptr, __weak_ptr): Declare _Sp_atomic as a friend.
1904 * include/std/version (__cpp_lib_atomic_shared_ptr): New macro.
1905 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc: New
1907 * testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: New test.
1909 2022-01-15 Matthias Kretz <m.kretz@gsi.de>
1911 * include/experimental/bits/simd.h: Move feature detection bools
1912 and add __have_avx512bitalg, __have_avx512vbmi2,
1913 __have_avx512vbmi, __have_avx512ifma, __have_avx512cd,
1914 __have_avx512vnni, __have_avx512vpopcntdq.
1915 (__detail::__machine_flags): New function which returns a unique
1916 uint64 depending on relevant -m and -f flags.
1917 (__detail::__odr_helper): New type alias for either an anonymous
1918 type or a type specialized with the __machine_flags number.
1919 (_SimdIntOperators): Change template parameters from _Impl to
1920 _Tp, _Abi because _Impl now has an __odr_helper parameter which
1921 may be _OdrEnforcer from the anonymous namespace, which makes
1922 for a bad base class.
1923 (many): Either add __odr_helper template parameter or mark as
1925 * include/experimental/bits/simd_detail.h: Add defines for
1926 AVX512BITALG, AVX512VBMI2, AVX512VBMI, AVX512IFMA, AVX512CD,
1927 AVX512VNNI, AVX512VPOPCNTDQ, and AVX512VP2INTERSECT.
1928 * include/experimental/bits/simd_builtin.h: Add __odr_helper
1929 template parameter or mark as always_inline.
1930 * include/experimental/bits/simd_fixed_size.h: Ditto.
1931 * include/experimental/bits/simd_math.h: Ditto.
1932 * include/experimental/bits/simd_scalar.h: Ditto.
1933 * include/experimental/bits/simd_neon.h: Add __odr_helper
1935 * include/experimental/bits/simd_ppc.h: Ditto.
1936 * include/experimental/bits/simd_x86.h: Ditto.
1938 2022-01-14 Uroš Bizjak <ubizjak@gmail.com>
1940 * testsuite/22_locale/numpunct/members/char/3.cc:
1941 Require pt_PT locale instead of nl_NL.
1942 (test02): Use pt_PT locale instead of nl_NL.
1944 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
1949 * include/backward/binders.h (bind1st, bind2nd): Add deprecated
1951 * include/bits/refwrap.h (_Maybe_unary_or_binary_function):
1952 Disable deprecated warnings for base classes.
1953 (_Reference_wrapper_base): Likewise.
1954 * include/bits/shared_ptr_base.h (_Sp_owner_less): Likewise.
1955 * include/bits/stl_bvector.h (_Bit_iterator_base): Likewise.
1956 * include/bits/stl_function.h (unary_function, binary_function):
1957 Add deprecated attribute.
1958 (unary_negate, not1, binary_negate, not2, ptr_fun)
1959 (pointer_to_unary_function, pointer_to_binary_function)
1960 (mem_fun_t, const_mem_fun_t, mem_fun_ref_t, const_mem_fun_ref_t)
1961 (mem_fun1_t, const_mem_fun1_t, mem_fun_ref1_t)
1962 (const_mem_fun1_ref_t, mem_fun, mem_fun_ref): Add deprecated
1964 * include/bits/stl_iterator.h: Disable deprecated warnings for
1965 std::iterator base classes.
1966 * include/bits/stl_iterator_base_types.h (iterator): Add
1967 deprecated attribute.
1968 * include/bits/stl_map.h (map::value_compare): Disable
1969 deprecated warnings for base class.
1970 * include/bits/stl_multimap.h (multimap::value_compare):
1972 * include/bits/stl_raw_storage_iter.h (raw_storage_iterator):
1973 Add deprecated attribute.
1974 * include/bits/stl_tempbuf.h (get_temporary_buffer): Likewise.
1975 * include/bits/stream_iterator.h: Disable deprecated warnings.
1976 * include/bits/streambuf_iterator.h: Likewise.
1977 * include/ext/bitmap_allocator.h: Remove unary_function base
1979 * include/ext/functional: Disable deprecated warnings.
1980 * include/ext/rope: Likewise.
1981 * include/ext/throw_allocator.h: Likewise.
1982 * include/std/type_traits (result_of): Add deprecated attribute.
1983 * include/tr1/functional: Disable deprecated warnings.
1984 * include/tr1/functional_hash.h: Likewise.
1985 * testsuite/20_util/function_objects/binders/1.cc: Add
1986 -Wno-disable-deprecations.
1987 * testsuite/20_util/function_objects/binders/3113.cc: Likewise.
1988 * testsuite/20_util/function_objects/constexpr.cc: Add
1990 * testsuite/20_util/raw_storage_iterator/base.cc: Likewise.
1991 * testsuite/20_util/raw_storage_iterator/dr2127.cc: Likewise.
1992 * testsuite/20_util/raw_storage_iterator/requirements/base_classes.cc:
1994 * testsuite/20_util/raw_storage_iterator/requirements/explicit_instantiation/1.cc:
1996 * testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc:
1998 * testsuite/20_util/reference_wrapper/24803.cc:
2000 * testsuite/20_util/reference_wrapper/typedefs.cc: Enable for
2001 C++20 and check for absence of nested types.
2002 * testsuite/20_util/shared_ptr/comparison/less.cc: Remove
2003 std::binary_function base class.
2004 * testsuite/20_util/temporary_buffer.cc: Add dg-warning.
2005 * testsuite/21_strings/basic_string/cons/char/69092.cc: Remove
2006 std::iterator base class.
2007 * testsuite/24_iterators/back_insert_iterator/requirements/base_classes.cc:
2009 * testsuite/24_iterators/front_insert_iterator/requirements/base_classes.cc:
2011 * testsuite/24_iterators/insert_iterator/requirements/base_classes.cc:
2013 * testsuite/24_iterators/istream_iterator/requirements/base_classes.cc:
2015 * testsuite/24_iterators/istreambuf_iterator/92285.cc:
2017 * testsuite/24_iterators/istreambuf_iterator/requirements/base_classes.cc:
2019 * testsuite/24_iterators/ostream_iterator/requirements/base_classes.cc:
2021 * testsuite/24_iterators/ostreambuf_iterator/requirements/base_classes.cc:
2023 * testsuite/24_iterators/reverse_iterator/requirements/base_classes.cc:
2025 * testsuite/25_algorithms/copy/34595.cc:
2027 * testsuite/25_algorithms/minmax/3.cc: Remove std::binary_function
2029 * testsuite/25_algorithms/all_of/requirements/explicit_instantiation/2.cc:
2030 Disable deprecated warnings.
2031 * testsuite/25_algorithms/all_of/requirements/explicit_instantiation/pod.cc:
2033 * testsuite/25_algorithms/any_of/requirements/explicit_instantiation/2.cc:
2035 * testsuite/25_algorithms/any_of/requirements/explicit_instantiation/pod.cc:
2037 * testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/2.cc:
2039 * testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/pod.cc:
2041 * testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc:
2043 * testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc:
2045 * testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc:
2047 * testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc:
2049 * testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc:
2051 * testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc:
2053 * testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc:
2055 * testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc:
2057 * testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/2.cc:
2059 * testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/pod.cc:
2061 * testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc:
2063 * testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc:
2065 * testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/2.cc:
2067 * testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/pod.cc:
2069 * testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/2.cc:
2071 * testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/pod.cc:
2073 * testsuite/25_algorithms/none_of/requirements/explicit_instantiation/2.cc:
2075 * testsuite/25_algorithms/none_of/requirements/explicit_instantiation/pod.cc:
2077 * testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc:
2079 * testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc:
2081 * testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/2.cc:
2083 * testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/pod.cc:
2085 * testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/2.cc:
2087 * testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/pod.cc:
2089 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
2091 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
2093 * testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc:
2095 * testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc:
2097 * testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc:
2099 * testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc:
2101 * testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc:
2103 * testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc:
2105 * testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc:
2107 * testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc:
2109 * testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc:
2111 * testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc:
2113 * testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc:
2115 * testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc:
2117 * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc:
2119 * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc:
2121 * testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc:
2123 * testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc:
2125 * testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc: Add
2127 * testsuite/ext/pb_ds/example/priority_queue_erase_if.cc:
2129 * testsuite/ext/pb_ds/example/priority_queue_split_join.cc:
2131 * testsuite/tr1/3_function_objects/reference_wrapper/typedefs.cc:
2132 Disable deprecated warnings.
2133 * testsuite/tr1/6_containers/hash/requirements/base_classes.cc:
2135 * testsuite/util/regression/trait/erase_if_fn.hpp: Remove
2136 std::unary_function base classes.
2137 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper):
2138 Remove std::iterator base classes.
2140 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
2142 * include/bits/shared_ptr.h (__cpp_lib_shared_ptr_weak_type):
2143 Correct type of macro value.
2144 (shared_ptr): Add additional friend declarations.
2145 (make_shared, allocate_shared): Constrain existing overloads and
2146 remove static_assert.
2147 * include/bits/shared_ptr_base.h (__cpp_lib_smart_ptr_for_overwrite):
2149 (_Sp_counted_ptr_inplace<T, Alloc, Lp>): New partial
2150 specialization for use with make_shared_for_overwrite.
2151 (__cpp_lib_shared_ptr_arrays): Update value for C++20.
2152 (_Sp_counted_array_base): New class template.
2153 (_Sp_counted_array): New class template.
2154 (__shared_count(_Tp*&, const _Sp_counted_array_base&, _Init)):
2155 New constructor for allocating shared arrays.
2156 (__shared_ptr(const _Sp_counted_array_base&, _Init)): Likewise.
2157 * include/std/version (__cpp_lib_shared_ptr_weak_type): Correct
2159 (__cpp_lib_shared_ptr_arrays): Update value for C++20.
2160 (__cpp_lib_smart_ptr_for_overwrite): New macro.
2161 * testsuite/20_util/shared_ptr/creation/99006.cc: Adjust
2163 * testsuite/20_util/shared_ptr/creation/array.cc: New test.
2164 * testsuite/20_util/shared_ptr/creation/overwrite.cc: New test.
2165 * testsuite/20_util/shared_ptr/creation/version.cc: New test.
2166 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: Check
2167 feature test macro. Test non-trivial default-initialization.
2169 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
2171 * include/bits/stl_construct.h (_Construct, _Construct_novalue):
2172 Also cast away cv-qualifiers when converting pointer to void.
2173 * testsuite/20_util/allocator/void.cc: Test construct function
2174 with cv-qualified types.
2176 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
2179 * include/bits/stl_iterator.h (common_iterator): Use
2180 std::construct_at instead of placement new.
2181 * testsuite/24_iterators/common_iterator/1.cc: Check copy
2182 construction is usable in constant expressions.
2184 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
2186 * doc/xml/manual/status_cxx2011.xml: Document new tokens
2187 accepted by std::random_device constructor.
2188 * doc/html/manual/status.html: Regenerate.
2190 2022-01-12 Patrick Palka <ppalka@redhat.com>
2192 * testsuite/20_util/to_chars/103955.cc: Add explicit dg-do
2195 2022-01-12 Patrick Palka <ppalka@redhat.com>
2198 * src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
2199 Track the excess precision separately from the effective
2200 precision. Avoid overflow in bounds check by splitting it into
2202 (__floating_to_chars_precision): Avoid overflow in bounds checks
2204 * testsuite/20_util/to_chars/103955.cc: New test.
2206 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
2209 * include/Makefile.am: Install <source_location> for
2211 * include/Makefile.in: Regenerate.
2212 * include/std/version (__cpp_lib_source_location): Define for
2215 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
2217 * include/std/ranges (ranges::lazy_split_view::_InnerIter::end()):
2218 Add neoxcept (LWG 3593).
2220 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
2222 * include/std/ranges (ranges::__detail::__box): Add constexpr to
2223 assignment operators (LWG 3572).
2224 * testsuite/std/ranges/adaptors/filter.cc: Check assignment of a
2225 view that uses copyable-box.
2227 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
2230 * include/Makefile.am: Install <coroutine> for freestanding.
2231 * include/Makefile.in: Regenerate.
2232 * include/std/coroutine: Adjust headers and preprocessor
2234 (__coroutine_traits_impl): Use concepts when available.
2235 [_GLIBCXX_HOSTED] (hash<coroutine_handle>): Define.
2237 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
2239 * include/std/ostream (operator<<(basic_ostream&, charT)):
2240 Use unformatted input if no padding is needed.
2241 (operator<<(basic_ostream<char>&, char)): Likewise.
2243 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
2246 * include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
2248 * include/std/variant (__cpp_lib_variant): Only define C++20
2249 value when the compiler is known to support conditionally
2250 trivial destructors.
2251 * include/std/version (__cpp_lib_variant): Likewise.
2253 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
2255 * include/bits/stl_iterator.h (common_iterator): Add constexpr
2256 to all member functions (LWG 3574).
2257 * testsuite/24_iterators/common_iterator/1.cc: Evaluate some
2258 tests as constant expressions.
2259 * testsuite/24_iterators/common_iterator/2.cc: Likewise.
2261 2022-01-10 Jakub Jelinek <jakub@redhat.com>
2264 * include/bits/locale_facets_nonio.h (__time_get_state): New struct.
2265 (time_get::_M_extract_via_format): Declare new method with
2266 __time_get_state& as an extra argument.
2267 * include/bits/locale_facets_nonio.tcc (_M_extract_via_format): Add
2268 __state argument, set various fields in it while parsing. Handle %j,
2269 %U, %w and %W, fix up handling of %y, %Y and %C, don't adjust tm_hour
2270 for %p immediately. Add a wrapper around the method without the
2271 __state argument for backwards compatibility.
2272 (_M_extract_num): Remove all __len == 4 special cases.
2273 (time_get::do_get_time, time_get::do_get_date, time_get::do_get): Zero
2274 initialize __state, pass it to _M_extract_via_format and finalize it
2276 (do_get_year): For 1-2 digit parsed years, map 0-68 to 2000-2068,
2277 69-99 to 1969-1999. For 3-4 digit parsed years use that as year.
2278 (get): If do_get isn't overloaded from the locale_facets_nonio.tcc
2279 version, don't call do_get but call _M_extract_via_format instead to
2281 * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export _M_extract_via_format
2282 with extra __time_get_state and __time_get_state::_M_finalize_state.
2283 * src/c++98/locale_facets.cc (is_leap, day_of_the_week,
2284 day_of_the_year): New functions in anon namespace.
2285 (mon_yday): New var in anon namespace.
2286 (__time_get_state::_M_finalize_state): Define.
2287 * testsuite/22_locale/time_get/get/char/4.cc: New test.
2288 * testsuite/22_locale/time_get/get/wchar_t/4.cc: New test.
2289 * testsuite/22_locale/time_get/get_year/char/1.cc (test01): Parse 197
2290 as year 197AD instead of error.
2291 * testsuite/22_locale/time_get/get_year/char/5.cc (test01): Parse 1 as
2292 year 2001 instead of error.
2293 * testsuite/22_locale/time_get/get_year/char/6.cc: New test.
2294 * testsuite/22_locale/time_get/get_year/wchar_t/1.cc (test01): Parse
2295 197 as year 197AD instead of error.
2296 * testsuite/22_locale/time_get/get_year/wchar_t/5.cc (test01): Parse
2297 1 as year 2001 instead of error.
2298 * testsuite/22_locale/time_get/get_year/wchar_t/6.cc: New test.
2300 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
2303 * acinclude.m4 (GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS): Do
2304 nothing for freestanding builds.
2305 (GLIBCXX_ENABLE_HOSTED): Define FREESTANDING_FLAGS.
2306 * configure.ac: Do not use AC_LIBTOOL_DLOPEN when configured
2307 with --without-headers. Do not use GCC_HEADER_STDINT for
2308 freestanding builds.
2309 * libsupc++/Makefile.am (HOSTED_CXXFLAGS): Use -ffreestanding
2310 for freestanding builds.
2311 * configure: Regenerate.
2312 * Makefile.in: Regenerate.
2313 * doc/Makefile.in: Regenerate.
2314 * include/Makefile.in: Regenerate.
2315 * libsupc++/Makefile.in: Regenerate.
2316 * po/Makefile.in: Regenerate.
2317 * python/Makefile.in: Regenerate.
2318 * src/Makefile.in: Regenerate.
2319 * src/c++11/Makefile.in: Regenerate.
2320 * src/c++17/Makefile.in: Regenerate.
2321 * src/c++20/Makefile.in: Regenerate.
2322 * src/c++98/Makefile.in: Regenerate.
2323 * src/filesystem/Makefile.in: Regenerate.
2324 * testsuite/Makefile.in: Regenerate.
2326 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
2328 * testsuite/28_regex/algorithms/regex_replace/char/103664.cc:
2329 Add dg-timeout-factor directive.
2330 * testsuite/28_regex/basic_regex/84110.cc: Likewise.
2331 * testsuite/28_regex/basic_regex/ctors/char/other.cc: Likewise.
2332 * testsuite/28_regex/match_results/102667.cc: Likewise.
2334 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
2336 * doc/xml/manual/using.xml: Update documentation around default
2338 * doc/html/*: Regenerate.
2340 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
2343 * src/c++17/Makefile.am (AM_CXXFLAGS): Add -nostdinc++.
2344 * src/c++17/Makefile.in: Regenerate.
2346 2022-01-09 Sandra Loosemore <sandra@codesourcery.com>
2348 * testsuite/18_support/type_info/constexpr.cc: Add explicit
2349 -fdelete-null-pointer-checks option.
2351 2022-01-06 Pavel I. Kryukov <pavel.kryukov@phystech.edu>
2352 Jonathan Wakely <jwakely@redhat.com>
2355 * include/bits/forward_list.tcc (forward_list::merge): Check for
2357 * testsuite/23_containers/forward_list/operations/merge.cc: New test.
2359 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
2361 * include/bits/regex.h (basic_regex, match_results): Qualify
2362 name in friend declaration, to work around Clang bug.
2364 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
2366 * testsuite/ext/rope/pthread7-rope.cc: Add dg-timeout-factor.
2368 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
2371 * include/std/charconv (__from_chars_alpha_to_num): Return
2372 char instead of unsigned char. Change invalid return value to
2373 127 instead of using numeric trait.
2374 (__from_chars_alnum): Fix comment. Do not use std::isdigit.
2375 Change type of variable to char.
2377 2022-01-05 François Dumont <fdumont@gcc.gnu.org>
2380 * include/bits/hashtable_policy.h
2381 (_Hashtable_hash_traits<_Hash>): New.
2382 (_Hash_code_base<>::_M_hash_code(const _Hash_node_value<>&)): New.
2383 (_Hashtable_base<>::_M_key_equals): New.
2384 (_Hashtable_base<>::_M_equals): Use latter.
2385 (_Hashtable_base<>::_M_key_equals_tr): New.
2386 (_Hashtable_base<>::_M_equals_tr): Use latter.
2387 * include/bits/hashtable.h
2388 (_Hashtable<>::__small_size_threshold()): New, use _Hashtable_hash_traits.
2389 (_Hashtable<>::find): Loop through elements to look for key if size is lower
2390 than __small_size_threshold().
2391 (_Hashtable<>::_M_emplace(true_type, _Args&&...)): Likewise.
2392 (_Hashtable<>::_M_insert_unique(_Kt&&, _Args&&, const _NodeGenerator&)): Likewise.
2393 (_Hashtable<>::_M_compute_hash_code(const_iterator, const key_type&)): New.
2394 (_Hashtable<>::_M_emplace(const_iterator, false_type, _Args&&...)): Use latter.
2395 (_Hashtable<>::_M_find_before_node(const key_type&)): New.
2396 (_Hashtable<>::_M_erase(true_type, const key_type&)): Use latter.
2397 (_Hashtable<>::_M_erase(false_type, const key_type&)): Likewise.
2398 * src/c++11/hashtable_c++0x.cc: Include <bits/functional_hash.h>.
2399 * testsuite/util/testsuite_performance.h
2400 (report_performance): Use 9 width to display memory.
2401 * testsuite/performance/23_containers/insert_erase/unordered_small_size.cc:
2402 New performance test case.
2404 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
2407 * include/bits/basic_string.h (basic_string(const T&, size_t, size_t)):
2408 Relax constraints on string_view parameter.
2409 * include/bits/cow_string.h (basic_string(const T&, size_t, size_t)):
2411 * testsuite/21_strings/basic_string/cons/char/103919.cc: New test.
2413 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
2415 * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export new symbol for
2417 * include/bits/c++config (_GLIBCXX23_CONSTEXPR): Define.
2418 * include/std/version (__cpp_lib_constexpr_typeinfo): Define.
2419 * libsupc++/tinfo.cc: Add #error to ensure non-inline definition
2421 (type_info::__equal): Define alias symbol.
2422 * libsupc++/typeinfo (type_info::before): Combine different
2423 implementations into one.
2424 (type_info::operator==): Likewise. Use address equality for
2425 constant evaluation. Call __equal for targets that require the
2426 definition to be non-inline.
2427 * testsuite/18_support/type_info/constexpr.cc: New test.
2429 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
2431 * src/c++11/cxx11-ios_failure.cc (io_error_category): Define
2432 class and virtual functions as 'final'.
2433 (io_category_instance): Use constinit union to make the object
2435 * src/c++11/future.cc (future_error_category): Define class and
2436 virtual functions as 'final'.
2437 (future_category_instance): Use constinit union.
2439 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
2441 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Strip
2442 versioned namespace from the type name that is printed.
2444 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
2446 * python/libstdcxx/v6/printers.py (StdRegexStatePrinter): New
2447 printer for std::regex NFA states.
2449 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
2451 * testsuite/23_containers/forward_list/operations/1.cc: Fill in
2452 placeholders in comments.
2453 * testsuite/23_containers/forward_list/operations/2.cc:
2455 * testsuite/23_containers/forward_list/operations/3.cc:
2457 * testsuite/23_containers/forward_list/operations/4.cc:
2459 * testsuite/23_containers/forward_list/operations/5.cc:
2461 * testsuite/23_containers/forward_list/operations/6.cc:
2463 * testsuite/23_containers/forward_list/operations/7.cc:
2466 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
2469 * include/bits/stl_deque.h (operator-): Do not use 0 as null
2472 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
2474 * include/bits/alloc_traits.h (allocator_traits<allocator<void>>):
2475 Use std::_Construct for construct.
2477 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
2480 * doc/xml/faq.xml: Add '-x c++' to preprocessor command.
2481 * doc/html/faq.html: Regenerate.
2483 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
2485 * include/bits/regex.h (__regex_algo_impl): Change __policy and
2486 __match_mode template parameters to be function parameters.
2487 (regex_match, regex_search): Pass policy and match mode as
2489 * include/bits/regex.tcc (__regex_algo_impl): Change template
2490 parameters to function parameters.
2491 * include/bits/regex_compiler.h (_RegexTranslatorBase): Use
2492 'if constexpr' for conditions using template parameters.
2493 (_RegexTranslator): Likewise.
2494 * include/bits/regex_executor.tcc (_Executor::_M_handle_accept):
2496 * testsuite/util/testsuite_regex.h (regex_match_debug)
2497 (regex_search_debug): Move template arguments to function
2500 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
2502 * testsuite/util/testsuite_regex.h (regex_match_debug): Compare
2503 results even if the match failed.
2505 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
2507 * include/bits/regex_compiler.tcc: Adjust all calls to
2508 __throw_regex_error.
2509 * include/bits/regex_error.h (__throw_regex_error): Add noreturn
2511 * include/bits/regex_scanner.tcc: Likewise.
2512 * src/c++11/regex.cc (desc): New helper function.
2513 (regex_error::regex_error(error_type)): Use desc to get a string
2514 corresponding to the error code.
2517 Copyright (C) 2022 Free Software Foundation, Inc.
2519 Copying and distribution of this file, with or without modification,
2520 are permitted in any medium without royalty provided the copyright
2521 notice and this notice are preserved.