1 2021-11-30 Jonathan Wakely <jwakely@redhat.com>
3 * testsuite/21_strings/basic_string/cons/char/moveable.cc: Allow
4 moved-from string to be non-empty.
5 * testsuite/21_strings/basic_string/cons/char/moveable2.cc:
7 * testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc:
9 * testsuite/21_strings/basic_string/cons/wchar_t/moveable.cc:
11 * testsuite/21_strings/basic_string/cons/wchar_t/moveable2.cc:
13 * testsuite/21_strings/basic_string/cons/wchar_t/moveable2_c++17.cc:
15 * testsuite/21_strings/basic_string/modifiers/assign/char/87749.cc:
16 Construct empty string before setting oom flag.
17 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/87749.cc:
20 2021-11-30 Jonathan Wakely <jwakely@redhat.com>
22 * include/bits/cow_string.h (basic_string(basic_string&&)): Fix
23 mem-initializer for _GLIBCXX_FULLY_DYNAMIC_STRING==0 case.
24 * testsuite/21_strings/basic_string/cons/char/noexcept_move_construct.cc:
25 Remove outdated comment.
26 * testsuite/21_strings/basic_string/cons/wchar_t/noexcept_move_construct.cc:
29 2021-11-30 Jonathan Wakely <jwakely@redhat.com>
31 * src/c++20/sstream-inst.cc (_GLIBCXX_USE_CXX11_ABI): Define to
34 2021-11-30 Jonathan Wakely <jwakely@redhat.com>
36 * include/bits/stl_vector.h (vector::_S_do_relocate): Remove
37 C++20 constexpr specifier.
38 (vector::_S_relocate) [__cpp_if_constexpr]: Call __relocate_a
39 directly without tag dispatching.
41 2021-11-30 Jonathan Wakely <jwakely@redhat.com>
44 * config/allocator/malloc_allocator_base.h
45 (_GLIBCXX_SANITIZE_STD_ALLOCATOR): Define for Clang.
46 * config/allocator/new_allocator_base.h
47 (_GLIBCXX_SANITIZE_STD_ALLOCATOR): Likewise.
49 2021-11-30 Jonathan Wakely <jwakely@redhat.com>
51 * doc/xml/manual/debug_mode.xml: Replace "his or her" with "they".
52 * doc/html/manual/debug_mode_design.html: Regenerate.
54 2021-11-30 Jakub Jelinek <jakub@redhat.com>
56 * include/std/bit (byteswap): Add [[nodiscard]].
58 2021-11-28 Jakub Jelinek <jakub@redhat.com>
60 * include/std/bit (__cpp_lib_byteswap, byteswap): Define.
61 * include/std/version (__cpp_lib_byteswap): Define.
62 * testsuite/26_numerics/bit/bit.byteswap/byteswap.cc: New test.
63 * testsuite/26_numerics/bit/bit.byteswap/version.cc: New test.
65 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
67 * testsuite/24_iterators/move_iterator/dr3265.cc: Fix test to
68 account for LWG 3435 resolution.
70 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
72 * include/bits/stl_uninitialized.h (__relocate_a_1): Do not use
73 memmove during constant evaluation.
74 * include/bits/stl_vector.h (vector::_S_use_relocate()): Do not
75 check is_constant_evaluated in always-constexpr function.
77 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
80 * include/std/tuple (tuple::is_constructible): Remove.
82 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
84 * testsuite/29_atomics/atomic_float/1.cc: Reorder directives.
86 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
88 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
89 Change dg-do compile to run.
90 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
93 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
95 * testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
96 Remove xfail selector.
97 * testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc:
100 * testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
102 * testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
104 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc:
106 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
108 * testsuite/23_containers/span/101411.cc: Likewise.
109 * testsuite/25_algorithms/copy/debug/constexpr_neg.cc: Likewise.
110 * testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc:
112 * testsuite/25_algorithms/equal/constexpr_neg.cc: Likewise.
113 * testsuite/25_algorithms/equal/debug/constexpr_neg.cc: Likewise.
114 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc:
116 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc:
118 * testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc:
120 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc:
122 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc:
124 * testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc:
127 2021-11-26 Jonathan Wakely <jwakely@redhat.com>
129 * testsuite/20_util/pointer_traits/lwg3545.cc: Move to_address
131 * testsuite/20_util/to_address/lwg3545.cc: ... here. Add -std
132 option before checking effective target.
134 2021-11-25 Jonathan Wakely <jwakely@redhat.com>
136 * testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
137 Remove dg-error for C++11_only error.
139 2021-11-25 Jonathan Wakely <jwakely@redhat.com>
142 * include/bits/ptr_traits.h (pointer_traits): Reimplement to be
143 SFINAE-friendly (LWG 3545).
144 * testsuite/20_util/pointer_traits/lwg3545.cc: New test.
145 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line.
146 * testsuite/20_util/to_address/lwg3545.cc: New test.
148 2021-11-25 Jonathan Wakely <jwakely@redhat.com>
151 * include/bits/ranges_algobase.h (__fill_n_fn): Check for
152 constant evaluation before using memset.
153 * testsuite/25_algorithms/fill_n/constrained.cc: Check
154 byte-sized values as well.
156 2021-11-24 Jonathan Wakely <jwakely@redhat.com>
158 * testsuite/libstdc++-prettyprinters/80276.cc: Add xfail for
160 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
162 2021-11-24 Jonathan Wakely <jwakely@redhat.com>
164 * testsuite/lib/libstdc++.exp: Rename effective target keywords
165 to avoid dashes in the name.
166 * testsuite/*: Update effective targe keywords.
168 2021-11-23 Jonathan Wakely <jwakely@redhat.com>
171 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr
172 with non-empty pointer and non-empty deleter.
174 2021-11-23 Jonathan Wakely <jwakely@redhat.com>
176 * testsuite/18_support/50594.cc: Check effective target.
177 * testsuite/20_util/allocator/1.cc: Likewise.
178 * testsuite/20_util/allocator/overaligned.cc: Likewise.
179 * testsuite/23_containers/unordered_map/96088.cc: Likewise.
180 * testsuite/23_containers/unordered_multimap/96088.cc: Likewise.
181 * testsuite/23_containers/unordered_multiset/96088.cc: Likewise.
182 * testsuite/23_containers/unordered_set/96088.cc: Likewise.
183 * testsuite/ext/throw_allocator/check_delete.cc: Likewise.
184 * testsuite/ext/throw_allocator/check_new.cc: Likewise.
185 * testsuite/lib/libstdc++.exp (check_effective_target_std_allocator_new):
188 2021-11-23 Jonathan Wakely <jwakely@redhat.com>
191 * include/ext/bitmap_allocator.h: Include <bits/stl_function.h>
192 instead of <functional>.
194 2021-11-22 Jonathan Wakely <jwakely@redhat.com>
196 * include/bits/c++config (_GLIBCXX14_DEPRECATED): Fix condition
199 2021-11-20 François Dumont <fdumont@gcc.gnu.org>
201 * include/bits/erase_if.h (__erase_nodes_if): Add _UnsafeContainer template
202 parameter. Use it to get iterators to work with.
203 * include/debug/macros.h (__glibcxx_check_erase2): New.
204 * include/debug/map.h (map<>::erase(_Base_const_iterator)): New.
205 (map<>::erase(const_iterator)): Use latter.
206 * include/debug/multimap.h (multimap<>::erase(_Base_const_iterator)): New.
207 (multimap<>::erase(const_iterator)): Use latter.
208 * include/debug/multiset.h (multiset<>::erase(_Base_const_iterator)): New.
209 (multiset<>::erase(const_iterator)): Use latter.
210 * include/debug/set.h (set<>::erase(_Base_const_iterator)): New.
211 (set<>::erase(const_iterator)): Use latter.
212 * include/debug/unordered_map (unordered_map<>::erase(_Base_const_iterator)): New.
213 (unordered_multimap<>::erase(const_iterator)): New.
214 * include/debug/unordered_set (unordered_set<>::erase(_Base_const_iterator)): New.
215 (unordered_multiset<>::erase(const_iterator)): New.
216 * include/experimental/map (erase_if): Adapt.
217 * include/experimental/set (erase_if): Adapt.
218 * include/experimental/unordered_map (erase_if): Adapt.
219 * include/experimental/unordered_set (erase_if): Adapt.
220 * include/std/map (erase_if): Adapt.
221 * include/std/set (erase_if): Adapt.
222 * include/std/unordered_map (erase_if): Adapt.
223 * include/std/unordered_set (erase_if): Adapt.
225 2021-11-19 Jonathan Wakely <jwakely@redhat.com>
227 * testsuite/27_io/basic_istringstream/cons/char/1.cc: Check all
229 * testsuite/27_io/basic_istringstream/cons/wchar_t/1.cc:
231 * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
232 * testsuite/27_io/basic_ostringstream/cons/wchar_t/1.cc:
234 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
235 * testsuite/27_io/basic_stringstream/cons/wchar_t/1.cc:
238 2021-11-19 Jonathan Wakely <jwakely@redhat.com>
240 * src/c++98/locale_init.cc (_S_initialize_once): Check if
241 initialization has already been done.
242 (_S_initialize): Replace __gthread_active_p with
243 __is_single_threaded. Use __builtin_expect.
245 2021-11-19 Jonathan Wakely <jwakely@redhat.com>
248 * include/bits/basic_string.tcc (_M_construct): Use the
249 traits assign member to write into allcoated memory.
251 2021-11-19 Iain Sandoe <iain@sandoe.co.uk>
253 * testsuite/lib/prune.exp: Prune dsymutil (ld64) warning.
255 2021-11-19 Jonathan Wakely <jwakely@redhat.com>
259 * testsuite/21_strings/basic_string/capacity/char/1.cc: Add
260 -Wno-stringop-overflow.
261 * testsuite/21_strings/basic_string/operators/char/1.cc:
263 * testsuite/experimental/filesystem/path/factory/u8path-char8_t.cc:
264 Add -Wno-stringop-overread.
266 2021-11-19 Jonathan Wakely <jwakely@redhat.com>
269 * include/bits/basic_string.h (_Alloc_traits): Replace typedef
270 with struct for C++20 mode.
271 * include/bits/basic_string.tcc (_M_replace): Use _Alloc_traits
273 * include/bits/char_traits.h (__gnu_cxx::char_traits::assign):
274 Use std::_Construct during constant evaluation.
275 (__gnu_cxx::char_traits::assign(CharT*, const CharT*, size_t)):
276 Likewise. Replace std::fill_n with memset or manual loop.
277 (__gnu_cxx::char_traits::copy): Likewise, replacing std::copy
279 * include/ext/vstring.h: Include <bits/stl_algobase.h> for
281 * include/std/string_view: Likewise.
282 * testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc:
285 2021-11-19 Tamar Christina <tamar.christina@arm.com>
288 * config/os/newlib/ctype_base.h (upper, lower, alpha, digit, xdigit,
289 space, print, graph, cntrl, punct, alnum, blank): Use short or long
290 names depending on if short ones are defined.
292 2021-11-18 Jonathan Wakely <jwakely@redhat.com>
294 * include/bits/char_traits.h (__gnu_cxx::char_traits::move):
295 Do not compare unrelated pointers during constant evaluation.
296 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
297 Improve tests for char_traits::move.
299 2021-11-18 Jonathan Wakely <jwakely@redhat.com>
301 * acinclude.m4: Replace AC_CACHE_VAL with AC_CACHE_CHECK.
302 * configure: Regenerate.
304 2021-11-17 Jonathan Wakely <jwakely@redhat.com>
306 * include/experimental/internet (address): Use std::_Construct
307 to initialize union members.
309 2021-11-17 Jonathan Wakely <jwakely@redhat.com>
311 * include/bits/basic_string.h (_M_construct_aux): Only define
312 for C++98. Remove constexpr.
313 (_M_construct_aux_2): Likewise.
314 (_M_construct(InputIter, InputIter)): Remove.
315 (basic_string(const basic_string&)): Call _M_construct with
316 iterator category argument.
317 (basic_string(const basic_string&, size_type, const Alloc&)):
319 (basic_string(const basic_string&, size_type, size_type)):
321 (basic_string(const charT*, size_type, const Alloc&)): Likewise.
322 Check for null pointer.
323 (basic_string(const charT*, const Alloc&)): Likewise.
324 (basic_string(initializer_list<charT>, const Alloc&)): Call
325 _M_construct with iterator category argument.
326 (basic_string(const basic_string&, const Alloc&)): Likewise.
327 (basic_string(basic_string&&, const Alloc&)): Likewise.
328 (basic_string(_InputIter, _InputIter, const Alloc&)): Likewise
329 for C++11 and later, call _M_construct_aux for C++98.
330 * include/bits/basic_string.tcc
331 (_M_construct(I, I, input_iterator_tag)): Replace try-block with
333 (_M_construct(I, I, forward_iterator_tag)): Likewise. Remove
334 __is_null_pointer check.
336 2021-11-17 Jonathan Wakely <jwakely@redhat.com>
339 * include/bits/basic_string.h (_M_use_local_data()): New
340 member function to make local buffer the active member.
341 (assign(const basic_string&)): Use it.
342 * include/bits/basic_string.tcc (_M_construct, reserve()):
345 2021-11-17 Jonathan Wakely <jwakely@redhat.com>
348 * libsupc++/tinfo2.cc (type_info::before): Use unadjusted name
349 to check for the '*' prefix.
350 * testsuite/util/testsuite_shared.cc: Add type_info object for
352 * testsuite/18_support/type_info/103240.cc: New test.
354 2021-11-16 Jonathan Wakely <jwakely@redhat.com>
356 * include/bits/basic_string.h (operator<=>): Use constexpr
358 * testsuite/21_strings/basic_string/modifiers/constexpr.cc:
359 Require cxx11-abit effective target.
360 * testsuite/21_strings/headers/string/synopsis.cc: Add
361 conditional constexpr to declarations, and adjust relational
364 2021-11-16 Patrick Palka <ppalka@redhat.com>
366 * src/c++17/ryu/MERGE: Update the commit hash.
367 * src/c++17/ryu/d2s_intrinsics.h: Merge from Ryu's master
370 2021-11-16 Jonathan Wakely <jwakely@redhat.com>
372 * include/bits/basic_string.h (basic_string, operator""s): Add
374 (basic_string::basic_string(basic_string&&)): Only copy
375 initialized portion of the buffer.
376 (basic_string::basic_string(basic_string&&, const Alloc&)):
378 * include/bits/basic_string.tcc (basic_string): Add constexpr
380 (basic_string::swap(basic_string&)): Only copy initialized
381 portions of the buffers.
382 (basic_string::_M_replace): Add constexpr implementation that
383 doesn't depend on pointer comparisons.
384 * include/bits/cow_string.h: Adjust comment.
385 * include/ext/type_traits.h (__is_null_pointer): Add constexpr.
386 * include/std/string (erase, erase_if): Add constexpr.
387 * include/std/version (__cpp_lib_constexpr_string): Update
389 * testsuite/21_strings/basic_string/cons/char/constexpr.cc:
391 * testsuite/21_strings/basic_string/cons/wchar_t/constexpr.cc:
393 * testsuite/21_strings/basic_string/literals/constexpr.cc:
395 * testsuite/21_strings/basic_string/modifiers/constexpr.cc: New test.
396 * testsuite/21_strings/basic_string/modifiers/swap/char/constexpr.cc:
398 * testsuite/21_strings/basic_string/modifiers/swap/wchar_t/constexpr.cc:
400 * testsuite/21_strings/basic_string/version.cc: New test.
402 2021-11-16 Jonathan Wakely <jwakely@redhat.com>
404 * include/bits/stl_bvector.h (swap(_Bit_reference, _Bit_reference))
405 (swap(_Bit_reference, bool&), swap(bool&, _Bit_reference)):
406 Define as hidden friends of _Bit_reference.
408 2021-11-16 Jonathan Wakely <jwakely@redhat.com>
410 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/1.cc:
411 Fix reads past the end of strings.
412 * testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc:
414 * testsuite/experimental/string_view/operations/compare/wchar_t/1.cc:
417 2021-11-16 Jonathan Wakely <jwakely@redhat.com>
419 * testsuite/21_strings/basic_string/allocator/71964.cc: Fix
421 * testsuite/23_containers/set/allocator/71964.cc: Likewise.
423 2021-11-15 Jason Merrill <jason@redhat.com>
425 * testsuite/20_util/to_address/1_neg.cc: Adjust error.
426 * testsuite/26_numerics/random/concept.cc: Adjust asserts.
428 2021-11-15 François Dumont <fdumont@gcc.gnu.org>
430 * include/bits/hashtable_policy.h:
431 (_Hash_code_base<>::_M_hash_code(const _Hash&, const _Hash_node_value<_Value, true>&)): New.
432 (_Hash_code_base<>::_M_hash_code<_H2>(const _H2&, const _Hash_node_value<>&)): New.
433 * include/bits/hashtable.h (_Hashtable<>::_M_merge_unique): Use latter.
434 (_Hashtable<>::_M_merge_multi): Likewise.
435 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc (test05): New test.
436 * testsuite/23_containers/unordered_set/modifiers/merge.cc (test04): New test.
438 2021-11-15 Jason Merrill <jason@redhat.com>
440 * src/c++17/memory_resource.cc: Add missing constexpr.
441 * include/experimental/internet: Only mark copy constructor
442 as constexpr with __cpp_constexpr_dynamic_alloc.
444 2021-11-14 François Dumont <fdumont@gcc.gnu.org>
446 * include/debug/safe_container.h (_Safe_container<>::_M_safe): Remove.
447 * include/debug/deque (deque::operator=(initializer_list<>)): Replace
448 _M_base() call with _Base:: call.
449 (deque::operator[](size_type)): Likewise.
450 * include/debug/forward_list (forward_list(forward_list&&, const allocator_type&)):
451 Remove _M_safe() and _M_base() calls.
452 (forward_list::operator=(initializer_list<>)): Remove _M_base() calls.
453 (forward_list::splice_after, forward_list::merge): Likewise.
454 * include/debug/list (list(list&&, const allocator_type&)):
455 Remove _M_safe() and _M_base() calls.
456 (list::operator=(initializer_list<>)): Remove _M_base() calls.
457 (list::splice, list::merge): Likewise.
458 * include/debug/map.h (map(map&&, const allocator_type&)):
459 Remove _M_safe() and _M_base() calls.
460 (map::operator=(initializer_list<>)): Remove _M_base() calls.
461 * include/debug/multimap.h (multimap(multimap&&, const allocator_type&)):
462 Remove _M_safe() and _M_base() calls.
463 (multimap::operator=(initializer_list<>)): Remove _M_base() calls.
464 * include/debug/set.h (set(set&&, const allocator_type&)):
465 Remove _M_safe() and _M_base() calls.
466 (set::operator=(initializer_list<>)): Remove _M_base() calls.
467 * include/debug/multiset.h (multiset(multiset&&, const allocator_type&)):
468 Remove _M_safe() and _M_base() calls.
469 (multiset::operator=(initializer_list<>)): Remove _M_base() calls.
470 * include/debug/string (basic_string(basic_string&&, const allocator_type&)):
471 Remove _M_safe() and _M_base() calls.
472 (basic_string::operator=(initializer_list<>)): Remove _M_base() call.
473 (basic_string::operator=(const _CharT*), basic_string::operator=(_CharT)): Likewise.
474 (basic_string::operator[](size_type), basic_string::operator+=(const basic_string&)):
476 (basic_string::operator+=(const _Char*), basic_string::operator+=(_CharT)): Likewise.
477 * include/debug/unordered_map (unordered_map(unordered_map&&, const allocator_type&)):
478 Remove _M_safe() and _M_base() calls.
479 (unordered_map::operator=(initializer_list<>), unordered_map::merge):
480 Remove _M_base() calls.
481 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
482 Remove _M_safe() and _M_base() calls.
483 (unordered_multimap::operator=(initializer_list<>), unordered_multimap::merge):
484 Remove _M_base() calls.
485 * include/debug/unordered_set (unordered_set(unordered_set&&, const allocator_type&)):
486 Remove _M_safe() and _M_base() calls.
487 (unordered_set::operator=(initializer_list<>), unordered_set::merge):
488 Remove _M_base() calls.
489 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
490 Remove _M_safe() and _M_base() calls.
491 (unordered_multiset::operator=(initializer_list<>), unordered_multiset::merge):
492 Remove _M_base() calls.
493 * include/debug/vector (vector(vector&&, const allocator_type&)):
494 Remove _M_safe() and _M_base() calls.
495 (vector::operator=(initializer_list<>)): Remove _M_base() calls.
496 (vector::operator[](size_type)): Likewise.
498 2021-11-13 Jonathan Wakely <jwakely@redhat.com>
500 * include/Makefile.am: Add spanstream header.
501 * include/Makefile.in: Regenerate.
502 * include/precompiled/stdc++.h: Add spanstream header.
503 * include/std/version (__cpp_lib_spanstream): Define.
504 * include/std/spanstream: New file.
505 * testsuite/27_io/spanstream/1.cc: New test.
506 * testsuite/27_io/spanstream/version.cc: New test.
508 2021-11-13 Hans-Peter Nilsson <hp@axis.com>
511 * acinclude.m4 (GLIBCXX_CHECK_GETENTROPY, GLIBCXX_CHECK_ARC4RANDOM):
512 Use GCC_TRY_COMPILE_OR_LINK instead of AC_TRY_COMPILE.
513 * configure: Regenerate.
515 2021-11-12 Jonathan Wakely <jwakely@redhat.com>
518 * acinclude.m4 (libtool_VERSION): Bump version.
519 * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Add version and
521 * configure: Regenerate.
522 * include/bits/c++config (__replacement_assert): Remove, declare
523 __glibcxx_assert_fail instead.
524 * src/c++11/debug.cc (__glibcxx_assert_fail): New function to
525 replace __replacement_assert, writing to stderr instead of
527 * testsuite/util/testsuite_abi.cc: Update latest version.
529 2021-11-12 Jonathan Wakely <jwakely@redhat.com>
530 Josh Marshall <joshua.r.marshall.1991@gmail.com>
532 * include/bits/alloc_traits.h (_Destroy): Make constexpr for
534 * include/bits/allocator.h (__shrink_to_fit::_S_do_it):
536 * include/bits/stl_algobase.h (__fill_a1): Declare _Bit_iterator
537 overload constexpr for C++20.
538 * include/bits/stl_bvector.h (_Bit_type, _S_word_bit): Move out
540 (_Bit_reference, _Bit_iterator_base, _Bit_iterator)
541 (_Bit_const_iterator, _Bvector_impl_data, _Bvector_base)
542 (vector<bool, A>>): Add constexpr to every member function.
543 (_Bvector_base::_M_allocate): Initialize storage during constant
545 (vector<bool, A>::_M_initialize_value): Use __fill_bvector_n
547 (__fill_bvector_n): New helper function to replace memset during
549 * include/bits/stl_uninitialized.h (__uninitialized_copy<false>):
551 (__do_uninit_copy): New function.
552 (__uninitialized_fill<false>): Move logic to ...
553 (__do_uninit_fill): New function.
554 (__uninitialized_fill_n<false>): Move logic to ...
555 (__do_uninit_fill_n): New function.
556 (__uninitialized_copy_a): Add constexpr. Use __do_uninit_copy.
557 (__uninitialized_move_a, __uninitialized_move_if_noexcept_a):
559 (__uninitialized_fill_a): Add constexpr. Use __do_uninit_fill.
560 (__uninitialized_fill_n_a): Add constexpr. Use
562 (__uninitialized_default_n, __uninitialized_default_n_a)
563 (__relocate_a_1, __relocate_a): Add constexpr.
564 * include/bits/stl_vector.h (_Vector_impl_data, _Vector_impl)
565 (_Vector_base, vector): Add constexpr to every member function.
566 (_Vector_impl::_S_adjust): Disable ASan annotation during
568 (_Vector_base::_S_use_relocate): Disable bitwise-relocation
569 during constant evaluation.
570 (vector::_Temporary_value): Use a union for storage.
571 * include/bits/vector.tcc (vector, vector<bool>): Add constexpr
572 to every member function.
573 * include/std/vector (erase_if, erase): Add constexpr.
574 * testsuite/23_containers/headers/vector/synopsis.cc: Add
575 constexpr for C++20 mode.
576 * testsuite/23_containers/vector/bool/cmp_c++20.cc: Change to
577 compile-only test using constant expressions.
578 * testsuite/23_containers/vector/bool/capacity/29134.cc: Adjust
579 namespace for _S_word_bit.
580 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
582 * testsuite/23_containers/vector/cmp_c++20.cc: Likewise.
583 * testsuite/23_containers/vector/cons/89164.cc: Adjust errors
584 for C++20 and move C++17 test to ...
585 * testsuite/23_containers/vector/cons/89164_c++17.cc: ... here.
586 * testsuite/23_containers/vector/bool/capacity/constexpr.cc: New test.
587 * testsuite/23_containers/vector/bool/cons/constexpr.cc: New test.
588 * testsuite/23_containers/vector/bool/element_access/constexpr.cc: New test.
589 * testsuite/23_containers/vector/bool/modifiers/assign/constexpr.cc: New test.
590 * testsuite/23_containers/vector/bool/modifiers/constexpr.cc: New test.
591 * testsuite/23_containers/vector/bool/modifiers/swap/constexpr.cc: New test.
592 * testsuite/23_containers/vector/capacity/constexpr.cc: New test.
593 * testsuite/23_containers/vector/cons/constexpr.cc: New test.
594 * testsuite/23_containers/vector/data_access/constexpr.cc: New test.
595 * testsuite/23_containers/vector/element_access/constexpr.cc: New test.
596 * testsuite/23_containers/vector/modifiers/assign/constexpr.cc: New test.
597 * testsuite/23_containers/vector/modifiers/constexpr.cc: New test.
598 * testsuite/23_containers/vector/modifiers/swap/constexpr.cc: New test.
600 2021-11-11 Jonathan Wakely <jwakely@redhat.com>
602 * include/debug/deque (deque::operator=(const deque&)): Remove
604 * include/debug/list (list::operator=(const list&)): Likewise.
605 * include/debug/map.h (map::operator=(const map&)): Likewise.
606 * include/debug/multimap.h (multimap::operator=(const multimap&)):
608 * include/debug/multiset.h (multiset::operator=(const multiset&)):
610 * include/debug/set.h (set::operator=(const set&)): Likewise.
611 * include/debug/string (basic_string::operator=(const basic_string&)):
613 * include/debug/vector (vector::operator=(const vector&)):
615 (_Safe_vector::operator=(const _Safe_vector&)): Define for
618 2021-11-11 Jonathan Wakely <jwakely@redhat.com>
620 * include/std/memory_resource (memory_resource::allocate):
621 Implicitly create objects in the returned storage.
623 2021-11-11 Jonathan Wakely <jwakely@redhat.com>
625 * include/bits/stl_bvector.h (vector<bool>::data()): Give
626 protected access, and delete for C++11 and later.
628 2021-11-10 Jonathan Wakely <jwakely@redhat.com>
631 * testsuite/17_intro/headers/c++1998/49745.cc: Explicitly list
632 all C++ headers instead of including <bits/stdc++.h>
634 2021-11-10 Jonathan Wakely <jwakely@redhat.com>
638 * config/os/gnu-linux/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK):
639 Define for glibc 2.34 and later.
641 2021-11-09 François Dumont <fdumont@gcc.gnu.org>
643 * include/bits/hashtable_policy.h (__distance_fw): Replace class keyword with
645 * include/bits/hashtable.h (_Hashtable<>::_M_merge_unique): Remove noexcept
646 qualification. Use const_iterator for node extraction/reinsert.
647 (_Hashtable<>::_M_merge_multi): Likewise. Compute new hash code before extract.
648 * include/debug/safe_container.h (_Safe_container<>): Make all methods
650 * include/debug/safe_unordered_container.h
651 (_Safe_unordered_container<>::_UContInvalidatePred<_ExtractKey, _Source>): New.
652 (_Safe_unordered_container<>::_UMContInvalidatePred<_ExtractKey, _Source>): New.
653 (_Safe_unordered_container<>::_UContMergeGuard<_Source, _InvalidatePred>): New.
654 (_Safe_unordered_container<>::_S_uc_guard<_ExtractKey, _Source>): New.
655 (_Safe_unordered_container<>::_S_umc_guard<_ExtractKey, _Source>): New.
656 (_Safe_unordered_container<>::_M_invalide_all): Make public.
657 (_Safe_unordered_container<>::_M_invalide_if): Likewise.
658 (_Safe_unordered_container<>::_M_invalide_local_if): Likewise.
659 * include/debug/unordered_map
660 (unordered_map<>::mapped_type, pointer, const_pointer): New typedef.
661 (unordered_map<>::reference, const_reference, difference_type): New typedef.
662 (unordered_map<>::get_allocator, empty, size, max_size): Add usings.
663 (unordered_map<>::bucket_count, max_bucket_count, bucket): Add usings.
664 (unordered_map<>::hash_function, key_equal, count, contains): Add usings.
665 (unordered_map<>::operator[], at, rehash, reserve): Add usings.
666 (unordered_map<>::merge): New.
667 (unordered_multimap<>::mapped_type, pointer, const_pointer): New typedef.
668 (unordered_multimap<>::reference, const_reference, difference_type): New typedef.
669 (unordered_multimap<>::get_allocator, empty, size, max_size): Add usings.
670 (unordered_multimap<>::bucket_count, max_bucket_count, bucket): Add usings.
671 (unordered_multimap<>::hash_function, key_equal, count, contains): Add usings.
672 (unordered_multimap<>::rehash, reserve): Add usings.
673 (unordered_multimap<>::merge): New.
674 * include/debug/unordered_set
675 (unordered_set<>::mapped_type, pointer, const_pointer): New typedef.
676 (unordered_set<>::reference, const_reference, difference_type): New typedef.
677 (unordered_set<>::get_allocator, empty, size, max_size): Add usings.
678 (unordered_set<>::bucket_count, max_bucket_count, bucket): Add usings.
679 (unordered_set<>::hash_function, key_equal, count, contains): Add usings.
680 (unordered_set<>::rehash, reserve): Add usings.
681 (unordered_set<>::merge): New.
682 (unordered_multiset<>::mapped_type, pointer, const_pointer): New typedef.
683 (unordered_multiset<>::reference, const_reference, difference_type): New typedef.
684 (unordered_multiset<>::get_allocator, empty, size, max_size): Add usings.
685 (unordered_multiset<>::bucket_count, max_bucket_count, bucket): Add usings.
686 (unordered_multiset<>::hash_function, key_equal, count, contains): Add usings.
687 (unordered_multiset<>::rehash, reserve): Add usings.
688 (unordered_multiset<>::merge): New.
689 * testsuite/23_containers/unordered_map/debug/merge1_neg.cc: New test.
690 * testsuite/23_containers/unordered_map/debug/merge2_neg.cc: New test.
691 * testsuite/23_containers/unordered_map/debug/merge3_neg.cc: New test.
692 * testsuite/23_containers/unordered_map/debug/merge4_neg.cc: New test.
693 * testsuite/23_containers/unordered_multimap/debug/merge1_neg.cc: New test.
694 * testsuite/23_containers/unordered_multimap/debug/merge2_neg.cc: New test.
695 * testsuite/23_containers/unordered_multimap/debug/merge3_neg.cc: New test.
696 * testsuite/23_containers/unordered_multimap/debug/merge4_neg.cc: New test.
697 * testsuite/23_containers/unordered_multiset/debug/merge1_neg.cc: New test.
698 * testsuite/23_containers/unordered_multiset/debug/merge2_neg.cc: New test.
699 * testsuite/23_containers/unordered_multiset/debug/merge3_neg.cc: New test.
700 * testsuite/23_containers/unordered_multiset/debug/merge4_neg.cc: New test.
701 * testsuite/23_containers/unordered_set/debug/merge1_neg.cc: New test.
702 * testsuite/23_containers/unordered_set/debug/merge2_neg.cc: New test.
703 * testsuite/23_containers/unordered_set/debug/merge3_neg.cc: New test.
704 * testsuite/23_containers/unordered_set/debug/merge4_neg.cc: New test.
705 * testsuite/util/testsuite_abi.h: [_GLIBCXX_DEBUG] Use normal unordered
706 container implementation.
708 2021-11-09 Jonathan Wakely <jwakely@redhat.com>
710 * testsuite/26_numerics/random/random_device/cons/token.cc:
711 Print results of random_device_available checks.
713 2021-11-09 Jonathan Wakely <jwakely@redhat.com>
716 * src/c++11/random.cc: Check __powerpc64__ not __powerpc__.
718 2021-11-09 Jonathan Wakely <jwakely@redhat.com>
720 * acinclude.m4 (GLIBCXX_CHECK_GETENTROPY, GLIBCXX_CHECK_ARC4RANDOM):
722 * configure.ac (GLIBCXX_CHECK_GETENTROPY, GLIBCXX_CHECK_ARC4RANDOM):
724 * config.h.in: Regenerate.
725 * configure: Regenerate.
726 * src/c++11/random.cc (random_device): Add getentropy and
727 arc4random as sources.
728 * testsuite/26_numerics/random/random_device/cons/token.cc:
730 * testsuite/26_numerics/random/random_device/entropy.cc:
733 2021-11-09 Jonathan Wakely <jwakely@redhat.com>
735 * testsuite/26_numerics/random/random_device/cons/token.cc:
736 Retry if random devices produce the same value.
738 2021-11-09 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
740 * config/os/vxworks/os_defines.h (_GLIBCXX_HAVE_TLS): Only
741 define for VxWorks >= 6.6.
743 2021-11-05 Jonathan Wakely <jwakely@redhat.com>
745 * include/bits/range_access.h (begin(valarray), end(valarray)):
748 2021-11-05 Jonathan Wakely <jwakely@redhat.com>
750 * include/std/tuple (tuple_size_v): Fix pack expansion.
752 2021-11-05 Jonathan Wakely <jwakely@redhat.com>
754 * src/c++11/random.cc (__x86_rdrand, __x86_rdseed): Add
755 [[unlikely]] attribute.
757 2021-11-05 Jonathan Wakely <jwakely@redhat.com>
759 * src/c++11/random.cc [__powerpc__] (USE_DARN): Define.
760 (__ppc_darn): New function to use POWER9 DARN instruction.
761 (Which): Add 'darn' enumerator.
762 (which_source): Check for __ppc_darn.
763 (random_device::_M_init): Support "darn" and "hw" tokens.
764 (random_device::_M_getentropy): Add darn to switch.
765 * testsuite/26_numerics/random/random_device/cons/token.cc:
767 * testsuite/26_numerics/random/random_device/entropy.cc:
770 2021-11-05 Jonathan Wakely <jwakely@redhat.com>
772 * testsuite/lib/gdb-test.exp: Add target selector support to the
774 * testsuite/libstdc++-prettyprinters/80276.cc: Add xfail for
776 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
777 * testsuite/libstdc++-prettyprinters/prettyprinters.exp: Tweak
780 2021-11-04 Jonathan Wakely <jwakely@redhat.com>
783 * python/libstdcxx/v6/printers.py (_tuple_impl_get): New helper
784 for accessing the tuple element stored in a _Tuple_impl node.
785 (tuple_get): New function for accessing a tuple element.
786 (unique_ptr_get): New function for accessing a unique_ptr.
787 (UniquePointerPrinter, StdPathPrinter): Use unique_ptr_get.
788 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker): Cast
789 tuple to its base class before accessing _M_head_impl.
791 2021-11-04 Jonathan Wakely <jwakely@redhat.com>
793 * doc/xml/manual/evolution.xml: Document deprecations.
794 * doc/html/*: Regenerate.
795 * libsupc++/exception (unexpected_handler, unexpected)
796 (get_unexpected, set_unexpected): Add deprecated attribute.
797 Do not define without _GLIBCXX_USE_DEPRECATED for C++17 and up.
798 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Disable
800 * libsupc++/eh_ptr.cc (std::rethrow_exception): Likewise.
801 * libsupc++/eh_terminate.cc: Likewise.
802 * libsupc++/eh_throw.cc (__cxa_init_primary_exception):
804 * libsupc++/unwind-cxx.h (struct __cxa_exception): Use
805 terminate_handler instead of unexpected_handler.
806 (struct __cxa_dependent_exception): Likewise.
807 (__unexpected): Likewise.
808 * testsuite/18_support/headers/exception/synopsis.cc: Add
809 dg-warning for deprecated warning.
810 * testsuite/18_support/exception_ptr/60612-unexpected.cc:
811 Disable deprecated warnings.
812 * testsuite/18_support/set_unexpected.cc: Likewise.
813 * testsuite/18_support/unexpected_handler.cc: Likewise.
815 2021-11-04 Jonathan Wakely <jwakely@redhat.com>
817 * include/bits/utility.h (__find_uniq_type_in_pack): Move
818 definition to here, ...
819 * include/std/tuple (__find_uniq_type_in_pack): ... from here.
820 * include/std/variant (__detail__variant::__index_of): Remove.
821 (__detail::__variant::__exactly_once): Define using
822 __find_uniq_type_in_pack instead of __index_of.
823 (get<T>, get_if<T>, variant::__index_of): Likewise.
825 2021-11-04 Jonathan Wakely <jwakely@redhat.com>
827 * include/bits/stl_pair.h (tuple_size_v): Define partial
828 specializations for std::pair.
829 * include/bits/utility.h (_Nth_type): Move definition here
830 and define primary template.
831 (tuple_size_v): Move definition here.
832 * include/std/array (tuple_size_v): Define partial
833 specializations for std::array.
834 * include/std/tuple (tuple_size_v): Move primary template to
835 <bits/utility.h>. Define partial specializations for
837 (tuple_element): Change definition to use _Nth_type.
838 * include/std/variant (_Nth_type): Move to <bits/utility.h>.
839 (variant_alternative, variant): Adjust qualification of
841 * testsuite/20_util/tuple/element_access/get_neg.cc: Prune
842 additional errors from _Nth_type.
844 2021-11-04 Jonathan Wakely <jwakely@redhat.com>
846 * include/std/variant (__detail::__variant::__emplace): New
848 (_Copy_assign_base::operator=): Reorder conditions to match
849 bulleted list of effects in the standard. Use __emplace instead
850 of _M_reset followed by _Construct.
851 (_Move_assign_base::operator=): Likewise.
852 (__construct_by_index): Remove.
853 (variant::emplace): Use __emplace instead of _M_reset followed
854 by __construct_by_index.
855 (variant::swap): Hoist valueless cases out of visitor. Use
856 __emplace to replace _M_reset followed by _Construct.
858 2021-11-04 Jonathan Wakely <jwakely@redhat.com>
860 * include/std/variant (_Nth_type): Define partial
861 specializations to reduce number of instantiations.
862 (variant_size_v): Define partial specializations to avoid
864 (variant_alternative): Use _Nth_type. Add static assert.
865 (__tuple_count, __tuple_count_v): Replace with ...
866 (__count): New variable template.
867 (_Variant_union): Add deleted constructor.
868 (variant::__to_type): Use _Nth_type.
869 (variant::emplace): Use _Nth_type. Add deleted overloads for
870 invalid types and indices.
872 2021-11-04 Jonathan Wakely <jwakely@redhat.com>
875 * include/std/variant (_Variant_storage::__index_of): Remove.
876 (__variant_construct_single): Remove.
877 (__variant_construct): Remove.
878 (_Copy_ctor_base::_Copy_ctor_base(const _Copy_ctor_base&)): Do
879 construction directly instead of using __variant_construct.
880 (_Move_ctor_base::_Move_ctor_base(_Move_ctor_base&&)): Likewise.
881 (_Move_ctor_base::_M_destructive_move()): Remove.
882 (_Move_ctor_base::_M_destructive_copy()): Remove.
883 (_Copy_assign_base::operator=(const _Copy_assign_base&)): Do
884 construction directly instead of using _M_destructive_copy.
885 (variant::swap): Do construction directly instead of using
887 * testsuite/20_util/variant/102912.cc: New test.
889 2021-11-03 Jonathan Wakely <jwakely@redhat.com>
892 * include/bits/list.tcc (list::sort): Use mutable iterators for
894 * include/bits/stl_list.h (_Scratch_list::_Ptr_cmp): Likewise.
895 * testsuite/23_containers/list/operations/66742.cc: Check
896 non-const comparisons.
898 2021-11-03 Jonathan Wakely <jwakely@redhat.com>
900 * include/std/valarray (valarray::valarray()): Add noexcept.
901 (valarray::operator[]): Likewise.
903 2021-11-01 Jonathan Wakely <jwakely@redhat.com>
905 * include/debug/stl_iterator.h (__valid_range): Add constexpr
906 for C++20. Qualify call to avoid ADL.
907 (__get_distance, __can_advance, __unsafe, __base): Likewise.
908 * testsuite/25_algorithms/move/constexpr.cc: Also check with
909 std::reverse_iterator arguments.
911 2021-11-01 Jonathan Wakely <jwakely@redhat.com>
913 * include/std/span (span(Range&&)): Reorder constraints.
915 2021-11-01 Jonathan Wakely <jwakely@redhat.com>
918 * include/std/valarray (begin, end): Do not dereference an empty
919 valarray. Add noexcept and [[nodiscard]].
920 * testsuite/26_numerics/valarray/range_access.cc: Check empty
921 valarray. Check iterator properties. Run as well as compiling.
922 * testsuite/26_numerics/valarray/range_access2.cc: Likewise.
923 * testsuite/26_numerics/valarray/103022.cc: New test.
925 2021-10-29 Jonathan Wakely <jwakely@redhat.com>
927 * testsuite/23_containers/stack/deduction.cc: Fix typo.
929 2021-10-26 Martin Sebor <msebor@redhat.com>
931 * testsuite/21_strings/basic_string/capacity/1.cc: Also suppress
933 * testsuite/27_io/filesystem/path/factory/u8path-char8_t.cc: Same.
935 2021-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
937 * testsuite/28_regex/basic_regex/84110.cc (test01)
938 [__cpp_exceptions]: Disambiguate extended.
940 2021-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
942 * testsuite/17_intro/names.cc [__sun__] (r, x): Undef.
944 2021-10-22 Jonathan Wakely <jwakely@redhat.com>
947 * include/std/any (make_any): Add SFINAE constraint.
948 * testsuite/20_util/any/102894.cc: New test.
950 2021-10-21 Jonathan Wakely <jwakely@redhat.com>
952 * doc/doxygen/stdheader.cc: Refactor. Use C++23. Add new
954 * scripts/run_doxygen: Fix post-processing of #include
955 directives in man pages. Use new xg++ to compile helper program.
957 2021-10-21 Jonathan Wakely <jwakely@redhat.com>
959 * include/bits/mofunc_impl.h: Add doxygen comments.
960 * include/std/functional: Likewise.
962 2021-10-21 Jonathan Wakely <jwakely@redhat.com>
964 * include/bits/alloc_traits.h: Suppress doxygen documentation.
965 * include/bits/allocated_ptr.h: Likewise.
966 * include/bits/enable_special_members.h: Likewise.
967 * include/bits/hashtable.h: Likewise.
968 * include/bits/hashtable_policy.h: Likewise.
969 * include/bits/uses_allocator.h: Likewise.
970 * include/bits/node_handle.h: Document node handles and suppress
971 documentation for protected members.
972 * include/std/any: Suppress documentation for implementation
975 2021-10-21 Patrick Palka <ppalka@redhat.com>
978 * include/bits/stl_iterator.h (__niter_base): Make constexpr
980 (__miter_base): Likewise.
981 * testsuite/25_algorithms/move/constexpr.cc: New test.
983 2021-10-21 Patrick Palka <ppalka@redhat.com>
985 * include/std/ranges (istream_view): Replace this function
986 template with an alias template as per P2432R1.
987 (wistream_view): Define as per P2432R1.
988 (views::_Istream, views::istream): Likewise.
989 * testsuite/std/ranges/istream_view.cc (test07): New test.
991 2021-10-21 Patrick Palka <ppalka@redhat.com>
993 * include/bits/ranges_util.h (views::_Drop): Forward declare.
994 (subrange): Befriend views::_Drop.
995 (subrange::_S_store_size): Declare constexpr instead of just
996 const, remove obsolete comment.
997 * include/std/ranges (views::__detail::__is_empty_view): Define.
998 (views::__detail::__is_basic_string_view): Likewise.
999 (views::__detail::__is_subrange): Likewise.
1000 (views::__detail::__is_iota_view): Likewise.
1001 (views::__detail::__can_take_view): Rename template parm _Tp to _Dp.
1002 (views::_Take): Rename template parm _Tp to _Dp, make it non-deducible
1003 and fix it to range_difference_t<_Range>. Implement P1739R4 and
1005 (views::__detail::__can_drop_view): Rename template parm _Tp to _Dp.
1006 (views::_Drop): As with views::_Take.
1007 (views::_Counted): Implement P1739R4 changes.
1008 * include/std/span (__detail::__is_std_span): Rename to ...
1009 (__detail::__is_span): ... this and turn it into a variable
1011 (__detail::__is_std_array): Turn it into a variable template.
1012 (span::span): Adjust uses of __is_std_span and __is_std_array
1014 * testsuite/std/ranges/adaptors/p1739.cc: New test.
1016 2021-10-21 Patrick Palka <ppalka@redhat.com>
1018 * include/bits/stl_iterator.h (common_iterator::__arrow_proxy):
1019 Make fully constexpr as per LWG 3595.
1020 (common_iterator::__postfix_proxy): Likewise.
1022 2021-10-21 Patrick Palka <ppalka@redhat.com>
1024 * include/std/ranges (lazy_split_view::base): Add forward_range
1025 constraint as per LWG 3591.
1026 (lazy_split_view::begin, lazy_split_view::end): Also check
1027 simpleness of _Pattern as per LWG 3592.
1028 (split_view::base): Relax copyable constraint as per LWG 3590.
1030 2021-10-21 Patrick Palka <ppalka@redhat.com>
1032 * include/std/ranges (join_view::__iter_cat::_S_iter_cat): Adjust
1033 criteria for returning bidirectional_iterator_tag as per LWG 3535.
1034 (join_view::_Iterator::_S_iter_concept): Likewise.
1036 2021-10-21 Patrick Palka <ppalka@redhat.com>
1038 * include/bits/ranges_base.h (viewable_range): Adjust as per
1040 * testsuite/std/ranges/adaptors/all.cc (test07): New test.
1042 2021-10-21 Jonathan Wakely <jwakely@redhat.com>
1045 * include/std/optional (optional::and_then, optional::transform):
1046 Remove requires-clause.
1047 * testsuite/20_util/optional/monadic/and_then.cc: Check
1048 overload resolution doesn't cause errors.
1049 * testsuite/20_util/optional/monadic/transform.cc: Likewise.
1051 2021-10-20 Jonathan Wakely <jwakely@redhat.com>
1053 * testsuite/20_util/optional/monadic/transform.cc: Check that
1054 an rvalue result is not materialized too soon.
1056 2021-10-19 Patrick Palka <ppalka@redhat.com>
1058 * include/std/ranges (iota_view::_Iterator::operator+): Adjust
1059 definition as per LWG 3580.
1060 (iota_view::_Iterator::operator-): Likewise.
1062 2021-10-19 Patrick Palka <ppalka@redhat.com>
1064 * include/std/ranges (basic_istream_view::_M_object): Value
1065 initialize as per LWG 3568.
1067 2021-10-19 Patrick Palka <ppalka@redhat.com>
1069 * include/bits/ranges_util.h
1070 (__detail::__uses_nonqualification_pointer_conversion): Define
1072 (__detail::__convertible_to_nonslicing): ... here, as per LWG 3470.
1073 * testsuite/std/ranges/subrange/1.cc: New test.
1075 2021-10-19 Patrick Palka <ppalka@redhat.com>
1077 * include/std/ranges (iota_view::_Iterator): Befriend iota_view.
1078 (iota_view::_Sentinel): Likewise.
1079 (iota_view::iota_view): Add three overloads, each taking an
1080 iterator/sentinel pair as per LWG 3523.
1081 * testsuite/std/ranges/iota/iota_view.cc (test06): New test.
1083 2021-10-19 Patrick Palka <ppalka@redhat.com>
1085 * include/bits/ranges_base.h (view_interface): Forward declare.
1086 (__detail::__is_derived_from_view_interface_fn): Declare.
1087 (__detail::__is_derived_from_view_interface): Define as per LWG 3549.
1088 (enable_view): Adjust as per LWG 3549.
1089 * include/bits/ranges_util.h (view_interface): Don't derive from
1091 * include/std/ranges (filter_view): Revert r11-3504 change.
1092 (transform_view): Likewise.
1093 (take_view): Likewise.
1094 (take_while_view): Likewise.
1095 (drop_view): Likewise.
1096 (drop_while_view): Likewise.
1097 (join_view): Likewise.
1098 (lazy_split_view): Likewise.
1099 (split_view): Likewise.
1100 (reverse_view): Likewise.
1101 * testsuite/std/ranges/adaptors/sizeof.cc: Update expected sizes.
1102 * testsuite/std/ranges/view.cc (test_view::test_view): Remove
1103 this default ctor since views no longer need to be default initable.
1106 2021-10-19 Jonathan Wakely <jwakely@redhat.com>
1108 * src/c++11/random.cc (which_source): New helper function.
1109 (random_device::_M_getentropy()): Use which_source and return
1110 suitable values for sources other than device files.
1111 * testsuite/26_numerics/random/random_device/entropy.cc: New test.
1113 2021-10-19 Jonathan Wakely <jwakely@redhat.com>
1115 * doc/Makefile.am (stamp-html-doxygen, stamp-html-doxygen)
1116 (stamp-latex-doxygen, stamp-man-doxygen): Fix recipes for
1117 relative ${top_srcdir}.
1118 * doc/Makefile.in: Regenerate.
1120 2021-10-19 Jonathan Wakely <jwakely@redhat.com>
1122 * include/std/variant (_Uninitialized): Use an empty struct
1123 for the unused union member, instead of char.
1125 2021-10-19 Jonathan Wakely <jwakely@redhat.com>
1127 * include/bits/stl_stack.h (stack(Iterator, Iterator)): Remove
1128 non-deducible template parameter from deduction guide.
1129 * testsuite/23_containers/stack/deduction.cc: Check new C++23
1132 2021-10-19 Jonathan Wakely <jwakely@redhat.com>
1134 * include/std/optional (_Optional_payload_base::_Storage): Add
1135 constructor taking a callable function to invoke.
1136 (_Optional_payload_base::_M_apply): New function.
1137 (__cpp_lib_monadic_optional): Define for C++23.
1138 (optional::and_then, optional::transform, optional::or_else):
1140 * include/std/ranges (__detail::__cached): Remove.
1141 (__detail::__non_propagating_cache): Remove use of __cached for
1142 contained value. Use _Optional_payload_base::_M_construct and
1143 _Optional_payload_base::_M_apply to set the contained value.
1144 * include/std/version (__cpp_lib_monadic_optional): Define.
1145 * testsuite/20_util/optional/monadic/and_then.cc: New test.
1146 * testsuite/20_util/optional/monadic/or_else.cc: New test.
1147 * testsuite/20_util/optional/monadic/or_else_neg.cc: New test.
1148 * testsuite/20_util/optional/monadic/transform.cc: New test.
1149 * testsuite/20_util/optional/monadic/version.cc: New test.
1151 2021-10-19 Jonathan Wakely <jwakely@redhat.com>
1154 * include/bits/mofunc_impl.h (move_only_function): Remove
1155 invalid base initializer.
1156 * testsuite/20_util/move_only_function/cons.cc: Instantiate
1157 constructors to check bodies.
1159 2021-10-15 Jonathan Wakely <jwakely@redhat.com>
1161 * include/bits/fs_path.h (path::_S_convert(T)): Avoid recursive
1162 call to function with deduced return type.
1164 2021-10-15 Jonathan Wakely <jwakely@redhat.com>
1166 * include/bits/basic_string.h (__cpp_lib_string_resize_and_overwrite):
1168 (basic_string::resize_and_overwrite): Declare.
1169 * include/bits/basic_string.tcc (basic_string::resize_and_overwrite):
1171 * include/std/version (__cpp_lib_resize_and_overwrite): Define
1173 * testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc:
1176 2021-10-15 Jonathan Wakely <jwakely@redhat.com>
1179 * include/std/ranges (__cached): New wrapper struct.
1180 (__non_propagating_cache): Use __cached for contained value.
1181 (__non_propagating_cache::_M_emplace_deref): Add constexpr. Use
1182 std::construct_at instead of placement new.
1183 * testsuite/std/ranges/adaptors/join.cc: Check constexpr works.
1185 2021-10-15 Jonathan Wakely <jwakely@redhat.com>
1187 * include/std/variant (__cpp_lib_variant): Update value for
1189 (__variant_cast, __variant_construct): Add constexpr for C++20.
1190 (__variant_construct_single, __construct_by_index) Likewise. Use
1191 std::_Construct instead of placement new.
1192 (_Uninitialized<T, false>) [__cplusplus >= 202002]: Replace
1193 buffer with a union and define a destructor.
1194 (_Variadic_union) [__cplusplus >= 202002]: Add a specialization
1195 for non-trivial destruction.
1196 (_Variant_storage::__index_of): New helper variable template.
1197 (_Variant_storage::~_Variant_storage()): Add constexpr.
1198 (_Variant_storage::_M_reset()): Likewise.
1199 (_Copy_ctor_base, _Move_ctor_base): Likewise.
1200 (_Copy_assign_base, _Move_assign_base): Likewise.
1201 (variant, swap): Likewise.
1202 * include/std/version (__cpp_lib_variant): Update value for
1204 * testsuite/20_util/optional/version.cc: Check for exact value
1206 * testsuite/20_util/variant/87619.cc: Increase timeout for
1208 * testsuite/20_util/variant/constexpr.cc: New test.
1209 * testsuite/20_util/variant/version.cc: New test.
1211 2021-10-15 Jonathan Wakely <jwakely@redhat.com>
1213 * include/std/variant (__detail::__variant::__get_storage):
1214 Remove unused function.
1215 (__variant_construct_by_index): Set index after construction is
1216 complete. Rename to ...
1217 (__detail::__variant::__construct_by_index): ... this.
1218 (variant): Use new name for __variant_construct_by_index friend
1219 declaration. Remove __get_storage friend declaration.
1220 (variant::emplace): Use new name and remove try-blocks.
1222 2021-10-15 Jonathan Wakely <jwakely@redhat.com>
1224 * include/std/variant (_Variant_storage::_M_storage()): Remove.
1225 (__detail::__variant::__get_storage): Remove.
1226 (variant): Remove friend declaration of __get_storage.
1228 2021-10-15 Jason Merrill <jason@redhat.com>
1230 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc:
1231 * testsuite/20_util/integer_comparisons/greater_neg.cc:
1232 * testsuite/20_util/integer_comparisons/less_equal_neg.cc:
1233 Adjust expected message.
1234 * testsuite/lib/prune.exp: Prune 'in constexpr expansion'.
1236 2021-10-14 Jonathan Wakely <jwakely@redhat.com>
1238 * include/std/variant (__variant::__get(in_place_index_t<N>, U&&)):
1239 Rename to __get_n and remove first argument. Replace pair of
1240 overloads with a single function using 'if constexpr'.
1241 (__variant::__get(Variant&&)): Adjust to use __get_n.
1243 2021-10-14 Jonathan Wakely <jwakely@redhat.com>
1245 * include/bits/fs_path.h (path(path&&)): Make unconditionally
1247 (path::_S_convert(T)): Add condtional noexcept.
1249 2021-10-14 Jonathan Wakely <jwakely@redhat.com>
1252 * include/bits/fs_path.h (path::_S_convert(T)): Fix condition
1253 for returning the same string unchanged.
1255 2021-10-14 Jonathan Wakely <jwakely@redhat.com>
1257 * include/bits/regex.h: Check __cpp_inline_variables instead of
1260 2021-10-14 Jonathan Wakely <jwakely@redhat.com>
1262 * testsuite/20_util/is_layout_compatible/version.cc: Check
1265 2021-10-14 Jonathan Wakely <jwakely@redhat.com>
1267 * include/bits/stl_construct.h (_Construct): Use
1268 std::construct_at when constant evaluated.
1269 * include/std/optional (_Storage, _Optional_payload, optional):
1270 Add constexpr as specified by P2231R1.
1271 * include/std/version (__cpp_lib_optional): Update value for
1273 * testsuite/20_util/optional/requirements.cc: Check feature test
1275 * testsuite/20_util/optional/constexpr/assign.cc: New test.
1276 * testsuite/20_util/optional/constexpr/cons/conv.cc: New test.
1277 * testsuite/20_util/optional/constexpr/modifiers.cc: New test.
1278 * testsuite/20_util/optional/constexpr/swap.cc: New test.
1279 * testsuite/20_util/optional/version.cc: New test.
1281 2021-10-13 Jonathan Wakely <jwakely@redhat.com>
1283 * include/bits/fs_path.h (__detail::__is_contiguous): Add
1284 partial specializations for pointers and __normal_iterator.
1286 2021-10-13 Jonathan Wakely <jwakely@redhat.com>
1288 * testsuite/27_io/filesystem/path/construct/102592.C: Moved to...
1289 * testsuite/27_io/filesystem/path/construct/102592.cc: ...here.
1290 * testsuite/28_regex/match_results/102667.C: Moved to...
1291 * testsuite/28_regex/match_results/102667.cc: ...here.
1293 2021-10-13 Jonathan Wakely <jwakely@redhat.com>
1295 * include/bits/fs_path.h (__detail::__is_contiguous): New
1296 variable template to identify contiguous iterators.
1297 (__detail::__unified_char8_t): New alias template to decide when
1298 to treat char8_t as char without encoding conversion.
1299 (__detail::__effective_range(const basic_string<C,T>&)): Use
1300 std::char_traits<C> for returned string view.
1301 (__detail::__effective_range(const basic_string_view<C,T>&)):
1303 (__detail::__effective_range(const Source&)): Use
1304 __is_contiguous to detect mode cases of contiguous iterators.
1305 Use __unified_char8_t to return a std::string instead of
1308 2021-10-13 Jonathan Wakely <jwakely@redhat.com>
1311 * include/bits/fs_path.h (path::path(Iter, Iter, format))
1312 (path::append(Iter, Iter), path::concat(Iter, Iter)): Call
1313 __string_from_range directly, instead of two-argument overload
1315 (path::_S_convert(Iter, Iter)): Remove.
1316 * testsuite/27_io/filesystem/path/construct/102592.C: New test.
1318 2021-10-13 Jonathan Wakely <jwakely@redhat.com>
1320 * include/bits/c++config (__terminate): Add extern "C++".
1322 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1324 * testsuite/20_util/tuple/comparison_operators/overloaded.cc:
1325 Restore test for operator<.
1326 * testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
1327 Adjust expected errors for C++20.
1329 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1332 * include/std/tuple (_Tuple_impl(_Tuple_impl&&)): Define as
1334 * testsuite/20_util/tuple/cons/101960.cc: Check tuples with
1335 array elements before the last element.
1337 2021-10-12 Jonathan Wakely <jwakely@redhat.com>
1339 * include/bits/stl_iterator_base_funcs.h (__advance): Add
1340 deleted overload to improve diagnostics.
1341 (__distance): Likewise.
1343 2021-10-11 Jonathan Wakely <jwakely@redhat.com>
1345 * include/bits/atomic_timed_wait.h: Remove unused header.
1346 * include/bits/c++config (std:__terminate): Define.
1347 * include/bits/semaphore_base.h: Remove <exception> and use
1348 __terminate instead of terminate.
1349 * include/bits/std_thread.h: Likewise.
1350 * libsupc++/eh_terminate.cc (std::terminate): Use qualified-id
1351 to call __cxxabiv1::__terminate.
1353 2021-10-11 Jonathan Wakely <jwakely@redhat.com>
1355 * include/bits/regex.h (basic_regex::assign(Iter, Iter)): Avoid
1356 std::__to_address by using poitner directly or using base()
1357 member of __normal_iterator.
1359 2021-10-11 Jonathan Wakely <jwakely@redhat.com>
1361 * testsuite/18_support/numeric_limits/lowest.cc: Use
1362 numeric_limits<T>::is_integer instead of is_integral<T>::value.
1364 2021-10-11 Jonathan Wakely <jwakely@redhat.com>
1367 * include/bits/regex.h (basic_regex(const _Ch_type*, size_t)):
1368 Add __glibcxx_requires_string_len assertion.
1369 (basic_regex::assign(InputIterator, InputIterator)): Add
1370 __glibcxx_requires_valid_range assertion.
1371 * include/bits/regex_scanner.tcc (_Scanner::_M_advance())
1372 (_Scanner::_M_scan_normal()): Use string literal in assertions.
1374 2021-10-11 Jonathan Wakely <jwakely@redhat.com>
1377 * include/bits/regex.h (match_result::empty()): Optimize by
1378 calling the base function directly.
1379 (match_results::end()): Check _Base_type::empty() not empty().
1380 * testsuite/28_regex/match_results/102667.C: New test.
1382 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1385 * testsuite/18_support/numeric_limits/lowest.cc: Remove use of
1386 _GLIBCXX_USE_WCHAR_T.
1387 * testsuite/18_support/numeric_limits/min_max.cc: Replace use of
1388 _GLIBCXX_USE_WCHAR_T with checks for WCHAR_MIN and WCHAR_MAX.
1389 * testsuite/20_util/from_chars/1_neg.cc: Remove use of
1390 _GLIBCXX_USE_WCHAR_T.
1391 * testsuite/20_util/function_objects/searchers.cc: Likewise. Use
1392 char_traits<wchar_t>::length instead of wcslen.
1393 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
1395 * testsuite/20_util/is_arithmetic/value.cc: Likewise.
1396 * testsuite/20_util/is_compound/value.cc: Likewise.
1397 * testsuite/20_util/is_floating_point/value.cc: Likewise.
1398 * testsuite/20_util/is_fundamental/value.cc: Likewise.
1399 * testsuite/20_util/is_integral/value.cc: Likewise.
1400 * testsuite/20_util/is_signed/value.cc: Likewise.
1401 * testsuite/20_util/is_unsigned/value.cc: Likewise.
1402 * testsuite/20_util/is_void/value.cc: Likewise.
1403 * testsuite/20_util/make_signed/requirements/typedefs-1.cc:
1405 * testsuite/20_util/make_signed/requirements/typedefs-2.cc:
1407 * testsuite/20_util/make_signed/requirements/typedefs-3.cc:
1409 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
1411 * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc:
1413 * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
1415 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc:
1417 * testsuite/20_util/to_chars/3.cc: Likewise.
1418 * testsuite/20_util/type_identity/requirements/typedefs.cc:
1420 * testsuite/21_strings/basic_string/hash/debug.cc: Likewise.
1421 * testsuite/21_strings/basic_string/hash/hash.cc: Likewise.
1422 * testsuite/21_strings/basic_string/literals/types-char8_t.cc:
1424 * testsuite/21_strings/basic_string/literals/types.cc: Likewise.
1425 * testsuite/21_strings/basic_string/literals/values-char8_t.cc:
1427 * testsuite/21_strings/basic_string/literals/values.cc:
1429 * testsuite/21_strings/basic_string/modifiers/64422.cc:
1431 * testsuite/21_strings/basic_string/range_access/wchar_t/1.cc:
1433 * testsuite/21_strings/basic_string/requirements/citerators.cc:
1435 * testsuite/21_strings/basic_string/requirements/typedefs.cc:
1437 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc:
1439 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
1441 * testsuite/21_strings/basic_string_view/literals/types.cc:
1443 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
1445 * testsuite/21_strings/basic_string_view/literals/values.cc:
1447 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
1449 * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
1450 * testsuite/21_strings/char_traits/requirements/constexpr_functions.cc:
1452 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
1454 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
1456 * testsuite/22_locale/ctype/is/string/89728_neg.cc: Likewise.
1457 * testsuite/25_algorithms/fill/4.cc: Likewise.
1458 * testsuite/25_algorithms/fill_n/1.cc: Likewise.
1459 * testsuite/experimental/functional/searchers.cc: Likewise. Use
1460 char_traits<wchar_t>::length instead of wcslen.
1461 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1463 * testsuite/experimental/string_view/literals/types-char8_t.cc:
1465 * testsuite/experimental/string_view/literals/types.cc:
1467 * testsuite/experimental/string_view/literals/values-char8_t.cc:
1469 * testsuite/experimental/string_view/literals/values.cc:
1471 * testsuite/experimental/string_view/range_access/wchar_t/1.cc:
1473 * testsuite/experimental/string_view/requirements/typedefs.cc:
1475 * testsuite/experimental/string_view/typedefs.cc: Likewise.
1476 * testsuite/ext/vstring/range_access.cc: Likewise.
1477 * testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc:
1479 * testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc:
1481 * testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc:
1483 * testsuite/tr1/4_metaprogramming/is_arithmetic/value.cc:
1485 * testsuite/tr1/4_metaprogramming/is_compound/value.cc:
1487 * testsuite/tr1/4_metaprogramming/is_floating_point/value.cc:
1489 * testsuite/tr1/4_metaprogramming/is_fundamental/value.cc:
1491 * testsuite/tr1/4_metaprogramming/is_integral/value.cc:
1493 * testsuite/tr1/4_metaprogramming/is_signed/value.cc: Likewise.
1494 * testsuite/tr1/4_metaprogramming/is_unsigned/value.cc:
1496 * testsuite/tr1/4_metaprogramming/is_void/value.cc: Likewise.
1497 * testsuite/tr1/6_containers/hash/24799.cc: Likewise.
1499 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1502 * include/std/ostream (operator<<(basic_ostream<char, Tr>&, wchar_t))
1503 (operator<<(basic_ostream<char, Tr>&, const wchar_t*)): Always
1504 define as deleted. Do not check _GLIBCXX_USE_WCHAR_T.
1506 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1509 * include/bits/locale_conv.h (wstring_convert, wbuffer_convert):
1510 Define unconditionally. Do not check _GLIBCXX_USE_WCHAR_T.
1512 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1515 * include/c_global/cstddef [!_GLIBCXX_USE_WCHAR_T]
1516 (__byte_operand<wchar_t>): Define specialization.
1517 * include/std/type_traits (__make_signed<wchar_t>)
1518 (__make_unsigned<wchar_t>): Remove redundant check for
1519 __WCHAR_TYPE__ being defined.
1520 * include/tr1/type_traits [!_GLIBCXX_USE_WCHAR_T]
1521 (__is_integral_helper<wchar_t>): Likewise.
1523 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1526 * include/ext/rc_string_base.h [!_GLIBCXX_USE_WCHAR_T]
1527 (__rc_string_base<wchar_t>): Define member function.
1528 * include/ext/vstring.h [!_GLIBCXX_USE_WCHAR_T]
1529 (hash<__gnu_cxx::__wvstring>): Define specialization.
1530 * include/ext/vstring_fwd.h [!_GLIBCXX_USE_WCHAR_T] (__wvstring)
1531 (__wsso_string, __wrc_string): Declare typedefs.
1533 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1536 * include/bits/char_traits.h (char_traits<wchar_t>): Define
1537 explicit specialization unconditionally.
1538 * include/bits/basic_string.h (hash<wstring>): Define
1539 unconditionally. Do not check _GLIBCXX_USE_WCHAR_T.
1540 * include/bits/stringfwd.h (wstring): Likewise.
1541 * include/debug/string (wstring): Likewise.
1542 * include/experimental/string_view (experimental::wstring_view)
1543 (hash<experimental::wstring_view>): Likewise.
1544 * include/std/string (pmr::wstring, hash<pmr::wstring>):
1546 * include/std/string_view (wstring_view, hash<wstring_view>):
1549 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1551 * testsuite/27_io/basic_filebuf/close/81256.cc: Moved to...
1552 * testsuite/27_io/basic_filebuf/close/wchar_t/81256.cc: ...here.
1554 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1556 * testsuite/22_locale/conversions/buffer/1.cc: Check
1557 _GLIBCXX_USE_WCHAR_T.
1558 * testsuite/22_locale/conversions/buffer/3.cc: Likewise. Add
1559 test using char16_t.
1560 * testsuite/22_locale/conversions/string/1.cc: Check
1561 _GLIBCXX_USE_WCHAR_T.
1562 * testsuite/27_io/filesystem/path/generic/generic_string.cc:
1564 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
1566 * testsuite/27_io/filesystem/path/native/alloc.cc: Likewise.
1567 * testsuite/27_io/filesystem/path/native/string-char8_t.cc:
1569 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
1570 * testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc:
1572 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
1574 * testsuite/experimental/filesystem/path/native/alloc.cc:
1576 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
1578 * testsuite/experimental/filesystem/path/native/string.cc:
1581 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1583 * testsuite/26_numerics/bit/bit.rotate/rotr.cc:
1584 * testsuite/util/testsuite_common_types.h:
1586 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1588 * testsuite/18_support/numeric_limits/40856.cc: Replace use of
1589 _GLIBCXX_USE_INT128.
1590 * testsuite/18_support/numeric_limits/dr559.cc: Likewise.
1591 * testsuite/18_support/numeric_limits/lowest.cc: Likewise.
1592 * testsuite/18_support/numeric_limits/max_digits10.cc: Likewise.
1593 * testsuite/20_util/is_floating_point/value.cc: Likewise.
1594 * testsuite/20_util/is_integral/value.cc: Likewise.
1595 * testsuite/20_util/is_signed/value.cc: Likewise.
1596 * testsuite/20_util/is_unsigned/value.cc: Likewise.
1597 * testsuite/20_util/make_signed/requirements/typedefs-1.cc:
1599 * testsuite/20_util/make_signed/requirements/typedefs-2.cc:
1601 * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc:
1603 * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
1605 * testsuite/20_util/type_identity/requirements/typedefs.cc:
1607 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Likewise.
1608 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
1609 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
1610 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
1611 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
1612 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: Likewise.
1613 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: Likewise.
1614 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: Likewise.
1615 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc:
1617 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
1619 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1621 * include/bits/hashtable_policy.h (_Select1st): Replace use of
1623 (_Select2nd): Remove.
1624 (_NodeBuilder::_S_build): Use _NodeGenerator::__node_type
1625 typedef instead of deducing it. Remove unnecessary piecewise
1627 (_ReuseOrAllocNode): Make __node_type public.
1628 (_Map_base): Adjust partial specialization to be able to extract
1629 the mapped_type without using tuple_element.
1630 (_Map_base::at): Define inline
1631 * testsuite/23_containers/unordered_map/requirements/53339.cc:
1633 * testsuite/23_containers/unordered_multimap/requirements/53339.cc:
1636 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1638 * include/bits/hashtable.h: Move static assertion to destructor.
1639 * include/bits/hashtable_policy.h: Deduce value type from node
1640 type without instantiating it.
1642 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1644 * src/c++11/limits.cc: Fail if __cpp_inline_variables is
1647 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1650 * include/bits/ranges_algobase.h: Replace <iterator> with a
1651 subset of the headers it includes.
1653 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1655 * include/experimental/deque (erase, erase_if): Revert changes
1656 to avoid debug mode overhead.
1657 * include/experimental/map (erase, erase_if): Likewise.
1658 * include/experimental/set (erase, erase_if): Likewise.
1659 * include/experimental/unordered_map (erase, erase_if):
1661 * include/experimental/unordered_set (erase, erase_if):
1663 * include/experimental/vector (erase, erase_if): Likewise.
1664 * include/std/deque (erase, erase_if): Likewise.
1665 * include/std/map (erase, erase_if): Likewise.
1666 * include/std/set (erase, erase_if): Likewise.
1667 * include/std/unordered_map (erase, erase_if): Likewise.
1668 * include/std/unordered_set (erase, erase_if): Likewise.
1669 * include/std/vector (erase, erase_if): Likewise.
1671 2021-10-08 Jonathan Wakely <jwakely@redhat.com>
1673 * include/std/chrono (__detail::__units_suffix_misc): New
1675 (__detail::__units_suffix): Likewise.
1676 (chrono::operator<<(basic_ostream&, const duration&)): Define.
1677 * testsuite/20_util/duration/io.cc: New test.
1679 2021-10-07 Jonathan Wakely <jwakely@redhat.com>
1681 * include/Makefile.am: Add new header.
1682 * include/Makefile.in: Regenerate.
1683 * include/std/chrono (duration, time_point, system_clock)
1684 (steady_clock, high_resolution_clock, chrono_literals, sys_time)
1685 (file_clock, file_time): Move to ...
1686 * include/bits/chrono.h: New file.
1687 * include/bits/atomic_futex.h: Include new header instead of
1689 * include/bits/atomic_timed_wait.h: Likewise.
1690 * include/bits/fs_fwd.h: Likewise.
1691 * include/bits/semaphore_base.h: Likewise.
1692 * include/bits/this_thread_sleep.h: Likewise.
1693 * include/bits/unique_lock.h: Likewise.
1694 * include/experimental/bits/fs_fwd.h: Likewise.
1695 * include/experimental/chrono: Likewise.
1696 * include/experimental/io_context: Likewise.
1697 * include/experimental/netfwd: Likewise.
1698 * include/experimental/timer: Likewise.
1699 * include/std/condition_variable: Likewise.
1700 * include/std/mutex: Likewise.
1701 * include/std/shared_mutex: Likewise.
1703 2021-10-07 Jonathan Wakely <jwakely@redhat.com>
1706 * include/bits/atomic_wait.h (__waiter_pool_base:_S_align):
1707 Hardcode to 64 instead of using non-constant constant.
1709 2021-10-07 Jonathan Wakely <jwakely@redhat.com>
1711 * include/bits/erase_if.h (__erase_nodes_if): Remove redundant
1713 * include/std/string (erase, erase_if): Likewise.
1714 * include/std/deque (erase, erase_if): Access non-debug
1716 * include/std/map (erase, erase_if): Likewise.
1717 * include/std/set (erase, erase_if): Likewise.
1718 * include/std/unordered_map (erase, erase_if): Likewise.
1719 * include/std/unordered_set (erase, erase_if): Likewise.
1720 * include/std/vector (erase, erase_if): Likewise.
1721 * include/experimental/deque (erase, erase_if): Likewise.
1722 * include/experimental/map (erase, erase_if): Likewise.
1723 * include/experimental/set (erase, erase_if): Likewise.
1724 * include/experimental/unordered_map (erase, erase_if):
1726 * include/experimental/unordered_set (erase, erase_if):
1728 * include/experimental/vector (erase, erase_if): Likewise.
1730 2021-10-06 Jonathan Wakely <jwakely@redhat.com>
1732 * include/Makefile.am: Add new headers.
1733 * include/Makefile.in: Regenerate.
1734 * include/std/functional: Include <bits/move_only_function.h>.
1735 * include/std/version (__cpp_lib_move_only_function): Define.
1736 * include/bits/mofunc_impl.h: New file.
1737 * include/bits/move_only_function.h: New file.
1738 * testsuite/20_util/move_only_function/call.cc: New test.
1739 * testsuite/20_util/move_only_function/cons.cc: New test.
1740 * testsuite/20_util/move_only_function/move.cc: New test.
1741 * testsuite/20_util/move_only_function/version.cc: New test.
1743 2021-10-05 Jonathan Wakely <jwakely@redhat.com>
1745 * testsuite/21_strings/basic_string_view/requirements/trivially_copyable.cc:
1747 * testsuite/23_containers/span/trivially_copyable.cc: New test.
1749 2021-10-05 Jonathan Wakely <jwakely@redhat.com>
1751 * include/bits/utility.h (__is_in_place_type_v): Define
1752 variable template to detect in_place_type_t specializations.
1753 (__is_in_place_type): Replace class template with alias
1754 template using __is_in_place_type_v.
1755 * include/std/any (any(T&&)): Check __is_in_place_type first and
1756 avoid instantiating is_copy_constructible unnecessarily.
1758 2021-10-05 Jonathan Wakely <jwakely@redhat.com>
1760 * testsuite/20_util/integer_comparisons/greater.cc: New test.
1762 2021-10-05 Jonathan Wakely <jwakely@redhat.com>
1764 * testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc:
1765 Check result matches non-volatile pointer.
1767 2021-10-05 Jonathan Wakely <jwakely@redhat.com>
1770 * testsuite/20_util/is_trivially_constructible/value.cc: Adjust
1771 expected value for C++20.
1773 2021-10-05 Jonathan Wakely <jwakely@redhat.com>
1775 * include/bits/std_function.h (_Any_data::_M_access): Add
1777 (_Function_base::_Base_manager::_M_get_pointer): Likewise.
1778 (_Function_base::_Base_manager::_M_not_empty_function):
1781 2021-10-05 Jonathan Wakely <jwakely@redhat.com>
1783 * include/std/ostream (operator<<(const volatile void*)):
1784 Add new overload, as per P1147R1.
1785 * testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc:
1788 2021-10-05 Jonathan Wakely <jwakely@redhat.com>
1790 * include/bits/stl_queue.h
1791 (__cpp_lib_adaptor_iterator_pair_constructor): Set to correct
1793 * include/bits/stl_stack.h
1794 (__cpp_lib_adaptor_iterator_pair_constructor): Likewise.
1795 * include/std/version
1796 (__cpp_lib_adaptor_iterator_pair_constructor): Likewise.
1797 * testsuite/23_containers/queue/cons_from_iters.cc: Update
1799 * testsuite/23_containers/stack/cons_from_iters.cc: Likewise.
1801 2021-10-04 Jonathan Wakely <jwakely@redhat.com>
1803 * include/bits/forward_list.h (forward_list): Use non-deduced
1804 context for allocator parameter of allocator-extended copy and
1806 * include/bits/stl_bvector.h (vector<bool>): Likewise.
1807 * include/bits/stl_deque.h (deque): Likewise.
1808 * include/bits/stl_list.h (list): Likewise.
1809 * include/bits/stl_map.h (map): Likewise.
1810 * include/bits/stl_multimap.h (multimap): Likewise.
1811 * include/bits/stl_multiset.h (multiset): Likewise.
1812 * include/bits/stl_set.h (set): Likewise.
1813 * include/bits/stl_vector.h (vector): Likewise.
1814 * include/bits/stl_queue.h (queue, priority_queue): Do not
1815 constrain Allocator template parameter of deduction guides that
1816 have a Container parameter.
1817 * include/bits/stl_stack.h (stack): Likewise.
1818 * include/debug/deque (__gnu_debug::deque): Use non-deduced
1819 context for allocator parameter of allocator-extended copy and
1821 * include/debug/list (__gnu_debug::list): Likewise.
1822 * include/debug/map.h (__gnu_debug::map): Likewise.
1823 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
1824 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
1825 * include/debug/set.h (__gnu_debug::set): Likewise.
1826 * include/debug/vector (__gnu_debug::vector): Likewise.
1827 * testsuite/23_containers/deque/cons/deduction.cc: Test class
1828 template argument deduction with non-deduced allocator
1830 * testsuite/23_containers/forward_list/cons/deduction.cc:
1832 * testsuite/23_containers/list/cons/deduction.cc: Likewise.
1833 * testsuite/23_containers/map/cons/deduction.cc: Likewise.
1834 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
1835 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
1836 * testsuite/23_containers/priority_queue/deduction.cc: Likewise.
1837 * testsuite/23_containers/queue/deduction.cc: Likewise.
1838 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
1839 * testsuite/23_containers/stack/deduction.cc: Likewise.
1840 * testsuite/23_containers/unordered_map/cons/deduction.cc:
1842 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
1844 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
1846 * testsuite/23_containers/unordered_set/cons/deduction.cc:
1848 * testsuite/23_containers/vector/cons/deduction.cc: Likewise.
1850 2021-10-04 Jonathan Wakely <jwakely@redhat.com>
1852 * include/std/variant (__detail::__variant::__as): Add missing
1853 noexcept to first overload.
1855 2021-10-04 Jonathan Wakely <jwakely@redhat.com>
1857 * include/bits/basic_string.h (basic_string(nullptr_t)): Define
1859 (operator=(nullptr_t)): Likewise.
1860 * include/bits/cow_string.h (basic_string(nullptr_t)): Likewise.
1861 (operator=(nullptr_t)): Likewise.
1862 * include/std/string_view (basic_string_view(nullptr_t)):
1864 * testsuite/21_strings/basic_string/cons/char/nullptr.cc: New test.
1865 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
1866 Change dg-warning to dg-error.
1867 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
1870 2021-10-02 Jonathan Wakely <jwakely@redhat.com>
1872 * src/c++17/fs_ops.cc (create_directory): Fix typo in enum name.
1873 * src/filesystem/ops-common.h (__last_system_error): Add
1874 explicit cast to avoid narrowing conversion.
1875 (do_space): Fix type in function name.
1877 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1880 * include/Makefile.am (c++config.h): Define
1881 _GLIBCXX_VERBOSE_ASSERT based on configure output.
1882 * include/Makefile.in: Regenerate.
1883 * include/bits/c++config: Fix condition for verbose assertions.
1885 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1888 * include/bits/erase_if.h (__erase_nodes_if): Use __niter_base to
1889 unwrap debug iterators.
1890 * include/bits/refwrap.h: Do not error if included in C++03.
1891 * include/bits/stl_algo.h (__remove_if): Move to ...
1892 * include/bits/stl_algobase.h (__remove_if): ... here.
1893 * include/std/deque (erase, erase_if): Use __remove_if instead of
1894 remove and remove_if.
1895 * include/std/string (erase, erase_if): Likewise.
1896 * include/std/vector (erase, erase_if): Likewise.
1898 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1901 * include/bits/list.tcc (list::sort()): Use _Scratch_list
1902 objects for splicing and merging.
1903 (list::sort(StrictWeakOrdering)): Likewise.
1904 * include/bits/stl_list.h (__detail::_Scratch_list): New type.
1905 * src/c++98/list.cc (_List_node_base::_M_transfer): Add
1906 assertion for --enable-libstdcxx-debug library.
1907 * testsuite/23_containers/list/operations/66742.cc: New test.
1909 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1912 * include/std/thread (__pmf_expects_stop_token): New variable
1913 template to detect a pointer to member function that needs a
1914 stop_token to be added to the arguments.
1915 (jthread::__S_create): Use __pmf_expects_stop_token.
1916 (jthread::__S_create_pmf): New function.
1917 * testsuite/30_threads/jthread/100612.cc: New test.
1919 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1921 * include/bits/stl_queue.h
1922 (__cpp_lib_adaptor_iterator_pair_constructor): Define for C++23, as
1924 (queue(InputIterator, InputIterator)): Likewise.
1925 (queue(InputIterator, InputIterator, const Alloc&)): Likewise.
1926 * include/bits/stl_stack.h
1927 (__cpp_lib_adaptor_iterator_pair_constructor): Likewise.
1928 (stack(InputIterator, InputIterator)): Likewise.
1929 (stack(InputIterator, InputIterator, const Alloc&)): Likewise.
1930 * include/std/version (__cpp_lib_adaptor_iterator_pair_constructor):
1932 * testsuite/23_containers/queue/cons_from_iters.cc: New test.
1933 * testsuite/23_containers/stack/cons_from_iters.cc: New test.
1935 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1937 * include/bits/stl_queue.h (priority_queue): Add
1938 allocator-extended overloads for constructors taking iterator.
1939 * testsuite/23_containers/priority_queue/lwg3506.cc: New test.
1941 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1943 * include/bits/stl_queue.h (priority_queue): Construct sequence
1944 from iterators when no sequence argument is present (LWG 3529).
1945 * testsuite/23_containers/priority_queue/lwg3529.cc: New test.
1947 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1949 * include/bits/stl_queue.h (priority_queue): Constrain
1950 constructors with InputIterator parameters (LWG 3522).
1951 * testsuite/23_containers/priority_queue/lwg3522.cc: New test.
1953 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1955 * include/bits/ranges_base.h (ranges::distance): Split overload
1956 into two (LWG 3392).
1957 * testsuite/24_iterators/range_operations/lwg3392.cc: New test.
1959 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1961 * testsuite/30_threads/thread/cons/3.cc: Remove derivation from
1962 std::unary_function.
1963 * testsuite/30_threads/thread/cons/4.cc: Likewise.
1964 * testsuite/30_threads/thread/cons/5.cc: Likewise.
1966 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1968 * testsuite/ext/pb_ds/example/basic_multimap.cc: Remove
1969 unnecesary derivation from std::unary_function.
1970 * testsuite/ext/pb_ds/example/erase_if.cc: Likewise.
1971 * testsuite/ext/pb_ds/example/hash_illegal_resize.cc: Likewise.
1972 * testsuite/ext/pb_ds/example/hash_initial_size.cc: Likewise.
1973 * testsuite/ext/pb_ds/example/hash_load_set_change.cc: Likewise.
1974 * testsuite/ext/pb_ds/example/hash_mod.cc: Likewise.
1975 * testsuite/ext/pb_ds/example/hash_resize.cc: Likewise.
1976 * testsuite/ext/pb_ds/example/hash_shift_mask.cc: Likewise.
1977 * testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc:
1979 * testsuite/ext/pb_ds/example/ranged_hash.cc: Likewise.
1980 * testsuite/ext/pb_ds/example/store_hash.cc: Likewise.
1982 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1984 * src/c++11/functexcept.cc (__throw_out_of_range_fmt): Do not
1985 expand the format string for freestanding, or non-vebose, or if
1986 we're just going to abort anyway.
1987 * src/c++11/snprintf_lite.cc: Remove unused header and
1990 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1992 * include/std/variant (__do_visit): Use variant_npos instead of
1993 literal -1 that requires a narrowing conversion.
1995 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
1998 * src/filesystem/ops-common.h (__unsupported): New function to
1999 return a suitable error code for missing functionality.
2000 (posix::off_t): New typedef.
2001 (posix::*): Set errno to ENOSYS instead of ENOTSUP for no-op
2002 fallback implementations.
2003 (do_copy_file): Replace uses of errc::not_supported.
2004 * src/c++17/fs_ops.cc (fs::copy, fs::copy_file, create_dir)
2005 (fs::create_directory, fs::create_directory_symlink)
2006 (fs::create_hard_link, fs::create_symlink, fs::current_path)
2007 (fs::equivalent, do_stat, fs::file_size, fs::hard_link_count)
2008 (fs::last_write_time, fs::permissions, fs::read_symlink):
2009 Replace uses of errc::not_supported.
2010 (fs::resize_file): Qualify off_t.
2011 * src/filesystem/ops.cc (fs::copy, fs::copy_file, create_dir)
2012 (fs::create_directory, fs::create_directory_symlink)
2013 (fs::create_hard_link, fs::create_symlink, fs::current_path)
2014 (fs::equivalent, do_stat, fs::file_size, fs::last_write_time)
2015 (fs::permissions, fs::read_symlink, fs::system_complete):
2016 Replace uses of errc::not_supported.
2017 (fs::resize_file): Qualify off_t and enable unconditionally.
2018 * testsuite/19_diagnostics/system_error/cons-1.cc: Likewise.
2020 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2022 * src/filesystem/ops-common.h (last_error): New helper function.
2023 (filesystem::do_space): Use last_error().
2024 * src/c++17/fs_ops.cc (fs::absolute, fs::create_hard_link)
2025 (fs::equivalent, fs::remove, fs::temp_directory_path): Use
2027 * src/filesystem/ops.cc (fs::create_hard_link)
2028 (fs::remove, fs::temp_directory_path): Likewise.
2030 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2032 * include/std/type_traits (__conditional): New class template
2033 for internal uses of std::conditional.
2034 (__conditional_t): New alias template to replace conditional_t.
2035 (__and_, __or_, __result_of_memfun, __result_of_memobj): Use
2036 __conditional_t instead of conditional::type.
2037 * include/bits/atomic_base.h (__atomic_impl::_Diff): Likewise.
2038 * include/bits/hashtable.h (_Hashtable): Likewise.
2039 * include/bits/hashtable_policy.h (_Node_iterator, _Insert_base)
2040 (_Local_iterator): Likewise. Replace typedefs with
2042 * include/bits/move.h (move_if_noexcept): Use __conditional_t.
2043 * include/bits/parse_numbers.h (_Select_int_base): Likewise.
2044 * include/bits/ptr_traits.h (__make_not_void): Likewise.
2045 * include/bits/ranges_algobase.h (__copy_or_move_backward)
2046 (__copy_or_move): Likewise.
2047 * include/bits/ranges_base.h (borrowed_iterator_t): Likewise.
2048 * include/bits/ranges_util.h (borrowed_subrange_t): Likewise.
2049 * include/bits/regex_compiler.h (_BracketMatcher): Use
2050 __conditional_t. Replace typedefs with using-declarations.
2051 * include/bits/shared_ptr_base.h (__shared_count): Use
2053 * include/bits/stl_algobase.h (__copy_move, __copy_move_backward):
2055 * include/bits/stl_iterator.h (__detail::__clamp_iter_cat)
2056 (reverse_iterator::iterator_concept)
2057 (__make_move_if_noexcept_iterator)
2058 (iterator_traits<common_iterator<_It, _Sent>>)
2059 (iterator_traits<counted_iterator<_It>>): Likewise.
2060 * include/bits/stl_pair.h (_PCC, pair::operator=): Likewise.
2061 * include/bits/stl_tree.h (_Rb_tree::insert_return_type)
2062 (_Rb_tree::_M_clone_node): Likewise.
2063 * include/bits/unique_ptr.h (unique_ptr(unique_ptr<U,E>&&)):
2065 * include/bits/uses_allocator.h (__uses_alloc): Likewise.
2066 (__is_uses_allocator_predicate): Likewise.
2067 * include/debug/functions.h (__foreign_iterator_aux2): Likewise.
2068 * include/experimental/any (any::_Manager, __any_caster):
2070 * include/experimental/executor (async_completion): Likewise.
2071 * include/experimental/functional (__boyer_moore_base_t):
2073 * include/std/any (any::_Manager): Likewise.
2074 * include/std/functional (__boyer_moore_base_t): Likewise.
2075 * include/std/ranges (borrowed_iterator_t)
2076 (borrowed_subrange_t, __detail::__maybe_present_t)
2077 (__detail::__maybe_const_t, split_view): Likewise.
2078 * include/std/tuple (__empty_not_final, tuple::operator=):
2080 * include/std/variant (__detail::__variant::__get_t): Likewise.
2082 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2085 * include/std/variant (__do_visit): Use a switch when we have a
2086 single variant with a small number of alternatives.
2088 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2091 * include/std/variant (__cpp_lib_variant): Update value.
2092 (__detail::__variant::__as): New helpers implementing the
2093 as-variant exposition-only function templates.
2094 (visit, visit<R>): Use __as to upcast the variant parameters.
2095 * include/std/version (__cpp_lib_variant): Update value.
2096 * testsuite/20_util/variant/visit_inherited.cc: New test.
2098 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2100 * include/bits/stl_iterator.h (__normal_iterator): Simplify
2101 converting constructor and do not require _Container::pointer.
2103 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2105 * include/bits/cow_string.h [_GLIBCXX_FULLY_DYNAMIC_STRING]
2106 (basic_string(basic_string&&)): Add noexcept and avoid
2107 allocation, by sharing rep with the rvalue string.
2109 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2111 * include/bits/stl_iterator.h (common_iterator::__arrow_proxy)
2112 (common_iterator::__postfix_proxy): Add noexcept.
2114 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2117 * include/bits/stl_iterator.h (reverse_iterator): Use
2118 conditional noexcept on constructors and assignment operators.
2119 * testsuite/24_iterators/reverse_iterator/noexcept.cc: New test.
2121 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2124 * include/bits/vector.tcc (vector<bool>::_M_shrink_to_fit()):
2125 When size() is zero just deallocate and reset.
2127 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2130 * include/bits/stl_algo.h (clamp): Use std::min and std::max.
2132 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2134 * include/bits/regex.h (basic_regex::multiline): Define for
2135 non-strict C++11 and C++14 modes.
2136 * include/bits/regex_constants.h (regex_constants::multiline):
2137 Add _GLIBCXX_RESOLVE_LIB_DEFECTS comment.
2139 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2141 * testsuite/25_algorithms/is_permutation/2.cc: Include <iterator>.
2143 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2145 * include/bits/stream_iterator.h (istream_iterator): Add
2146 noexcept to constructors and non-throwing member functions and
2148 (ostream_iterator): Likewise.
2150 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2152 * include/bits/boost_concept_check.h (_Is_vector_bool_iterator):
2153 New trait to identify vector<bool> iterators, including debug
2155 (_ForwardIteratorReferenceConcept): Add default template
2156 argument using _Is_vector_bool_iterator and use it in partial
2157 specialization for the vector<bool> cases.
2158 (_Mutable_ForwardIteratorReferenceConcept): Likewise.
2159 * testsuite/24_iterators/operations/prev_neg.cc: Adjust dg-error
2162 2021-10-01 Jonathan Wakely <jwakely@redhat.com>
2164 * include/bits/list.tcc (list::merge): Remove call to size() and
2165 try-catch block. Use _Finalize_merge instead.
2166 * include/bits/stl_list.h (list::_Finalize_merge): New
2167 scope guard type to update _M_size members after a merge.
2169 2021-09-30 Jonathan Wakely <jwakely@redhat.com>
2171 * include/bits/regex.h (basic_regex::multiline): Fix #if
2174 2021-09-29 Jonathan Wakely <jwakely@redhat.com>
2176 * include/bits/regex.h (basic_regex::multiline): Define constant
2178 * include/bits/regex_constants.h (regex_constants::multiline):
2179 Define constant for C++17.
2180 (regex_constants::__multiline): Define duplicate constant for
2181 internal use in C++11 and C++14.
2182 * include/bits/regex_executor.h (_Executor::_M_match_multiline()):
2183 New member function.
2184 (_Executor::_M_is_line_terminator(_CharT)): New member function.
2185 (_Executor::_M_at_begin(), _Executor::_M_at_end()): Use new
2186 member functions to support multiline matches.
2187 * testsuite/28_regex/algorithms/regex_match/multiline.cc: New test.
2189 2021-09-29 Jonathan Wakely <jwakely@redhat.com>
2191 * include/bits/regex_compiler.h (_Compiler::_S_validate): New
2193 * include/bits/regex_compiler.tcc (_Compiler::_Compiler): Use
2194 _S_validate to check flags.
2195 * include/bits/regex_error.h (_S_grammar): New error code for
2197 * testsuite/28_regex/basic_regex/ctors/grammar.cc: New test.
2199 2021-09-29 Jonathan Wakely <jwakely@redhat.com>
2202 * include/bits/regex_error.h (regex_constants::_S_null): New
2203 error code for internal use.
2204 * include/bits/regex_scanner.tcc (_Scanner::_M_scan_normal()):
2205 Check for null character.
2206 * testsuite/28_regex/basic_regex/84110.cc: New test.
2208 2021-09-29 Jonathan Wakely <jwakely@redhat.com>
2210 * include/bits/regex.h (__detail::__is_contiguous_iter): Move
2211 here from <bits/regex_compiler.h>.
2212 (basic_regex::_M_compile): New function to compile an NFA from
2213 a regular expression string.
2214 (basic_regex::basic_regex): Use _M_compile instead of delegating
2215 to other constructors.
2216 (basic_regex::operator=(const basic_regex&)): Define as
2218 (basic_regex::operator=(initializer_list<C>)): Use _M_compile.
2219 (basic_regex::assign(const basic_regex&)): Use copy assignment.
2220 (basic_regex::assign(basic_regex&&)): Use move assignment.
2221 (basic_regex::assign(const C*, flag_type)): Use _M_compile
2222 instead of constructing a temporary string.
2223 (basic_regex::assign(const C*, size_t, flag_type)): Likewise.
2224 (basic_regex::assign(const basic_string<C,T,A>&, flag_type)):
2225 Use _M_compile instead of constructing a temporary basic_regex.
2226 (basic_regex::assign(InputIter, InputIter, flag_type)): Avoid
2227 constructing a temporary string for contiguous iterators of the
2229 * include/bits/regex_compiler.h (__is_contiguous_iter): Move to
2231 (__enable_if_contiguous_iter, __disable_if_contiguous_iter)
2232 (__compile_nfa): Remove.
2233 * testsuite/28_regex/basic_regex/assign/exception_safety.cc: New
2235 * testsuite/28_regex/basic_regex/ctors/char/other.cc: New test.
2237 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2239 * include/bits/atomic_timed_wait.h (__platform_wait_until_impl):
2240 Return false for ETIMEDOUT and true otherwise.
2242 2021-09-28 François Dumont <fdumont@gcc.gnu.org>
2244 * testsuite/20_util/default_delete/48631_neg.cc: Adapt dg-prune-output message
2245 to also match message with '__8' in it.
2247 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2249 * include/bits/regex_automaton.h (_NFA_base::_SizeT): Remove.
2250 * include/bits/regex_compiler.h (_Compiler::_IterT): Remove.
2251 * include/bits/regex_compiler.tcc: Likewise.
2252 * include/bits/regex_scanner.h (_Scanner::_IterT): Remove.
2253 * include/bits/regex_scanner.tcc: Likewise.
2255 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2257 * include/bits/regex_compiler.tcc: Add line break in empty while
2259 * include/bits/regex_executor.tcc: Avoid unused parameter
2262 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2264 * include/bits/regex.h (basic_regex, swap): Add noexcept to
2265 non-throwing functions.
2266 * include/bits/regex_automaton.h (_State_base, _State)
2267 (_NFA_base): Likewise.
2268 * include/bits/regex_compiler.h (_Compiler): Likewise.
2269 * include/bits/regex_error.h (regex_error::code()): Likewise.
2270 * include/bits/regex_scanner.h (_Scanner): Likewise.
2272 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2274 * include/bits/atomic_wait.h (_GLIBCXX_HAVE_PLATFORM_WAIT):
2275 Define before first attempt to check it.
2277 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2279 * testsuite/23_containers/priority_queue/requirements/explicit_instantiation/1.cc:
2280 Do not check non-default constructible sequences when
2281 _GLIBCXX_CONCEPT_CHECKS is defined.
2282 * testsuite/23_containers/priority_queue/requirements/explicit_instantiation/1_c++98.cc:
2284 * testsuite/23_containers/queue/requirements/explicit_instantiation/1.cc:
2286 * testsuite/23_containers/queue/requirements/explicit_instantiation/1_c++98.cc:
2288 * testsuite/23_containers/stack/requirements/explicit_instantiation/1.cc:
2290 * testsuite/23_containers/stack/requirements/explicit_instantiation/1_c++98.cc:
2293 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2295 * testsuite/23_containers/deque/requirements/explicit_instantiation/3.cc:
2296 Do not test implicit allocator rebinding when _GLIBCXX_CONCEPT_CHECKS
2298 * testsuite/23_containers/forward_list/requirements/explicit_instantiation/3.cc:
2300 * testsuite/23_containers/list/requirements/explicit_instantiation/3.cc:
2302 * testsuite/23_containers/list/requirements/explicit_instantiation/5.cc:
2304 * testsuite/23_containers/map/requirements/explicit_instantiation/3.cc:
2306 * testsuite/23_containers/map/requirements/explicit_instantiation/5.cc:
2308 * testsuite/23_containers/multimap/requirements/explicit_instantiation/3.cc:
2310 * testsuite/23_containers/multimap/requirements/explicit_instantiation/5.cc:
2312 * testsuite/23_containers/multiset/requirements/explicit_instantiation/3.cc:
2314 * testsuite/23_containers/multiset/requirements/explicit_instantiation/5.cc:
2316 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
2318 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
2320 * testsuite/23_containers/unordered_map/requirements/explicit_instantiation/3.cc:
2322 * testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/3.cc:
2324 * testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/3.cc:
2326 * testsuite/23_containers/unordered_set/requirements/explicit_instantiation/3.cc:
2328 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/3.cc:
2330 * testsuite/23_containers/vector/requirements/explicit_instantiation/3.cc:
2333 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2335 * include/bits/boost_concept_check.h (_ForwardIteratorConcept)
2336 (_BidirectionalIteratorConcept, _RandomAccessIteratorConcept):
2337 Check result types of iterator operations.
2338 (_Mutable_ForwardIteratorConcept): Check that iterator's
2339 reference type is a reference to its value type.
2340 (_Mutable_BidirectionalIteratorConcept): Do not require the
2341 value type to be assignable.
2342 (_Mutable_RandomAccessIteratorConcept): Likewise.
2343 * testsuite/24_iterators/operations/prev_neg.cc: Adjust dg-error
2346 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2348 * testsuite/25_algorithms/copy/34595.cc: Add missing operation
2349 for type used as an iterator.
2350 * testsuite/25_algorithms/unique_copy/check_type.cc: Likewise.
2352 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2354 * testsuite/20_util/is_nothrow_swappable/value.h: Use custom
2355 comparison function for priority_queue of type with no
2356 relational operators.
2357 * testsuite/20_util/is_swappable/value.h: Likewise.
2358 * testsuite/24_iterators/output/concept.cc: Add operator< to
2361 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2363 * include/bits/boost_concept_check.h (_OutputIteratorConcept):
2364 Use a function to preserve value category of the type.
2365 * include/bits/stl_algobase.h (copy, move, fill_n): Use a
2366 reference as the second argument for _OutputIteratorConcept.
2367 (copy_backward, move_backward): Use _OutputIteratorConcept
2368 instead of _ConvertibleConcept.
2370 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2372 * include/bits/stl_iterator.h (pointer_traits): Define partial
2373 specialization for __normal_iterator.
2374 * testsuite/24_iterators/normal_iterator/to_address.cc: New test.
2376 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2378 * include/bits/move.h (forward(remove_reference_t<T>&&)):
2379 Improve text of static_assert.
2380 * testsuite/20_util/forward/c_neg.cc: Adjust dg-error.
2381 * testsuite/20_util/forward/f_neg.cc: Likewise.
2383 2021-09-28 Jonathan Wakely <jwakely@redhat.com>
2386 * include/bits/fs_path.h (path::begin, path::end): Add noexcept
2387 to declarations, to match definitions.
2389 2021-09-24 Jonathan Wakely <jwakely@redhat.com>
2391 * include/bits/range_access.h (cbegin, cend): Remove redundant
2394 2021-09-23 Jonathan Wakely <jwakely@redhat.com>
2396 * testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc:
2397 Remove dg-error lines for C++20-only errors.
2399 2021-09-23 Jonathan Wakely <jwakely@redhat.com>
2401 * testsuite/19_diagnostics/headers/system_error/93151.cc:
2404 2021-09-23 Jonathan Wakely <jwakely@redhat.com>
2406 * src/c++11/system_error.cc (system_error_category) [_WIN32]:
2407 Map Windows error codes to generic POSIX error numbers. Use
2408 FormatMessage instead of strerror.
2409 * testsuite/19_diagnostics/error_category/system_category.cc:
2410 Adjust for new behaviour on Windows.
2412 2021-09-23 Jonathan Wakely <jwakely@redhat.com>
2414 * src/c++11/system_error.cc (generic_error_category): Define
2415 class and virtual functions as 'final'.
2416 (generic_error_category::equivalent(int, const error_condition&)):
2418 (system_error_category): Define class and virtual functions as
2420 (system_error_category::equivalent(int, const error_condition&)):
2422 (generic_category_instance, system_category_instance): Use
2423 constinit union to make the objects immortal.
2425 2021-09-23 Jonathan Wakely <jwakely@redhat.com>
2428 * src/c++11/system_error.cc
2429 (system_error_category::default_error_condition): Add 0 to
2431 * testsuite/19_diagnostics/error_category/102425.cc: New test.
2433 2021-09-17 Jonathan Wakely <jwakely@redhat.com>
2435 * include/bits/fs_path.h (path::iterator): Add noexcept to all
2436 member functions and friend functions.
2437 (distance): Add noexcept.
2438 (advance): Add noexcept and inline.
2439 * include/experimental/bits/fs_path.h (path::iterator):
2440 Add noexcept to all member functions.
2442 2021-09-17 Jonathan Wakely <jwakely@redhat.com>
2445 * include/std/tuple (_Tuple_impl): Add constexpr to constructor
2446 missed in previous patch.
2447 * testsuite/20_util/tuple/cons/102270.C: Moved to...
2448 * testsuite/20_util/tuple/cons/102270.cc: ...here.
2449 * testsuite/util/testsuite_allocator.h (SimpleAllocator): Add
2450 constexpr to constructor so it can be used for C++20 tests.
2452 2021-09-17 Jonathan Wakely <jwakely@redhat.com>
2454 * testsuite/26_numerics/valarray/dr630-3.C: Moved to...
2455 * testsuite/26_numerics/valarray/dr630-3.cc: ...here.
2456 * testsuite/27_io/basic_iostream/cons/16251.C: Moved to...
2457 * testsuite/27_io/basic_iostream/cons/16251.cc: ...here.
2459 2021-09-16 Jonathan Wakely <jwakely@redhat.com>
2461 * src/Makefile.am (stamp-debug): Add all Makefiles as
2463 * src/Makefile.in: Regenerate.
2465 2021-09-16 Jonathan Wakely <jwakely@redhat.com>
2467 * testsuite/ext/pb_ds/regression/tree_map_rand.cc: Increase
2468 timeout factor to 3.
2469 * testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
2471 2021-09-16 Jonathan Wakely <jwakely@redhat.com>
2473 * doc/xml/manual/using.xml: Generalize to apply to more than
2475 * doc/html/manual/using_macros.html: Regenerate.
2477 2021-09-16 Jonathan Wakely <jwakely@redhat.com>
2479 * include/std/optional (nullptr_t): Make constructor noexcept.
2481 2021-09-16 Jonathan Wakely <jwakely@redhat.com>
2483 * include/bits/fs_path.h (advance): Remove non-deducible
2486 2021-09-16 Jonathan Wakely <jwakely@redhat.com>
2489 * include/std/tuple (_Head_base, _Tuple_impl): Add
2490 _GLIBCXX20_CONSTEXPR to allocator-extended constructors.
2491 (tuple<>::swap(tuple&)): Add _GLIBCXX20_CONSTEXPR.
2492 * testsuite/20_util/tuple/cons/102270.C: New test.
2494 2021-09-16 Jonathan Wakely <jwakely@redhat.com>
2497 * include/std/span (span(Range&&)): Add constraint to deduction
2500 2021-09-16 Jonathan Wakely <jwakely@redhat.com>
2502 * src/c++98/Makefile.am: Use CXXCOMPILE not LTCXXCOMPILE.
2503 * src/c++98/Makefile.in: Regenerate.
2505 2021-09-16 Jonathan Wakely <jwakely@redhat.com>
2507 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
2508 (to_string): Add noexcept if the type width is 32 bits or less.
2510 2021-09-16 Jonathan Wakely <jwakely@redhat.com>
2512 * include/bits/unique_ptr.h (__uniq_ptr_impl::_M_ptr)
2513 (__uniq_ptr_impl::_M_deleter): Add noexcept.
2515 2021-09-16 Thomas Rodgers <rodgert@twrodgers.com>
2518 * testsuite/29_atomics/atomic_ref/wait_notify.cc (test): Use
2519 va and vb as arguments to wait/notify, remove unused bb local.
2521 2021-09-15 Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2523 * crossconfig.m4: Check for TLS support on mingw.
2524 * configure: Regenerate.
2526 2021-09-13 Jason Merrill <jason@redhat.com>
2528 * include/std/version: Define __cpp_lib_hardware_interference_size.
2529 * libsupc++/new: Define hardware interference size variables.
2531 2021-09-10 Jonathan Wakely <jwakely@redhat.com>
2533 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
2534 Fix invalid hostname to only match the .invalid TLD.
2536 2021-09-02 Jonathan Wakely <jwakely@redhat.com>
2538 * include/bits/atomic_base.h (__atomic_base<P*>::compare_exchange_weak):
2540 * include/std/atomic (atomic<T*>::compare_exchange_weak): Use
2543 2021-09-02 Jonathan Wakely <jwakely@redhat.com>
2545 * include/std/atomic: Tweak whitespace.
2547 2021-09-02 Jonathan Wakely <jwakely@redhat.com>
2550 * include/bits/atomic_base.h (__is_valid_cmpexch_failure_order):
2551 New function to check if a memory order is valid for the failure
2552 case of compare exchange operations.
2553 (__atomic_base<I>::compare_exchange_weak): Simplify assertions
2554 by using __is_valid_cmpexch_failure_order.
2555 (__atomic_base<I>::compare_exchange_strong): Likewise.
2556 (__atomic_base<P*>::compare_exchange_weak): Likewise.
2557 (__atomic_base<P*>::compare_exchange_strong): Likewise.
2558 (__atomic_impl::compare_exchange_weak): Add assertion.
2559 (__atomic_impl::compare_exchange_strong): Likewise.
2560 * include/std/atomic (atomic::compare_exchange_weak): Likewise.
2561 (atomic::compare_exchange_strong): Likewise.
2563 2021-09-02 Jonathan Wakely <jwakely@redhat.com>
2565 * include/std/functional (invoke_r): Define.
2566 * include/std/version (__cpp_lib_invoke_r): Define.
2567 * testsuite/20_util/function_objects/invoke/version.cc: Check
2568 for __cpp_lib_invoke_r as well as __cpp_lib_invoke.
2569 * testsuite/20_util/function_objects/invoke/4.cc: New test.
2571 2021-08-31 Jonathan Wakely <jwakely@redhat.com>
2574 * include/std/span (span(Iter, size_type), span(Iter, Iter)):
2575 Add valid range checks.
2576 * testsuite/23_containers/span/cons_1_assert_neg.cc: New test.
2577 * testsuite/23_containers/span/cons_2_assert_neg.cc: New test.
2579 2021-08-31 Jonathan Wakely <jwakely@redhat.com>
2581 * configure.ac: Fix checks for F_GETFL, F_SETFL and O_NONBLOCK.
2582 * configure: Regenerate.
2584 2021-08-31 Jonathan Wakely <jwakely@redhat.com>
2586 * src/c++11/system_error.cc (error_category::~error_category()):
2587 Remove noexcept-specifier.
2588 (system_error::~system_error()): Likewise.
2589 * testsuite/19_diagnostics/error_category/noexcept.cc: New test.
2590 * testsuite/19_diagnostics/system_error/noexcept.cc: New test.
2592 2021-08-31 Jonathan Wakely <jwakely@redhat.com>
2595 * include/bits/atomic_timed_wait.h (__timed_waiter_pool)
2596 [!_GLIBCXX_HAVE_PLATFORM_TIMED_WAIT]: Add missing return.
2598 2021-08-31 Jonathan Wakely <jwakely@redhat.com>
2600 * include/experimental/internet (__make_resolver_error_code):
2601 Handle EAI_SYSTEM errors.
2602 (basic_resolver_results): Use __make_resolver_error_code. Use
2603 Glibc NI_MAXHOST and NI_MAXSERV values for buffer sizes.
2605 2021-08-31 Jonathan Wakely <jwakely@redhat.com>
2607 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
2608 Try other service if "http" fails.
2610 2021-08-31 Jonathan Wakely <jwakely@redhat.com>
2612 * testsuite/17_intro/names.cc: Undefine some more names used
2613 by Solaris system headers.
2615 2021-08-30 Jason Merrill <jason@redhat.com>
2618 * testsuite/30_threads/promise/requirements/lwg3466.cc:
2619 Remove dg-prune-outputs.
2621 2021-08-28 Jonathan Wakely <jwakely@redhat.com>
2623 * include/bits/alloc_traits.h (allocator_traits): Add explicit
2624 specialization for allocator<void>. Improve doxygen comments.
2625 * include/bits/allocator.h (allocator<void>): Restore for the
2626 versioned namespace.
2627 (allocator<void>::construct, allocator<void>::destroy): Remove.
2628 * include/ext/extptr_allocator.h (_Extptr_allocator<void>):
2629 Add default constructor and converting constructor.
2631 2021-08-28 Jonathan Wakely <jwakely@redhat.com>
2633 * include/bits/stl_uninitialized.h: Fix typo in comment.
2635 2021-08-28 Jonathan Wakely <jwakely@redhat.com>
2638 * src/c++17/fs_ops.cc (fs::absolute): Call non-throwing form,
2639 to avoid unnecessary current_path() call.
2641 2021-08-28 Jonathan Wakely <jwakely@redhat.com>
2643 * include/bits/std_function.h (function::function(F&&)): Give
2644 name to defaulted template parameter, to improve diagnostics.
2645 Use markdown for more doxygen comments.
2647 2021-08-26 Jonathan Wakely <jwakely@redhat.com>
2649 * include/bits/std_function.h (function): Adjust doxygen
2651 * include/bits/unique_ptr.h (make_unique_for_overwrite):
2652 Change parameter name to match doxygen comment.
2654 2021-08-26 Jonathan Wakely <jwakely@redhat.com>
2656 * include/bits/std_function.h (_function_base::_Base_manager):
2657 Replace _M_init_functor with a function template using a
2658 forwarding reference, and a pair of _M_create function
2659 templates. Reuse _M_create for the clone operation.
2660 (function::_Decay_t): New alias template.
2661 (function::_Callable): Simplify by using _Decay.
2662 (function::function(F)): Change parameter to forwarding
2663 reference, as per LWG 2447. Add noexcept-specifier. Simplify
2665 (function::operator=(F&&)): Add noexcept-specifier.
2666 * testsuite/20_util/function/cons/lwg2774.cc: New test.
2667 * testsuite/20_util/function/cons/noexcept.cc: New test.
2669 2021-08-26 Jonathan Wakely <jwakely@redhat.com>
2671 * include/bits/std_function.h (function::function(F)): Add
2672 static assertions to check constructibility requirements.
2674 2021-08-26 Jonathan Wakely <jwakely@redhat.com>
2677 * configure.ac: Check for O_NONBLOCK.
2678 * configure: Regenerate.
2679 * include/experimental/internet: Include <ws2tcpip.h> for
2680 Windows. Use preprocessor conditions around more constants.
2681 * include/experimental/socket: Use preprocessor conditions
2682 around more constants.
2683 * testsuite/experimental/net/internet/resolver/base.cc: Only use
2684 constants when the corresponding C macro is defined.
2685 * testsuite/experimental/net/socket/basic_socket.cc: Likewise.
2686 * testsuite/experimental/net/socket/socket_base.cc: Likewise.
2687 Make preprocessor checks more fine-grained.
2689 2021-08-25 Jonathan Wakely <jwakely@redhat.com>
2691 * testsuite/17_intro/names.cc: Check 'sz'.
2693 2021-08-25 Jonathan Wakely <jwakely@redhat.com>
2695 * testsuite/17_intro/names.cc: Adjust for Windows.
2697 2021-08-25 Jonathan Wakely <jwakely@redhat.com>
2699 * include/std/valarray: Uglify 'func' parameters.
2700 * testsuite/17_intro/names.cc: Add 'func' to checks.
2702 2021-08-25 Jonathan Wakely <jwakely@redhat.com>
2705 * include/bits/stl_uninitialized.h (_GLIBCXX_USE_ASSIGN_FOR_INIT):
2706 Define macro to check conditions for optimizing trivial cases.
2707 (__check_constructible): New function to do static assert.
2708 (uninitialized_copy, uninitialized_fill, uninitialized_fill_n):
2710 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
2711 Adjust dg-error pattern.
2712 * testsuite/23_containers/vector/cons/89164.cc: Likewise. Add
2713 C++17-specific checks from 89164_c++17.cc.
2714 * testsuite/23_containers/vector/cons/89164_c++17.cc: Removed.
2715 * testsuite/20_util/specialized_algorithms/uninitialized_copy/102064.cc:
2717 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/102064.cc:
2719 * testsuite/20_util/specialized_algorithms/uninitialized_fill/102064.cc:
2721 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/102064.cc:
2724 2021-08-25 Jonathan Wakely <jwakely@redhat.com>
2727 * include/ext/rope (rope::erase(size_type)): Remove broken
2730 2021-08-24 Jonathan Wakely <jwakely@redhat.com>
2732 * doc/xml/manual/status_cxx2020.xml: Update table.
2733 * doc/html/manual/status.html: Regenerate.
2735 2021-08-24 Jonathan Wakely <jwakely@redhat.com>
2737 * include/std/type_traits (is_layout_compatible): Define.
2738 (is_corresponding_member): Define.
2739 * include/std/version (__cpp_lib_is_layout_compatible): Define.
2740 * testsuite/20_util/is_layout_compatible/is_corresponding_member.cc:
2742 * testsuite/20_util/is_layout_compatible/value.cc: New test.
2743 * testsuite/20_util/is_layout_compatible/version.cc: New test.
2744 * testsuite/20_util/is_pointer_interconvertible/with_class.cc:
2746 * testsuite/23_containers/span/layout_compat.cc: Do not use real
2747 std::is_layout_compatible trait if available.
2749 2021-08-24 Jonathan Wakely <jwakely@redhat.com>
2751 * src/c++11/cxx11-shim_facets.cc: Fix mismatched class-key in
2752 explicit instantiation definitions.
2754 2021-08-23 Jonathan Wakely <jwakely@redhat.com>
2756 * include/std/ranges (basic_istream_view): Add default template
2758 * testsuite/std/ranges/istream_view.cc: Check it.
2760 2021-08-23 Jonathan Wakely <jwakely@redhat.com>
2762 * libsupc++/dyncast.cc (__dynamic_cast): Add __builtin_expect to
2765 2021-08-23 Jonathan Wakely <jwakely@redhat.com>
2768 * testsuite/util/testsuite_fs.h (permissions_are_testable):
2771 2021-08-20 Jonathan Wakely <jwakely@redhat.com>
2774 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
2775 Use new __gnu_test::permissions_are_testable() function.
2776 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
2778 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
2779 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
2780 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
2781 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
2782 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
2783 * testsuite/27_io/filesystem/operations/symlink_status.cc:
2785 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
2787 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
2789 * testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc:
2791 * testsuite/experimental/filesystem/operations/exists.cc:
2793 * testsuite/experimental/filesystem/operations/is_empty.cc:
2795 * testsuite/experimental/filesystem/operations/remove.cc:
2797 * testsuite/experimental/filesystem/operations/remove_all.cc:
2799 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
2801 * testsuite/util/testsuite_fs.h (__gnu_test::permissions_are_testable):
2802 New function to guess whether testing permissions will work.
2804 2021-08-19 Jonathan Wakely <jwakely@redhat.com>
2806 * doc/xml/manual/status_cxx2020.xml: Move row earlier in table.
2807 * doc/html/manual/status.html: Regenerate.
2809 2021-08-19 Jonathan Wakely <jwakely@redhat.com>
2811 * doc/doxygen/user.cfg.in: Update to Doxygen 1.9.2
2813 2021-08-19 Jonathan Wakely <jwakely@redhat.com>
2816 * include/std/charconv (__to_chars_i): Remove redundant check.
2818 2021-08-19 Jonathan Wakely <jwakely@redhat.com>
2821 * include/std/tuple (_Tuple_impl(_Tuple_impl&&)): Use base
2822 class' move constructor. Define as defaulted for versioned
2824 * testsuite/20_util/tuple/cons/101960.cc: New test.
2826 2021-08-19 Jonathan Wakely <jwakely@redhat.com>
2829 * doc/xml/manual/status_cxx2020.xml: Add P1739R4 to status table.
2830 * doc/html/manual/status.html: Regenerate.
2832 2021-08-19 Jonathan Wakely <jwakely@redhat.com>
2834 * include/bits/shared_ptr.h: Add @since and @headerfile tags.
2835 * include/bits/unique_ptr.h: Add @headerfile tags.
2837 2021-08-19 Jonathan Wakely <jwakely@redhat.com>
2839 * src/filesystem/ops-common.h (filesystem::file_time): Improve
2840 overflow check by using system_clock::duration::max().
2842 2021-08-19 Jonathan Wakely <jwakely@redhat.com>
2844 * include/bits/stl_tree.h: Tweak whitespace.
2846 2021-08-18 Jonathan Wakely <jwakely@redhat.com>
2848 * include/bits/unique_ptr.h (default_delete): Add @since tag.
2849 (unique_ptr, unique_ptr<T[]>): Likewise. Improve @brief.
2850 (make_unique, make_unique_for_overwrite): Likewise. Add @tparam,
2851 @param, and @returns.
2852 (_MakeUniq): Move to __detail namespace. Add alias template
2855 2021-08-18 Jonathan Wakely <jwakely@redhat.com>
2857 * include/bits/stl_function.h: Improve doxygen comments.
2859 2021-08-18 Jonathan Wakely <jwakely@redhat.com>
2861 * doc/doxygen/user.cfg.in (PREDEFINED): Enable doxygen
2862 processing for C++20 components and components that depend on
2864 * include/bits/stl_algo.h (random_shuffle): Use @deprecated.
2865 * include/std/type_traits: Improve doxygen comments for C++20
2868 2021-08-18 Jonathan Wakely <jwakely@redhat.com>
2870 * include/ext/type_traits.h (__promote_2, __promote_3)
2871 (__promote_4): Redfine as alias templates using __promoted_t.
2872 * include/std/complex (__promote_2): Remove partial
2873 specializations for std::complex.
2875 2021-08-18 Jonathan Wakely <jwakely@redhat.com>
2877 * include/bits/stl_algo.h (min(initializer_list<T>))
2878 (min(initializer_list<T>, Compare)): Call __min_element directly to
2879 avoid redundant debug checks for valid ranges.
2880 (max(initializer_list<T>), max(initializer_list<T>, Compare)):
2881 Likewise, for __max_element.
2882 (minmax(initializer_list<T>), minmax(initializer_list<T>, Compare)):
2883 Likewise, for __minmax_element.
2885 2021-08-18 Jonathan Wakely <jwakely@redhat.com>
2887 * include/debug/deque (deque(size_type, const T&, const A&)):
2888 Prevent class template argument deduction and replace with a
2890 * include/debug/forward_list (forward_list(size_type, const T&, const A&)):
2892 * include/debug/list (list(size_type, const T&, const A&)):
2894 * include/debug/vector (vector(size_type, const T&, const A&)):
2897 2021-08-18 Jonathan Wakely <jwakely@redhat.com>
2899 * python/libstdcxx/v6/printers.py (StdBitReferencePrinter): Use
2900 'std::vector<bool>::reference' as type name, not _Bit_reference.
2901 (build_libstdcxx_dictionary): Register printers for vector<bool>
2902 types in debug mode too.
2903 * testsuite/libstdc++-prettyprinters/simple.cc: Adjust expected
2904 output for invalid _Bit_reference. Use vector<bool>::reference
2905 instead of _Bit_reference.
2906 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
2908 2021-08-17 Thomas Schwinge <thomas@codesourcery.com>
2910 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose,
2913 2021-08-17 Luc Michel <lmichel@kalray.eu>
2914 Marc Poulhies <mpoulhies@kalrayinc.com>
2916 * testsuite/lib/gdb-test.exp (gdb_version_check)
2917 (gdb_version_check_xmethods): Only check the GDB version for
2918 local native targets.
2920 2021-08-17 Antony Polukhin <antoshkka@gmail.com>
2921 Jonathan Wakely <jwakely@redhat.com>
2923 * include/bits/random.tcc (seed_seq::seed_seq): Reserve capacity
2924 if distance is O(1).
2925 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
2928 2021-08-17 Jonathan Wakely <jwakely@redhat.com>
2930 * testsuite/26_numerics/random/seed_seq/cons/range.cc: Check
2931 construction from input iterators.
2933 2021-08-17 Jonathan Wakely <jwakely@redhat.com>
2935 * python/libstdcxx/v6/printers.py (StdErrorCatPrinter): Remove.
2937 2021-08-17 Jonathan Wakely <jwakely@redhat.com>
2940 * include/bits/std_function.h (function(function&&)): Check for
2941 non-empty parameter before doing any work.
2943 2021-08-17 Jonathan Wakely <jwakely@redhat.com>
2945 * include/bits/cow_string.h (basic_string::contains): Do not
2946 define for -std=gnu++20.
2948 2021-08-17 Jonathan Wakely <jwakely@redhat.com>
2950 * include/bits/ranges_util.h (__not_same_as): Rename to
2952 * include/std/ranges (__not_same_as): Likewise.
2954 2021-08-17 Jonathan Wakely <jwakely@redhat.com>
2956 * include/std/utility (exchange): Add noexcept-specifier.
2957 * testsuite/20_util/exchange/noexcept.cc: New test.
2959 2021-08-17 Jonathan Wakely <jwakely@redhat.com>
2961 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Define.
2962 (build_libstdcxx_dictionary): Register printer for
2963 std::error_code and std::error_condition.
2964 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test it.
2966 2021-08-16 Jonathan Wakely <jwakely@redhat.com>
2969 * src/c++11/debug.cc (PrintContext::_M_indent): Replace with a
2971 (print_word): Use qualified-id to access it.
2973 2021-08-16 Jonathan Wakely <jwakely@redhat.com>
2975 * python/Makefile.am [GLIBCXX_BUILD_DEBUG] (install-data-local):
2976 Install another copy of the GDB hook.
2977 * python/Makefile.in: Regenerate.
2979 2021-08-12 Jonathan Wakely <jwakely@redhat.com>
2982 * include/c_global/cmath (hypot): Use __promoted_t.
2983 (lerp): Add new overload accepting any arithmetic types.
2984 * include/ext/type_traits.h (__promoted_t): New alias template.
2985 * testsuite/26_numerics/lerp.cc: Moved to...
2986 * testsuite/26_numerics/lerp/1.cc: ...here.
2987 * testsuite/26_numerics/lerp/constexpr.cc: New test.
2988 * testsuite/26_numerics/lerp/version.cc: New test.
2990 2021-08-12 Jonathan Wakely <jwakely@redhat.com>
2992 * testsuite/26_numerics/lerp.cc: Add header name to #error.
2993 * testsuite/26_numerics/midpoint/integral.cc: Likewise.
2994 * testsuite/26_numerics/midpoint/version.cc: New test.
2996 2021-08-12 Jonathan Wakely <jwakely@redhat.com>
2998 * include/experimental/random (experimental::randint): Add
2999 nodiscard attribute.
3001 2021-08-12 Jonathan Wakely <jwakely@redhat.com>
3003 * src/c++98/locale_init.cc: Require C++11.
3004 * src/c++98/localename.cc: Likewise.
3005 * src/c++98/misc-inst.cc: Require C++98.
3007 2021-08-11 Jonathan Wakely <jwakely@redhat.com>
3010 * testsuite/experimental/random/randint.cc: Loop and retry if
3011 reseed() produces the same sequence.
3013 2021-08-11 Jonathan Wakely <jwakely@redhat.com>
3015 * include/std/type_traits (__cpp_lib_is_pointer_interconvertible)
3016 (is_pointer_interconvertible_base_of_v)
3017 (is_pointer_interconvertible_base_of): Define for C++20.
3018 * include/std/version (__cpp_lib_is_pointer_interconvertible):
3020 * testsuite/23_containers/span/layout_compat.cc: Use correct
3021 feature test macro for std::is_layout_compatible_v.
3022 * testsuite/20_util/is_pointer_interconvertible/value.cc: New test.
3023 * testsuite/20_util/is_pointer_interconvertible/version.cc: New test.
3025 2021-08-09 Jonathan Wakely <jwakely@redhat.com>
3027 * include/bits/regex.h (basic_regex::transform_primary): Use
3028 _GLIBCXX_STD_C::vector for local variable.
3029 * include/bits/regex.tcc (__regex_algo_impl): Use reference to
3030 _GLIBCXX_STD_C::vector base class of match_results.
3031 * include/bits/regex_automaton.tcc (_StateSeq:_M_clone): Use
3032 _GLIBCXX_STD_C::map and _GLIBCXX_STD_C::deque for local
3034 * include/bits/regex_compiler.h (_BracketMatcher): Use
3035 _GLIBCXX_STD_C::vector for data members.
3036 * include/bits/regex_executor.h (_Executor): Likewise.
3037 * include/std/regex [_GLIBCXX_DEBUG]: Include <debug/vector>.
3039 2021-08-09 François Dumont <fdumont@gcc.gnu.org>
3041 * include/debug/safe_container.h
3042 (_Safe_container(_Safe_container&&, const _Alloc&, std::true_type)): New.
3043 (_Safe_container(_Safe_container&&, const _Alloc&, std::false_type)): New.
3044 (_Safe_container(_Safe_container&&, const _Alloc&)): Use latters.
3046 2021-08-09 Jonathan Wakely <jwakely@redhat.com>
3048 * testsuite/23_containers/unordered_map/cons/default.cc: Add
3049 equality comparison operators to allocator.
3050 * testsuite/23_containers/unordered_set/cons/default.cc:
3053 2021-08-08 François Dumont <fdumont@gcc.gnu.org>
3055 * testsuite/25_algorithms/copy/debug/constexpr_neg.cc: Replace 'failed_assertion'
3056 dg-prune-output reason with 'builtin_unreachable'.
3057 * testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc: Likewise.
3058 * testsuite/25_algorithms/equal/debug/constexpr_neg.cc: Likewise.
3059 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc: Likewise.
3060 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc: Likewise.
3061 * testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc: Likewise.
3062 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc: Likewise.
3063 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc: Likewise.
3064 * testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc: Likewise.
3066 2021-08-08 Hans-Peter Nilsson <hp@bitrange.com>
3068 * testsuite/std/ranges/iota/max_size_type.cc: Set
3069 dg-timeout-factor to 4.
3071 2021-08-06 Jonathan Wakely <jwakely@redhat.com>
3073 * libsupc++/compare (compare_three_way, strong_order)
3074 (weak_order, partial_order, compare_strong_order_fallback)
3075 (compare_weak_order_fallback, compare_partial_order_fallback):
3076 Move nodiscard attributes to correct location.
3078 2021-08-05 Jonathan Wakely <jwakely@redhat.com>
3081 * include/bits/ranges_base.h (ranges::begin, ranges::end)
3082 (ranges::rbegin, ranges::rend, ranges::size, ranges::ssize)
3083 (ranges::empty, ranges::data): Move attribute after the
3084 declarator-id instead of at the end of the declarator.
3085 * include/bits/stl_iterator.h (__gnu_cxx::__normal_iterator):
3086 Move attributes back to the start of the function declarator,
3087 but move the requires-clause to the end.
3088 (common_iterator): Move attribute after the declarator-id.
3089 * include/bits/stl_queue.h (queue): Remove ill-formed attributes
3090 from friend declaration that are not definitions.
3091 * include/std/ranges (views::all, views::filter)
3092 (views::transform, views::take, views::take_while,
3093 views::drop) (views::drop_while, views::join,
3094 views::lazy_split) (views::split, views::counted,
3095 views::common, views::reverse) (views::elements): Move
3096 attributes after the declarator-id.
3098 2021-08-05 Jonathan Wakely <jwakely@redhat.com>
3100 * libsupc++/compare (partial_ordering, weak_ordering)
3101 (strong_ordering, is_eq, is_neq, is_lt, is_lteq, is_gt, is_gteq)
3102 (compare_three_way, strong_order, weak_order, partial_order)
3103 (compare_strong_order_fallback, compare_weak_order_fallback)
3104 (compare_partial_order_fallback, __detail::__synth3way): Add
3105 nodiscard attribute.
3106 * testsuite/18_support/comparisons/categories/zero_neg.cc: Add
3107 -Wno-unused-result to options.
3109 2021-08-05 Jonathan Wakely <jwakely@redhat.com>
3112 * include/bits/ranges_base.h (ranges::begin, ranges::end)
3113 (ranges::rbegin, ranges::rend, ranges::size, ranges::ssize)
3114 (ranges::empty, ranges::data): Move attribute to the end of
3116 * include/bits/stl_iterator.h (__gnu_cxx::__normal_iterator)
3117 (common_iterator): Likewise for non-member operator functions.
3118 * include/std/ranges (views::all, views::filter)
3119 (views::transform, views::take, views::take_while, views::drop)
3120 (views::drop_while, views::join, views::lazy_split)
3121 (views::split, views::counted, views::common, views::reverse)
3122 (views::elements): Likewise.
3123 * testsuite/std/ranges/access/101782.cc: New test.
3125 2021-08-04 Jonathan Wakely <jwakely@redhat.com>
3127 * include/bits/forward_list.h: Add [[nodiscard]] to functions
3128 with no side-effects.
3129 * include/bits/stl_bvector.h: Likewise.
3130 * include/bits/stl_deque.h: Likewise.
3131 * include/bits/stl_list.h: Likewise.
3132 * include/bits/stl_queue.h: Likewise.
3133 * include/bits/stl_stack.h: Likewise.
3134 * include/bits/stl_vector.h: Likewise.
3135 * include/debug/deque: Likewise.
3136 * include/debug/forward_list: Likewise.
3137 * include/debug/list: Likewise.
3138 * include/debug/safe_iterator.h: Likewise.
3139 * include/debug/vector: Likewise.
3140 * include/std/array: Likewise.
3141 * testsuite/23_containers/array/creation/3_neg.cc: Use
3143 * testsuite/23_containers/array/debug/back1_neg.cc: Cast result
3145 * testsuite/23_containers/array/debug/back2_neg.cc: Likewise.
3146 * testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
3147 * testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
3148 * testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc:
3150 * testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc:
3152 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
3153 Adjust dg-error line numbers.
3154 * testsuite/23_containers/deque/cons/clear_allocator.cc: Cast
3156 * testsuite/23_containers/deque/debug/invalidation/4.cc:
3158 * testsuite/23_containers/deque/types/1.cc: Use
3160 * testsuite/23_containers/list/types/1.cc: Cast result to void.
3161 * testsuite/23_containers/priority_queue/members/7161.cc:
3163 * testsuite/23_containers/queue/members/7157.cc: Likewise.
3164 * testsuite/23_containers/vector/59829.cc: Likewise.
3165 * testsuite/23_containers/vector/ext_pointer/types/1.cc:
3167 * testsuite/23_containers/vector/ext_pointer/types/2.cc:
3169 * testsuite/23_containers/vector/types/1.cc: Use
3172 2021-08-04 Jonathan Wakely <jwakely@redhat.com>
3174 * include/bits/iterator_concepts.h (iter_move): Add
3176 * include/bits/range_access.h (begin, end, cbegin, cend)
3177 (rbegin, rend, crbegin, crend, size, data, ssize): Likewise.
3178 * include/bits/ranges_base.h (ranges::begin, ranges::end)
3179 (ranges::cbegin, ranges::cend, ranges::rbegin, ranges::rend)
3180 (ranges::crbegin, ranges::crend, ranges::size, ranges::ssize)
3181 (ranges::empty, ranges::data, ranges::cdata): Likewise.
3182 * include/bits/stl_iterator.h (reverse_iterator, __normal_iterator)
3183 (back_insert_iterator, front_insert_iterator, insert_iterator)
3184 (move_iterator, move_sentinel, common_iterator)
3185 (counted_iterator): Likewise.
3186 * include/bits/stl_iterator_base_funcs.h (distance, next, prev):
3188 * include/bits/stream_iterator.h (istream_iterator)
3189 (ostream_iterartor): Likewise.
3190 * include/bits/streambuf_iterator.h (istreambuf_iterator)
3191 (ostreambuf_iterator): Likewise.
3192 * include/std/ranges (views::single, views::iota, views::all)
3193 (views::filter, views::transform, views::take, views::take_while)
3194 (views::drop, views::drop_while, views::join, views::lazy_split)
3195 (views::split, views::counted, views::common, views::reverse)
3196 (views::elements): Likewise.
3197 * testsuite/20_util/rel_ops.cc: Use -Wno-unused-result.
3198 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Likewise.
3199 * testsuite/24_iterators/normal_iterator/greedy_ops.cc:
3201 * testsuite/24_iterators/reverse_iterator/2.cc: Likewise.
3202 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc:
3204 * testsuite/21_strings/basic_string/range_access/char/1.cc:
3205 Cast result to void.
3206 * testsuite/21_strings/basic_string/range_access/wchar_t/1.cc:
3208 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
3210 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
3212 * testsuite/23_containers/array/range_access.cc: Likewise.
3213 * testsuite/23_containers/deque/range_access.cc: Likewise.
3214 * testsuite/23_containers/forward_list/range_access.cc:
3216 * testsuite/23_containers/list/range_access.cc: Likewise.
3217 * testsuite/23_containers/map/range_access.cc: Likewise.
3218 * testsuite/23_containers/multimap/range_access.cc: Likewise.
3219 * testsuite/23_containers/multiset/range_access.cc: Likewise.
3220 * testsuite/23_containers/set/range_access.cc: Likewise.
3221 * testsuite/23_containers/unordered_map/range_access.cc:
3223 * testsuite/23_containers/unordered_multimap/range_access.cc:
3225 * testsuite/23_containers/unordered_multiset/range_access.cc:
3227 * testsuite/23_containers/unordered_set/range_access.cc:
3229 * testsuite/23_containers/vector/range_access.cc: Likewise.
3230 * testsuite/24_iterators/customization_points/iter_move.cc:
3232 * testsuite/24_iterators/istream_iterator/sentinel.cc:
3234 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc:
3236 * testsuite/24_iterators/move_iterator/dr2061.cc: Likewise.
3237 * testsuite/24_iterators/operations/prev_neg.cc: Likewise.
3238 * testsuite/24_iterators/ostreambuf_iterator/2.cc: Likewise.
3239 * testsuite/24_iterators/range_access/range_access.cc:
3241 * testsuite/24_iterators/range_operations/100768.cc: Likewise.
3242 * testsuite/26_numerics/valarray/range_access2.cc: Likewise.
3243 * testsuite/28_regex/range_access.cc: Likewise.
3244 * testsuite/experimental/string_view/range_access/char/1.cc:
3246 * testsuite/experimental/string_view/range_access/wchar_t/1.cc:
3248 * testsuite/ext/vstring/range_access.cc: Likewise.
3249 * testsuite/std/ranges/adaptors/take.cc: Likewise.
3250 * testsuite/std/ranges/p2259.cc: Likewise.
3252 2021-08-03 Jonathan Wakely <jwakely@redhat.com>
3254 * include/bits/random.tcc (linear_congruential_engine): Do not
3255 define static constexpr members when they are implicitly inline.
3256 * include/std/ratio (ratio, __ratio_multiply, __ratio_divide)
3257 (__ratio_add, __ratio_subtract): Likewise.
3258 * include/std/type_traits (integral_constant): Likewise.
3259 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
3262 2021-08-03 Jonathan Wakely <jwakely@redhat.com>
3264 * testsuite/util/testsuite_common_types.h: Replace uses of
3265 tr1::unordered_map and tr1::unordered_set with their C++11
3267 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust
3268 dg-error line number.
3269 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3270 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3272 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc:
3274 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3276 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3278 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3281 2021-08-03 Jonathan Wakely <jwakely@redhat.com>
3283 * include/std/memory_resource (polymorphic_allocator::delete_object):
3284 Call destructor directly instead of using destroy.
3285 (allocator_traits<polymorphic_allocator<T>>): Define partial
3288 2021-08-03 Jonathan Wakely <jwakely@redhat.com>
3290 * testsuite/20_util/function_objects/binders/3113.cc: Remove
3291 trailing whitespace.
3292 * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise.
3293 * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
3294 * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc:
3296 * testsuite/20_util/shared_ptr/creation/dr925.cc: Likewise.
3297 * testsuite/25_algorithms/headers/algorithm/synopsis.cc:
3299 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
3301 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
3304 2021-08-03 Jonathan Wakely <jwakely@redhat.com>
3306 * doc/xml/manual/evolution.xml: Document deprecation.
3307 * doc/html/*: Regenerate.
3308 * include/bits/c++config (_GLIBCXX14_DEPRECATED): Define.
3309 (_GLIBCXX14_DEPRECATED_SUGGEST): Define.
3310 * include/bits/stl_algo.h (random_shuffle): Deprecate for C++14
3312 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Adjust
3313 for C++11 and C++14 changes to std::random_shuffle and
3315 * testsuite/25_algorithms/random_shuffle/1.cc: Add options to
3316 use deprecated algorithms.
3317 * testsuite/25_algorithms/random_shuffle/59603.cc: Likewise.
3318 * testsuite/25_algorithms/random_shuffle/moveable.cc: Likewise.
3319 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
3321 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
3324 2021-08-03 Jonathan Wakely <jwakely@redhat.com>
3326 * testsuite/23_containers/forward_list/operations/3.cc:
3327 Use lambda instead of std::bind2nd.
3328 * testsuite/20_util/function_objects/binders/3113.cc: Add
3329 options for testing deprecated features.
3330 * testsuite/20_util/pair/cons/99957.cc: Likewise.
3331 * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise.
3332 * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
3333 * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc:
3335 * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
3336 * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise.
3337 * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise.
3338 * testsuite/20_util/shared_ptr/creation/dr925.cc: Likewise.
3339 * testsuite/20_util/unique_ptr/cons/auto_ptr.cc: Likewise.
3340 * testsuite/20_util/unique_ptr/cons/auto_ptr_neg.cc: Likewise.
3341 * testsuite/ext/pb_ds/example/priority_queue_erase_if.cc:
3343 * testsuite/ext/pb_ds/example/priority_queue_split_join.cc:
3345 * testsuite/lib/dg-options.exp (dg_add_options_using-deprecated):
3348 2021-08-03 Jonathan Wakely <jwakely@redhat.com>
3350 * include/bits/regex_executor.h (_State_info): Replace
3351 unique_ptr<bool[]> with array of bool.
3352 * include/bits/regex_executor.tcc: Likewise.
3353 * include/bits/regex_scanner.tcc: Replace std::strchr with
3355 * include/std/regex: Replace standard headers with smaller
3357 * testsuite/28_regex/traits/char/lookup_classname.cc: Include
3358 <string.h> for strlen.
3359 * testsuite/28_regex/traits/char/lookup_collatename.cc:
3362 2021-08-03 Jonathan Wakely <jwakely@redhat.com>
3364 * include/bits/locale_conv.h (__detail::_Scoped_ptr): Define new
3365 RAII class template.
3366 (wstring_convert, wbuffer_convert): Use __detail::_Scoped_ptr
3367 instead of unique_ptr.
3369 2021-08-02 Patrick Palka <ppalka@redhat.com>
3372 * include/bits/ranges_algo.h (__reverse_copy_fn::operator()):
3373 Add missing std::move in return statement.
3374 (__partition_copy_fn::operator()): Rename templtae parameter
3375 _O2 to _Out2. Uglify function parameters out_true and out_false.
3376 * include/bits/ranges_algobase.h (__copy_or_move): Add missing
3377 std::move to recursive call that unwraps a __normal_iterator
3379 * testsuite/25_algorithms/copy/constrained.cc (test06): New test.
3380 * testsuite/25_algorithms/move/constrained.cc (test05): New test.
3382 2021-08-02 Patrick Palka <ppalka@redhat.com>
3385 * include/std/ranges (lazy_split_view::_InnerIter::base): Make
3386 the const& overload unconstrained and return a const reference
3387 as per LWG 3533. Make unconditionally noexcept.
3388 (elements_view::base): Revert accidental r12-569 change.
3389 (elements_view::_Iterator::base): Make the const& overload
3390 unconstrained and return a const reference as per LWG 3533.
3391 Make unconditionally noexcept.
3393 2021-08-02 Patrick Palka <ppalka@redhat.com>
3396 * include/std/ranges (join_view::_Iterator::_Iterator): Add
3399 2021-08-02 Jonathan Wakely <jwakely@redhat.com>
3402 * src/filesystem/ops-common.h (get_temp_directory_from_env):
3403 Add error_code parameter.
3404 * src/c++17/fs_ops.cc (fs::temp_directory_path): Pass error_code
3405 argument to get_temp_directory_from_env and check it.
3406 * src/filesystem/ops.cc (fs::temp_directory_path): Likewise.
3408 2021-08-02 Jonathan Wakely <jwakely@redhat.com>
3410 * testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
3411 Add dg-error for c++11_only target.
3413 2021-07-30 Jonathan Wakely <jwakely@redhat.com>
3416 * configure.ac: Check for secure_getenv.
3417 * config.h.in: Regenerate.
3418 * configure: Regenerate.
3419 * src/filesystem/ops-common.h (get_temp_directory_from_env): New
3420 helper function to obtain path from the environment.
3421 * src/c++17/fs_ops.cc (fs::temp_directory_path): Use new helper.
3422 * src/filesystem/ops.cc (fs::temp_directory_path): Likewise.
3423 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3424 Print messages if test cannot be run.
3425 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
3426 Likewise. Fix incorrect condition. Use "TMP" to work with
3427 Windows as well as POSIX.
3429 2021-07-29 Hans-Peter Nilsson <hp@bitrange.com>
3431 * src/c++17/memory_resource.cc: Use __exchange instead
3434 2021-07-27 Jonathan Wakely <jwakely@redhat.com>
3436 * include/experimental/optional (__throw_bad_optional_access):
3437 Replace GNU attribute with C++11 attribute.
3438 (optional::value, optional::value_or): Use if statements
3439 instead of conditional expressions.
3440 * include/std/optional (__throw_bad_optional_access)
3441 (optional::value, optional::value_or): Likewise.
3443 2021-07-27 Marek Polacek <polacek@redhat.com>
3447 * testsuite/20_util/tuple/comparison_operators/overloaded.cc:
3449 * testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
3452 2021-07-27 Jonathan Wakely <jwakely@redhat.com>
3454 * include/bits/cow_string.h: Consistently use tab for
3457 2021-07-27 Jonathan Wakely <jwakely@redhat.com>
3459 * include/Makefile.am: Add new header.
3460 * include/Makefile.in: Regenerate.
3461 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3462 (basic_string): Move definition of Copy-on-Write string to
3464 * include/bits/basic_string.tcc: Likewise.
3465 * include/bits/cow_string.h: New file.
3467 2021-07-27 Jonathan Wakely <jwakely@redhat.com>
3469 * include/std/algorithm: Do not include <utility>.
3470 * include/std/functional: Likewise.
3471 * include/std/regex: Include <bits/stl_pair.h> instead of
3473 * include/debug/map.h: Likewise.
3474 * include/debug/multimap.h: Likewise.
3475 * include/debug/multiset.h: Likewise.
3476 * include/debug/set.h: Likewise.
3477 * include/debug/vector: Likewise.
3478 * include/bits/fs_path.h: Likewise.
3479 * include/bits/unique_ptr.h: Do not include <utility>.
3480 * include/experimental/any: Likewise.
3481 * include/experimental/executor: Likewise.
3482 * include/experimental/memory: Likewise.
3483 * include/experimental/optional: Likewise.
3484 * include/experimental/socket: Use __exchange instead
3486 * src/filesystem/ops-common.h: Likewise.
3487 * testsuite/20_util/default_delete/48631_neg.cc: Adjust expected
3488 errors to not use a hardcoded line number.
3489 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
3490 * testsuite/20_util/specialized_algorithms/uninitialized_copy/constrained.cc:
3491 Include <utility> for std::as_const.
3492 * testsuite/20_util/specialized_algorithms/uninitialized_default_construct/constrained.cc:
3494 * testsuite/20_util/specialized_algorithms/uninitialized_move/constrained.cc:
3496 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/constrained.cc:
3498 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
3499 Adjust dg-error line number.
3501 2021-07-27 Jonathan Wakely <jwakely@redhat.com>
3503 * include/Makefile.am: Add bits/utility.h header.
3504 * include/Makefile.in: Regenerate.
3505 * include/bits/utility.h: New file.
3506 * include/std/utility (tuple_size, tuple_element): Move
3508 * include/std/type_traits (__is_tuple_like_impl<tuple<T...>>):
3510 (_Index_tuple, _Build_index_tuple, integer_sequence): Likewise.
3511 (in_place_t, in_place_index_t, in_place_type_t): Likewise.
3512 * include/bits/ranges_util.h: Include new header instead of
3514 * include/bits/stl_pair.h (tuple_size, tuple_element): Move
3515 partial specializations for std::pair here.
3516 (get): Move overloads for std::pair here.
3517 * include/std/any: Include new header instead of <utility>.
3518 * include/std/array: Likewise.
3519 * include/std/memory_resource: Likewise.
3520 * include/std/optional: Likewise.
3521 * include/std/variant: Likewise.
3522 * include/std/tuple: Likewise.
3523 (__is_tuple_like_impl<tuple<T...>>): Move here.
3524 (get) Declare overloads for std::array.
3525 * include/std/version (__cpp_lib_tuples_by_type): Change type
3527 * testsuite/20_util/optional/84601.cc: Include <utility>.
3528 * testsuite/20_util/specialized_algorithms/uninitialized_fill/constrained.cc:
3530 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
3531 Adjust dg-error line numbers.
3532 * testsuite/std/ranges/access/cbegin.cc: Include <utility>.
3533 * testsuite/std/ranges/access/cend.cc: Likewise.
3534 * testsuite/std/ranges/access/end.cc: Likewise.
3535 * testsuite/std/ranges/single_view.cc: Likewise.
3537 2021-07-23 Jonathan Wakely <jwakely@redhat.com>
3539 * include/std/future: Include <bits/atomic_base.h> instead of
3542 2021-07-23 Jonathan Wakely <jwakely@redhat.com>
3544 * include/bits/stl_relops.h: Update documentation comments.
3546 2021-07-22 Jonathan Wakely <jwakely@redhat.com>
3549 * include/bits/hashtable.h (_Hashtable): Replace mixin with
3550 _Enable_default_ctor. Construct it explicitly in all
3551 non-forwarding, non-defaulted constructors.
3552 * testsuite/23_containers/unordered_map/cons/default.cc: Check
3553 non-default constructors can be used.
3554 * testsuite/23_containers/unordered_set/cons/default.cc:
3557 2021-07-22 David Edelsohn <dje.gcc@gmail.com>
3559 * config/os/aix/os_defines.h (__LIBC_NO_CPP_MATH_OVERLOADS__): Define.
3561 2021-07-22 Jonathan Wakely <jwakely@redhat.com>
3564 * include/ext/new_allocator.h (_GLIBCXX_OPERATOR_NEW)
3565 (_GLIBCXX_OPERATOR_DELETE, _GLIBCXX_SIZED_DEALLOC): Define.
3566 (allocator::allocate, allocator::deallocate): Use new macros.
3568 2021-07-22 Jonathan Wakely <jwakely@redhat.com>
3571 * include/bits/ranges_uninitialized.h (_DestroyGuard): Change
3572 constructor parameter to reference and use addressof.
3573 * testsuite/util/testsuite_iterators.h: Define deleted operator&
3574 overloads for test iterators.
3576 2021-07-22 Jonathan Wakely <jwakely@redhat.com>
3578 * include/bits/std_function.h (_Function_base): Add
3579 default member initializers and define constructor as defaulted.
3580 (function::_M_invoker): Add default member initializer.
3582 2021-07-22 Jonathan Wakely <jwakely@redhat.com>
3585 * doc/xml/manual/debug_mode.xml: Update documentation about
3586 debug capability of std::array.
3587 * doc/html/*: Regenerate.
3588 * include/debug/array: New file.
3590 2021-07-21 Jonathan Wakely <jwakely@redhat.com>
3593 * include/ext/rope (sequence_buffer): Add move constructor and
3594 move assignment operator.
3595 * testsuite/ext/rope/101542.cc: New test.
3597 2021-07-20 Jonathan Wakely <jwakely@redhat.com>
3600 * src/c++17/fs_ops.cc (fs::create_directories): Use status
3601 instead of symlink_status.
3602 * src/filesystem/ops.cc (fs::create_directories): Likewise.
3603 * testsuite/27_io/filesystem/operations/create_directories.cc:
3604 Check symlink to existing directory.
3605 * testsuite/27_io/filesystem/operations/create_directory.cc: Do
3606 not test with symlinks on Windows.
3607 * testsuite/experimental/filesystem/operations/create_directories.cc:
3608 Check symlink to existing directory.
3609 * testsuite/experimental/filesystem/operations/create_directory.cc:
3610 Do not test with symlinks on Windows.
3612 2021-07-20 Jonathan Wakely <jwakely@redhat.com>
3615 * include/bits/hashtable.h (_Hashtable): Conditionally delete
3616 default constructor by deriving from _Enable_special_members.
3617 * testsuite/23_containers/unordered_map/cons/default.cc: New test.
3618 * testsuite/23_containers/unordered_set/cons/default.cc: New test.
3620 2021-07-20 Jonathan Wakely <jwakely@redhat.com>
3623 * src/c++17/fs_ops.cc (create_dir): Adjust whitespace.
3624 * testsuite/27_io/filesystem/operations/create_directory.cc:
3625 Test creating directory with name of existing symlink to
3627 * testsuite/experimental/filesystem/operations/create_directory.cc:
3630 2021-07-16 Jonathan Wakely <jwakely@redhat.com>
3632 * include/std/tuple (get<I>): Add deleted overload for bad
3634 * testsuite/20_util/tuple/element_access/get_neg.cc: Adjust
3637 2021-07-16 Jonathan Wakely <jwakely@redhat.com>
3639 * include/bits/max_size_type.h (numeric_limits<__max_size_type>):
3640 Use __int_traits unconditionally.
3642 2021-07-16 Jonathan Wakely <jwakely@redhat.com>
3644 * include/bits/random.h (_Shift::__value): Use constexpr.
3645 (_Select_uint_least_t::type): Use using-declaration.
3647 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
3650 2021-07-16 Jonathan Wakely <jwakely@redhat.com>
3652 * include/bits/cpp_type_traits.h (__INT_N): Use __extension__
3653 instead of diagnostic pragmas.
3654 * include/bits/functional_hash.h: Likewise.
3655 * include/bits/iterator_concepts.h (__is_signed_int128)
3656 (__is_unsigned_int128): Likewise.
3657 * include/bits/max_size_type.h (__max_size_type): Likewise.
3658 (numeric_limits<__max_size_type>): Likewise.
3659 * include/bits/std_abs.h (abs): Likewise.
3660 * include/bits/stl_algobase.h (__size_to_integer): Likewise.
3661 * include/bits/uniform_int_dist.h (uniform_int_distribution):
3663 * include/ext/numeric_traits.h (_GLIBCXX_INT_N_TRAITS):
3665 * include/std/type_traits (__is_integral_helper<INT_N>)
3666 (__is_signed_integer, __is_unsigned_integer)
3667 (__make_unsigned<INT_N>, __make_signed<INT_N>): Likewise.
3668 * include/std/limits (__INT_N): Add __extension__ keyword.
3669 * include/bits/random.h (_Select_uint_least_t)
3670 (random_device): Likewise.
3672 2021-07-16 Patrick Palka <ppalka@redhat.com>
3675 * include/std/ranges (_CachedPosition::_M_get): For non-forward
3676 ranges, just call __builtin_unreachable.
3677 * testsuite/std/ranges/istream_view.cc (test05): New test.
3679 2021-07-16 Patrick Palka <ppalka@redhat.com>
3682 * include/std/ranges (split_view::split_view): Use std::move.
3683 (split_view::_Iterator::_Iterator): Remove redundant
3684 default_initializable constraint.
3685 (split_view::_Sentinel::_Sentinel): Declare.
3686 * testsuite/std/ranges/adaptors/split.cc (test02): New test.
3688 2021-07-16 Marek Polacek <polacek@redhat.com>
3690 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Add
3693 2021-07-16 Jonathan Wakely <jwakely@redhat.com>
3695 * include/bits/unique_ptr.h: Adjust doxygen markup.
3697 2021-07-16 Jonathan Wakely <jwakely@redhat.com>
3700 * include/std/type_traits: Adjust doxygen markup.
3702 2021-07-16 Jonathan Wakely <jwakely@redhat.com>
3704 * include/bits/cpp_type_traits.h: Add diagnostic pragmas around
3705 uses of non-standard integer types.
3706 * include/bits/functional_hash.h: Likewise.
3707 * include/bits/iterator_concepts.h: Likewise.
3708 * include/bits/max_size_type.h: Likewise.
3709 * include/bits/std_abs.h: Likewise.
3710 * include/bits/stl_algobase.h: Likewise.
3711 * include/bits/uniform_int_dist.h: Likewise.
3712 * include/ext/numeric_traits.h: Likewise.
3713 * include/std/type_traits: Likewise.
3715 2021-07-15 Jonathan Wakely <jwakely@redhat.com>
3718 * include/std/tuple (tuple_element): Improve static_assert text.
3719 (__get_helper): Add deleted overload.
3720 (get<i>(tuple<T...>&&), get<i>(const tuple<T...>&&)): Use
3721 __get_helper directly.
3722 (__get_helper2): Remove.
3723 (__find_uniq_type_in_pack): New constexpr helper function.
3724 (get<T>): Use __find_uniq_type_in_pack and __get_helper instead
3726 * testsuite/20_util/tuple/element_access/get_neg.cc: Adjust
3728 * testsuite/20_util/tuple/element_access/101427.cc: New test.
3730 2021-07-15 Jonathan Wakely <jwakely@redhat.com>
3733 * include/bits/c++config (__replacement_assert): Add noexcept.
3734 [!_GLIBCXX_VERBOSE] (__glibcxx_assert_impl): Use __builtin_abort
3735 instead of __replacement_assert.
3737 2021-07-14 Jonathan Wakely <jwakely@redhat.com>
3739 * include/std/string_view (basic_string_view(It, End)): Add
3741 * testsuite/21_strings/basic_string_view/cons/char/range.cc:
3742 Check noexcept-specifier. Also check construction without CTAD.
3744 2021-07-13 Jonathan Wakely <jwakely@redhat.com>
3747 * include/std/string_view (ends_with): Use traits_type::compare
3750 2021-07-13 Jonathan Wakely <jwakely@redhat.com>
3752 * include/std/string_view: Only include <bits/ranges_base.h>
3753 once, and only for C++20 and later.
3755 2021-07-12 Jonathan Wakely <jwakely@redhat.com>
3758 * include/std/span (as_writable_bytes): Add requires-clause.
3759 * testsuite/23_containers/span/101411.cc: New test.
3761 2021-07-09 Matheus Castanho <msc@linux.ibm.com>
3763 * include/std/mutex (__lock_impl): Check
3764 _GLIBCXX_HAS_GTHREADS before using __gthread_yield.
3766 2021-07-02 Jonathan Wakely <jwakely@redhat.com>
3769 * include/bits/unique_ptr.h (unique_ptr<T[],D>::operator[]):
3770 Remove noexcept-specifier.
3771 (unique_ptr<T[],D>::_S_nothrow_deref): Remove.
3772 * testsuite/20_util/unique_ptr/lwg2762.cc: Remove checks for
3775 2021-07-01 Jonathan Wakely <jwakely@redhat.com>
3777 * doc/doxygen/doxygroups.cc: Fix docs for std::literals.
3778 * doc/doxygen/user.cfg.in: Exclude the Networking TS header.
3779 Add some more predefined macros.
3780 * include/bits/fs_fwd.h: Move @addtogroup commands inside
3781 namespaces. Add better documentation.
3782 * include/bits/fs_path.h: Likewise.
3783 * include/experimental/bits/fs_fwd.h: Likewise.
3784 * include/experimental/bits/fs_path.h: Likewise.
3785 * include/ext/throw_allocator.h: Fix typo and improve docs.
3786 * include/std/chrono: Move @addtogroup commands.
3787 * include/std/system_error: Move @addtogroup commands.
3788 * libsupc++/exception: Improve documentation.
3789 * libsupc++/exception.h: Add @since documentation.
3791 2021-06-30 Jonathan Wakely <jwakely@redhat.com>
3794 * doc/doxygen/user.cfg.in (INPUT): Add <experimental/simd>.
3795 (COLS_IN_ALPHA_INDEX): Remove obsolete tag.
3796 (PREDEFINED): Add/fix some more macros that need to be expanded.
3797 * include/bits/random.h: Stop Doxygen from documenting internal
3798 implementation details.
3799 * include/bits/random.tcc: Likewise.
3800 * include/bits/this_thread_sleep.h: Fix @file name.
3801 * include/experimental/bits/simd.h: Add to Doxygen group. Do not
3802 document internal implementation details.
3803 * include/experimental/bits/simd_detail.h: Do not document
3804 internal implementation details.
3805 * include/experimental/simd: Define Doxygen groups.
3806 * include/experimental/type_traits: Improve documentation for
3807 the header file. Define groups. Use @since commands.
3808 * include/std/scoped_allocator (scoped_allocator_adaptor): Move
3809 declaration before undocumented region.
3810 * include/std/type_traits (true_type, false_type): Use using
3811 declaration instead of typedef.
3812 (is_invocable_v, is_nothrow_invocable_v, is_invocable_r_v)
3813 (is_nothrow_invocable_r_v): Move definitions next to other C++17
3815 Do not document internal implementation details. Move misplaced
3816 group-end command. Define group for variable templates.
3817 * include/std/variant: Do not document internal implementation
3819 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
3822 2021-06-30 Jonathan Wakely <jwakely@redhat.com>
3824 * include/experimental/simd: Do not define anything pre-C++17.
3826 2021-06-30 Jonathan Wakely <jwakely@redhat.com>
3828 * include/bits/random.tcc [__cpp_inline_variables]: Remove
3829 redundant definitions of static constexpr member variables.
3830 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
3833 2021-06-28 Jonathan Wakely <jwakely@redhat.com>
3835 * include/bits/streambuf.tcc (__copy_streambufs_eof): Remove
3836 explicit instantiation declarations.
3837 * src/c++11/streambuf-inst.cc (__copy_streambufs_eof): Remove
3838 explicit instantiation definitions.
3840 2021-06-28 Jonathan Wakely <jwakely@redhat.com>
3843 * testsuite/17_intro/names.cc: Fix #if condition for names used
3846 2021-06-28 Jonathan Wakely <jwakely@redhat.com>
3849 * include/bits/unique_ptr.h (unique_ptr<T[], D>::operator[]):
3850 Fail gracefully if element_type is incomplete.
3851 * testsuite/20_util/unique_ptr/cons/incomplete.cc: Clarify that
3852 the standard doesn't require this test to work for array types.
3853 * testsuite/20_util/unique_ptr/lwg2762.cc: Check that incomplete
3854 types can be used with array specialization.
3855 * testsuite/20_util/unique_ptr/101236.cc: New test.
3857 2021-06-28 Jonathan Wakely <jwakely@redhat.com>
3859 * doc/xml/manual/intro.xml: Document LWG 415 change.
3860 * doc/html/manual/bugs.html: Regenerate.
3861 * include/bits/istream.tcc (ws): Create sentry and catch
3863 * testsuite/27_io/basic_istream/ws/char/lwg415.cc: New test.
3864 * testsuite/27_io/basic_istream/ws/wchar_t/lwg415.cc: New test.
3866 2021-06-25 Jonathan Wakely <jwakely@redhat.com>
3868 * include/bits/ostream.tcc (basic_ostream::write): Call sputn
3869 directly instead of using _M_write. Do setstate(__err) all
3870 outside the try-catch block.
3871 * include/std/ostream (basic_ostream::_M_write): Declare
3872 private. Use __ostream_insert. Do not define for the versioned
3875 2021-06-25 Jonathan Wakely <jwakely@redhat.com>
3877 * doc/xml/manual/intro.xml: Document LWG 581 change.
3878 * doc/html/manual/bugs.html: Regenerate.
3879 * include/bits/basic_ios.tcc: Whitespace.
3880 * include/bits/ostream.tcc (basic_ostream::flush()): Construct
3882 * testsuite/27_io/basic_ostream/flush/char/2.cc: Check
3884 * testsuite/27_io/basic_ostream/flush/char/exceptions_badbit_throw.cc:
3886 * testsuite/27_io/basic_ostream/flush/wchar_t/2.cc: Likewise.
3887 * testsuite/27_io/basic_ostream/flush/wchar_t/exceptions_badbit_throw.cc:
3890 2021-06-25 Jonathan Wakely <jwakely@redhat.com>
3892 * include/bits/ostream.tcc (sentry): Only set failbit if badbit
3893 is set, not if eofbit is set.
3894 (tellp, seekp, seekp): Create sentry object. Do not set badbit
3896 * testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc:
3897 Adjust expected behaviour.
3898 * testsuite/27_io/basic_ostream/seekp/wchar_t/exceptions_badbit_throw.cc:
3900 * testsuite/27_io/basic_ostream/tellp/char/exceptions_badbit_throw.cc:
3902 * testsuite/27_io/basic_ostream/tellp/wchar_t/exceptions_badbit_throw.cc:
3904 * testsuite/27_io/basic_ostream/seekp/char/n3168.cc: New test.
3905 * testsuite/27_io/basic_ostream/seekp/wchar_t/n3168.cc: New test.
3906 * testsuite/27_io/basic_ostream/tellp/char/n3168.cc: New test.
3907 * testsuite/27_io/basic_ostream/tellp/wchar_t/n3168.cc: New test.
3909 2021-06-25 Jonathan Wakely <jwakely@redhat.com>
3911 * include/std/syncstream (basic_syncbuf::swap()): Remove
3912 noexcept, as per LWG 3498.
3914 2021-06-25 Jonathan Wakely <jwakely@redhat.com>
3917 * testsuite/17_intro/names.cc: Undef more names for newlib and
3918 also for arm-none-linux-gnueabi.
3919 * testsuite/experimental/names.cc: Disable PCH.
3921 2021-06-25 Matthias Kretz <m.kretz@gsi.de>
3923 * include/experimental/bits/simd.h (__bit_cast): Implement via
3924 __builtin_bit_cast #if available.
3925 (__proposed::simd_bit_cast): Add overloads for simd and
3926 simd_mask, which use __builtin_bit_cast (or __bit_cast #if not
3927 available), which return an object of the requested type with
3928 the same bits as the argument.
3929 * include/experimental/bits/simd_math.h: Use simd_bit_cast
3930 instead of __bit_cast to allow casts to fixed_size_simd.
3931 (copysign): Remove branch that was only required if __bit_cast
3932 cannot be constexpr.
3933 * testsuite/experimental/simd/tests/bits/test_values.h: Switch
3934 from __bit_cast to __proposed::simd_bit_cast since the former
3935 will not cast fixed_size objects anymore.
3937 2021-06-24 Matthias Kretz <m.kretz@gsi.de>
3939 * include/experimental/bits/simd_math.h
3940 (_GLIBCXX_SIMD_MATH_CALL2_): Rename arg2_ to __arg2.
3941 (_GLIBCXX_SIMD_MATH_CALL3_): Rename arg2_ to __arg2 and arg3_ to
3944 2021-06-24 Matthias Kretz <m.kretz@gsi.de>
3946 * include/experimental/bits/simd.h (__execute_on_index_sequence)
3947 (__execute_on_index_sequence_with_return)
3948 (__call_with_n_evaluations, __call_with_subscripts): Add flatten
3951 2021-06-24 Matthias Kretz <m.kretz@gsi.de>
3953 * include/experimental/bits/simd_x86.h (_S_trunc, _S_floor)
3954 (_S_ceil): Set bit 8 (_MM_FROUND_NO_EXC) on AVX and SSE4.1
3957 2021-06-24 Matthias Kretz <m.kretz@gsi.de>
3959 * include/experimental/bits/simd_x86.h (_S_ldexp): The AVX512F
3960 implementation doesn't require a _VecBltnBtmsk ABI tag, it
3961 requires either a 64-Byte input (in which case AVX512F must be
3962 available) or AVX512VL.
3964 2021-06-24 Matthias Kretz <m.kretz@gsi.de>
3966 * include/experimental/bits/simd_math.h: Undefine internal
3968 (frexp): Move #if to a more sensible position and reformat
3970 (logb): Call _SimdImpl::_S_logb for fixed_size instead of
3971 duplicating the code here.
3972 (modf): Simplify condition.
3974 2021-06-24 Matthias Kretz <m.kretz@gsi.de>
3976 * include/experimental/bits/simd_math.h (fabs): Remove
3977 fabs(simd<integral>) overload.
3979 2021-06-24 Matthias Kretz <m.kretz@gsi.de>
3981 * include/experimental/bits/simd_converter.h
3982 (_SimdConverter::operator()): Pass _SimdTuple by const-ref.
3983 * include/experimental/bits/simd_fixed_size.h
3984 (_GLIBCXX_SIMD_FIXED_OP): Pass binary operator _SimdTuple
3985 arguments by const-ref.
3986 (_S_masked_unary): Pass _SimdTuple by const-ref.
3988 2021-06-24 Matthias Kretz <m.kretz@gsi.de>
3990 * include/experimental/bits/simd_fixed_size.h
3991 (_AbisInSimdTuple): Removed.
3993 2021-06-24 Matthias Kretz <m.kretz@gsi.de>
3995 * include/experimental/bits/simd.h: Add missing operator~
3996 overload for simd<floating-point> to __float_bitwise_operators.
3997 * include/experimental/bits/simd_builtin.h
3998 (_SimdImplBuiltin::_S_complement): Bitcast to int (and back) to
3999 implement complement for floating-point vectors.
4000 * include/experimental/bits/simd_fixed_size.h
4001 (_SimdImplFixedSize::_S_copysign): New function, forwarding to
4002 copysign implementation of _SimdTuple members.
4003 * include/experimental/bits/simd_math.h (copysign): Call
4004 _SimdImpl::_S_copysign for fixed_size arguments. Simplify
4005 generic copysign implementation using the new ~ operator.
4007 2021-06-24 Jonathan Wakely <jwakely@redhat.com>
4009 * testsuite/experimental/simd/README.md: Fix typos.
4011 2021-06-24 Jonathan Wakely <jwakely@redhat.com>
4013 * include/bits/shared_ptr_base.h (__shared_ptr_access::operator[]):
4015 * include/bits/unique_ptr.h (unique_ptr::operator*): Add
4016 conditional noexcept as per LWG 2762.
4017 * testsuite/20_util/shared_ptr/observers/array.cc: Check that
4018 dereferencing cannot throw.
4019 * testsuite/20_util/shared_ptr/observers/get.cc: Likewise.
4020 * testsuite/20_util/optional/observers/lwg2762.cc: New test.
4021 * testsuite/20_util/unique_ptr/lwg2762.cc: New test.
4023 2021-06-23 Patrick Palka <ppalka@redhat.com>
4026 * testsuite/23_containers/multiset/cons/deduction.cc:
4027 Uncomment CTAD example that was rejected by this bug.
4028 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
4030 2021-06-23 Jonathan Wakely <jwakely@redhat.com>
4032 * include/std/chrono (chrono::year::is_leap()): Fix incorrect
4035 2021-06-23 Matthias Kretz <m.kretz@gsi.de>
4037 * testsuite/experimental/simd/README.md: New file.
4039 2021-06-23 Matthias Kretz <m.kretz@gsi.de>
4041 * testsuite/experimental/simd/driver.sh: Rewrite output
4042 verbosity logic. Add -p/--percentage option. Allow -v/--verbose
4043 to be used twice. Add -x and -o short options. Parse long
4044 options with = instead of separating space generically. Parce
4045 contracted short options. Make unrecognized options an error.
4046 If same-line output is active, trap on EXIT to increment the
4047 progress (only with --percentage), erase the line and print the
4049 * testsuite/experimental/simd/generate_makefile.sh: Initialize
4050 helper files for progress account keeping. Update help target
4051 for changes to DRIVEROPTS.
4053 2021-06-23 Matthias Kretz <m.kretz@gsi.de>
4055 * testsuite/Makefile.am (check-simd): Remove -fno-tree-vrp flag
4056 and associated warning.
4057 * testsuite/Makefile.in: Regenerate.
4059 2021-06-23 Cassio Neri <cassio.neri@gmail.com>
4060 Jonathan Wakely <jwakely@redhat.com>
4061 Ulrich Drepper <drepper@redhat.com>
4063 * include/std/chrono (chrono::year::is_leap()): Optimize.
4065 2021-06-23 Patrick Palka <ppalka@redhat.com>
4068 * testsuite/23_containers/map/cons/deduction.cc: Replace ambiguous
4070 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4071 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
4072 Mention one of the replaced examples is broken due to PR101174.
4073 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
4074 * testsuite/23_containers/unordered_map/cons/deduction.cc: Replace
4075 ambiguous CTAD examples.
4076 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
4078 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
4080 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
4082 2021-06-23 Jonathan Wakely <jwakely@redhat.com>
4084 * include/std/mutex (__detail::__try_lock_impl): Rename
4085 parameter to avoid clashing with newlib's __lockable macro.
4086 (try_lock): Add 'inline' specifier.
4087 * testsuite/17_intro/names.cc: Add check for __lockable.
4088 * testsuite/30_threads/try_lock/5.cc: Add options for pthreads.
4090 2021-06-22 Jonathan Wakely <jwakely@redhat.com>
4091 Matthias Kretz <m.kretz@gsi.de>
4093 * include/std/mutex (lock): Replace recursion with iteration
4094 when lockables all have the same type.
4095 (__detail::__try_lock_impl): Likewise. Pass lockables as
4096 parameters, instead of a tuple. Always lock the first one, and
4097 recurse for the rest.
4098 (__detail::__lock_impl): Adjust call to __try_lock_impl.
4099 (__detail::__try_to_lock): Remove.
4100 * testsuite/30_threads/lock/3.cc: Check that mutexes are locked.
4101 * testsuite/30_threads/lock/4.cc: Also test non-heterogeneous
4103 * testsuite/30_threads/unique_lock/cons/60497.cc: Also check
4105 * testsuite/30_threads/try_lock/5.cc: New test.
4107 2021-06-22 Jonathan Wakely <jwakely@redhat.com>
4109 * include/std/memory (declare_reachable, undeclare_reachable)
4110 (declare_no_pointers, undeclare_no_pointers, get_pointer_safety)
4111 (pointer_safety): Only define for C++11 to C++20 inclusive.
4112 * testsuite/20_util/pointer_safety/1.cc: Do not run for C++23.
4114 2021-06-22 Jonathan Wakely <jwakely@redhat.com>
4116 * include/bits/random.h (seed_seq): Constrain initializer-list
4118 * include/bits/random.tcc (seed_seq): Add template parameter.
4119 * testsuite/26_numerics/random/seed_seq/cons/default.cc: Check
4121 * testsuite/26_numerics/random/seed_seq/cons/initlist.cc: Check
4124 2021-06-22 Thomas Rodgers <rodgert@appliantology.com>
4127 * include/bits/semaphore_base.h (__atomic_semaphore::_M_release):
4128 Force _M_release() to wake all waiting threads.
4129 * testsuite/30_threads/semaphore/100806.cc: New test.
4131 2021-06-21 Jonathan Wakely <jwakely@redhat.com>
4133 * include/std/mutex (__try_to_lock): Move to __detail namespace.
4134 (struct __try_lock_impl): Replace with ...
4135 (__detail::__try_lock_impl<Idx>(tuple<Lockables...>&)): New
4136 function templates to implement std::try_lock.
4137 (try_lock): Use new __try_lock_impl.
4138 (__detail::__lock_impl(int, int&, L0&, L1&...)): New function
4139 template to implement std::lock.
4140 (lock): Use __lock_impl.
4142 2021-06-21 Patrick Palka <ppalka@redhat.com>
4144 * include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value.
4146 2021-06-20 Patrick Palka <ppalka@redhat.com>
4148 * include/std/ranges (__non_propagating_cache::operator bool):
4149 Define for split_view::begin().
4150 (split_view): Define as per P2210.
4151 (views::__detail::__can_split_view): Define.
4152 (views::_Split, views::split): Define.
4153 * testsuite/std/ranges/adaptors/100577.cc (test01, test02):
4155 * testsuite/std/ranges/adaptors/split.cc: New test.
4156 * testsuite/std/ranges/p2325.cc (test08a): New test.
4157 * testsuite/std/ranges/p2367.cc (test01): Test views::split.
4159 2021-06-20 Patrick Palka <ppalka@redhat.com>
4161 * include/std/ranges: Rename views::split to views::lazy_split,
4162 split_view to lazy_split_view, etc. throughout.
4163 * testsuite/std/ranges/*: Likewise.
4164 * testsuite/std/ranges/adaptors/lazy_split.cc: New file.
4165 * testsuite/std/ranges/adaptors/lazy_split_neg.cc: New file.
4167 2021-06-20 Patrick Palka <ppalka@redhat.com>
4169 * include/std/ranges (split_view::_OuterIter::__at_end):
4170 Check _M_trailing_empty.
4171 (split_view::_OuterIter::_M_trailing_empty): Define this
4173 (split_view::_OuterIter::operator++): Set _M_trailing_empty
4175 (split_view::_OuterIter::operator==): Compare
4177 * testsuite/std/ranges/adaptors/100479.cc (test03): Expect two
4178 split parts instead of one.
4179 * testsuite/std/ranges/adaptors/split.cc (test11): New test.
4181 2021-06-20 Patrick Palka <ppalka@redhat.com>
4183 * include/std/ranges (split_view::_InnerIter::base): Define as
4186 2021-06-19 Patrick Palka <ppalka@redhat.com>
4188 * include/std/ranges (transform_view::_Iterator::_S_iter_concept):
4189 Consider _Base instead of _Vp as per LWG 3555.
4190 (elements_view::_Iterator::_S_iter_concept): Likewise.
4192 2021-06-19 Patrick Palka <ppalka@redhat.com>
4194 * include/std/ranges (split_view::_OuterIter::value_type::begin):
4195 Remove the non-const overload, and remove the copyable constraint
4196 on the const overload as per LWG 3553.
4198 2021-06-19 Patrick Palka <ppalka@redhat.com>
4200 * include/bits/stl_iterator.h
4201 (__detail::__common_iter_use_postfix_proxy): Add
4202 move_constructible constraint as per LWG 3546.
4203 (common_iterator::__postfix_proxy): Adjust initializer of
4204 _M_keep as per LWG 3546.
4206 2021-06-18 Patrick Palka <ppalka@redhat.com>
4209 * include/bits/ranges_algo.h (__minmax_fn::operator()): Rewrite
4210 to limit comparison complexity to 3*N/2.
4211 (__minmax_element_fn::operator()): Likewise.
4212 (shift_right): Avoid premature std::move of __result.
4213 * testsuite/25_algorithms/minmax/constrained.cc (test04, test05):
4215 * testsuite/25_algorithms/minmax_element/constrained.cc (test02):
4218 2021-06-18 Patrick Palka <ppalka@redhat.com>
4220 * include/std/concepts (convertible_to): Just use declval as per
4223 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
4226 * include/std/numeric (reduce(Iter, Iter, T, BinaryOp)): Replace
4227 incorrect static_assert with ones matching the 'Mandates'
4228 conditions in the standard.
4229 * testsuite/26_numerics/reduce/95833.cc: New test.
4231 2021-06-18 Jonathan Wakely <jwakely@redhat.com>
4233 * testsuite/21_strings/basic_string/cons/char/1.cc: Use
4234 diagnostic pragma to suppress -Wstringop-overread error.
4236 2021-06-18 Patrick Palka <ppalka@redhat.com>
4238 * include/bits/ranges_algo.h (__find_fn, find, __find_if_fn)
4239 (find_if, __find_if_not_fn, find_if_not, _in_in_result)
4240 (__mismatch_fn, mismatch, __search_fn, search): Move to ...
4241 * include/bits/ranges_util.h: ... here.
4242 * include/std/ranges (__detail::find, __detail::find_if)
4243 (__detail::find_if_not, __detail::mismatch): Remove.
4244 (filter_view): Use ranges::find_if instead.
4245 (drop_while_view): Use ranges::find_if_not instead.
4246 (split_view): Use ranges::find and ranges::mismatch instead.
4248 2021-06-18 Patrick Palka <ppalka@redhat.com>
4250 * include/bits/iterator_concepts.h (weakly_incrementable): Remove
4251 default_initializable requirement.
4252 * include/bits/ranges_base.h (ranges::view): Likewise.
4253 * include/bits/ranges_util.h (subrange): Constrain the default
4255 * include/bits/stl_iterator.h (back_insert_iterator): Remove the
4257 (front_insert_iterator): Likewise.
4258 (insert_iterator): Likewise. Remove NSDMIs.
4259 (common_iterator): Constrain the default ctor.
4260 (counted_iterator): Likewise.
4261 * include/bits/stream_iterator.h (ostream_iterator): Remove the
4263 * include/std/ranges (__detail::__box::operator=): Handle
4264 self-assignment in the primary template.
4265 (__detail::__box): In the partial specialization: adjust
4266 constraints as per P2325. Add specialized operator= for the
4267 case when the wrapped type is not copyable. Constrain the
4268 default ctor. Avoid list-initialization.
4269 (single_view): Constraint the default ctor.
4270 (iota_view): Relax semiregular constraint to copyable.
4271 Constrain the default ctor.
4272 (iota_view::_Iterator): Constraint the default ctor.
4273 (basic_istream_view): Remove the default ctor. Remove NSDMIs.
4274 Remove redundant checks for empty _M_stream.
4275 (basic_istream_view::_Iterator): Likewise.
4276 (ref_view): Remove the default ctor. Remove NSDMIs.
4277 (ref_view::_Iterator): Constrain the default ctor.
4278 (__detail::__non_propagating_cache::operator=): Define overload
4279 for assigning from a value of the underlying type.
4280 (filter_view): Likewise.
4281 (filter_view::_Iterator): Likewise.
4282 (transform_view): Likewise.
4283 (transform_view::_Iterator): Likewise.
4284 (take_view): Likewise.
4285 (take_view::_Iterator): Likewise.
4286 (take_while_view): Likewise.
4287 (take_while_view::_Iterator): Likewise.
4288 (drop_while_view): Likewise.
4289 (drop_while_view::_Iterator): Likewise.
4290 (join_view): Likewise.
4291 (split_view::_OuterIter::__current): Adjust after changing the
4293 (split_view::_M_current): Wrap it in a __non_propagating_cache.
4294 (split_view::split_view): Constrain the default ctor.
4295 (common_view): Constrain the default ctor.
4296 (reverse_view): Likewise.
4297 (elements_view): Likewise.
4298 * include/std/span (enable_view<span<_ElementType, _Extent>>):
4299 Define this partial specialization to true unconditionally.
4300 * include/std/version (__cpp_lib_ranges): Adjust value.
4301 * testsuite/24_iterators/back_insert_iterator/constexpr.cc:
4302 Don't attempt to default construct a back_insert_iterator.
4303 * testsuite/24_iterators/front_insert_iterator/constexpr.cc:
4304 Don't attempt to default construct a front_insert_iterator.
4305 * testsuite/24_iterators/insert_iterator/constexpr.cc:
4306 Don't attempt to default construct an insert_iterator.
4307 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
4308 Remove this test for default constructibility of ostream_iterator.
4309 * testsuite/std/ranges/97600.cc: Don't attempt to default
4310 construct a basic_istream_view.
4311 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc:
4313 * testsuite/std/ranges/adaptors/detail/copyable_box.cc: ... this.
4314 (test02): Adjust now that __box is copyable-box not
4317 * testsuite/std/ranges/p2325.cc: New test.
4318 * testsuite/std/ranges/single_view.cc (test06): New test.
4319 * testsuite/std/ranges/view.cc: Adjust now that view doesn't
4320 require default_initializable.
4322 2021-06-17 Jonathan Wakely <jwakely@redhat.com>
4325 * include/bits/basic_string.h (__cpp_lib_constexpr_string): Only
4326 define when is_constant_evaluated is available.
4327 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
4329 (__constant_string_p, __constant_array_p): Remove.
4330 (char_traits): Use is_constant_evaluated directly.
4331 * include/std/version (__cpp_lib_constexpr_char_traits)
4332 (__cpp_lib_constexpr_string): Only define when
4333 is_constant_evaluated is available.
4335 2021-06-17 Patrick Palka <ppalka@redhat.com>
4338 * include/std/ranges (__adaptor::_Partial): For the "simple"
4339 forwarding partial specializations, also require that
4340 the extra arguments are trivially copyable.
4341 * testsuite/std/ranges/adaptors/100577.cc (test04): New test.
4343 2021-06-17 Patrick Palka <ppalka@redhat.com>
4346 * include/std/ranges (__adaptor::_RangeAdaptor): Document the
4347 template form of _S_has_simple_extra_args.
4348 (__adaptor::__adaptor_has_simple_extra_args): Add _Args template
4349 parameter pack. Try to treat _S_has_simple_extra_args as a
4350 variable template parameterized by _Args.
4351 (__adaptor::_Partial): Pass _Arg/_Args to the constraint
4352 __adaptor_has_simple_extra_args.
4353 (views::_Take::_S_has_simple_extra_args): Templatize according
4354 to the type of the extra argument.
4355 (views::_Drop::_S_has_simple_extra_args): Likewise.
4356 (views::_Split::_S_has_simple_extra_args): Define.
4357 * testsuite/std/ranges/adaptors/100577.cc (test01, test02):
4358 Adjust after changes to _S_has_simple_extra_args mechanism.
4361 2021-06-16 Jonathan Wakely <jwakely@redhat.com>
4363 * include/bits/iterator_concepts.h (__decay_copy): Name type.
4365 2021-06-16 Jonathan Wakely <jwakely@redhat.com>
4367 * include/bits/ranges_base.h (ranges::begin, ranges::end)
4368 (ranges::cbegin, ranges::cend, ranges::rbeing, ranges::rend)
4369 (ranges::crbegin, ranges::crend, ranges::size, ranges::ssize)
4370 (ranges::empty, ranges::data, ranges::cdata): Remove final
4371 keywords and deleted operator& overloads.
4372 * testsuite/24_iterators/customization_points/iter_move.cc: Use
4373 new is_customization_point_object function.
4374 * testsuite/24_iterators/customization_points/iter_swap.cc:
4376 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
4378 * testsuite/std/ranges/access/begin.cc: Likewise.
4379 * testsuite/std/ranges/access/cbegin.cc: Likewise.
4380 * testsuite/std/ranges/access/cdata.cc: Likewise.
4381 * testsuite/std/ranges/access/cend.cc: Likewise.
4382 * testsuite/std/ranges/access/crbegin.cc: Likewise.
4383 * testsuite/std/ranges/access/crend.cc: Likewise.
4384 * testsuite/std/ranges/access/data.cc: Likewise.
4385 * testsuite/std/ranges/access/empty.cc: Likewise.
4386 * testsuite/std/ranges/access/end.cc: Likewise.
4387 * testsuite/std/ranges/access/rbegin.cc: Likewise.
4388 * testsuite/std/ranges/access/rend.cc: Likewise.
4389 * testsuite/std/ranges/access/size.cc: Likewise.
4390 * testsuite/std/ranges/access/ssize.cc: Likewise.
4391 * testsuite/util/testsuite_iterators.h
4392 (is_customization_point_object): New function.
4394 2021-06-15 Jonathan Wakely <jwakely@redhat.com>
4396 * include/bits/ranges_base.h (ranges::begin, ranges::end)
4397 (ranges::cbegin, ranges::cend, ranges::rbeing, ranges::rend)
4398 (ranges::crbegin, ranges::crend, ranges::size, ranges::ssize)
4399 (ranges::empty, ranges::data, ranges::cdata): Make types final.
4400 Add deleted operator& overloads.
4401 (ranges::advance, ranges::distance, ranges::next, ranges::prev):
4403 * testsuite/std/ranges/headers/ranges/synopsis.cc: Replace
4404 ill-formed & expressions with using-declarations. Add checks for
4405 other function objects.
4407 2021-06-15 Jonathan Wakely <jwakely@redhat.com>
4409 * include/bits/ranges_util.h (view_interface): Add noexcept to
4410 empty, operator bool, data and size members.
4411 (subrange): Add noexcept to constructors.
4412 * include/std/ranges (single_view, ref_view): Add noexcept to
4414 (views::single, views::all): Add noexcept.
4415 * testsuite/std/ranges/adaptors/all.cc: Check noexcept.
4416 * testsuite/std/ranges/single_view.cc: Likewise.
4418 2021-06-15 Jonathan Wakely <jwakely@redhat.com>
4420 * include/bits/ranges_util.h (subrange): Add __size_type typedef
4421 and use it to simplify declarations.
4422 (subrange(i, s, n)): Remove assertion.
4423 * testsuite/std/ranges/subrange/constexpr.cc: New test.
4425 2021-06-15 Jonathan Wakely <jwakely@redhat.com>
4427 * include/bits/iterator_concepts.h (__cust_access::__decay_copy):
4428 Replace with function object.
4429 (__cust_access::__member_begin, ___cust_access::_adl_begin): Use
4430 __decay_copy unqualified.
4431 * include/bits/ranges_base.h (__member_end, __adl_end):
4432 Likewise. Use __range_iter_t for type of ranges::begin.
4433 (__member_rend): Use correct value category for rbegin argument.
4434 (__member_data): Use __decay_copy unqualified.
4435 (__begin_data): Use __range_iter_t for type of ranges::begin.
4437 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
4439 * include/bits/ranges_base.h (ranges::empty): Check whether
4440 conversion to bool can throw.
4441 * testsuite/std/ranges/access/empty.cc: Check for correct
4444 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
4447 * include/std/type_traits (__common_ref_impl<X&, Y&>): Only
4448 use the type if it's a reference.
4449 * testsuite/20_util/common_reference/100894.cc: New test.
4451 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
4453 * testsuite/experimental/filesystem/path/native/conv_c++23.cc:
4454 Add dg-require-filesystem-ts directive.
4456 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
4459 * include/std/any (any(in_place_t<T>, initializer_list<U>, A&&...))
4460 (any::emplace<T>(initializer_list<U>, A&&...)): Fix constraint
4462 * testsuite/20_util/any/cons/101034.cc: New test.
4464 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
4466 * testsuite/17_intro/headers/c++2017/all_attributes.cc: Add
4467 -std=gnu++17 option.
4469 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
4472 * libsupc++/compare (compare_partial_order_fallback): Add
4473 constraint using reversed parameter order, as per LWG 3465.
4474 * testsuite/18_support/comparisons/algorithms/fallback.cc:
4475 Adjust expected result.
4477 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
4479 * libsupc++/compare (__decayed_same_as): New helper concept.
4480 (strong_order, weak_order, partial_order): Constrain with new
4481 concept instead of using static_assert.
4482 (compare_strong_order_fallback, compare_weak_order_fallback)
4483 (compare_partial_order_fallback): Likewise. Do not deduce return
4484 types. Remove redundant if-constexpr checks.
4485 * testsuite/18_support/comparisons/algorithms/fallback.cc: New test.
4487 2021-06-14 Jonathan Wakely <jwakely@redhat.com>
4490 * include/std/tuple: Use reserved form of attribute name.
4491 * testsuite/17_intro/headers/c++2011/all_attributes.cc: Add
4492 check for no_unique_address.
4493 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
4495 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
4498 2021-06-11 Jonathan Wakely <jwakely@redhat.com>
4500 * include/bits/fs_path.h (operator==, operator<=>): Use new
4501 _S_compare function.
4502 (path::_S_compare): New function to call path::compare in a
4503 context where path::iterator is complete.
4504 * include/experimental/bits/fs_path.h (operator<, operator==):
4505 Define after path::iterator is complete.
4506 * testsuite/27_io/filesystem/path/native/conv_c++23.cc: New
4508 * testsuite/experimental/filesystem/path/native/conv_c++23.cc:
4511 2021-06-09 Thomas Rodgers <rodgert@appliantology.com>
4513 * testsuite/29_atomics/atomic_ref/wait_notify.cc: Guard
4514 test logic with constexpr check for is_always_lock_free.
4516 2021-06-09 Jonathan Wakely <jwakely@redhat.com>
4519 * include/std/optional (optional::operator=(const optional<U>&)):
4520 Fix value category used in is_assignable check.
4521 * testsuite/20_util/optional/assignment/100982.cc: New test.
4523 2021-06-09 Jonathan Wakely <jwakely@redhat.com>
4525 * include/bits/allocator.h (allocator::is_always_equal): Deprecate.
4526 * include/bits/iterator_concepts.h (indirectly_readable_traits):
4527 Add LWG issue number to comment.
4528 * include/std/memory_resource (polymorphic_allocator::release):
4530 * testsuite/20_util/allocator/requirements/typedefs.cc: Add
4531 dg-warning for deprecation. Also check std::allocator<void>.
4533 2021-06-08 Thomas Rodgers <rodgert@appliantology.com>
4536 * include/bits/atomic_base.h (atomic_ref<_Tp*>::wait):
4537 Change parameter type from _Tp to _Tp*.
4538 * testsuite/29_atomics/atomic_ref/wait_notify.cc: Extend
4539 coverage of types tested.
4541 2021-06-08 Thomas Rodgers <rodgert@appliantology.com>
4543 * include/std/barrier (__tree_barrier::_M_arrive): Remove
4544 unnecessary hasher instantiation.
4546 2021-06-08 Jonathan Wakely <jwakely@redhat.com>
4548 * include/experimental/propagate_const (swap): Constrain.
4549 * testsuite/experimental/propagate_const/swap/lwg3413.cc: New test.
4551 2021-06-07 Avi Kivity <avi@scylladb.com>
4554 * include/std/ranges (elements_view::__iter_cat::_S_iter_cat):
4555 Add missing typename.
4557 2021-06-07 Jonathan Wakely <jwakely@redhat.com>
4560 * include/std/optional (operator<=>(const optional<T>& const U&)):
4561 Add missing constraint and add workaround for template
4563 * testsuite/20_util/optional/relops/three_way.cc: Check that
4564 type without equality comparison cannot be compared when wrapped
4567 2021-06-05 Jonathan Wakely <jwakely@redhat.com>
4570 * include/bits/ranges_base.h (_SSize): Return signed type.
4571 * testsuite/std/ranges/access/ssize.cc: Check with __int128.
4573 2021-06-04 Jonathan Wakely <jwakely@redhat.com>
4575 * include/bits/ranges_base.h (_SSize): Return the result of
4576 ranges::size converted to the wider of make-signed-like-t<S> and
4577 ptrdiff_t, rather than the ranges different type.
4578 * testsuite/std/ranges/access/ssize.cc: Adjust expected result
4579 for an iota_view that uses an integer class type for its
4582 2021-06-04 Jonathan Wakely <jwakely@redhat.com>
4585 * include/bits/ranges_base.h (__member_data): Use __decay_copy.
4586 * testsuite/std/ranges/access/data.cc: Add testcase from PR.
4588 2021-06-04 Jonathan Wakely <jwakely@redhat.com>
4591 * include/bits/iterator_concepts.h (__detail::__decay_copy)
4592 (__detail::__member_begin, __detail::__adl_begin): Move to
4593 namespace ranges::__cust_access.
4594 (__detail::__ranges_begin): Likewise, and rename to __begin.
4595 Remove redundant static assertion.
4596 * include/bits/ranges_base.h (_Begin, _End, _RBegin, _REnd):
4597 Use lvalue in noexcept specifier.
4598 (__as_const): Add non-deduced parameter for value category.
4599 (_CBegin, _CEnd, _CRBegin, _CREnd, _CData): Adjust uses of
4601 (__member_size, __adl_size, __member_empty, __size0_empty):
4602 (__eq_iter_empty, __adl_data): Use lvalue objects in
4604 (__sentinel_size): Likewise. Add check for conversion to
4606 (__member_data): Allow non-lvalue types to satisfy the concept,
4607 but use lvalue object in requirements.
4608 (_Size, _SSize): Remove forwarding to always use an lvalue.
4609 (_Data): Likewise. Add static assertion for arrays.
4610 * testsuite/std/ranges/access/cdata.cc: Adjust expected
4611 behaviour for rvalues. Add negative tests for ill-formed
4613 * testsuite/std/ranges/access/data.cc: Likewise.
4614 * testsuite/std/ranges/access/empty.cc: Adjust expected
4615 behaviour for rvalues.
4616 * testsuite/std/ranges/access/size.cc: Likewise.
4618 2021-06-04 Tim Adye <Tim.Adye@cern.ch>
4620 * include/std/any (any::_Manager::_S_access): New static
4621 function to access the contained value.
4622 (any::emplace, __any_caster): Use _S_access member of the
4625 2021-06-04 Jonathan Wakely <jwakely@redhat.com>
4627 * doc/xml/manual/status_cxx2020.xml:
4628 * doc/html/*: Regenerate.
4629 * include/bits/hashtable.h (__cpp_lib_generic_unordered_lookup):
4631 * include/std/version (__cpp_lib_generic_unordered_lookup):
4633 * testsuite/23_containers/unordered_map/operations/1.cc: Check
4635 * testsuite/23_containers/unordered_set/operations/1.cc:
4638 2021-06-03 Patrick Palka <ppalka@redhat.com>
4640 * include/bits/ranges_algo.h (__detail::__can_reread_output):
4641 Factor out this concept from ...
4642 (__unique_copy_fn::operator()): ... here. Use the concept
4644 * testsuite/std/ranges/range.cc: Remove now ill-formed use
4645 of range_value_t on an output_range.
4646 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper):
4647 Define value_type, pointer and reference member types to void.
4649 2021-06-03 Patrick Palka <ppalka@redhat.com>
4652 * include/std/ranges (_RangeAdaptorClosure): Document
4653 _S_has_simple_call_op mechanism.
4654 (_RangeAdaptor): Document _S_has_simple_extra_args mechanism.
4655 (__closure_has_simple_call_op): New concept.
4656 (__adaptor_has_simple_extra_args): Likewise.
4657 (_Partial<_Adaptor, _Args...>): New partial specialization.
4658 (_Partial<_Adaptor, _Arg>): Likewise.
4659 (_Pipe<_Lhs, _Rhs>): Likewise.
4660 (views::_All::_S_has_simple_call_op): Define to true.
4661 (views::_Filter::_S_has_simple_extra_args): Likewise.
4662 (views::_Transform::_S_has_simple_extra_args): Likewise.
4663 (views::_Take::_S_has_simple_extra_args): Likewise.
4664 (views::_TakeWhile::_S_has_simple_extra_args): Likewise.
4665 (views::_Drop::_S_has_simple_extra_args): Likewise.
4666 (views::_DropWhile::_S_has_simple_extra_args): Likewise.
4667 (views::_Join::_S_has_simple_call_op): Likewise.
4668 (views::_Split): Document why we don't define
4669 _S_has_simple_extra_args to true for this adaptor.
4670 (views::_Common::_S_has_simple_call_op): Define to true.
4671 (views::_Reverse::_S_has_simple_call_op): Likewise.
4672 (views::_Elements::_S_has_simple_call_op): Likewise.
4673 * testsuite/std/ranges/adaptors/100577.cc: New test.
4675 2021-06-02 Jonathan Wakely <jwakely@redhat.com>
4679 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper):
4680 Value-initialize subobject.
4681 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
4683 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
4686 2021-06-02 Jonathan Wakely <jwakely@redhat.com>
4689 * testsuite/23_containers/unordered_map/96088.cc: Adjust
4690 expected number of allocations.
4691 * testsuite/23_containers/unordered_set/96088.cc: Likewise.
4693 2021-06-02 Jonathan Wakely <jwakely@redhat.com>
4695 * doc/xml/manual/status_cxxis29124.xml: Improve punctuation.
4696 * doc/xml/manual/status_cxxtr1.xml: Likewise.
4697 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
4698 * doc/html/*: Regenerate.
4700 2021-06-01 Patrick Palka <ppalka@redhat.com>
4703 * testsuite/23_containers/deque/allocator/default_init.cc,
4704 testsuite/23_containers/forward_list/allocator/default_init.cc,
4705 testsuite/23_containers/list/allocator/default_init.cc,
4706 testsuite/23_containers/map/allocator/default_init.cc,
4707 testsuite/23_containers/set/allocator/default_init.cc,
4708 testsuite/23_containers/vector/allocator/default_init.cc,
4709 testsuite/23_containers/vector/bool/allocator/default_init.cc:
4712 2021-06-01 Jonathan Wakely <jwakely@redhat.com>
4714 * testsuite/23_containers/unordered_map/96088.cc: Change
4715 effective target to c++17.
4716 * testsuite/23_containers/unordered_set/96088.cc: Likewise.
4718 2021-06-01 Jonathan Wakely <jwakely@redhat.com>
4720 * testsuite/22_locale/ctype/is/string/89728_neg.cc: Only test
4721 isblank for C++11 and later.
4723 2021-06-01 Jonathan Wakely <jwakely@redhat.com>
4726 * include/bits/ranges_base.h (ranges::advance(iter, n, sentinel)):
4727 Fix return value for no-op case.
4728 * testsuite/24_iterators/range_operations/advance.cc: Test
4729 return values of three-argument overload.
4731 2021-06-01 Jonathan Wakely <jwakely@redhat.com>
4734 * python/Makefile.am: Use archive name for printer hook if no
4735 dynamic library name is available.
4736 * python/Makefile.in: Regenerate.
4738 2021-05-30 Gerald Pfeifer <gerald@pfeifer.com>
4740 * doc/xml/manual/abi.xml: Remove dead reference to "Intel
4741 Compilers for Linux: Compatibility with GNU Compilers" article.
4742 * doc/html/manual/abi.html: Regenerate.
4744 2021-05-26 François Dumont <fdumont@gcc.gnu.org>
4746 * include/debug/formatter.h
4747 (_Error_formatter::_Parameter::_Named): New.
4748 (_Error_formatter::_Parameter::_Type): Inherit latter.
4749 (_Error_formatter::_Parameter::_M_integer): Likewise.
4750 (_Error_formatter::_Parameter::_M_string): Likewise.
4751 * src/c++11/debug.cc: Include <cstring>.
4752 (_Print_func_t): New.
4753 (print_raw(PrintContext&, const char*, ptrdiff_t)): New.
4754 (print_word): Use '%.*s' format in fprintf to render only expected number of chars.
4755 (pretty_print(PrintContext&, const char*, _Print_func_t)): New.
4756 (print_type): Rename in...
4757 (print_type_info): ...this. Use pretty_print.
4758 (print_address, print_integer): New.
4759 (print_named_name, print_iterator_constness, print_iterator_state): New.
4760 (print_iterator_seq_type): New.
4761 (print_named_field, print_type_field, print_instance_field, print_iterator_field): New.
4762 (print_field): Use latters.
4763 (print_quoted_named_name, print_type_type, print_type, print_instance): New.
4764 (print_string(PrintContext&, const char*, const _Parameter*, size_t)):
4765 Change signature to...
4766 (print_string(PrintContext&, const char*, ptrdiff_t, const _Parameter*, size_t)):
4767 ...this and adapt. Remove intermediate buffer to render input string.
4768 (print_string(PrintContext&, const char*, ptrdiff_t)): New.
4770 2021-05-26 Jonathan Wakely <jwakely@redhat.com>
4773 * include/bits/ranges_base.h (advance, distance, next, prev):
4774 Replace function templates with function objects.
4775 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc:
4776 Adjust for changes to function objects.
4777 * testsuite/std/ranges/adaptors/elements.cc: Add using
4778 declarations for names from namespace ranges.
4779 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
4780 * testsuite/24_iterators/range_operations/100768.cc: New test.
4782 2021-05-24 François Dumont <fdumont@gcc.gnu.org>
4785 * include/bits/hashtable_policy.h (_Select2nd): New.
4786 (_NodeBuilder<>): New.
4787 (_ReuseOrAllocNode<>::operator()): Use variadic template args.
4788 (_AllocNode<>::operator()): Likewise.
4789 * include/bits/hashtable.h
4790 (_Hashtable<>::__node_builder_t): New.
4791 (_Hashtable<>::_M_insert_unique<>(_Kt&&, _Arg&&, const _NodeGenerator&)):
4793 (_Hashtable<>::_S_forward_key): New.
4794 (_Hashtable<>::_M_insert): Use latter.
4795 (_Hashtable<>::_M_insert(const_iterator, _Arg&&, const _NodeGenerator&, false_type)):
4796 Instantiate node first, compute hash code second.
4797 * testsuite/23_containers/unordered_map/96088.cc: New test.
4798 * testsuite/23_containers/unordered_multimap/96088.cc: New test.
4799 * testsuite/23_containers/unordered_multiset/96088.cc: New test.
4800 * testsuite/23_containers/unordered_set/96088.cc: New test.
4801 * testsuite/util/replacement_memory_operators.h
4802 (counter::_M_increment): New.
4803 (counter::_M_decrement): New.
4804 (counter::reset()): New.
4806 2021-05-24 Patrick Palka <ppalka@redhat.com>
4809 * include/std/ranges (__detail::__non_propagating_cache): Move
4810 definition up to before that of _CachedPosition. Make base
4811 class _Optional_base protected instead of private. Add const
4812 overload for operator*.
4813 (__detail::_CachedPosition): Rewrite the partial specialization
4814 for forward ranges as a derived class of __non_propagating_cache.
4815 Remove the size constraint on the partial specialization for
4816 random access ranges. Add copy/move/copy-assignment/move-assignment
4817 members to the offset partial specialization for random
4818 access ranges that propagate the cached value but additionally
4819 invalidate it in the source object on move.
4820 * testsuite/std/ranges/adaptors/100479.cc: New test.
4822 2021-05-24 Jonathan Wakely <jwakely@redhat.com>
4824 * testsuite/25_algorithms/inplace_merge/constrained.cc: Qualify
4825 call to ranges::next.
4826 * testsuite/25_algorithms/is_sorted/constrained.cc: Likewise.
4827 * testsuite/25_algorithms/is_sorted_until/constrained.cc:
4829 * testsuite/25_algorithms/swap_ranges/1.cc: Qualify call to
4832 2021-05-21 Patrick Palka <ppalka@redhat.com>
4835 * include/std/ranges (drop_while_view::begin): Assert the
4836 precondition added by LWG 3490.
4838 2021-05-21 Patrick Palka <ppalka@redhat.com>
4841 * include/std/ranges (iota_view::_Sentinel::_M_distance_from):
4842 Split out this member function from ...
4843 (iota_view::_Sentinel::operator-): ... here, for sake of access
4845 * testsuite/std/ranges/iota/iota_view.cc (test05): New test.
4847 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
4849 * include/bits/random.tcc (__representable_as_double)
4850 (__p1_representable_as_double): Add "" to static asserts.
4852 2021-05-20 Jonathan Wakely <jwakely@redhat.com>
4855 * include/bits/c++config (__glibcxx_assert_1): Rename to ...
4856 (__glibcxx_constexpr_assert): ... this.
4857 (__glibcxx_assert_impl): Use __glibcxx_constexpr_assert.
4858 (__glibcxx_assert): Define as either __glibcxx_constexpr_assert
4859 or __glibcxx_assert_impl.
4860 (__glibcxx_assert_2): Remove
4861 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): Use
4862 __glibcxx_constexpr_assert instead of __glibcxx_assert_1.
4863 * testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
4864 Adjust expected error.
4865 * testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc:
4867 * testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
4870 * testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
4872 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc:
4874 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
4876 * testsuite/23_containers/span/back_neg.cc: Likewise.
4877 * testsuite/23_containers/span/front_neg.cc: Likewise.
4878 * testsuite/23_containers/span/index_op_neg.cc: Likewise.
4880 2021-05-20 Patrick Palka <ppalka@redhat.com>
4883 * include/bits/stl_iterator.h (reverse_iterator::difference_type):
4884 In C++20 mode, define in terms of iter_difference_t as per P0896R4.
4885 (reverse_iterator::reference): Likewise, but with iter_reference_t.
4886 (reverse_iterator::value_type): Likewise, but with iter_value_t.
4887 * testsuite/std/ranges/adaptors/reverse.cc (test08): New test.
4888 * testsuite/24_iterators/reverse_iterator/100639.cc: New test.
4890 2021-05-20 Joern Rennecke <joern.rennecke@riscy-ip.com>
4893 * include/std/charconv (to_chars): Hide the overloads for
4894 floating-point types for 16 bit targets.
4895 * src/c++17/floating_to_chars.cc: Don't compile for 16 bit targets.
4896 * testsuite/20_util/to_chars/double.cc: Run this test only on
4898 * testsuite/20_util/to_chars/float.cc: Likewise.
4899 * testsuite/20_util/to_chars/long_double.cc: Likewise.
4901 2021-05-18 Patrick Palka <ppalka@redhat.com>
4904 * include/std/ranges (elements_view::_Sentinel::operator-): Use
4905 _M_distance_from in the other operator- overload too.
4906 * testsuite/std/ranges/adaptors/elements.cc (test06): Augment test.
4908 2021-05-18 Thomas Schwinge <thomas@codesourcery.com>
4910 * testsuite/lib/prune.exp: Add note about 'dg-note'.
4912 2021-05-18 Patrick Palka <ppalka@redhat.com>
4915 * include/std/ranges (__box::__box): Use non-list-initialization
4916 in member initializer list of in-place constructor of the
4917 partial specialization for semiregular types.
4918 (__box::operator->): Use std::__addressof.
4919 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc
4921 * testsuite/std/ranges/single_view.cc (test04): New test.
4923 2021-05-18 Patrick Palka <ppalka@redhat.com>
4926 * include/std/ranges (reverse_view::_S_needs_cached_begin):
4927 Set to true if the underlying non-common random-access range
4928 doesn't have a sized sentinel.
4930 2021-05-18 Patrick Palka <ppalka@redhat.com>
4933 * include/std/ranges (elements_view::_Iterator): Also befriend
4935 (elements_view::_Sentinel::_M_equal): Templatize.
4936 (elements_view::_Sentinel::_M_distance_from): Split out from ...
4937 (elements_view::_Sentinel::operator-): ... here. Depend on
4938 _Base2 instead of _Base in the return type.
4939 * testsuite/std/ranges/adaptors/elements.cc (test06, test07):
4942 2021-05-17 Thomas Rodgers <rodgert@twrodgers.com>
4944 * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): loop
4945 until value change observed.
4946 (__waiter_base::_M_laundered): New member.
4947 (__waiter_base::_M_notify): Check _M_laundered to determine
4948 whether to wake one or all.
4949 (__detail::__atomic_compare): Return true if call to
4950 __builtin_memcmp() == 0.
4951 (__waiter_base::_S_do_spin_v): Adjust predicate.
4952 * testsuite/29_atomics/atomic/wait_notify/100334.cc: New
4955 2021-05-17 Jonathan Wakely <jwakely@redhat.com>
4958 * include/experimental/bits/fs_path.h (__is_constructible_from):
4959 Test construction from a const lvalue, not an rvalue.
4960 * testsuite/27_io/filesystem/path/construct/100630.cc: New test.
4961 * testsuite/experimental/filesystem/path/construct/100630.cc:
4964 2021-05-17 Antony Polukhin <antoshkka@gmail.com>
4967 * include/bits/locale_facets.h (ctype<basic_string<C,T,A>>):
4968 Declare (but do not define) partial specialization.
4969 * testsuite/22_locale/ctype/is/string/89728_neg.cc: New test.
4971 2021-05-17 Jonathan Wakely <jwakely@redhat.com>
4973 * include/std/thread (jthread::_S_create): Fix static assert
4975 * testsuite/30_threads/jthread/95989.cc: Re-enable test.
4976 * testsuite/30_threads/jthread/jthread.cc: Do not require
4977 pthread effective target.
4978 * testsuite/30_threads/jthread/2.cc: Moved to...
4979 * testsuite/30_threads/jthread/version.cc: ...here.
4981 2021-05-17 Jonathan Wakely <jwakely@redhat.com>
4983 * doc/Makefile.am: Simplify doxygen recipes and use --latex_cmd.
4984 * doc/Makefile.in: Regenerate.
4985 * doc/doxygen/user.cfg.in (LATEX_CMD_NAME): Add placeholder
4987 * scripts/run_doxygen (print_usage): Always print to stdout and
4989 (fail): New function for exiting on error.
4990 (parse_options): Handle --latex_cmd. Do not treat --help the
4991 same as errors. Simplify handling of required arguments.
4993 2021-05-12 Jonathan Wakely <jwakely@redhat.com>
4995 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc:
4996 Increase dg-timeout-factor to 4. Fix -Wunused-parameter
4997 warnings. Replace bitwise AND with logical AND in loop
4999 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc:
5000 Replace bitwise AND with logical AND in loop condition.
5001 * testsuite/util/pstl/test_utils.h: Remove unused parameter
5004 2021-05-11 Patrick Palka <ppalka@redhat.com>
5006 * src/c++17/ryu/LOCAL_PATCHES: Update.
5007 * src/c++17/ryu/ryu_generic_128.h: Remove extern "C".
5008 Remove declarations for never-defined functions.
5009 * testsuite/20_util/to_chars/4.cc: New test.
5011 2021-05-11 Jonathan Wakely <jwakely@redhat.com>
5013 * testsuite/20_util/headers/memory/synopsis.cc: Define C++98
5014 alternative for macro.
5015 * testsuite/20_util/shared_ptr/creation/99006.cc: Add effective
5017 * testsuite/25_algorithms/copy/debug/99402.cc: Avoid C++11
5020 2021-05-11 Jonathan Wakely <jwakely@redhat.com>
5022 * include/bits/allocator.h (allocator<void>) [C++20]: Add
5023 missing noexcept to constructor. Restore missing POCMA and
5024 is_always_equal_traits.
5025 [C++17]: Make construct and destroy members private and
5026 declare allocator_traits as a friend.
5027 * include/bits/memoryfwd.h (allocator_traits): Declare.
5028 * include/ext/malloc_allocator.h (malloc_allocator::allocate):
5029 Add nodiscard attribute. Add static assertion for LWG 3307.
5030 * include/ext/new_allocator.h (new_allocator::allocate): Add
5031 static assertion for LWG 3307.
5032 * testsuite/20_util/allocator/void.cc: Check that converting
5033 constructor is noexcept. Check for propagation traits and
5034 size_type and difference_type. Check that pointer and
5035 const_pointer are gone in C++20.
5037 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
5039 * include/std/stop_token: Remove TODO comment.
5041 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
5043 * include/bits/shared_ptr_base.h (__shared_count(unique_ptr&&)):
5044 Initialize a non-reference deleter from an rvalue, as per LWG
5046 (__shared_ptr::_UniqCompatible): Add missing constraint.
5047 * testsuite/20_util/shared_ptr/cons/lwg3548.cc: New test.
5048 * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc: Check
5051 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
5053 * testsuite/17_intro/headers/c++2017/all_attributes.cc: Remove
5054 -std=gnu++17 from dg-options directive.
5055 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
5057 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
5059 * testsuite/17_intro/headers/c++2017/operator_names.cc:
5061 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: Likewise.
5062 * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
5063 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
5065 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: Likewise.
5066 * testsuite/18_support/byte/81076.cc: Likewise.
5067 * testsuite/18_support/byte/global_neg.cc: Likewise.
5068 * testsuite/18_support/byte/ops.cc: Likewise.
5069 * testsuite/18_support/byte/requirements.cc: Likewise.
5070 * testsuite/18_support/headers/cfloat/values_c++17.cc: Likewise.
5071 * testsuite/18_support/launder/1.cc: Likewise.
5072 * testsuite/18_support/launder/nodiscard.cc: Likewise.
5073 * testsuite/18_support/launder/requirements.cc: Likewise.
5074 * testsuite/18_support/launder/requirements_neg.cc: Likewise.
5075 * testsuite/18_support/new_aligned.cc: Likewise.
5076 * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
5078 * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
5080 * testsuite/19_diagnostics/error_condition/hash.cc: Likewise.
5081 * testsuite/20_util/addressof/requirements/constexpr.cc:
5083 * testsuite/20_util/as_const/1.cc: Likewise.
5084 * testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
5085 * testsuite/20_util/bind/83427.cc: Likewise.
5086 * testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
5087 * testsuite/20_util/bool_constant/requirements.cc: Likewise.
5088 * testsuite/20_util/duration/arithmetic/constexpr_c++17.cc:
5090 * testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
5092 * testsuite/20_util/duration_cast/rounding.cc: Likewise.
5093 * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
5095 * testsuite/20_util/from_chars/1_neg.cc: Likewise.
5096 * testsuite/20_util/from_chars/requirements.cc: Likewise.
5097 * testsuite/20_util/function/91456.cc: Likewise.
5098 * testsuite/20_util/function/cons/deduction.cc: Likewise.
5099 * testsuite/20_util/function_objects/83607.cc: Likewise.
5100 * testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
5101 * testsuite/20_util/function_objects/mem_fn/80478.cc: Likewise.
5102 * testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
5103 * testsuite/20_util/function_objects/not_fn/87538.cc: Likewise.
5104 * testsuite/20_util/has_unique_object_representations/requirements/explicit_instantiation.cc:
5106 * testsuite/20_util/has_unique_object_representations/requirements/typedefs.cc:
5108 * testsuite/20_util/has_unique_object_representations/value.cc:
5110 * testsuite/20_util/hash/nullptr.cc: Likewise.
5111 * testsuite/20_util/in_place/requirements.cc: Likewise.
5112 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise.
5113 * testsuite/20_util/is_aggregate/requirements/explicit_instantiation.cc:
5115 * testsuite/20_util/is_aggregate/requirements/typedefs.cc:
5117 * testsuite/20_util/is_aggregate/value.cc: Likewise.
5118 * testsuite/20_util/is_invocable/83395.cc: Likewise.
5119 * testsuite/20_util/is_invocable/91456.cc: Likewise.
5120 * testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
5122 * testsuite/20_util/is_invocable/requirements/typedefs.cc:
5124 * testsuite/20_util/is_invocable/value.cc: Likewise.
5125 * testsuite/20_util/is_literal_type/deprecated-1z.cc: Likewise.
5126 * testsuite/20_util/is_nothrow_constructible/94003.cc: Likewise.
5127 * testsuite/20_util/is_nothrow_invocable/83395.cc: Likewise.
5128 * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
5130 * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc: Likewise.
5131 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
5132 * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
5134 * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
5136 * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
5137 * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
5139 * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
5141 * testsuite/20_util/is_nothrow_swappable_with/value.cc:
5143 * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
5145 * testsuite/20_util/is_swappable/requirements/typedefs.cc:
5147 * testsuite/20_util/is_swappable/value.cc: Likewise.
5148 * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
5150 * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
5152 * testsuite/20_util/is_swappable_with/value.cc: Likewise.
5153 * testsuite/20_util/logical_traits/83134.cc: Likewise.
5154 * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
5156 * testsuite/20_util/logical_traits/requirements/typedefs.cc:
5158 * testsuite/20_util/logical_traits/value.cc: Likewise.
5159 * testsuite/20_util/pair/cons/deduction.cc: Likewise.
5160 * testsuite/20_util/pair/swap_cxx17.cc: Likewise.
5161 * testsuite/20_util/ratio/requirements/ratio_equal_v.cc:
5163 * testsuite/20_util/reference_wrapper/83427.cc: Likewise.
5164 * testsuite/20_util/reference_wrapper/deduction.cc: Likewise.
5165 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
5166 * testsuite/20_util/shared_ptr/cons/deduction.cc: Likewise.
5167 * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
5169 * testsuite/20_util/time_point/arithmetic/constexpr.cc:
5171 * testsuite/20_util/time_point_cast/rounding.cc: Likewise.
5172 * testsuite/20_util/to_chars/3.cc: Likewise.
5173 * testsuite/20_util/to_chars/chars_format.cc: Likewise.
5174 * testsuite/20_util/to_chars/lwg3266.cc: Likewise.
5175 * testsuite/20_util/to_chars/requirements.cc: Likewise.
5176 * testsuite/20_util/tuple/78939.cc: Likewise.
5177 * testsuite/20_util/tuple/apply/1.cc: Likewise.
5178 * testsuite/20_util/tuple/apply/2.cc: Likewise.
5179 * testsuite/20_util/tuple/cons/deduction.cc: Likewise.
5180 * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
5181 * testsuite/20_util/tuple/make_from_tuple/2.cc: Likewise.
5182 * testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
5183 * testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
5184 * testsuite/20_util/unique_ptr/cons/deduction_neg.cc: Likewise.
5185 * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
5187 * testsuite/20_util/variable_templates_for_traits.cc: Likewise.
5188 * testsuite/20_util/void_t/1.cc: Likewise.
5189 * testsuite/20_util/weak_ptr/cons/deduction.cc: Likewise.
5190 * testsuite/24_iterators/container_access.cc: Likewise.
5191 * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
5193 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
5195 * testsuite/24_iterators/range_access/range_access_cpp17.cc:
5197 * testsuite/24_iterators/range_access/range_access_cpp17_neg.cc:
5199 * testsuite/26_numerics/gcd/gcd_neg.cc: Likewise.
5200 * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
5202 * testsuite/26_numerics/headers/cmath/hypot.cc: Likewise.
5203 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
5205 * testsuite/26_numerics/lcm/1.cc: Likewise.
5206 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
5207 * testsuite/26_numerics/valarray/deduction.cc: Likewise.
5208 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
5210 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc:
5212 * testsuite/27_io/manipulators/standard/wchar_t/quoted_sv.cc:
5214 * testsuite/27_io/types/4.cc: Likewise.
5215 * testsuite/28_regex/basic_regex/ctors/deduction.cc: Likewise.
5216 * testsuite/libstdc++-prettyprinters/91997.cc: Likewise.
5217 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
5219 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
5221 * testsuite/20_util/function_objects/searchers.cc: Remove
5222 -std=gnu++17 from dg-options directive.
5223 * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
5225 * testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc:
5227 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
5229 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94831.cc:
5231 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
5233 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
5235 * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
5237 * testsuite/25_algorithms/clamp/1.cc: Likewise.
5238 * testsuite/25_algorithms/clamp/2.cc: Likewise.
5239 * testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
5240 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
5242 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
5244 * testsuite/25_algorithms/for_each/for_each_n.cc: Likewise.
5245 * testsuite/25_algorithms/for_each/for_each_n_debug.cc:
5247 * testsuite/25_algorithms/sample/1.cc: Likewise.
5248 * testsuite/25_algorithms/sample/2.cc: Likewise.
5249 * testsuite/25_algorithms/sample/3.cc: Likewise.
5250 * testsuite/25_algorithms/sample/81221.cc: Likewise.
5251 * testsuite/25_algorithms/search/searcher.cc: Likewise.
5252 * testsuite/26_numerics/exclusive_scan/1.cc: Likewise.
5253 * testsuite/26_numerics/inclusive_scan/1.cc: Likewise.
5254 * testsuite/26_numerics/reduce/1.cc: Likewise.
5255 * testsuite/26_numerics/reduce/2.cc: Likewise.
5256 * testsuite/26_numerics/transform_exclusive_scan/1.cc: Likewise.
5257 * testsuite/26_numerics/transform_inclusive_scan/1.cc: Likewise.
5258 * testsuite/26_numerics/transform_reduce/1.cc: Likewise.
5260 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
5262 * testsuite/23_containers/array/cons/deduction.cc: Remove
5263 -std=gnu++17 from dg-options directive.
5264 * testsuite/23_containers/array/cons/deduction_neg.cc: Likewise.
5265 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
5267 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
5269 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
5271 * testsuite/23_containers/deque/cons/deduction.cc: Likewise.
5272 * testsuite/23_containers/deque/modifiers/emplace/cxx17_return.cc:
5274 * testsuite/23_containers/forward_list/cons/deduction.cc:
5276 * testsuite/23_containers/forward_list/modifiers/emplace_cxx17_return.cc:
5278 * testsuite/23_containers/list/cons/deduction.cc: Likewise.
5279 * testsuite/23_containers/list/modifiers/emplace/cxx17_return.cc:
5281 * testsuite/23_containers/map/cons/deduction.cc: Likewise.
5282 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
5283 * testsuite/23_containers/map/modifiers/insert/83226.cc:
5285 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
5287 * testsuite/23_containers/map/modifiers/merge.cc: Likewise.
5288 * testsuite/23_containers/map/modifiers/try_emplace/1.cc:
5290 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
5291 * testsuite/23_containers/multimap/modifiers/extract.cc:
5293 * testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
5294 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
5295 * testsuite/23_containers/multiset/modifiers/extract.cc:
5297 * testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
5298 * testsuite/23_containers/priority_queue/deduction.cc: Likewise.
5299 * testsuite/23_containers/queue/deduction.cc: Likewise.
5300 * testsuite/23_containers/queue/members/emplace_cxx17_return.cc:
5302 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
5303 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
5304 * testsuite/23_containers/set/modifiers/merge.cc: Likewise.
5305 * testsuite/23_containers/set/modifiers/node_swap.cc: Likewise.
5306 * testsuite/23_containers/stack/deduction.cc: Likewise.
5307 * testsuite/23_containers/stack/members/emplace_cxx17_return.cc:
5309 * testsuite/23_containers/unordered_map/cons/deduction.cc:
5311 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
5313 * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
5315 * testsuite/23_containers/unordered_map/modifiers/merge.cc:
5317 * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
5319 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
5321 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
5323 * testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
5325 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
5327 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
5329 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
5331 * testsuite/23_containers/unordered_set/cons/deduction.cc:
5333 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
5335 * testsuite/23_containers/unordered_set/modifiers/merge.cc:
5337 * testsuite/23_containers/vector/bool/emplace_cxx17_return.cc:
5339 * testsuite/23_containers/vector/cons/89164_c++17.cc: Likewise.
5340 * testsuite/23_containers/vector/cons/deduction.cc: Likewise.
5341 * testsuite/23_containers/vector/modifiers/emplace/cxx17_return.cc:
5344 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
5346 * testsuite/21_strings/basic_string/79162.cc: Remove
5347 -std=gnu++17 from dg-options directive.
5348 * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
5349 * testsuite/21_strings/basic_string/cons/char/79162.cc:
5351 * testsuite/21_strings/basic_string/cons/char/86138.cc:
5353 * testsuite/21_strings/basic_string/cons/char/9.cc: Likewise.
5354 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
5356 * testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc:
5358 * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
5359 * testsuite/21_strings/basic_string/cons/wchar_t/79162.cc:
5361 * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc:
5363 * testsuite/21_strings/basic_string/cons/wchar_t/9.cc: Likewise.
5364 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
5366 * testsuite/21_strings/basic_string/cons/wchar_t/moveable2_c++17.cc:
5368 * testsuite/21_strings/basic_string/hash/hash.cc: Likewise.
5369 * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
5370 * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
5371 * testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
5373 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
5375 * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
5377 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
5379 * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
5381 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
5383 * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
5385 * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
5387 * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
5389 * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
5391 * testsuite/21_strings/basic_string/operations/data/char/2.cc:
5393 * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
5395 * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
5397 * testsuite/21_strings/basic_string/operations/find/char/5.cc:
5399 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
5401 * testsuite/21_strings/basic_string/operators/char/5.cc:
5403 * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
5405 * testsuite/21_strings/basic_string_view/capacity/1.cc:
5407 * testsuite/21_strings/basic_string_view/capacity/empty_neg.cc:
5409 * testsuite/21_strings/basic_string_view/cons/char/1.cc:
5411 * testsuite/21_strings/basic_string_view/cons/char/2.cc:
5413 * testsuite/21_strings/basic_string_view/cons/char/3.cc:
5415 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
5417 * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
5419 * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
5421 * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
5423 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
5425 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
5427 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
5429 * testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
5431 * testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc:
5433 * testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc:
5435 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
5437 * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
5439 * testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc:
5441 * testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
5443 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
5445 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
5447 * testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
5449 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc:
5451 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc:
5453 * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
5455 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
5457 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
5459 * testsuite/21_strings/basic_string_view/include.cc: Likewise.
5460 * testsuite/21_strings/basic_string_view/inserters/94051.cc:
5462 * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
5464 * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
5466 * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
5468 * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
5470 * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
5472 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
5474 * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
5476 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
5478 * testsuite/21_strings/basic_string_view/literals/types.cc:
5480 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
5482 * testsuite/21_strings/basic_string_view/literals/values.cc:
5484 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
5486 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
5488 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
5490 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
5492 * testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc:
5494 * testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc:
5496 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
5498 * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
5500 * testsuite/21_strings/basic_string_view/operations/compare/char/2.cc:
5502 * testsuite/21_strings/basic_string_view/operations/compare/char/70483.cc:
5504 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc:
5506 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
5508 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
5510 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/2.cc:
5512 * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
5514 * testsuite/21_strings/basic_string_view/operations/copy/char/2.cc:
5516 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
5518 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/2.cc:
5520 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
5522 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
5524 * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
5526 * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
5528 * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
5530 * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
5532 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc:
5534 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
5536 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
5538 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
5540 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
5542 * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
5544 * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
5546 * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
5548 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc:
5550 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
5552 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
5554 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
5556 * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
5558 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
5560 * testsuite/21_strings/basic_string_view/operations/substr/char/83511.cc:
5562 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
5564 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/83511.cc:
5566 * testsuite/21_strings/basic_string_view/operators/char/2.cc:
5568 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
5570 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
5572 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
5574 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
5576 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
5578 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
5580 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
5582 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
5584 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
5586 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
5588 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
5590 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
5592 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
5594 * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
5595 * testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
5596 * testsuite/21_strings/char_traits/requirements/char/99181.cc:
5598 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
5600 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
5602 * testsuite/20_util/memory_resource/1.cc: Remove -std=gnu++17
5603 from dg-options directive.
5604 * testsuite/20_util/memory_resource/2.cc: Likewise.
5605 * testsuite/20_util/monotonic_buffer_resource/1.cc: Likewise.
5606 * testsuite/20_util/monotonic_buffer_resource/93208.cc:
5608 * testsuite/20_util/monotonic_buffer_resource/allocate.cc:
5610 * testsuite/20_util/monotonic_buffer_resource/deallocate.cc:
5612 * testsuite/20_util/monotonic_buffer_resource/release.cc:
5614 * testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc:
5616 * testsuite/20_util/polymorphic_allocator/1.cc: Likewise.
5617 * testsuite/20_util/polymorphic_allocator/construct_pair.cc:
5619 * testsuite/20_util/polymorphic_allocator/resource.cc: Likewise.
5620 * testsuite/20_util/polymorphic_allocator/select.cc: Likewise.
5621 * testsuite/20_util/synchronized_pool_resource/allocate.cc:
5623 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
5625 * testsuite/20_util/synchronized_pool_resource/cons.cc:
5627 * testsuite/20_util/synchronized_pool_resource/cons_single.cc:
5629 * testsuite/20_util/synchronized_pool_resource/is_equal.cc:
5631 * testsuite/20_util/synchronized_pool_resource/multithreaded.cc:
5633 * testsuite/20_util/synchronized_pool_resource/options.cc:
5635 * testsuite/20_util/synchronized_pool_resource/release.cc:
5637 * testsuite/20_util/synchronized_pool_resource/release_single.cc:
5639 * testsuite/20_util/unsynchronized_pool_resource/allocate-max-chunks.cc:
5641 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
5643 * testsuite/20_util/unsynchronized_pool_resource/cons.cc:
5645 * testsuite/20_util/unsynchronized_pool_resource/is_equal.cc:
5647 * testsuite/20_util/unsynchronized_pool_resource/options.cc:
5649 * testsuite/20_util/unsynchronized_pool_resource/release.cc:
5651 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc:
5653 * testsuite/23_containers/deque/types/pmr_typedefs.cc: Likewise.
5654 * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc:
5656 * testsuite/23_containers/forward_list/pmr_typedefs.cc:
5658 * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc:
5660 * testsuite/23_containers/list/pmr_typedefs.cc: Likewise.
5661 * testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise.
5662 * testsuite/23_containers/map/pmr_typedefs.cc: Likewise.
5663 * testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise.
5664 * testsuite/23_containers/multimap/pmr_typedefs.cc: Likewise.
5665 * testsuite/23_containers/multimap/pmr_typedefs_debug.cc:
5667 * testsuite/23_containers/multiset/pmr_typedefs.cc: Likewise.
5668 * testsuite/23_containers/multiset/pmr_typedefs_debug.cc:
5670 * testsuite/23_containers/set/pmr_typedefs.cc: Likewise.
5671 * testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise.
5672 * testsuite/23_containers/unordered_map/pmr_typedefs.cc:
5674 * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc:
5676 * testsuite/23_containers/unordered_multimap/pmr_typedefs.cc:
5678 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
5680 * testsuite/23_containers/unordered_multiset/pmr_typedefs.cc:
5682 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
5684 * testsuite/23_containers/unordered_set/pmr_typedefs.cc:
5686 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc:
5688 * testsuite/23_containers/vector/pmr_typedefs.cc: Likewise.
5689 * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc:
5691 * testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
5693 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
5695 * testsuite/29_atomics/atomic/69769.cc: Remove -std=gnu++17 from
5697 * testsuite/29_atomics/atomic/is_always_lock_free.cc:
5698 * testsuite/29_atomics/atomic/requirements/typedefs.cc:
5699 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
5700 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc:
5701 * testsuite/30_threads/lock_guard/cons/deduction.cc: Likewise.
5702 * testsuite/30_threads/scoped_lock/cons/1.cc: Likewise.
5703 * testsuite/30_threads/scoped_lock/cons/deduction.cc: Likewise.
5704 * testsuite/30_threads/scoped_lock/requirements/explicit_instantiation.cc:
5706 * testsuite/30_threads/scoped_lock/requirements/typedefs.cc:
5708 * testsuite/30_threads/shared_lock/70766.cc: Likewise.
5709 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
5710 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
5712 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc: Likewise.
5713 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
5715 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
5716 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
5717 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
5718 * testsuite/30_threads/unique_lock/cons/deduction.cc: Likewise.
5720 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
5722 * testsuite/20_util/any/assign/1.cc: Remove -std=gnu++17 from
5723 dg-options directive.
5724 * testsuite/20_util/any/assign/2.cc: Likewise.
5725 * testsuite/20_util/any/assign/emplace.cc: Likewise.
5726 * testsuite/20_util/any/assign/exception.cc: Likewise.
5727 * testsuite/20_util/any/assign/self.cc: Likewise.
5728 * testsuite/20_util/any/cons/1.cc: Likewise.
5729 * testsuite/20_util/any/cons/2.cc: Likewise.
5730 * testsuite/20_util/any/cons/90415.cc: Likewise.
5731 * testsuite/20_util/any/cons/92156.cc: Likewise.
5732 * testsuite/20_util/any/cons/aligned.cc: Likewise.
5733 * testsuite/20_util/any/cons/explicit.cc: Likewise.
5734 * testsuite/20_util/any/cons/in_place.cc: Likewise.
5735 * testsuite/20_util/any/cons/nontrivial.cc: Likewise.
5736 * testsuite/20_util/any/make_any.cc: Likewise.
5737 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
5738 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise.
5739 * testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
5740 * testsuite/20_util/any/misc/swap.cc: Likewise.
5741 * testsuite/20_util/any/modifiers/1.cc: Likewise.
5742 * testsuite/20_util/any/modifiers/83658.cc: Likewise.
5743 * testsuite/20_util/any/modifiers/92156.cc: Likewise.
5744 * testsuite/20_util/any/observers/type.cc: Likewise.
5745 * testsuite/20_util/any/requirements.cc: Likewise.
5746 * testsuite/20_util/any/typedefs.cc: Likewise.
5747 * testsuite/20_util/optional/77288.cc: Likewise.
5748 * testsuite/20_util/optional/84601.cc: Likewise.
5749 * testsuite/20_util/optional/assignment/1.cc: Likewise.
5750 * testsuite/20_util/optional/assignment/2.cc: Likewise.
5751 * testsuite/20_util/optional/assignment/3.cc: Likewise.
5752 * testsuite/20_util/optional/assignment/4.cc: Likewise.
5753 * testsuite/20_util/optional/assignment/5.cc: Likewise.
5754 * testsuite/20_util/optional/assignment/6.cc: Likewise.
5755 * testsuite/20_util/optional/assignment/7.cc: Likewise.
5756 * testsuite/20_util/optional/assignment/8.cc: Likewise.
5757 * testsuite/20_util/optional/assignment/9.cc: Likewise.
5758 * testsuite/20_util/optional/bad_access.cc: Likewise.
5759 * testsuite/20_util/optional/cons/77727.cc: Likewise.
5760 * testsuite/20_util/optional/cons/85642.cc: Likewise.
5761 * testsuite/20_util/optional/cons/copy.cc: Likewise.
5762 * testsuite/20_util/optional/cons/deduction.cc: Likewise.
5763 * testsuite/20_util/optional/cons/default.cc: Likewise.
5764 * testsuite/20_util/optional/cons/move.cc: Likewise.
5765 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
5766 * testsuite/20_util/optional/cons/value.cc: Likewise.
5767 * testsuite/20_util/optional/cons/value_neg.cc: Likewise.
5768 * testsuite/20_util/optional/constexpr/cons/default.cc:
5770 * testsuite/20_util/optional/constexpr/cons/value.cc: Likewise.
5771 * testsuite/20_util/optional/constexpr/in_place.cc: Likewise.
5772 * testsuite/20_util/optional/constexpr/make_optional.cc:
5774 * testsuite/20_util/optional/constexpr/nullopt.cc: Likewise.
5775 * testsuite/20_util/optional/constexpr/observers/1.cc: Likewise.
5776 * testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
5777 * testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
5778 * testsuite/20_util/optional/constexpr/observers/4.cc: Likewise.
5779 * testsuite/20_util/optional/constexpr/observers/5.cc: Likewise.
5780 * testsuite/20_util/optional/constexpr/relops/1.cc: Likewise.
5781 * testsuite/20_util/optional/constexpr/relops/2.cc: Likewise.
5782 * testsuite/20_util/optional/constexpr/relops/3.cc: Likewise.
5783 * testsuite/20_util/optional/constexpr/relops/4.cc: Likewise.
5784 * testsuite/20_util/optional/constexpr/relops/5.cc: Likewise.
5785 * testsuite/20_util/optional/constexpr/relops/6.cc: Likewise.
5786 * testsuite/20_util/optional/hash.cc: Likewise.
5787 * testsuite/20_util/optional/in_place.cc: Likewise.
5788 * testsuite/20_util/optional/make_optional.cc: Likewise.
5789 * testsuite/20_util/optional/nullopt.cc: Likewise.
5790 * testsuite/20_util/optional/observers/1.cc: Likewise.
5791 * testsuite/20_util/optional/observers/2.cc: Likewise.
5792 * testsuite/20_util/optional/observers/3.cc: Likewise.
5793 * testsuite/20_util/optional/observers/4.cc: Likewise.
5794 * testsuite/20_util/optional/observers/5.cc: Likewise.
5795 * testsuite/20_util/optional/observers/6.cc: Likewise.
5796 * testsuite/20_util/optional/relops/1.cc: Likewise.
5797 * testsuite/20_util/optional/relops/2.cc: Likewise.
5798 * testsuite/20_util/optional/relops/3.cc: Likewise.
5799 * testsuite/20_util/optional/relops/4.cc: Likewise.
5800 * testsuite/20_util/optional/relops/5.cc: Likewise.
5801 * testsuite/20_util/optional/relops/6.cc: Likewise.
5802 * testsuite/20_util/optional/relops/7.cc: Likewise.
5803 * testsuite/20_util/optional/requirements.cc: Likewise.
5804 * testsuite/20_util/optional/swap/1.cc: Likewise.
5805 * testsuite/20_util/optional/swap/2.cc: Likewise.
5806 * testsuite/20_util/optional/typedefs.cc: Likewise.
5807 * testsuite/20_util/variant/80165.cc: Likewise.
5808 * testsuite/20_util/variant/85183.cc: Likewise.
5809 * testsuite/20_util/variant/86874.cc: Likewise.
5810 * testsuite/20_util/variant/87431.cc: Likewise.
5811 * testsuite/20_util/variant/87619.cc: Likewise.
5812 * testsuite/20_util/variant/91807.cc: Likewise.
5813 * testsuite/20_util/variant/any.cc: Likewise.
5814 * testsuite/20_util/variant/compile.cc: Likewise.
5815 * testsuite/20_util/variant/deduction.cc: Likewise.
5816 * testsuite/20_util/variant/exception_safety.cc: Likewise.
5817 * testsuite/20_util/variant/hash.cc: Likewise.
5818 * testsuite/20_util/variant/index_type.cc: Likewise.
5819 * testsuite/20_util/variant/relops/89851.cc: Likewise.
5820 * testsuite/20_util/variant/relops/90008.cc: Likewise.
5821 * testsuite/20_util/variant/run.cc: Likewise.
5822 * testsuite/20_util/variant/visit.cc: Likewise.
5824 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
5826 * testsuite/27_io/basic_filebuf/open/char/path.cc: Remove
5827 -std=gnu++17 from dg-options directive.
5828 * testsuite/27_io/basic_fstream/cons/char/path.cc: Likewise.
5829 * testsuite/27_io/basic_fstream/open/char/path.cc: Likewise.
5830 * testsuite/27_io/basic_ifstream/cons/char/path.cc: Likewise.
5831 * testsuite/27_io/basic_ifstream/open/char/path.cc: Likewise.
5832 * testsuite/27_io/basic_ofstream/cons/char/path.cc: Likewise.
5833 * testsuite/27_io/basic_ofstream/open/char/path.cc: Likewise.
5834 * testsuite/27_io/filesystem/directory_entry/86597.cc: Likewise.
5835 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc:
5837 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
5838 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
5839 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
5840 * testsuite/27_io/filesystem/iterators/91067.cc: Likewise.
5841 * testsuite/27_io/filesystem/iterators/caching.cc: Likewise.
5842 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
5844 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
5845 * testsuite/27_io/filesystem/iterators/recursion_pending.cc:
5847 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
5849 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
5850 * testsuite/27_io/filesystem/operations/all.cc: Likewise.
5851 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
5852 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
5853 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
5854 * testsuite/27_io/filesystem/operations/create_directories.cc:
5856 * testsuite/27_io/filesystem/operations/create_directory.cc:
5858 * testsuite/27_io/filesystem/operations/create_symlink.cc:
5860 * testsuite/27_io/filesystem/operations/current_path.cc:
5862 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
5863 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
5864 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
5865 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
5866 * testsuite/27_io/filesystem/operations/last_write_time.cc:
5868 * testsuite/27_io/filesystem/operations/permissions.cc:
5870 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
5871 * testsuite/27_io/filesystem/operations/read_symlink.cc:
5873 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
5874 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
5875 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
5876 * testsuite/27_io/filesystem/operations/rename.cc: Likewise.
5877 * testsuite/27_io/filesystem/operations/resize_file.cc:
5879 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
5880 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
5881 * testsuite/27_io/filesystem/operations/symlink_status.cc:
5883 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
5885 * testsuite/27_io/filesystem/operations/weakly_canonical.cc:
5887 * testsuite/27_io/filesystem/path/append/path.cc: Likewise.
5888 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
5889 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
5890 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
5891 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
5892 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
5893 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
5894 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
5895 * testsuite/27_io/filesystem/path/concat/92853.cc: Likewise.
5896 * testsuite/27_io/filesystem/path/concat/94063.cc: Likewise.
5897 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
5898 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
5899 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
5900 * testsuite/27_io/filesystem/path/construct/90281.cc: Likewise.
5901 * testsuite/27_io/filesystem/path/construct/90634.cc: Likewise.
5902 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
5903 * testsuite/27_io/filesystem/path/construct/default.cc:
5905 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
5906 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
5907 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
5908 * testsuite/27_io/filesystem/path/construct/string_view.cc:
5910 * testsuite/27_io/filesystem/path/decompose/extension.cc:
5912 * testsuite/27_io/filesystem/path/decompose/filename.cc:
5914 * testsuite/27_io/filesystem/path/decompose/parent_path.cc:
5916 * testsuite/27_io/filesystem/path/decompose/relative_path.cc:
5918 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
5920 * testsuite/27_io/filesystem/path/decompose/root_name.cc:
5922 * testsuite/27_io/filesystem/path/decompose/root_path.cc:
5924 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
5925 * testsuite/27_io/filesystem/path/factory/u8path-char8_t.cc:
5927 * testsuite/27_io/filesystem/path/factory/u8path.cc: Likewise.
5928 * testsuite/27_io/filesystem/path/generation/normal.cc:
5930 * testsuite/27_io/filesystem/path/generation/normal2.cc:
5932 * testsuite/27_io/filesystem/path/generation/proximate.cc:
5934 * testsuite/27_io/filesystem/path/generation/relative.cc:
5936 * testsuite/27_io/filesystem/path/generic/94242.cc: Likewise.
5937 * testsuite/27_io/filesystem/path/generic/generic_string.cc:
5939 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
5940 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
5941 * testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise.
5942 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
5943 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
5944 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
5945 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
5947 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
5949 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
5951 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
5953 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
5954 * testsuite/27_io/filesystem/path/native/alloc.cc: Likewise.
5955 * testsuite/27_io/filesystem/path/native/string-char8_t.cc:
5957 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
5958 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
5959 * testsuite/27_io/filesystem/path/nonmember/cmp.cc: Likewise.
5960 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
5962 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
5963 * testsuite/27_io/filesystem/path/query/empty_neg.cc:
5964 * testsuite/27_io/filesystem/path/query/has_extension.cc:
5966 * testsuite/27_io/filesystem/path/query/has_filename.cc:
5968 * testsuite/27_io/filesystem/path/query/has_parent_path.cc:
5970 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
5972 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
5974 * testsuite/27_io/filesystem/path/query/has_root_name.cc:
5976 * testsuite/27_io/filesystem/path/query/has_root_path.cc:
5978 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
5979 * testsuite/27_io/filesystem/path/query/is_absolute.cc:
5981 * testsuite/27_io/filesystem/path/query/is_relative.cc:
5983 * testsuite/experimental/filesystem/path/construct/string_view.cc:
5986 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
5988 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
5989 Remove -std=gnu++17 from dg-options.
5990 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
5992 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc:
5994 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc:
5996 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
5997 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
5999 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
6001 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc:
6003 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc:
6005 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
6007 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
6009 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
6011 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
6013 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc:
6015 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc:
6017 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
6019 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
6021 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
6023 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc:
6025 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc:
6027 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc:
6029 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
6031 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
6033 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc:
6035 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc:
6037 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc:
6039 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc:
6041 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc:
6043 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc:
6045 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc:
6047 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
6049 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc:
6051 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc:
6053 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc:
6055 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc:
6057 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
6059 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc:
6061 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
6063 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc:
6065 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc:
6067 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
6068 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc:
6070 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
6072 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc:
6074 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc:
6076 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
6078 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: Likewise.
6079 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: Likewise.
6080 * testsuite/25_algorithms/pstl/feature_test-2.cc: Likewise.
6081 * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
6082 * testsuite/25_algorithms/pstl/feature_test-4.cc: Likewise.
6083 * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
6084 * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
6085 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
6087 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
6088 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
6089 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc:
6091 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc:
6094 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
6096 * testsuite/20_util/scoped_allocator/69293_neg.cc: Add dg-error
6097 for additional errors in C++20.
6098 * testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc:
6100 * testsuite/20_util/uses_allocator/69293_neg.cc: Likewise.
6101 * testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise.
6103 2021-05-10 Jonathan Wakely <jwakely@redhat.com>
6105 * testsuite/20_util/variant/compile.cc: Rename 'any' to avoid
6106 clash with std::any.
6108 2021-05-07 Jonathan Wakely <jwakely@redhat.com>
6110 * include/std/istream (__rvalue_stream_extraction_t): Replace
6111 use of __rval_streamable.
6112 * include/std/ostream (__rvalue_stream_insertion_t): Likewise.
6113 (__rval_streamable): Remove.
6114 (_Require_derived_from_ios_base, __derived_from_ios_base): New
6115 helper for checking constraints.
6116 * testsuite/27_io/basic_istream/extractors_other/char/4.cc: Fix
6117 reference to the wrong subclause of the standard.
6118 * testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc:
6120 * testsuite/27_io/basic_ostream/inserters_other/char/6.cc:
6122 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/6.cc:
6124 * testsuite/27_io/basic_ostream/inserters_other/char/99692.cc:
6126 * testsuite/27_io/filesystem/path/io/dr2989.cc: Adjust pruned
6129 2021-05-06 Jonathan Wakely <jwakely@redhat.com>
6131 * include/bits/stl_algobase.h (__copy_move, __copy_move_backward):
6132 Improve static_assert messages.
6133 * testsuite/25_algorithms/copy/58982.cc: Adjust expected output.
6134 * testsuite/25_algorithms/copy_n/58982.cc: Likewise.
6136 2021-05-06 Patrick Palka <ppalka@redhat.com>
6138 * include/std/ranges (filter_view::_Iterator::base): Make the
6139 const& overload unconstrained and return a const reference as
6140 per LWG 3533. Make unconditionally noexcept.
6141 (transform_view::_Iterator::base): Likewise.
6142 (elements_view::_Iterator::base): Likewise.
6144 2021-05-06 Patrick Palka <ppalka@redhat.com>
6146 * include/bits/stl_iterator.h (move_iterator::base): Make the
6147 const& overload unconstrained and return a const reference as
6148 per LWG 3391. Make unconditionally noexcept.
6149 (counted_iterator::base): Likewise.
6150 * testsuite/24_iterators/move_iterator/lwg3391.cc: New test.
6151 * testsuite/24_iterators/move_iterator/move_only.cc: Adjust
6152 has_member_base concept to decay-copy the result of base().
6154 2021-05-06 Jonathan Wakely <jwakely@redhat.com>
6156 * include/std/type_traits (remove_cvref_t): Define in terms of
6158 * testsuite/20_util/remove_cvref/value.cc: Check alias.
6160 2021-05-06 Jonathan Wakely <jwakely@redhat.com>
6163 2021-05-05 Jonathan Wakely <jwakely@redhat.com>
6165 * include/std/charconv (__from_chars_alnum): Pass unsigned
6166 char to std::isdigit.
6168 2021-05-05 Patrick Palka <ppalka@redhat.com>
6170 * include/bits/ranges_util.h (enable_borrowed_range<subrange>):
6171 Remove constraints on this partial specialization.
6172 * include/std/ranges (enable_borrowed_range<iota_view>):
6175 2021-05-05 Patrick Palka <ppalka@redhat.com>
6177 * include/std/ranges (transform_view::_Iterator::iter_swap):
6178 Remove as per LWG 3520.
6179 (join_view::_Iterator::iter_swap): Add indirectly_swappable
6180 constraint as per LWG 3517.
6182 2021-05-05 Jonathan Wakely <jwakely@redhat.com>
6184 * testsuite/20_util/function_objects/invoke/3.cc: Check feature
6186 * testsuite/20_util/function_objects/invoke/version.cc: New test.
6188 2021-05-05 Jonathan Wakely <jwakely@redhat.com>
6190 * include/std/charconv (__from_chars_alnum): Pass unsigned
6191 char to std::isdigit.
6193 2021-05-05 Corentin Gay <gay@adacore.com>
6195 * acinclude.m4: Add VxWorks-specific case for the
6196 configuration of ctypes.
6197 * configure: Regenerate.
6198 * config/locale/vxworks/ctype_members.cc: Add VxWorks-specific
6200 * config/os/vxworks/ctype_base.h: Adjust for VxWorks7+.
6201 * config/os/vxworks/ctype_configure_char.cc: Likewise.
6202 * config/os/vxworks/ctype_inline.h: Likewise.
6203 * testsuite/28_regex/traits/char/isctype.cc: Defines
6204 NEWLINE_IN_CLASS_BLANK if the target is VxWorks.
6205 * testsuite/28_regex/traits/wchar_t/isctype.cc: Likewise.
6207 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
6209 * include/std/future (promise::set_value): Check for existence
6210 of shared state before dereferncing it.
6211 (promise::set_exception, promise::set_value_at_thread_exit)
6212 (promise::set_exception_at_thread_exit): Likewise.
6213 (promise<R&>::set_value, promise<R&>::set_exception)
6214 (promise<R&>::set_value_at_thread_exit)
6215 (promise<R&>::set_exception_at_thread_exit): Likewise.
6216 (promise<void>::set_value, promise<void>::set_exception)
6217 (promise<void>::set_value_at_thread_exit)
6218 (promise<void>::set_exception_at_thread_exit): Likewise.
6219 * testsuite/30_threads/promise/members/at_thread_exit2.cc:
6220 Remove unused variable.
6222 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
6224 * include/bits/basic_string.h (basic_string(const CharT*, const A&)):
6225 Do not do arithmetic on null pointer.
6227 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
6229 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp
6230 (find_key_pointer(key_const_reference, false_type))
6231 (find_key_pointer(key_const_reference, true_type)): Do not
6232 dereference null pointer.
6234 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
6236 * testsuite/20_util/from_chars/3.cc: Use unsigned type to avoid
6238 * testsuite/24_iterators/reverse_iterator/2.cc: Do not add
6239 non-zero value to null pointer.
6240 * testsuite/25_algorithms/copy_backward/move_iterators/69478.cc:
6241 Use past-the-end iterator for result.
6242 * testsuite/25_algorithms/move_backward/69478.cc: Likewise.
6243 * testsuite/25_algorithms/move_backward/93872.cc: Likewise.
6245 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
6248 * include/std/variant (__get_t): New alias template yielding the
6249 return type of std::get<N> on a variant.
6250 (__visit_result_t): New alias template yielding the result of
6252 (__same_types): Move into namespace __detail::__variant.
6253 (__check_visitor_results): Likewise. Use __invoke_result_t and
6255 (__check_visitor_result): Remove.
6256 (visit): Use __visit_result_t for return type.
6257 * testsuite/20_util/variant/100384.cc: New test.
6259 2021-05-04 Jonathan Wakely <jwakely@redhat.com>
6261 * acinclude.m4 (GLIBCXX_ENABLE_INT128_FLOAT128): Remove
6262 checks for __int128 and rename to GLIBCXX_ENABLE_FLOAT128.
6263 * config.h.in: Regenerate.
6264 * configure: Regenerate.
6265 * configure.ac: Adjust to use GLIBCXX_ENABLE_FLOAT128.
6266 * include/bits/random.h (_Select_uint_least_t<s, 1>):
6267 Use __SIZEOF_INT128__ to decide whether to use __int128.
6268 * include/std/charconv (__to_chars_unsigned_type): Likewise.
6270 2021-05-03 Gerald Pfeifer <gerald@pfeifer.com>
6272 * doc/xml/manual/ctype.xml: Move unix.org reference to https.
6273 * doc/html/manual/facets.html: Regenerate.
6275 2021-04-30 Patrick Palka <ppalka@redhat.com>
6277 * include/std/ranges (__detail::__non_propating_cache): Define
6279 (join_view): Remove constraints on the value and reference types
6280 of the wrapped iterator type as per P2328.
6281 (join_view::_Iterator::_M_satisfy): Adjust as per P2328.
6282 (join_view::_Iterator::operator++): Likewise.
6283 (join_view::_M_inner): Use __non_propating_cache as per P2328.
6284 Remove now-redundant use of __maybe_present_t.
6285 * testsuite/std/ranges/adaptors/join.cc: Include <array>.
6288 2021-04-30 Jonathan Wakely <jwakely@redhat.com>
6290 * include/bits/basic_string.h (__cpp_lib_constexpr_string):
6291 Only define for C++17 and later.
6292 * include/std/version (__cpp_lib_semaphore): Fix condition
6293 to match the one in <semaphore>.
6295 2021-04-30 Jonathan Wakely <jwakely@redhat.com>
6297 * acinclude.m4 (GLIBCXX_CHECK_INT64_T): Delete.
6298 * config.h.in: Regenerate.
6299 * configure: Regenerate.
6300 * configure.ac: Do not use GLIBCXX_CHECK_INT64_T.
6301 * include/bits/postypes.h: Remove include of <stdint.h> and
6302 definition/undefinition of the __STDC_LIMIT_MACROS and
6303 __STDC_CONSTANT_MACROS macros.
6304 (streamoff): Use __INT64_TYPE__ if defined.
6306 2021-04-30 Patrick Palka <ppalka@redhat.com>
6308 * include/std/ranges (split_view::_InnerIter::operator++):
6309 Depend on _Base instead of _Vp directly, as per LWG 3532.
6311 2021-04-30 Patrick Palka <ppalka@redhat.com>
6313 * include/bits/ranges_util.h (subrange::subrange): Avoid
6314 list-initialization in delegating constructor.
6315 * include/std/ranges (single_view): Replace implicit guide
6316 with explicit deduction guide that decays its argument.
6317 (_Single::operator()): Avoid CTAD when constructing the
6319 (_Iota::operator()): Avoid list-initialization.
6320 (__detail::__can_filter_view, _Filter::operator()): Likewise.
6321 (__detail::__can_transform_view, _Transform::operator()): Likewise.
6322 (take_view::begin): Likewise.
6323 (__detail::__can_take_view, _Take::operator()): Likewise.
6324 (__detail::__can_take_while_view, _TakeWhile::operator()): Likewise.
6325 (__detail::__can_drop_view, _Drop::operator()): Likewise.
6326 (__detail::__can_drop_while_view, _DropWhile::operator()): Likewise.
6327 (split_view::split_view): Use views::single when initializing
6329 (__detail::__can_split_view, _Split::operator()): Avoid
6330 list-initialization.
6331 (_Counted::operator()): Likewise.
6332 * testsuite/std/ranges/p2367.cc: New test.
6334 2021-04-30 Jonathan Wakely <jwakely@redhat.com>
6337 * include/bits/basic_ios.tcc (basic_ios::copyfmt): use
6339 * include/bits/basic_string.tcc (basic_string::swap)
6340 (basic_string::assign): Likewise.
6341 * include/bits/deque.tcc (deque::operator=(const deque&)):
6343 * include/bits/stl_tree.h (_Rb_tree::operator=(const * _Rb_tree&)):
6345 * include/bits/vector.tcc (vector::operator=(const vector&)):
6348 2021-04-30 Jonathan Wakely <jwakely@redhat.com>
6350 * include/std/istream (operator>>(Istream&&, x&)): Simplify, as
6352 * include/std/ostream (operator<<(Ostream&&, const x&)):
6354 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
6355 Adjust dg-error pattern.
6356 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
6358 * testsuite/27_io/basic_istream/extractors_other/char/4.cc: Define
6359 is_extractable trait to replace std::__is_extractable. Make it
6360 work with rvalue streams as well as lvalues, to replace f() and
6361 g() helper functions.
6362 * testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc:
6364 * testsuite/27_io/basic_ostream/inserters_other/char/6.cc:
6365 Define is_insertable trait to replace std::__is_insertable. Make
6366 it work with rvalue streams as well as lvalues, to replace f()
6367 and g() helper functions.
6368 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/6.cc:
6370 * testsuite/27_io/filesystem/path/io/dr2989.cc: Prune additional
6371 errors from new constraints.
6372 * testsuite/27_io/rvalue_streams-2.cc: Remove PR 80675 checks,
6373 which are no longer expected to compile.
6374 * testsuite/27_io/rvalue_streams.cc: Adjust existing test.
6375 Verify LWG 1203 changes.
6377 2021-04-30 Jonathan Wakely <jwakely@redhat.com>
6380 * include/experimental/socket (__basic_socket_impl::set_option)
6381 (__basic_socket_impl::get_option) [!_GLIBCXX_HAVE_SYS_SOCKET_H]:
6382 Just set error code.
6383 * testsuite/experimental/net/socket/socket_base.cc: CHeck
6384 for <sys/socket.h> not <socket.h>.
6386 2021-04-30 Jonathan Wakely <jwakely@redhat.com>
6391 * testsuite/experimental/net/internet/address/v4/comparisons.cc:
6392 Use new effective-target keyword.
6393 * testsuite/experimental/net/internet/address/v4/cons.cc:
6395 * testsuite/experimental/net/internet/address/v4/creation.cc:
6397 * testsuite/experimental/net/internet/address/v4/members.cc:
6399 * testsuite/experimental/net/internet/address/v6/members.cc:
6401 * testsuite/experimental/net/internet/resolver/base.cc:
6403 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
6405 * testsuite/experimental/net/internet/resolver/ops/reverse.cc:
6407 * testsuite/experimental/net/internet/socket/opt.cc:
6409 * testsuite/experimental/net/internet/tcp.cc:
6411 * testsuite/experimental/net/internet/udp.cc:
6413 * testsuite/lib/libstdc++.exp (check_effective_target_net_ts_ip):
6414 New proc to check net_ts_ip et.
6416 2021-04-28 Jonathan Wakely <jwakely@redhat.com>
6419 * testsuite/20_util/pair/requirements/structural.cc: New test.
6421 2021-04-28 Jonathan Wakely <jwakely@redhat.com>
6423 * include/bits/stl_pair.h (pair) [__cplusplus > 202002]: Add
6424 new definitions for constructors and assignment operators using
6425 concepts for constraints.
6426 * testsuite/20_util/pair/cons/99957.cc: Disable for C++20 and
6428 * testsuite/20_util/pair/cons/explicit_construct.cc: Adjust
6429 expected error messages to also match C++20 errors.
6431 2021-04-28 Jonathan Wakely <jwakely@redhat.com>
6434 * include/bits/stl_pair.h (_PCC::_MoveCopyPair, _PCC::_CopyMovePair):
6435 Combine and replace with ...
6436 (_PCC::_DeprConsPair): New SFINAE helper function.
6437 (pair): Merge preprocessor blocks so that all C++03 members
6438 are defined together at the end.
6439 (pair::pair(const _T1&, _U2&&), pair::pair(_U1&&, const _T2&)):
6440 Replace _T1 and _T2 parameters with __null_ptr_constant and
6442 * testsuite/20_util/pair/40925.cc: Use nullptr instead of 0.
6443 * testsuite/20_util/pair/cons/explicit_construct.cc: Likewise.
6444 * testsuite/20_util/pair/cons/99957.cc: New test.
6446 2021-04-28 Jonathan Wakely <jwakely@redhat.com>
6448 * include/bits/basic_string.h (__cpp_lib_constexpr_string): Define.
6449 * include/std/version (__cpp_lib_constexpr_string): Define.
6450 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
6451 Check for __cpp_lib_constexpr_string.
6452 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
6454 * testsuite/21_strings/char_traits/requirements/version.cc: New test.
6456 2021-04-28 Jonathan Wakely <jwakely@redhat.com>
6458 * doc/Makefile.am (stamp-pdf-doxygen): Improve comment about
6459 dealing with errors. Use '@' to prevent shell command being
6461 * doc/Makefile.in: Regenerate.
6463 2021-04-28 Jonathan Wakely <jwakely@redhat.com>
6466 * include/bits/std_thread.h (thread::hardware_concurrency): Add
6467 missing noexcept to inline definition for non-gthreads targets.
6469 2021-04-28 Patrick Palka <ppalka@redhat.com>
6475 * include/bits/ranges_algo.h (__search_n_fn::operator()): Give
6476 the __value_comp lambda an explicit bool return type.
6477 (__is_permutation_fn::operator()): Give the __proj_scan local
6478 variable auto&& return type. Give the __comp_scan lambda an
6479 explicit bool return type.
6480 (__remove_fn::operator()): Give the __pred lambda an explicit
6482 (__partition_fn::operator()): Don't std::move __first twice
6483 when returning an empty subrange.
6484 (__min_fn::operator()): Don't std::move __comp.
6485 (__max_fn::operator()): Likewise.
6486 (__minmax_fn::operator()): Likewise.
6488 2021-04-27 Patrick Palka <ppalka@redhat.com>
6491 * include/std/ranges (join_view::_Iterator::operator++): Correct
6492 the return type of the lambda to avoid returning a copy of
6493 _M_parent->_M_inner.
6494 * testsuite/std/ranges/adaptors/join.cc (test10): New test.
6496 2021-04-27 Jakub Jelinek <jakub@redhat.com>
6499 2021-04-22 Jakub Jelinek <jakub@redhat.com>
6502 * testsuite/29_atomics/atomic_float/1.cc: Add dg-xfail-run-if for
6504 * testsuite/29_atomics/atomic_float/wait_notify.cc: Add dg-skip-if for
6507 2021-04-27 Jonathan Wakely <jwakely@redhat.com>
6509 * include/experimental/internet (address_v6::bytes_type): Adjust
6511 (basic_endpoint): Define _M_is_v6() to put all checks for
6512 AF_INET6 in one place.
6513 (basic_endpoint::resize): Simplify.
6514 (operator==(const tcp&, const tcp&)): Add constexpr and noexcept.
6515 (operator!=(const tcp&, const tcp&)): Likewise.
6516 (operator==(const udp&, const udp&)): Likewise.
6517 (operator!=(const udp&, const udp&)): Likewise.
6518 * testsuite/experimental/net/internet/tcp.cc: New test.
6519 * testsuite/experimental/net/internet/udp.cc: New test.
6521 2021-04-27 Jonathan Wakely <jwakely@redhat.com>
6524 * include/experimental/internet (resolver_errc, resolver_category())
6525 (make_error_code, make_error_condition): Define unconditionally,
6526 only make enumerators and use of gai_strerror depend on the
6527 availability of <netdb.h>.
6528 (address_v4::to_string): Use correct constant for string length.
6529 (address_v4::to_string, address_v6::to_string): Define
6530 unconditionally, throw if unsupported.
6531 (make_address_v4, make_address_v6): Define unconditionally.
6532 Return an error if unsupported.
6533 (tcp, udp, v6_only, unicast::hops, multicast::*): Define
6535 * testsuite/experimental/net/internet/socket/opt.cc: Check for
6536 <netinet/in.h> and <netinet/tcp.h> before using types from
6539 2021-04-27 Jonathan Wakely <jwakely@redhat.com>
6542 * include/experimental/internet (resolver_base::flags):
6543 Define overloaded operators as hidden friends.
6544 * include/experimental/socket (socket_base::message_flags):
6547 2021-04-26 Jonathan Wakely <jwakely@redhat.com>
6549 * include/experimental/internet (tcp::no_delay, v6_only)
6550 (unicast::hops, multicast::hops, multicast::enable_loopback):
6551 Change access of base class and static data members. Add
6552 using-declaration for __socket_crtp::operator=(_Tp).
6553 (multicast::__mcastopt): New type.
6554 (multicast::join_group, multicast::leave_group): Derive from
6555 __mcastopt for common implementation.
6556 * include/experimental/socket: Add comment.
6557 * testsuite/experimental/net/internet/socket/opt.cc: New test.
6558 * testsuite/experimental/net/socket/socket_base.cc: Check for
6559 protected constructor/destructor of socket_base. Check for
6560 explicit constructors of socket option classes.
6562 2021-04-26 Jonathan Wakely <jwakely@redhat.com>
6564 * include/experimental/bits/net.h (__socket_base): Add
6565 bool template parameter to allow BooleanSocketOption and
6566 IntegerSocketOption to have different __socket_base<int>
6568 (__socket_base<bool>): Adjust base class.
6569 (__socket_base<int>): Add partial specialization.
6570 (__socket_crtp::operator=(_Tp)): Add noexcept-specifier.
6571 * include/experimental/socket (socket_base::broadcast)
6572 (socket_base::debug, socket_base::do_not_route)
6573 (socket_base::keep_alive, socket_base::linger)
6574 (socket_base::out_of_band_inline)
6575 (socket_base::receive_buffer_size)
6576 (socket_base::receive_low_watermark)
6577 (socket_base::reuse_address, socket_base::send_buffer_size)
6578 (socket_base::send_low_watermark): Add using-declaration for
6579 __socket_crtp::operator=(_Tp).
6580 * testsuite/experimental/net/socket/socket_base.cc: Check
6581 properties of socket option types.
6583 2021-04-26 Jonathan Wakely <jwakely@redhat.com>
6585 * include/experimental/internet (resolver_base::flags): Remove
6586 enumerators. Initialize constants directly with desired values.
6587 Make all operators constexpr and noexcept.
6588 * testsuite/experimental/net/internet/resolver/base.cc: Use
6589 __gnu_test::test_bitmask_values for bitmask type. Check
6590 construction and destruction is protected.
6592 2021-04-26 Jonathan Wakely <jwakely@redhat.com>
6594 * include/bits/semaphore_base.h: Include <exception> and <errno.h>.
6596 2021-04-26 Jonathan Wakely <jwakely@redhat.com>
6599 * include/experimental/internet (net::ip::make_error_code)
6600 (net::ip::make_error_condition, net::ip::make_network_v4)
6601 (net::ip::operator==(const udp&, const udp&)): Add 'inline'.
6603 2021-04-24 David Edelsohn <dje.gcc@gmail.com>
6605 * testsuite/lib/dg-options.exp (atomic_link_flags): New.
6606 (add_options_for_libatomic): Use atomic_link_flags.
6608 2021-04-23 Jonathan Wakely <jwakely@redhat.com>
6611 * include/experimental/io_context (io_context): Define
6612 dummy_pollfd type so that most member functions still compile
6613 without <poll.h> and struct pollfd.
6615 2021-04-23 Jonathan Wakely <jwakely@redhat.com>
6617 * include/experimental/io_context (io_context::async_wait): Add
6619 * include/experimental/socket (basic_socket::async_connect):
6620 Cast wait_type constant to int.
6621 (basic_datagram_socket::async_receive): Likewise.
6622 (basic_datagram_socket::async_receive_from): Likewise.
6623 (basic_datagram_socket::async_send): Likewise.
6624 (basic_datagram_socket::async_send_to): Likewise.
6625 (basic_stream_socket::async_receive): Likewise.
6626 (basic_stream_socket::async_send): Likewise. Use io_context
6627 parameter directly, instead of via an executor.
6628 (basic_socket_acceptor::async_accept): Likewise.
6630 2021-04-23 Jonathan Wakely <jwakely@redhat.com>
6632 * include/experimental/socket (socket_base::shutdown_type):
6633 (socket_base::wait_type, socket_base::message_flags):
6634 Remove enumerators. Initialize constants directly with desired
6636 (socket_base::message_flags): Make all operators constexpr and
6638 * testsuite/util/testsuite_common_types.h (test_bitmask_values):
6640 * testsuite/experimental/net/socket/socket_base.cc: New test.
6642 2021-04-22 David Edelsohn <dje.gcc@gmail.com>
6644 * config/os/aix/atomicity.h: Delete.
6646 2021-04-22 Jonathan Wakely <jwakely@redhat.com>
6648 * include/bits/atomic_timed_wait.h (__cond_wait_until_impl):
6649 Handle system_clock as well as steady_clock.
6650 * testsuite/30_threads/semaphore/try_acquire_for.cc: Re-enable.
6651 * testsuite/30_threads/semaphore/try_acquire_until.cc:
6654 2021-04-22 Jonathan Wakely <jwakely@redhat.com>
6656 * testsuite/30_threads/semaphore/try_acquire_posix.cc: Add
6657 options for libatomic.
6659 2021-04-22 Jonathan Wakely <jwakely@redhat.com>
6661 * config/os/gnu-linux/os_defines.h: Fix type in comment.
6663 2021-04-22 Jonathan Wakely <jwakely@redhat.com>
6666 * include/bits/shared_ptr.h (allocate_shared): Assert that _Tp
6667 is not an array type.
6668 * include/bits/shared_ptr_base.h (__allocate_shared): Likewise.
6669 * testsuite/20_util/shared_ptr/creation/99006.cc: New test.
6671 2021-04-22 Thomas Rodgers <rodgert@twrodgers.com>
6673 * include/bits/atomic_wait.h: Always notify waiters in the
6674 case of 'bare' address notification.
6676 2021-04-22 Jakub Jelinek <jakub@redhat.com>
6679 * testsuite/29_atomics/atomic_float/1.cc: Add dg-xfail-run-if for
6681 * testsuite/29_atomics/atomic_float/wait_notify.cc: Add dg-skip-if for
6684 2021-04-22 Jonathan Wakely <jwakely@redhat.com>
6687 * include/bits/semaphore_base.h: Remove #error.
6688 * include/std/semaphore: Do not define anything unless one of
6689 the implementations is available.
6691 2021-04-21 Thomas Rodgers <rodgert@twrodgers.com>
6693 * include/bits/semaphore_base.h: Always reload __old in
6694 __atomic_semaphore::_S_do_try_acquire().
6695 * testsuite/30_threads/stop_token/stop_callback/destroy.cc:
6698 2021-04-21 Philippe Blain <levraiphilippeblain@gmail.com>
6699 Jonathan Wakely <jwakely@redhat.com>
6702 * python/Makefile.am: Install libstdc++*-gdb.py more robustly.
6703 * python/Makefile.in: Regenerate.
6705 2021-04-21 Thomas Rodgers <rodgert@twrodgers.com>
6707 * include/bits/semaphore_base.h: Add missing _M_try_acquire()
6708 member to __platform_wait.
6710 2021-04-21 Jonathan Wakely <jwakely@redhat.com>
6712 * include/std/latch: Replace tab characters in license text.
6713 * include/std/semaphore: Likewise.
6715 2021-04-21 Jakub Jelinek <jakub@redhat.com>
6718 * acinclude.m4: For POSIX semaphores AC_DEFINE HAVE_POSIX_SEMAPHORE
6719 rather than _GLIBCXX_HAVE_POSIX_SEMAPHORE.
6720 * configure: Regenerated.
6721 * config.h.in: Regenerated.
6723 2021-04-20 Jonathan Wakely <jwakely@redhat.com>
6725 * testsuite/30_threads/semaphore/try_acquire_for.cc: Disable
6726 test for targets not using futexes for semaphores.
6727 * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
6728 * testsuite/30_threads/stop_token/stop_callback/destroy.cc:
6729 Disable for all targets.
6731 2021-04-20 Thomas Rodgers <trodgers@redhat.com>
6733 * include/Makefile.am: Add new <bits/this_thread_sleep.h> header.
6734 * include/Makefile.in: Regenerate.
6735 * include/bits/this_thread_sleep.h: New file.
6736 * include/bits/atomic_base.h: Adjust all calls
6737 to __atomic_wait/__atomic_notify for new call signatures.
6738 * include/bits/atomic_timed_wait.h: Extensive rewrite.
6739 * include/bits/atomic_wait.h: Likewise.
6740 * include/bits/semaphore_base.h: Adjust all calls
6741 to __atomic_wait/__atomic_notify for new call signatures.
6742 * include/std/atomic: Likewise.
6743 * include/std/barrier: Likewise.
6744 * include/std/latch: Likewise.
6745 * include/std/semaphore: Likewise.
6746 * include/std/thread (this_thread::sleep_for)
6747 (this_thread::sleep_until): Move to new header.
6748 * testsuite/29_atomics/atomic/wait_notify/bool.cc: Simplify
6750 * testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
6751 * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
6752 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
6753 * testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
6754 * testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
6755 * testsuite/29_atomics/atomic_ref/wait_notify.cc: Likewise.
6757 2021-04-20 Patrick Palka <ppalka@redhat.com>
6760 * include/bits/stl_iterator.h (__detail::__move_iter_cat):
6762 (move_iterator): Derive from the above in C++20 in order to
6763 conditionally define iterator_category as per P2259.
6764 (move_iterator::__base_cat): No longer used, so remove.
6765 (move_iterator::iterator_category): Remove in C++20.
6766 (__detail::__common_iter_use_postfix_proxy): Define.
6767 (common_iterator::_Proxy): Rename to ...
6768 (common_iterator:__arrow_proxy): ... this.
6769 (common_iterator::__postfix_proxy): Define as per P2259.
6770 (common_iterator::operator->): Adjust.
6771 (common_iterator::operator++): Adjust as per P2259.
6772 (iterator_traits<common_iterator>::_S_iter_cat): Define.
6773 (iterator_traits<common_iterator>::iterator_category): Change as
6775 (__detail::__counted_iter_value_type): Define.
6776 (__detail::__counted_iter_concept): Define.
6777 (__detail::__counted_iter_cat): Define.
6778 (counted_iterator): Derive from the above three classes in order
6779 to conditionally define value_type, iterator_concept and
6780 iterator category respectively as per P2259.
6781 (counted_iterator::operator->): Define as per P2259.
6782 (incrementable_traits<counted_iterator>): Remove as per P2259.
6783 (iterator_traits<counted_iterator>): Adjust as per P2259.
6784 * include/std/ranges (__detail::__iota_view_iter_cat): Define.
6785 (iota_view::_Iterator): Derive from the above in order to
6786 conditionally define iterator_category as per P2259.
6787 (iota_view::_S_iter_cat): Rename to ...
6788 (iota_view::_S_iter_concept): ... this.
6789 (iota_view::iterator_concept): Use it to apply LWG 3291 changes.
6790 (iota_view::iterator_category): Remove.
6791 (__detail::__filter_view_iter_cat): Define.
6792 (filter_view::_Iterator): Derive from the above in order to
6793 conditionally define iterator_category as per P2259.
6794 (filter_view::_Iterator): Move to struct __filter_view_iter_cat.
6795 (filter_view::_Iterator::iterator_category): Remove.
6796 (transform_view::_Base): Define.
6797 (transform_view::__iter_cat): Define.
6798 (transform_view::_Iterator): Derive from the above in order to
6799 conditionally define iterator_category as per P2259.
6800 (transform_view::_Iterator::_Base): Just alias
6801 transform_view::_Base.
6802 (transform_view::_Iterator::_S_iter_cat): Move to struct
6803 transform_view::__iter_cat.
6804 (transform_view::_Iterator::iterator_category): Remove.
6805 (transform_view::_Sentinel::_Base): Just alias
6806 transform_view::_Base.
6807 (join_view::_Base): Define.
6808 (join_view::_Outer_iter): Define.
6809 (join_view::_Inner_iter): Define.
6810 (join_view::_S_ref_is_glvalue): Define.
6811 (join_view::__iter_cat): Define.
6812 (join_view::_Iterator): Derive from it in order to conditionally
6813 define iterator_category as per P2259.
6814 (join_view::_Iterator::_Base): Just alias join_view::_Base.
6815 (join_view::_Iterator::_S_ref_is_glvalue): Just alias
6816 join_view::_S_ref_is_glvalue.
6817 (join_view::_Iterator::_S_iter_cat): Move to struct
6818 transform_view::__iter_cat.
6819 (join_view::_Iterator::_Outer_iter): Just alias
6820 join_view::_Outer_iter.
6821 (join_view::_Iterator::_Inner_iter): Just alias
6822 join_view::_Inner_iter.
6823 (join_view::_Iterator::iterator_category): Remove.
6824 (join_view::_Sentinel::_Base): Just alias join_view::_Base.
6825 (__detail::__split_view_outer_iter_cat): Define.
6826 (__detail::__split_view_inner_iter_cat): Define.
6827 (split_view::_Base): Define.
6828 (split_view::_Outer_iter): Derive from __split_view_outer_iter_cat
6829 in order to conditionally define iterator_category as per P2259.
6830 (split_view::_Outer_iter::iterator_category): Remove.
6831 (split_view::_Inner_iter): Derive from __split_view_inner_iter_cat
6832 in order to conditionally define iterator_category as per P2259.
6833 (split_view::_Inner_iter::_S_iter_cat): Move to
6834 __split_view_inner_iter_cat.
6835 (split_view::_Inner_iter::iterator_category): Remove.
6836 (elements_view::_Base): Define.
6837 (elements_view::__iter_cat): Define.
6838 (elements_view::_Iterator): Derive from the above in order to
6839 conditionall define iterator_category as per P2259.
6840 (elements_view::_Iterator::_Base): Just alias
6841 elements_view::_Base.
6842 (elements_view::_Iterator::_S_iter_concept)
6843 (elements_view::_Iterator::iterator_concept): Define as per
6845 (elements_view::_Iterator::iterator_category): Remove.
6846 (elements_view::_Sentinel::_Base): Just alias
6847 elements_view::_Base.
6848 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc:
6849 Adjust constraints on iterator_traits<counted_iterator>.
6850 * testsuite/std/ranges/p2259.cc: New test.
6852 2021-04-20 Jonathan Wakely <jwakely@redhat.com>
6855 * include/std/charconv (__cpp_lib_to_chars): Define
6857 * include/std/version (__cpp_lib_to_chars): Likewise..
6858 * testsuite/20_util/from_chars/4.cc: Only check feature test
6859 macro, not _GLIBCXX_HAVE_USELOCALE.
6860 * testsuite/20_util/from_chars/5.cc: Likewise.
6861 * testsuite/20_util/from_chars/6.cc: Likewise.
6862 * testsuite/20_util/to_chars/long_double.cc: Likewise.
6864 2021-04-20 Jakub Jelinek <jakub@redhat.com>
6866 * testsuite/util/testsuite_abi.cc (compare_symbols): If any symbol
6867 versions with _IEEE128_ substring are found, set ieee_version_found
6868 to true. Ignore missing symbols with _IEEE128_ in version name if
6869 !ieee_version_found. Use i->first as version_name instead of
6870 i->second.version_name if the latter is empty.
6871 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
6873 2021-04-19 H.J. Lu <hjl.tools@gmail.com>
6875 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt:
6878 2021-04-17 Jakub Jelinek <jakub@redhat.com>
6880 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
6881 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
6883 2021-04-17 Jakub Jelinek <jakub@redhat.com>
6885 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
6886 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
6887 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
6888 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
6889 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
6890 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
6892 2021-04-15 Jonathan Wakely <jwakely@redhat.com>
6894 * testsuite/lib/dg-options.exp (add_options_for_libatomic): Also
6895 add libatomic options for 32-bit sparc*-*-linux-gnu.
6897 2021-04-15 Jonathan Wakely <jwakely@redhat.com>
6900 * libsupc++/Makefile.am: Add atomicity.cc here.
6901 * src/c++98/Makefile.am: Remove it from here.
6902 * libsupc++/Makefile.in: Regenerate.
6903 * src/c++98/Makefile.in: Regenerate.
6904 * testsuite/18_support/exception_ptr/96657.cc: New test.
6906 2021-04-13 Jonathan Wakely <jwakely@redhat.com>
6909 * include/std/bit: Only include <ext/numeric_traits.h> for
6910 hosted build, use <limits> otherwise.
6912 2021-04-13 Jonathan Wakely <jwakely@redhat.com>
6914 * doc/xml/manual/backwards_compatibility.xml: Remove porting
6915 notes for libg++ and libstdc++-v2, and bibliography.
6916 * doc/html/*: Regenerated.
6918 2021-04-12 Jonathan Wakely <jwakely@redhat.com>
6921 * include/bits/ranges_util.h (__detail::__iterator_sentinel_pair):
6922 Remove helper concept.
6923 (subrange(_Pr), subrange(Pr, __make_unsigned_like<...>)): Remove
6924 deduction guides, as per LWG 3404.
6925 * testsuite/std/ranges/subrange/lwg3282_neg.cc: Check that class
6926 template argument deduction fails.
6928 2021-04-12 Jonathan Wakely <jwakely@redhat.com>
6930 * testsuite/26_numerics/random/linear_congruential_engine/requirements/non_uint_neg.cc:
6931 Adjust expected error for C++20 mode.
6932 * testsuite/tr1/5_numerical_facilities/random/linear_congruential/requirements/non_uint_neg.cc:
6935 2021-04-12 Jonathan Wakely <jwakely@redhat.com>
6938 * testsuite/17_intro/headers/c++1998/49745.cc: Include all
6939 standard headers and XFAIL for effective-target c++20.
6941 2021-04-09 François Dumont <fdumont@gcc.gnu.org>
6944 * include/debug/helper_functions.h (__can_advance(_InputIterator,
6945 const std::pair<_Diff, _Distance_precision>&, int)): New.
6946 (__can_advance(const _Safe_iterator<>&,
6947 const std::pair<_Diff, _Distance_precision>&, int)): New.
6948 * include/debug/macros.h (__glibcxx_check_can_increment_dist): New,
6950 (__glibcxx_check_can_increment_range): Adapt to use latter.
6951 (__glibcxx_check_can_decrement_range): Likewise.
6952 * include/debug/safe_iterator.h
6953 (_Safe_iterator<>::_M_can_advance(const std::pair<_Diff, _Distance_precision>&,
6955 (__can_advance(const _Safe_iterator<>&,
6956 const std::pair<_Diff, _Distance_precision>&, int)): New.
6957 * include/debug/safe_iterator.tcc
6958 (_Safe_iterator<>::_M_can_advance(const std::pair<_Diff, _Distance_precision>&,
6960 (_Safe_iterator<>::_M_valid_range(const _Safe_iterator<>&,
6961 std::pair<difference_type, _Distance_precision>&, bool)): Adapt for
6963 (__copy_move_a): Adapt to use __glibcxx_check_can_increment_dist.
6964 (__copy_move_backward_a): Likewise.
6965 (__equal_aux): Likewise.
6966 * include/debug/stl_iterator.h (__can_advance(const std::reverse_iterator<>&,
6967 const std::pair<_Diff, _Distance_precision>&, int)): New.
6968 (__can_advance(const std::move_iterator<>&,
6969 const std::pair<_Diff, _Distance_precision>&, int)): New.
6970 * testsuite/25_algorithms/copy/debug/99402.cc: New test.
6972 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
6975 * include/bits/hashtable.h (_Hashtable::_S_nothrow_move()): Fix
6976 to be a valid constexpr function in C++11.
6977 * testsuite/23_containers/unordered_set/cons/99985.cc: New test.
6979 2021-04-09 Jonathan Wakely <jwakely@redhat.com>
6981 * include/bits/fs_fwd.h: Fix doxygen group command.
6982 * include/bits/streambuf_iterator.h: Likewise.
6983 * include/bits/uses_allocator_args.h: Likewise.
6984 * include/std/memory: Likewise.
6985 * include/tr1/complex: Likewise.
6987 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
6989 * include/bits/basic_string.h: Tweak doxygen comment.
6991 2021-04-08 Patrick Palka <ppalka@redhat.com>
6993 * include/std/ranges (__detail::find): Define.
6994 (split_view::_OuterIter::operator++): Apply proposed resolution
6996 * testsuite/std/ranges/adaptors/split.cc (test10): New test.
6998 2021-04-08 Patrick Palka <ppalka@redhat.com>
7000 * include/std/ranges (__detail::find_if): Simplify.
7001 (__detail::find_if_not): Likewise.
7002 (__detail::min): Remove.
7003 (__detail::mismatch): Simplify.
7004 (take_view::size): Use std::min instead of __detail::min.
7006 2021-04-08 Patrick Palka <ppalka@redhat.com>
7008 * include/std/ranges (__detail::__returnable_element): New
7010 (elements_view): Use this concept in its constraints. Add
7011 missing private access specifier.
7012 (elements_view::_S_get_element): Define as per LWG 3502.
7013 (elements_view::operator*, elements_view::operator[]): Use
7015 (elements_view::operator++): Remove unnecessary constraint
7017 * testsuite/std/ranges/adaptors/elements.cc (test05): New test.
7019 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
7021 * doc/Makefile.am (stamp-pdf-doxygen): Also grep for
7022 out-of-memory error in log file.
7023 * doc/Makefile.in: Regenerate.
7025 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
7027 * configure: Regenerate.
7029 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
7031 * include/bits/random.h: Fix doxygen group commands.
7032 * include/bits/regex_constants.h: Likewise.
7033 * include/tr1/random.h: Likewise.
7035 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
7037 * include/bits/hashtable.h (_Hashtable::_S_nothrow_move()):
7038 New function to determine noexcept-specifier for move
7040 (_Hashtable): Use _S_nothrow_move() on move constructors.
7041 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
7042 Correct static assertion message.
7043 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
7045 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
7047 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
7050 2021-04-08 Patrick Palka <ppalka@redhat.com>
7053 * testsuite/20_util/to_chars/long_double.cc: Don't run the test
7054 on targets without a large long double. XFAIL the execution on
7055 targets with a non-conforming printf.
7057 2021-04-08 Patrick Palka <ppalka@redhat.com>
7060 * include/std/ranges (__adaptor::__maybe_refwrap): Remove.
7061 (__adaptor::__adaptor_invocable): New concept.
7062 (__adaptor::__adaptor_partial_app_viable): New concept.
7063 (__adaptor::_RangeAdaptorClosure): Rewrite, turning it into a
7064 non-template base class.
7065 (__adaptor::_RangeAdaptor): Rewrite, turning it into a CRTP base
7067 (__adaptor::_Partial): New class template that represents
7068 partial application of a range adaptor non-closure.
7069 (__adaptor::__pipe_invocable): New concept.
7070 (__adaptor::_Pipe): New class template.
7071 (__detail::__can_ref_view): New concept.
7072 (__detail::__can_subrange): New concept.
7073 (all): Replace the lambda here with ...
7074 (_All): ... this functor. Add appropriate constraints.
7075 (__detail::__can_filter_view): New concept.
7076 (filter, _Filter): As in all/_All.
7077 (__detail::__can_transform): New concept.
7078 (transform, _Transform): As in all/_All.
7079 (__detail::__can_take_view): New concept.
7080 (take, _Take): As in all/_All.
7081 (__detail::__can_take_while_view): New concept.
7082 (take_while, _TakeWhile): As in all/_All.
7083 (__detail::__can_drop_view): New concept.
7084 (drop, _Drop): As in all/_All.
7085 (__detail::__can_drop_while_view): New concept.
7086 (drop_while, _DropWhile): As in all/_All.
7087 (__detail::__can_join_view): New concept.
7088 (join, _Join): As in all/_All.
7089 (__detail::__can_split_view): New concept.
7090 (split, _Split): As in all/_All. Rename template parameter
7092 (__detail::__already_common): New concept.
7093 (__detail::__can_common_view): New concept.
7094 (common, _Common): As in all/_All.
7095 (__detail::__can_reverse_view): New concept.
7096 (reverse, _Reverse): As in all/_All.
7097 (__detail::__can_elements_view): New concept.
7098 (elements, _Elements): As in all/_All.
7099 (keys, values): Adjust.
7100 * testsuite/std/ranges/adaptors/99433.cc: New test.
7101 * testsuite/std/ranges/adaptors/all.cc: No longer expect that
7102 adding empty range adaptor closure objects to a pipeline doesn't
7103 increase the size of the pipeline.
7105 * testsuite/std/ranges/adaptors/common.cc (test03): New test.
7106 * testsuite/std/ranges/adaptors/drop.cc (test09): New test.
7107 * testsuite/std/ranges/adaptors/drop_while.cc (test04): New test.
7108 * testsuite/std/ranges/adaptors/elements.cc (test04): New test.
7109 * testsuite/std/ranges/adaptors/filter.cc (test06): New test.
7110 * testsuite/std/ranges/adaptors/join.cc (test09): New test.
7111 * testsuite/std/ranges/adaptors/p2281.cc: New test.
7112 * testsuite/std/ranges/adaptors/reverse.cc (test07): New test.
7113 * testsuite/std/ranges/adaptors/split.cc (test01, test04):
7116 * testsuite/std/ranges/adaptors/split_neg.cc (test01): Adjust
7117 expected error message.
7118 (test02): Likewise. Extend test.
7119 * testsuite/std/ranges/adaptors/take.cc (test06): New test.
7120 * testsuite/std/ranges/adaptors/take_while.cc (test05): New test.
7121 * testsuite/std/ranges/adaptors/transform.cc (test07, test08):
7124 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
7126 * include/std/string_view: Adjust Doxygen @file comment.
7128 2021-04-08 Jonathan Wakely <jwakely@redhat.com>
7130 * include/std/type_traits (is_scoped_enum<T>): Constrain partial
7131 specialization to not match incomplete enum types. Use a
7132 requires-expression instead of instantiating is_convertible.
7133 (is_scoped_enum<const T>): Add as workaround for PR c++/99968.
7134 * testsuite/20_util/is_scoped_enum/value.cc: Check with
7135 incomplete types and opaque-enum-declarations.
7137 2021-04-07 Jonathan Wakely <jwakely@redhat.com>
7140 * src/c++17/fs_path.cc (path::_M_split_cmpts): Do not call
7141 non-const member on _M_pathname, to avoid copy-on-write.
7142 * testsuite/27_io/filesystem/path/decompose/parent_path.cc:
7143 Check construction from strings that might be shared.
7145 2021-04-06 Jonathan Wakely <jwakely@redhat.com>
7147 * include/bits/move.h (forward, move, move_if_noexcept)
7148 (addressof): Add _GLIBCXX_NODISCARD.
7149 * include/bits/ranges_cmp.h (identity::operator()): Add
7150 nodiscard attribute.
7151 * include/c_global/cstddef (to_integer): Likewise.
7152 * include/std/bit (bit_cast): Likewise.
7153 * include/std/utility (as_const, to_underlying): Likewise.
7155 2021-04-06 Jonathan Wakely <jwakely@redhat.com>
7157 * include/bits/move.h (forward): Change static_assert message
7158 to be unambiguous about what must be true.
7159 * testsuite/20_util/forward/c_neg.cc: Adjust dg-error.
7160 * testsuite/20_util/forward/f_neg.cc: Likewise.
7162 2021-04-06 Jonathan Wakely <jwakely@redhat.com>
7164 * include/bits/alloc_traits.h: Use markdown for code font.
7165 * include/bits/basic_string.h: Fix @param names.
7166 * include/bits/max_size_type.h: Remove period after @file.
7167 * include/bits/regex.h: Fix duplicate @retval names, and rename.
7168 * include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp: Add
7169 group open to match existing group close.
7170 * include/ext/pb_ds/priority_queue.hpp: Add blank line before group
7173 2021-04-06 Jonathan Wakely <jwakely@redhat.com>
7175 * include/bits/atomic_base.h: Fix doxygen group close.
7176 * include/bits/basic_ios.h: Likewise.
7177 * include/bits/forward_list.h: Likewise.
7178 * include/bits/fs_dir.h: Likewise.
7179 * include/bits/fs_ops.h: Likewise.
7180 * include/bits/fs_path.h: Likewise.
7181 * include/bits/functional_hash.h: Likewise.
7182 * include/bits/gslice.h: Likewise.
7183 * include/bits/gslice_array.h: Likewise.
7184 * include/bits/hashtable_policy.h: Likewise.
7185 * include/bits/indirect_array.h: Likewise.
7186 * include/bits/locale_classes.h: Likewise.
7187 * include/bits/locale_facets.h: Likewise.
7188 * include/bits/locale_facets_nonio.h: Likewise.
7189 * include/bits/mask_array.h: Likewise.
7190 * include/bits/refwrap.h: Likewise.
7191 * include/bits/regex.h: Likewise.
7192 * include/bits/regex_automaton.h: Likewise.
7193 * include/bits/regex_compiler.h: Likewise.
7194 * include/bits/regex_constants.h: Likewise.
7195 * include/bits/regex_error.h: Likewise.
7196 * include/bits/regex_executor.h: Likewise.
7197 * include/bits/regex_scanner.h: Likewise.
7198 * include/bits/shared_ptr.h: Likewise.
7199 * include/bits/shared_ptr_atomic.h: Likewise.
7200 * include/bits/shared_ptr_base.h: Likewise.
7201 * include/bits/slice_array.h: Likewise.
7202 * include/bits/specfun.h: Likewise.
7203 * include/bits/std_function.h: Likewise.
7204 * include/bits/std_mutex.h: Likewise.
7205 * include/bits/stl_deque.h: Likewise.
7206 * include/bits/stl_iterator.h: Likewise.
7207 * include/bits/stl_iterator_base_types.h: Likewise.
7208 * include/bits/stl_map.h: Likewise.
7209 * include/bits/stl_multimap.h: Likewise.
7210 * include/bits/stl_multiset.h: Likewise.
7211 * include/bits/stl_numeric.h: Likewise.
7212 * include/bits/stl_pair.h: Likewise.
7213 * include/bits/stl_set.h: Likewise.
7214 * include/bits/stl_uninitialized.h: Likewise.
7215 * include/bits/stream_iterator.h: Likewise.
7216 * include/bits/streambuf_iterator.h: Likewise.
7217 * include/bits/unique_ptr.h: Likewise.
7218 * include/bits/unordered_map.h: Likewise.
7219 * include/bits/unordered_set.h: Likewise.
7220 * include/decimal/decimal: Likewise.
7221 * include/experimental/any: Likewise.
7222 * include/experimental/array: Likewise.
7223 * include/experimental/bits/fs_dir.h: Likewise.
7224 * include/experimental/bits/fs_fwd.h: Likewise.
7225 * include/experimental/bits/fs_ops.h: Likewise.
7226 * include/experimental/bits/fs_path.h: Likewise.
7227 * include/experimental/buffer: Likewise.
7228 * include/experimental/internet: Likewise.
7229 * include/experimental/optional: Likewise.
7230 * include/experimental/propagate_const: Likewise.
7231 * include/experimental/socket: Likewise.
7232 * include/ext/pb_ds/assoc_container.hpp: Likewise.
7233 * include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp:
7235 * include/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp: Likewise.
7236 * include/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp: Likewise.
7237 * include/ext/pb_ds/detail/types_traits.hpp: Likewise.
7238 * include/ext/pb_ds/exception.hpp: Likewise.
7239 * include/ext/pb_ds/priority_queue.hpp: Likewise.
7240 * include/ext/pb_ds/tag_and_trait.hpp: Likewise.
7241 * include/ext/random: Likewise.
7242 * include/std/any: Likewise.
7243 * include/std/atomic: Likewise.
7244 * include/std/bitset: Likewise.
7245 * include/std/chrono: Likewise.
7246 * include/std/complex: Likewise.
7247 * include/std/condition_variable: Likewise.
7248 * include/std/fstream: Likewise.
7249 * include/std/future: Likewise.
7250 * include/std/iostream: Likewise.
7251 * include/std/istream: Likewise.
7252 * include/std/mutex: Likewise.
7253 * include/std/numeric: Likewise.
7254 * include/std/ostream: Likewise.
7255 * include/std/ratio: Likewise.
7256 * include/std/shared_mutex: Likewise.
7257 * include/std/stdexcept: Likewise.
7258 * include/std/streambuf: Likewise.
7259 * include/std/system_error: Likewise.
7260 * include/std/thread: Likewise.
7261 * include/std/valarray: Likewise.
7262 * include/std/variant: Likewise.
7263 * include/tr1/cmath: Likewise.
7264 * include/tr1/regex: Likewise.
7265 * include/tr2/dynamic_bitset: Likewise.
7266 * libsupc++/atomic_lockfree_defines.h: Likewise.
7267 * libsupc++/exception: Likewise.
7268 * libsupc++/exception.h: Likewise.
7269 * libsupc++/exception_ptr.h: Likewise.
7270 * libsupc++/nested_exception.h: Likewise.
7272 2021-03-31 Alexandre Oliva <oliva@adacore.com>
7274 * testsuite/30_threads/future/members/poll.cc: Use faster
7275 after-ready call in the calibration loop.
7277 2021-03-29 Jonathan Wakely <jwakely@redhat.com>
7279 * doc/xml/manual/status_cxx2017.xml: Adjust link for PSTL.
7280 * doc/html/manual/status.html: Regenerate.
7282 2021-03-28 François Dumont <fdumont@gcc.gnu.org>
7284 * include/debug/forward_list
7285 (forward_list(forward_list&&, const allocator_type&)): Add noexcept qualification.
7286 * include/debug/list (list(list&&, const allocator_type&)): Likewise and add
7287 call to safe container allocator aware move constructor.
7288 * include/debug/vector (vector(vector&&, const allocator_type&)):
7289 Fix noexcept qualification.
7290 * testsuite/23_containers/forward_list/cons/noexcept_move_construct.cc:
7291 Add allocator-extended move constructor noexceot qualification check.
7292 * testsuite/23_containers/list/cons/noexcept_move_construct.cc: Likewise.
7294 2021-03-26 Jonathan Wakely <jwakely@redhat.com>
7296 * src/c++11/random.cc (USE_LCG): Define when a pseudo-random
7298 [USE_LCG] (bad_seed, construct_lcg_at, destroy_lcg_at, __lcg):
7299 New helper functions and callback.
7300 (random_device::_M_init): Add 'prng' and 'all' enumerators.
7301 Replace switch with fallthrough with a series of 'if' statements.
7302 [USE_LCG]: Construct an lcg_type engine and use __lcg when cpuid
7304 (random_device::_M_init_pretr1) [USE_MT19937]: Accept "prng"
7306 (random_device::_M_getval): Check for callback unconditionally
7307 and always pass _M_file pointer.
7308 * testsuite/26_numerics/random/random_device/85494.cc: Remove
7309 effective-target check. Use new random_device_available helper.
7310 * testsuite/26_numerics/random/random_device/94087.cc: Likewise.
7311 * testsuite/26_numerics/random/random_device/cons/default-cow.cc:
7312 Remove effective-target check.
7313 * testsuite/26_numerics/random/random_device/cons/default.cc:
7315 * testsuite/26_numerics/random/random_device/cons/token.cc: Use
7316 new random_device_available helper. Test "prng" token.
7317 * testsuite/util/testsuite_random.h (random_device_available):
7318 New helper function.
7320 2021-03-25 François Dumont <fdumont@gcc.gnu.org>
7322 * include/debug/string
7323 (basic_string(const basic_string&, const _Alloc&)): Define even if !_GLIBCXX_USE_CXX11_ABI.
7324 (basic_string(basic_string&&, const _Alloc&)): Likewise and add noexcept qualification.
7325 (basic_string<>::erase): Adapt to take __const_iterator.
7326 (basic_string(const _CharT*, const _Allocator&)): Remove assign call.
7327 (basic_string<>::insert(const_iterator, _InputIte, _InputIte)): Try to
7328 remove iterator debug layer even if !_GLIBCXX_USE_CXX11_ABI.
7329 [_GLIBCXX_USE_CHAR8_T] (__gnu_debug::u8string): New.
7330 (__gnu_debug::u16string, __gnu_debug::u32string): New.
7331 (std::hash<__gnu_debug::basic_string<>>): New partial specialization.
7332 (std::__is_fast_hash<__gnu_debug::basic_string<>>): Likewise.
7333 * testsuite/util/exception/safety.h
7334 (erase_base<__gnu_debug::basic_string<>>): New partial specialization.
7335 (insert_base<__gnu_debug::basic_string<>>): Likewise.
7336 * testsuite/util/testsuite_container_traits.h (traits<__gnu_debug::basic_string<>>):
7337 New partial specialization.
7338 * testsuite/21_strings/basic_string/hash/debug.cc: New test.
7339 * testsuite/21_strings/basic_string/requirements/citerators.cc:
7340 Add test on __gnu_debug::string.
7341 * testsuite/21_strings/basic_string/requirements/dr438/constructor.cc: Likewise.
7342 * testsuite/21_strings/basic_string/requirements/exception/basic.cc: Likewise.
7343 * testsuite/21_strings/basic_string/requirements/exception/generation_prohibited.cc:
7345 * testsuite/21_strings/basic_string/requirements/exception/propagation_consistent.cc:
7347 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char/1.cc:
7349 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t/1.cc:
7351 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t/1.cc:
7353 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char8_t/1.cc:
7355 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t/1.cc:
7357 * testsuite/21_strings/basic_string/requirements/typedefs.cc: Likewise.
7359 2021-03-25 Jakub Jelinek <jakub@redhat.com>
7362 * testsuite/18_support/source_location/consteval.cc (main): Adjust
7363 expected column numbers.
7364 * testsuite/18_support/source_location/1.cc (main): Likewise.
7366 2021-03-25 Jonathan Wakely <jwakely@redhat.com>
7368 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare malloc.
7370 2021-03-25 Jonathan Wakely <jwakely@redhat.com>
7372 * testsuite/util/exception/safety.h (setup_base::generate):
7373 Support seeding random engine.
7374 (erase_point, erase_range): Adjust range of random numbers to
7375 ensure dereferenceable iterators are used where required.
7376 (generation_prohibited::run): Do not try to erase from empty
7378 * testsuite/util/testsuite_containergen.h (test_containers):
7379 Support seeding random engine.
7381 2021-03-23 Jonathan Wakely <jwakely@redhat.com>
7383 * testsuite/std/ranges/adaptors/reverse.cc: Replace duplicated
7384 line with a check that uses the const being/end overloads.
7386 2021-03-23 Moritz Sichert <sichert@in.tum.de>
7388 * include/std/ranges (reverse_view::begin, reverse_view::end):
7389 Qualify make_reverse_iterator calls to avoid ADL.
7390 * testsuite/std/ranges/adaptors/reverse.cc: Test that
7391 views::reverse works when make_reverse_iterator is defined
7392 in an associated namespace.
7394 2021-03-23 Jonathan Wakely <jwakely@redhat.com>
7396 * include/bits/c++config (_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT):
7397 Do not define when compiling with Clang.
7399 2021-03-22 Jonathan Wakely <jwakely@redhat.com>
7401 * include/std/string_view (basic_string_view(Range&&)): Define new
7402 constructor and deduction guide.
7403 * testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc: New test.
7404 * testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc: New test.
7406 2021-03-22 Jonathan Wakely <jwakely@redhat.com>
7408 * include/bits/range_access.h (begin(T (&)[N]), end(T (&)[N])):
7409 Add missing 'noexcept' as per LWG 2280.
7410 (rbegin(T (&)[N]), rend(T (&)[N]), rbegin(initializer_list<T>))
7411 (rend(initializer_list<T>)): Add 'noexcept' as per LWG 3537.
7412 * testsuite/24_iterators/range_access/range_access.cc: Check for
7413 expected noexcept specifiers. Check result types of generic
7414 std::begin and std::end overloads.
7415 * testsuite/24_iterators/range_access/range_access_cpp14.cc:
7416 Check for expected noexcept specifiers.
7417 * testsuite/24_iterators/range_access/range_access_cpp17.cc:
7420 2021-03-19 Jonathan Wakely <jwakely@redhat.com>
7422 * include/std/type_traits (is_scoped_enum): Define.
7423 * include/std/version (__cpp_lib_is_scoped_enum): Define.
7424 * testsuite/20_util/is_scoped_enum/value.cc: New test.
7425 * testsuite/20_util/is_scoped_enum/version.cc: New test.
7427 2021-03-16 Jonathan Wakely <jwakely@redhat.com>
7430 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Remove
7431 std::once_flag symbols.
7432 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Likewise.
7433 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Likewise.
7434 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt:
7436 * config/abi/pre/gnu.ver: Likewise.
7437 * src/c++11/mutex.cc [_GLIBCXX_HAVE_LINUX_FUTEX]
7438 (struct __once_flag_compat): Remove.
7439 (_ZNSt9once_flag11_M_activateEv): Remove.
7440 (_ZNSt9once_flag9_M_finishEb): Remove.
7442 2021-03-16 Jonathan Wakely <jwakely@redhat.com>
7445 * include/std/mutex [_GLIBCXX_HAVE_LINUX_FUTEX] (once_flag):
7446 Revert to pthread_once_t implementation.
7447 [_GLIBCXX_HAVE_LINUX_FUTEX] (call_once): Likewise.
7448 * src/c++11/mutex.cc [_GLIBCXX_HAVE_LINUX_FUTEX]
7449 (struct __once_flag_compat): New type matching the reverted
7450 implementation of once_flag using futexes.
7451 (once_flag::_M_activate): Remove, replace with ...
7452 (_ZNSt9once_flag11_M_activateEv): ... alias symbol.
7453 (once_flag::_M_finish): Remove, replace with ...
7454 (_ZNSt9once_flag9_M_finishEb): ... alias symbol.
7455 * testsuite/30_threads/call_once/66146.cc: Removed.
7457 2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
7459 * testsuite/17_intro/names.cc: Exclude j from the list
7460 of test symbols for Darwin.
7462 2021-03-15 Iain Sandoe <iain@sandoe.co.uk>
7464 * config/os/bsd/darwin/ppc-extra.ver: Add matching for
7465 to_chars and from_chars for long double.
7467 2021-03-15 Patrick Palka <ppalka@redhat.com>
7469 * include/bits/max_size_type.h (__max_size_type::operator _Tp):
7471 (__max_size_type::operator++): Define.
7472 (__max_size_type::operator--): Likewise.
7473 (__max_size_type::operator<=>): Conditionally define (in place
7474 of the other comparison operators).
7475 (__max_diff_type::operator _Tp): Fix formatting.
7476 (__max_diff_type::operator++): Define.
7477 (__max_diff_type::operator--): Likewise.
7478 (__max_diff_type::operator<=>): Conditionally define (in place
7479 of the other comparison operators).
7480 * testsuite/std/ranges/iota/max_size_type.cc (test01): Test
7481 these operator overloads.
7483 2021-03-15 Caroline Tice <cmtice@google.com>
7486 * src/Makefile.am (AM_CXXFLAGS_PRE, AM_CXXFLAGS): Add
7487 AM_CXXFLAGS_PRE with the old definition of AM_CXXFLAGS; make
7488 AM_CXXFLAGS to be AM_CXXFLAGS_PRE with '-fvtable-verify=std'
7490 * src/Makefile.in: Regenerate.
7492 2021-03-11 Patrick Palka <ppalka@redhat.com>
7494 * src/c++17/floating_to_chars.cc: Simplify the file as if
7495 __SIZEOF_INT128__ is always defined.
7496 [!defined __SIZEOF_INT128__]: Include "uint128_t.h". Define
7497 a base-10 to_chars overload for the uint128_t class type.
7498 * src/c++17/uint128_t.h: New file.
7499 * testsuite/20_util/to_chars/long_double.cc: No longer expect an
7500 execution FAIL on targets that have a large long double type
7503 2021-03-11 Patrick Palka <ppalka@redhat.com>
7505 * src/c++17/ryu/LOCAL_PATCHES: Update.
7506 * src/c++17/ryu/d2s_intrinsics.h: Don't define uint128_t.
7507 * src/c++17/ryu/generic_128.h: Likewise.
7508 * src/c++17/ryu/ryu_generic_128.h (struct floating_decimal_128):
7509 Use uint128_t instead of __uint128_t.
7510 (generic_binary_to_decimal): Likewise.
7512 2021-03-11 Patrick Palka <ppalka@redhat.com>
7514 * src/c++17/ryu/LOCAL_PATCHES: New file.
7516 2021-03-11 Patrick Palka <ppalka@redhat.com>
7518 * src/c++17/floating_to_chars.cc (uint128_t): New conditionally
7519 defined alias of unsigned __int128.
7520 (floating_type_traits_binary128::mantissa_t): Use uint128_t
7521 instead of unsigned __int128.
7522 (floating_type_traits<long double>::mantissa_t)
7523 [LONG_DOUBLE_KIND == LDK_IBM128]: Likewise.
7524 (get_ieee_repr): Likewise. Make casts from uint_t to mantissa_t
7525 and uint32_t explicit. Simplify the extraction of mantissa,
7526 exponent and sign bit.
7528 2021-03-11 Jonathan Wakely <jwakely@redhat.com>
7530 * include/std/barrier (barrier::arrival_token): New move-only
7531 class that encapsulates the underlying token value.
7533 2021-03-11 Jonathan Wakely <jwakely@redhat.com>
7535 * python/libstdcxx/v6/printers.py (find_type): Use tag attribute
7536 instead of unqualified() method.
7538 2021-03-11 Jonathan Wakely <jwakely@redhat.com>
7541 * include/std/stop_token (_Stop_state_t::_M_release_ownership):
7542 Use acq_rel memory ordering.
7544 2021-03-11 Jonathan Wakely <jwakely@redhat.com>
7547 * src/c++17/fs_dir.cc (recursive_directory_iterator): Use new
7548 helper function to check for permission denied errors.
7549 * src/filesystem/dir.cc (recursive_directory_iterator):
7551 * src/filesystem/dir-common.h (is_permission_denied_error): New
7554 2021-03-11 Jonathan Wakely <jwakely@redhat.com>
7557 * include/bits/random.h (normal_distribution): Use
7558 default-initializer for _M_saved and _M_saved_available.
7560 2021-03-10 John David Anglin <danglin@gcc.gnu.org>
7562 * testsuite/29_atomics/atomic/wait_notify/bool.cc: Add options to
7563 link with libatomic.
7564 * testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
7565 * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
7566 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
7567 * testsuite/30_threads/barrier/arrive.cc: Likewise.
7568 * testsuite/30_threads/barrier/arrive_and_drop.cc: Likewise.
7569 * testsuite/30_threads/barrier/arrive_and_wait.cc: Likewise.
7570 * testsuite/30_threads/barrier/completion.cc: Likewise.
7571 * testsuite/30_threads/latch/3.cc: Likewise.
7572 * testsuite/30_threads/semaphore/try_acquire.cc: Likewise.
7573 * testsuite/30_threads/semaphore/try_acquire_for.cc: Likewise.
7574 * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
7576 2021-03-10 Jonathan Wakely <jwakely@redhat.com>
7579 * include/bits/align.h: Include debug/assertions.h.
7580 * include/bits/codecvt.h: Include bits/c++config.h.
7581 * include/bits/enable_special_members.h: Likewise.
7582 * include/bits/erase_if.h: Likewise.
7583 * include/bits/functional_hash.h: Include <type_traits>.
7584 * include/bits/invoke.h: Include bits/move.h.
7585 * include/bits/ostream_insert.h: Include bits/exception_defines.h.
7586 * include/bits/parse_numbers.h: Include <type_traits>.
7587 * include/bits/predefined_ops.h: Include bits/c++config.h.
7588 * include/bits/range_access.h: Include bits/stl_iterator.h.
7589 * include/bits/stl_bvector.h: Do not include bits/stl_vector.h.
7590 * include/bits/stl_iterator.h: Include bits/stl_iterator_base_types.h.
7591 * include/bits/stl_uninitialized.h: Include bits/stl_algobase.h.
7592 * include/bits/uniform_int_dist.h: Include bits/concept_check.h.
7593 * include/bits/unique_lock.h: Include bits/std_mutex.h.
7594 * include/debug/assertions.h: Include bits/c++config.h.
7596 2021-03-10 Jonathan Wakely <jwakely@redhat.com>
7598 * include/bits/ranges_cmp.h (__eq_builtin_ptr_cmp): Remove.
7599 (ranges::equal_to, ranges::not_equal_to): Do not constrain
7600 with __eq_builtin_ptr_cmp.
7601 (ranges::less, ranges::greater, ranges::less_equal)
7602 (ranges::greater_equal): Do not constrain with
7603 __less_builtin_ptr_cmp.
7604 * libsupc++/compare (compare_three_way): Do not constrain with
7605 __3way_builtin_ptr_cmp.
7606 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc: Moved to...
7607 * testsuite/18_support/comparisons/object/lwg3530.cc: ...here.
7608 * testsuite/20_util/function_objects/range.cmp/lwg3530.cc: New test.
7610 2021-03-10 Jonathan Wakely <jwakely@redhat.com>
7612 * testsuite/std/time/syn_c++20.cc: Enable synopsis checks for
7613 C++20 calendar types.
7615 2021-03-06 Jakub Jelinek <jakub@redhat.com>
7618 * include/std/bit (__rotl, __rotr): Add optimized variants for power of
7619 two _Nd which the compiler can pattern match the rotates.
7621 2021-03-04 Jonathan Wakely <jwakely@redhat.com>
7624 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
7625 Make storage larger than required. Verify no write to the last
7627 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
7630 2021-03-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7632 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
7633 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
7635 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
7636 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
7639 2021-03-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7641 * include/experimental/bits/simd.h: Replace reserved _X, _B by
7643 * include/experimental/bits/simd_builtin.h: Likewise.
7644 * include/experimental/bits/simd_x86.h: Likewise.
7646 2021-02-27 Jonathan Wakely <jwakely@redhat.com>
7649 * include/std/chrono (year_month_day::_M_days_since_epoch()):
7650 Convert chrono::month and chrono::day to unsigned before
7651 converting to uint32_t.
7653 2021-02-25 Jonathan Wakely <jwakely@redhat.com>
7655 * include/std/chrono (year_month_day::_S_from_days): Perform
7656 all calculations with type uint32_t.
7658 2021-02-25 Jonathan Wakely <jwakely@redhat.com>
7660 * doc/xml/manual/abi.xml: Document versioning for GCC 11.
7661 * doc/html/manual/abi.html: Regenerate.
7663 2021-02-25 Jonathan Wakely <jwakely@redhat.com>
7666 * testsuite/27_io/headers/cstdio/types_std.cc: Use pointer to
7667 FILE instead of FILE.
7669 2021-02-25 Andreas Schwab <schwab@suse.de>
7671 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
7672 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
7673 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
7674 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
7676 2021-02-25 Jonathan Wakely <jwakely@redhat.com>
7679 * include/std/chrono (year_month_day::_S_from_days): Cast long
7682 2021-02-25 Jonathan Wakely <jwakely@redhat.com>
7684 * include/std/utility (to_underlying): Define.
7685 * include/std/version (__cpp_lib_to_underlying): Define.
7686 * testsuite/20_util/to_underlying/1.cc: New test.
7687 * testsuite/20_util/to_underlying/version.cc: New test.
7689 2021-02-24 Jonathan Wakely <jwakely@redhat.com>
7692 * src/c++17/floating_to_chars.cc (sprintf_ld): Add extra args
7693 before value to be printed.
7695 2021-02-24 Patrick Palka <ppalka@redhat.com>
7697 * src/c++17/floating_to_chars.cc (__floating_to_chars_precision):
7698 Relax the condition that guards the printf code path to accept
7699 F128_type as well as long double.
7701 2021-02-24 Cassio Neri <cassio.neri@gmail.com>
7703 * include/std/chrono (year_month_day_last:day): New
7706 2021-02-24 Cassio Neri <cassio.neri@gmail.com>
7708 * include/std/chrono (year::is_leap): New implementation.
7709 * testsuite/std/time/year/2.cc: New test.
7711 2021-02-24 Cassio Neri <cassio.neri@gmail.com>
7713 * include/std/chrono (year_month_day::_M_days_since_epoch):
7715 * testsuite/std/time/year_month_day/4.cc: New test.
7717 2021-02-24 Cassio Neri <cassio.neri@gmail.com>
7719 * include/std/chrono (year_month_day::_S_from_days): New
7721 * testsuite/std/time/year_month_day/3.cc: New test.
7723 2021-02-24 Patrick Palka <ppalka@redhat.com>
7726 * testsuite/20_util/to_chars/long_double.cc: Include <optional>.
7727 (test01): Simplify verifying the nearby values by using a
7728 2-iteration loop and a dedicated output buffer to check that the
7729 nearby values are different. Factor out the printf-based
7730 verification into a local function, and check that the leading
7731 hex digits agree before comparing to the output of printf. Also
7732 verify the output by round-tripping it through from_chars.
7734 2021-02-24 Jonathan Wakely <jwakely@redhat.com>
7737 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Do not match to_chars
7738 symbols for long double arguments mangled as 'g'.
7739 * config/os/gnu-linux/ldbl-extra.ver: Likewise.
7740 * config/os/gnu-linux/ldbl-ieee128-extra.ver: Likewise.
7741 * src/c++17/Makefile.am [GLIBCXX_LDBL_ALT128_COMPAT_TRUE]:
7742 Use -mabi=ibmlongdouble for floating_to_chars.cc.
7743 * src/c++17/Makefile.in: Regenerate.
7744 * src/c++17/floating_to_chars.cc (floating_type_traits_binary128):
7745 New type defining type traits of IEEE binary128 format.
7746 (floating_type_traits<__float128>): Define specialization.
7747 (floating_type_traits<long double>): Define in terms of
7748 floating_type_traits_binary128 when appropriate.
7749 (floating_to_shortest_scientific): Handle __float128.
7750 (sprintf_ld): New function template for printing a long double
7751 or __ieee128 value using sprintf.
7752 (__floating_to_chars_shortest, __floating_to_chars_precision):
7754 (to_chars): Define overloads for __float128.
7756 2021-02-24 Jonathan Wakely <jwakely@redhat.com>
7758 * testsuite/17_intro/names.cc: Undefine 'u' on powerpc*-linux*.
7760 2021-02-23 Martin Sebor <msebor@redhat.com>
7763 * libsupc++/dyncast.cc (__dynamic_cast): Return null when
7764 first argument is null.
7766 2021-02-23 Jakub Jelinek <jakub@redhat.com>
7769 * testsuite/21_strings/char_traits/requirements/char/99181.cc: New
7772 2021-02-23 Jakub Jelinek <jakub@redhat.com>
7775 * include/bits/char_traits.h (char_traits<char>::compare): For
7776 constexpr evaluation don't call
7777 __gnu_cxx::char_traits<char_type>::compare but do the comparison loop
7780 2021-02-23 Jakub Jelinek <jakub@redhat.com>
7783 * include/pstl/parallel_backend_serial.h: Remove __pstl::__par_backend.
7785 2021-02-23 Patrick Palka <ppalka@redhat.com>
7788 * src/c++17/floating_to_chars.cc (get_ieee_repr): Extract
7789 the high- and low-order parts from an IBM long double value
7790 in an endian-agnostic way.
7792 2021-02-19 Jonathan Wakely <jwakely@redhat.com>
7794 * include/bits/atomic_wait.h (__thread_relax()): Call
7795 __thread_yield() not __gthread_yield().
7797 2021-02-15 Jonathan Wakely <jwakely@redhat.com>
7799 * include/bits/atomic_wait.h (__thread_yield()): Check
7800 _GLIBCXX_HAS_GTHREADS before using __gthread_yield.
7801 (__thread_relax()): Use __thread_yield() instead of repeating
7802 the preprocessor checks for __gthread_yield.
7804 2021-02-15 Jonathan Wakely <jwakely@redhat.com>
7806 * include/std/mutex (once_flag::_M_activate()): Add explicit
7807 return statement for passive case.
7808 (once_flag::_M_finish(bool)): Use reserved name for parameter.
7810 2021-02-14 Jonathan Wakely <jwakely@redhat.com>
7813 * testsuite/util/testsuite_fs.h: Always include <unistd.h>.
7815 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
7818 * src/c++17/fs_ops.cc (fs::symlink_status): Re-enable workaround.
7820 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
7822 * doc/xml/manual/status_cxx2014.xml: Document implementation
7823 specific properties of std::experimental::filesystem::rename.
7824 * doc/xml/manual/status_cxx2017.xml: Document implementation
7825 specific properties of std::filesystem::rename.
7826 * doc/html/*: Regenerate.
7827 * src/c++17/fs_ops.cc (fs::rename): Implement correct behaviour
7828 for directories on Windows.
7829 * src/filesystem/ops-common.h (__gnu_posix::rename): Use
7830 MoveFileExW on Windows.
7831 * testsuite/27_io/filesystem/operations/rename.cc: New test.
7832 * testsuite/experimental/filesystem/operations/rename.cc: New test.
7834 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
7836 * testsuite/util/testsuite_fs.h (nonexistent_path): Add
7837 random number to the path.
7839 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
7841 * include/experimental/internet (address_v6::to_string): Include
7843 * testsuite/experimental/net/internet/address/v6/members.cc:
7844 Test to_string() results.
7846 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
7848 * include/experimental/internet (address_v6::any): Avoid using
7849 memcpy in constexpr function.
7850 (address_v6::loopback): Likewise.
7851 (make_address_v6): Fix missing return statements on error paths.
7852 * include/experimental/io_context: Avoid -Wdangling-else
7854 * testsuite/experimental/net/internet/address/v4/members.cc:
7855 Remove unused variables.
7856 * testsuite/experimental/net/internet/address/v6/members.cc:
7859 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
7861 * include/bits/shared_ptr_base.h (__shared_ptr::_M_get_deleter):
7862 Add unused attribute to parameter.
7863 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq):
7866 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
7868 * testsuite/27_io/basic_ostream/emit/1.cc: Expect test to fail
7869 if -fno-rtti is used.
7870 * testsuite/30_threads/async/forced_unwind.cc: Expect test
7871 to abort if -fno-rtti is used.
7873 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
7875 * testsuite/util/testsuite_allocator.h (memory_resource):
7876 Remove requirement for RTTI and exceptions to be enabled.
7878 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
7880 * testsuite/27_io/basic_istringstream/rdbuf/char/2832.cc: Use
7881 static_cast when RTTI is disabled.
7882 * testsuite/27_io/basic_istringstream/rdbuf/wchar_t/2832.cc:
7884 * testsuite/27_io/basic_ostringstream/rdbuf/char/2832.cc:
7886 * testsuite/27_io/basic_ostringstream/rdbuf/wchar_t/2832.cc:
7888 * testsuite/27_io/basic_stringstream/str/char/2.cc:
7890 * testsuite/27_io/basic_stringstream/str/wchar_t/2.cc:
7893 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
7895 * include/std/ostream (__syncbuf_base::_S_get): Mark parameter
7896 as unused and only use dynamic_cast when RTTI is enabled.
7898 2021-02-12 Jonathan Wakely <jwakely@redhat.com>
7901 * src/c++11/cxx11-ios_failure.cc (__ios_failure(const char*, int)):
7902 Change int parameter to error_code, to match std::ios_failure.
7903 (__throw_ios_failure(const char*, int)): Construct error_code
7906 2021-02-11 Jonathan Wakely <jwakely@redhat.com>
7908 * libsupc++/eh_ptr.cc (_GLIBCXX_EH_PTR_RELOPS_COMPAT): Define
7910 * libsupc++/exception_ptr.h (_GLIBCXX_EH_PTR_USED): Check new
7911 macro instead of _GLIBCXX_EH_PTR_COMPAT.
7912 (operator==): Likewise.
7914 2021-02-11 Jonathan Wakely <jwakely@redhat.com>
7917 * doc/xml/manual/status_cxx2011.xml: Document when support
7919 * doc/xml/manual/status_cxx2014.xml: Likewise.
7920 * doc/xml/manual/status_cxx2017.xml: Likewise.
7921 * doc/html/manual/status.html: Regenerate.
7923 2021-02-10 Jonathan Wakely <jwakely@redhat.com>
7926 * src/c++17/fs_ops.cc (fs::status): Re-enable workaround.
7928 2021-02-10 Jonathan Wakely <jwakely@redhat.com>
7930 * src/c++17/fs_ops.cc (fs::create_hard_link, fs::equivalent)
7931 (fs::remove): Use std::system_category() for error codes from
7933 * src/filesystem/ops.cc (fs::create_hard_link, fs::remove):
7936 2021-02-10 Jonathan Wakely <jwakely@redhat.com>
7938 * testsuite/27_io/filesystem/operations/proximate.cc: Fix typo
7939 in __MINGW32__ macro name.
7940 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
7941 * testsuite/27_io/filesystem/path/generation/proximate.cc:
7943 * testsuite/27_io/filesystem/path/generation/relative.cc:
7945 * testsuite/util/testsuite_fs.h: Likewise.
7947 2021-02-09 François Dumont <fdumont@gcc.gnu.org>
7949 * include/bits/stl_tree.h
7950 (__has_is_transparent, __has_is_transparent_t): Move...
7951 * include/bits/stl_function.h: ...here.
7952 * include/bits/hashtable_policy.h (_Hash_code_base<>::_M_hash_code_tr): New..
7953 (_Hashtable_base<>::_M_equals_tr): New.
7954 * include/bits/hashtable.h (_Hashtable<>::_M_find_tr, _Hashtable<>::_M_count_tr,
7955 _Hashtable<>::_M_equal_range_tr): New member function templates to perform
7956 heterogeneous lookup.
7957 (_Hashtable<>::_M_find_before_node_tr): New.
7958 (_Hashtable<>::_M_find_node_tr): New.
7959 * include/bits/unordered_map.h (unordered_map::find<>, unordered_map::count<>,
7960 unordered_map::contains<>, unordered_map::equal_range<>): New member function
7961 templates to perform heterogeneous lookup.
7962 (unordered_multimap::find<>, unordered_multimap::count<>,
7963 unordered_multimap::contains<>, unordered_multimap::equal_range<>): Likewise.
7964 * include/bits/unordered_set.h (unordered_set::find<>, unordered_set::count<>,
7965 unordered_set::contains<>, unordered_set::equal_range<>): Likewise.
7966 (unordered_multiset::find<>, unordered_multiset::count<>,
7967 unordered_multiset::contains<>, unordered_multiset::equal_range<>): Likewise.
7968 * include/debug/unordered_map
7969 (unordered_map::find<>, unordered_map::equal_range<>): Likewise.
7970 (unordered_multimap::find<>, unordered_multimap::equal_range<>): Likewise.
7971 * include/debug/unordered_set
7972 (unordered_set::find<>, unordered_set::equal_range<>): Likewise.
7973 (unordered_multiset::find<>, unordered_multiset::equal_range<>): Likewise.
7974 * testsuite/23_containers/unordered_map/operations/1.cc: New test.
7975 * testsuite/23_containers/unordered_multimap/operations/1.cc: New test.
7976 * testsuite/23_containers/unordered_multiset/operations/1.cc: New test.
7977 * testsuite/23_containers/unordered_set/operations/1.cc: New test.
7979 2021-02-09 François Dumont <fdumont@gcc.gnu.org>
7981 * include/bits/stl_deque.h
7982 (std::operator-(deque::iterator, deque::iterator)): Replace if/then with
7983 a null pointer test.
7985 2021-02-09 Jonathan Wakely <jwakely@redhat.com>
7987 * testsuite/27_io/filesystem/operations/remove_all.cc: Remove
7988 test directory after making it writable again.
7989 * testsuite/experimental/filesystem/operations/remove_all.cc:
7992 2021-02-09 Jonathan Wakely <jwakely@redhat.com>
7995 * include/std/coroutine (coroutine_handle<P>::from_address): Add
7998 2021-02-09 Vladimir Vishnevsky <vv.os.swe@gmail.com>
8000 * include/ext/stdio_sync_filebuf.h: Remove unused <unistd.h>.
8001 * src/c++17/fs_ops.cc (fs::permissions): Qualify mode_t.
8003 2021-02-09 Jakub Jelinek <jakub@redhat.com>
8006 * include/bits/basic_string.tcc (basic_string::_M_replace): When __s
8007 points to the characters moved by earlier _S_move, compute the source
8008 address using expression based on the __p pointer rather than __s
8011 2021-02-03 Jonathan Wakely <jwakely@redhat.com>
8013 * testsuite/19_diagnostics/error_code/operators/not_equal.cc:
8014 Add comparison with same category and different values.
8015 * testsuite/19_diagnostics/error_code/operators/less.cc:
8016 Likewise. Fix comparison involving different categories.
8017 * testsuite/19_diagnostics/error_code/operators/three_way.cc:
8019 * testsuite/19_diagnostics/error_condition/operators/less.cc:
8021 * testsuite/19_diagnostics/error_condition/operators/three_way.cc:
8024 2021-02-03 yaozhongxiao <yaozhongxiao@linux.alibaba.com>
8026 * include/experimental/bits/simd_neon.h: Replace repeated vpadd
8027 calls with a single vaddv for aarch64.
8029 2021-02-03 Matthias Kretz <kretz@kde.org>
8031 * testsuite/Makefile.am: Warn about the workaround. Add
8032 -fno-tree-vrp to CXXFLAGS passed to the check_simd script.
8033 Improve initial user feedback from make check-simd.
8034 * testsuite/Makefile.in: Regenerated.
8036 2021-02-03 Matthias Kretz <kretz@kde.org>
8038 * include/experimental/bits/simd.h: Add __detail::_Minimum and
8039 __detail::_Maximum to use them as _BinaryOperation to _S_reduce.
8040 Add hmin and hmax overloads for simd and const_where_expression.
8041 * include/experimental/bits/simd_scalar.h
8042 (_SimdImplScalar::_S_reduce): Make unused _BinaryOperation
8043 parameter const-ref to allow calling _S_reduce with an rvalue.
8044 * testsuite/experimental/simd/tests/reductions.cc: Add tests for
8045 hmin and hmax. Since the compiler statically determined that all
8046 tests pass, repeat the test after a call to make_value_unknown.
8048 2021-02-03 Matthias Kretz <kretz@kde.org>
8050 * testsuite/experimental/simd/tests/bits/verify.h (verify): Add
8051 instruction pointer data member. Ensure that the `if (m_failed)`
8052 branch is always inlined into the calling code. The body of the
8053 conditional can still be a function call. Move the get_ip call
8054 into the verify ctor to simplify the ctor calls.
8055 (COMPARE): Don't mention the use of all_of for reduction of a
8056 simd_mask. It only distracts from the real issue.
8058 2021-02-03 Matthias Kretz <kretz@kde.org>
8060 * testsuite/experimental/simd/driver.sh: Abstract reading test
8061 options into read_src_option function. Read skip, only,
8062 expensive, and xfail via read_src_option. Add timeout and
8063 timeout-factor options and adjust timeout variable accordingly.
8064 * testsuite/experimental/simd/tests/loadstore.cc: Set
8067 2021-02-03 Matthias Kretz <kretz@kde.org>
8069 * testsuite/experimental/simd/driver.sh: When handling the pipe
8070 to log (and on verbose to stdout) count the lines. If it exceeds
8071 1000 log the issue and exit 125, which is then handled as a
8074 2021-02-03 Matthias Kretz <kretz@kde.org>
8076 * testsuite/experimental/simd/tests/hypot3_fma.cc: Add skip:
8077 markup for long double on powerpc64*.
8079 2021-02-03 Matthias Kretz <kretz@kde.org>
8081 * include/experimental/bits/simd.h: Add __have_power10vec
8082 conditional on _ARCH_PWR10.
8083 * include/experimental/bits/simd_builtin.h: Forward declare
8084 _MaskImplPpc and use it as _MaskImpl when __ALTIVEC__ is
8086 (_MaskImplBuiltin::_S_some_of): Call _S_popcount from the
8087 _SuperImpl for optimizations and correctness.
8088 * include/experimental/bits/simd_ppc.h: Add _MaskImplPpc.
8089 (_MaskImplPpc::_S_popcount): Implement via vec_cntm for POWER10.
8090 Otherwise, for >=int use -vec_sums divided by a sizeof factor.
8091 For <int use -vec_sums(vec_sum4s(...)) to sum all mask entries.
8093 2021-02-03 Matthias Kretz <kretz@kde.org>
8095 * testsuite/experimental/simd/driver.sh: Remove executable on
8096 SIGINT. Process compiler and test executable output: In verbose
8097 mode print messages immediately, limited to 1000 lines and
8098 breaking long lines to below $COLUMNS (or 1024 if not set).
8099 Communicating the exit status of the compiler / test with the
8100 necessary pipe is done via a message through stdout/-in.
8102 2021-02-03 Matthias Kretz <kretz@kde.org>
8104 * testsuite/Makefile.am: Ensure .simd.summary is empty before
8105 collecting a new summary.
8106 * testsuite/Makefile.in: Regenerate.
8108 2021-02-03 Matthias Kretz <kretz@kde.org>
8110 * testsuite/experimental/simd/generate_makefile.sh: Use
8111 different variables internally than documented for user
8112 overrides. This makes internal append/prepend work as intended.
8114 2021-02-03 Matthias Kretz <kretz@kde.org>
8116 * testsuite/experimental/simd/driver.sh (verify_test): Print
8117 test output on run xfail. Do not repeat lines from the log that
8118 were already printed on stdout.
8119 (test_selector): Make the compiler flags pattern usable as a
8121 (toplevel): Trap on SIGINT and remove the log and sum files.
8122 Call timout with --foreground to quickly terminate on SIGINT.
8123 * testsuite/experimental/simd/generate_makefile.sh: Simplify run
8124 targets via target patterns. Default DRIVEROPTS to -v for run
8125 targets. Remove log and sum files after completion of the run
8126 target (so that it's always recompiled).
8127 Place help text into text file for reasonable 'make help'
8130 2021-02-03 Matthias Kretz <kretz@kde.org>
8132 * include/experimental/bits/simd.h: Remove unnecessary static
8133 assertion. Allow sizeof(8) integer __intrinsic_type to enable
8134 the necessary mask type.
8136 2021-02-03 Matthias Kretz <kretz@kde.org>
8138 * include/experimental/bits/simd.h: Let __intrinsic_type<long
8139 double, N> be valid if sizeof(long double) == sizeof(double) and
8140 use a __vector double as member type.
8142 2021-02-03 Matthias Kretz <kretz@kde.org>
8144 * include/experimental/bits/simd.h (__is_intrinsic_type): New
8145 internal type trait. Alias for __is_vector_type on x86.
8146 (_VectorTraitsImpl): Enable for __intrinsic_type in addition for
8148 (__intrin_bitcast): Allow casting to & from vector & intrinsic
8150 (__intrinsic_type): Explicitly specialize for NEON intrinsic
8153 2021-02-03 Matthias Kretz <kretz@kde.org>
8155 * testsuite/experimental/simd/driver.sh: Implement skip, only,
8156 expensive, and xfail markers. They can select on type, ABI tag
8157 subset number, target-triplet, and compiler flags.
8158 * testsuite/experimental/simd/generate_makefile.sh: The summary
8159 now includes lines for unexpected passes and expected failures.
8160 If the skip or only markers are only conditional on the type, do
8161 not generate rules for those types.
8162 * testsuite/experimental/simd/tests/abs.cc: Mark test expensive
8163 for ABI tag subsets 1-9.
8164 * testsuite/experimental/simd/tests/algorithms.cc: Ditto.
8165 * testsuite/experimental/simd/tests/broadcast.cc: Ditto.
8166 * testsuite/experimental/simd/tests/casts.cc: Ditto.
8167 * testsuite/experimental/simd/tests/generator.cc: Ditto.
8168 * testsuite/experimental/simd/tests/integer_operators.cc: Ditto.
8169 * testsuite/experimental/simd/tests/loadstore.cc: Ditto.
8170 * testsuite/experimental/simd/tests/mask_broadcast.cc: Ditto.
8171 * testsuite/experimental/simd/tests/mask_conversions.cc: Ditto.
8172 * testsuite/experimental/simd/tests/mask_implicit_cvt.cc: Ditto.
8173 * testsuite/experimental/simd/tests/mask_loadstore.cc: Ditto.
8174 * testsuite/experimental/simd/tests/mask_operator_cvt.cc: Ditto.
8175 * testsuite/experimental/simd/tests/mask_operators.cc: Ditto.
8176 * testsuite/experimental/simd/tests/mask_reductions.cc: Ditto.
8177 * testsuite/experimental/simd/tests/operator_cvt.cc: Ditto.
8178 * testsuite/experimental/simd/tests/operators.cc: Ditto.
8179 * testsuite/experimental/simd/tests/reductions.cc: Ditto.
8180 * testsuite/experimental/simd/tests/simd.cc: Ditto.
8181 * testsuite/experimental/simd/tests/split_concat.cc: Ditto.
8182 * testsuite/experimental/simd/tests/splits.cc: Ditto.
8183 * testsuite/experimental/simd/tests/where.cc: Ditto.
8184 * testsuite/experimental/simd/tests/fpclassify.cc: Ditto. In
8185 addition replace "test only floattypes" marker by unconditional
8186 "float|double|ldouble" only marker.
8187 * testsuite/experimental/simd/tests/frexp.cc: Ditto.
8188 * testsuite/experimental/simd/tests/hypot3_fma.cc: Ditto.
8189 * testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc:
8191 * testsuite/experimental/simd/tests/logarithm.cc: Ditto.
8192 * testsuite/experimental/simd/tests/math_1arg.cc: Ditto.
8193 * testsuite/experimental/simd/tests/math_2arg.cc: Ditto.
8194 * testsuite/experimental/simd/tests/remqo.cc: Ditto.
8195 * testsuite/experimental/simd/tests/trigonometric.cc: Ditto.
8196 * testsuite/experimental/simd/tests/trunc_ceil_floor.cc: Ditto.
8197 * testsuite/experimental/simd/tests/sincos.cc: Ditto. In
8198 addition, xfail on run because the reference data is missing.
8200 2021-02-02 Jonathan Wakely <jwakely@redhat.com>
8202 * doc/xml/manual/status_cxx2011.xml: Remove stray table cell.
8203 * doc/xml/manual/status_cxx2014.xml: Likewise.
8204 * doc/xml/manual/status_cxx2017.xml: Likewise.
8205 * doc/html/manual/status.html: Regenerate.
8207 2021-02-01 François Dumont <fdumont@gcc.gnu.org>
8210 * include/bits/stl_deque.h (std::deque<>::operator-(iterator, iterator)):
8211 Return 0 if both iterators are value-initialized.
8212 * testsuite/23_containers/deque/70303.cc: New test.
8213 * testsuite/23_containers/vector/70303.cc: New test.
8215 2021-02-01 Jonathan Wakely <jwakely@redhat.com>
8217 * doc/xml/manual/status_cxx2011.xml: Update std::call_once
8219 * doc/xml/manual/status_cxx2014.xml: Likewise.
8220 * doc/xml/manual/status_cxx2017.xml: Likewise. Update
8221 std::from_chars and std::to_chars status. Fix formatting.
8222 * doc/html/manual/status.html: Regenerate.
8224 2021-01-28 Jonathan Wakely <jwakely@redhat.com>
8226 * include/experimental/bits/numeric_traits.h: Update copyright
8228 * include/experimental/bits/simd.h: Likewise.
8229 * include/experimental/bits/simd_builtin.h: Likewise.
8230 * include/experimental/bits/simd_converter.h: Likewise.
8231 * include/experimental/bits/simd_detail.h: Likewise.
8232 * include/experimental/bits/simd_fixed_size.h: Likewise.
8233 * include/experimental/bits/simd_math.h: Likewise.
8234 * include/experimental/bits/simd_neon.h: Likewise.
8235 * include/experimental/bits/simd_ppc.h: Likewise.
8236 * include/experimental/bits/simd_scalar.h: Likewise.
8237 * include/experimental/bits/simd_x86.h: Likewise.
8238 * include/experimental/bits/simd_x86_conversions.h: Likewise.
8239 * include/experimental/simd: Likewise.
8240 * testsuite/experimental/simd/*: Likewise.
8242 2021-01-27 Jonathan Wakely <jwakely@redhat.com>
8244 * doc/xml/manual/status_cxx2017.xml: Replace invalid entity.
8245 * doc/html/*: Regenerate.
8247 2021-01-27 Jonathan Wakely <jwakely@redhat.com>
8249 * testsuite/experimental/simd/generate_makefile.sh: Use printf
8250 instead of echo when printing escape characters.
8252 2021-01-27 Matthias Kretz <kretz@kde.org>
8254 * scripts/check_simd: New file. This script is called from the
8255 the check-simd target. It determines a set of compiler flags and
8256 simulator setups for calling generate_makefile.sh and passes the
8257 information back to the check-simd target, which recurses to the
8258 generated Makefiles.
8259 * scripts/create_testsuite_files: Remove files below simd/tests/
8260 from testsuite_files and place them in testsuite_files_simd.
8261 * testsuite/Makefile.am: Add testsuite_files_simd. Add
8263 * testsuite/Makefile.in: Regenerate.
8264 * testsuite/experimental/simd/driver.sh: New file. This script
8265 compiles and runs a given simd test, logging its output and
8266 status. It uses the timeout command to implement compile and
8268 * testsuite/experimental/simd/generate_makefile.sh: New file.
8269 This script generates a Makefile which uses driver.sh to compile
8270 and run the tests and collect the logs into a single log file.
8271 * testsuite/experimental/simd/tests/abs.cc: New file. Tests
8273 * testsuite/experimental/simd/tests/algorithms.cc: New file.
8274 Tests min/max(simd, simd).
8275 * testsuite/experimental/simd/tests/bits/conversions.h: New
8276 file. Contains functions to support tests involving conversions.
8277 * testsuite/experimental/simd/tests/bits/make_vec.h: New file.
8278 Support functions make_mask and make_vec.
8279 * testsuite/experimental/simd/tests/bits/mathreference.h: New
8280 file. Support functions to supply precomputed math function
8282 * testsuite/experimental/simd/tests/bits/metahelpers.h: New
8283 file. Support code for SFINAE testing.
8284 * testsuite/experimental/simd/tests/bits/simd_view.h: New file.
8285 * testsuite/experimental/simd/tests/bits/test_values.h: New
8286 file. Test functions to easily drive a test with simd objects
8287 initialized from a given list of values and a range of random
8289 * testsuite/experimental/simd/tests/bits/ulp.h: New file.
8290 Support code to determine the ULP distance of simd objects.
8291 * testsuite/experimental/simd/tests/bits/verify.h: New file.
8292 Test framework for COMPARE'ing simd objects and instantiating
8293 the test templates with value_type and ABI tag.
8294 * testsuite/experimental/simd/tests/broadcast.cc: New file. Test
8296 * testsuite/experimental/simd/tests/casts.cc: New file. Test
8298 * testsuite/experimental/simd/tests/fpclassify.cc: New file.
8299 Test floating-point classification functions.
8300 * testsuite/experimental/simd/tests/frexp.cc: New file. Test
8302 * testsuite/experimental/simd/tests/generator.cc: New file. Test
8303 simd generator constructor.
8304 * testsuite/experimental/simd/tests/hypot3_fma.cc: New file.
8305 Test 3-arg hypot(simd,simd,simd) and fma(simd,simd,sim).
8306 * testsuite/experimental/simd/tests/integer_operators.cc: New
8307 file. Test integer operators.
8308 * testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc:
8309 New file. Test ldexp(simd), scalbn(simd), scalbln(simd), and
8311 * testsuite/experimental/simd/tests/loadstore.cc: New file. Test
8312 (converting) simd loads and stores.
8313 * testsuite/experimental/simd/tests/logarithm.cc: New file. Test
8315 * testsuite/experimental/simd/tests/mask_broadcast.cc: New file.
8316 Test simd_mask broadcasts.
8317 * testsuite/experimental/simd/tests/mask_conversions.cc: New
8318 file. Test simd_mask conversions.
8319 * testsuite/experimental/simd/tests/mask_implicit_cvt.cc: New
8320 file. Test simd_mask implicit conversions.
8321 * testsuite/experimental/simd/tests/mask_loadstore.cc: New file.
8322 Test simd_mask loads and stores.
8323 * testsuite/experimental/simd/tests/mask_operator_cvt.cc: New
8324 file. Test simd_mask operators convert as specified.
8325 * testsuite/experimental/simd/tests/mask_operators.cc: New file.
8326 Test simd_mask compares, subscripts, and negation.
8327 * testsuite/experimental/simd/tests/mask_reductions.cc: New
8328 file. Test simd_mask reductions.
8329 * testsuite/experimental/simd/tests/math_1arg.cc: New file. Test
8330 1-arg math functions on simd.
8331 * testsuite/experimental/simd/tests/math_2arg.cc: New file. Test
8332 2-arg math functions on simd.
8333 * testsuite/experimental/simd/tests/operator_cvt.cc: New file.
8334 Test implicit conversions on simd binary operators behave as
8336 * testsuite/experimental/simd/tests/operators.cc: New file. Test
8337 simd compares, subscripts, not, unary minus, plus, minus,
8338 multiplies, divides, increment, and decrement.
8339 * testsuite/experimental/simd/tests/reductions.cc: New file.
8341 * testsuite/experimental/simd/tests/remqo.cc: New file. Test
8343 * testsuite/experimental/simd/tests/simd.cc: New file. Basic
8344 sanity checks of simd types.
8345 * testsuite/experimental/simd/tests/sincos.cc: New file. Test
8346 sin(simd) and cos(simd).
8347 * testsuite/experimental/simd/tests/split_concat.cc: New file.
8348 Test split(simd) and concat(simd, simd).
8349 * testsuite/experimental/simd/tests/splits.cc: New file. Test
8351 * testsuite/experimental/simd/tests/trigonometric.cc: New file.
8352 Test remaining trigonometric functions on simd.
8353 * testsuite/experimental/simd/tests/trunc_ceil_floor.cc: New
8354 file. Test trunc(simd), ceil(simd), and floor(simd).
8355 * testsuite/experimental/simd/tests/where.cc: New file. Test
8356 masked operations using where.
8358 2021-01-27 Matthias Kretz <kretz@kde.org>
8360 * doc/xml/manual/status_cxx2017.xml: Add implementation status
8361 of the Parallelism TS 2. Document implementation-defined types
8363 * include/Makefile.am: Add new headers.
8364 * include/Makefile.in: Regenerate.
8365 * include/experimental/simd: New file. New header for
8367 * include/experimental/bits/numeric_traits.h: New file.
8368 Implementation of P1841R1 using internal naming. Addition of
8369 missing IEC559 functionality query.
8370 * include/experimental/bits/simd.h: New file. Definition of the
8371 public simd interfaces and general implementation helpers.
8372 * include/experimental/bits/simd_builtin.h: New file.
8373 Implementation of the _VecBuiltin simd_abi.
8374 * include/experimental/bits/simd_converter.h: New file. Generic
8376 * include/experimental/bits/simd_detail.h: New file. Internal
8377 macros for the simd implementation.
8378 * include/experimental/bits/simd_fixed_size.h: New file. Simd
8379 fixed_size ABI specific implementations.
8380 * include/experimental/bits/simd_math.h: New file. Math
8382 * include/experimental/bits/simd_neon.h: New file. Simd NEON
8383 specific implementations.
8384 * include/experimental/bits/simd_ppc.h: New file. Implement bit
8385 shifts to avoid invalid results for integral types smaller than
8387 * include/experimental/bits/simd_scalar.h: New file. Simd scalar
8388 ABI specific implementations.
8389 * include/experimental/bits/simd_x86.h: New file. Simd x86
8390 specific implementations.
8391 * include/experimental/bits/simd_x86_conversions.h: New file.
8392 x86 specific conversion optimizations. The conversion patterns
8393 work around missing conversion patterns in the compiler and
8394 should be removed as soon as PR85048 is resolved.
8395 * testsuite/experimental/simd/standard_abi_usable.cc: New file.
8396 Test that all (not all fixed_size<N>, though) standard simd and
8397 simd_mask types are usable.
8398 * testsuite/experimental/simd/standard_abi_usable_2.cc: New
8399 file. As above but with -ffast-math.
8400 * testsuite/libstdc++-dg/conformance.exp: Don't build simd tests
8401 from the standard test loop. Instead use
8402 check_vect_support_and_set_flags to build simd tests with the
8403 relevant machine flags.
8405 2021-01-27 Jonathan Wakely <jwakely@redhat.com>
8408 * include/bits/string_view.tcc
8409 (basic_string_view::find(const CharT*, size_type, size_type)):
8412 2021-01-27 Paul Fee <paul.f.fee@gmail.com>
8414 * include/bits/basic_string.h (basic_string::contains): New
8416 * include/std/string_view (basic_string_view::contains):
8418 * include/std/version (__cpp_lib_string_contains): Define.
8419 * testsuite/21_strings/basic_string/operations/starts_with/char/1.cc:
8420 Remove trailing whitespace.
8421 * testsuite/21_strings/basic_string/operations/starts_with/wchar_t/1.cc:
8423 * testsuite/21_strings/basic_string/operations/contains/char/1.cc: New test.
8424 * testsuite/21_strings/basic_string/operations/contains/wchar_t/1.cc: New test.
8425 * testsuite/21_strings/basic_string_view/operations/contains/char/1.cc: New test.
8426 * testsuite/21_strings/basic_string_view/operations/contains/char/2.cc: New test.
8427 * testsuite/21_strings/basic_string_view/operations/contains/wchar_t/1.cc: New test.
8429 2021-01-21 Jonathan Wakely <jwakely@redhat.com>
8431 * src/c++17/Makefile.in: Regenerate.
8433 2021-01-20 David Edelsohn <dje.gcc@gmail.com>
8435 * config/os/aix/ctype_inline.h (bool ctype<char>:: is): Cast
8436 _OBJ_DATA subscript to unsigned char. Add _THREAD_SAFE access to
8438 (const char* ctype<char>:: is): Same.
8440 2021-01-18 Jonathan Wakely <jwakely@redhat.com>
8443 * testsuite/20_util/unique_ptr/io/lwg2948.cc: Do not try to
8444 write to a wide character stream if wide character support is
8445 disabled in the library.
8447 2021-01-18 Jonathan Wakely <jwakely@redhat.com>
8449 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Use
8450 stringbuf not wstringbuf.
8452 2021-01-18 Jakub Jelinek <jakub@redhat.com>
8455 * src/c++11/Makefile.am (cxx11-ios_failure-lt.s, cxx11-ios_failure.s):
8456 Compile with -gno-as-loc-support.
8457 * src/c++11/Makefile.in: Regenerated.
8459 2021-01-16 H.J. Lu <hjl.tools@gmail.com>
8461 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
8462 Add -fcf-protection=none to -march=i486.
8464 2021-01-14 François Dumont <fdumont@gcc.gnu.org>
8466 * testsuite/23_containers/deque/debug/98466.cc: Make it pre-C++11
8469 2021-01-14 Alexandre Oliva <oliva@adacore.com>
8471 * testsuite/30_threads/future/members/poll.cc: Calibrate
8474 2021-01-14 François Dumont <fdumont@gcc.gnu.org>
8477 * include/bits/hashtable_policy.h (_Node_iterator_base()): Set _M_cur to nullptr.
8478 (_Node_iterator()): Make default.
8479 (_Node_const_iterator()): Make default.
8480 * include/debug/macros.h (__glibcxx_check_erae_range_after): Add _M_singular
8482 * include/debug/safe_iterator.h
8483 (_GLIBCXX_DEBUG_VERIFY_OPERANDS): Accept if both iterator are value initialized.
8484 * include/debug/safe_local_iterator.h (_GLIBCXX_DEBUG_VERIFY_OPERANDS):
8486 * include/debug/safe_iterator.tcc (_Safe_iterator<>::_M_valid_range): Add
8487 _M_singular checks on input iterators.
8488 * src/c++11/debug.cc (_Safe_iterator_base::_M_can_compare): Remove _M_singular
8490 * testsuite/23_containers/deque/debug/98466.cc: New test.
8491 * testsuite/23_containers/unordered_map/debug/98466.cc: New test.
8493 2021-01-14 Jonathan Wakely <jwakely@redhat.com>
8496 * include/bits/fs_path.h (__throw_conversion_error): New
8497 function to throw or abort on character conversion errors.
8498 (__wstr_from_utf8): Move definition after filesystem_error has
8499 been defined. Use __throw_conversion_error.
8500 (path::_S_convert<_EcharT>): Use __throw_conversion_error.
8501 (path::_S_str_convert<_CharT, _Traits, _Allocator>): Likewise.
8502 (path::u8string): Likewise.
8504 2021-01-14 Jonathan Wakely <jwakely@redhat.com>
8506 * include/std/barrier: Update copyright years. Fix whitespace.
8507 * include/std/version: Fix whitespace.
8508 * testsuite/30_threads/barrier/1.cc: Update copyright years.
8509 * testsuite/30_threads/barrier/2.cc: Likewise.
8510 * testsuite/30_threads/barrier/arrive.cc: Likewise.
8511 * testsuite/30_threads/barrier/arrive_and_drop.cc: Likewise.
8512 * testsuite/30_threads/barrier/arrive_and_wait.cc: Likewise.
8513 * testsuite/30_threads/barrier/completion.cc: Likewise.
8515 2021-01-13 Jonathan Wakely <jwakely@redhat.com>
8517 * doc/doxygen/user.cfg.in (INPUT): Remove include/debug/array.
8519 2021-01-10 David Edelsohn <dje.gcc@gmail.com>
8522 * testsuite/ext/vstring/cons/moveable.cc: Suppress false positive
8524 * testsuite/ext/vstring/modifiers/assign/move_assign.cc: Same.
8526 2021-01-08 Olivier Hainque <hainque@adacore.com>
8528 * testsuite/20_util/bind/ref_neg.cc: Tweak the
8529 dg-prune-output regex for out-of-build-tree contexts.
8531 2021-01-07 Thomas Rodgers <trodgers@redhat.com>
8533 * doc/doxygen/user.cfg.in: Add new header.
8534 * include/Makefile.am (std_headers): likewise.
8535 * include/Makefile.in: Regenerate.
8536 * include/precompiled/stdc++.h: Add new header.
8537 * include/std/barrier: New file.
8538 * include/std/version: Add __cpp_lib_barrier feature test macro.
8539 * testsuite/30_threads/barrier/1.cc: New test.
8540 * testsuite/30_threads/barrier/2.cc: Likewise.
8541 * testsuite/30_threads/barrier/arrive_and_drop.cc: Likewise.
8542 * testsuite/30_threads/barrier/arrive_and_wait.cc: Likewise.
8543 * testsuite/30_threads/barrier/arrive.cc: Likewise.
8544 * testsuite/30_threads/barrier/completion.cc: Likewise.
8546 2021-01-07 Patrick Palka <ppalka@redhat.com>
8549 * testsuite/20_util/to_chars/long_double.cc: Use nexttowardl
8550 instead of the non-standard nextupl and nextdownl.
8552 2021-01-05 Samuel Thibault <samuel.thibault@ens-lyon.org>
8554 * configure: Re-generate.
8556 2021-01-05 Ed Smith-Rowland <3dw4rd@verizon.net>
8558 * include/precompiled/stdc++.h: Add <source_location> to C++20 section.
8560 2021-01-01 Jakub Jelinek <jakub@redhat.com>
8562 * ChangeLog-2020: Rotate ChangeLog. New file.
8565 Copyright (C) 2021 Free Software Foundation, Inc.
8567 Copying and distribution of this file, with or without modification,
8568 are permitted in any medium without royalty provided the copyright
8569 notice and this notice are preserved.