1 2022-09-28 Jonathan Wakely <jwakely@redhat.com>
3 * doc/xml/manual/evolution.xml: Document std::bind API
5 * doc/xml/manual/intro.xml: Document LWG 2487 status.
6 * doc/xml/manual/using.xml: Clarify default value of
7 _GLIBCXX_USE_DEPRECATED.
8 * doc/html/*: Regenerate.
9 * include/std/functional (_Bind::operator()(Args&&...) volatile)
10 (_Bind::operator()(Args&&...) const volatile)
11 (_Bind_result::operator()(Args&&...) volatile)
12 (_Bind_result::operator()(Args&&...) const volatile): Replace
13 with deleted overload for C++20 and later.
14 * testsuite/20_util/bind/cv_quals.cc: Check for deprecated
16 * testsuite/20_util/bind/cv_quals_2.cc: Likewise, and check for
19 2022-09-28 Jonathan Wakely <jwakely@redhat.com>
22 * include/bits/invoke.h [__cplusplus < 201703] (__invoke_r):
23 Remove is_invocable and is_convertible constraints.
24 * include/std/type_traits (__is_invocable_impl::_S_conv): Use
25 non-deduced context for parameter.
26 (__is_invocable_impl::_S_test): Remove _Check_noex template
27 parameter and use deduced noexcept value in its place. Add bool
28 parameter to detect dangling references.
29 (__is_invocable_impl::type): Adjust call to _S_test to avoid
30 deducing unnecessary noexcept property..
31 (__is_invocable_impl::__nothrow_type): Rename to ...
32 (__is_invocable_impl::__nothrow_conv): ... this. Adjust call
33 to _S_test to deduce noexcept property.
34 * testsuite/20_util/bind/dangling_ref.cc: New test.
35 * testsuite/20_util/function/cons/70692.cc: New test.
36 * testsuite/20_util/function_objects/invoke/dangling_ref.cc:
38 * testsuite/20_util/is_invocable/dangling_ref.cc: New test.
39 * testsuite/30_threads/packaged_task/cons/dangling_ref.cc:
42 2022-09-27 Jonathan Wakely <jwakely@redhat.com>
45 * testsuite/20_util/is_convertible/requirements/access.cc: New
48 2022-09-27 Jonathan Wakely <jwakely@redhat.com>
51 * include/bits/std_function.h (__function_guide_t): New alias
53 [__cpp_static_call_operator] (__function_guide_static_helper):
55 (function): Use __function_guide_t in deduction guide.
56 * include/std/future (packaged_task): Use __function_guide_t in
58 * testsuite/20_util/function/cons/deduction_c++23.cc: New test.
59 * testsuite/30_threads/packaged_task/cons/deduction_c++23.cc:
62 2022-09-26 Jonathan Wakely <jwakely@redhat.com>
64 * include/bits/ptr_traits.h (__ptr_traits_elem) [__cpp_concepts]:
65 Also define the __ptr_traits_elem class template for the
67 (pointer_traits<Ptr>): Remove constrained partial
69 * testsuite/20_util/pointer_traits/lwg3545.cc: Check for
70 ambiguitiy with program-defined partial specialization.
72 2022-09-26 Jonathan Wakely <jwakely@redhat.com>
74 * include/std/type_traits (is_convertible, is_convertible_v):
75 Define using new built-in.
76 (is_nothrow_convertible is_nothrow_convertible_v): Likewise.
78 2022-09-26 Jonathan Wakely <jwakely@redhat.com>
81 * include/std/bitset (_Base_bitset::_M_do_reset): Use
82 preprocessor conditional around non-C++03 code.
83 * testsuite/20_util/bitset/107037.cc: New test.
85 2022-09-24 Jonathan Wakely <jwakely@redhat.com>
87 * include/bits/alloc_traits.h (allocator_traits::is_always_equal):
88 Only instantiate is_empty if needed.
89 * include/bits/ptr_traits.h (__ptr_traits_impl::difference_type)
90 (__ptr_traits_impl::rebind): Use __detected_or.
91 * include/experimental/type_traits (is_same_v): Add a partial
92 specialization instead of instantiating the std::is_same class
94 (detected_t): Redefine in terms of detected_or_t.
95 (is_detected, is_detected_v): Redefine in terms of detected_t.
96 * include/std/type_traits [__cpp_concepts] (__detected_or): Add
97 new definition using concepts.
98 (__detector::value_t): Rename to __is_detected.
99 * testsuite/17_intro/names.cc: Check value_t isn't used.
101 2022-09-23 Jonathan Wakely <jwakely@redhat.com>
103 * testsuite/20_util/is_assignable/requirements/access.cc:
106 2022-09-23 Jonathan Wakely <jwakely@redhat.com>
109 * include/std/type_traits (__is_nothrow_invocable_lib): Remove.
110 (__is_invocable_impl::__nothrow_type): New member type which
111 checks if the conversion can throw.
112 (__is_nt_invocable_impl): Replace class template with alias
113 template to __is_nt_invocable_impl::__nothrow_type.
114 * testsuite/20_util/is_nothrow_invocable/91456.cc: New test.
115 * testsuite/20_util/is_nothrow_convertible/value.cc: Remove
116 macro used by value_ext.cc test.
117 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: Remove
118 test for non-standard __is_nothrow_invocable_lib trait.
120 2022-09-23 Marek Polacek <polacek@redhat.com>
123 * include/std/type_traits: Rename __is_nothrow_convertible to
124 __is_nothrow_convertible_lib.
125 * testsuite/20_util/is_nothrow_convertible/value_ext.cc: Likewise.
127 2022-09-23 Jonathan Wakely <jwakely@redhat.com>
129 * include/std/bitset (operator>>): Do not copy for N==0.
130 * testsuite/20_util/bitset/io/input.cc: Add comment.
132 2022-09-23 Jonathan Wakely <jwakely@redhat.com>
134 * include/debug/bitset (__debug::bitset): Add constexpr to all
136 (operator&, operator|, operator^): Add inline and constexpr.
137 (operator>>, operator<<): Add inline.
138 * testsuite/20_util/bitset/access/constexpr.cc: Only check using
139 constexpr std::string for the cxx11 ABI.
140 * testsuite/20_util/bitset/cons/constexpr_c++23.cc: Likewise.
141 * testsuite/20_util/headers/bitset/synopsis.cc: Check constexpr
144 2022-09-23 Jonathan Wakely <jwakely@redhat.com>
146 * include/std/bitset (bitset::_M_copy_to_string): Find set bits
147 instead of iterating over individual bits.
149 2022-09-22 Jonathan Wakely <jwakely@redhat.com>
151 * include/std/bitset (bitset): Add constexpr for C++23. Guard
152 members using std::string with _GLIBCXX_HOSTED.
153 * include/std/version (__cpp_lib_constexpr_bitset): Define.
154 * testsuite/20_util/bitset/access/constexpr.cc: New test.
155 * testsuite/20_util/bitset/cons/constexpr_c++23.cc: New test.
156 * testsuite/20_util/bitset/count/constexpr.cc: New test.
157 * testsuite/20_util/bitset/ext/constexpr.cc: New test.
158 * testsuite/20_util/bitset/operations/constexpr_c++23.cc: New test.
159 * testsuite/20_util/bitset/version.cc: New test.
161 2022-09-22 Jonathan Wakely <jwakely@redhat.com>
163 * testsuite/23_containers/bitset/18604.cc: Moved to...
164 * testsuite/20_util/bitset/18604.cc: ...here.
165 * testsuite/23_containers/bitset/45713.cc: Moved to...
166 * testsuite/20_util/bitset/45713.cc: ...here.
167 * testsuite/23_containers/bitset/to_string/dr396.cc: Moved to...
168 * testsuite/20_util/bitset/access/dr396.cc: ...here.
169 * testsuite/23_containers/bitset/to_string/1.cc: Moved to...
170 * testsuite/20_util/bitset/access/to_string.cc: ...here.
171 * testsuite/23_containers/bitset/to_ullong/1.cc: Moved to...
172 * testsuite/20_util/bitset/access/to_ullong.cc: ...here.
173 * testsuite/23_containers/bitset/to_ulong/1.cc: Moved to...
174 * testsuite/20_util/bitset/access/to_ulong.cc: ...here.
175 * testsuite/23_containers/bitset/cons/1.cc: Moved to...
176 * testsuite/20_util/bitset/cons/1.cc: ...here.
177 * testsuite/23_containers/bitset/cons/16020.cc: Moved to...
178 * testsuite/20_util/bitset/cons/16020.cc: ...here.
179 * testsuite/23_containers/bitset/cons/2.cc: Moved to...
180 * testsuite/20_util/bitset/cons/2.cc: ...here.
181 * testsuite/23_containers/bitset/cons/3.cc: Moved to...
182 * testsuite/20_util/bitset/cons/3.cc: ...here.
183 * testsuite/23_containers/bitset/cons/38244.cc: Moved to...
184 * testsuite/20_util/bitset/cons/38244.cc: ...here.
185 * testsuite/23_containers/bitset/cons/50268.cc: Moved to...
186 * testsuite/20_util/bitset/cons/50268.cc: ...here.
187 * testsuite/23_containers/bitset/cons/6282.cc: Moved to...
188 * testsuite/20_util/bitset/cons/6282.cc: ...here.
189 * testsuite/23_containers/bitset/cons/constexpr.cc: Moved to...
190 * testsuite/20_util/bitset/cons/constexpr.cc: ...here.
191 * testsuite/23_containers/bitset/cons/dr1325-1.cc: Moved to...
192 * testsuite/20_util/bitset/cons/dr1325-1.cc: ...here.
193 * testsuite/23_containers/bitset/cons/dr1325-2.cc: Moved to...
194 * testsuite/20_util/bitset/cons/dr1325-2.cc: ...here.
195 * testsuite/23_containers/bitset/cons/dr396.cc: Moved to...
196 * testsuite/20_util/bitset/cons/dr396.cc: ...here.
197 * testsuite/23_containers/bitset/debug/invalidation/1.cc: Moved to...
198 * testsuite/20_util/bitset/debug/invalidation/1.cc: ...here.
199 * testsuite/23_containers/bitset/ext/15361.cc: Moved to...
200 * testsuite/20_util/bitset/ext/15361.cc: ...here.
201 * testsuite/23_containers/bitset/hash/1.cc: Moved to...
202 * testsuite/20_util/bitset/hash/1.cc: ...here.
203 * testsuite/23_containers/bitset/input/1.cc: Moved to...
204 * testsuite/20_util/bitset/io/input.cc: ...here.
205 * testsuite/23_containers/bitset/count/6124.cc: Moved to...
206 * testsuite/20_util/bitset/observers/6124.cc: ...here.
207 * testsuite/23_containers/bitset/all/1.cc: Moved to...
208 * testsuite/20_util/bitset/observers/all.cc: ...here.
209 * testsuite/23_containers/bitset/test/1.cc: Moved to...
210 * testsuite/20_util/bitset/observers/test.cc: ...here.
211 * testsuite/23_containers/bitset/operations/1.cc: Moved to...
212 * testsuite/20_util/bitset/operations/1.cc: ...here.
213 * testsuite/23_containers/bitset/operations/13838.cc: Moved to...
214 * testsuite/20_util/bitset/operations/13838.cc: ...here.
215 * testsuite/23_containers/bitset/operations/2.cc: Moved to...
216 * testsuite/20_util/bitset/operations/2.cc: ...here.
217 * testsuite/23_containers/bitset/operations/96303.cc: Moved to...
218 * testsuite/20_util/bitset/operations/96303.cc: ...here.
219 * testsuite/23_containers/bitset/operations/constexpr-2.cc: Moved to...
220 * testsuite/20_util/bitset/operations/constexpr-2.cc: ...here.
221 * testsuite/23_containers/bitset/operations/constexpr.cc: Moved to...
222 * testsuite/20_util/bitset/operations/constexpr.cc: ...here.
223 * testsuite/23_containers/bitset/requirements/constexpr_functions.cc: Moved to...
224 * testsuite/20_util/bitset/requirements/constexpr_functions.cc: ...here.
225 * testsuite/23_containers/bitset/requirements/explicit_instantiation/1.cc: Moved to...
226 * testsuite/20_util/bitset/requirements/explicit_instantiation/1.cc: ...here.
227 * testsuite/23_containers/bitset/requirements/explicit_instantiation/1_c++0x.cc: Moved to...
228 * testsuite/20_util/bitset/requirements/explicit_instantiation/1_c++0x.cc: ...here.
229 * testsuite/23_containers/headers/bitset/synopsis.cc: Moved to...
230 * testsuite/20_util/headers/bitset/synopsis.cc: ...here.
232 2022-09-22 François Dumont <fdumont@gcc.gnu.org>
234 * python/libstdcxx/v6/printers.py: Remove ptinter registration for non-existing
235 types std::__debug::unique_ptr, std::__debug::stack, std::__debug::queue,
236 std::__debug::priority_queue.
238 2022-09-21 Jonathan Wakely <jwakely@redhat.com>
241 * testsuite/20_util/function/91456.cc: Add comment with PR
243 * testsuite/20_util/is_invocable/91456.cc: Likewise. Replace
244 std::function checks with std::is_invocable_r checks.
246 2022-09-21 Jonathan Wakely <jwakely@redhat.com>
248 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Remove
249 unnecessary main function.
250 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
252 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
254 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
256 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
259 2022-09-21 Jonathan Wakely <jwakely@redhat.com>
261 * testsuite/20_util/headers/memory/synopsis.cc: Add declarations
262 from C++11 and later.
264 2022-09-21 Jonathan Wakely <jwakely@redhat.com>
266 * doc/xml/manual/documentation_hacking.xml: Remove trailing
268 * doc/xml/manual/policy_data_structures.xml: Likewise.
270 2022-09-21 Jonathan Wakely <jwakely@redhat.com>
272 * include/c_compatibility/stdlib.h [!_GLIBCXX_HOSTED]: Add
273 using-declaration for _Exit.
275 2022-09-21 Jonathan Wakely <jwakely@redhat.com>
277 * testsuite/18_support/uncaught_exception/14026.cc: Qualify
280 2022-09-21 Jonathan Wakely <jwakely@redhat.com>
282 * include/bits/ranges_base.h: Include <initializer_list>.
284 2022-09-20 Jonathan Wakely <jwakely@redhat.com>
286 * include/c_global/cstdlib [!_GLIBCXX_HOSTED] (quick_exit): Fix
289 2022-09-16 Jonathan Wakely <jwakely@redhat.com>
292 * include/backward/auto_ptr.h [!_GLIBCXX_HOSTED]: Do not define
294 * include/bits/alloc_traits.h [!_GLIBCXX_HOSTED]: Do not declare
295 std::allocator_traits<std::allocator<T>> specializations for
297 * include/bits/memoryfwd.h [!_GLIBCXX_HOSTED] (allocator): Do
298 not declare for freestanding.
299 * include/bits/stl_algo.h [!_GLIBCXX_HOSTED] (stable_partition):
300 Do not define for freestanding.
301 [!_GLIBCXX_HOSTED] (merge, stable_sort): Do not use temporary
302 buffers for freestanding.
303 * include/bits/stl_algobase.h [!_GLIBCXX_HOSTED]: Do not declare
304 streambuf iterators and overloaded algorithms using them.
305 * include/bits/stl_uninitialized.h [!_GLIBCXX_HOSTED]: Do not
306 define specialized overloads for std::allocator.
307 * include/bits/unique_ptr.h [!_GLIBCXX_HOSTED] (make_unique)
308 (make_unique_for_overwrite, operator<<): Do not define for
310 * include/c_global/cstdlib [!_GLIBCXX_HOSTED] (_Exit): Declare.
311 Use _GLIBCXX_NOTHROW instead of throw().
312 * include/debug/assertions.h [!_GLIBCXX_HOSTED]: Ignore
313 _GLIBCXX_DEBUG for freestanding.
314 * include/debug/debug.h [!_GLIBCXX_DEBUG]: Likewise.
315 * include/std/bit [!_GLIBCXX_HOSTED]: Do not use the custom
316 __int_traits if <ext/numeric_traits.h> is available.
317 * include/std/functional [!_GLIBCXX_HOSTED]: Do not include
318 headers that aren't valid for freestanding.
319 (boyer_moore_searcher, boyer_moore_horspool_searcher): Do not
320 define for freestanding.
321 * include/std/iterator [!_GLIBCXX_HOSTED]: Do not include
322 headers that aren't valid for freestanding.
323 * include/std/memory [!_GLIBCXX_HOSTED]: Likewise.
324 * include/std/ranges [!_GLIBCXX_HOSTED] (istream_view): Do not
325 define for freestanding.
326 (views::__detail::__is_basic_string_view) [!_GLIBCXX_HOSTED]:
327 Do not define partial specialization for freestanding.
329 2022-09-16 Jonathan Wakely <jwakely@redhat.com>
331 * include/bits/alloc_traits.h (__alloc_swap)
332 (__shrink_to_fit_aux): Move here, from ...
333 * include/bits/allocator.h: ... here.
334 * include/ext/alloc_traits.h: Do not include allocator.h.
336 2022-09-16 Jonathan Wakely <jwakely@redhat.com>
338 * include/bits/stl_algo.h: Include <bits/stl_algobase.h>.
339 * include/bits/stl_tempbuf.h: Include headers for __try and
340 __catch macros, std::pair, and __gnu_cxx::__numeric_traits.
341 * include/bits/stream_iterator.h: Include <iosfwd> and headers
342 for std::addressof and std::iterator.
343 * include/bits/streambuf_iterator.h: Include header for
345 * include/std/iterator: Do not include <iosfwd>.
347 2022-09-16 Jonathan Wakely <jwakely@redhat.com>
349 * testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc:
350 Store value with non-zero padding bits after construction.
352 2022-09-16 Jonathan Wakely <jwakely@redhat.com>
354 * include/tr1/random.h (__detail::_Adaptor::_BEngine): Remove.
355 (__detail::_Adaptor::_M_g): Make public.
356 (__detail::_Adaptor<_Engine*, _Dist>): Remove partial
358 (variate_generate::_Value): New helper to simplify handling of
359 _Engine* and _Engine& template arguments.
360 (variate_generate::engine_value_type): Define to underlying
361 engine type, not adapted type.
362 (variate_generate::engine()): Return underlying engine instead
364 * testsuite/tr1/5_numerical_facilities/random/variate_generator/37986.cc:
366 * testsuite/tr1/5_numerical_facilities/random/variate_generator/requirements/typedefs.cc:
367 Check member typedefs have the correct types.
369 2022-09-16 Jonathan Wakely <jwakely@redhat.com>
371 * include/debug/formatter.h [_GLIBCXX_DEBUG_BACKTRACE]
372 (_Error_formatter): Use 0 as null pointer constant.
374 2022-09-16 Jonathan Wakely <jwakely@redhat.com>
376 * include/bits/allocator.h (__alloc_neq): Remove.
377 * include/bits/stl_list.h (list::_M_check_equal_allocators):
378 Compare allocators directly, without __alloc_neq.
380 2022-09-16 Jonathan Wakely <jwakely@redhat.com>
382 * doc/doxygen/user.cfg.in (PREDEFINED): Remove __allocator_base.
383 * include/bits/allocator.h: Fix nesting of Doxygen commands.
385 2022-09-16 Jonathan Wakely <jwakely@redhat.com>
387 * doc/xml/manual/abi.xml: Document GLIBCXX_3.4.30 and
388 GLIBCXX_3.4.31 versions.
389 * doc/html/manual/abi.html: Regenerate.
391 2022-09-15 Jonathan Wakely <jwakely@redhat.com>
393 * include/std/memory: Do not include <bits/stl_algobase.h>.
395 2022-09-15 Jonathan Wakely <jwakely@redhat.com>
397 * include/bits/shared_ptr_atomic.h (_GLIBCXX_TSAN_MUTEX_PRE_LOCK):
399 (_GLIBCXX_TSAN_MUTEX_TRY_LOCK): ... this, add try_lock flag.
400 (_GLIBCXX_TSAN_MUTEX_TRY_LOCK_FAILED): New macro using
402 (_GLIBCXX_TSAN_MUTEX_POST_LOCK): Rename to ...
403 (_GLIBCXX_TSAN_MUTEX_LOCKED): ... this.
404 (_GLIBCXX_TSAN_MUTEX_PRE_UNLOCK): Remove invalid flag.
405 (_GLIBCXX_TSAN_MUTEX_POST_UNLOCK): Remove invalid flag.
406 (_Sp_atomic::_Atomic_count::lock): Use new macros.
408 2022-09-15 Patrick Palka <ppalka@redhat.com>
410 * include/bits/ranges_algo.h (__adjacent_find_fn, adjacent_find):
412 * include/bits/ranges_util.h: ... here.
413 * include/std/ranges (chunk_by_view): Define.
414 (chunk_by_view::_Iterator): Define.
415 (__detail::__can_chunk_by_view): Define.
416 (_ChunkBy, chunk_by): Define.
417 * testsuite/std/ranges/adaptors/chunk_by/1.cc: New test.
419 2022-09-15 François Dumont <fdumont@gcc.gnu.org>
421 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc:
422 Adapt dg-prune-output to _GLIBCXX_INLINE_VERSION mode.
424 2022-09-15 François Dumont <fdumont@gcc.gnu.org>
426 * config/abi/pre/gnu-versioned-namespace.ver: Remove obsolete std::__detail::__8
429 2022-09-14 Jonathan Wakely <jwakely@redhat.com>
431 * include/bits/shared_ptr_atomic.h (_GLIBCXX_TSAN_MUTEX_DESTROY)
432 (_GLIBCXX_TSAN_MUTEX_PRE_LOCK, _GLIBCXX_TSAN_MUTEX_POST_LOCK)
433 (_GLIBCXX_TSAN_MUTEX_PRE_UNLOCK, _GLIBCXX_TSAN_MUTEX_POST_UNLOCK)
434 (_GLIBCXX_TSAN_MUTEX_PRE_SIGNAL, _GLIBCXX_TSAN_MUTEX_POST_SIGNAL):
435 Define macros for TSan annotation functions.
436 (_Sp_atomic::_Atomic_count): Add annotations.
438 2022-09-14 Jonathan Wakely <jwakely@redhat.com>
440 * include/bits/stl_tempbuf.h: Include <new>.
442 2022-09-14 Jonathan Wakely <jwakely@redhat.com>
444 * testsuite/17_intro/names.cc: Explain why poison pragma can't
447 2022-09-14 Jonathan Wakely <jwakely@redhat.com>
450 (_State_baseV2::__setter(exception_ptr&, promise&)): Add
451 assertion for LWG 2276 precondition.
452 * testsuite/30_threads/promise/members/set_exception_neg.cc:
455 2022-09-14 Jonathan Wakely <jwakely@redhat.com>
457 * doc/xml/manual/intro.xml: Document LWG 1203.
458 * doc/html/*: Regenerate.
460 2022-09-14 Philipp Fent <fent@in.tum.de>
462 * python/libstdcxx/v6/printers.py (access_streambuf_ptrs):
464 (StdStringBufPrinter, StdStringStreamPrinter): New printers.
465 (build_libstdcxx_dictionary): Register stringstream printers.
466 * testsuite/libstdc++-prettyprinters/debug.cc: Check string
468 * testsuite/libstdc++-prettyprinters/simple.cc: Likewise.
469 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
471 2022-09-13 Patrick Palka <ppalka@redhat.com>
473 * include/std/ranges (__detail::__slide_caches_nothing): Define.
474 (__detail::__slide_caches_last): Define.
475 (__detail::__slide_caches_first): Define.
476 (slide_view): Define.
477 (enable_borrowed_range<slide_view>): Define.
478 (slide_view::_Iterator): Define.
479 (slide_view::_Sentinel): Define.
480 (views::__detail::__can_slide_view): Define.
481 (views::_Slide, views::slide): Define.
482 * testsuite/std/ranges/adaptors/slide/1.cc: New test.
484 2022-09-13 Patrick Palka <ppalka@redhat.com>
486 * include/std/ranges (__detail::__div_ceil): Define.
487 (chunk_view): Define.
488 (chunk_view::_OuterIter): Define.
489 (chunk_view::_OuterIter::value_type): Define.
490 (chunk_view::_InnerIter): Define.
491 (chunk_view<_Vp>): Define partial specialization for forward
493 (enable_borrowed_range<chunk_view>): Define.
494 (chunk_view<_Vp>::_Iterator): Define.
495 (views::__detail::__can_chunk_view): Define.
496 (views::_Chunk, views::chunk): Define.
497 * testsuite/std/ranges/adaptors/chunk/1.cc: New test.
499 2022-09-13 Patrick Palka <ppalka@redhat.com>
501 * include/std/ranges (join_view::_Iterator::_M_satisfy):
502 Adjust resetting _M_inner as per LWG 3569.
503 (join_view::_Iterator::_M_inner): Wrap in std::optional
505 (join_view::_Iterator::_Iterator): Relax constraints as
507 (join_view::_Iterator::operator*): Adjust as per LWG 3569.
508 (join_view::_Iterator::operator->): Likewise.
509 (join_view::_Iterator::operator++): Likewise.
510 (join_view::_Iterator::operator--): Likewise.
511 (join_view::_Iterator::iter_move): Likewise.
512 (join_view::_Iterator::iter_swap): Likewise.
513 * testsuite/std/ranges/adaptors/join.cc (test14): New test.
515 2022-09-13 Patrick Palka <ppalka@redhat.com>
517 * include/debug/safe_iterator.h (_GLIBCXX_DEBUG_VERIFY_OPERANDS):
518 Add parentheses to avoid -Wparentheses warning.
520 2022-09-12 Patrick Palka <ppalka@redhat.com>
523 * testsuite/std/ranges/adaptors/join.cc (test13): New test.
525 2022-09-12 Jonathan Wakely <jwakely@redhat.com>
527 * testsuite/19_diagnostics/error_code/cons/lwg3629.cc: Fix
529 * testsuite/19_diagnostics/error_condition/cons/lwg3629.cc:
532 2022-09-12 Jakub Jelinek <jakub@redhat.com>
534 PR tree-optimization/105329
535 * acinclude.m4 (libtool_VERSION): Change to 6:31:0.
536 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Don't export
537 std::basic_string methods with name length of 15.
538 (GLIBCXX_3.4.31): Export std::basic_string::_M_replace_cold.
539 * testsuite/util/testsuite_abi.cc (check_version): Handle
541 * include/bits/basic_string.h (std::basic_string::_M_replace_cold):
543 * include/bits/basic_string.tcc (std::basic_string::_M_replace_cold):
544 Define and export even for C++20.
545 (std::basic_string::_M_replace): Use __builtin_expect, outline
546 the overlapping case to _M_replace_cold.
547 * configure: Regenerated.
549 2022-09-09 Jonathan Wakely <jwakely@redhat.com>
551 * include/bits/atomic_base.h (__atomic_impl::__compare_exchange):
552 Rename __weak to __is_weak.
553 * testsuite/17_intro/names.cc: Add __weak and __strong.
555 2022-09-09 Patrick Palka <ppalka@redhat.com>
558 * include/std/ranges (views::_ZipTransform::operator()): Correct
559 return type in the empty case.
560 (views::_AdjacentTransform::operator()): Likewise.
562 2022-09-09 Patrick Palka <ppalka@redhat.com>
565 * include/std/ranges (adjacent_view::_Iterator::_Iterator): Fix
567 * testsuite/std/ranges/adaptors/adjacent/1.cc (test04): New test.
569 2022-09-09 Patrick Palka <ppalka@redhat.com>
572 * include/std/ranges (zip_view::_Iterator::operator-): Use
573 __to_unsigned_like instead of make_unsigned_t.
574 (zip_view::_Sentinel::operator-): Likewise.
575 * testsuite/std/ranges/zip/1.cc (test04): New test.
577 2022-09-08 François Dumont <fdumont@gcc.gnu.org>
579 * testsuite/util/testsuite_performance.h (__gnu_test::MallocInfo): New.
580 (__gnu_test::malloc_info): New, replace mallinfo on current platform
581 supporting it and use mallinfo2 when glibc >= 2.33.
583 2022-09-08 Jonathan Wakely <jwakely@redhat.com>
586 * testsuite/20_util/is_complete_or_unbounded/memoization_neg.cc:
587 Prune additional errors from front-end.
588 * testsuite/20_util/is_move_constructible/incomplete_neg.cc:
590 * testsuite/20_util/is_nothrow_swappable/incomplete_neg.cc:
592 * testsuite/20_util/is_nothrow_swappable_with/incomplete_neg.cc:
594 * testsuite/20_util/is_swappable_with/incomplete_neg.cc:
597 2022-09-08 Jonathan Wakely <jwakely@redhat.com>
599 * include/c_global/cstddef (byte): Add always_inline attribute
600 to all operator overloads.
601 (to_integer): Add always_inline attribute.
603 2022-09-08 Thomas Rodgers <trodgers@redhat.com>
604 Jakub Jelinek <jakub@redhat.com>
605 Jonathan Wakely <jwakely@redhat.com>
607 * include/bits/atomic_base.h (__atomic_impl::__maybe_has_padding):
609 (__atomic_impl::clear_padding): Likewise.
610 (__atomic_impl::__compare_exchange): Likewise.
611 (__atomic_impl::compare_exchange_weak): Delegate to
613 (__atomic_impl::compare_exchange_strong): Likewise.
614 * include/std/atomic (atomic<T>::atomic(T)): Clear padding when
615 possible in a constexpr function.
616 (atomic::store): Clear padding.
617 (atomic::exchange): Likewise.
618 (atomic::compare_exchange_weak): Use __compare_exchange.
619 (atomic::compare_exchange_strong): Likewise.
620 * testsuite/29_atomics/atomic/compare_exchange_padding.cc: New
622 * testsuite/29_atomics/atomic_ref/compare_exchange_padding.cc:
625 2022-09-08 Jonathan Wakely <jwakely@redhat.com>
627 * include/std/system_error (__adl_only::make_error_code): Add
629 (__adl_only::make_error_condition): Likewise.
630 (error_code::error_code(ErrorCodeEnum)): Add using-declaration
631 for deleted function.
632 (error_condition::error_condition(ErrorConditionEnum)):
634 * testsuite/19_diagnostics/error_code/cons/lwg3629.cc: New test.
635 * testsuite/19_diagnostics/error_condition/cons/lwg3629.cc: New test.
637 2022-09-07 Jonathan Wakely <jwakely@redhat.com>
639 * include/std/barrier: Add missing runtime exception.
641 2022-09-07 Patrick Palka <ppalka@redhat.com>
643 * include/std/type_traits (is_reference): Make the primary
644 template derive from false_type. Define two partial
645 specializations that derive from true_type.
647 2022-09-07 Patrick Palka <ppalka@redhat.com>
649 * include/std/type_traits (__is_void_helper): Remove.
650 (is_void): Make the primary template derive from false_type,
651 and define four explicit specializations that derive from
653 (__is_null_pointer_helper, is_null_pointer): Likewise.
655 2022-09-07 Jason Merrill <jason@redhat.com>
657 * libsupc++/dyncast.cc (__dynamic_cast): Avoid virtual function
658 call in simple success case.
660 2022-09-06 Philipp Fent <fent@in.tum.de>
662 * testsuite/libstdc++-prettyprinters/48362.cc: Fix expected
664 * testsuite/libstdc++-prettyprinters/cxx11.cc: Likewise.
666 2022-09-05 Jonathan Wakely <jwakely@redhat.com>
668 * include/std/type_traits (__success_type, __failure_type): Move
669 definitions later in the file.
671 2022-09-05 Jonathan Wakely <jwakely@redhat.com>
673 * include/std/type_traits (is_trivial_v, is_trivially_copyable_v)
674 (is_standard_layout_v, is_pod_v, is_literal_type_v): Use
675 built-in instead of class template.
676 (is_same_v): Add partial specialization for true case.
678 2022-09-02 Patrick Palka <ppalka@redhat.com>
680 * include/std/tuple (tuple::_UseOtherCtor): Use ::type when
681 deriving from __and_, __or_ or __not_.
682 * include/std/type_traits (negation): Likewise.
683 (is_unsigned): Likewise.
684 (__is_implicitly_default_constructible): Likewise.
685 (is_trivially_destructible): Likewise.
686 (__is_nt_invocable_impl): Likewise.
688 2022-09-02 Jonathan Wakely <jwakely@redhat.com>
690 * include/std/type_traits (is_constructible_v)
691 (is_default_constructible_v, is_copy_constructible_v)
692 (is_move_constructible_v): Define using __is_constructible.
693 (is_assignable_v, is_copy_assignable_v, is_move_assignable_v):
694 Define using __is_assignable.
695 (is_trivially_constructible_v)
696 (is_trivially_default_constructible_v)
697 (is_trivially_copy_constructible_v)
698 (is_trivially_move_constructible_v): Define using
699 __is_trivially_constructible.
700 (is_trivially_assignable_v, is_trivially_copy_assignable_v)
701 (is_trivially_move_assignable_v): Define using
702 __is_trivially_assignable.
703 (is_nothrow_constructible_v)
704 (is_nothrow_default_constructible_v)
705 (is_nothrow_copy_constructible_v)
706 (is_nothrow_move_constructible_v): Define using
707 __is_nothrow_constructible.
708 (is_nothrow_assignable_v, is_nothrow_copy_assignable_v)
709 (is_nothrow_move_assignable_v): Define using
710 __is_nothrow_assignable.
712 2022-09-02 Patrick Palka <ppalka@redhat.com>
714 * include/std/type_traits (__or_, __and_, __not_): Redefine as a
715 class template instead of as an alias template.
716 * testsuite/20_util/logical_traits/requirements/short_circuit.cc:
717 Add more tests for conjunction and disjunction. Add corresponding
718 tests for __and_ and __or_.
720 2022-09-01 Jonathan Wakely <jwakely@redhat.com>
722 * include/std/ranges (adjacent_transform_view::_Iterator): Add
723 typename keyword before dependent qualified-id.
725 2022-09-01 Jonathan Wakely <jwakely@redhat.com>
727 * include/std/type_traits (__is_referenceable): Remove.
728 (__add_lvalue_reference_helper, __add_rvalue_reference_helper):
729 Use __void_t instead of __is_referenceable.
730 (__add_pointer_helper): Likewise.
731 (add_pointer): Add partial specializations for reference types.
733 2022-09-01 Jonathan Wakely <jwakely@redhat.com>
735 * include/std/type_traits (__is_constructible_impl): Replace
736 class template with alias template.
737 (is_default_constructible, is_nothrow_constructible)
738 (is_nothrow_constructible): Simplify base-specifier.
739 (__is_copy_constructible_impl, __is_move_constructible_impl)
740 (__is_nothrow_copy_constructible_impl)
741 (__is_nothrow_move_constructible_impl): Remove class templates.
742 (is_copy_constructible, is_move_constructible)
743 (is_nothrow_constructible, is_nothrow_default_constructible)
744 (is_nothrow_copy_constructible, is_nothrow_move_constructible):
745 Adjust base-specifiers to use __is_constructible_impl.
746 (__is_copy_assignable_impl, __is_move_assignable_impl)
747 (__is_nt_copy_assignable_impl, __is_nt_move_assignable_impl):
748 Remove class templates.
749 (__is_assignable_impl): New alias template.
750 (is_assignable, is_copy_assignable, is_move_assignable):
751 Adjust base-specifiers to use new alias template.
752 (is_nothrow_copy_assignable, is_nothrow_move_assignable):
753 Adjust base-specifiers to use existing alias template.
754 (__is_trivially_constructible_impl): New alias template.
755 (is_trivially_constructible, is_trivially_default_constructible)
756 (is_trivially_copy_constructible)
757 (is_trivially_move_constructible): Adjust base-specifiers to use
759 (__is_trivially_assignable_impl): New alias template.
760 (is_trivially_assignable, is_trivially_copy_assignable)
761 (is_trivially_move_assignable): Adjust base-specifier to use
763 (__add_lval_ref_t, __add_rval_ref_t): New alias templates.
764 (add_lvalue_reference, add_rvalue_reference): Use new alias
767 2022-09-01 Jonathan Wakely <jwakely@redhat.com>
769 * include/std/type_traits (__decay_selector): Add partial
770 specializations for array types. Only check for function types
771 when not dealing with an array.
772 (decay): Add partial specializations for reference types.
774 2022-09-01 Jonathan Wakely <jwakely@redhat.com>
776 * include/std/type_traits (is_lvalue_reference_v)
777 (is_rvalue_reference_v, is_reference_v, is_const_v)
778 (is_volatile_v): Define using partial specializations instead
779 of instantiating class templates.
781 2022-09-01 Jonathan Wakely <jwakely@redhat.com>
783 * include/std/type_traits (is_enum_v, is_class_v, is_union_v)
784 (is_empty_v, is_polymoprhic_v, is_abstract_v, is_final_v)
785 (is_base_of_v, is_aggregate_v): Use built-in directly instead of
786 instantiating class template.
788 2022-09-01 Jonathan Wakely <jwakely@redhat.com>
790 * include/std/type_traits (is_scoped_enum): Remove workaround.
792 2022-09-01 Patrick Palka <ppalka@redhat.com>
794 * include/std/ranges (__detail::__unarize): Define.
795 (adjacent_view::_Iterator): Befriend adjacent_transform_view.
796 (adjacent_transform_view): Define.
797 (adjacent_transform_view::_Iterator): Define.
798 (adjacent_transform_view::_Sentinel): Define.
799 (views::__detail::__can_adjacent_transform_view): Define.
800 (views::_AdjacentTransform): Define.
801 (views::adjacent_transform): Define.
802 (views::pairwise_transform): Define.
803 * testsuite/std/ranges/adaptors/adjacent_transform/1.cc: New test.
805 2022-09-01 Jonathan Wakely <jwakely@redhat.com>
807 * include/std/type_traits (__is_array_known_bounds): Add partial
808 specialization instead of using std::extent.
809 (__is_array_unknown_bounds): Likewise.
810 (extent): Add partial specializations to stop recursion after
812 (is_array_v): Add partial specializations instead of
813 instantiating the class template.
814 (rank_v, extent_v): Likewise.
815 (is_bounded_array_v, is_unbounded_array_v): Likewise.
816 (is_bounded_array, is_unbounded_array): Define in terms of the
819 2022-08-31 Patrick Palka <ppalka@redhat.com>
821 * include/bits/ranges_base.h (__advance_fn::operator()): Add
822 parentheses in assert condition to avoid -Wparentheses warning.
823 * include/std/ranges: (take_view::take_view): Uglify 'base'.
824 (take_while_view::take_while_view): Likewise.
825 (elements_view::elements_view): Likewise.
826 (views::_Zip::operator()): Adjust position of [[nodiscard]] for
827 compatibility with -fconcepts-ts.
828 (zip_transform_view::_Sentinel): Uglify 'OtherConst'.
829 (views::_ZipTransform::operator()): Adjust position of
830 [[nodiscard]] for compatibilty with -fconcepts-ts.
832 2022-08-31 Martin Liska <mliska@suse.cz>
834 * configure: Regenerate.
835 * crossconfig.m4: Remove deprecated ports.
837 2022-08-31 François Dumont <fdumont@gcc.gnu.org>
839 * include/debug/debug.h: Use nullptr rather than '0' in checks in post-C++11.
840 * include/debug/string: Likewise.
841 * testsuite/21_strings/basic_string/operations/ends_with/char.cc: Use __gnu_test::string.
842 * testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc: Likewise.
843 * testsuite/21_strings/basic_string/operations/ends_with/wchar_t.cc: Likewise.
844 * testsuite/21_strings/basic_string/operations/starts_with/wchar_t.cc: Likewise.
845 * testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc: Likewise.
846 * testsuite/21_strings/basic_string/operations/starts_with/char.cc: Likewise..
848 2022-08-31 Patrick Palka <ppalka@redhat.com>
850 * include/std/ranges (adjacent_view): Define.
851 (enable_borrowed_range<adjacent_view>): Define.
852 (__detail::__repeated_tuple): Define.
853 (adjacent_view::_Iterator): Define.
854 (adjacent_view::_Sentinel): Define.
855 (views::__detail::__can_adjacent_view): Define.
856 (views::_Adjacent): Define.
857 (views::adjacent): Define.
858 (views::pairwise): Define.
859 * testsuite/std/ranges/adaptors/adjacent/1.cc: New test.
861 2022-08-31 François Dumont <fdumont@gcc.gnu.org>
863 * include/debug/formatter.h
864 [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_state): Declare.
865 [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_create_state): Declare.
866 [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_callback): Define.
867 [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_error_callback): Define.
868 [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full_func): Define.
869 [_GLIBCXX_HAVE_STACKTRACE](__glibcxx_backtrace_full): Declare.
870 [_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_state): New.
871 [_GLIBCXX_HAVE_STACKTRACE](_Error_formatter::_M_backtrace_full): New.
872 * src/c++11/debug.cc [_GLIBCXX_HAVE_STACKTRACE](print_backtrace): New.
873 (_Error_formatter::_M_error()): Adapt.
874 * src/libbacktrace/Makefile.am: Add backtrace.c.
875 * src/libbacktrace/Makefile.in: Regenerate.
876 * src/libbacktrace/backtrace-rename.h (backtrace_full): New.
877 * testsuite/23_containers/vector/debug/assign4_backtrace_neg.cc: New test.
878 * doc/xml/manual/debug_mode.xml: Document _GLIBCXX_DEBUG_BACKTRACE.
879 * doc/xml/manual/using.xml: Likewise.
881 2022-08-31 Patrick Palka <ppalka@redhat.com>
883 * testsuite/20_util/logical_traits/requirements/short_circuit.cc: New test.
885 2022-08-31 Jonathan Wakely <jwakely@redhat.com>
887 * include/bits/refwrap.h (reference_wrapper::operator()): Add
888 noexcept-specifier and use __invoke_result instead of result_of.
889 * testsuite/20_util/reference_wrapper/invoke-noexcept.cc: New test.
891 2022-08-31 Jonathan Wakely <jwakely@redhat.com>
893 * testsuite/20_util/reference_wrapper/invoke-2.cc: Improve
895 * testsuite/20_util/reference_wrapper/invoke-3.cc: Likewise.
896 * testsuite/20_util/reference_wrapper/invoke.cc: Likewise.
898 2022-08-31 Jonathan Wakely <jwakely@redhat.com>
900 * include/bits/basic_string.h (basic_string): Add nodiscard
901 attribute to all relevant functions.
902 * include/std/string_view (basic_string_view): Likewise.
903 * testsuite/21_strings/basic_string/capacity/1.cc: Cast unused
905 * testsuite/21_strings/basic_string/capacity/char/1.cc:
907 * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
909 * testsuite/21_strings/basic_string/cons/char/self_move.cc:
911 * testsuite/21_strings/basic_string/element_access/char/1.cc:
913 * testsuite/21_strings/basic_string/element_access/char/21674.cc:
915 * testsuite/21_strings/basic_string/element_access/wchar_t/1.cc:
917 * testsuite/21_strings/basic_string/element_access/wchar_t/21674.cc:
919 * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
920 * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
921 * testsuite/21_strings/basic_string/operations/contains/nonnull.cc:
922 Add -Wno-unused-result to options.
923 * testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc:
925 * testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc:
927 * testsuite/21_strings/basic_string/operators/char/1.cc: Cast
928 unused results to void.
929 * testsuite/21_strings/basic_string/operators/wchar_t/1.cc:
931 * testsuite/21_strings/basic_string_view/capacity/1.cc:
933 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
935 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
937 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
939 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
941 * testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc:
943 Add -Wno-unused-result to options.
944 * testsuite/21_strings/basic_string_view/operations/ends_with/nonnull.cc:
946 * testsuite/21_strings/basic_string_view/operations/starts_with/nonnull.cc:
948 * testsuite/27_io/basic_stringbuf/sputbackc/char/1.cc: Cast
949 unused results to void.
950 * testsuite/27_io/basic_stringbuf/sputbackc/wchar_t/1.cc:
952 * testsuite/27_io/basic_stringbuf/sungetc/char/1.cc: Likewise.
953 * testsuite/27_io/basic_stringbuf/sungetc/wchar_t/1.cc:
956 2022-08-27 Patrick Palka <ppalka@redhat.com>
958 * testsuite/20_util/logical_traits/requirements/base_classes.cc: New test.
960 2022-08-26 Patrick Palka <ppalka@redhat.com>
962 * include/std/ranges (zip_view::_Iterator::operator<): Remove
964 (zip_view::_Iterator::operator>): Likewise.
965 (zip_view::_Iterator::operator<=): Likewise.
966 (zip_view::_Iterator::operator>=): Likewise.
967 (zip_view::_Iterator::operator<=>): Remove three_way_comparable
968 constraint as per LWG 3692.
969 (zip_transform_view::_Iterator): Ditto as per LWG 3702.
971 2022-08-26 Patrick Palka <ppalka@redhat.com>
973 * include/std/ranges (zip_view::_Iterator): Befriend
975 (__detail::__range_iter_cat): Define.
976 (zip_transform_view): Define.
977 (zip_transform_view::_Iterator): Define.
978 (zip_transform_view::_Sentinel): Define.
979 (views::__detail::__can_zip_transform_view): Define.
980 (views::_ZipTransform): Define.
981 (views::zip_transform): Define.
982 * testsuite/std/ranges/zip_transform/1.cc: New test.
984 2022-08-26 Patrick Palka <ppalka@redhat.com>
986 * include/std/type_traits (enable_if, __enable_if_t): Define them
988 (__detail::__first_t): Define.
989 (__detail::__or_fn, __detail::__and_fn): Declare.
990 (__or_, __and_): Redefine as alias templates in terms of __or_fn
992 (__not_): Redefine as an alias template.
993 (__detail::__disjunction_impl, __detail::__conjunction_impl):
995 (conjuction, disjunction): Redefine in terms of __disjunction_impl
996 and __conjunction_impl.
998 2022-08-26 Jonathan Wakely <jwakely@redhat.com>
1000 * include/std/system_error (error_code::_Check): New alias
1001 template for constructor SFINAE constraint.
1002 (error_code::error_code(ErrorCodeEnum)): Use it.
1003 (error_code::operator=(ErrorCodeEnum)): Remove.
1004 (error_condition::_Check): New alias template for constraint.
1005 (error_condition::error_condition(ErrorConditionEnum)): Use it.
1006 (error_condition::operator=(ErrorConditionEnum)): Remove.
1007 * testsuite/19_diagnostics/error_code/cons/1.cc: Check
1008 constructor taking user-defined error enum.
1009 * testsuite/19_diagnostics/error_condition/cons/1.cc: Likewise.
1011 2022-08-26 Jonathan Wakely <jwakely@redhat.com>
1013 * include/bits/basic_string.h (starts_with, ends_with, contains):
1014 Add nonnull attribute.
1015 * include/bits/cow_string.h (starts_with, ends_with, contains):
1017 * include/std/string_view (starts_with, ends_with, contains):
1019 * testsuite/21_strings/basic_string/operations/contains/nonnull.cc
1020 * testsuite/21_strings/basic_string/operations/ends_with/nonnull.cc
1021 * testsuite/21_strings/basic_string/operations/starts_with/nonnull.cc
1022 * testsuite/21_strings/basic_string_view/operations/contains/nonnull.cc
1023 * testsuite/21_strings/basic_string_view/operations/ends_with/nonnull.cc
1024 * testsuite/21_strings/basic_string_view/operations/starts_with/nonnull.cc
1026 2022-08-25 Patrick Palka <ppalka@redhat.com>
1028 * include/std/ranges (lazy_split_view::_OuterIter::_M_current):
1029 Remove redundant comment.
1030 (lazy_split_view::_M_current): Likewise.
1031 (common_view::common_view): Remove commented out view-converting
1032 constructor as per LWG3405.
1033 (elements_view::_Iterator::_Iterator): Uglify 'current' and 'i'.
1035 2022-08-24 Patrick Palka <ppalka@redhat.com>
1037 * include/bits/ranges_algo.h (__min_fn, min): Move to ...
1038 * include/bits/ranges_util.h: ... here, in order to avoid
1039 including all of ranges_algo.h from <ranges>.
1040 * include/std/ranges (__detail::__zip_is_common): Define for
1041 C++23 as per P2321R2.
1042 (__detail::__tuple_or_pair): Likewise.
1043 (__detail::__tuple_or_pair_t): Likewise.
1044 (__detail::__tuple_transform): Likewise.
1045 (__detail::__tuple_for_each): Likewise.
1046 (zip_view): Likewise.
1047 (enable_borrowed_range<zip_view>): Likewise.
1048 (__detail::__all_random_access): Likewise.
1049 (__detail::__all_bidirectional): Likewise.
1050 (__detail::__all_forward): Likewise.
1051 (__detail::__zip_view_iter_cat): Likewise.
1052 (zip_view::_Iterator): Likewise.
1053 (zip_view::_Sentinel): Likewise.
1054 * testsuite/std/ranges/zip/1.cc: New test.
1056 2022-08-24 Jonathan Wakely <jwakely@redhat.com>
1059 2022-08-24 Will Hawkins <whh8b@obs.cr>
1061 * include/bits/basic_string.h (operator+(const string&, const char*)):
1062 Remove naive implementation.
1063 * include/bits/basic_string.tcc (operator+(const string&, const char*)):
1064 Add single-allocation implementation.
1066 2022-08-24 Patrick Palka <ppalka@redhat.com>
1068 * include/bits/stl_pair.h (pair::swap const): Add non-standard
1069 is_swappable_v constraints.
1070 * include/std/tuple (tuple::swap const): Likewise.
1071 * testsuite/20_util/tuple/cons/noexcept_specs.cc: Correct some
1072 asserts in C++23 mode.
1074 2022-08-24 Jonathan Wakely <jwakely@redhat.com>
1076 * include/bits/stl_algo.h (__stable_sort): Cast size to
1077 iterator's difference type.
1078 * testsuite/25_algorithms/stable_sort/4.cc: New test.
1080 2022-08-24 Will Hawkins <whh8b@obs.cr>
1082 * include/bits/basic_string.h (operator+(const string&, const char*)):
1083 Remove naive implementation.
1084 * include/bits/basic_string.tcc (operator+(const string&, const char*)):
1085 Add single-allocation implementation.
1087 2022-08-24 Jonathan Wakely <jwakely@redhat.com>
1089 * testsuite/20_util/duration_cast/rounding.cc: Check abs with
1090 non-reduced duration.
1092 2022-08-23 Patrick Palka <ppalka@redhat.com>
1094 * include/bits/stl_bvector.h (_Bit_reference::operator=): Define
1095 const overload for C++23 as per P2321R2.
1096 * include/bits/stl_pair.h (pair::swap): Likewise.
1097 (pair::pair): Define additional converting constructors for
1098 C++23 as per P2321R2.
1099 (pair::operator=): Define const overloads for C++23 as per
1101 (swap): Define overload taking const pair& for C++23 as per
1103 (basic_common_reference): Define partial specialization for
1104 pair for C++23 as per P2321R2.
1105 (common_type): Likewise.
1106 * include/bits/uses_allocator_args.h
1107 (uses_allocator_construction_args): Define additional pair
1108 overloads for C++23 as per P2321R2.
1109 * include/std/tuple (_Tuple_impl::_Tuple_impl): Define
1110 additional converting constructors for C++23 as per P2321R2.
1111 (_Tuple_impl::_M_assign): Define const overloads for C++23
1113 (_Tuple_impl::_M_swap): Likewise.
1114 (tuple::__constructible): Define as a convenient renaming of
1115 _TCC<true>::__constructible.
1116 (tuple::__convertible): As above but for _TCC<true>::__convertible.
1117 (tuple::tuple): Define additional converting constructors for
1118 C++23 as per P2321R2.
1119 (tuple::operator=): Define const overloads for C++23 as per
1121 (tuple::swap): Likewise.
1122 (basic_common_reference): Define partial specialization for
1123 tuple for C++23 as per P2321R2.
1124 (common_type): Likewise.
1125 * testsuite/20_util/pair/p2321r2.cc: New test.
1126 * testsuite/20_util/tuple/p2321r2.cc: New test.
1127 * testsuite/23_containers/vector/bool/element_access/1.cc: New test.
1129 2022-08-23 Patrick Palka <ppalka@redhat.com>
1131 * include/std/tuple (_TupleConstraints::__convertible): Define.
1132 (_TupleConstraints::__constructible): Define.
1133 (_TupleConstraints::__is_explicitly_constructible): Redefine this
1134 in terms of __convertible and __constructible.
1135 (_TupleConstraints::__is_implicitly_constructible): Likewise.
1137 2022-08-23 Jonathan Wakely <jwakely@redhat.com>
1140 * include/std/variant (__do_visit): Handle is_void<R> for zero
1142 * testsuite/20_util/variant/visit_r.cc: Check std::visit<void>(v).
1144 2022-08-22 Jonathan Wakely <jwakely@redhat.com>
1147 * doc/xml/manual/using.xml: Document -lstdc++_libbacktrace
1148 requirement for using std::stacktrace. Also adjust -frtti and
1149 -fexceptions to document non-default (i.e. negative) forms.
1150 * doc/html/*: Regenerate.
1152 2022-08-22 Jonathan Wakely <jwakely@redhat.com>
1155 * include/bits/std_thread.h (thread::_State_impl): Forward
1156 individual arguments to _Invoker constructor.
1157 (thread::_Invoker): Add constructor. Delete copies.
1158 * include/std/future (__future_base::_Deferred_state): Forward
1159 individual arguments to _Invoker constructor.
1160 (__future_base::_Async_state_impl): Likewise.
1161 * testsuite/30_threads/async/106695.cc: New test.
1162 * testsuite/30_threads/thread/106695.cc: New test.
1164 2022-08-22 Jonathan Wakely <jwakely@redhat.com>
1167 * include/bits/regex_compiler.tcc (_Compiler::_M_cur_int_value):
1168 Use built-ins to check for integer overflow in back-reference
1170 * testsuite/28_regex/basic_regex/106607.cc: New test.
1172 2022-08-17 Keef Aragon <keef.aragon@konscious.net>
1174 * libsupc++/eh_alloc.cc (pool::free): Inverse comparison.
1176 2022-08-08 François Dumont <fdumont@gcc.gnu.org>
1178 * include/debug/formatter.h (__singular_value_init): New _Iterator_state enum entry.
1179 (_Parameter<>(const _Safe_iterator<>&, const char*, _Is_iterator)): Check if iterator
1180 parameter is value-initialized.
1181 (_Parameter<>(const _Safe_local_iterator<>&, const char*, _Is_iterator)): Likewise.
1182 * include/debug/safe_iterator.h (_Safe_iterator<>::_M_value_initialized()): New. Adapt
1184 * include/debug/safe_local_iterator.h (_Safe_local_iterator<>::_M_value_initialized()): New.
1186 * src/c++11/debug.cc (_Safe_iterator_base::_M_reset): Do not reset _M_version.
1187 (print_field(PrintContext&, const _Parameter&, const char*)): Adapt state_names.
1188 * testsuite/23_containers/deque/debug/iterator1_neg.cc: New test.
1189 * testsuite/23_containers/deque/debug/iterator2_neg.cc: New test.
1190 * testsuite/23_containers/forward_list/debug/iterator1_neg.cc: New test.
1191 * testsuite/23_containers/forward_list/debug/iterator2_neg.cc: New test.
1192 * testsuite/23_containers/forward_list/debug/iterator3_neg.cc: New test.
1194 2022-08-05 Jonathan Wakely <jwakely@redhat.com>
1196 * include/experimental/scope (__cpp_lib_experimental_scope):
1198 * testsuite/experimental/scopeguard/uniqueres.cc: Check macro.
1200 2022-08-05 Jonathan Wakely <jwakely@redhat.com>
1202 * include/Makefile.am: Add new header.
1203 * include/Makefile.in: Regenerate.
1204 * include/experimental/scope: New file.
1205 * testsuite/experimental/scopeguard/uniqueres.cc: New test.
1206 * testsuite/experimental/scopeguard/exit.cc: New test.
1208 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
1210 * include/std/string_view (basic_string_view(Range&&)): Add
1211 explicit as per P2499R0.
1212 * testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc:
1213 Adjust implicit conversions. Check implicit conversions fail.
1214 * testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc:
1217 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
1219 * include/bits/fs_dir.h (directory_iterator): Add comparison
1220 with std::default_sentinel_t. Remove redundant operator!= for
1222 * (recursive_directory_iterator): Likewise.
1223 * include/bits/iterator_concepts.h [!__cpp_lib_concepts]
1224 (default_sentinel_t, default_sentinel): Define even if concepts
1226 * include/bits/regex.h (regex_iterator): Add comparison with
1227 std::default_sentinel_t. Remove redundant operator!= for C++20.
1228 (regex_token_iterator): Likewise.
1229 (regex_token_iterator::_M_end_of_seq()): Add noexcept.
1230 * testsuite/27_io/filesystem/iterators/lwg3719.cc: New test.
1231 * testsuite/28_regex/iterators/regex_iterator/lwg3719.cc:
1233 * testsuite/28_regex/iterators/regex_token_iterator/lwg3719.cc:
1236 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
1238 * include/std/expected (unexpected::_M_val): Rename to _M_unex.
1239 (bad_expected_access::_M_val): Likewise.
1241 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
1243 * include/bits/ios_base.h (__cpp_lib_ios_noreplace): Update
1245 * include/std/version (__cpp_lib_ios_noreplace): Likewise.
1246 * testsuite/27_io/basic_ofstream/open/char/noreplace.cc: Check
1248 * testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc:
1251 2022-08-04 Jonathan Wakely <jwakely@redhat.com>
1254 * include/bits/atomic_wait.h (__waiter_pool_base::_M_notify):
1255 Move increment of _M_ver here.
1256 [!_GLIBCXX_HAVE_PLATFORM_WAIT]: Lock mutex around increment.
1257 Use relaxed memory order and always notify all waiters.
1258 (__waiter_base::_M_do_wait) [!_GLIBCXX_HAVE_PLATFORM_WAIT]:
1259 Check value again after locking mutex.
1260 (__waiter_base::_M_notify): Remove increment of _M_ver.
1262 2022-08-04 Ulrich Drepper <drepper@gmail.com>
1264 * python/libstdcxx/v6/printers.py (class StdTuplePrinter): Use
1265 zero-based indeces just like std:get takes.
1267 2022-07-29 Jonathan Wakely <jwakely@redhat.com>
1270 * include/bits/stl_iterator.h (common_iterator::operator->):
1271 Change return type to just auto.
1273 2022-07-26 Thomas Rodgers <trodgers@redhat.com>
1275 * include/bits/atomic_wait.h (__atomic_spin): Merge spin loops.
1277 2022-07-20 Jonathan Wakely <jwakely@redhat.com>
1280 * include/bits/stl_iterator.h (common_iterator): Define
1281 destructor, copy constructor and move constructor as trivial
1282 when the underlying types allow.
1283 * testsuite/24_iterators/common_iterator/100823.cc: Check
1284 triviality of special members.
1286 2022-07-20 Jonathan Wakely <jwakely@redhat.com>
1289 * include/bits/stl_iterator.h (common_iterator): Define move
1290 constructor and move assignment operator.
1291 (common_iterator::_M_assign): New function implementing
1293 (common_iterator::operator=): Use _M_assign.
1294 (common_iterator::_S_valueless): New constant.
1295 * testsuite/24_iterators/common_iterator/100823.cc: New test.
1297 2022-07-20 Jonathan Wakely <jwakely@redhat.com>
1299 * include/bits/stl_iterator.h (common_iterator): Fix incorrect
1300 uses of is_nothrow_assignable_v. Fix inconsistent constraints on
1301 friend declaration. Do not move argument in copy constructor.
1302 * testsuite/24_iterators/common_iterator/1.cc: Check for
1303 noexcept constructibnle/assignable.
1305 2022-07-19 François Dumont <fdumont@gcc.gnu.org>
1307 * include/debug/debug.h [_GLIBCXX_DEBUG](__glibcxx_requires_string): Define
1308 using _GLIBCXX_DEBUG_PEDASSERT.
1309 [_GLIBCXX_DEBUG](__glibcxx_requires_string_len): Likewise.
1310 * include/debug/macros.h
1311 (__glibcxx_check_string, __glibcxx_check_string_len): Move...
1312 * include/debug/string
1313 (__glibcxx_check_string, __glibcxx_check_string_len): ...here. And define depending
1314 on _GLIBCXX_DEBUG_PEDANTIC no matter if _GLIBCXX_DEBUG is defined.
1315 Add using of std::string find, rfind, find_first_of, find_last_of, find_first_not_of
1316 and find_last_not_of. Remove debug implementations having no debug assertion.
1317 * testsuite/util/testsuite_string.h: New file. Provides __gnu_test::string and
1318 __gnu_test::wtring which definition depends on _GLIBCXX_DEBUG.
1319 * testsuite/21_strings/basic_string/debug/find1_neg.cc: New test case.
1320 * testsuite/21_strings/basic_string/debug/find2_neg.cc: New test case.
1321 * testsuite/21_strings/basic_string/operations/find/char/1.cc:
1322 Include <testsuite_string.h> and use __gnu_test::string.
1323 * testsuite/21_strings/basic_string/operations/find/char/2.cc: Likewise.
1324 * testsuite/21_strings/basic_string/operations/find/char/3.cc: Likewise.
1325 * testsuite/21_strings/basic_string/operations/find/char/4.cc: Likewise.
1326 * testsuite/21_strings/basic_string/operations/find/char/5.cc: Likewise.
1327 * testsuite/21_strings/basic_string/operations/find/char/6.cc: Likewise.
1328 * testsuite/21_strings/basic_string/operations/find/wchar_t/1.cc:
1329 Include <testsuite_string.h> and use __gnu_test::wstring.
1330 * testsuite/21_strings/basic_string/operations/find/wchar_t/2.cc: Likewise.
1331 * testsuite/21_strings/basic_string/operations/find/wchar_t/3.cc: Likewise.
1332 * testsuite/21_strings/basic_string/operations/find/wchar_t/4.cc: Likewise.
1333 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc: Likewise.
1334 * testsuite/21_strings/basic_string/operations/find/wchar_t/6.cc: Likewise.
1336 2022-07-19 Jonathan Wakely <jwakely@redhat.com>
1338 * include/std/type_traits (__cpp_lib_reference_from_temporary)
1339 (reference_constructs_from_temporary)
1340 (reference_converts_from_temporary): Only define when the
1341 built-ins are available.
1343 2022-07-19 Marco Falke <falke.marco@gmail.com>
1345 * include/std/charconv (__from_chars_alnum_to_val): Replace
1346 implicit conversion from int to unsigned char with explicit
1349 2022-07-19 Sebastian Huber <sebastian.huber@embedded-brains.de>
1351 * configure: Regnerate.
1352 * configure.ac (newlib, *-rtems*): Remove HAVE_POLL.
1354 2022-07-18 François Dumont <fdumont@gcc.gnu.org>
1356 * include/bits/stl_algo.h
1357 (__merge_adaptive): Adapt to merge only when buffer is large enough..
1358 (__merge_adaptive_resize): New, adapt merge when buffer is too small.
1359 (__inplace_merge): Adapt, use latter.
1360 (__stable_sort_adaptive): Adapt to sort only when buffer is large enough.
1361 (__stable_sort_adaptive_resize): New, adapt sort when buffer is too small.
1362 (__stable_sort): Adapt, use latter.
1364 2022-07-15 Marek Polacek <polacek@redhat.com>
1367 * include/std/type_traits (reference_constructs_from_temporary,
1368 reference_converts_from_temporary): New class templates.
1369 (reference_constructs_from_temporary_v,
1370 reference_converts_from_temporary_v): New variable templates.
1371 (__cpp_lib_reference_from_temporary): Define for C++23.
1372 * include/std/version (__cpp_lib_reference_from_temporary): Define for
1374 * testsuite/20_util/variable_templates_for_traits.cc: Test
1375 reference_constructs_from_temporary_v and
1376 reference_converts_from_temporary_v.
1377 * testsuite/20_util/reference_from_temporary/value.cc: New test.
1378 * testsuite/20_util/reference_from_temporary/value2.cc: New test.
1379 * testsuite/20_util/reference_from_temporary/version.cc: New test.
1381 2022-07-12 Jonathan Wakely <jwakely@redhat.com>
1384 * include/std/istream [C++17] (operator>>(istream&, char*)):
1385 Set eofbit if we stopped extracting at EOF.
1386 * testsuite/27_io/basic_istream/extractors_character/char/pr106248.cc:
1388 * testsuite/27_io/basic_istream/extractors_character/wchar_t/pr106248.cc:
1391 2022-07-12 Jonathan Wakely <jwakely@redhat.com>
1393 * include/bits/stl_iterator.h (__iter_to_alloc_t): Replace
1394 add_const_t with const-qualifier.
1395 * include/bits/utility.h (tuple_element<N, cv T>): Likewise for
1397 * include/std/type_traits (add_const, add_volatile): Replace
1398 typedef-declaration with using-declaration.
1399 (add_cv): Replace add_const and add_volatile with cv-qualifiers.
1400 * include/std/variant (variant_alternative<N, cv T>): Replace
1401 add_const_t, add_volatile_t and add_cv_t etc. with cv-qualifiers.
1403 2022-07-09 François Dumont <fdumont@gcc.gnu.org>
1405 * include/std/string: Remove obsolete comment about char_traits.h including
1408 2022-07-07 Jonathan Wakely <jwakely@redhat.com>
1411 * include/bits/char_traits.h (__gnu_cxx::char_traits::move):
1412 Remove workaround for front-end bug.
1414 2022-07-05 Alexandre Oliva <oliva@adacore.com>
1416 * testsuite/util/testsuite_fs.h (nonexistent_path): Explain
1417 why we need the typecast.
1419 2022-07-05 Alexandre Oliva <oliva@adacore.com>
1421 * testsuite/util/testsuite_fs.h (nonexistent_path): Convert
1422 the getpid result to an integral type.
1424 2022-07-01 Jonathan Wakely <jwakely@redhat.com>
1427 * include/Makefile.am (largefile-config.h): Add
1428 stamp-${host_alias} prerequisite.
1429 * include/Makefile.in: Regenerate.
1431 2022-07-01 Jonathan Wakely <jwakely@redhat.com>
1433 * include/bits/fs_ops.h: Add nodiscard to all pure functions.
1434 * include/experimental/bits/fs_ops.h: Likewise.
1435 * testsuite/27_io/filesystem/operations/all.cc: Do not discard
1436 results of absolute and canonical.
1437 * testsuite/27_io/filesystem/operations/absolute.cc: Cast
1438 discarded result to void.
1439 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
1440 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
1441 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
1442 * testsuite/27_io/filesystem/operations/read_symlink.cc:
1444 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
1445 * testsuite/27_io/filesystem/operations/symlink_status.cc:
1447 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
1449 * testsuite/experimental/filesystem/operations/canonical.cc:
1451 * testsuite/experimental/filesystem/operations/exists.cc:
1453 * testsuite/experimental/filesystem/operations/is_empty.cc:
1455 * testsuite/experimental/filesystem/operations/read_symlink.cc:
1457 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1460 2022-07-01 Sebastian Huber <sebastian.huber@embedded-brains.de>
1462 * configure: Regnerate.
1463 * configure.ac (newlib, *-rtems*): Enable TLS support for all RTEMS
1464 targets except bfin, lm32, mips, moxie, or1k, and v850.
1465 For all RTEMS targets, define HAVE_ALIGNED_ALLOC, HAVE_AT_QUICK_EXIT,
1466 HAVE_LINK, HAVE_POLL, HAVE_QUICK_EXIT, HAVE_READLINK, HAVE_SETENV,
1467 HAVE_SLEEP, HAVE_SOCKATMARK, HAVE_STRERROR_L, HAVE_SYMLINK,
1468 HAVE_TRUNCATE, and HAVE_USLEEP.
1469 * crossconfig.m4 (*-rtems*): Remove.
1471 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
1473 * include/bits/utility.h: Fix comment typos.
1475 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
1477 * src/c++17/fs_ops.cc (fs::temp_directory_path()): Include path
1479 (fs::temp_directory_path(error_code&)): Rearrange to more
1480 closely match the structure of the first overload.
1481 * src/filesystem/ops.cc (fs::temp_directory_path): Likewise.
1482 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
1483 Check that exception contains the path.
1484 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1487 2022-06-30 Jonathan Wakely <jwakely@redhat.com>
1490 * src/filesystem/ops.cc (has_trailing_slash): New helper
1492 (fs::status): Strip trailing slashes.
1493 (fs::symlink_status): Likewise.
1494 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
1495 Clean the environment before each test and use TMP instead of
1496 TMPDIR so the test passes on Windows.
1498 2022-06-28 Jonathan Wakely <jwakely@redhat.com>
1500 * src/filesystem/dir-common.h (_Dir_base::_At_path):
1501 Use char_type consistently for paths.
1503 2022-06-28 Jonathan Wakely <jwakely@redhat.com>
1505 * src/c++17/fs_dir.cc (_Dir::dir_and_pathname):: Replace with
1506 current() returning _At_path.
1507 (_Dir::_Dir, _Dir::open_subdir, _Dir::do_unlink): Adjust.
1508 * src/filesystem/dir-common.h (_Dir_base::_At_path): New class.
1509 (_Dir_base::_Dir_Base, _Dir_base::openat): Use _At_path.
1510 * src/filesystem/dir.cc (_Dir::dir_and_pathname): Replace with
1511 current() returning _At_path.
1512 (_Dir::_Dir, _Dir::open_subdir): Adjust.
1514 2022-06-28 Jonathan Wakely <jwakely@redhat.com>
1516 * src/c++17/fs_dir.cc (_Dir::_Dir) [!_GLIBCXX_HAVE_OPENAT]:
1517 Always store pathname if we don't have openat or unlinkat,
1518 because the full path is needed to open sub-directories and
1521 2022-06-28 Jonathan Wakely <jwakely@redhat.com>
1523 * testsuite/20_util/from_chars/4.cc: Only use log2 if C99 math
1524 functions are available.
1526 2022-06-27 Alexandre Oliva <oliva@adacore.com>
1528 * testsuite/20_util/to_chars/long_double.cc: Use cmath
1529 long double overloads for nexttoward and ldexp.
1531 2022-06-27 Alexandre Oliva <oliva@adacore.com>
1533 * testsuite/experimental/simd/standard_abi_usable.cc: Require
1535 * testsuite/experimental/simd/standard_abi_usable_2.cc:
1538 2022-06-27 Alexandre Oliva <oliva@adacore.com>
1540 * testsuite/26_numerics/complex/proj.cc: Skip test in the
1541 circumstances in which the implementation of proj is known to
1544 2022-06-27 Alexandre Oliva <oliva@adacore.com>
1546 * src/c++17/fs_dir.cc (dir_and_pathname): Use dirfd if
1547 _GLIBCXX_HAVE_OPENAT.
1549 2022-06-27 Alexandre Oliva <oliva@adacore.com>
1551 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc
1552 (test06): Don't create symlinks when NO_SYMLINKS is defined.
1554 2022-06-27 Alexandre Oliva <oliva@adacore.com>
1556 * testsuite/lib/dg-options.exp (add_options_for_net_ts):
1557 Add -Wl,--gc-sections for RTEMS targets.
1558 * testsuite/experimental/net/timer/waitable/dest.cc: Link-time
1560 * testsuite/experimental/net/timer/waitable/ops.cc: Likewise.
1561 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
1562 Execution-time xfail on RTEMS.
1563 * testsuite/experimental/net/internet/resolver/ops/reverse.cc:
1566 2022-06-27 Jonathan Wakely <jwakely@redhat.com>
1568 * testsuite/ext/mt_allocator/22309_thread.cc: Include <string>.
1570 2022-06-27 Joel Brobecker <brobecker@adacore.com>
1571 Jonathan Wakely <jwakely@redhat.com>
1573 * testsuite/util/testsuite_fs.h (__gnu_test::nonexistent_path):
1574 Always include a counter in the filename returned.
1576 2022-06-27 Jonathan Wakely <jwakely@redhat.com>
1578 * include/bits/move_only_function.h (_Never_valueless_alt):
1579 Define partial specialization for std::move_only_function.
1581 2022-06-27 Jonathan Wakely <jwakely@redhat.com>
1583 * include/std/variant (_Build_FUN::_S_fun): Define fallback case
1585 (__accepted_index, _Extra_visit_slot_needed): Replace class
1586 templates with variable templates.
1588 2022-06-27 Jonathan Wakely <jwakely@redhat.com>
1590 * include/bits/fs_path.h (__is_path_iter_src): Replace class
1591 template with variable template.
1593 2022-06-27 Jonathan Wakely <jwakely@redhat.com>
1595 * include/bits/chrono.h (is_clock_v): Define to false.
1596 (is_clock_v<T>): Define partial specialization for true cases.
1597 (is_clock): Define in terms of is_clock_v.
1599 2022-06-24 Xi Ruoyao <xry111@xry111.site>
1601 * scripts/extract_symvers.in: Use grep -E instead of egrep.
1602 * scripts/run_doxygen: Likewise.
1604 2022-06-24 Alexandre Oliva <oliva@adacore.com>
1606 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for
1608 * configure, config.h.in: Rebuilt.
1609 * src/filesystem/dir-common.h (openat): Use ::openat if
1610 _GLIBCXX_HAVE_OPENAT.
1611 * src/filesystem/dir.cc (dir_and_pathname): Use dirfd if
1612 _GLIBCXX_HAVE_OPENAT.
1614 2022-06-24 Alexandre Oliva <oliva@adacore.com>
1616 * testsuite/27_io/filesystem/operations/rename.cc: xfail on
1618 * testsuite/experimental/filesystem/operations/rename.cc:
1621 2022-06-24 Alexandre Oliva <oliva@adacore.com>
1623 * testsuite/util/testsuite_fs.h (NO_LAST_WRITE_TIME): Define
1625 * testsuite/lib/libstdc++.exp
1626 (check_v3_target_fs_last_write_time): New.
1627 * testsuite/lib/dg-options.exp (dg-require-target-fs-lwt):
1629 * testsuite/27_io/filesystem/operations/last_write_time.cc:
1630 Skip the test if the features are unavailable.
1631 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1634 2022-06-24 Alexandre Oliva <oliva@adacore.com>
1636 * testsuite/util/testsuite_fs.h (NO_SPACE): Define if
1638 * testsuite/lib/libstdc++.exp (check_v3_target_fs_space): New.
1639 * testsuite/lib/dg-options.exp (dg-require-target-fs-space):
1641 * testsuite/27_io/filesystem/operations/space.cc: Require
1643 * testsuite/experimental/filesystem/operations/space.cc:
1646 2022-06-24 Alexandre Oliva <oliva@adacore.com>
1648 * testsuite/util/testsuite_fs.h (NO_SYMLINKS): Define on
1649 mingw and when create_symlink is a dummy.
1650 * testsuite/27_io/filesystem/operations/symlink_status.cc:
1652 (test01, test02): Don't create symlinks when NO_SYMLINKS is
1654 * testsuite/27_io/filesystem/operations/canonical.cc (test03):
1656 * testsuite/27_io/filesystem/operations/copy.cc (test02):
1658 * testsuite/27_io/filesystem/operations/create_directories.cc
1660 * testsuite/27_io/filesystem/operations/create_directory.cc
1662 * testsuite/27_io/filesystem/operations/permissions.cc
1663 (test03, test04): Likewise.
1664 * testsuite/27_io/filesystem/operations/remove.cc (test01):
1666 * testsuite/27_io/filesystem/operations/remove_all.cc (test01):
1668 * testsuite/27_io/filesystem/operations/rename.cc
1669 (test_symlinks): Likewise.
1670 * testsuite/27_io/filesystem/operations/weakly_canonical.cc
1672 * testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc
1674 * testsuite/experimental/filesystem/operations/copy.cc
1676 * testsuite/experimental/filesystem/operations/create_directories.cc
1678 * testsuite/experimental/filesystem/operations/create_directory.cc
1680 * testsuite/experimental/filesystem/operations/permissions.cc
1681 (test03, test04): Likewise.
1682 * testsuite/experimental/filesystem/operations/remove.cc
1684 * testsuite/experimental/filesystem/operations/remove_all.cc
1686 * testsuite/experimental/filesystem/operations/rename.cc
1688 * testsuite/lib/libstdc++.exp
1689 (v3_check_preprocessor_condition): Add optional inc parameter.
1690 Add it to the test program after include bits/c++config.h.
1691 (check_v3_target_fs_symlinks): New.
1692 * testsuite/lib/dg-options.exp
1693 (dg-require-target-fs-symlinks): New.
1694 * testsuite/27_io/filesystem/operations/read_symlink.cc:
1695 Replace mingw xfail with require target-fs-symlinks.
1696 * testsuite/experimental/filesystem/operations/read_symlink.cc:
1699 2022-06-24 Alexandre Oliva <oliva@adacore.com>
1701 * testsuite/27_io/filesystem/operations/copy.cc (test02):
1702 Select TO after creating FROM.
1703 (test03, test04): Likewise.
1704 * testsuite/experimental/filesystem/operations/copy.cc
1705 (test02, test03, test04): Likewise.
1707 2022-06-24 Alexandre Oliva <oliva@adacore.com>
1709 * testsuite/30_threads/thread/native_handle/cancel.cc: Add an
1710 explicit cancellation point in case sleep_for lacks one.
1712 2022-06-24 Alexandre Oliva <oliva@adacore.com>
1714 * testsuite/lib/dg-options.exp (add_options_for_net_ts): Add
1715 -lbsd for RTEMS targets.
1717 2022-06-23 Jonathan Wakely <jwakely@redhat.com>
1719 * testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
1720 rmdir to remove directories.
1721 * testsuite/experimental/filesystem/iterators/error_reporting.cc:
1724 2022-06-23 Jonathan Wakely <jwakely@redhat.com>
1726 * testsuite/26_numerics/random/random_device/entropy.cc: Use
1727 numeric_limits<unsigned>::digits.
1729 2022-06-22 Alexandre Oliva <oliva@adacore.com>
1731 * libsupc++/eh_globals.cc [!_GLIBCXX_HAVE_TLS]
1732 (__eh_globals_init::~__eh_globals_init): Clear _S_init first.
1734 2022-06-22 Alexandre Oliva <oliva@adacore.com>
1736 * testsuite/30_threads/this_thread/60421.cc (test02): Call
1739 2022-06-22 Alexandre Oliva <oliva@adacore.com>
1741 * testsuite/20_util/to_chars/long_double.cc: Require cmath.
1743 2022-06-22 Alexandre Oliva <oliva@adacore.com>
1745 * testsuite/23_containers/bitset/cons/dr1325-2.cc: Work around
1746 global struct bitset.
1747 * testsuite/23_containers/bitset/ext/15361.cc: Likewise.
1748 * testsuite/23_containers/bitset/input/1.cc: Likewise.
1749 * testsuite/23_containers/bitset/to_string/1.cc: Likewise.
1750 * testsuite/23_containers/bitset/to_string/dr396.cc: Likewise.
1752 2022-06-17 Jonathan Wakely <jwakely@redhat.com>
1754 * testsuite/21_strings/basic_string/cons/char/105995.cc: Add
1757 2022-06-16 Jonathan Wakely <jwakely@redhat.com>
1760 * include/bits/basic_string.h (_M_use_local_data): Initialize
1761 the entire SSO buffer.
1762 * testsuite/21_strings/basic_string/cons/char/105995.cc: New test.
1764 2022-06-16 Jonathan Wakely <jwakely@redhat.com>
1767 * include/ext/vstring.h (operator==): Always check lengths
1770 2022-06-15 François Dumont <fdumont@gcc.gnu.org>
1773 * include/bits/hashtable_policy.h (_ConvertToValueType): New.
1774 * include/bits/hashtable.h (_Hashtable<>::_M_insert_unique_aux): New.
1775 (_Hashtable<>::_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Use latters.
1776 (_Hashtable<>::_M_insert(_Arg&&, const _NodeGenerator&, false_type)): Likewise.
1777 (_Hashtable(_InputIterator, _InputIterator, size_type, const _Hash&, const _Equal&,
1778 const allocator_type&, true_type)): Use this.insert range.
1779 (_Hashtable(_InputIterator, _InputIterator, size_type, const _Hash&, const _Equal&,
1780 const allocator_type&, false_type)): Use _M_insert.
1781 * testsuite/23_containers/unordered_map/cons/56112.cc: Check how many times conversion
1783 * testsuite/23_containers/unordered_map/insert/105717.cc: New test.
1784 * testsuite/23_containers/unordered_set/insert/105717.cc: New test.
1786 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
1789 * include/bits/basic_string.h (operator==): Always compare
1790 lengths before checking string contents.
1791 [!__cpp_lib_three_way_comparison] (operator==, operator!=):
1794 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
1797 * include/bits/basic_string.h (compare): Define inline.
1798 * include/bits/basic_string.tcc (compare): Remove out-of-line
1800 * include/bits/cow_string.h (compare): Define inline.
1801 * testsuite/21_strings/basic_string/operations/compare/char/3.cc:
1804 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
1806 * include/bits/new_allocator.h: Fix indentation.
1807 * include/ext/malloc_allocator.h: Likewise.
1809 2022-06-14 Jonathan Wakely <jwakely@redhat.com>
1812 * include/bits/allocator.h (allocator::allocate): Check for
1813 overflow in constexpr allocation.
1814 * testsuite/20_util/allocator/105975.cc: New test.
1816 2022-06-13 Mark Mentovai <mark@mentovai.com>
1818 * include/experimental/bits/fs_path.h (__detail::__null_terminated):
1819 Rename to __nul_terminated to avoid colliding with a macro in
1822 2022-06-13 Jonathan Wakely <jwakely@redhat.com>
1824 * include/std/atomic (__atomic_val_t): Use __type_identity_t
1825 instead of atomic<T>::value_type, as per LWG 3220.
1826 * testsuite/29_atomics/atomic/lwg3220.cc: New test.
1828 2022-06-10 Jonathan Wakely <jwakely@redhat.com>
1831 * include/experimental/numeric (experimental::gcd): Simplify
1832 assertions. Use __abs_r instead of __absu.
1833 (experimental::lcm): Likewise. Remove use of __detail::__lcm so
1834 overflow can be detected.
1835 * include/std/numeric (__detail::__absu): Rename to __abs_r and
1836 change to allow signed result type, so overflow can be detected.
1837 (__detail::__lcm): Remove.
1838 (gcd): Simplify assertions. Use __abs_r instead of __absu.
1839 (lcm): Likewise. Remove use of __detail::__lcm so overflow can
1841 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
1842 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1843 * testsuite/26_numerics/gcd/105844.cc: New test.
1844 * testsuite/26_numerics/lcm/105844.cc: New test.
1846 2022-06-10 Jonathan Wakely <jwakely@redhat.com>
1849 * libsupc++/eh_globals.cc (eh_globals): Ensure constant init and
1850 prevent destruction during termination.
1851 (__eh_globals_init::_M_init): Replace with static member _S_init.
1852 (__cxxabiv1::__cxa_get_globals_fast): Update.
1853 (__cxxabiv1::__cxa_get_globals): Likewise.
1855 2022-06-10 Jonathan Wakely <jwakely@redhat.com>
1857 * include/bits/basic_string.h (__hash_str_base): New class
1859 (hash<basic_string<C, char_traits<C>, A>>): Define partial
1860 specialization for each of the standard character types.
1861 (hash<string>, hash<wstring>, hash<u8string>, hash<u16string>)
1862 (hash<u32string>): Remove explicit specializations.
1863 * include/std/string (__hash_string_base): Remove class
1865 (hash<pmr::string>, hash<pmr::wstring>, hash<pmr::u8string>)
1866 (hash<pmr::u16string>, hash<pmr::u32string>): Remove explicit
1868 * testsuite/21_strings/basic_string/hash/hash.cc: Test with
1870 * testsuite/21_strings/basic_string/hash/hash_char8_t.cc:
1873 2022-05-27 Jonathan Wakely <jwakely@redhat.com>
1876 * include/std/sstream (basic_stringbuf::_M_high_mark): Add
1877 always_inline attribute.
1879 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1882 * include/ext/pb_ds/detail/resize_policy/hash_prime_size_policy_imp.hpp:
1883 Limit ga_sizes array to values that fit in size_t.
1884 * include/ext/random [__SIZE_WIDTH < 32] (sfmt86243)
1885 (sfmt86243_64, sfmt132049, sfmt132049_64, sfmt216091)
1886 (sfmt216091_64): Do not declare.
1888 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1890 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Make
1891 lookup for ios_errc and future_errc check versioned namespace.
1892 (StdAtomicPrinter): Strip versioned namespace from typename.
1894 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1896 * src/c++11/Makefile.am: Add new source file.
1897 * src/c++11/Makefile.in: Regenerate.
1898 * src/c++11/cxx11-ios_failure.cc (iostream_category):
1900 * src/c++11/ios_errcat.cc: New file.
1901 * testsuite/27_io/ios_base/failure/error_code.cc: Check that
1902 std::iostream_category() is defined and used for std::io_errc.
1904 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1906 * include/bits/stl_iterator.h (counted_iterator::operator++(int)):
1907 Add 'constexpr' as per LWG 3643.
1908 * testsuite/24_iterators/counted_iterator/lwg3643.cc: New test.
1910 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1912 * include/bits/functional_hash.h (__is_fast_hash): Add doxygen
1914 * include/bits/hashtable.h: Do not include <bits/stl_function.h>
1916 * include/bits/hashtable_policy.h: Include <bits/stl_pair.h> and
1917 <bits/functional_hash.h>.
1918 * include/bits/unordered_map.h: Include required headers.
1919 * include/bits/unordered_set.h: Likewise.
1920 * include/std/unordered_map: Do not include headers for indirect
1922 * include/std/unordered_set: Likewise.
1924 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1926 * include/bits/ranges_algobase.h: Do not include
1927 <bits/stl_iterator_base_types.h>.
1928 * include/std/string: Likewise.
1929 * include/std/variant: Likewise.
1931 2022-05-26 Nathan Sidwell <nathan@acm.org>
1933 * include/bits/hashtable.h: Include required headers.
1934 * include/bits/hashtable_policy.h: Likewise.
1935 * include/bits/stl_heap.h: Likewise.
1936 * include/bits/stl_iterator_base_funcs.h: Likewise.
1938 2022-05-26 François Dumont <fdumont@gcc.gnu.org>
1940 * python/libstdcxx/v6/printers.py (StdSpanPrinter.__init__):
1941 Strip typename from version namespace.
1943 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1945 * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Strip
1946 versioned namespace from the template argument too.
1948 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
1950 * testsuite/21_strings/basic_string/modifiers/pop_back/char/1.cc:
1952 * testsuite/21_strings/basic_string/modifiers/pop_back/char.cc:
1954 * testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t/1.cc:
1956 * testsuite/21_strings/basic_string/modifiers/pop_back/wchar_t.cc:
1958 * testsuite/21_strings/basic_string/modifiers/swap/wchar_t/constexpr.cc:
1960 * testsuite/21_strings/basic_string/modifiers/swap/constexpr-wchar_t.cc:
1962 * testsuite/21_strings/basic_string/modifiers/swap/char/constexpr.cc:
1964 * testsuite/21_strings/basic_string/modifiers/swap/constexpr.cc:
1966 * testsuite/21_strings/basic_string/operations/contains/char/1.cc:
1968 * testsuite/21_strings/basic_string/operations/contains/char.cc:
1970 * testsuite/21_strings/basic_string/operations/contains/wchar_t/1.cc:
1972 * testsuite/21_strings/basic_string/operations/contains/wchar_t.cc:
1974 * testsuite/21_strings/basic_string/operations/data/char/1.cc:
1976 * testsuite/21_strings/basic_string/operations/data/char.cc:
1978 * testsuite/21_strings/basic_string/operations/data/wchar_t/1.cc:
1980 * testsuite/21_strings/basic_string/operations/data/wchar_t.cc:
1982 * testsuite/21_strings/basic_string/operations/ends_with/char/1.cc:
1984 * testsuite/21_strings/basic_string/operations/ends_with/char.cc:
1986 * testsuite/21_strings/basic_string/operations/ends_with/wchar_t/1.cc:
1988 * testsuite/21_strings/basic_string/operations/ends_with/wchar_t.cc:
1990 * testsuite/21_strings/basic_string/operations/starts_with/char/1.cc:
1992 * testsuite/21_strings/basic_string/operations/starts_with/char.cc:
1994 * testsuite/21_strings/basic_string/operations/starts_with/wchar_t/1.cc:
1996 * testsuite/21_strings/basic_string/operations/starts_with/wchar_t.cc:
1998 * testsuite/21_strings/basic_string/operations/substr/char/1.cc:
2000 * testsuite/21_strings/basic_string/operations/substr/char.cc:
2002 * testsuite/21_strings/basic_string/operations/substr/wchar_t/1.cc:
2004 * testsuite/21_strings/basic_string/operations/substr/wchar_t.cc:
2006 * testsuite/21_strings/basic_string/range_access/char/1.cc:
2008 * testsuite/21_strings/basic_string/range_access/char.cc:
2010 * testsuite/21_strings/basic_string/range_access/wchar_t/1.cc:
2012 * testsuite/21_strings/basic_string/range_access/wchar_t.cc:
2014 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
2016 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char.cc:
2018 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
2020 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t.cc:
2022 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
2024 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char.cc:
2026 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
2028 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t.cc:
2030 * testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc:
2032 * testsuite/21_strings/basic_string_view/modifiers/swap/char.cc:
2034 * testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc:
2036 * testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t.cc:
2038 * testsuite/21_strings/basic_string_view/operations/contains/char/1.cc:
2040 * testsuite/21_strings/basic_string_view/operations/contains/char.cc:
2042 * testsuite/21_strings/basic_string_view/operations/contains/wchar_t/1.cc:
2044 * testsuite/21_strings/basic_string_view/operations/contains/wchar_t.cc:
2046 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
2048 * testsuite/21_strings/basic_string_view/operations/data/char.cc:
2050 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
2052 * testsuite/21_strings/basic_string_view/operations/data/wchar_t.cc:
2054 * testsuite/21_strings/basic_string_view/operations/ends_with/char/1.cc:
2056 * testsuite/21_strings/basic_string_view/operations/ends_with/char.cc:
2058 * testsuite/21_strings/basic_string_view/operations/ends_with/wchar_t/1.cc:
2060 * testsuite/21_strings/basic_string_view/operations/ends_with/wchar_t.cc:
2062 * testsuite/21_strings/basic_string_view/operations/starts_with/char/1.cc:
2064 * testsuite/21_strings/basic_string_view/operations/starts_with/char.cc:
2066 * testsuite/21_strings/basic_string_view/operations/starts_with/wchar_t/1.cc:
2068 * testsuite/21_strings/basic_string_view/operations/starts_with/wchar_t.cc:
2070 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
2072 * testsuite/21_strings/basic_string_view/operations/substr/char.cc:
2074 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
2076 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t.cc:
2078 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
2080 * testsuite/21_strings/basic_string_view/range_access/char.cc:
2082 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
2084 * testsuite/21_strings/basic_string_view/range_access/wchar_t.cc:
2086 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char/1.cc:
2088 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char.cc:
2090 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t/1.cc:
2092 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t.cc:
2094 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t/1.cc:
2096 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t.cc:
2098 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char8_t/1.cc:
2100 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char8_t.cc:
2102 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/1.cc:
2104 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/int.cc:
2106 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t/1.cc:
2108 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t.cc:
2110 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
2112 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char.cc:
2114 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
2116 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t.cc:
2118 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
2120 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t.cc:
2122 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
2124 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t.cc:
2126 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
2128 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/int.cc:
2130 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
2132 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t.cc:
2134 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char/1.cc:
2136 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char.cc:
2138 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char16_t/1.cc:
2140 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char16_t.cc:
2142 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char32_t/1.cc:
2144 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char32_t.cc:
2146 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char8_t/1.cc:
2148 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/char8_t.cc:
2150 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/short/1.cc:
2152 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/short.cc:
2154 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/wchar_t/1.cc:
2156 * testsuite/21_strings/char_traits/requirements/explicit_instantiation/wchar_t.cc:
2159 2022-05-26 Jonathan Wakely <jwakely@redhat.com>
2161 * testsuite/20_util/duration/requirements/explicit_instantiation/explicit_instantiation.cc:
2163 * testsuite/20_util/duration/requirements/explicit_instantiation.cc: ...here.
2164 * testsuite/20_util/time_point/requirements/explicit_instantiation/explicit_instantiation.cc:
2166 * testsuite/20_util/time_point/requirements/explicit_instantiation.cc: ...here.
2167 * testsuite/20_util/unique_ptr/requirements/explicit_instantiation/explicit_instantiation.cc:
2169 * testsuite/20_util/unique_ptr/requirements/explicit_instantiation.cc: ...here.
2171 2022-05-25 Jason Merrill <jason@redhat.com>
2173 * testsuite/20_util/function_objects/constexpr_searcher.cc: Add
2176 2022-05-20 Jonathan Wakely <jwakely@redhat.com>
2178 * testsuite/26_numerics/random/bernoulli_distribution/operators/values.cc:
2179 Run fewer iterations for simulator targets.
2180 * testsuite/26_numerics/random/binomial_distribution/operators/values.cc:
2182 * testsuite/26_numerics/random/discrete_distribution/operators/values.cc:
2184 * testsuite/26_numerics/random/geometric_distribution/operators/values.cc:
2186 * testsuite/26_numerics/random/negative_binomial_distribution/operators/values.cc:
2188 * testsuite/26_numerics/random/poisson_distribution/operators/values.cc:
2190 * testsuite/26_numerics/random/uniform_int_distribution/operators/values.cc:
2193 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
2195 * include/bits/char_traits.h: Only include <cstdint> when
2197 * include/std/stacktrace: Use __UINTPTR_TYPE__ instead of
2199 * src/c++11/cow-stdexcept.cc: Include <stdint.h>.
2200 * src/c++17/floating_to_chars.cc: Likewise.
2201 * testsuite/20_util/assume_aligned/1.cc: Include <cstdint>.
2202 * testsuite/20_util/assume_aligned/3.cc: Likewise.
2203 * testsuite/20_util/shared_ptr/creation/array.cc: Likewise.
2205 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
2207 * include/bits/basic_string.h: Do not include <ext/atomicity.h>
2209 * include/bits/cow_string.h: Include it here.
2211 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
2213 * include/Makefile.am: Add new header.
2214 * include/Makefile.in: Regenerate.
2215 * include/bits/memory_resource.h: New file.
2216 * include/std/deque: Include <bits/memory_resource.h>.
2217 * include/std/forward_list: Likewise.
2218 * include/std/list: Likewise.
2219 * include/std/map: Likewise.
2220 * include/std/memory_resource (pmr::memory_resource): Move to
2221 new <bits/memory_resource.h> header.
2222 (pmr::polymorphic_allocator): Likewise.
2223 * include/std/regex: Likewise.
2224 * include/std/set: Likewise.
2225 * include/std/stacktrace: Likewise.
2226 * include/std/string: Likewise.
2227 * include/std/unordered_map: Likewise.
2228 * include/std/unordered_set: Likewise.
2229 * include/std/vector: Likewise.
2230 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc:
2231 Remove <memory_resource> header and check construction.
2232 * testsuite/23_containers/deque/types/pmr_typedefs.cc: Likewise.
2233 * testsuite/23_containers/forward_list/pmr_typedefs.cc:
2235 * testsuite/23_containers/list/pmr_typedefs.cc: Likewise.
2236 * testsuite/23_containers/map/pmr_typedefs.cc: Likewise.
2237 * testsuite/23_containers/multimap/pmr_typedefs.cc: Likewise.
2238 * testsuite/23_containers/multiset/pmr_typedefs.cc: Likewise.
2239 * testsuite/23_containers/set/pmr_typedefs.cc: Likewise.
2240 * testsuite/23_containers/unordered_map/pmr_typedefs.cc:
2242 * testsuite/23_containers/unordered_multimap/pmr_typedefs.cc:
2244 * testsuite/23_containers/unordered_multiset/pmr_typedefs.cc:
2246 * testsuite/23_containers/unordered_set/pmr_typedefs.cc:
2248 * testsuite/23_containers/vector/pmr_typedefs.cc: Likewise.
2249 * testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
2251 2022-05-19 Jonathan Wakely <jwakely@redhat.com>
2253 * include/std/memory_resource (polymorphic_allocator): Add
2254 non-template equality operator, as proposed for LWG 3683.
2255 * testsuite/20_util/polymorphic_allocator/lwg3683.cc: New test.
2257 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
2259 * src/c++17/memory_resource.cc (set_default_resource): Use
2260 memory_order_acq_rel.
2261 (get_default_resource): Use memory_order_acquire.
2263 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
2265 * include/std/memory_resource (new_delete_resource): Add
2266 nodiscard, returns_nonnull and const attributes.
2267 (null_memory_resource): Likewise.
2268 (set_default_resource, get_default_resource): Add returns_nonnull
2270 (memory_resource::is_equal): Add nodiscard attribute.
2271 (operator==, operator!=): Likewise.
2273 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
2275 * include/bits/ios_base.h (io_category): Add const and nodiscard
2277 (make_error_code, make_error_condition): Add nodiscard.
2278 * include/std/future (future_category): Add const and nodiscard.
2279 (make_error_code, make_error_condition): Add nodiscard.
2280 * include/std/system_error (generic_category system_category):
2281 Add nodiscard. Replace _GLIBCXX_CONST with C++11 attribute.
2282 (error_code::value, error_code::category, error_code::operator bool)
2283 (error_condition::value, error_condition::category)
2284 (error_condition::operator bool, make_error_code)
2285 (make_error_condition, operator==, operator!=, operator<=>): Add
2288 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
2290 * testsuite/20_util/expected/synopsis.cc: Skip for versioned
2292 * testsuite/27_io/headers/iosfwd/synopsis.cc: Likewise.
2294 2022-05-17 Jonathan Wakely <jwakely@redhat.com>
2296 * src/Makefile.am [ENABLE_SYMVERS_GNU_NAMESPACE] (cxx11_sources):
2297 Do not build the compatibility*-c++0x.cc objects.
2298 * src/Makefile.in: Regenerate.
2299 * src/c++11/compatibility-c++0x.cc [_GLIBCXX_INLINE_VERSION]:
2300 Refuse to build for the versioned namespace.
2301 * src/c++11/compatibility-chrono.cc: Likewise.
2302 * src/c++11/compatibility-condvar.cc: Likewise.
2303 * src/c++11/compatibility-thread-c++0x.cc: Likewise.
2304 * src/c++11/chrono.cc (system_clock, steady_clock):
2305 Use macros to define in inline namespace _V2, matching the
2306 declarations in <system_error>.
2307 * src/c++11/system_error.cc (system_category, generic_category):
2310 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
2312 * doc/xml/manual/prerequisites.xml: Fix attributes for external
2314 * doc/html/manual/setup.html: Regenerate.
2316 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
2318 * doc/xml/manual/status_cxx2023.xml: Update with gcc-12 support.
2319 * doc/html/*: Regenerate.
2321 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
2323 * doc/xml/manual/intro.xml: Include new chapter.
2324 * doc/xml/manual/status_cxx2020.xml: Tweak release numbers.
2325 * doc/xml/manual/status_cxx2023.xml: New file.
2326 * doc/html/*: Regenerate.
2328 2022-05-16 Jonathan Wakely <jwakely@redhat.com>
2330 * doc/html/manual/status.html: Regenerate.
2331 * doc/xml/manual/status_cxx2020.xml: Fix supported version for
2332 C++20 bit operations.
2334 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2336 * include/bits/std_thread.h (thread::_State, thread::_State_ptr):
2337 Declare as private unless _GLIBCXX_THREAD_IMPL is defined.
2338 * src/c++11/thread.cc (_GLIBCXX_THREAD_IMPL): Define.
2340 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2342 * include/std/future (launch): Make operators noexcept.
2344 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2346 * doc/doxygen/user.cfg.in (PREDEFINED): Replace __exception_ptr
2347 with "__unspecified__".
2348 * libsupc++/exception_ptr.h: Improve doxygen docs.
2349 (__exception_ptr::swap): Also declare in namespace std.
2351 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2353 * libsupc++/nested_exception.h (throw_with_nested) [C++17]: Use
2354 if-constexpr instead of tag dispatching.
2355 (rethrow_if_nested) [C++17]: Likewise.
2356 (rethrow_if_nested) [!__cpp_rtti]: Do not use dynamic_cast if it
2358 * testsuite/18_support/nested_exception/rethrow_if_nested-term.cc:
2361 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2363 * doc/doxygen/user.cfg.in (PREDEFINED): Define
2364 _GTHREAD_USE_MUTEX_TIMEDLOCK macro.
2365 * include/bits/std_mutex.h (mutex, lock_guard): Use @since and
2367 * include/bits/unique_lock.h (unique_lock): Likewise.
2368 * include/std/mutex (recursive_mutex, timed_mutex)
2369 (recursive_timed_mutex, scoped_lock): Likewise.
2371 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2373 * doc/doxygen/user.cfg.in (PREDEFINED): Define
2374 _GLIBCXX23_CONSTEXPR macro.
2375 * include/backward/auto_ptr.h (auto_ptr): Use @deprecated.
2376 * include/bits/unique_ptr.h (default_delete): Use @since and
2378 * include/std/scoped_allocator: Remove @ingroup from @file
2381 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2383 * include/bits/std_thread.h (thread, thread::id): Improve
2385 * include/std/future: Likewise.
2386 * include/std/thread (jthread): Likewise.
2388 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2390 * include/bits/ostream_insert.h: Mark helper functions as
2391 undocumented by Doxygen.
2392 * include/bits/stl_algo.h: Use markdown for formatting and mark
2393 helper functions as undocumented.
2394 * include/bits/stl_numeric.h: Likewise.
2395 * include/bits/stl_pair.h (pair): Add @headerfile.
2397 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2399 * doc/doxygen/user.cfg.in (PREDEFINED): Define __allocator_base
2400 so that Doxygen shows the right base-class for std::allocator.
2401 * include/bits/alloc_traits.h: Improve doxygen docs.
2402 * include/bits/allocator.h: Likewise.
2403 * include/bits/new_allocator.h: Likewise.
2404 * include/ext/new_allocator.h: Likewise.
2406 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2408 * doc/doxygen/user.cfg.in (PREDEFINED): Define macro
2409 _GLIBCXX_DOXYGEN_ONLY to expand its argument.
2410 * include/bits/c++config (_GLIBCXX_DOXYGEN_ONLY): Define.
2411 * include/bits/regex.h: Improve doxygen docs.
2412 * include/bits/regex_constants.h: Likewise.
2413 * include/bits/regex_error.h: Likewise.
2415 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2417 * include/std/atomic: Suppress doxygen docs for
2418 implementation details.
2419 * include/bits/atomic_base.h: Likewise.
2420 * include/bits/shared_ptr_atomic.h: Use markdown. Fix grouping
2421 so that std::atomic is not added to the pointer abstractions
2424 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2426 * include/std/system_error: Improve doxygen comments.
2428 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2430 * include/bits/ptr_traits.h: Add some doxygen comments.
2432 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2434 * doc/doxygen/user.cfg.in (PREDEFINED): Expand new macros to
2436 * include/bits/c++config (_GLIBCXX_BEGIN_INLINE_ABI_NAMESPACE)
2437 (_GLIBCXX_END_INLINE_ABI_NAMESPACE): Define new macros.
2438 * include/bits/algorithmfwd.h (_V2::__rotate): Use new macros
2440 * include/bits/chrono.h (chrono::_V2::system_clock): Likewise.
2441 * include/bits/stl_algo.h (_V2::__rotate): Likewise.
2442 * include/std/condition_variable (_V2::condition_variable_any):
2444 * include/std/system_error (_V2::error_category): Likewise.
2446 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2448 * include/bits/mofunc_impl.h: Fix doxygen command.
2450 2022-05-13 Jonathan Wakely <jwakely@redhat.com>
2452 * doc/doxygen/user.cfg.in (GROUP_NESTED_COMPOUNDS): Set to NO.
2453 (CLASS_DIAGRAMS): Remove obsolete option.
2455 2022-05-12 Jonathan Wakely <jwakely@redhat.com>
2457 * config/locale/dragonfly/numeric_members.cc: Remove whitespace.
2458 * config/locale/gnu/numeric_members.cc: Likewise.
2459 * include/bits/locale_facets_nonio.h: Likewise.
2460 * libsupc++/typeinfo: Likewise.
2462 2022-05-10 Jonathan Wakely <jwakely@redhat.com>
2465 * include/std/iosfwd: Add declarations for <spanstream> class
2466 templates and typedefs.
2467 * include/std/spanstream (basic_spanbuf, basic_ispanstream)
2468 (basic_ospanstream, basic_spanstream): Remove default template
2470 * testsuite/27_io/headers/iosfwd/synopsis.cc: Add <spanstream>
2472 * testsuite/27_io/headers/iosfwd/types.cc: Check <spanstream>
2475 2022-05-10 Jonathan Wakely <jwakely@redhat.com>
2478 * include/std/iosfwd: Add declarations for <synstream> class
2479 templates and typedefs.
2480 * include/std/syncstream (basic_syncbuf, basic_osyncstream):
2481 Remove default template arguments.
2482 * testsuite/27_io/headers/iosfwd/synopsis.cc: New test.
2483 * testsuite/27_io/headers/iosfwd/types.cc: New test.
2485 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
2487 * include/bits/random.tcc (operator==): Only check
2488 normal_distribution::_M_saved_available once.
2489 * testsuite/26_numerics/random/normal_distribution/operators/equal.cc:
2490 Check equality after state changes.
2491 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
2494 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
2497 * include/bits/random.tcc
2498 (operator>>(basic_istream<C,T>&, normal_distribution<R>&)):
2499 Update state when __state_avail is false.
2500 * testsuite/26_numerics/random/normal_distribution/operators/serialize.cc:
2501 Check that deserialized object equals serialized one.
2503 2022-05-06 Alexandre Oliva <oliva@adacore.com>
2505 * include/experimental/bits/simd.h [__ALTIVEC__]: Require VSX
2506 for double, long long, and 64-bit long intrinsic types.
2507 [__ALTIVEC__] (__intrinsic_type): Mention 128-bit in
2508 preexisting long double diagnostic, adjust no-VSX double
2509 diagnostic to cover 64-bit long double as well.
2511 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
2514 * testsuite/27_io/filesystem/iterators/error_reporting.cc:
2515 Use a trailing char array as storage for dirent::d_name.
2517 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
2519 * include/std/stacktrace: Do not include <cxxabi.h>.
2520 (__cxa_demangle): Declare.
2522 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
2525 * include/bits/specfun.h: Use visibility attribute on namespace,
2526 instead of pragma push/pop.
2527 * libsupc++/compare: Likewise.
2528 * libsupc++/exception: Likewise.
2529 * libsupc++/exception.h: Likewise.
2530 * libsupc++/exception_ptr.h: Likewise.
2531 * libsupc++/initializer_list: Likewise.
2532 * libsupc++/nested_exception.h: Likewise.
2534 2022-05-06 Jonathan Wakely <jwakely@redhat.com>
2536 * doc/xml/manual/test.xml: Remove requirement for copyright and
2537 GPL notice in tests.
2538 * doc/html/manual/test.html: Regenerate.
2540 2022-05-05 Jonathan Wakely <jwakely@redhat.com>
2542 * include/experimental/memory_resource [!__cpp_rtti]
2543 (__resource_adaptor_imp::do_is_equal): Do not use dynamic_cast
2544 when RTTI is disabled.
2545 * testsuite/17_intro/freestanding.cc: Require RTTI.
2546 * testsuite/18_support/exception/38732.cc: Likewise.
2547 * testsuite/18_support/exception_ptr/rethrow_exception.cc:
2549 * testsuite/18_support/nested_exception/68139.cc: Likewise.
2550 * testsuite/18_support/nested_exception/rethrow_if_nested.cc:
2552 * testsuite/18_support/type_info/103240.cc: Likewise.
2553 * testsuite/18_support/type_info/fundamental.cc: Likewise.
2554 * testsuite/18_support/type_info/hash_code.cc: Likewise.
2555 * testsuite/20_util/any/assign/emplace.cc: Likewise.
2556 * testsuite/20_util/any/cons/in_place.cc: Likewise.
2557 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
2558 * testsuite/20_util/any/observers/type.cc: Likewise.
2559 * testsuite/20_util/function/1.cc: Likewise.
2560 * testsuite/20_util/function/2.cc: Likewise.
2561 * testsuite/20_util/function/3.cc: Likewise.
2562 * testsuite/20_util/function/4.cc: Likewise.
2563 * testsuite/20_util/function/5.cc: Likewise.
2564 * testsuite/20_util/function/6.cc: Likewise.
2565 * testsuite/20_util/function/7.cc: Likewise.
2566 * testsuite/20_util/function/8.cc: Likewise.
2567 * testsuite/20_util/polymorphic_allocator/resource.cc: Likewise.
2568 * testsuite/20_util/shared_ptr/casts/1.cc: Likewise.
2569 * testsuite/20_util/shared_ptr/casts/rval.cc: Likewise.
2570 * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter_ref_2.cc:
2572 * testsuite/20_util/shared_ptr/misc/get_deleter.cc: Likewise.
2573 * testsuite/20_util/typeindex/comparison_operators.cc: Likewise.
2574 * testsuite/20_util/typeindex/comparison_operators_c++20.cc:
2576 * testsuite/20_util/typeindex/hash.cc: Likewise.
2577 * testsuite/20_util/typeindex/hash_code.cc: Likewise.
2578 * testsuite/20_util/typeindex/name.cc: Likewise.
2579 * testsuite/22_locale/ctype/is/string/89728_neg.cc: Likewise.
2580 * testsuite/22_locale/global_templates/standard_facet_hierarchies.cc:
2582 * testsuite/22_locale/global_templates/user_facet_hierarchies.cc:
2584 * testsuite/22_locale/locale/13630.cc: Check type without using
2586 * testsuite/23_containers/array/requirements/non_default_constructible.cc:
2588 * testsuite/27_io/basic_ostream/emit/1.cc: Likewise.
2589 * testsuite/27_io/fpos/14320-1.cc: Check type without using RTTI.
2590 * testsuite/27_io/fpos/mbstate_t/12065.cc: Require RTTI.
2591 * testsuite/27_io/ios_base/failure/dual_abi.cc: Likewise.
2592 * testsuite/experimental/any/misc/any_cast.cc: Likewise.
2593 * testsuite/experimental/any/observers/type.cc: Likewise.
2594 * testsuite/experimental/memory_resource/resource_adaptor.cc:
2596 * testsuite/lib/libstdc++.exp (check_effective_target_rtti):
2598 * testsuite/tr1/3_function_objects/function/1.cc: Likewise.
2599 * testsuite/tr1/3_function_objects/function/2.cc: Likewise.
2600 * testsuite/tr1/3_function_objects/function/3.cc: Likewise.
2601 * testsuite/tr1/3_function_objects/function/4.cc: Likewise.
2602 * testsuite/tr1/3_function_objects/function/5.cc: Likewise.
2603 * testsuite/tr1/3_function_objects/function/6.cc: Likewise.
2604 * testsuite/tr1/3_function_objects/function/7.cc: Likewise.
2605 * testsuite/tr1/3_function_objects/function/8.cc: Likewise.
2606 * testsuite/tr2/bases/value.cc: Likewise.
2607 * testsuite/tr2/direct_bases/value.cc: Likewise.
2608 * testsuite/util/exception/safety.h [!__cpp_rtti]: Don't print
2611 2022-05-04 Jonathan Wakely <jwakely@redhat.com>
2614 * include/std/array (array::size(), array::max_size())
2615 (array::empty(), array::data()): Add always_inline attribute.
2617 2022-05-04 Jonathan Wakely <jwakely@redhat.com>
2620 * include/std/array (__array_traits::_S_ref): Remove.
2621 (__array_traits::_S_ptr): Remove.
2622 (__array_traits<T, 0>::_Type): Define operator[] and operator T*
2623 to provide an array-like API.
2624 (array::_AT_Type): Remove public typeef.
2625 (array::operator[], array::at, array::front, array::back): Use
2626 index operator to access _M_elems instead of _S_ref.
2627 (array::data): Use implicit conversion from _M_elems to pointer.
2628 (swap(array&, array&)): Use __enable_if_t helper.
2629 (get<I>): Use index operator to access _M_elems.
2630 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
2631 Adjust dg-error line numbers.
2633 2022-05-03 Alexandre Oliva <oliva@adacore.com>
2636 * testsuite/20_util/from_chars/pr105324.cc: Guard test body
2637 with conditional for floating-point overloads of from_char.
2639 2022-05-02 Patrick Palka <ppalka@redhat.com>
2642 * src/c++17/floating_from_chars.cc (find_end_of_float): Accept
2643 two delimeters for the exponent part in the form of a possibly
2644 NULL string of length two. Don't use std::tolower.
2645 (pattern): Adjust calls to find_end_of_float accordingly.
2647 2022-05-02 Patrick Palka <ppalka@redhat.com>
2650 * src/c++17/floating_from_chars.cc (__floating_from_chars_hex):
2651 Also accept 'P' as the start of the exponent.
2652 * testsuite/20_util/from_chars/7.cc: Add corresponding testcase.
2654 2022-04-29 Jonathan Wakely <jwakely@redhat.com>
2657 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt:
2659 * src/c++11/compatibility-ldbl-alt128.cc [_GLIBCXX_USE_DUAL_ABI]:
2660 Define __gnu_ieee128::num_get<C>::_M_extract_int[abi:cxx11]<I>
2661 symbols as aliases for corresponding symbols without abi-tag.
2663 2022-04-29 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2665 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
2666 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
2668 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
2669 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
2672 2022-04-28 Jonathan Wakely <jwakely@redhat.com>
2675 * src/c++17/fs_ops.cc (fs::copy): Pass error_code to
2676 directory_iterator constructor, and check on each iteration.
2677 * src/filesystem/ops.cc (fs::copy): Likewise.
2678 * testsuite/27_io/filesystem/operations/copy.cc: Check for
2679 errors during recursion.
2680 * testsuite/experimental/filesystem/operations/copy.cc:
2683 2022-04-28 François Dumont <fdumont@gcc.gnu.org>
2685 * config/abi/pre/gnu-versioned-namespace.ver: Remove
2686 std::random_device::* pattern.
2688 2022-04-27 Jakub Jelinek <jakub@redhat.com>
2690 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
2691 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
2692 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
2693 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
2694 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
2695 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
2696 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
2697 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
2699 2022-04-27 Jonathan Wakely <jwakely@redhat.com>
2701 * python/libstdcxx/v6/printers.py (SharedPointerPrinter): Add
2702 support for atomic<shared_ptr<T>> and atomic<weak_ptr<T>>.
2703 (StdAtomicPrinter): New printer.
2704 (build_libstdcxx_dictionary): Register new printer.
2705 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test std::atomic.
2706 * testsuite/libstdc++-prettyprinters/cxx20.cc: Test atomic smart
2709 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
2711 * include/bits/shared_ptr_atomic.h (atomic<shared_ptr>): Add
2712 constructor for constant initialization from nullptr_t.
2713 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
2714 Check for new constructor.
2716 2022-04-26 Jonathan Wakely <jwakely@redhat.com>
2718 * include/bits/fs_path.h (hash<filesystem::path>): Define.
2719 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
2720 Check std::hash specialization.
2722 2022-04-25 Jonathan Wakely <jwakely@redhat.com>
2724 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define
2726 * include/bits/unique_ptr.h (__cpp_lib_constexpr_memory):
2728 (default_delete, default_delete<T[]>, __uniq_ptr_impl)
2729 (unique_ptr, unique_ptr<T[], D>): Add constexpr to all member
2731 * include/std/version (__cpp_lib_constexpr_memory): Define new
2733 * testsuite/20_util/unique_ptr/assign/constexpr.cc: New test.
2734 * testsuite/20_util/unique_ptr/comparison/constexpr.cc: New test.
2735 * testsuite/20_util/unique_ptr/cons/constexpr_c++20.cc: New test.
2736 * testsuite/20_util/unique_ptr/creation/constexpr.cc: New test.
2737 * testsuite/20_util/unique_ptr/modifiers/constexpr.cc: New test.
2738 * testsuite/20_util/unique_ptr/specialized_algorithms/constexpr.cc:
2741 2022-04-25 Jonathan Wakely <jwakely@redhat.com>
2744 * include/std/future (packaged_task): Add deduction guides.
2745 * testsuite/30_threads/packaged_task/cons/deduction.cc: New test.
2747 2022-04-25 Philipp Fent <fent@in.tum.de>
2749 * python/libstdcxx/v6/printers.py (StdSpanPrinter._iterator):
2751 (StdInitializerListPrinter): Define new printer.
2752 (build_libstdcxx_dictionary): Register new printer.
2753 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check printer for
2756 2022-04-22 Thomas W Rodgers <trodgers@redhat.com>
2759 * include/bits/atomic_base.h (atomic_flag::notify_one,
2760 notify_all): Remove const qualification.
2761 (__atomic_base::notify_one, notify_all): Likewise.
2762 * include/std/atomic (atomic<bool>::notify_one, notify_all):
2764 (atomic::notify_one, notify_all): Likewise.
2765 (atomic<T*>::notify_one, notify_all): Likewise.
2766 (atomic_notify_one, atomic_notify_all): Likewise.
2767 * testsuite/29_atomics/atomic/wait_notify/102994.cc: Adjust test
2768 to account for change in notify_one/notify_all signature.
2770 2022-04-21 Patrick Palka <ppalka@redhat.com>
2772 * include/std/charconv (__from_chars_alnum_to_val_table):
2773 Simplify initialization of __lower/__upper_letters.
2774 (__from_chars_alnum_to_val): Default the template parameter to
2776 * src/c++17/floating_from_chars.cc (starts_with_ci): Don't
2777 assume the uppercase and lowercase letters are contiguous.
2778 (__floating_from_chars_hex): Likewise.
2780 2022-04-21 Patrick Palka <ppalka@redhat.com>
2784 * include/std/charconv (__from_chars_alnum_to_val): Make
2785 initializer for __table dependent in an artificial way.
2787 2022-04-21 Jonathan Wakely <jwakely@redhat.com>
2790 * src/c++17/floating_from_chars.cc (buffer_resource::do_allocate):
2792 * testsuite/20_util/from_chars/pr105324.cc: New test.
2794 2022-04-20 Jonathan Wakely <jwakely@redhat.com>
2796 * testsuite/21_strings/basic_string_view/operations/copy/char/constexpr.cc:
2797 Check correct feature test macro.
2799 2022-04-20 Jonathan Wakely <jwakely@redhat.com>
2802 * doc/xml/manual/prerequisites.xml: Document libiconv
2804 * doc/html/manual/setup.html: Regenerate.
2805 * src/Makefile.am (CXXLINK): Add $(LTLIBICONV).
2806 * src/Makefile.in: Regenerate.
2808 2022-04-19 Patrick Palka <ppalka@redhat.com>
2810 * src/c++17/floating_to_chars.cc (_GLIBCXX_ASSERTIONS): Don't
2812 (__floating_to_chars_shortest): Add __builtin_unreachable calls to
2813 squelch false-positive -Wmaybe-uninitialized and -Wreturn-type
2815 (__floating_to_chars_precision): Likewise.
2817 2022-04-19 Philipp Fent <fent@in.tum.de>
2819 * python/libstdcxx/v6/printers.py (StdSpanPrinter): Define.
2820 * testsuite/libstdc++-prettyprinters/cxx20.cc: Test it.
2822 2022-04-19 Jonathan Wakely <jwakely@redhat.com>
2824 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Fix shell operators.
2825 * configure: Regenerate.
2827 2022-04-18 Patrick Palka <ppalka@redhat.com>
2829 * include/std/charconv (__from_chars_pow2_base): Manually
2830 unroll the first iteration of the main loop and simplify
2833 2022-04-15 Patrick Palka <ppalka@redhat.com>
2836 * include/bits/ranges_algo.h (__minmax_fn): Avoid dereferencing
2837 __first twice at the start.
2838 * testsuite/25_algorithms/minmax/constrained.cc (test06): New test.
2840 2022-04-15 Patrick Palka <ppalka@redhat.com>
2842 * include/std/charconv (__from_chars_alnum_to_val_table): Define.
2843 (__from_chars_alnum_to_val): Define.
2844 (__from_chars_binary): Rename to ...
2845 (__from_chars_pow2_base): ... this. Generalize to handle any
2846 power-of-two base using __from_chars_alnum_to_val.
2847 (__from_chars_digit): Optimize digit recognition to a single
2848 test instead of two tests. Use [[__unlikely___]] attribute.
2849 (__from_chars_alpha_to_num): Remove.
2850 (__from_chars_alnum): Use __from_chars_alnum_to_val. Use a
2851 nested loop for the overflow case. Maintain a lower bound
2852 on the number of available bits in the result and use it to
2853 omit the overflow check.
2854 (from_chars): Adjust appropriately.
2855 * src/c++17/floating_from_chars.cc (ascii_to_hexit): Remove.
2856 (__floating_from_chars_hex): Use __from_chars_alnum_to_val
2857 to recognize a hex digit instead.
2859 2022-04-14 Palmer Dabbelt <palmer@rivosinc.com>
2861 * acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Force auto to mutex
2863 * configure: Regenerate.
2865 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
2867 * doc/xml/manual/intro.xml: Fix comment.
2869 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
2871 * include/precompiled/stdc++.h: Include <stacktrace> and
2872 <stdatomic.h> for C++23.
2874 2022-04-14 Jonathan Wakely <jwakely@redhat.com>
2877 * include/bits/stl_vector.h (__cpp_lib_constexpr_vector):
2879 * include/c_compatibility/stdatomic.h (__cpp_lib_stdatomic_h):
2881 * include/std/optional (__cpp_lib_optional): Define new value
2883 (__cpp_lib_monadic_optional): Remove.
2884 * include/std/version (__cpp_lib_constexpr_vector): Define.
2885 (__cpp_lib_stdatomic_h): Define.
2886 (__cpp_lib_optional): Define new value for C++23.
2887 (__cpp_lib_monadic_optional): Remove.
2888 * testsuite/20_util/optional/monadic/and_then.cc: Adjust.
2889 * testsuite/20_util/optional/requirements.cc: Adjust for C++23.
2890 * testsuite/20_util/optional/version.cc: Likewise.
2891 * testsuite/23_containers/vector/cons/constexpr.cc: Check
2893 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc:
2895 * testsuite/20_util/optional/monadic/version.cc: Removed.
2896 * testsuite/23_containers/vector/requirements/version.cc: New test.
2897 * testsuite/29_atomics/headers/stdatomic.h/version.cc: New test.
2899 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
2901 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): Check for mmap.
2902 * config.h.in: Regenerate.
2903 * configure: Regenerate.
2905 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
2907 * include/std/stacktrace (basic_stacktrace::current): Reallocate
2908 a smaller container if the unused capacity is larger than the
2911 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
2913 * include/std/stacktrace (basic_stacktrace): Use _Impl::_M_clone
2914 or _Impl::_M_assign to initialize elements in allocated storage.
2915 (basic_stacktrace::_M_clear()): Use _Impl::_M_resize instead of
2917 (basic_stacktrace::_Impl::_M_destroy()): Replace with ...
2918 (basic_stacktrace::_Impl::_M_resize(size_type, allocator&)): New
2920 (basic_stacktrace::_Impl::_M_push_back): Use _M_xclone. Construct
2921 new element using allocator.
2922 (basic_stacktrace::_Impl::_M_clone): New function.
2923 (basic_stacktrace::_Impl::_M_xclone): New function.
2924 (basic_stacktrace::_Impl::_M_assign): New function.
2926 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
2928 * include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
2929 Use nothrow new instead of try block for std::allocator.
2930 (basic_stacktrace::_Impl::_M_deallocate): Use delete for
2933 2022-04-12 Jonathan Wakely <jwakely@redhat.com>
2935 * include/std/stacktrace (basic_stacktrace::current): Replace
2936 calls to _M_reserve and _S_curr_cb with call to _M_prepare.
2937 Check return value of backtrace_simple when max depth given.
2938 (basic_stacktrace::_M_reserve): Remove.
2939 (basic_stacktrace::_S_curr_cb): Remove.
2940 (basic_stacktrace::_M_prepare(size_type)): New function to
2941 reserve initial capacity and return callback.
2942 (basic_stacktrace::_Impl::_M_allocate): Remove check for 0 < n
2943 and remove redundant zeroing of _M_frames and _M_capacity.
2944 (basic_stacktrace::_Impl::_M_push_back): Add [[unlikely]]
2945 attribute. Assign _Impl instead of swapping.
2946 * testsuite/19_diagnostics/stacktrace/current.cc: New test.
2948 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
2950 * include/std/stacktrace (basic_stacktrace::_Impl::_M_allocate):
2951 Change [[unlikely]] attribute to [[likely]].
2953 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
2956 * include/std/stacktrace (basic_stacktrace::basic_stacktrace):
2957 Fix allocator usage in constructors.
2958 (basic_stacktrace::operator=(const basic_stacktrace&)): Do not
2959 try to reallocate using const allocator.
2960 (basic_stacktrace::operator=(basic_stacktrace&&)): Fix
2961 if-constexpr with non-constant condition. Do not allocate new
2962 storage if allocator propagates. Do not set _M_size if
2964 (basic_stacktrace::swap(basic_stacktrace&)): Fix typo. Add
2965 assertion that non-propagating allocators are equal.
2966 * testsuite/19_diagnostics/stacktrace/stacktrace.cc: New test.
2968 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
2970 * include/std/stacktrace (basic_stacktrace::current): Duplicate
2971 implementation into each overload. Add noinline attribute and
2973 (basic_stacktrace::max_size()): Call _Impl::_S_max_size.
2974 (basic_stacktrace::_S_curr_cb()): New function defining lambda.
2975 (basic_stacktrace::_Impl::_S_max_size): New function defining
2976 maximum size in terms of allocator and size_type.
2977 (basic_stacktrace::_Impl::_M_allocate): Check against
2979 * testsuite/19_diagnostics/stacktrace/entry.cc: Call function
2980 for non-constexpr checks. Check line number is correct.
2982 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
2984 * testsuite/20_util/stacktrace/entry.cc: Moved to...
2985 * testsuite/19_diagnostics/stacktrace/entry.cc: ...here.
2986 * testsuite/20_util/stacktrace/synopsis.cc: Moved to...
2987 * testsuite/19_diagnostics/stacktrace/synopsis.cc: ...here.
2988 * testsuite/20_util/stacktrace/version.cc: Moved to...
2989 * testsuite/19_diagnostics/stacktrace/version.cc: ...here.
2991 2022-04-11 Jonathan Wakely <jwakely@redhat.com>
2993 * include/experimental/bits/fs_path.h (path): Define special
2994 members after path::_Cmpt is complete.
2996 2022-04-08 Jonathan Wakely <jwakely@redhat.com>
2999 * include/std/expected
3000 (expected<void,E>::expected(expected<U,G>&&)): Fix constraints.
3001 * testsuite/20_util/expected/cons.cc: Check constructor.
3003 2022-04-08 Jonathan Wakely <jwakely@redhat.com>
3006 * include/std/expected (expected<void, E>::swap): Set
3007 _M_has_value to false for objects that previously had a value.
3008 * testsuite/20_util/expected/swap.cc: Fix test to check void
3011 2022-04-08 Jonathan Wakely <jwakely@redhat.com>
3014 * include/std/expected (bad_expected_access): Move constructor
3016 * testsuite/20_util/expected/bad.cc: New test.
3018 2022-04-07 Hans-Peter Nilsson <hp@axis.com>
3020 * testsuite/20_util/expected/requirements.cc: Correct minimal-size
3023 2022-04-02 Jakub Jelinek <jakub@redhat.com>
3026 * include/std/source_location (std::source_location::__impl): Move
3027 definition before using __builtin_ret_type.
3029 2022-04-01 Jonathan Wakely <jwakely@redhat.com>
3031 * include/std/utility (unreachable): Define for C++23.
3032 * include/std/version (__cpp_lib_unreachable): Define.
3033 * src/c++11/debug.cc (__glibcxx_assert_fail): Check for valid
3034 arguments. Handle only the function being given.
3035 * testsuite/20_util/unreachable/1.cc: New test.
3036 * testsuite/20_util/unreachable/version.cc: New test.
3038 2022-04-01 Jonathan Wakely <jwakely@redhat.com>
3040 * include/experimental/bits/fs_fwd.h (copy_file): Remove
3041 incorrect noexcept from declaration.
3042 * include/experimental/bits/fs_path.h (path::begin, path::end):
3043 Add noexcept to declarations, to match definitions.
3045 2022-04-01 Timm Bäder <tbaeder@redhat.com>
3047 * include/bits/fs_ops.h: Fix filename in Doxygen comment.
3048 * include/experimental/bits/fs_ops.h: Likewise.
3050 2022-03-31 Jonathan Wakely <jwakely@redhat.com>
3052 * libsupc++/new_opa.cc (aligned_alloc): Add comment.
3054 2022-03-29 Jonathan Wakely <jwakely@redhat.com>
3056 * testsuite/18_support/exception/38732.cc: Disable for C++23.
3057 * testsuite/18_support/headers/exception/synopsis.cc: Likewise.
3058 * testsuite/18_support/unexpected_handler.cc: Likewise.
3060 2022-03-29 Jonathan Wakely <jwakely@redhat.com>
3062 * libsupc++/compare (_Strong_order) [!__cpp_using_enum]: Add
3063 static data members for _Fp_fmt enumerators.
3065 2022-03-29 Jonathan Wakely <jwakely@redhat.com>
3067 * include/std/version (__cpp_lib_variant): Fix conditions to
3069 (__cpp_lib_expected): Fix condition to match <expected>.
3071 2022-03-28 Jonathan Wakely <jwakely@redhat.com>
3073 * testsuite/20_util/optional/monadic/and_then.cc: Fix typo.
3074 * testsuite/20_util/optional/monadic/transform.cc: Likewise.
3075 * testsuite/22_locale/codecvt/always_noconv/char/1.cc: Likewise.
3076 * testsuite/22_locale/codecvt/encoding/char/1.cc: Likewise.
3077 * testsuite/22_locale/codecvt/in/char/1.cc: Likewise.
3078 * testsuite/22_locale/codecvt/max_length/char/1.cc: Likewise.
3079 * testsuite/22_locale/codecvt/out/char/1.cc: Likewise.
3080 * testsuite/22_locale/codecvt/unshift/char/1.cc: Likewise.
3082 2022-03-27 Jonathan Wakely <jwakely@redhat.com>
3084 * doc/doxygen/user.cfg.in: Add new header.
3085 * include/Makefile.am: Likewise.
3086 * include/Makefile.in: Regenerate.
3087 * include/precompiled/stdc++.h: Add new header.
3088 * include/std/version (__cpp_lib_expected): Define.
3089 * libsupc++/exception [__cplusplus > 202002] (unexpected)
3090 (unexpected_handler, set_unexpected): Do not declare for C++23.
3091 * include/std/expected: New file.
3092 * testsuite/20_util/expected/assign.cc: New test.
3093 * testsuite/20_util/expected/cons.cc: New test.
3094 * testsuite/20_util/expected/illformed_neg.cc: New test.
3095 * testsuite/20_util/expected/observers.cc: New test.
3096 * testsuite/20_util/expected/requirements.cc: New test.
3097 * testsuite/20_util/expected/swap.cc: New test.
3098 * testsuite/20_util/expected/synopsis.cc: New test.
3099 * testsuite/20_util/expected/unexpected.cc: New test.
3100 * testsuite/20_util/expected/version.cc: New test.
3102 2022-03-25 Jonathan Wakely <jwakely@redhat.com>
3104 * include/std/bit (bit_cast, byteswap, endian): Add doxygen
3107 2022-03-23 Jonathan Wakely <jwakely@redhat.com>
3110 * include/std/bit (bit_cast): Add constraints.
3111 * testsuite/26_numerics/bit/bit.cast/105027.cc: New test.
3113 2022-03-23 Jonathan Wakely <jwakely@redhat.com>
3115 * include/std/version [!_GLIBCXX_HOSTED]
3116 (__cpp_lib_hardware_interference_size): Define for freestanding.
3117 (__cpp_lib_bit_cast): Likewise.
3118 (__cpp_lib_is_layout_compatible): Likewise.
3119 (__cpp_lib_is_pointer_interconvertible): Likewise.
3120 (__cpp_lib_adaptor_iterator_pair_constructor): Do not define for
3122 (__cpp_lib_invoke_r): Likewise.
3123 (__cpp_lib_ios_noreplace): Likewise.
3124 (__cpp_lib_monadic_optional): Likewise.
3125 (__cpp_lib_move_only_function): Likewise.
3126 (__cpp_lib_spanstream): Likewise.
3127 (__cpp_lib_stacktrace): Likewise.
3128 (__cpp_lib_string_contains): Likewise.
3129 (__cpp_lib_string_resize_and_overwrite): Likewise.
3130 (__cpp_lib_to_underlying): Likewise.
3132 2022-03-23 Jonathan Wakely <jwakely@redhat.com>
3135 * include/bits/atomic_base.h [!_GLIBCXX_HOSTED]: Do not include
3136 <bits/atomic_wait.h> for freestanding.
3138 2022-03-22 Hans-Peter Nilsson <hp@axis.com>
3140 * testsuite/20_util/from_chars/6.cc (test01) [FE_DOWNWARD]:
3141 Conditionalize call to fesetround.
3143 2022-03-21 Jakub Jelinek <jakub@redhat.com>
3146 * include/bits/locale_facets_nonio.tcc (get): Don't check if do_get
3147 isn't overloaded if __clang__ is defined.
3149 2022-03-18 Jonathan Wakely <jwakely@redhat.com>
3152 * include/std/any (any(T&&)): Revert change to constraints.
3153 * testsuite/20_util/any/cons/104242.cc: New test.
3155 2022-03-18 Jonathan Wakely <jwakely@redhat.com>
3158 * include/pstl/glue_algorithm_defs.h: Replace <functional> with
3160 * include/pstl/utils.h: Replace <iterator> with <type_traits>.
3161 (__pstl::__internal::__except_handler): Use std::__terminate
3162 instead of std::terminate.
3163 * src/c++17/fs_path.cc: Include <array>.
3164 * testsuite/25_algorithms/adjacent_find/constexpr.cc: Include
3166 * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
3167 * testsuite/25_algorithms/clamp/constrained.cc: Likewise.
3168 * testsuite/25_algorithms/equal/constrained.cc: Likewise.
3169 * testsuite/25_algorithms/for_each/constrained.cc: Likewise.
3170 * testsuite/25_algorithms/includes/constrained.cc: Likewise.
3171 * testsuite/25_algorithms/is_heap/constexpr.cc: Likewise.
3172 * testsuite/25_algorithms/is_heap_until/constexpr.cc: Likewise.
3173 * testsuite/25_algorithms/is_permutation/constrained.cc: Include
3175 * testsuite/25_algorithms/is_sorted/constexpr.cc: Include
3177 * testsuite/25_algorithms/is_sorted_until/constexpr.cc:
3179 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
3181 * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
3183 * testsuite/25_algorithms/lexicographical_compare_three_way/1.cc:
3185 * testsuite/25_algorithms/lower_bound/constexpr.cc: Include
3187 * testsuite/25_algorithms/max/constrained.cc: Likewise.
3188 * testsuite/25_algorithms/max_element/constrained.cc: Likewise.
3189 * testsuite/25_algorithms/min/constrained.cc: Likewise.
3190 * testsuite/25_algorithms/min_element/constrained.cc: Likewise.
3191 * testsuite/25_algorithms/minmax_element/constrained.cc:
3193 * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
3194 * testsuite/25_algorithms/move/93872.cc: Likewise.
3195 * testsuite/25_algorithms/move_backward/93872.cc: Include
3197 * testsuite/25_algorithms/nth_element/constexpr.cc: Include
3199 * testsuite/25_algorithms/partial_sort/constexpr.cc: Likewise.
3200 * testsuite/25_algorithms/partial_sort_copy/constexpr.cc:
3202 * testsuite/25_algorithms/search/constexpr.cc: Likewise.
3203 * testsuite/25_algorithms/search_n/constrained.cc: Likewise.
3204 * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
3205 * testsuite/25_algorithms/set_difference/constrained.cc:
3207 * testsuite/25_algorithms/set_intersection/constexpr.cc:
3209 * testsuite/25_algorithms/set_intersection/constrained.cc:
3211 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
3213 * testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
3214 * testsuite/25_algorithms/set_union/constrained.cc: Likewise.
3215 * testsuite/25_algorithms/sort/constexpr.cc: Likewise.
3216 * testsuite/25_algorithms/sort_heap/constexpr.cc: Likewise.
3217 * testsuite/25_algorithms/transform/constrained.cc: Likewise.
3218 * testsuite/25_algorithms/unique/constexpr.cc: Likewise.
3219 * testsuite/25_algorithms/unique/constrained.cc: Likewise.
3220 * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
3221 * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
3222 * testsuite/std/ranges/adaptors/elements.cc: Include <vector>.
3223 * testsuite/std/ranges/adaptors/lazy_split.cc: Likewise.
3224 * testsuite/std/ranges/adaptors/split.cc: Likewise.
3226 2022-03-17 Jonathan Wakely <jwakely@redhat.com>
3229 * include/bits/fs_path.h (path::make_preferred): Use
3230 handwritten loop instead of std::replace.
3232 2022-03-17 Jonathan Wakely <jwakely@redhat.com>
3234 PR middle-end/104966
3235 * include/bits/locale_facets_nonio.tcc
3236 (__moneypunct_cache::_M_cache): Replace try-catch with RAII and
3237 make all string copies before any stores to *this.
3239 2022-03-17 Jonathan Wakely <jwakely@redhat.com>
3241 * testsuite/util/testsuite_character.h: Fix comment.
3243 2022-03-16 Jonathan Wakely <jwakely@redhat.com>
3246 * config/abi/pre/gnu.ver: Make version for std::from_chars
3247 depend on HAVE_USELOCALE macro.
3248 * testsuite/util/testsuite_abi.cc (compare_symbols): Treat
3249 std::from_chars for floating-point types as undesignated if
3250 not found in the baseline symbols file.
3252 2022-03-16 Jonathan Wakely <jwakely@redhat.com>
3254 * include/std/charconv (__cpp_lib_to_chars): Only define when
3255 both from_chars and to_chars are supported for floating-point
3257 (from_chars, to_chars): Adjust preprocessor conditions guarding
3259 * include/std/version (__cpp_lib_to_chars): Adjust condition to
3260 match <charconv> definition.
3261 * src/c++17/floating_from_chars.cc (from_chars_strtod): New
3263 (from_chars): Simplify preprocessor checks and use
3264 from_chars_strtod when appropriate.
3266 2022-03-14 Jonathan Wakely <jwakely@redhat.com>
3269 * src/c++11/codecvt.cc (read_utf8_code_point): Use char32_t to
3270 hold octets that will be left-shifted.
3272 2022-03-10 Jonathan Wakely <jwakely@redhat.com>
3275 * src/c++17/floating_from_chars.cc: Check __SIZE_WIDTH__ >= 32
3276 before using fast_float.
3278 2022-03-10 Detlef Vollmann <dv@vollmann.ch>
3281 * include/bits/this_thread_sleep.h: Fix order of #endif and
3282 closing brace of namespace.
3284 2022-03-10 Jonathan Wakely <jwakely@redhat.com>
3286 * libsupc++/compare (_Strong_order::_S_fp_cmp) [__vax__]:
3289 2022-03-10 Jonathan Wakely <jwakely@redhat.com>
3291 * libsupc++/compare (_Strong_ordering::_S_fp_cmp) [__vax__]: Use
3294 2022-03-09 Patrick Palka <ppalka@redhat.com>
3297 * src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
3298 Be explicit when narrowing the shifted effective_mantissa,
3299 since it may have an integer-class type.
3301 2022-03-08 Jonathan Wakely <jwakely@redhat.com>
3303 * include/bits/uses_allocator_args.h: Remove incorrect copyright
3306 2022-03-07 Jonathan Wakely <jwakely@redhat.com>
3309 * include/bits/c++config (__terminate, __glibcxx_assert_fail):
3310 Replace _GLIBCXX_VISIBILITY on function with visibility pragma.
3311 (__is_constant_evaluated): Add visibility pragma.
3313 2022-03-07 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
3315 * config/locale/vxworks/ctype_members.cc: Remove <iostream>
3318 2022-03-05 Jonathan Wakely <jwakely@redhat.com>
3320 * include/bits/c++config (__glibcxx_assert_fail): Add visibility
3322 (__terminate): Likewise.
3324 2022-03-04 Jonathan Wakely <jwakely@redhat.com>
3326 * libsupc++/compare (strong_order::_S_fp_cmp): Move typedef
3327 inside #if condition.
3329 2022-03-03 Jonathan Wakely <jwakely@redhat.com>
3332 * testsuite/std/ranges/adaptors/all.cc: Use non-debug vector for
3335 2022-03-03 Jonathan Wakely <jwakely@redhat.com>
3337 * testsuite/17_intro/names.cc (func): Undef on AIX.
3339 2022-03-03 Jonathan Wakely <jwakely@redhat.com>
3342 * libsupc++/compare (strong_order): Add missing support for
3343 floating-point types.
3344 * testsuite/18_support/comparisons/algorithms/strong_order_floats.cc:
3347 2022-03-01 Jonathan Wakely <jwakely@redhat.com>
3349 PR middle-end/103984
3350 * include/bits/regex_compiler.h (_BracketMatcher::_M_char): Use
3351 default member initializer.
3353 2022-02-24 Jonathan Wakely <jwakely@redhat.com>
3356 * include/std/source_location (source_location::current): Use
3357 deduced type of __builtin_source_location().
3359 2022-02-22 Patrick Palka <ppalka@redhat.com>
3361 * include/bits/ranges_base.h (__detail::__is_initializer_list):
3363 (viewable_range): Adjust as per P2415R2.
3364 * include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value.
3365 * include/std/ranges (owning_view): Define as per P2415R2.
3366 (enable_borrowed_range<owning_view>): Likewise.
3367 (views::__detail::__can_subrange): Replace with ...
3368 (views::__detail::__can_owning_view): ... this.
3369 (views::_All::_S_noexcept): Sync with operator().
3370 (views::_All::operator()): Use owning_view instead of subrange
3372 * include/std/version (__cpp_lib_ranges): Adjust value.
3373 * testsuite/std/ranges/adaptors/all.cc (test06): Adjust now that
3374 views::all uses owning_view instead of subrange.
3376 * testsuite/std/ranges/adaptors/lazy_split.cc (test09): Adjust
3377 now that rvalue non-view non-borrowed ranges are viewable.
3378 * testsuite/std/ranges/adaptors/split.cc (test06): Likewise.
3380 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
3383 * doc/xml/manual/evolution.xml: Document deprecation.
3384 * doc/html/manual/api.html: Regenerate.
3385 * include/bits/stl_bvector.h (insert(const_iterator, const bool&)):
3386 Remove default argument.
3387 (insert(const_iterator)): New overload with deprecated attribute.
3388 * testsuite/23_containers/vector/bool/modifiers/insert/104559.cc:
3391 2022-02-17 Jonathan Wakely <jwakely@redhat.com>
3393 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Replace
3394 code that call cat->name() on std::error_category objects.
3395 Identify known categories by symbol name and use a hardcoded
3396 name. Print error code values as enumerators where appopriate.
3397 * testsuite/libstdc++-prettyprinters/cxx11.cc: Adjust expected
3398 name of custom category. Check io_errc and future_errc errors.
3400 2022-02-15 Jonathan Wakely <jwakely@redhat.com>
3403 * include/bits/uses_allocator_args.h (make_obj_using_allocator)
3404 (uninitialized_construct_using_allocator): Add constexpr.
3405 * testsuite/20_util/uses_allocator/make_obj.cc: Check constexpr.
3406 * testsuite/20_util/uses_allocator/uninitialized_construct.cc: New test.
3408 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
3411 * config/locale/gnu/c_locale.h (__convert_from_v): Use inline
3412 namespace for IEEE128 long double mode.
3413 * config/os/gnu-linux/ldbl-ieee128-extra.ver: Add new symbol
3414 version and export __gnu_cxx_ieee128::__convert_from_v.
3415 * include/bits/locale_facets_nonio.tcc (money_put::__do_put):
3416 Make __ibm128 overload use snprintf directly
3417 * testsuite/util/testsuite_abi.cc: Add new symbol version.
3418 Remove stable IEEE128/LDBL versions.
3420 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
3423 * include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
3425 * include/std/variant: Check feature test macros instead.
3426 * include/std/version: Likewise.
3428 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
3430 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
3433 2022-02-14 Jonathan Wakely <jwakely@redhat.com>
3435 * src/c++17/floating_to_chars.cc (FLOAT128_TO_CHARS): Depend on
3436 LONG_DOUBLE_ALT128_COMPAT instead of USE_FLOAT128.
3438 2022-02-11 Jonathan Wakely <jwakely@redhat.com>
3440 * testsuite/20_util/temporary_buffer.cc: Fix dg-warning target
3443 2022-02-11 Jonathan Wakely <jwakely@redhat.com>
3445 * testsuite/20_util/monotonic_buffer_resource/allocate.cc:
3446 Ignore -Walloc-larger-than warning.
3447 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
3449 * testsuite/29_atomics/atomic/cons/user_pod.cc: Compile with -O1
3450 to avoid linker error for __atomic_is_lock_free.
3452 2022-02-10 Thomas Rodgers <rodgert@appliantology.com>
3454 * include/bits/atomic_wait.h (__waiter_base::_S_do_spin,
3455 __waiter_base::_S_do_spin_v): Change memory order from relaxed
3458 2022-02-10 Jonathan Wakely <jwakely@redhat.com>
3460 * include/c_compatibility/stdatomic.h (atomic_fetch_xor): Add
3462 (atomic_fetch_xor_explicit): Likewise.
3463 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Check
3464 arithmetic and logical operations for atomic_int.
3466 2022-02-10 Jonathan Wakely <jwakely@redhat.com>
3468 * src/filesystem/dir-common.h (_GLIBCXX_HAVE_DIRFD): Undefine
3469 when <dirent.h> is not available.
3470 (_GLIBCXX_HAVE_UNLINKAT): Likewise.
3472 2022-02-09 Thomas Rodgers <rodgert@appliantology.com>
3475 * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): Move spin
3476 loop inside do loop so that threads failing the wait, reload
3479 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
3481 * src/c++17/fs_dir.cc (_Dir(DIR*, const path&)): Change first
3482 parameter to _Dir_base&&.
3483 * src/filesystem/dir-common.h (_Dir_base(DIR*)): Remove.
3484 * src/filesystem/dir.cc (_Dir(DIR*, const path&)): Change first
3485 parameter to _Dir_base&&.
3487 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
3489 * acinclude.m4 (GLIBCXX_ENABLE_LOCK_POLICY): Add comment about
3490 checking for CAS on correct word size.
3492 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
3494 * testsuite/experimental/filesystem/operations/create_directories.cc:
3495 Adjust expected results for Windows.
3497 2022-02-08 Jonathan Wakely <jwakely@redhat.com>
3500 * src/c++17/fs_dir.cc (fs::recursive_directory_iterator::__erase):
3501 [i_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Refresh entry._M_type member,
3502 instead of checking for errno values indicating a directory.
3503 * src/c++17/fs_ops.cc (fs::remove_all(const path&)): Use similar
3504 logic to non-throwing overload.
3505 (fs::remove_all(const path&, error_code&)): Add comments.
3506 * src/filesystem/ops-common.h: Likewise.
3508 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
3510 * src/filesystem/dir-common.h (_Dir_base::openat): Change return
3511 type to use portable posix::DIR alias.
3513 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
3515 * include/c_compatibility/stdatomic.h [__clang__]: Use
3516 #include_next <stdatomic.h>.
3518 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
3520 * include/experimental/bits/fs_ops.h (fs::copy_file): Remove
3522 (fs::create_directories): Likewise.
3523 (fs::remove_all): Likewise.
3524 * src/filesystem/ops.cc (fs::copy_file): Remove noexcept.
3525 (fs::create_directories): Likewise.
3526 (fs::remove_all): Likewise.
3528 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
3531 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for dirfd
3533 * config.h.in: Regenerate.
3534 * configure: Regenerate.
3535 * include/bits/fs_dir.h (recursive_directory_iterator): Declare
3536 remove_all overloads as friends.
3537 (recursive_directory_iterator::__erase): Declare new member
3539 * include/bits/fs_fwd.h (remove, remove_all): Declare.
3540 * src/c++17/fs_dir.cc (_Dir): Add filename_only parameter to
3541 constructor. Pass file descriptor argument to base constructor.
3542 (_Dir::dir_and_pathname, _Dir::open_subdir, _Dir::do_unlink)
3543 (_Dir::unlink, _Dir::rmdir): Define new member functions.
3544 (directory_iterator): Pass filename_only argument to _Dir
3546 (recursive_directory_iterator::_Dir_stack): Adjust constructor
3547 parameters to take a _Dir rvalue instead of creating one.
3548 (_Dir_stack::orig): Add data member for storing original path.
3549 (_Dir_stack::report_error): Define new member function.
3550 (__directory_iterator_nofollow): Move here from dir-common.h and
3551 fix value to be a power of two.
3552 (__directory_iterator_filename_only): Define new constant.
3553 (recursive_directory_iterator): Construct _Dir object and move
3554 into _M_dirs stack. Pass skip_permission_denied argument to first
3556 (recursive_directory_iterator::increment): Use _Dir::open_subdir.
3557 (recursive_directory_iterator::__erase): Define new member
3559 * src/c++17/fs_ops.cc (ErrorReporter, do_remove_all): Remove.
3560 (fs::remove_all): Use new recursive_directory_iterator::__erase
3562 * src/filesystem/dir-common.h (_Dir_base): Add int parameter to
3563 constructor and use openat to implement nofollow semantics.
3564 (_Dir_base::fdcwd, _Dir_base::set_close_on_exec, _Dir_base::openat):
3565 Define new member functions.
3566 (__directory_iterator_nofollow): Move to fs_dir.cc.
3567 * src/filesystem/dir.cc (_Dir): Pass file descriptor argument to
3569 (_Dir::dir_and_pathname, _Dir::open_subdir): Define new member
3571 (recursive_directory_iterator::_Dir_stack): Adjust constructor
3572 parameters to take a _Dir rvalue instead of creating one.
3573 (recursive_directory_iterator): Check for new nofollow option.
3574 Construct _Dir object and move into _M_dirs stack. Pass
3575 skip_permission_denied argument to first advance call.
3576 (recursive_directory_iterator::increment): Use _Dir::open_subdir.
3577 * src/filesystem/ops.cc (fs::remove_all): Use C++17 remove_all.
3579 2022-02-04 Jonathan Wakely <jwakely@redhat.com>
3581 * include/bits/allocator.h: Qualify std::allocator_traits in
3582 deprecated warnings.
3583 * libsupc++/exception (uncaught_exception): Add suggestion to
3586 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
3588 * src/c++17/fs_dir.cc (fs::recursive_directory_iterator::pop):
3589 Add [[maybe_unused]] attribute.
3590 * src/filesystem/dir.cc (fs::recursive_directory_iterator::pop):
3593 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
3595 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: Use
3596 custom comparison function for multiset.
3597 * testsuite/23_containers/set/operators/cmp_c++20.cc: Use custom
3598 comparison function for set.
3600 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
3602 * include/bits/boost_concept_check.h (_OutputIteratorConcept):
3603 Change member function to data member of function pointer type.
3605 2022-02-02 Martin Sebor <msebor@redhat.com>
3608 * include/std/array (begin): Declare const member function attribute
3610 (end, rbegin, rend, size, max_size, empty, data): Same.
3611 * testsuite/23_containers/array/capacity/empty.cc: Add test cases.
3612 * testsuite/23_containers/array/capacity/max_size.cc: Same.
3613 * testsuite/23_containers/array/capacity/size.cc: Same.
3614 * testsuite/23_containers/array/iterators/begin_end.cc: New test.
3616 2022-02-02 Jonathan Wakely <jwakely@redhat.com>
3618 * testsuite/27_io/filesystem/iterators/error_reporting.cc: Use
3619 autoconf macro to check whether d_type is present.
3620 * testsuite/experimental/filesystem/iterators/error_reporting.cc:
3623 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
3625 * testsuite/27_io/filesystem/iterators/97731.cc: New test.
3626 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3627 Check follow_directory_symlink option.
3628 * testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc:
3631 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
3633 * src/c++17/fs_dir.cc (recursive_directory_iterator::increment):
3634 Reset state to past-the-end iterator on error.
3635 (fs::recursive_directory_iterator::pop(error_code&)): Likewise.
3636 (fs::recursive_directory_iterator::pop()): Check _M_dirs before
3638 * src/filesystem/dir.cc (recursive_directory_iterator): Likewise,
3639 for the TS implementation.
3640 * testsuite/27_io/filesystem/iterators/error_reporting.cc: New test.
3641 * testsuite/experimental/filesystem/iterators/error_reporting.cc: New test.
3643 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
3645 * include/bits/fs_fwd.h (filesystem::perms): Fix comment.
3647 2022-02-01 Jonathan Wakely <jwakely@redhat.com>
3650 * acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Print different messages
3651 for stdio_pure and stdio_posix options.
3652 * configure: Regenerate.
3654 2022-02-01 Thomas Rodgers <rodgert@appliantology.com>
3656 * include/bits/atomic_wait.h: Change memory order from
3657 Acquire/Release with relaxed loads to SeqCst+Release for
3658 accesses to the waiter's count.
3660 2022-01-31 Martin Liska <mliska@suse.cz>
3662 * acinclude.m4: Detect *_ld_is_mold and use it.
3663 * configure: Regenerate.
3665 2022-01-30 Hans-Peter Nilsson <hp@axis.com>
3667 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: Don't run on
3669 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: Likewise.
3671 2022-01-27 Jonathan Wakely <jwakely@redhat.com>
3674 * include/bits/deque.tcc (_M_range_initialize<ForwardIterator>):
3675 Add __builtin_unreachable to loop.
3676 * testsuite/23_containers/deque/100516.cc: New test.
3678 2022-01-27 Jonathan Wakely <jwakely@redhat.com>
3680 * include/bits/ranges_base.h (ranges::advance): Avoid signed
3681 overflow. Do nothing if already equal to desired result.
3682 * testsuite/24_iterators/range_operations/advance_overflow.cc:
3685 2022-01-27 Martin Liska <mliska@suse.cz>
3688 * acinclude.m4: Fix typo.
3689 * configure: Regenerate.
3691 2022-01-25 Jonathan Wakely <jwakely@redhat.com>
3694 * include/bits/istream.tcc (basic_istream::sentry): Add braces
3696 * include/bits/shared_ptr_base.h (_Sp_counted_array_base::_M_init):
3697 Add pragmas to disable bogus warnings from PR 61596.
3699 2022-01-25 Jonathan Wakely <jwakely@redhat.com>
3702 * src/c++17/fs_ops.cc (_GNU_SOURCE): Define.
3703 * src/filesystem/dir.cc (_GNU_SOURCE): Define.
3704 * src/filesystem/ops.cc (_GNU_SOURCE): Define.
3706 2022-01-25 Jonathan Wakely <jwakely@redhat.com>
3709 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Check for
3711 * config.h.in: Regenerate.
3712 * configure: Regenerate.
3713 * src/c++17/fs_dir.cc (_Dir): Add nofollow flag to constructor
3714 and pass it to base class constructor.
3715 (directory_iterator): Pass nofollow flag to _Dir constructor.
3716 (fs::recursive_directory_iterator::increment): Likewise.
3717 * src/c++17/fs_ops.cc (do_remove_all): Use nofollow option for
3718 directory_iterator constructor. Move error check outside loop.
3719 * src/filesystem/dir-common.h (_Dir_base): Add nofollow flag to
3720 constructor and when it's set use ::open with O_NOFOLLOW and
3722 * src/filesystem/dir.cc (_Dir): Add nofollow flag to constructor
3723 and pass it to base class constructor.
3724 (directory_iterator): Pass nofollow flag to _Dir constructor.
3725 (fs::recursive_directory_iterator::increment): Likewise.
3726 * src/filesystem/ops.cc (remove_all): Use nofollow option for
3727 directory_iterator constructor. Move error check outside loop.
3729 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
3732 * include/std/spanstream (basic_spanbuf(basic_spanbuf&&)): Use
3733 mem-initializer for _M_buf.
3734 (basic_spanbuf::Operator=(basic_spanbuf&&)): Fix ill-formed
3736 * testsuite/27_io/spanstream/2.cc: New test.
3738 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
3740 * src/c++17/floating_from_chars.cc (USE_STRTOD_FOR_FROM_CHARS):
3741 Define macro for case where std::from_chars is implemented in
3742 terms of strtod, strtof or strtold.
3743 (buffer_resource, valid_fmt, find_end_of_float, pattern)
3744 (from_chars_impl, make_result, reserve_string): Do not define
3745 unless USE_STRTOD_FOR_FROM_CHARS is defined.
3746 (from_chars): Define when at least one of USE_LIB_FAST_FLOAT and
3747 USE_STRTOD_FOR_FROM_CHARS is defined, instead of
3748 _GLIBCXX_HAVE_USELOCALE. Use fast_float for long double when it
3751 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
3754 * include/bits/hashtable_policy.h (_Map_base): Add partial
3755 specialization for maps with const key types.
3756 * testsuite/23_containers/unordered_map/104174.cc: New test.
3758 2022-01-23 Jonathan Wakely <jwakely@redhat.com>
3761 * include/bits/shared_ptr_base.h (_Sp_counted_base<>::_M_release):
3762 Set members to zero without type punning.
3764 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
3766 * testsuite/20_util/shared_ptr/cons/array.cc: Fix comment.
3768 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
3772 * include/bits/alloc_traits.h (__cpp_lib_allocator_traits_is_always_equal):
3773 Define as type long.
3774 * include/bits/allocator.h (__cpp_lib_incomplete_container_elements):
3776 * include/bits/basic_string.h (__cpp_lib_string_udls): Likewise.
3777 * include/bits/chrono.h (__cpp_lib_chrono): Likewise.
3778 (__cpp_lib_chrono_udls): Likewise.
3779 * include/bits/move.h (__cpp_lib_addressof_constexpr): Likewise.
3780 * include/bits/node_handle.h (__cpp_lib_node_extract): Likewise.
3781 * include/bits/range_access.h (__cpp_lib_nonmember_container_access):
3783 * include/bits/shared_ptr.h (__cpp_lib_enable_shared_from_this):
3785 * include/bits/stl_algo.h (__cpp_lib_clamp): Likewise.
3786 (__cpp_lib_sample): Likewise.
3787 * include/bits/stl_algobase.h (__cpp_lib_robust_nonmodifying_seq_ops):
3789 * include/bits/stl_function.h (__cpp_lib_transparent_operators):
3791 * include/bits/stl_iterator.h (__cpp_lib_make_reverse_iterator):
3793 * include/bits/stl_map.h (__cpp_lib_map_try_emplace):
3795 * include/bits/stl_tree.h (__cpp_lib_generic_associative_lookup):
3797 * include/bits/unique_ptr.h (__cpp_lib_make_unique):
3799 * include/bits/unordered_map.h (__cpp_lib_unordered_map_try_emplace):
3801 * include/c_global/cmath (__cpp_lib_hypot): Likewise.
3802 * include/c_global/cstddef (__cpp_lib_byte): Likewise.
3803 * include/std/atomic (__cpp_lib_atomic_is_always_lock_free):
3805 * include/std/complex (__cpp_lib_complex_udls): Likewise.
3806 * include/std/filesystem (__cpp_lib_filesystem): Likewise.
3807 * include/std/functional (__cpp_lib_not_fn): Likewise.
3808 (__cpp_lib_boyer_moore_searcher): Likewise.
3809 * include/std/iomanip (__cpp_lib_quoted_string_io): Likewise.
3810 * include/std/mutex (__cpp_lib_scoped_lock): Likewise.
3811 * include/std/numeric (__cpp_lib_gcd_lcm): Likewise.
3812 (__cpp_lib_gcd, __cpp_lib_lcm): Likewise.
3813 * include/std/tuple (__cpp_lib_apply): Likewise.
3814 (__cpp_lib_make_from_tuple): Likewise.
3815 * include/std/type_traits (__cpp_lib_integral_constant_callable)
3816 (__cpp_lib_bool_constant, __cpp_lib_logical_traits)
3817 (__cpp_lib_is_null_pointer, __cpp_lib_transformation_trait_aliases)
3818 (__cpp_lib_result_of_sfinae, __cpp_lib_void_t)
3819 (__cpp_lib_is_swappable, __cpp_lib_is_invocable)
3820 (__cpp_lib_has_unique_object_representations)
3821 (__cpp_lib_is_aggregate): Likewise.
3822 * include/std/version: Likewise.
3823 * libsupc++/new (__cpp_lib_launder): Likewise.
3825 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
3827 * include/std/version (__cpp_lib_shared_ptr_arrays): Fix
3828 condition for C++17 definition.
3830 2022-01-21 Jonathan Wakely <jwakely@redhat.com>
3832 * include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count):
3834 (_Sp_atomic::_M_ptr): Add default member-initializer.
3835 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc:
3836 Check constant initialization.
3837 * testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: Likewise.
3839 2022-01-20 Jonathan Wakely <jwakely@redhat.com>
3841 * src/c++11/cxx11-ios_failure.cc (__constinit): Define as
3842 equivalent attribute for Clang.
3843 * src/c++11/future.cc (__constinit): Likewise.
3844 * src/c++11/system_error.cc (__constinit): Likewise.
3845 * src/c++17/memory_resource.cc (__constinit): Likewise.
3847 2022-01-20 Jonathan Wakely <jwakely@redhat.com>
3849 * scripts/testsuite_flags.in: Only add src/filesystem/.libs and
3850 src/libbacktrace/.libs to LDFLAGS if those directories exist.
3852 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3854 * configure.ac (GLIBCXX_ENABLE_DEBUG_FLAGS): Remove -gdwarf-4
3856 * configure: Regenerate.
3858 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3861 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: Include
3864 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3866 * scripts/testsuite_flags.in: Add src/libbacktrace/.libs to
3867 linker search paths.
3868 * src/Makefile.am: Fix src/debug/libbacktrace build.
3869 * src/Makefile.in: Regenerate.
3870 * src/libbacktrace/Makefile.am: Use per-library CPPFLAGS
3871 variable. Use symlinks for the source files.
3872 * src/libbacktrace/Makefile.in: Regenerate.
3874 2022-01-19 Matthias Kretz <m.kretz@gsi.de>
3876 * include/experimental/bits/simd.h (__floating_point_flags): Do
3877 not rely on math_errhandling to expand to a constant expression.
3879 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3881 * doc/xml/manual/evolution.xml: Document deprecations.
3882 * doc/xml/manual/status_cxx2017.xml: Update status.
3883 * doc/html/*: Regenerate.
3885 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3887 * include/bits/stl_tempbuf.h (get_temporary_buffer): Change
3888 _GLIBCXX14_DEPRECATED to _GLIBCXX17_DEPRECATED.
3890 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3892 * include/bits/stl_pair.h (_PCC::_DeprConsPair): Remove unused
3895 2022-01-19 Jonathan Wakely <jwakely@redhat.com>
3898 * include/bits/shared_ptr_atomic.h (_Sp_atomic::_Atomic_count::lock):
3899 Only use __thread_relax if __cpp_lib_atomic_wait is defined.
3901 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3904 * include/bits/basic_string.h (basic_string(nullptr_t)): Only
3906 (operator=(nullptr_t)): Likewise.
3907 * include/bits/cow_string.h: Likewise.
3908 * include/std/string_view (basic_string_view(nullptr_t)):
3910 * testsuite/21_strings/basic_string/cons/char/nullptr.cc: Adjust
3911 expected error. Add examples that become ill-formed in C++23.
3912 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
3913 Adjust expected errors.
3914 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
3917 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3920 * include/bits/stl_iterator.h (reverse_iterator): Check
3921 __cpp_lib_concepts instead of __cplusplus.
3923 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3926 * include/bits/stl_pair.h (pair): Adjust constraints on
3927 deprecated constructors accepting literal zero as null pointer
3928 constant. Improve wording of deprecated attribute.
3929 * testsuite/20_util/pair/cons/99957.cc: Check that deprecated
3930 constructors do not cause ambiguities for copyable types.
3932 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3934 * include/bits/stl_function.h (ptr_fun): Fix suggestion for
3935 non-deprecated alternative.
3937 2022-01-18 Tom Honermann <tom@honermann.net>
3939 * acinclude.m4: Define config macros if uchar.h provides
3940 c8rtomb() and mbrtoc8().
3941 * config.h.in: Regenerate.
3942 * configure: Regenerate.
3943 * include/c_compatibility/uchar.h (c8rtomb, mbrtoc8): Define.
3944 * include/c_global/cuchar (c8rtomb, mbrtoc8): Likewise.
3945 * include/c_std/cuchar (c8rtomb, mbrtoc8): Likewise.
3946 * testsuite/21_strings/headers/cuchar/functions_std_cxx20.cc:
3948 * testsuite/21_strings/headers/cuchar/functions_std_fchar8_t.cc:
3951 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3953 * include/Makefile.am: Install new header.
3954 * include/Makefile.in: Regenerate.
3955 * include/c_compatibility/stdatomic.h: New file.
3956 * testsuite/29_atomics/headers/stdatomic.h/c_compat.cc: New test.
3958 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3961 * src/c++17/fast_float/LOCAL_PATCHES: Update.
3962 * src/c++17/fast_float/fast_float.h (FASTFLOAT_IS_BIG_ENDIAN):
3963 Define in terms of __BYTE_ORDER__.
3965 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3968 * src/c++17/fast_float/LOCAL_PATCHES: UPDATE.
3969 * src/c++17/fast_float/fast_float.h (round): Use explicit
3970 template argument list for std::min.
3972 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3974 * doc/xml/manual/status_cxx2017.xml: Update C++17 status.
3975 * doc/xml/manual/status_cxx2020.xml: Use 12.1 instead of 12 for
3977 * doc/html/manual/status.html: Regenerate.
3979 2022-01-18 Jonathan Wakely <jwakely@redhat.com>
3981 * acinclude.m4 (GLIBCXX_ENABLE_FULLY_DYNAMIC_STRING): Improve
3983 * configure: Regenerate.
3985 2022-01-17 Patrick Palka <ppalka@redhat.com>
3987 * src/c++17/floating_from_chars.cc: (USE_LIB_FAST_FLOAT):
3988 Conditionally define, and use it to conditionally include
3990 (from_chars): Use fast_float for float and double when
3993 2022-01-17 Patrick Palka <ppalka@redhat.com>
3995 * src/c++17/fast_float/LOCAL_PATCHES: Update.
3996 * src/c++17/fast_float/fast_float.h (from_chars_advanced): In
3997 case of over/underflow, return errc::result_out_of_range and don't
4000 2022-01-17 Patrick Palka <ppalka@redhat.com>
4002 * src/c++17/fast_float/LOCAL_PATCHES: Update.
4003 * src/c++17/fast_float/fast_float.h: Apply local modifications.
4005 2022-01-17 Patrick Palka <ppalka@redhat.com>
4007 * src/c++17/fast_float/LOCAL_PATCHES: New file.
4008 * src/c++17/fast_float/MERGE: New file.
4009 * src/c++17/fast_float/README.md: New file, copied from the
4010 fast_float repository.
4011 * src/c++17/fast_float/fast_float.h: New file, an amalgamation
4012 of the fast_float library.
4014 2022-01-17 Patrick Palka <ppalka@redhat.com>
4016 * src/c++17/floating_from_chars.cc: Include <bit>.
4017 (ascii_to_hexit, starts_with_ci): Conditionally define.
4018 (__floating_from_chars_hex): Conditionally define.
4019 (from_chars): Use __floating_from_chars_hex for
4020 chars_format::hex parsing of binary32/64 float/double.
4021 (testsuite/20_util/from_chars/7.cc): New test.
4022 * testsuite/20_util/from_chars/7.cc: New file.
4024 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
4026 * acinclude.m4 (GLIBCXX_ENABLE_BACKTRACE): New macro.
4027 * configure.ac: Use GLIBCXX_ENABLE_BACKTRACE.
4028 * include/Makefile.am: Add new header.
4029 * include/Makefile.in: Regenerate.
4030 * include/std/stacktrace: New header.
4031 * include/std/version (__cpp_lib_stacktrace): Define.
4032 * Makefile.in: Regenerate.
4033 * config.h.in: Regenerate.
4034 * configure: Regenerate.
4035 * doc/Makefile.in: Regenerate.
4036 * libsupc++/Makefile.in: Regenerate.
4037 * po/Makefile.in: Regenerate.
4038 * python/Makefile.in: Regenerate.
4039 * src/Makefile.am: Regenerate.
4040 * src/Makefile.in: Regenerate.
4041 * src/c++11/Makefile.in: Regenerate.
4042 * src/c++17/Makefile.in: Regenerate.
4043 * src/c++20/Makefile.in: Regenerate.
4044 * src/c++98/Makefile.in: Regenerate.
4045 * src/filesystem/Makefile.in: Regenerate.
4046 * testsuite/Makefile.in: Regenerate.
4047 * src/libbacktrace/Makefile.am: New file.
4048 * src/libbacktrace/Makefile.in: New file.
4049 * src/libbacktrace/backtrace-rename.h: New file.
4050 * src/libbacktrace/backtrace-supported.h.in: New file.
4051 * src/libbacktrace/config.h.in: New file.
4052 * testsuite/lib/libstdc++.exp (check_effective_target_stacktrace):
4054 * testsuite/20_util/stacktrace/entry.cc: New test.
4055 * testsuite/20_util/stacktrace/synopsis.cc: New test.
4056 * testsuite/20_util/stacktrace/version.cc: New test.
4058 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
4060 * doc/xml/manual/status_cxx2020.xml: Use final C++20 option
4062 * doc/html/manual/status.html: Regenerate.
4064 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
4067 * include/Makefile.am: Rename LT_OBJDIR and STDC_HEADERS.
4068 * include/Makefile.in: Regenerate.
4069 * testsuite/17_intro/headers/c++1998/103650.cc: New test.
4071 2022-01-17 Matthias Kretz <m.kretz@gsi.de>
4073 * include/experimental/bits/simd.h (__floating_point_flags): Do
4074 not rely on the presence of the math_errhandling macro.
4076 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
4078 * include/bits/shared_ptr_atomic.h (_Sp_atomic): Add typename
4079 to qualified-id for dependent type.
4081 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
4083 * doc/xml/manual/status_cxx2020.xml: Update.
4084 * doc/html/manual/status.html: Regenerate.
4086 2022-01-17 Jonathan Wakely <jwakely@redhat.com>
4087 Thomas Rodgers <trodgers@redhat.com>
4089 * include/bits/shared_ptr_atomic.h (__cpp_lib_atomic_shared_ptr):
4091 (_Sp_atomic): New class template.
4092 (atomic<shared_ptr<T>>, atomic<weak_ptr<T>>): New partial
4094 * include/bits/shared_ptr_base.h (__shared_count, __weak_count)
4095 (__shared_ptr, __weak_ptr): Declare _Sp_atomic as a friend.
4096 * include/std/version (__cpp_lib_atomic_shared_ptr): New macro.
4097 * testsuite/20_util/shared_ptr/atomic/atomic_shared_ptr.cc: New
4099 * testsuite/20_util/weak_ptr/atomic_weak_ptr.cc: New test.
4101 2022-01-15 Matthias Kretz <m.kretz@gsi.de>
4103 * include/experimental/bits/simd.h: Move feature detection bools
4104 and add __have_avx512bitalg, __have_avx512vbmi2,
4105 __have_avx512vbmi, __have_avx512ifma, __have_avx512cd,
4106 __have_avx512vnni, __have_avx512vpopcntdq.
4107 (__detail::__machine_flags): New function which returns a unique
4108 uint64 depending on relevant -m and -f flags.
4109 (__detail::__odr_helper): New type alias for either an anonymous
4110 type or a type specialized with the __machine_flags number.
4111 (_SimdIntOperators): Change template parameters from _Impl to
4112 _Tp, _Abi because _Impl now has an __odr_helper parameter which
4113 may be _OdrEnforcer from the anonymous namespace, which makes
4114 for a bad base class.
4115 (many): Either add __odr_helper template parameter or mark as
4117 * include/experimental/bits/simd_detail.h: Add defines for
4118 AVX512BITALG, AVX512VBMI2, AVX512VBMI, AVX512IFMA, AVX512CD,
4119 AVX512VNNI, AVX512VPOPCNTDQ, and AVX512VP2INTERSECT.
4120 * include/experimental/bits/simd_builtin.h: Add __odr_helper
4121 template parameter or mark as always_inline.
4122 * include/experimental/bits/simd_fixed_size.h: Ditto.
4123 * include/experimental/bits/simd_math.h: Ditto.
4124 * include/experimental/bits/simd_scalar.h: Ditto.
4125 * include/experimental/bits/simd_neon.h: Add __odr_helper
4127 * include/experimental/bits/simd_ppc.h: Ditto.
4128 * include/experimental/bits/simd_x86.h: Ditto.
4130 2022-01-14 Uroš Bizjak <ubizjak@gmail.com>
4132 * testsuite/22_locale/numpunct/members/char/3.cc:
4133 Require pt_PT locale instead of nl_NL.
4134 (test02): Use pt_PT locale instead of nl_NL.
4136 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
4141 * include/backward/binders.h (bind1st, bind2nd): Add deprecated
4143 * include/bits/refwrap.h (_Maybe_unary_or_binary_function):
4144 Disable deprecated warnings for base classes.
4145 (_Reference_wrapper_base): Likewise.
4146 * include/bits/shared_ptr_base.h (_Sp_owner_less): Likewise.
4147 * include/bits/stl_bvector.h (_Bit_iterator_base): Likewise.
4148 * include/bits/stl_function.h (unary_function, binary_function):
4149 Add deprecated attribute.
4150 (unary_negate, not1, binary_negate, not2, ptr_fun)
4151 (pointer_to_unary_function, pointer_to_binary_function)
4152 (mem_fun_t, const_mem_fun_t, mem_fun_ref_t, const_mem_fun_ref_t)
4153 (mem_fun1_t, const_mem_fun1_t, mem_fun_ref1_t)
4154 (const_mem_fun1_ref_t, mem_fun, mem_fun_ref): Add deprecated
4156 * include/bits/stl_iterator.h: Disable deprecated warnings for
4157 std::iterator base classes.
4158 * include/bits/stl_iterator_base_types.h (iterator): Add
4159 deprecated attribute.
4160 * include/bits/stl_map.h (map::value_compare): Disable
4161 deprecated warnings for base class.
4162 * include/bits/stl_multimap.h (multimap::value_compare):
4164 * include/bits/stl_raw_storage_iter.h (raw_storage_iterator):
4165 Add deprecated attribute.
4166 * include/bits/stl_tempbuf.h (get_temporary_buffer): Likewise.
4167 * include/bits/stream_iterator.h: Disable deprecated warnings.
4168 * include/bits/streambuf_iterator.h: Likewise.
4169 * include/ext/bitmap_allocator.h: Remove unary_function base
4171 * include/ext/functional: Disable deprecated warnings.
4172 * include/ext/rope: Likewise.
4173 * include/ext/throw_allocator.h: Likewise.
4174 * include/std/type_traits (result_of): Add deprecated attribute.
4175 * include/tr1/functional: Disable deprecated warnings.
4176 * include/tr1/functional_hash.h: Likewise.
4177 * testsuite/20_util/function_objects/binders/1.cc: Add
4178 -Wno-disable-deprecations.
4179 * testsuite/20_util/function_objects/binders/3113.cc: Likewise.
4180 * testsuite/20_util/function_objects/constexpr.cc: Add
4182 * testsuite/20_util/raw_storage_iterator/base.cc: Likewise.
4183 * testsuite/20_util/raw_storage_iterator/dr2127.cc: Likewise.
4184 * testsuite/20_util/raw_storage_iterator/requirements/base_classes.cc:
4186 * testsuite/20_util/raw_storage_iterator/requirements/explicit_instantiation/1.cc:
4188 * testsuite/20_util/raw_storage_iterator/requirements/typedefs.cc:
4190 * testsuite/20_util/reference_wrapper/24803.cc:
4192 * testsuite/20_util/reference_wrapper/typedefs.cc: Enable for
4193 C++20 and check for absence of nested types.
4194 * testsuite/20_util/shared_ptr/comparison/less.cc: Remove
4195 std::binary_function base class.
4196 * testsuite/20_util/temporary_buffer.cc: Add dg-warning.
4197 * testsuite/21_strings/basic_string/cons/char/69092.cc: Remove
4198 std::iterator base class.
4199 * testsuite/24_iterators/back_insert_iterator/requirements/base_classes.cc:
4201 * testsuite/24_iterators/front_insert_iterator/requirements/base_classes.cc:
4203 * testsuite/24_iterators/insert_iterator/requirements/base_classes.cc:
4205 * testsuite/24_iterators/istream_iterator/requirements/base_classes.cc:
4207 * testsuite/24_iterators/istreambuf_iterator/92285.cc:
4209 * testsuite/24_iterators/istreambuf_iterator/requirements/base_classes.cc:
4211 * testsuite/24_iterators/ostream_iterator/requirements/base_classes.cc:
4213 * testsuite/24_iterators/ostreambuf_iterator/requirements/base_classes.cc:
4215 * testsuite/24_iterators/reverse_iterator/requirements/base_classes.cc:
4217 * testsuite/25_algorithms/copy/34595.cc:
4219 * testsuite/25_algorithms/minmax/3.cc: Remove std::binary_function
4221 * testsuite/25_algorithms/all_of/requirements/explicit_instantiation/2.cc:
4222 Disable deprecated warnings.
4223 * testsuite/25_algorithms/all_of/requirements/explicit_instantiation/pod.cc:
4225 * testsuite/25_algorithms/any_of/requirements/explicit_instantiation/2.cc:
4227 * testsuite/25_algorithms/any_of/requirements/explicit_instantiation/pod.cc:
4229 * testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/2.cc:
4231 * testsuite/25_algorithms/copy_if/requirements/explicit_instantiation/pod.cc:
4233 * testsuite/25_algorithms/count_if/requirements/explicit_instantiation/2.cc:
4235 * testsuite/25_algorithms/count_if/requirements/explicit_instantiation/pod.cc:
4237 * testsuite/25_algorithms/find_end/requirements/explicit_instantiation/2.cc:
4239 * testsuite/25_algorithms/find_end/requirements/explicit_instantiation/pod.cc:
4241 * testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/2.cc:
4243 * testsuite/25_algorithms/find_first_of/requirements/explicit_instantiation/pod.cc:
4245 * testsuite/25_algorithms/find_if/requirements/explicit_instantiation/2.cc:
4247 * testsuite/25_algorithms/find_if/requirements/explicit_instantiation/pod.cc:
4249 * testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/2.cc:
4251 * testsuite/25_algorithms/find_if_not/requirements/explicit_instantiation/pod.cc:
4253 * testsuite/25_algorithms/for_each/requirements/explicit_instantiation/2.cc:
4255 * testsuite/25_algorithms/for_each/requirements/explicit_instantiation/pod.cc:
4257 * testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/2.cc:
4259 * testsuite/25_algorithms/is_partitioned/requirements/explicit_instantiation/pod.cc:
4261 * testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/2.cc:
4263 * testsuite/25_algorithms/is_permutation/requirements/explicit_instantiation/pod.cc:
4265 * testsuite/25_algorithms/none_of/requirements/explicit_instantiation/2.cc:
4267 * testsuite/25_algorithms/none_of/requirements/explicit_instantiation/pod.cc:
4269 * testsuite/25_algorithms/partition/requirements/explicit_instantiation/2.cc:
4271 * testsuite/25_algorithms/partition/requirements/explicit_instantiation/pod.cc:
4273 * testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/2.cc:
4275 * testsuite/25_algorithms/partition_copy/requirements/explicit_instantiation/pod.cc:
4277 * testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/2.cc:
4279 * testsuite/25_algorithms/partition_point/requirements/explicit_instantiation/pod.cc:
4281 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
4283 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
4285 * testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/2.cc:
4287 * testsuite/25_algorithms/remove_copy_if/requirements/explicit_instantiation/pod.cc:
4289 * testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/2.cc:
4291 * testsuite/25_algorithms/remove_if/requirements/explicit_instantiation/pod.cc:
4293 * testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/2.cc:
4295 * testsuite/25_algorithms/replace_copy_if/requirements/explicit_instantiation/pod.cc:
4297 * testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/2.cc:
4299 * testsuite/25_algorithms/replace_if/requirements/explicit_instantiation/pod.cc:
4301 * testsuite/25_algorithms/search/requirements/explicit_instantiation/2.cc:
4303 * testsuite/25_algorithms/search/requirements/explicit_instantiation/pod.cc:
4305 * testsuite/25_algorithms/search_n/requirements/explicit_instantiation/2.cc:
4307 * testsuite/25_algorithms/search_n/requirements/explicit_instantiation/pod.cc:
4309 * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/2.cc:
4311 * testsuite/25_algorithms/stable_partition/requirements/explicit_instantiation/pod.cc:
4313 * testsuite/25_algorithms/transform/requirements/explicit_instantiation/2.cc:
4315 * testsuite/25_algorithms/transform/requirements/explicit_instantiation/pod.cc:
4317 * testsuite/27_io/basic_filebuf/underflow/wchar_t/9178.cc: Add
4319 * testsuite/ext/pb_ds/example/priority_queue_erase_if.cc:
4321 * testsuite/ext/pb_ds/example/priority_queue_split_join.cc:
4323 * testsuite/tr1/3_function_objects/reference_wrapper/typedefs.cc:
4324 Disable deprecated warnings.
4325 * testsuite/tr1/6_containers/hash/requirements/base_classes.cc:
4327 * testsuite/util/regression/trait/erase_if_fn.hpp: Remove
4328 std::unary_function base classes.
4329 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper):
4330 Remove std::iterator base classes.
4332 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
4334 * include/bits/shared_ptr.h (__cpp_lib_shared_ptr_weak_type):
4335 Correct type of macro value.
4336 (shared_ptr): Add additional friend declarations.
4337 (make_shared, allocate_shared): Constrain existing overloads and
4338 remove static_assert.
4339 * include/bits/shared_ptr_base.h (__cpp_lib_smart_ptr_for_overwrite):
4341 (_Sp_counted_ptr_inplace<T, Alloc, Lp>): New partial
4342 specialization for use with make_shared_for_overwrite.
4343 (__cpp_lib_shared_ptr_arrays): Update value for C++20.
4344 (_Sp_counted_array_base): New class template.
4345 (_Sp_counted_array): New class template.
4346 (__shared_count(_Tp*&, const _Sp_counted_array_base&, _Init)):
4347 New constructor for allocating shared arrays.
4348 (__shared_ptr(const _Sp_counted_array_base&, _Init)): Likewise.
4349 * include/std/version (__cpp_lib_shared_ptr_weak_type): Correct
4351 (__cpp_lib_shared_ptr_arrays): Update value for C++20.
4352 (__cpp_lib_smart_ptr_for_overwrite): New macro.
4353 * testsuite/20_util/shared_ptr/creation/99006.cc: Adjust
4355 * testsuite/20_util/shared_ptr/creation/array.cc: New test.
4356 * testsuite/20_util/shared_ptr/creation/overwrite.cc: New test.
4357 * testsuite/20_util/shared_ptr/creation/version.cc: New test.
4358 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: Check
4359 feature test macro. Test non-trivial default-initialization.
4361 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
4363 * include/bits/stl_construct.h (_Construct, _Construct_novalue):
4364 Also cast away cv-qualifiers when converting pointer to void.
4365 * testsuite/20_util/allocator/void.cc: Test construct function
4366 with cv-qualified types.
4368 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
4371 * include/bits/stl_iterator.h (common_iterator): Use
4372 std::construct_at instead of placement new.
4373 * testsuite/24_iterators/common_iterator/1.cc: Check copy
4374 construction is usable in constant expressions.
4376 2022-01-14 Jonathan Wakely <jwakely@redhat.com>
4378 * doc/xml/manual/status_cxx2011.xml: Document new tokens
4379 accepted by std::random_device constructor.
4380 * doc/html/manual/status.html: Regenerate.
4382 2022-01-12 Patrick Palka <ppalka@redhat.com>
4384 * testsuite/20_util/to_chars/103955.cc: Add explicit dg-do
4387 2022-01-12 Patrick Palka <ppalka@redhat.com>
4390 * src/c++17/floating_to_chars.cc (__floating_to_chars_hex):
4391 Track the excess precision separately from the effective
4392 precision. Avoid overflow in bounds check by splitting it into
4394 (__floating_to_chars_precision): Avoid overflow in bounds checks
4396 * testsuite/20_util/to_chars/103955.cc: New test.
4398 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
4401 * include/Makefile.am: Install <source_location> for
4403 * include/Makefile.in: Regenerate.
4404 * include/std/version (__cpp_lib_source_location): Define for
4407 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
4409 * include/std/ranges (ranges::lazy_split_view::_InnerIter::end()):
4410 Add neoxcept (LWG 3593).
4412 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
4414 * include/std/ranges (ranges::__detail::__box): Add constexpr to
4415 assignment operators (LWG 3572).
4416 * testsuite/std/ranges/adaptors/filter.cc: Check assignment of a
4417 view that uses copyable-box.
4419 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
4422 * include/Makefile.am: Install <coroutine> for freestanding.
4423 * include/Makefile.in: Regenerate.
4424 * include/std/coroutine: Adjust headers and preprocessor
4426 (__coroutine_traits_impl): Use concepts when available.
4427 [_GLIBCXX_HOSTED] (hash<coroutine_handle>): Define.
4429 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
4431 * include/std/ostream (operator<<(basic_ostream&, charT)):
4432 Use unformatted input if no padding is needed.
4433 (operator<<(basic_ostream<char>&, char)): Likewise.
4435 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
4438 * include/bits/c++config (_GLIBCXX_HAVE_COND_TRIVIAL_SPECIAL_MEMBERS):
4440 * include/std/variant (__cpp_lib_variant): Only define C++20
4441 value when the compiler is known to support conditionally
4442 trivial destructors.
4443 * include/std/version (__cpp_lib_variant): Likewise.
4445 2022-01-11 Jonathan Wakely <jwakely@redhat.com>
4447 * include/bits/stl_iterator.h (common_iterator): Add constexpr
4448 to all member functions (LWG 3574).
4449 * testsuite/24_iterators/common_iterator/1.cc: Evaluate some
4450 tests as constant expressions.
4451 * testsuite/24_iterators/common_iterator/2.cc: Likewise.
4453 2022-01-10 Jakub Jelinek <jakub@redhat.com>
4456 * include/bits/locale_facets_nonio.h (__time_get_state): New struct.
4457 (time_get::_M_extract_via_format): Declare new method with
4458 __time_get_state& as an extra argument.
4459 * include/bits/locale_facets_nonio.tcc (_M_extract_via_format): Add
4460 __state argument, set various fields in it while parsing. Handle %j,
4461 %U, %w and %W, fix up handling of %y, %Y and %C, don't adjust tm_hour
4462 for %p immediately. Add a wrapper around the method without the
4463 __state argument for backwards compatibility.
4464 (_M_extract_num): Remove all __len == 4 special cases.
4465 (time_get::do_get_time, time_get::do_get_date, time_get::do_get): Zero
4466 initialize __state, pass it to _M_extract_via_format and finalize it
4468 (do_get_year): For 1-2 digit parsed years, map 0-68 to 2000-2068,
4469 69-99 to 1969-1999. For 3-4 digit parsed years use that as year.
4470 (get): If do_get isn't overloaded from the locale_facets_nonio.tcc
4471 version, don't call do_get but call _M_extract_via_format instead to
4473 * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export _M_extract_via_format
4474 with extra __time_get_state and __time_get_state::_M_finalize_state.
4475 * src/c++98/locale_facets.cc (is_leap, day_of_the_week,
4476 day_of_the_year): New functions in anon namespace.
4477 (mon_yday): New var in anon namespace.
4478 (__time_get_state::_M_finalize_state): Define.
4479 * testsuite/22_locale/time_get/get/char/4.cc: New test.
4480 * testsuite/22_locale/time_get/get/wchar_t/4.cc: New test.
4481 * testsuite/22_locale/time_get/get_year/char/1.cc (test01): Parse 197
4482 as year 197AD instead of error.
4483 * testsuite/22_locale/time_get/get_year/char/5.cc (test01): Parse 1 as
4484 year 2001 instead of error.
4485 * testsuite/22_locale/time_get/get_year/char/6.cc: New test.
4486 * testsuite/22_locale/time_get/get_year/wchar_t/1.cc (test01): Parse
4487 197 as year 197AD instead of error.
4488 * testsuite/22_locale/time_get/get_year/wchar_t/5.cc (test01): Parse
4489 1 as year 2001 instead of error.
4490 * testsuite/22_locale/time_get/get_year/wchar_t/6.cc: New test.
4492 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
4495 * acinclude.m4 (GLIBCXX_COMPUTE_STDIO_INTEGER_CONSTANTS): Do
4496 nothing for freestanding builds.
4497 (GLIBCXX_ENABLE_HOSTED): Define FREESTANDING_FLAGS.
4498 * configure.ac: Do not use AC_LIBTOOL_DLOPEN when configured
4499 with --without-headers. Do not use GCC_HEADER_STDINT for
4500 freestanding builds.
4501 * libsupc++/Makefile.am (HOSTED_CXXFLAGS): Use -ffreestanding
4502 for freestanding builds.
4503 * configure: Regenerate.
4504 * Makefile.in: Regenerate.
4505 * doc/Makefile.in: Regenerate.
4506 * include/Makefile.in: Regenerate.
4507 * libsupc++/Makefile.in: Regenerate.
4508 * po/Makefile.in: Regenerate.
4509 * python/Makefile.in: Regenerate.
4510 * src/Makefile.in: Regenerate.
4511 * src/c++11/Makefile.in: Regenerate.
4512 * src/c++17/Makefile.in: Regenerate.
4513 * src/c++20/Makefile.in: Regenerate.
4514 * src/c++98/Makefile.in: Regenerate.
4515 * src/filesystem/Makefile.in: Regenerate.
4516 * testsuite/Makefile.in: Regenerate.
4518 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
4520 * testsuite/28_regex/algorithms/regex_replace/char/103664.cc:
4521 Add dg-timeout-factor directive.
4522 * testsuite/28_regex/basic_regex/84110.cc: Likewise.
4523 * testsuite/28_regex/basic_regex/ctors/char/other.cc: Likewise.
4524 * testsuite/28_regex/match_results/102667.cc: Likewise.
4526 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
4528 * doc/xml/manual/using.xml: Update documentation around default
4530 * doc/html/*: Regenerate.
4532 2022-01-10 Jonathan Wakely <jwakely@redhat.com>
4535 * src/c++17/Makefile.am (AM_CXXFLAGS): Add -nostdinc++.
4536 * src/c++17/Makefile.in: Regenerate.
4538 2022-01-09 Sandra Loosemore <sandra@codesourcery.com>
4540 * testsuite/18_support/type_info/constexpr.cc: Add explicit
4541 -fdelete-null-pointer-checks option.
4543 2022-01-06 Pavel I. Kryukov <pavel.kryukov@phystech.edu>
4544 Jonathan Wakely <jwakely@redhat.com>
4547 * include/bits/forward_list.tcc (forward_list::merge): Check for
4549 * testsuite/23_containers/forward_list/operations/merge.cc: New test.
4551 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
4553 * include/bits/regex.h (basic_regex, match_results): Qualify
4554 name in friend declaration, to work around Clang bug.
4556 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
4558 * testsuite/ext/rope/pthread7-rope.cc: Add dg-timeout-factor.
4560 2022-01-06 Jonathan Wakely <jwakely@redhat.com>
4563 * include/std/charconv (__from_chars_alpha_to_num): Return
4564 char instead of unsigned char. Change invalid return value to
4565 127 instead of using numeric trait.
4566 (__from_chars_alnum): Fix comment. Do not use std::isdigit.
4567 Change type of variable to char.
4569 2022-01-05 François Dumont <fdumont@gcc.gnu.org>
4572 * include/bits/hashtable_policy.h
4573 (_Hashtable_hash_traits<_Hash>): New.
4574 (_Hash_code_base<>::_M_hash_code(const _Hash_node_value<>&)): New.
4575 (_Hashtable_base<>::_M_key_equals): New.
4576 (_Hashtable_base<>::_M_equals): Use latter.
4577 (_Hashtable_base<>::_M_key_equals_tr): New.
4578 (_Hashtable_base<>::_M_equals_tr): Use latter.
4579 * include/bits/hashtable.h
4580 (_Hashtable<>::__small_size_threshold()): New, use _Hashtable_hash_traits.
4581 (_Hashtable<>::find): Loop through elements to look for key if size is lower
4582 than __small_size_threshold().
4583 (_Hashtable<>::_M_emplace(true_type, _Args&&...)): Likewise.
4584 (_Hashtable<>::_M_insert_unique(_Kt&&, _Args&&, const _NodeGenerator&)): Likewise.
4585 (_Hashtable<>::_M_compute_hash_code(const_iterator, const key_type&)): New.
4586 (_Hashtable<>::_M_emplace(const_iterator, false_type, _Args&&...)): Use latter.
4587 (_Hashtable<>::_M_find_before_node(const key_type&)): New.
4588 (_Hashtable<>::_M_erase(true_type, const key_type&)): Use latter.
4589 (_Hashtable<>::_M_erase(false_type, const key_type&)): Likewise.
4590 * src/c++11/hashtable_c++0x.cc: Include <bits/functional_hash.h>.
4591 * testsuite/util/testsuite_performance.h
4592 (report_performance): Use 9 width to display memory.
4593 * testsuite/performance/23_containers/insert_erase/unordered_small_size.cc:
4594 New performance test case.
4596 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
4599 * include/bits/basic_string.h (basic_string(const T&, size_t, size_t)):
4600 Relax constraints on string_view parameter.
4601 * include/bits/cow_string.h (basic_string(const T&, size_t, size_t)):
4603 * testsuite/21_strings/basic_string/cons/char/103919.cc: New test.
4605 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
4607 * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export new symbol for
4609 * include/bits/c++config (_GLIBCXX23_CONSTEXPR): Define.
4610 * include/std/version (__cpp_lib_constexpr_typeinfo): Define.
4611 * libsupc++/tinfo.cc: Add #error to ensure non-inline definition
4613 (type_info::__equal): Define alias symbol.
4614 * libsupc++/typeinfo (type_info::before): Combine different
4615 implementations into one.
4616 (type_info::operator==): Likewise. Use address equality for
4617 constant evaluation. Call __equal for targets that require the
4618 definition to be non-inline.
4619 * testsuite/18_support/type_info/constexpr.cc: New test.
4621 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
4623 * src/c++11/cxx11-ios_failure.cc (io_error_category): Define
4624 class and virtual functions as 'final'.
4625 (io_category_instance): Use constinit union to make the object
4627 * src/c++11/future.cc (future_error_category): Define class and
4628 virtual functions as 'final'.
4629 (future_category_instance): Use constinit union.
4631 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
4633 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Strip
4634 versioned namespace from the type name that is printed.
4636 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
4638 * python/libstdcxx/v6/printers.py (StdRegexStatePrinter): New
4639 printer for std::regex NFA states.
4641 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
4643 * testsuite/23_containers/forward_list/operations/1.cc: Fill in
4644 placeholders in comments.
4645 * testsuite/23_containers/forward_list/operations/2.cc:
4647 * testsuite/23_containers/forward_list/operations/3.cc:
4649 * testsuite/23_containers/forward_list/operations/4.cc:
4651 * testsuite/23_containers/forward_list/operations/5.cc:
4653 * testsuite/23_containers/forward_list/operations/6.cc:
4655 * testsuite/23_containers/forward_list/operations/7.cc:
4658 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
4661 * include/bits/stl_deque.h (operator-): Do not use 0 as null
4664 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
4666 * include/bits/alloc_traits.h (allocator_traits<allocator<void>>):
4667 Use std::_Construct for construct.
4669 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
4672 * doc/xml/faq.xml: Add '-x c++' to preprocessor command.
4673 * doc/html/faq.html: Regenerate.
4675 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
4677 * include/bits/regex.h (__regex_algo_impl): Change __policy and
4678 __match_mode template parameters to be function parameters.
4679 (regex_match, regex_search): Pass policy and match mode as
4681 * include/bits/regex.tcc (__regex_algo_impl): Change template
4682 parameters to function parameters.
4683 * include/bits/regex_compiler.h (_RegexTranslatorBase): Use
4684 'if constexpr' for conditions using template parameters.
4685 (_RegexTranslator): Likewise.
4686 * include/bits/regex_executor.tcc (_Executor::_M_handle_accept):
4688 * testsuite/util/testsuite_regex.h (regex_match_debug)
4689 (regex_search_debug): Move template arguments to function
4692 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
4694 * testsuite/util/testsuite_regex.h (regex_match_debug): Compare
4695 results even if the match failed.
4697 2022-01-05 Jonathan Wakely <jwakely@redhat.com>
4699 * include/bits/regex_compiler.tcc: Adjust all calls to
4700 __throw_regex_error.
4701 * include/bits/regex_error.h (__throw_regex_error): Add noreturn
4703 * include/bits/regex_scanner.tcc: Likewise.
4704 * src/c++11/regex.cc (desc): New helper function.
4705 (regex_error::regex_error(error_type)): Use desc to get a string
4706 corresponding to the error code.
4709 Copyright (C) 2022 Free Software Foundation, Inc.
4711 Copying and distribution of this file, with or without modification,
4712 are permitted in any medium without royalty provided the copyright
4713 notice and this notice are preserved.