]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/ChangeLog-2021
Eenable -Winvalid-memory-order for C++ [PR99612].
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog-2021
CommitLineData
d04ae832
JJ
12021-12-15 François Dumont <fdumont@gcc.gnu.org>
2
3 * include/bits/stl_iterator.h
4 (std::pointer_traits<__gnu_cxx::__normal_iterator<>>): Remove.
5 (std::__to_address(const __gnu_cxx::__normal_iterator<>&)): New for C++11 to C++17.
6 * include/debug/safe_iterator.h
7 (std::__to_address(const __gnu_debug::_Safe_iterator<__gnu_cxx::__normal_iterator<>,
8 _Sequence>&)): New for C++11 to C++17.
9 * testsuite/24_iterators/normal_iterator/to_address.cc: Add check on std::vector::iterator
10 to validate both __gnu_cxx::__normal_iterator<> __to_address overload in normal mode and
11 __gnu_debug::_Safe_iterator in _GLIBCXX_DEBUG mode.
12
132021-12-15 Jakub Jelinek <jakub@redhat.com>
14
15 PR libstdc++/71557
16 * include/bits/locale_facets_nonio.tcc (_M_extract_via_format):
17 Compare characters other than format specifiers and whitespace
18 case insensitively.
19 (_M_extract_name): Compare characters case insensitively.
20 * testsuite/22_locale/time_get/get/char/71557.cc: New test.
21 * testsuite/22_locale/time_get/get/wchar_t/71557.cc: New test.
22
232021-12-14 Jonathan Wakely <jwakely@redhat.com>
24
25 PR libstdc++/103687
26 * testsuite/22_locale/time_get/get_date/wchar_t/4.cc: Restore
27 original locale before returning.
28 * testsuite/22_locale/time_get/get_time/char/2.cc: Check for %p
29 in locale's T_FMT and adjust accordingly.
30 * testsuite/22_locale/time_get/get_time/wchar_t/2.cc: Likewise.
31
322021-12-14 Jonathan Wakely <jwakely@redhat.com>
33
34 PR libstdc++/102447
35 * include/bits/regex_compiler.h (_Compiler::_BracketState): New
36 class.
37 (_Compiler::_BrackeyMatcher): New alias template.
38 (_Compiler::_M_expression_term): Change pair<bool, CharT>
39 parameter to _BracketState. Process first character for
40 ECMAScript syntax as well as POSIX.
41 * include/bits/regex_compiler.tcc
42 (_Compiler::_M_insert_bracket_matcher): Pass _BracketState.
43 (_Compiler::_M_expression_term): Use _BracketState to store
44 state between calls. Improve handling of dashes in ranges.
45 * testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc:
46 Add more tests for ranges containing dashes. Check invalid
47 ranges with character class at the beginning.
48
492021-12-14 Jonathan Wakely <jwakely@redhat.com>
50
51 * include/ext/pointer.h (_Relative_pointer_impl::_UIntPtrType):
52 Rename to uintptr_t and define as __UINTPTR_TYPE__.
53
542021-12-14 Jonathan Wakely <jwakely@redhat.com>
55
56 * include/bits/regex_constants.h (__syntax_option, __match_flag):
57 Remove.
58 (syntax_option_type, match_flag_type): Define enumerators.
59 Use to initialize globals. Add constexpr to compound assignment
60 operators.
61 * include/bits/regex_error.h (error_type): Add comment.
62 * testsuite/28_regex/constants/constexpr.cc: Remove comment.
63 * testsuite/28_regex/constants/error_type.cc: Improve comment.
64 * testsuite/28_regex/constants/match_flag_type.cc: Check bitmask
65 requirements.
66 * testsuite/28_regex/constants/syntax_option_type.cc: Likewise.
67
682021-12-14 Jonathan Wakely <jwakely@redhat.com>
69
70 * include/bits/regex_compiler.tcc (_Compiler::_M_match_token):
71 Use reserved name for parameter.
72 * testsuite/17_intro/names.cc: Check "token".
73
742021-12-13 Jonathan Wakely <jwakely@redhat.com>
75
76 * scripts/make_exports.pl: Replace '?' with '.' when turning
77 a glob into a regex.
78
792021-12-13 Jonathan Wakely <jwakely@redhat.com>
80
81 * include/bits/ranges_base.h (ranges::size, ranges::empty): Add
82 explicit check for unbounded arrays before using ranges::begin.
83 * testsuite/std/ranges/access/empty.cc: Check handling of unbounded
84 arrays.
85 * testsuite/std/ranges/access/size.cc: Likewise.
86
872021-12-13 Jonathan Wakely <jwakely@redhat.com>
88
89 PR libstdc++/103664
90 * include/bits/regex.h (__regex_replace): Declare.
91 (regex_replace): Use it.
92 * include/bits/regex.tcc (__regex_replace): Replace regex_replace
93 definition with __regex_replace.
94 * testsuite/28_regex/algorithms/regex_replace/char/103664.cc: New test.
95
962021-12-11 Jason Merrill <jason@redhat.com>
97
98 PR c++/103534
99 * include/bits/basic_string.h (append (basic_string)): Call pointer
100 append instead of _M_append directly.
101
1022021-12-10 Jakub Jelinek <jakub@redhat.com>
103
104 PR libstdc++/71367
105 * config/locale/dragonfly/time_members.cc (_M_initialize_timepunct):
106 Initialize "C" _M_am_pm_format to %I:%M:%S %p rather than empty
107 string.
108 * config/locale/gnu/time_members.cc (_M_initialize_timepunct):
109 Likewise.
110 * config/locale/generic/time_members.cc (_M_initialize_timepunct):
111 Likewise.
112 * include/bits/locale_facets_nonio.h (_M_am_pm_format): New method.
113 * include/bits/locale_facets_nonio.tcc (_M_extract_via_format): Handle
114 %r.
115 * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Export _M_am_pm_format
116 with const _CharT** argument, ensure it isn't exported in GLIBCXX_3.4.
117 * testsuite/22_locale/time_get/get/char/71367.cc: New test.
118 * testsuite/22_locale/time_get/get/wchar_t/71367.cc: New test.
119
1202021-12-10 Jakub Jelinek <jakub@redhat.com>
121
122 PR libstdc++/78714
123 * include/bits/locale_facets_nonio.tcc (_M_extract_via_format):
124 Mention in function comment it interprets strptime format string
125 rather than strftime. Handle %a and %A the same by accepting both
126 full and abbreviated names. Similarly handle %h, %b and %B the same.
127 Handle %d and %e the same by accepting possibly optional single space
128 and 1 or 2 digits. For %I store tm_hour 0 instead of tm_hour 12. For
129 %t and %n skip any whitespace. Handle %p and %%. For whitespace in
130 the string skip any whitespace.
131 (_M_extract_num): For __len == 2 accept 1 or 2 digits rather than
132 always 2. Don't punt early if __value * __mult is larget than __max
133 or smaller than __min - __mult, instead punt if __value > __max.
134 At the end verify __value is in between __min and __max and punt
135 otherwise.
136 (_M_extract_name): Allow non-unique names or names which are prefixes
137 of other names. Don't recompute lengths of names for every character.
138 * testsuite/22_locale/time_get/get/char/3.cc: New test.
139 * testsuite/22_locale/time_get/get/wchar_t/3.cc: New test.
140 * testsuite/22_locale/time_get/get_date/char/12791.cc (test01): Use
141 62 instead 60 and expect 6 to be accepted and thus *ret01 == '2'.
142 * testsuite/22_locale/time_get/get_date/wchar_t/12791.cc (test01):
143 Similarly.
144 * testsuite/22_locale/time_get/get_time/char/2.cc (test02): Add " PM"
145 to the string.
146 * testsuite/22_locale/time_get/get_time/char/5.cc (test01): Expect
147 tm_hour 1 rather than 0.
148 * testsuite/22_locale/time_get/get_time/wchar_t/2.cc (test02): Add
149 " PM" to the string.
150 * testsuite/22_locale/time_get/get_time/wchar_t/5.cc (test01): Expect
151 tm_hour 1 rather than 0.
152
1532021-12-10 Jonathan Wakely <jwakely@redhat.com>
154
155 PR libstdc++/103638
156 * include/bits/atomic_timed_wait.h: Check _GLIBCXX_HAS_GTHREADS
157 before using std::mutex and std::__condvar.
158
1592021-12-10 Jonathan Wakely <jwakely@redhat.com>
160
161 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Add _GLIBCXX_
162 prefix to NO_SLEEP macro.
163 * config.h.in: Regenerate.
164 * configure: Regenerate.
165
1662021-12-10 Jonathan Wakely <jwakely@redhat.com>
167
168 * include/bits/char_traits.h: Change pragma push to pop.
169
1702021-12-10 Thomas Rodgers <rodgert@twrodgers.com>
171
172 PR libstdc++/102994
173 * include/bits/atomic_base.h (__atomic_base<_PTp*>::wait()):
174 Add const qualifier.
175 * include/std/atomic (atomic<_Tp*>::wait(), atomic_wait()):
176 Likewise.
177 * testsuite/29_atomics/atomic/wait_notify/102994.cc:
178 New test.
179
1802021-12-09 Jonathan Wakely <jwakely@redhat.com>
181
182 * include/bits/stl_iterator.h (operator==, operator<=>): Define
183 overloads for homogeneous specializations of reverse_iterator,
184 __normal_iterator and move_iterator.
185
1862021-12-09 Jonathan Wakely <jwakely@redhat.com>
187
188 * testsuite/20_util/scoped_allocator/69293_neg.cc: Remove
189 dg-error for c++20.
190
1912021-12-09 Jonathan Wakely <jwakely@redhat.com>
192
193 PR libstdc++/85813
194 * libsupc++/exception_ptr.h (__dest_thunk): Add macro for
195 destructor calling convention.
196 (make_exception_ptr): Enable non-throwing implementation for
197 -fno-exceptions and for non-standard calling conventions. Use
198 always_inline attribute on the useless no-rtti no-exceptions
199 definition.
200 * testsuite/18_support/exception_ptr/64241.cc: Add -fno-rtti so
201 the no-op implementation is still used.
202
2032021-12-09 Jonathan Wakely <jwakely@redhat.com>
204
205 PR libstdc++/103630
206 * libsupc++/exception_ptr.h (exception_ptr): Fix exception
207 specifications on inline definitions.
208 (make_exception_ptr): Decay the template parameter. Use typeid
209 of the static type.
210 * testsuite/18_support/exception_ptr/103630.cc: New test.
211
2122021-12-09 Jonathan Wakely <jwakely@redhat.com>
213
214 PR libstdc++/59769
215 * config/io/basic_file_stdio.cc (fopen_mode): Add support for
216 exclusive mode.
217 * include/bits/ios_base.h (_S_noreplace): Define new enumerator.
218 (ios_base::__noreplace): Define.
219 (ios_base::noreplace): Define for C++23.
220 * include/std/version (__cpp_lib_ios_noreplace): Define.
221 * testsuite/27_io/basic_ofstream/open/char/noreplace.cc: New test.
222 * testsuite/27_io/basic_ofstream/open/wchar_t/noreplace.cc: New test.
223
2242021-12-09 Jonathan Wakely <jwakely@redhat.com>
225
226 PR libstdc++/103382
227 * config/abi/pre/gnu.ver (GLIBCXX_3.4.11): Do not export old
228 symbol if .symver renaming is supported.
229 (GLIBCXX_3.4.30): Export new symbol if .symver renaming is
230 supported.
231 * doc/xml/manual/evolution.xml: Document change.
232 * doc/html/manual/api.html: Regenerate.
233 * include/bits/std_mutex.h (__condvar::wait, __condvar::wait_until):
234 Remove noexcept.
235 * include/std/condition_variable (condition_variable::wait):
236 Likewise.
237 * src/c++11/condition_variable.cc (condition_variable::wait):
238 Likewise.
239 * src/c++11/compatibility-condvar.cc (__nothrow_wait_cv::wait):
240 Define nothrow wrapper around std::condition_variable::wait and
241 export the old symbol as an alias to it.
242 * testsuite/30_threads/condition_variable/members/103382.cc: New test.
243
2442021-12-09 Jonathan Wakely <jwakely@redhat.com>
245
246 PR libstdc++/92300
247 * include/bits/stl_map.h (insert(Pair&&), emplace(Args&&...)):
248 Check whether the arguments can be looked up directly without
249 constructing a temporary node first.
250 * include/bits/stl_pair.h (__is_pair): Move to here, from ...
251 * include/bits/uses_allocator_args.h (__is_pair): ... here.
252 * testsuite/23_containers/map/modifiers/emplace/92300.cc: New test.
253 * testsuite/23_containers/map/modifiers/insert/92300.cc: New test.
254
2552021-12-09 Jonathan Wakely <jwakely@redhat.com>
256
257 * include/bits/cow_string.h (basic_string::_M_leak_hard): Do not
258 reallocate an empty string.
259
2602021-12-09 Jonathan Wakely <jwakely@redhat.com>
261
262 PR libstdc++/103332
263 PR libstdc++/102958
264 PR libstdc++/103483
265 * include/bits/char_traits.h: Suppress stringop and array-bounds
266 warnings.
267
2682021-12-09 Jonathan Wakely <jwakely@redhat.com>
269
270 PR libstdc++/64135
271 * config/allocator/new_allocator_base.h: Include
272 <bits/new_allocator.h> instead of <ext/new_allocator.h>.
273 (__allocator_base): Use std::__new_allocator instead of
274 __gnu_cxx::new_allocator.
275 * doc/xml/manual/allocator.xml: Document new default base class
276 for std::allocator.
277 * doc/xml/manual/evolution.xml: Likewise.
278 * doc/html/*: Regenerate.
279 * include/Makefile.am: Add bits/new_allocator.h.
280 * include/Makefile.in: Regenerate.
281 * include/experimental/memory_resource (new_delete_resource):
282 Use std::__new_allocator instead of __gnu_cxx::new_allocator.
283 * include/ext/new_allocator.h (new_allocator): Derive from
284 std::__new_allocator. Move implementation to ...
285 * include/bits/new_allocator.h: New file.
286 * testsuite/20_util/allocator/64135.cc: New test.
287
2882021-12-08 Jonathan Wakely <jwakely@redhat.com>
289
290 * include/bits/shared_ptr_base.h (_Sp_counted_base::_M_release()):
291 Make shift width conditional on __double_word condition.
292
2932021-12-08 François Dumont <fdumont@gcc.gnu.org>
294
295 * include/std/deque (erase_if): Use _GLIBCXX_STD_C container reference and
296 __niter_wrap to limit _GLIBCXX_DEBUG mode impact.
297 * include/std/vector (erase_if): Likewise.
298
2992021-12-08 Maged Michael <maged.michael@gmail.com>
300 Jonathan Wakely <jwakely@redhat.com>
301
302 * include/bits/c++config (_GLIBCXX_TSAN): Define macro
303 indicating that TSan is in use.
304 * include/bits/shared_ptr_base.h (_Sp_counted_base::_M_release):
305 Replace definition in primary template with explicit
306 specializations for _S_mutex and _S_atomic policies.
307 (_Sp_counted_base<_S_mutex>::_M_release): New specialization.
308 (_Sp_counted_base<_S_atomic>::_M_release): New specialization,
309 using a single atomic load to access both reference counts at
310 once.
311 (_Sp_counted_base::_M_release_last_use): New member function.
312
3132021-12-07 Tamar Christina <tamar.christina@arm.com>
314
315 Revert:
316 2021-11-19 Tamar Christina <tamar.christina@arm.com>
317
318 PR libstdc++/103305
319 * config/os/newlib/ctype_base.h (upper, lower, alpha, digit, xdigit,
320 space, print, graph, cntrl, punct, alnum, blank): Use short or long
321 names depending on if short ones are defined.
322
3232021-12-04 Jonathan Wakely <jwakely@redhat.com>
324
325 PR libstdc++/103549
326 * include/bits/regex.h (match_results): Give names to template
327 parameters in first declaration.
328 (match_results::_M_begin): Add default member-initializer.
329
3302021-12-03 Jonathan Wakely <jwakely@redhat.com>
331
332 * include/bits/stl_tree.h (_Rb_tree::_Auto_node): Define new
333 RAII helper for creating and inserting new nodes.
334 (_Rb_tree::_M_insert_node): Use trailing-return-type to simplify
335 out-of-line definition.
336 (_Rb_tree::_M_insert_lower_node): Likewise.
337 (_Rb_tree::_M_insert_equal_lower_node): Likewise.
338 (_Rb_tree::_M_emplace_unique): Likewise. Use _Auto_node.
339 (_Rb_tree::_M_emplace_equal): Likewise.
340 (_Rb_tree::_M_emplace_hint_unique): Likewise.
341 (_Rb_tree::_M_emplace_hint_equal): Likewise.
342
3432021-12-02 Jonathan Wakely <jwakely@redhat.com>
344
345 * src/c++11/cow-stdexcept.cc [_GLIBCXX_FULLY_DYNAMIC_STRING]
346 (logic_error, runtime_error): Remove custom definitions.
347
3482021-12-02 Jonathan Wakely <jwakely@redhat.com>
349
350 PR libstdc++/103340
351 PR libstdc++/103400
352 PR libstdc++/103381
353 * acinclude.m4 (GLIBCXX_ENABLE_ALLOCATOR): Remove mt, bitmap
354 and pool options.
355 * configure: Regenerate.
356 * config/allocator/bitmap_allocator_base.h: Removed.
357 * config/allocator/mt_allocator_base.h: Removed.
358 * config/allocator/pool_allocator_base.h: Removed.
359 * doc/xml/manual/allocator.xml: Update.
360 * doc/xml/manual/configure.xml: Update.
361 * doc/xml/manual/evolution.xml: Document removal.
362 * doc/xml/manual/mt_allocator.xml: Editorial tweaks.
363 * doc/html/manual/*: Regenerate.
364
3652021-12-02 Jonathan Wakely <jwakely@redhat.com>
366
367 * include/bits/cow_string.h (basic_string::_M_is_leaked()):
368 Revert change to check __is_single_threaded() before using
369 atomic load.
370
3712021-12-01 Jonathan Wakely <jwakely@redhat.com>
372
373 PR libstdc++/103501
374 * include/bits/stl_tree.h (_Rb_tree(_Rb_tree&&, false_type)):
375 Clear container if elements have been moved-from.
376 * testsuite/23_containers/map/allocator/move_cons.cc: Expect
377 moved-from container to be empty.
378 * testsuite/23_containers/multimap/allocator/move_cons.cc:
379 Likewise.
380 * testsuite/23_containers/multiset/allocator/103501.cc: New test.
381 * testsuite/23_containers/set/allocator/103501.cc: New test.
382
3832021-12-01 Jonathan Wakely <jwakely@redhat.com>
384
385 * doc/doxygen/user.cfg.in (PREDEFINED): Change macro name.
386 * include/bits/allocator.h (allocate, deallocate): Use
387 std::__is_constant_evaluated() unconditionally, instead of
388 checking whether std::is_constant_evaluated() (or the built-in)
389 can be used.
390 * include/bits/basic_string.h: Check new macro. call
391 std::is_constant_evaluated() directly in C++20-only code that is
392 guarded by a suitable macro.
393 * include/bits/basic_string.tcc: Likewise.
394 * include/bits/c++config (__is_constant_evaluated): Define.
395 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED): Replace with ...
396 (_GLIBCXX_HAVE_IS_CONSTANT_EVALUATED): New macro.
397 * include/bits/char_traits.h (char_traits): Replace conditional
398 calls to std::is_constant_evaluated with unconditional calls to
399 std::__is_constant_evaluated.
400 * include/bits/cow_string.h: Use new macro.
401 * include/bits/ranges_algobase.h (__copy_or_move): Replace
402 conditional calls to std::is_constant_evaluated with unconditional
403 calls to std::__is_constant_evaluated.
404 (__copy_or_move_backward, __fill_n_fn): Likewise.
405 * include/bits/ranges_cmp.h (ranges::less): Likewise.
406 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
407 Likewise.
408 * include/bits/stl_bvector.h: Call std::is_constant_evaluated
409 directly in C++20-only code that is guarded by a suitable macro.
410 * include/bits/stl_construct.h (_Construct, _Destroy, _Destroy_n):
411 Replace is_constant_evaluated with __is_constant_evaluated.
412 * include/bits/stl_function.h (greater, less, greater_equal)
413 (less_equal): Replace __builtin_is_constant_evaluated and
414 __builtin_constant_p with __is_constant_evaluated.
415 * include/bits/stl_vector.h: Call std::is_constant_evaluated()
416 in C++20-only code.
417 * include/debug/helper_functions.h (__check_singular): Use
418 __is_constant_evaluated instead of built-in, or remove check
419 entirely.
420 * include/std/array (operator<=>): Use __is_constant_evaluated
421 unconditionally.
422 * include/std/bit (__bit_ceil): Likewise.
423 * include/std/type_traits (is_constant_evaluated): Define using
424 'if consteval' if possible.
425 * include/std/version: Use new macro.
426 * libsupc++/compare: Use __is_constant_evaluated instead of
427 __builtin_is_constant_evaluated.
428 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
429 Adjust dg-error lines.
430
4312021-12-01 Jonathan Wakely <jwakely@redhat.com>
432
433 * include/bits/cow_string.h (basic_string::_M_is_leaked): Use
434 non-atomic load when __is_single_threaded() is true.
435 (basic_string::_M_is_shared): Likewise.
436 (basic_string::(basic_string&&)) [_GLIBCXX_FULLY_DYNAMIC_STRING]:
437 Use non-atomic store when rvalue is not shared.
438
4392021-12-01 Jonathan Wakely <jwakely@redhat.com>
440
441 * src/c++17/fs_path.cc (path::_M_split_cmpts()): Remove
442 micro-optimization for "/" path.
443 * src/filesystem/path.cc (path::_M_split_cmpts()): Only access
444 the contents of _M_pathname using const member functions.
445
4462021-11-30 Jonathan Wakely <jwakely@redhat.com>
447
448 * testsuite/21_strings/basic_string/cons/char/moveable.cc: Allow
449 moved-from string to be non-empty.
450 * testsuite/21_strings/basic_string/cons/char/moveable2.cc:
451 Likewise.
452 * testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc:
453 Likewise.
454 * testsuite/21_strings/basic_string/cons/wchar_t/moveable.cc:
455 Likewise.
456 * testsuite/21_strings/basic_string/cons/wchar_t/moveable2.cc:
457 Likewise.
458 * testsuite/21_strings/basic_string/cons/wchar_t/moveable2_c++17.cc:
459 Likewise.
460 * testsuite/21_strings/basic_string/modifiers/assign/char/87749.cc:
461 Construct empty string before setting oom flag.
462 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/87749.cc:
463 Likewise.
464
4652021-11-30 Jonathan Wakely <jwakely@redhat.com>
466
467 * include/bits/cow_string.h (basic_string(basic_string&&)): Fix
468 mem-initializer for _GLIBCXX_FULLY_DYNAMIC_STRING==0 case.
469 * testsuite/21_strings/basic_string/cons/char/noexcept_move_construct.cc:
470 Remove outdated comment.
471 * testsuite/21_strings/basic_string/cons/wchar_t/noexcept_move_construct.cc:
472 Likewise.
473
4742021-11-30 Jonathan Wakely <jwakely@redhat.com>
475
476 * src/c++20/sstream-inst.cc (_GLIBCXX_USE_CXX11_ABI): Define to
477 select new ABI.
478
4792021-11-30 Jonathan Wakely <jwakely@redhat.com>
480
481 * include/bits/stl_vector.h (vector::_S_do_relocate): Remove
482 C++20 constexpr specifier.
483 (vector::_S_relocate) [__cpp_if_constexpr]: Call __relocate_a
484 directly without tag dispatching.
485
4862021-11-30 Jonathan Wakely <jwakely@redhat.com>
487
488 PR libstdc++/103453
489 * config/allocator/malloc_allocator_base.h
490 (_GLIBCXX_SANITIZE_STD_ALLOCATOR): Define for Clang.
491 * config/allocator/new_allocator_base.h
492 (_GLIBCXX_SANITIZE_STD_ALLOCATOR): Likewise.
493
4942021-11-30 Jonathan Wakely <jwakely@redhat.com>
495
496 * doc/xml/manual/debug_mode.xml: Replace "his or her" with "their".
497 * doc/html/manual/debug_mode_design.html: Regenerate.
498
4992021-11-30 Jakub Jelinek <jakub@redhat.com>
500
501 * include/std/bit (byteswap): Add [[nodiscard]].
502
5032021-11-28 Jakub Jelinek <jakub@redhat.com>
504
505 * include/std/bit (__cpp_lib_byteswap, byteswap): Define.
506 * include/std/version (__cpp_lib_byteswap): Define.
507 * testsuite/26_numerics/bit/bit.byteswap/byteswap.cc: New test.
508 * testsuite/26_numerics/bit/bit.byteswap/version.cc: New test.
509
5102021-11-26 Jonathan Wakely <jwakely@redhat.com>
511
512 * testsuite/24_iterators/move_iterator/dr3265.cc: Fix test to
513 account for LWG 3435 resolution.
514
5152021-11-26 Jonathan Wakely <jwakely@redhat.com>
516
517 * include/bits/stl_uninitialized.h (__relocate_a_1): Do not use
518 memmove during constant evaluation.
519 * include/bits/stl_vector.h (vector::_S_use_relocate()): Do not
520 check is_constant_evaluated in always-constexpr function.
521
5222021-11-26 Jonathan Wakely <jwakely@redhat.com>
523
524 PR libstdc++/96592
525 * include/std/tuple (tuple::is_constructible): Remove.
526
5272021-11-26 Jonathan Wakely <jwakely@redhat.com>
528
529 * testsuite/29_atomics/atomic_float/1.cc: Reorder directives.
530
5312021-11-26 Jonathan Wakely <jwakely@redhat.com>
532
533 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
534 Change dg-do compile to run.
535 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
536 Likewise.
537
5382021-11-26 Jonathan Wakely <jwakely@redhat.com>
539
540 * testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
541 Remove xfail selector.
542 * testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc:
543 Likewise.
544 Likewise.
545 * testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
546 Likewise.
547 * testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
548 Likewise.
549 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc:
550 Likewise.
551 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
552 Likewise.
553 * testsuite/23_containers/span/101411.cc: Likewise.
554 * testsuite/25_algorithms/copy/debug/constexpr_neg.cc: Likewise.
555 * testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc:
556 Likewise.
557 * testsuite/25_algorithms/equal/constexpr_neg.cc: Likewise.
558 * testsuite/25_algorithms/equal/debug/constexpr_neg.cc: Likewise.
559 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc:
560 Likewise.
561 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc:
562 Likewise.
563 * testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc:
564 Likewise.
565 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc:
566 Likewise.
567 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc:
568 Likewise.
569 * testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc:
570 Likewise.
571
5722021-11-26 Jonathan Wakely <jwakely@redhat.com>
573
574 * testsuite/20_util/pointer_traits/lwg3545.cc: Move to_address
575 tests to ...
576 * testsuite/20_util/to_address/lwg3545.cc: ... here. Add -std
577 option before checking effective target.
578
5792021-11-25 Jonathan Wakely <jwakely@redhat.com>
580
581 * testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
582 Remove dg-error for C++11_only error.
583
5842021-11-25 Jonathan Wakely <jwakely@redhat.com>
585
586 PR libstdc++/96416
587 * include/bits/ptr_traits.h (pointer_traits): Reimplement to be
588 SFINAE-friendly (LWG 3545).
589 * testsuite/20_util/pointer_traits/lwg3545.cc: New test.
590 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line.
591 * testsuite/20_util/to_address/lwg3545.cc: New test.
592
5932021-11-25 Jonathan Wakely <jwakely@redhat.com>
594
595 PR libstdc++/101608
596 * include/bits/ranges_algobase.h (__fill_n_fn): Check for
597 constant evaluation before using memset.
598 * testsuite/25_algorithms/fill_n/constrained.cc: Check
599 byte-sized values as well.
600
6012021-11-24 Jonathan Wakely <jwakely@redhat.com>
602
603 * testsuite/libstdc++-prettyprinters/80276.cc: Add xfail for
604 debug mode.
605 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
606
6072021-11-24 Jonathan Wakely <jwakely@redhat.com>
608
609 * testsuite/lib/libstdc++.exp: Rename effective target keywords
610 to avoid dashes in the name.
611 * testsuite/*: Update effective targe keywords.
612
6132021-11-23 Jonathan Wakely <jwakely@redhat.com>
614
615 PR libstdc++/103086
616 * testsuite/libstdc++-prettyprinters/cxx11.cc: Check unique_ptr
617 with non-empty pointer and non-empty deleter.
618
6192021-11-23 Jonathan Wakely <jwakely@redhat.com>
620
621 * testsuite/18_support/50594.cc: Check effective target.
622 * testsuite/20_util/allocator/1.cc: Likewise.
623 * testsuite/20_util/allocator/overaligned.cc: Likewise.
624 * testsuite/23_containers/unordered_map/96088.cc: Likewise.
625 * testsuite/23_containers/unordered_multimap/96088.cc: Likewise.
626 * testsuite/23_containers/unordered_multiset/96088.cc: Likewise.
627 * testsuite/23_containers/unordered_set/96088.cc: Likewise.
628 * testsuite/ext/throw_allocator/check_delete.cc: Likewise.
629 * testsuite/ext/throw_allocator/check_new.cc: Likewise.
630 * testsuite/lib/libstdc++.exp (check_effective_target_std_allocator_new):
631 Define new proc.
632
6332021-11-23 Jonathan Wakely <jwakely@redhat.com>
634
635 PR libstdc++/103381
636 * include/ext/bitmap_allocator.h: Include <bits/stl_function.h>
637 instead of <functional>.
638
6392021-11-22 Jonathan Wakely <jwakely@redhat.com>
640
641 * include/bits/c++config (_GLIBCXX14_DEPRECATED): Fix condition
642 checking for C++14.
643
6442021-11-20 François Dumont <fdumont@gcc.gnu.org>
645
646 * include/bits/erase_if.h (__erase_nodes_if): Add _UnsafeContainer template
647 parameter. Use it to get iterators to work with.
648 * include/debug/macros.h (__glibcxx_check_erase2): New.
649 * include/debug/map.h (map<>::erase(_Base_const_iterator)): New.
650 (map<>::erase(const_iterator)): Use latter.
651 * include/debug/multimap.h (multimap<>::erase(_Base_const_iterator)): New.
652 (multimap<>::erase(const_iterator)): Use latter.
653 * include/debug/multiset.h (multiset<>::erase(_Base_const_iterator)): New.
654 (multiset<>::erase(const_iterator)): Use latter.
655 * include/debug/set.h (set<>::erase(_Base_const_iterator)): New.
656 (set<>::erase(const_iterator)): Use latter.
657 * include/debug/unordered_map (unordered_map<>::erase(_Base_const_iterator)): New.
658 (unordered_multimap<>::erase(const_iterator)): New.
659 * include/debug/unordered_set (unordered_set<>::erase(_Base_const_iterator)): New.
660 (unordered_multiset<>::erase(const_iterator)): New.
661 * include/experimental/map (erase_if): Adapt.
662 * include/experimental/set (erase_if): Adapt.
663 * include/experimental/unordered_map (erase_if): Adapt.
664 * include/experimental/unordered_set (erase_if): Adapt.
665 * include/std/map (erase_if): Adapt.
666 * include/std/set (erase_if): Adapt.
667 * include/std/unordered_map (erase_if): Adapt.
668 * include/std/unordered_set (erase_if): Adapt.
669
6702021-11-19 Jonathan Wakely <jwakely@redhat.com>
671
672 * testsuite/27_io/basic_istringstream/cons/char/1.cc: Check all
673 constructors.
674 * testsuite/27_io/basic_istringstream/cons/wchar_t/1.cc:
675 Likewise.
676 * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
677 * testsuite/27_io/basic_ostringstream/cons/wchar_t/1.cc:
678 Likewise.
679 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
680 * testsuite/27_io/basic_stringstream/cons/wchar_t/1.cc:
681 Likewise.
682
6832021-11-19 Jonathan Wakely <jwakely@redhat.com>
684
685 * src/c++98/locale_init.cc (_S_initialize_once): Check if
686 initialization has already been done.
687 (_S_initialize): Replace __gthread_active_p with
688 __is_single_threaded. Use __builtin_expect.
689
6902021-11-19 Jonathan Wakely <jwakely@redhat.com>
691
692 PR libstdc++/103295
693 * include/bits/basic_string.tcc (_M_construct): Use the
694 traits assign member to write into allcoated memory.
695
6962021-11-19 Iain Sandoe <iain@sandoe.co.uk>
697
698 * testsuite/lib/prune.exp: Prune dsymutil (ld64) warning.
699
7002021-11-19 Jonathan Wakely <jwakely@redhat.com>
701
702 PR libstdc++/103332
703 PR libstdc++/102958
704 * testsuite/21_strings/basic_string/capacity/char/1.cc: Add
705 -Wno-stringop-overflow.
706 * testsuite/21_strings/basic_string/operators/char/1.cc:
707 Likewise.
708 * testsuite/experimental/filesystem/path/factory/u8path-char8_t.cc:
709 Add -Wno-stringop-overread.
710
7112021-11-19 Jonathan Wakely <jwakely@redhat.com>
712
713 PR libstdc++/103295
714 * include/bits/basic_string.h (_Alloc_traits): Replace typedef
715 with struct for C++20 mode.
716 * include/bits/basic_string.tcc (_M_replace): Use _Alloc_traits
717 for allocation.
718 * include/bits/char_traits.h (__gnu_cxx::char_traits::assign):
719 Use std::_Construct during constant evaluation.
720 (__gnu_cxx::char_traits::assign(CharT*, const CharT*, size_t)):
721 Likewise. Replace std::fill_n with memset or manual loop.
722 (__gnu_cxx::char_traits::copy): Likewise, replacing std::copy
723 with memcpy.
724 * include/ext/vstring.h: Include <bits/stl_algobase.h> for
725 std::min.
726 * include/std/string_view: Likewise.
727 * testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc:
728 Add constexpr test.
729
7302021-11-19 Tamar Christina <tamar.christina@arm.com>
731
732 PR libstdc++/103305
733 * config/os/newlib/ctype_base.h (upper, lower, alpha, digit, xdigit,
734 space, print, graph, cntrl, punct, alnum, blank): Use short or long
735 names depending on if short ones are defined.
736
7372021-11-18 Jonathan Wakely <jwakely@redhat.com>
738
739 * include/bits/char_traits.h (__gnu_cxx::char_traits::move):
740 Do not compare unrelated pointers during constant evaluation.
741 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
742 Improve tests for char_traits::move.
743
7442021-11-18 Jonathan Wakely <jwakely@redhat.com>
745
746 * acinclude.m4: Replace AC_CACHE_VAL with AC_CACHE_CHECK.
747 * configure: Regenerate.
748
7492021-11-17 Jonathan Wakely <jwakely@redhat.com>
750
751 * include/experimental/internet (address): Use std::_Construct
752 to initialize union members.
753
7542021-11-17 Jonathan Wakely <jwakely@redhat.com>
755
756 * include/bits/basic_string.h (_M_construct_aux): Only define
757 for C++98. Remove constexpr.
758 (_M_construct_aux_2): Likewise.
759 (_M_construct(InputIter, InputIter)): Remove.
760 (basic_string(const basic_string&)): Call _M_construct with
761 iterator category argument.
762 (basic_string(const basic_string&, size_type, const Alloc&)):
763 Likewise.
764 (basic_string(const basic_string&, size_type, size_type)):
765 Likewise.
766 (basic_string(const charT*, size_type, const Alloc&)): Likewise.
767 Check for null pointer.
768 (basic_string(const charT*, const Alloc&)): Likewise.
769 (basic_string(initializer_list<charT>, const Alloc&)): Call
770 _M_construct with iterator category argument.
771 (basic_string(const basic_string&, const Alloc&)): Likewise.
772 (basic_string(basic_string&&, const Alloc&)): Likewise.
773 (basic_string(_InputIter, _InputIter, const Alloc&)): Likewise
774 for C++11 and later, call _M_construct_aux for C++98.
775 * include/bits/basic_string.tcc
776 (_M_construct(I, I, input_iterator_tag)): Replace try-block with
777 RAII type.
778 (_M_construct(I, I, forward_iterator_tag)): Likewise. Remove
779 __is_null_pointer check.
780
7812021-11-17 Jonathan Wakely <jwakely@redhat.com>
782
783 PR libstdc++/103295
784 * include/bits/basic_string.h (_M_use_local_data()): New
785 member function to make local buffer the active member.
786 (assign(const basic_string&)): Use it.
787 * include/bits/basic_string.tcc (_M_construct, reserve()):
788 Likewise.
789
7902021-11-17 Jonathan Wakely <jwakely@redhat.com>
791
792 PR libstdc++/103240
793 * libsupc++/tinfo2.cc (type_info::before): Use unadjusted name
794 to check for the '*' prefix.
795 * testsuite/util/testsuite_shared.cc: Add type_info object for
796 use in new test.
797 * testsuite/18_support/type_info/103240.cc: New test.
798
7992021-11-16 Jonathan Wakely <jwakely@redhat.com>
800
801 * include/bits/basic_string.h (operator<=>): Use constexpr
802 unconditionally.
803 * testsuite/21_strings/basic_string/modifiers/constexpr.cc:
804 Require cxx11-abit effective target.
805 * testsuite/21_strings/headers/string/synopsis.cc: Add
806 conditional constexpr to declarations, and adjust relational
807 operators for C++20.
808
8092021-11-16 Patrick Palka <ppalka@redhat.com>
810
811 * src/c++17/ryu/MERGE: Update the commit hash.
812 * src/c++17/ryu/d2s_intrinsics.h: Merge from Ryu's master
813 branch.
814
8152021-11-16 Jonathan Wakely <jwakely@redhat.com>
816
817 * include/bits/basic_string.h (basic_string, operator""s): Add
818 constexpr for C++20.
819 (basic_string::basic_string(basic_string&&)): Only copy
820 initialized portion of the buffer.
821 (basic_string::basic_string(basic_string&&, const Alloc&)):
822 Likewise.
823 * include/bits/basic_string.tcc (basic_string): Add constexpr
824 for C++20.
825 (basic_string::swap(basic_string&)): Only copy initialized
826 portions of the buffers.
827 (basic_string::_M_replace): Add constexpr implementation that
828 doesn't depend on pointer comparisons.
829 * include/bits/cow_string.h: Adjust comment.
830 * include/ext/type_traits.h (__is_null_pointer): Add constexpr.
831 * include/std/string (erase, erase_if): Add constexpr.
832 * include/std/version (__cpp_lib_constexpr_string): Update
833 value.
834 * testsuite/21_strings/basic_string/cons/char/constexpr.cc:
835 New test.
836 * testsuite/21_strings/basic_string/cons/wchar_t/constexpr.cc:
837 New test.
838 * testsuite/21_strings/basic_string/literals/constexpr.cc:
839 New test.
840 * testsuite/21_strings/basic_string/modifiers/constexpr.cc: New test.
841 * testsuite/21_strings/basic_string/modifiers/swap/char/constexpr.cc:
842 New test.
843 * testsuite/21_strings/basic_string/modifiers/swap/wchar_t/constexpr.cc:
844 New test.
845 * testsuite/21_strings/basic_string/version.cc: New test.
846
8472021-11-16 Jonathan Wakely <jwakely@redhat.com>
848
849 * include/bits/stl_bvector.h (swap(_Bit_reference, _Bit_reference))
850 (swap(_Bit_reference, bool&), swap(bool&, _Bit_reference)):
851 Define as hidden friends of _Bit_reference.
852
8532021-11-16 Jonathan Wakely <jwakely@redhat.com>
854
855 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/1.cc:
856 Fix reads past the end of strings.
857 * testsuite/21_strings/basic_string/operations/compare/wchar_t/1.cc:
858 Likewise.
859 * testsuite/experimental/string_view/operations/compare/wchar_t/1.cc:
860 Likewise.
861
8622021-11-16 Jonathan Wakely <jwakely@redhat.com>
863
864 * testsuite/21_strings/basic_string/allocator/71964.cc: Fix
865 typo.
866 * testsuite/23_containers/set/allocator/71964.cc: Likewise.
867
8682021-11-15 Jason Merrill <jason@redhat.com>
869
870 * testsuite/20_util/to_address/1_neg.cc: Adjust error.
871 * testsuite/26_numerics/random/concept.cc: Adjust asserts.
872
8732021-11-15 François Dumont <fdumont@gcc.gnu.org>
874
875 * include/bits/hashtable_policy.h:
876 (_Hash_code_base<>::_M_hash_code(const _Hash&, const _Hash_node_value<_Value, true>&)): New.
877 (_Hash_code_base<>::_M_hash_code<_H2>(const _H2&, const _Hash_node_value<>&)): New.
878 * include/bits/hashtable.h (_Hashtable<>::_M_merge_unique): Use latter.
879 (_Hashtable<>::_M_merge_multi): Likewise.
880 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc (test05): New test.
881 * testsuite/23_containers/unordered_set/modifiers/merge.cc (test04): New test.
882
8832021-11-15 Jason Merrill <jason@redhat.com>
884
885 * src/c++17/memory_resource.cc: Add missing constexpr.
886 * include/experimental/internet: Only mark copy constructor
887 as constexpr with __cpp_constexpr_dynamic_alloc.
888
8892021-11-14 François Dumont <fdumont@gcc.gnu.org>
890
891 * include/debug/safe_container.h (_Safe_container<>::_M_safe): Remove.
892 * include/debug/deque (deque::operator=(initializer_list<>)): Replace
893 _M_base() call with _Base:: call.
894 (deque::operator[](size_type)): Likewise.
895 * include/debug/forward_list (forward_list(forward_list&&, const allocator_type&)):
896 Remove _M_safe() and _M_base() calls.
897 (forward_list::operator=(initializer_list<>)): Remove _M_base() calls.
898 (forward_list::splice_after, forward_list::merge): Likewise.
899 * include/debug/list (list(list&&, const allocator_type&)):
900 Remove _M_safe() and _M_base() calls.
901 (list::operator=(initializer_list<>)): Remove _M_base() calls.
902 (list::splice, list::merge): Likewise.
903 * include/debug/map.h (map(map&&, const allocator_type&)):
904 Remove _M_safe() and _M_base() calls.
905 (map::operator=(initializer_list<>)): Remove _M_base() calls.
906 * include/debug/multimap.h (multimap(multimap&&, const allocator_type&)):
907 Remove _M_safe() and _M_base() calls.
908 (multimap::operator=(initializer_list<>)): Remove _M_base() calls.
909 * include/debug/set.h (set(set&&, const allocator_type&)):
910 Remove _M_safe() and _M_base() calls.
911 (set::operator=(initializer_list<>)): Remove _M_base() calls.
912 * include/debug/multiset.h (multiset(multiset&&, const allocator_type&)):
913 Remove _M_safe() and _M_base() calls.
914 (multiset::operator=(initializer_list<>)): Remove _M_base() calls.
915 * include/debug/string (basic_string(basic_string&&, const allocator_type&)):
916 Remove _M_safe() and _M_base() calls.
917 (basic_string::operator=(initializer_list<>)): Remove _M_base() call.
918 (basic_string::operator=(const _CharT*), basic_string::operator=(_CharT)): Likewise.
919 (basic_string::operator[](size_type), basic_string::operator+=(const basic_string&)):
920 Likewise.
921 (basic_string::operator+=(const _Char*), basic_string::operator+=(_CharT)): Likewise.
922 * include/debug/unordered_map (unordered_map(unordered_map&&, const allocator_type&)):
923 Remove _M_safe() and _M_base() calls.
924 (unordered_map::operator=(initializer_list<>), unordered_map::merge):
925 Remove _M_base() calls.
926 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
927 Remove _M_safe() and _M_base() calls.
928 (unordered_multimap::operator=(initializer_list<>), unordered_multimap::merge):
929 Remove _M_base() calls.
930 * include/debug/unordered_set (unordered_set(unordered_set&&, const allocator_type&)):
931 Remove _M_safe() and _M_base() calls.
932 (unordered_set::operator=(initializer_list<>), unordered_set::merge):
933 Remove _M_base() calls.
934 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
935 Remove _M_safe() and _M_base() calls.
936 (unordered_multiset::operator=(initializer_list<>), unordered_multiset::merge):
937 Remove _M_base() calls.
938 * include/debug/vector (vector(vector&&, const allocator_type&)):
939 Remove _M_safe() and _M_base() calls.
940 (vector::operator=(initializer_list<>)): Remove _M_base() calls.
941 (vector::operator[](size_type)): Likewise.
942
9432021-11-13 Jonathan Wakely <jwakely@redhat.com>
944
945 * include/Makefile.am: Add spanstream header.
946 * include/Makefile.in: Regenerate.
947 * include/precompiled/stdc++.h: Add spanstream header.
948 * include/std/version (__cpp_lib_spanstream): Define.
949 * include/std/spanstream: New file.
950 * testsuite/27_io/spanstream/1.cc: New test.
951 * testsuite/27_io/spanstream/version.cc: New test.
952
9532021-11-13 Hans-Peter Nilsson <hp@axis.com>
954
955 PR libstdc++/103166
956 * acinclude.m4 (GLIBCXX_CHECK_GETENTROPY, GLIBCXX_CHECK_ARC4RANDOM):
957 Use GCC_TRY_COMPILE_OR_LINK instead of AC_TRY_COMPILE.
958 * configure: Regenerate.
959
9602021-11-12 Jonathan Wakely <jwakely@redhat.com>
961
962 PR libstdc++/59675
963 * acinclude.m4 (libtool_VERSION): Bump version.
964 * config/abi/pre/gnu.ver (GLIBCXX_3.4.30): Add version and
965 export new symbol.
966 * configure: Regenerate.
967 * include/bits/c++config (__replacement_assert): Remove, declare
968 __glibcxx_assert_fail instead.
969 * src/c++11/debug.cc (__glibcxx_assert_fail): New function to
970 replace __replacement_assert, writing to stderr instead of
971 stdout.
972 * testsuite/util/testsuite_abi.cc: Update latest version.
973
9742021-11-12 Jonathan Wakely <jwakely@redhat.com>
975 Josh Marshall <joshua.r.marshall.1991@gmail.com>
976
977 * include/bits/alloc_traits.h (_Destroy): Make constexpr for
978 C++20 mode.
979 * include/bits/allocator.h (__shrink_to_fit::_S_do_it):
980 Likewise.
981 * include/bits/stl_algobase.h (__fill_a1): Declare _Bit_iterator
982 overload constexpr for C++20.
983 * include/bits/stl_bvector.h (_Bit_type, _S_word_bit): Move out
984 of inline namespace.
985 (_Bit_reference, _Bit_iterator_base, _Bit_iterator)
986 (_Bit_const_iterator, _Bvector_impl_data, _Bvector_base)
987 (vector<bool, A>>): Add constexpr to every member function.
988 (_Bvector_base::_M_allocate): Initialize storage during constant
989 evaluation.
990 (vector<bool, A>::_M_initialize_value): Use __fill_bvector_n
991 instead of memset.
992 (__fill_bvector_n): New helper function to replace memset during
993 constant evaluation.
994 * include/bits/stl_uninitialized.h (__uninitialized_copy<false>):
995 Move logic to ...
996 (__do_uninit_copy): New function.
997 (__uninitialized_fill<false>): Move logic to ...
998 (__do_uninit_fill): New function.
999 (__uninitialized_fill_n<false>): Move logic to ...
1000 (__do_uninit_fill_n): New function.
1001 (__uninitialized_copy_a): Add constexpr. Use __do_uninit_copy.
1002 (__uninitialized_move_a, __uninitialized_move_if_noexcept_a):
1003 Add constexpr.
1004 (__uninitialized_fill_a): Add constexpr. Use __do_uninit_fill.
1005 (__uninitialized_fill_n_a): Add constexpr. Use
1006 __do_uninit_fill_n.
1007 (__uninitialized_default_n, __uninitialized_default_n_a)
1008 (__relocate_a_1, __relocate_a): Add constexpr.
1009 * include/bits/stl_vector.h (_Vector_impl_data, _Vector_impl)
1010 (_Vector_base, vector): Add constexpr to every member function.
1011 (_Vector_impl::_S_adjust): Disable ASan annotation during
1012 constant evaluation.
1013 (_Vector_base::_S_use_relocate): Disable bitwise-relocation
1014 during constant evaluation.
1015 (vector::_Temporary_value): Use a union for storage.
1016 * include/bits/vector.tcc (vector, vector<bool>): Add constexpr
1017 to every member function.
1018 * include/std/vector (erase_if, erase): Add constexpr.
1019 * testsuite/23_containers/headers/vector/synopsis.cc: Add
1020 constexpr for C++20 mode.
1021 * testsuite/23_containers/vector/bool/cmp_c++20.cc: Change to
1022 compile-only test using constant expressions.
1023 * testsuite/23_containers/vector/bool/capacity/29134.cc: Adjust
1024 namespace for _S_word_bit.
1025 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1026 Likewise.
1027 * testsuite/23_containers/vector/cmp_c++20.cc: Likewise.
1028 * testsuite/23_containers/vector/cons/89164.cc: Adjust errors
1029 for C++20 and move C++17 test to ...
1030 * testsuite/23_containers/vector/cons/89164_c++17.cc: ... here.
1031 * testsuite/23_containers/vector/bool/capacity/constexpr.cc: New test.
1032 * testsuite/23_containers/vector/bool/cons/constexpr.cc: New test.
1033 * testsuite/23_containers/vector/bool/element_access/constexpr.cc: New test.
1034 * testsuite/23_containers/vector/bool/modifiers/assign/constexpr.cc: New test.
1035 * testsuite/23_containers/vector/bool/modifiers/constexpr.cc: New test.
1036 * testsuite/23_containers/vector/bool/modifiers/swap/constexpr.cc: New test.
1037 * testsuite/23_containers/vector/capacity/constexpr.cc: New test.
1038 * testsuite/23_containers/vector/cons/constexpr.cc: New test.
1039 * testsuite/23_containers/vector/data_access/constexpr.cc: New test.
1040 * testsuite/23_containers/vector/element_access/constexpr.cc: New test.
1041 * testsuite/23_containers/vector/modifiers/assign/constexpr.cc: New test.
1042 * testsuite/23_containers/vector/modifiers/constexpr.cc: New test.
1043 * testsuite/23_containers/vector/modifiers/swap/constexpr.cc: New test.
1044
10452021-11-11 Jonathan Wakely <jwakely@redhat.com>
1046
1047 * include/debug/deque (deque::operator=(const deque&)): Remove
1048 definition.
1049 * include/debug/list (list::operator=(const list&)): Likewise.
1050 * include/debug/map.h (map::operator=(const map&)): Likewise.
1051 * include/debug/multimap.h (multimap::operator=(const multimap&)):
1052 Likewise.
1053 * include/debug/multiset.h (multiset::operator=(const multiset&)):
1054 Likewise.
1055 * include/debug/set.h (set::operator=(const set&)): Likewise.
1056 * include/debug/string (basic_string::operator=(const basic_string&)):
1057 Likewise.
1058 * include/debug/vector (vector::operator=(const vector&)):
1059 Likewise.
1060 (_Safe_vector::operator=(const _Safe_vector&)): Define for
1061 C++98 as well.
1062
10632021-11-11 Jonathan Wakely <jwakely@redhat.com>
1064
1065 * include/std/memory_resource (memory_resource::allocate):
1066 Implicitly create objects in the returned storage.
1067
10682021-11-11 Jonathan Wakely <jwakely@redhat.com>
1069
1070 * include/bits/stl_bvector.h (vector<bool>::data()): Give
1071 protected access, and delete for C++11 and later.
1072
10732021-11-10 Jonathan Wakely <jwakely@redhat.com>
1074
1075 PR libstdc++/100117
1076 * testsuite/17_intro/headers/c++1998/49745.cc: Explicitly list
1077 all C++ headers instead of including <bits/stdc++.h>
1078
10792021-11-10 Jonathan Wakely <jwakely@redhat.com>
1080
1081 PR libstdc++/100748
1082 PR libstdc++/103133
1083 * config/os/gnu-linux/os_defines.h (_GLIBCXX_GTHREAD_USE_WEAK):
1084 Define for glibc 2.34 and later.
1085
10862021-11-09 François Dumont <fdumont@gcc.gnu.org>
1087
1088 * include/bits/hashtable_policy.h (__distance_fw): Replace class keyword with
1089 typename.
1090 * include/bits/hashtable.h (_Hashtable<>::_M_merge_unique): Remove noexcept
1091 qualification. Use const_iterator for node extraction/reinsert.
1092 (_Hashtable<>::_M_merge_multi): Likewise. Compute new hash code before extract.
1093 * include/debug/safe_container.h (_Safe_container<>): Make all methods
1094 protected.
1095 * include/debug/safe_unordered_container.h
1096 (_Safe_unordered_container<>::_UContInvalidatePred<_ExtractKey, _Source>): New.
1097 (_Safe_unordered_container<>::_UMContInvalidatePred<_ExtractKey, _Source>): New.
1098 (_Safe_unordered_container<>::_UContMergeGuard<_Source, _InvalidatePred>): New.
1099 (_Safe_unordered_container<>::_S_uc_guard<_ExtractKey, _Source>): New.
1100 (_Safe_unordered_container<>::_S_umc_guard<_ExtractKey, _Source>): New.
1101 (_Safe_unordered_container<>::_M_invalide_all): Make public.
1102 (_Safe_unordered_container<>::_M_invalide_if): Likewise.
1103 (_Safe_unordered_container<>::_M_invalide_local_if): Likewise.
1104 * include/debug/unordered_map
1105 (unordered_map<>::mapped_type, pointer, const_pointer): New typedef.
1106 (unordered_map<>::reference, const_reference, difference_type): New typedef.
1107 (unordered_map<>::get_allocator, empty, size, max_size): Add usings.
1108 (unordered_map<>::bucket_count, max_bucket_count, bucket): Add usings.
1109 (unordered_map<>::hash_function, key_equal, count, contains): Add usings.
1110 (unordered_map<>::operator[], at, rehash, reserve): Add usings.
1111 (unordered_map<>::merge): New.
1112 (unordered_multimap<>::mapped_type, pointer, const_pointer): New typedef.
1113 (unordered_multimap<>::reference, const_reference, difference_type): New typedef.
1114 (unordered_multimap<>::get_allocator, empty, size, max_size): Add usings.
1115 (unordered_multimap<>::bucket_count, max_bucket_count, bucket): Add usings.
1116 (unordered_multimap<>::hash_function, key_equal, count, contains): Add usings.
1117 (unordered_multimap<>::rehash, reserve): Add usings.
1118 (unordered_multimap<>::merge): New.
1119 * include/debug/unordered_set
1120 (unordered_set<>::mapped_type, pointer, const_pointer): New typedef.
1121 (unordered_set<>::reference, const_reference, difference_type): New typedef.
1122 (unordered_set<>::get_allocator, empty, size, max_size): Add usings.
1123 (unordered_set<>::bucket_count, max_bucket_count, bucket): Add usings.
1124 (unordered_set<>::hash_function, key_equal, count, contains): Add usings.
1125 (unordered_set<>::rehash, reserve): Add usings.
1126 (unordered_set<>::merge): New.
1127 (unordered_multiset<>::mapped_type, pointer, const_pointer): New typedef.
1128 (unordered_multiset<>::reference, const_reference, difference_type): New typedef.
1129 (unordered_multiset<>::get_allocator, empty, size, max_size): Add usings.
1130 (unordered_multiset<>::bucket_count, max_bucket_count, bucket): Add usings.
1131 (unordered_multiset<>::hash_function, key_equal, count, contains): Add usings.
1132 (unordered_multiset<>::rehash, reserve): Add usings.
1133 (unordered_multiset<>::merge): New.
1134 * testsuite/23_containers/unordered_map/debug/merge1_neg.cc: New test.
1135 * testsuite/23_containers/unordered_map/debug/merge2_neg.cc: New test.
1136 * testsuite/23_containers/unordered_map/debug/merge3_neg.cc: New test.
1137 * testsuite/23_containers/unordered_map/debug/merge4_neg.cc: New test.
1138 * testsuite/23_containers/unordered_multimap/debug/merge1_neg.cc: New test.
1139 * testsuite/23_containers/unordered_multimap/debug/merge2_neg.cc: New test.
1140 * testsuite/23_containers/unordered_multimap/debug/merge3_neg.cc: New test.
1141 * testsuite/23_containers/unordered_multimap/debug/merge4_neg.cc: New test.
1142 * testsuite/23_containers/unordered_multiset/debug/merge1_neg.cc: New test.
1143 * testsuite/23_containers/unordered_multiset/debug/merge2_neg.cc: New test.
1144 * testsuite/23_containers/unordered_multiset/debug/merge3_neg.cc: New test.
1145 * testsuite/23_containers/unordered_multiset/debug/merge4_neg.cc: New test.
1146 * testsuite/23_containers/unordered_set/debug/merge1_neg.cc: New test.
1147 * testsuite/23_containers/unordered_set/debug/merge2_neg.cc: New test.
1148 * testsuite/23_containers/unordered_set/debug/merge3_neg.cc: New test.
1149 * testsuite/23_containers/unordered_set/debug/merge4_neg.cc: New test.
1150 * testsuite/util/testsuite_abi.h: [_GLIBCXX_DEBUG] Use normal unordered
1151 container implementation.
1152
11532021-11-09 Jonathan Wakely <jwakely@redhat.com>
1154
1155 * testsuite/26_numerics/random/random_device/cons/token.cc:
1156 Print results of random_device_available checks.
1157
11582021-11-09 Jonathan Wakely <jwakely@redhat.com>
1159
1160 PR libstdc++/103146
1161 * src/c++11/random.cc: Check __powerpc64__ not __powerpc__.
1162
11632021-11-09 Jonathan Wakely <jwakely@redhat.com>
1164
1165 * acinclude.m4 (GLIBCXX_CHECK_GETENTROPY, GLIBCXX_CHECK_ARC4RANDOM):
1166 Define.
1167 * configure.ac (GLIBCXX_CHECK_GETENTROPY, GLIBCXX_CHECK_ARC4RANDOM):
1168 Use them.
1169 * config.h.in: Regenerate.
1170 * configure: Regenerate.
1171 * src/c++11/random.cc (random_device): Add getentropy and
1172 arc4random as sources.
1173 * testsuite/26_numerics/random/random_device/cons/token.cc:
1174 Check new tokens.
1175 * testsuite/26_numerics/random/random_device/entropy.cc:
1176 Likewise.
1177
11782021-11-09 Jonathan Wakely <jwakely@redhat.com>
1179
1180 * testsuite/26_numerics/random/random_device/cons/token.cc:
1181 Retry if random devices produce the same value.
1182
11832021-11-09 Rasmus Villemoes <rasmus.villemoes@prevas.dk>
1184
1185 * config/os/vxworks/os_defines.h (_GLIBCXX_HAVE_TLS): Only
1186 define for VxWorks >= 6.6.
1187
11882021-11-05 Jonathan Wakely <jwakely@redhat.com>
1189
1190 * include/bits/range_access.h (begin(valarray), end(valarray)):
1191 Add noexcept.
1192
11932021-11-05 Jonathan Wakely <jwakely@redhat.com>
1194
1195 * include/std/tuple (tuple_size_v): Fix pack expansion.
1196
11972021-11-05 Jonathan Wakely <jwakely@redhat.com>
1198
1199 * src/c++11/random.cc (__x86_rdrand, __x86_rdseed): Add
1200 [[unlikely]] attribute.
1201
12022021-11-05 Jonathan Wakely <jwakely@redhat.com>
1203
1204 * src/c++11/random.cc [__powerpc__] (USE_DARN): Define.
1205 (__ppc_darn): New function to use POWER9 DARN instruction.
1206 (Which): Add 'darn' enumerator.
1207 (which_source): Check for __ppc_darn.
1208 (random_device::_M_init): Support "darn" and "hw" tokens.
1209 (random_device::_M_getentropy): Add darn to switch.
1210 * testsuite/26_numerics/random/random_device/cons/token.cc:
1211 Check "darn" token.
1212 * testsuite/26_numerics/random/random_device/entropy.cc:
1213 Likewise.
1214
12152021-11-05 Jonathan Wakely <jwakely@redhat.com>
1216
1217 * testsuite/lib/gdb-test.exp: Add target selector support to the
1218 dg-final directives.
1219 * testsuite/libstdc++-prettyprinters/80276.cc: Add xfail for
1220 C++20.
1221 * testsuite/libstdc++-prettyprinters/libfundts.cc: Likewise.
1222 * testsuite/libstdc++-prettyprinters/prettyprinters.exp: Tweak
1223 comment.
1224
12252021-11-04 Jonathan Wakely <jwakely@redhat.com>
1226
1227 PR libstdc++/103086
1228 * python/libstdcxx/v6/printers.py (_tuple_impl_get): New helper
1229 for accessing the tuple element stored in a _Tuple_impl node.
1230 (tuple_get): New function for accessing a tuple element.
1231 (unique_ptr_get): New function for accessing a unique_ptr.
1232 (UniquePointerPrinter, StdPathPrinter): Use unique_ptr_get.
1233 * python/libstdcxx/v6/xmethods.py (UniquePtrGetWorker): Cast
1234 tuple to its base class before accessing _M_head_impl.
1235
12362021-11-04 Jonathan Wakely <jwakely@redhat.com>
1237
1238 * doc/xml/manual/evolution.xml: Document deprecations.
1239 * doc/html/*: Regenerate.
1240 * libsupc++/exception (unexpected_handler, unexpected)
1241 (get_unexpected, set_unexpected): Add deprecated attribute.
1242 Do not define without _GLIBCXX_USE_DEPRECATED for C++17 and up.
1243 * libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Disable
1244 deprecated warnings.
1245 * libsupc++/eh_ptr.cc (std::rethrow_exception): Likewise.
1246 * libsupc++/eh_terminate.cc: Likewise.
1247 * libsupc++/eh_throw.cc (__cxa_init_primary_exception):
1248 Likewise.
1249 * libsupc++/unwind-cxx.h (struct __cxa_exception): Use
1250 terminate_handler instead of unexpected_handler.
1251 (struct __cxa_dependent_exception): Likewise.
1252 (__unexpected): Likewise.
1253 * testsuite/18_support/headers/exception/synopsis.cc: Add
1254 dg-warning for deprecated warning.
1255 * testsuite/18_support/exception_ptr/60612-unexpected.cc:
1256 Disable deprecated warnings.
1257 * testsuite/18_support/set_unexpected.cc: Likewise.
1258 * testsuite/18_support/unexpected_handler.cc: Likewise.
1259
12602021-11-04 Jonathan Wakely <jwakely@redhat.com>
1261
1262 * include/bits/utility.h (__find_uniq_type_in_pack): Move
1263 definition to here, ...
1264 * include/std/tuple (__find_uniq_type_in_pack): ... from here.
1265 * include/std/variant (__detail__variant::__index_of): Remove.
1266 (__detail::__variant::__exactly_once): Define using
1267 __find_uniq_type_in_pack instead of __index_of.
1268 (get<T>, get_if<T>, variant::__index_of): Likewise.
1269
12702021-11-04 Jonathan Wakely <jwakely@redhat.com>
1271
1272 * include/bits/stl_pair.h (tuple_size_v): Define partial
1273 specializations for std::pair.
1274 * include/bits/utility.h (_Nth_type): Move definition here
1275 and define primary template.
1276 (tuple_size_v): Move definition here.
1277 * include/std/array (tuple_size_v): Define partial
1278 specializations for std::array.
1279 * include/std/tuple (tuple_size_v): Move primary template to
1280 <bits/utility.h>. Define partial specializations for
1281 std::tuple.
1282 (tuple_element): Change definition to use _Nth_type.
1283 * include/std/variant (_Nth_type): Move to <bits/utility.h>.
1284 (variant_alternative, variant): Adjust qualification of
1285 _Nth_type.
1286 * testsuite/20_util/tuple/element_access/get_neg.cc: Prune
1287 additional errors from _Nth_type.
1288
12892021-11-04 Jonathan Wakely <jwakely@redhat.com>
1290
1291 * include/std/variant (__detail::__variant::__emplace): New
1292 function template.
1293 (_Copy_assign_base::operator=): Reorder conditions to match
1294 bulleted list of effects in the standard. Use __emplace instead
1295 of _M_reset followed by _Construct.
1296 (_Move_assign_base::operator=): Likewise.
1297 (__construct_by_index): Remove.
1298 (variant::emplace): Use __emplace instead of _M_reset followed
1299 by __construct_by_index.
1300 (variant::swap): Hoist valueless cases out of visitor. Use
1301 __emplace to replace _M_reset followed by _Construct.
1302
13032021-11-04 Jonathan Wakely <jwakely@redhat.com>
1304
1305 * include/std/variant (_Nth_type): Define partial
1306 specializations to reduce number of instantiations.
1307 (variant_size_v): Define partial specializations to avoid
1308 instantiations.
1309 (variant_alternative): Use _Nth_type. Add static assert.
1310 (__tuple_count, __tuple_count_v): Replace with ...
1311 (__count): New variable template.
1312 (_Variant_union): Add deleted constructor.
1313 (variant::__to_type): Use _Nth_type.
1314 (variant::emplace): Use _Nth_type. Add deleted overloads for
1315 invalid types and indices.
1316
13172021-11-04 Jonathan Wakely <jwakely@redhat.com>
1318
1319 PR libstdc++/102912
1320 * include/std/variant (_Variant_storage::__index_of): Remove.
1321 (__variant_construct_single): Remove.
1322 (__variant_construct): Remove.
1323 (_Copy_ctor_base::_Copy_ctor_base(const _Copy_ctor_base&)): Do
1324 construction directly instead of using __variant_construct.
1325 (_Move_ctor_base::_Move_ctor_base(_Move_ctor_base&&)): Likewise.
1326 (_Move_ctor_base::_M_destructive_move()): Remove.
1327 (_Move_ctor_base::_M_destructive_copy()): Remove.
1328 (_Copy_assign_base::operator=(const _Copy_assign_base&)): Do
1329 construction directly instead of using _M_destructive_copy.
1330 (variant::swap): Do construction directly instead of using
1331 _M_destructive_move.
1332 * testsuite/20_util/variant/102912.cc: New test.
1333
13342021-11-03 Jonathan Wakely <jwakely@redhat.com>
1335
1336 PR libstdc++/66742
1337 * include/bits/list.tcc (list::sort): Use mutable iterators for
1338 comparisons.
1339 * include/bits/stl_list.h (_Scratch_list::_Ptr_cmp): Likewise.
1340 * testsuite/23_containers/list/operations/66742.cc: Check
1341 non-const comparisons.
1342
13432021-11-03 Jonathan Wakely <jwakely@redhat.com>
1344
1345 * include/std/valarray (valarray::valarray()): Add noexcept.
1346 (valarray::operator[]): Likewise.
1347
13482021-11-01 Jonathan Wakely <jwakely@redhat.com>
1349
1350 * include/debug/stl_iterator.h (__valid_range): Add constexpr
1351 for C++20. Qualify call to avoid ADL.
1352 (__get_distance, __can_advance, __unsafe, __base): Likewise.
1353 * testsuite/25_algorithms/move/constexpr.cc: Also check with
1354 std::reverse_iterator arguments.
1355
13562021-11-01 Jonathan Wakely <jwakely@redhat.com>
1357
1358 * include/std/span (span(Range&&)): Reorder constraints.
1359
13602021-11-01 Jonathan Wakely <jwakely@redhat.com>
1361
1362 PR libstdc++/103022
1363 * include/std/valarray (begin, end): Do not dereference an empty
1364 valarray. Add noexcept and [[nodiscard]].
1365 * testsuite/26_numerics/valarray/range_access.cc: Check empty
1366 valarray. Check iterator properties. Run as well as compiling.
1367 * testsuite/26_numerics/valarray/range_access2.cc: Likewise.
1368 * testsuite/26_numerics/valarray/103022.cc: New test.
1369
13702021-10-29 Jonathan Wakely <jwakely@redhat.com>
1371
1372 * testsuite/23_containers/stack/deduction.cc: Fix typo.
1373
13742021-10-26 Martin Sebor <msebor@redhat.com>
1375
1376 * testsuite/21_strings/basic_string/capacity/1.cc: Also suppress
1377 -Wstringop-overread.
1378 * testsuite/27_io/filesystem/path/factory/u8path-char8_t.cc: Same.
1379
13802021-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1381
1382 * testsuite/28_regex/basic_regex/84110.cc (test01)
1383 [__cpp_exceptions]: Disambiguate extended.
1384
13852021-10-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1386
1387 * testsuite/17_intro/names.cc [__sun__] (r, x): Undef.
1388
13892021-10-22 Jonathan Wakely <jwakely@redhat.com>
1390
1391 PR libstdc++/102894
1392 * include/std/any (make_any): Add SFINAE constraint.
1393 * testsuite/20_util/any/102894.cc: New test.
1394
13952021-10-21 Jonathan Wakely <jwakely@redhat.com>
1396
1397 * doc/doxygen/stdheader.cc: Refactor. Use C++23. Add new
1398 headers.
1399 * scripts/run_doxygen: Fix post-processing of #include
1400 directives in man pages. Use new xg++ to compile helper program.
1401
14022021-10-21 Jonathan Wakely <jwakely@redhat.com>
1403
1404 * include/bits/mofunc_impl.h: Add doxygen comments.
1405 * include/std/functional: Likewise.
1406
14072021-10-21 Jonathan Wakely <jwakely@redhat.com>
1408
1409 * include/bits/alloc_traits.h: Suppress doxygen documentation.
1410 * include/bits/allocated_ptr.h: Likewise.
1411 * include/bits/enable_special_members.h: Likewise.
1412 * include/bits/hashtable.h: Likewise.
1413 * include/bits/hashtable_policy.h: Likewise.
1414 * include/bits/uses_allocator.h: Likewise.
1415 * include/bits/node_handle.h: Document node handles and suppress
1416 documentation for protected members.
1417 * include/std/any: Suppress documentation for implementation
1418 details.
1419
14202021-10-21 Patrick Palka <ppalka@redhat.com>
1421
1422 PR libstdc++/102358
1423 * include/bits/stl_iterator.h (__niter_base): Make constexpr
1424 for C++20.
1425 (__miter_base): Likewise.
1426 * testsuite/25_algorithms/move/constexpr.cc: New test.
1427
14282021-10-21 Patrick Palka <ppalka@redhat.com>
1429
1430 * include/std/ranges (istream_view): Replace this function
1431 template with an alias template as per P2432R1.
1432 (wistream_view): Define as per P2432R1.
1433 (views::_Istream, views::istream): Likewise.
1434 * testsuite/std/ranges/istream_view.cc (test07): New test.
1435
14362021-10-21 Patrick Palka <ppalka@redhat.com>
1437
1438 * include/bits/ranges_util.h (views::_Drop): Forward declare.
1439 (subrange): Befriend views::_Drop.
1440 (subrange::_S_store_size): Declare constexpr instead of just
1441 const, remove obsolete comment.
1442 * include/std/ranges (views::__detail::__is_empty_view): Define.
1443 (views::__detail::__is_basic_string_view): Likewise.
1444 (views::__detail::__is_subrange): Likewise.
1445 (views::__detail::__is_iota_view): Likewise.
1446 (views::__detail::__can_take_view): Rename template parm _Tp to _Dp.
1447 (views::_Take): Rename template parm _Tp to _Dp, make it non-deducible
1448 and fix it to range_difference_t<_Range>. Implement P1739R4 and
1449 LWG 3407 changes.
1450 (views::__detail::__can_drop_view): Rename template parm _Tp to _Dp.
1451 (views::_Drop): As with views::_Take.
1452 (views::_Counted): Implement P1739R4 changes.
1453 * include/std/span (__detail::__is_std_span): Rename to ...
1454 (__detail::__is_span): ... this and turn it into a variable
1455 template.
1456 (__detail::__is_std_array): Turn it into a variable template.
1457 (span::span): Adjust uses of __is_std_span and __is_std_array
1458 accordingly.
1459 * testsuite/std/ranges/adaptors/p1739.cc: New test.
1460
14612021-10-21 Patrick Palka <ppalka@redhat.com>
1462
1463 * include/bits/stl_iterator.h (common_iterator::__arrow_proxy):
1464 Make fully constexpr as per LWG 3595.
1465 (common_iterator::__postfix_proxy): Likewise.
1466
14672021-10-21 Patrick Palka <ppalka@redhat.com>
1468
1469 * include/std/ranges (lazy_split_view::base): Add forward_range
1470 constraint as per LWG 3591.
1471 (lazy_split_view::begin, lazy_split_view::end): Also check
1472 simpleness of _Pattern as per LWG 3592.
1473 (split_view::base): Relax copyable constraint as per LWG 3590.
1474
14752021-10-21 Patrick Palka <ppalka@redhat.com>
1476
1477 * include/std/ranges (join_view::__iter_cat::_S_iter_cat): Adjust
1478 criteria for returning bidirectional_iterator_tag as per LWG 3535.
1479 (join_view::_Iterator::_S_iter_concept): Likewise.
1480
14812021-10-21 Patrick Palka <ppalka@redhat.com>
1482
1483 * include/bits/ranges_base.h (viewable_range): Adjust as per
1484 LWG 3481.
1485 * testsuite/std/ranges/adaptors/all.cc (test07): New test.
1486
14872021-10-21 Jonathan Wakely <jwakely@redhat.com>
1488
1489 PR libstdc++/102863
1490 * include/std/optional (optional::and_then, optional::transform):
1491 Remove requires-clause.
1492 * testsuite/20_util/optional/monadic/and_then.cc: Check
1493 overload resolution doesn't cause errors.
1494 * testsuite/20_util/optional/monadic/transform.cc: Likewise.
1495
14962021-10-20 Jonathan Wakely <jwakely@redhat.com>
1497
1498 * testsuite/20_util/optional/monadic/transform.cc: Check that
1499 an rvalue result is not materialized too soon.
1500
15012021-10-19 Patrick Palka <ppalka@redhat.com>
1502
1503 * include/std/ranges (iota_view::_Iterator::operator+): Adjust
1504 definition as per LWG 3580.
1505 (iota_view::_Iterator::operator-): Likewise.
1506
15072021-10-19 Patrick Palka <ppalka@redhat.com>
1508
1509 * include/std/ranges (basic_istream_view::_M_object): Value
1510 initialize as per LWG 3568.
1511
15122021-10-19 Patrick Palka <ppalka@redhat.com>
1513
1514 * include/bits/ranges_util.h
1515 (__detail::__uses_nonqualification_pointer_conversion): Define
1516 and use it ...
1517 (__detail::__convertible_to_nonslicing): ... here, as per LWG 3470.
1518 * testsuite/std/ranges/subrange/1.cc: New test.
1519
15202021-10-19 Patrick Palka <ppalka@redhat.com>
1521
1522 * include/std/ranges (iota_view::_Iterator): Befriend iota_view.
1523 (iota_view::_Sentinel): Likewise.
1524 (iota_view::iota_view): Add three overloads, each taking an
1525 iterator/sentinel pair as per LWG 3523.
1526 * testsuite/std/ranges/iota/iota_view.cc (test06): New test.
1527
15282021-10-19 Patrick Palka <ppalka@redhat.com>
1529
1530 * include/bits/ranges_base.h (view_interface): Forward declare.
1531 (__detail::__is_derived_from_view_interface_fn): Declare.
1532 (__detail::__is_derived_from_view_interface): Define as per LWG 3549.
1533 (enable_view): Adjust as per LWG 3549.
1534 * include/bits/ranges_util.h (view_interface): Don't derive from
1535 view_base.
1536 * include/std/ranges (filter_view): Revert r11-3504 change.
1537 (transform_view): Likewise.
1538 (take_view): Likewise.
1539 (take_while_view): Likewise.
1540 (drop_view): Likewise.
1541 (drop_while_view): Likewise.
1542 (join_view): Likewise.
1543 (lazy_split_view): Likewise.
1544 (split_view): Likewise.
1545 (reverse_view): Likewise.
1546 * testsuite/std/ranges/adaptors/sizeof.cc: Update expected sizes.
1547 * testsuite/std/ranges/view.cc (test_view::test_view): Remove
1548 this default ctor since views no longer need to be default initable.
1549 (test01): New test.
1550
15512021-10-19 Jonathan Wakely <jwakely@redhat.com>
1552
1553 * src/c++11/random.cc (which_source): New helper function.
1554 (random_device::_M_getentropy()): Use which_source and return
1555 suitable values for sources other than device files.
1556 * testsuite/26_numerics/random/random_device/entropy.cc: New test.
1557
15582021-10-19 Jonathan Wakely <jwakely@redhat.com>
1559
1560 * doc/Makefile.am (stamp-html-doxygen, stamp-html-doxygen)
1561 (stamp-latex-doxygen, stamp-man-doxygen): Fix recipes for
1562 relative ${top_srcdir}.
1563 * doc/Makefile.in: Regenerate.
1564
15652021-10-19 Jonathan Wakely <jwakely@redhat.com>
1566
1567 * include/std/variant (_Uninitialized): Use an empty struct
1568 for the unused union member, instead of char.
1569
15702021-10-19 Jonathan Wakely <jwakely@redhat.com>
1571
1572 * include/bits/stl_stack.h (stack(Iterator, Iterator)): Remove
1573 non-deducible template parameter from deduction guide.
1574 * testsuite/23_containers/stack/deduction.cc: Check new C++23
1575 deduction guides.
1576
15772021-10-19 Jonathan Wakely <jwakely@redhat.com>
1578
1579 * include/std/optional (_Optional_payload_base::_Storage): Add
1580 constructor taking a callable function to invoke.
1581 (_Optional_payload_base::_M_apply): New function.
1582 (__cpp_lib_monadic_optional): Define for C++23.
1583 (optional::and_then, optional::transform, optional::or_else):
1584 Define for C++23.
1585 * include/std/ranges (__detail::__cached): Remove.
1586 (__detail::__non_propagating_cache): Remove use of __cached for
1587 contained value. Use _Optional_payload_base::_M_construct and
1588 _Optional_payload_base::_M_apply to set the contained value.
1589 * include/std/version (__cpp_lib_monadic_optional): Define.
1590 * testsuite/20_util/optional/monadic/and_then.cc: New test.
1591 * testsuite/20_util/optional/monadic/or_else.cc: New test.
1592 * testsuite/20_util/optional/monadic/or_else_neg.cc: New test.
1593 * testsuite/20_util/optional/monadic/transform.cc: New test.
1594 * testsuite/20_util/optional/monadic/version.cc: New test.
1595
15962021-10-19 Jonathan Wakely <jwakely@redhat.com>
1597
1598 PR libstdc++/102825
1599 * include/bits/mofunc_impl.h (move_only_function): Remove
1600 invalid base initializer.
1601 * testsuite/20_util/move_only_function/cons.cc: Instantiate
1602 constructors to check bodies.
1603
16042021-10-15 Jonathan Wakely <jwakely@redhat.com>
1605
1606 * include/bits/fs_path.h (path::_S_convert(T)): Avoid recursive
1607 call to function with deduced return type.
1608
16092021-10-15 Jonathan Wakely <jwakely@redhat.com>
1610
1611 * include/bits/basic_string.h (__cpp_lib_string_resize_and_overwrite):
1612 Define for C++23.
1613 (basic_string::resize_and_overwrite): Declare.
1614 * include/bits/basic_string.tcc (basic_string::resize_and_overwrite):
1615 Define.
1616 * include/std/version (__cpp_lib_resize_and_overwrite): Define
1617 for C++23.
1618 * testsuite/21_strings/basic_string/capacity/char/resize_and_overwrite.cc:
1619 New test.
1620
16212021-10-15 Jonathan Wakely <jwakely@redhat.com>
1622
1623 PR libstdc++/101263
1624 * include/std/ranges (__cached): New wrapper struct.
1625 (__non_propagating_cache): Use __cached for contained value.
1626 (__non_propagating_cache::_M_emplace_deref): Add constexpr. Use
1627 std::construct_at instead of placement new.
1628 * testsuite/std/ranges/adaptors/join.cc: Check constexpr works.
1629
16302021-10-15 Jonathan Wakely <jwakely@redhat.com>
1631
1632 * include/std/variant (__cpp_lib_variant): Update value for
1633 C++20.
1634 (__variant_cast, __variant_construct): Add constexpr for C++20.
1635 (__variant_construct_single, __construct_by_index) Likewise. Use
1636 std::_Construct instead of placement new.
1637 (_Uninitialized<T, false>) [__cplusplus >= 202002]: Replace
1638 buffer with a union and define a destructor.
1639 (_Variadic_union) [__cplusplus >= 202002]: Add a specialization
1640 for non-trivial destruction.
1641 (_Variant_storage::__index_of): New helper variable template.
1642 (_Variant_storage::~_Variant_storage()): Add constexpr.
1643 (_Variant_storage::_M_reset()): Likewise.
1644 (_Copy_ctor_base, _Move_ctor_base): Likewise.
1645 (_Copy_assign_base, _Move_assign_base): Likewise.
1646 (variant, swap): Likewise.
1647 * include/std/version (__cpp_lib_variant): Update value for
1648 C++20.
1649 * testsuite/20_util/optional/version.cc: Check for exact value
1650 in C++17.
1651 * testsuite/20_util/variant/87619.cc: Increase timeout for
1652 C++20 mode.
1653 * testsuite/20_util/variant/constexpr.cc: New test.
1654 * testsuite/20_util/variant/version.cc: New test.
1655
16562021-10-15 Jonathan Wakely <jwakely@redhat.com>
1657
1658 * include/std/variant (__detail::__variant::__get_storage):
1659 Remove unused function.
1660 (__variant_construct_by_index): Set index after construction is
1661 complete. Rename to ...
1662 (__detail::__variant::__construct_by_index): ... this.
1663 (variant): Use new name for __variant_construct_by_index friend
1664 declaration. Remove __get_storage friend declaration.
1665 (variant::emplace): Use new name and remove try-blocks.
1666
16672021-10-15 Jonathan Wakely <jwakely@redhat.com>
1668
1669 * include/std/variant (_Variant_storage::_M_storage()): Remove.
1670 (__detail::__variant::__get_storage): Remove.
1671 (variant): Remove friend declaration of __get_storage.
1672
16732021-10-15 Jason Merrill <jason@redhat.com>
1674
1675 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc:
1676 * testsuite/20_util/integer_comparisons/greater_neg.cc:
1677 * testsuite/20_util/integer_comparisons/less_equal_neg.cc:
1678 Adjust expected message.
1679 * testsuite/lib/prune.exp: Prune 'in constexpr expansion'.
1680
16812021-10-14 Jonathan Wakely <jwakely@redhat.com>
1682
1683 * include/std/variant (__variant::__get(in_place_index_t<N>, U&&)):
1684 Rename to __get_n and remove first argument. Replace pair of
1685 overloads with a single function using 'if constexpr'.
1686 (__variant::__get(Variant&&)): Adjust to use __get_n.
1687
16882021-10-14 Jonathan Wakely <jwakely@redhat.com>
1689
1690 * include/bits/fs_path.h (path(path&&)): Make unconditionally
1691 noexcept.
1692 (path::_S_convert(T)): Add condtional noexcept.
1693
16942021-10-14 Jonathan Wakely <jwakely@redhat.com>
1695
1696 PR libstdc++/102743
1697 * include/bits/fs_path.h (path::_S_convert(T)): Fix condition
1698 for returning the same string unchanged.
1699
17002021-10-14 Jonathan Wakely <jwakely@redhat.com>
1701
1702 * include/bits/regex.h: Check __cpp_inline_variables instead of
1703 __cplusplus.
1704
17052021-10-14 Jonathan Wakely <jwakely@redhat.com>
1706
1707 * testsuite/20_util/is_layout_compatible/version.cc: Check
1708 correct macro.
1709
17102021-10-14 Jonathan Wakely <jwakely@redhat.com>
1711
1712 * include/bits/stl_construct.h (_Construct): Use
1713 std::construct_at when constant evaluated.
1714 * include/std/optional (_Storage, _Optional_payload, optional):
1715 Add constexpr as specified by P2231R1.
1716 * include/std/version (__cpp_lib_optional): Update value for
1717 C++20.
1718 * testsuite/20_util/optional/requirements.cc: Check feature test
1719 macro.
1720 * testsuite/20_util/optional/constexpr/assign.cc: New test.
1721 * testsuite/20_util/optional/constexpr/cons/conv.cc: New test.
1722 * testsuite/20_util/optional/constexpr/modifiers.cc: New test.
1723 * testsuite/20_util/optional/constexpr/swap.cc: New test.
1724 * testsuite/20_util/optional/version.cc: New test.
1725
17262021-10-13 Jonathan Wakely <jwakely@redhat.com>
1727
1728 * include/bits/fs_path.h (__detail::__is_contiguous): Add
1729 partial specializations for pointers and __normal_iterator.
1730
17312021-10-13 Jonathan Wakely <jwakely@redhat.com>
1732
1733 * testsuite/27_io/filesystem/path/construct/102592.C: Moved to...
1734 * testsuite/27_io/filesystem/path/construct/102592.cc: ...here.
1735 * testsuite/28_regex/match_results/102667.C: Moved to...
1736 * testsuite/28_regex/match_results/102667.cc: ...here.
1737
17382021-10-13 Jonathan Wakely <jwakely@redhat.com>
1739
1740 * include/bits/fs_path.h (__detail::__is_contiguous): New
1741 variable template to identify contiguous iterators.
1742 (__detail::__unified_char8_t): New alias template to decide when
1743 to treat char8_t as char without encoding conversion.
1744 (__detail::__effective_range(const basic_string<C,T>&)): Use
1745 std::char_traits<C> for returned string view.
1746 (__detail::__effective_range(const basic_string_view<C,T>&)):
1747 Likewise.
1748 (__detail::__effective_range(const Source&)): Use
1749 __is_contiguous to detect mode cases of contiguous iterators.
1750 Use __unified_char8_t to return a std::string instead of
1751 std::u8string.
1752
17532021-10-13 Jonathan Wakely <jwakely@redhat.com>
1754
1755 PR libstdc++/102592
1756 * include/bits/fs_path.h (path::path(Iter, Iter, format))
1757 (path::append(Iter, Iter), path::concat(Iter, Iter)): Call
1758 __string_from_range directly, instead of two-argument overload
1759 of _S_convert.
1760 (path::_S_convert(Iter, Iter)): Remove.
1761 * testsuite/27_io/filesystem/path/construct/102592.C: New test.
1762
17632021-10-13 Jonathan Wakely <jwakely@redhat.com>
1764
1765 * include/bits/c++config (__terminate): Add extern "C++".
1766
17672021-10-12 Jonathan Wakely <jwakely@redhat.com>
1768
1769 * testsuite/20_util/tuple/comparison_operators/overloaded.cc:
1770 Restore test for operator<.
1771 * testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
1772 Adjust expected errors for C++20.
1773
17742021-10-12 Jonathan Wakely <jwakely@redhat.com>
1775
1776 PR libstdc++/101960
1777 * include/std/tuple (_Tuple_impl(_Tuple_impl&&)): Define as
1778 defauled.
1779 * testsuite/20_util/tuple/cons/101960.cc: Check tuples with
1780 array elements before the last element.
1781
17822021-10-12 Jonathan Wakely <jwakely@redhat.com>
1783
1784 * include/bits/stl_iterator_base_funcs.h (__advance): Add
1785 deleted overload to improve diagnostics.
1786 (__distance): Likewise.
1787
17882021-10-11 Jonathan Wakely <jwakely@redhat.com>
1789
1790 * include/bits/atomic_timed_wait.h: Remove unused header.
1791 * include/bits/c++config (std:__terminate): Define.
1792 * include/bits/semaphore_base.h: Remove <exception> and use
1793 __terminate instead of terminate.
1794 * include/bits/std_thread.h: Likewise.
1795 * libsupc++/eh_terminate.cc (std::terminate): Use qualified-id
1796 to call __cxxabiv1::__terminate.
1797
17982021-10-11 Jonathan Wakely <jwakely@redhat.com>
1799
1800 * include/bits/regex.h (basic_regex::assign(Iter, Iter)): Avoid
1801 std::__to_address by using poitner directly or using base()
1802 member of __normal_iterator.
1803
18042021-10-11 Jonathan Wakely <jwakely@redhat.com>
1805
1806 * testsuite/18_support/numeric_limits/lowest.cc: Use
1807 numeric_limits<T>::is_integer instead of is_integral<T>::value.
1808
18092021-10-11 Jonathan Wakely <jwakely@redhat.com>
1810
1811 PR libstdc++/89927
1812 * include/bits/regex.h (basic_regex(const _Ch_type*, size_t)):
1813 Add __glibcxx_requires_string_len assertion.
1814 (basic_regex::assign(InputIterator, InputIterator)): Add
1815 __glibcxx_requires_valid_range assertion.
1816 * include/bits/regex_scanner.tcc (_Scanner::_M_advance())
1817 (_Scanner::_M_scan_normal()): Use string literal in assertions.
1818
18192021-10-11 Jonathan Wakely <jwakely@redhat.com>
1820
1821 PR libstdc++/102667
1822 * include/bits/regex.h (match_result::empty()): Optimize by
1823 calling the base function directly.
1824 (match_results::end()): Check _Base_type::empty() not empty().
1825 * testsuite/28_regex/match_results/102667.C: New test.
1826
18272021-10-08 Jonathan Wakely <jwakely@redhat.com>
1828
1829 PR libstdc++/98725
1830 * testsuite/18_support/numeric_limits/lowest.cc: Remove use of
1831 _GLIBCXX_USE_WCHAR_T.
1832 * testsuite/18_support/numeric_limits/min_max.cc: Replace use of
1833 _GLIBCXX_USE_WCHAR_T with checks for WCHAR_MIN and WCHAR_MAX.
1834 * testsuite/20_util/from_chars/1_neg.cc: Remove use of
1835 _GLIBCXX_USE_WCHAR_T.
1836 * testsuite/20_util/function_objects/searchers.cc: Likewise. Use
1837 char_traits<wchar_t>::length instead of wcslen.
1838 * testsuite/20_util/hash/requirements/explicit_instantiation.cc:
1839 Likewise.
1840 * testsuite/20_util/is_arithmetic/value.cc: Likewise.
1841 * testsuite/20_util/is_compound/value.cc: Likewise.
1842 * testsuite/20_util/is_floating_point/value.cc: Likewise.
1843 * testsuite/20_util/is_fundamental/value.cc: Likewise.
1844 * testsuite/20_util/is_integral/value.cc: Likewise.
1845 * testsuite/20_util/is_signed/value.cc: Likewise.
1846 * testsuite/20_util/is_unsigned/value.cc: Likewise.
1847 * testsuite/20_util/is_void/value.cc: Likewise.
1848 * testsuite/20_util/make_signed/requirements/typedefs-1.cc:
1849 Likewise.
1850 * testsuite/20_util/make_signed/requirements/typedefs-2.cc:
1851 Likewise.
1852 * testsuite/20_util/make_signed/requirements/typedefs-3.cc:
1853 Likewise.
1854 * testsuite/20_util/make_signed/requirements/typedefs-4.cc:
1855 Likewise.
1856 * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc:
1857 Likewise.
1858 * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
1859 Likewise.
1860 * testsuite/20_util/make_unsigned/requirements/typedefs-3.cc:
1861 Likewise.
1862 * testsuite/20_util/to_chars/3.cc: Likewise.
1863 * testsuite/20_util/type_identity/requirements/typedefs.cc:
1864 Likewise.
1865 * testsuite/21_strings/basic_string/hash/debug.cc: Likewise.
1866 * testsuite/21_strings/basic_string/hash/hash.cc: Likewise.
1867 * testsuite/21_strings/basic_string/literals/types-char8_t.cc:
1868 Likewise.
1869 * testsuite/21_strings/basic_string/literals/types.cc: Likewise.
1870 * testsuite/21_strings/basic_string/literals/values-char8_t.cc:
1871 Likewise.
1872 * testsuite/21_strings/basic_string/literals/values.cc:
1873 Likewise.
1874 * testsuite/21_strings/basic_string/modifiers/64422.cc:
1875 Likewise.
1876 * testsuite/21_strings/basic_string/range_access/wchar_t/1.cc:
1877 Likewise.
1878 * testsuite/21_strings/basic_string/requirements/citerators.cc:
1879 Likewise.
1880 * testsuite/21_strings/basic_string/requirements/typedefs.cc:
1881 Likewise.
1882 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc:
1883 Likewise.
1884 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
1885 Likewise.
1886 * testsuite/21_strings/basic_string_view/literals/types.cc:
1887 Likewise.
1888 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
1889 Likewise.
1890 * testsuite/21_strings/basic_string_view/literals/values.cc:
1891 Likewise.
1892 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
1893 Likewise.
1894 * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
1895 * testsuite/21_strings/char_traits/requirements/constexpr_functions.cc:
1896 Likewise.
1897 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
1898 Likewise.
1899 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
1900 Likewise.
1901 * testsuite/22_locale/ctype/is/string/89728_neg.cc: Likewise.
1902 * testsuite/25_algorithms/fill/4.cc: Likewise.
1903 * testsuite/25_algorithms/fill_n/1.cc: Likewise.
1904 * testsuite/experimental/functional/searchers.cc: Likewise. Use
1905 char_traits<wchar_t>::length instead of wcslen.
1906 * testsuite/experimental/polymorphic_allocator/pmr_typedefs_string.cc:
1907 Likewise.
1908 * testsuite/experimental/string_view/literals/types-char8_t.cc:
1909 Likewise.
1910 * testsuite/experimental/string_view/literals/types.cc:
1911 Likewise.
1912 * testsuite/experimental/string_view/literals/values-char8_t.cc:
1913 Likewise.
1914 * testsuite/experimental/string_view/literals/values.cc:
1915 Likewise.
1916 * testsuite/experimental/string_view/range_access/wchar_t/1.cc:
1917 Likewise.
1918 * testsuite/experimental/string_view/requirements/typedefs.cc:
1919 Likewise.
1920 * testsuite/experimental/string_view/typedefs.cc: Likewise.
1921 * testsuite/ext/vstring/range_access.cc: Likewise.
1922 * testsuite/std/concepts/concepts.lang/concept.arithmetic/integral.cc:
1923 Likewise.
1924 * testsuite/std/concepts/concepts.lang/concept.arithmetic/signed_integral.cc:
1925 Likewise.
1926 * testsuite/std/concepts/concepts.lang/concept.arithmetic/unsigned_integral.cc:
1927 Likewise.
1928 * testsuite/tr1/4_metaprogramming/is_arithmetic/value.cc:
1929 Likewise.
1930 * testsuite/tr1/4_metaprogramming/is_compound/value.cc:
1931 Likewise.
1932 * testsuite/tr1/4_metaprogramming/is_floating_point/value.cc:
1933 Likewise.
1934 * testsuite/tr1/4_metaprogramming/is_fundamental/value.cc:
1935 Likewise.
1936 * testsuite/tr1/4_metaprogramming/is_integral/value.cc:
1937 Likewise.
1938 * testsuite/tr1/4_metaprogramming/is_signed/value.cc: Likewise.
1939 * testsuite/tr1/4_metaprogramming/is_unsigned/value.cc:
1940 Likewise.
1941 * testsuite/tr1/4_metaprogramming/is_void/value.cc: Likewise.
1942 * testsuite/tr1/6_containers/hash/24799.cc: Likewise.
1943
19442021-10-08 Jonathan Wakely <jwakely@redhat.com>
1945
1946 PR libstdc++/98725
1947 * include/std/ostream (operator<<(basic_ostream<char, Tr>&, wchar_t))
1948 (operator<<(basic_ostream<char, Tr>&, const wchar_t*)): Always
1949 define as deleted. Do not check _GLIBCXX_USE_WCHAR_T.
1950
19512021-10-08 Jonathan Wakely <jwakely@redhat.com>
1952
1953 PR libstdc++/98725
1954 * include/bits/locale_conv.h (wstring_convert, wbuffer_convert):
1955 Define unconditionally. Do not check _GLIBCXX_USE_WCHAR_T.
1956
19572021-10-08 Jonathan Wakely <jwakely@redhat.com>
1958
1959 PR libstdc++/98725
1960 * include/c_global/cstddef [!_GLIBCXX_USE_WCHAR_T]
1961 (__byte_operand<wchar_t>): Define specialization.
1962 * include/std/type_traits (__make_signed<wchar_t>)
1963 (__make_unsigned<wchar_t>): Remove redundant check for
1964 __WCHAR_TYPE__ being defined.
1965 * include/tr1/type_traits [!_GLIBCXX_USE_WCHAR_T]
1966 (__is_integral_helper<wchar_t>): Likewise.
1967
19682021-10-08 Jonathan Wakely <jwakely@redhat.com>
1969
1970 PR libstdc++/98725
1971 * include/ext/rc_string_base.h [!_GLIBCXX_USE_WCHAR_T]
1972 (__rc_string_base<wchar_t>): Define member function.
1973 * include/ext/vstring.h [!_GLIBCXX_USE_WCHAR_T]
1974 (hash<__gnu_cxx::__wvstring>): Define specialization.
1975 * include/ext/vstring_fwd.h [!_GLIBCXX_USE_WCHAR_T] (__wvstring)
1976 (__wsso_string, __wrc_string): Declare typedefs.
1977
19782021-10-08 Jonathan Wakely <jwakely@redhat.com>
1979
1980 PR libstdc++/98725
1981 * include/bits/char_traits.h (char_traits<wchar_t>): Define
1982 explicit specialization unconditionally.
1983 * include/bits/basic_string.h (hash<wstring>): Define
1984 unconditionally. Do not check _GLIBCXX_USE_WCHAR_T.
1985 * include/bits/stringfwd.h (wstring): Likewise.
1986 * include/debug/string (wstring): Likewise.
1987 * include/experimental/string_view (experimental::wstring_view)
1988 (hash<experimental::wstring_view>): Likewise.
1989 * include/std/string (pmr::wstring, hash<pmr::wstring>):
1990 Likewise.
1991 * include/std/string_view (wstring_view, hash<wstring_view>):
1992 Likewise.
1993
19942021-10-08 Jonathan Wakely <jwakely@redhat.com>
1995
1996 * testsuite/27_io/basic_filebuf/close/81256.cc: Moved to...
1997 * testsuite/27_io/basic_filebuf/close/wchar_t/81256.cc: ...here.
1998
19992021-10-08 Jonathan Wakely <jwakely@redhat.com>
2000
2001 * testsuite/22_locale/conversions/buffer/1.cc: Check
2002 _GLIBCXX_USE_WCHAR_T.
2003 * testsuite/22_locale/conversions/buffer/3.cc: Likewise. Add
2004 test using char16_t.
2005 * testsuite/22_locale/conversions/string/1.cc: Check
2006 _GLIBCXX_USE_WCHAR_T.
2007 * testsuite/27_io/filesystem/path/generic/generic_string.cc:
2008 Likewise.
2009 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
2010 Likewise.
2011 * testsuite/27_io/filesystem/path/native/alloc.cc: Likewise.
2012 * testsuite/27_io/filesystem/path/native/string-char8_t.cc:
2013 Likewise.
2014 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
2015 * testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc:
2016 Likewise.
2017 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
2018 Likewise.
2019 * testsuite/experimental/filesystem/path/native/alloc.cc:
2020 Likewise.
2021 * testsuite/experimental/filesystem/path/native/string-char8_t.cc:
2022 Likewise.
2023 * testsuite/experimental/filesystem/path/native/string.cc:
2024 Likewise.
2025
20262021-10-08 Jonathan Wakely <jwakely@redhat.com>
2027
2028 * testsuite/26_numerics/bit/bit.rotate/rotr.cc:
2029 * testsuite/util/testsuite_common_types.h:
2030
20312021-10-08 Jonathan Wakely <jwakely@redhat.com>
2032
2033 * testsuite/18_support/numeric_limits/40856.cc: Replace use of
2034 _GLIBCXX_USE_INT128.
2035 * testsuite/18_support/numeric_limits/dr559.cc: Likewise.
2036 * testsuite/18_support/numeric_limits/lowest.cc: Likewise.
2037 * testsuite/18_support/numeric_limits/max_digits10.cc: Likewise.
2038 * testsuite/20_util/is_floating_point/value.cc: Likewise.
2039 * testsuite/20_util/is_integral/value.cc: Likewise.
2040 * testsuite/20_util/is_signed/value.cc: Likewise.
2041 * testsuite/20_util/is_unsigned/value.cc: Likewise.
2042 * testsuite/20_util/make_signed/requirements/typedefs-1.cc:
2043 Likewise.
2044 * testsuite/20_util/make_signed/requirements/typedefs-2.cc:
2045 Likewise.
2046 * testsuite/20_util/make_unsigned/requirements/typedefs-1.cc:
2047 Likewise.
2048 * testsuite/20_util/make_unsigned/requirements/typedefs-2.cc:
2049 Likewise.
2050 * testsuite/20_util/type_identity/requirements/typedefs.cc:
2051 Likewise.
2052 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Likewise.
2053 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
2054 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
2055 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
2056 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
2057 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: Likewise.
2058 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: Likewise.
2059 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: Likewise.
2060 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc:
2061 Likewise.
2062 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
2063
20642021-10-08 Jonathan Wakely <jwakely@redhat.com>
2065
2066 * include/bits/hashtable_policy.h (_Select1st): Replace use of
2067 std::get.
2068 (_Select2nd): Remove.
2069 (_NodeBuilder::_S_build): Use _NodeGenerator::__node_type
2070 typedef instead of deducing it. Remove unnecessary piecewise
2071 construction.
2072 (_ReuseOrAllocNode): Make __node_type public.
2073 (_Map_base): Adjust partial specialization to be able to extract
2074 the mapped_type without using tuple_element.
2075 (_Map_base::at): Define inline
2076 * testsuite/23_containers/unordered_map/requirements/53339.cc:
2077 Remove XFAIL.
2078 * testsuite/23_containers/unordered_multimap/requirements/53339.cc:
2079 Likewise.
2080
20812021-10-08 Jonathan Wakely <jwakely@redhat.com>
2082
2083 * include/bits/hashtable.h: Move static assertion to destructor.
2084 * include/bits/hashtable_policy.h: Deduce value type from node
2085 type without instantiating it.
2086
20872021-10-08 Jonathan Wakely <jwakely@redhat.com>
2088
2089 * src/c++11/limits.cc: Fail if __cpp_inline_variables is
2090 defined.
2091
20922021-10-08 Jonathan Wakely <jwakely@redhat.com>
2093
2094 PR libstdc++/92546
2095 * include/bits/ranges_algobase.h: Replace <iterator> with a
2096 subset of the headers it includes.
2097
20982021-10-08 Jonathan Wakely <jwakely@redhat.com>
2099
2100 * include/experimental/deque (erase, erase_if): Revert changes
2101 to avoid debug mode overhead.
2102 * include/experimental/map (erase, erase_if): Likewise.
2103 * include/experimental/set (erase, erase_if): Likewise.
2104 * include/experimental/unordered_map (erase, erase_if):
2105 Likewise.
2106 * include/experimental/unordered_set (erase, erase_if):
2107 Likewise.
2108 * include/experimental/vector (erase, erase_if): Likewise.
2109 * include/std/deque (erase, erase_if): Likewise.
2110 * include/std/map (erase, erase_if): Likewise.
2111 * include/std/set (erase, erase_if): Likewise.
2112 * include/std/unordered_map (erase, erase_if): Likewise.
2113 * include/std/unordered_set (erase, erase_if): Likewise.
2114 * include/std/vector (erase, erase_if): Likewise.
2115
21162021-10-08 Jonathan Wakely <jwakely@redhat.com>
2117
2118 * include/std/chrono (__detail::__units_suffix_misc): New
2119 helper function.
2120 (__detail::__units_suffix): Likewise.
2121 (chrono::operator<<(basic_ostream&, const duration&)): Define.
2122 * testsuite/20_util/duration/io.cc: New test.
2123
21242021-10-07 Jonathan Wakely <jwakely@redhat.com>
2125
2126 * include/Makefile.am: Add new header.
2127 * include/Makefile.in: Regenerate.
2128 * include/std/chrono (duration, time_point, system_clock)
2129 (steady_clock, high_resolution_clock, chrono_literals, sys_time)
2130 (file_clock, file_time): Move to ...
2131 * include/bits/chrono.h: New file.
2132 * include/bits/atomic_futex.h: Include new header instead of
2133 <chrono>.
2134 * include/bits/atomic_timed_wait.h: Likewise.
2135 * include/bits/fs_fwd.h: Likewise.
2136 * include/bits/semaphore_base.h: Likewise.
2137 * include/bits/this_thread_sleep.h: Likewise.
2138 * include/bits/unique_lock.h: Likewise.
2139 * include/experimental/bits/fs_fwd.h: Likewise.
2140 * include/experimental/chrono: Likewise.
2141 * include/experimental/io_context: Likewise.
2142 * include/experimental/netfwd: Likewise.
2143 * include/experimental/timer: Likewise.
2144 * include/std/condition_variable: Likewise.
2145 * include/std/mutex: Likewise.
2146 * include/std/shared_mutex: Likewise.
2147
21482021-10-07 Jonathan Wakely <jwakely@redhat.com>
2149
2150 PR libstdc++/102377
2151 * include/bits/atomic_wait.h (__waiter_pool_base:_S_align):
2152 Hardcode to 64 instead of using non-constant constant.
2153
21542021-10-07 Jonathan Wakely <jwakely@redhat.com>
2155
2156 * include/bits/erase_if.h (__erase_nodes_if): Remove redundant
2157 __niter_base calls.
2158 * include/std/string (erase, erase_if): Likewise.
2159 * include/std/deque (erase, erase_if): Access non-debug
2160 container directly.
2161 * include/std/map (erase, erase_if): Likewise.
2162 * include/std/set (erase, erase_if): Likewise.
2163 * include/std/unordered_map (erase, erase_if): Likewise.
2164 * include/std/unordered_set (erase, erase_if): Likewise.
2165 * include/std/vector (erase, erase_if): Likewise.
2166 * include/experimental/deque (erase, erase_if): Likewise.
2167 * include/experimental/map (erase, erase_if): Likewise.
2168 * include/experimental/set (erase, erase_if): Likewise.
2169 * include/experimental/unordered_map (erase, erase_if):
2170 Likewise.
2171 * include/experimental/unordered_set (erase, erase_if):
2172 Likewise.
2173 * include/experimental/vector (erase, erase_if): Likewise.
2174
21752021-10-06 Jonathan Wakely <jwakely@redhat.com>
2176
2177 * include/Makefile.am: Add new headers.
2178 * include/Makefile.in: Regenerate.
2179 * include/std/functional: Include <bits/move_only_function.h>.
2180 * include/std/version (__cpp_lib_move_only_function): Define.
2181 * include/bits/mofunc_impl.h: New file.
2182 * include/bits/move_only_function.h: New file.
2183 * testsuite/20_util/move_only_function/call.cc: New test.
2184 * testsuite/20_util/move_only_function/cons.cc: New test.
2185 * testsuite/20_util/move_only_function/move.cc: New test.
2186 * testsuite/20_util/move_only_function/version.cc: New test.
2187
21882021-10-05 Jonathan Wakely <jwakely@redhat.com>
2189
2190 * testsuite/21_strings/basic_string_view/requirements/trivially_copyable.cc:
2191 New test.
2192 * testsuite/23_containers/span/trivially_copyable.cc: New test.
2193
21942021-10-05 Jonathan Wakely <jwakely@redhat.com>
2195
2196 * include/bits/utility.h (__is_in_place_type_v): Define
2197 variable template to detect in_place_type_t specializations.
2198 (__is_in_place_type): Replace class template with alias
2199 template using __is_in_place_type_v.
2200 * include/std/any (any(T&&)): Check __is_in_place_type first and
2201 avoid instantiating is_copy_constructible unnecessarily.
2202
22032021-10-05 Jonathan Wakely <jwakely@redhat.com>
2204
2205 * testsuite/20_util/integer_comparisons/greater.cc: New test.
2206
22072021-10-05 Jonathan Wakely <jwakely@redhat.com>
2208
2209 * testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc:
2210 Check result matches non-volatile pointer.
2211
22122021-10-05 Jonathan Wakely <jwakely@redhat.com>
2213
2214 PR c++/102535
2215 * testsuite/20_util/is_trivially_constructible/value.cc: Adjust
2216 expected value for C++20.
2217
22182021-10-05 Jonathan Wakely <jwakely@redhat.com>
2219
2220 * include/bits/std_function.h (_Any_data::_M_access): Add
2221 noexcept.
2222 (_Function_base::_Base_manager::_M_get_pointer): Likewise.
2223 (_Function_base::_Base_manager::_M_not_empty_function):
2224 Likewise.
2225
22262021-10-05 Jonathan Wakely <jwakely@redhat.com>
2227
2228 * include/std/ostream (operator<<(const volatile void*)):
2229 Add new overload, as per P1147R1.
2230 * testsuite/27_io/basic_ostream/inserters_other/char/volatile_ptr.cc:
2231 New test.
2232
22332021-10-05 Jonathan Wakely <jwakely@redhat.com>
2234
2235 * include/bits/stl_queue.h
2236 (__cpp_lib_adaptor_iterator_pair_constructor): Set to correct
2237 value.
2238 * include/bits/stl_stack.h
2239 (__cpp_lib_adaptor_iterator_pair_constructor): Likewise.
2240 * include/std/version
2241 (__cpp_lib_adaptor_iterator_pair_constructor): Likewise.
2242 * testsuite/23_containers/queue/cons_from_iters.cc: Update
2243 expected value.
2244 * testsuite/23_containers/stack/cons_from_iters.cc: Likewise.
2245
22462021-10-04 Jonathan Wakely <jwakely@redhat.com>
2247
2248 * include/bits/forward_list.h (forward_list): Use non-deduced
2249 context for allocator parameter of allocator-extended copy and
2250 move constructors.
2251 * include/bits/stl_bvector.h (vector<bool>): Likewise.
2252 * include/bits/stl_deque.h (deque): Likewise.
2253 * include/bits/stl_list.h (list): Likewise.
2254 * include/bits/stl_map.h (map): Likewise.
2255 * include/bits/stl_multimap.h (multimap): Likewise.
2256 * include/bits/stl_multiset.h (multiset): Likewise.
2257 * include/bits/stl_set.h (set): Likewise.
2258 * include/bits/stl_vector.h (vector): Likewise.
2259 * include/bits/stl_queue.h (queue, priority_queue): Do not
2260 constrain Allocator template parameter of deduction guides that
2261 have a Container parameter.
2262 * include/bits/stl_stack.h (stack): Likewise.
2263 * include/debug/deque (__gnu_debug::deque): Use non-deduced
2264 context for allocator parameter of allocator-extended copy and
2265 move constructors.
2266 * include/debug/list (__gnu_debug::list): Likewise.
2267 * include/debug/map.h (__gnu_debug::map): Likewise.
2268 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
2269 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
2270 * include/debug/set.h (__gnu_debug::set): Likewise.
2271 * include/debug/vector (__gnu_debug::vector): Likewise.
2272 * testsuite/23_containers/deque/cons/deduction.cc: Test class
2273 template argument deduction with non-deduced allocator
2274 arguments.
2275 * testsuite/23_containers/forward_list/cons/deduction.cc:
2276 Likewise.
2277 * testsuite/23_containers/list/cons/deduction.cc: Likewise.
2278 * testsuite/23_containers/map/cons/deduction.cc: Likewise.
2279 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
2280 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
2281 * testsuite/23_containers/priority_queue/deduction.cc: Likewise.
2282 * testsuite/23_containers/queue/deduction.cc: Likewise.
2283 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
2284 * testsuite/23_containers/stack/deduction.cc: Likewise.
2285 * testsuite/23_containers/unordered_map/cons/deduction.cc:
2286 Likewise.
2287 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
2288 Likewise.
2289 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
2290 Likewise.
2291 * testsuite/23_containers/unordered_set/cons/deduction.cc:
2292 Likewise.
2293 * testsuite/23_containers/vector/cons/deduction.cc: Likewise.
2294
22952021-10-04 Jonathan Wakely <jwakely@redhat.com>
2296
2297 * include/std/variant (__detail::__variant::__as): Add missing
2298 noexcept to first overload.
2299
23002021-10-04 Jonathan Wakely <jwakely@redhat.com>
2301
2302 * include/bits/basic_string.h (basic_string(nullptr_t)): Define
2303 as deleted.
2304 (operator=(nullptr_t)): Likewise.
2305 * include/bits/cow_string.h (basic_string(nullptr_t)): Likewise.
2306 (operator=(nullptr_t)): Likewise.
2307 * include/std/string_view (basic_string_view(nullptr_t)):
2308 Likewise.
2309 * testsuite/21_strings/basic_string/cons/char/nullptr.cc: New test.
2310 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
2311 Change dg-warning to dg-error.
2312 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
2313 Likewise.
2314
23152021-10-02 Jonathan Wakely <jwakely@redhat.com>
2316
2317 * src/c++17/fs_ops.cc (create_directory): Fix typo in enum name.
2318 * src/filesystem/ops-common.h (__last_system_error): Add
2319 explicit cast to avoid narrowing conversion.
2320 (do_space): Fix type in function name.
2321
23222021-10-01 Jonathan Wakely <jwakely@redhat.com>
2323
2324 PR libstdc++/102100
2325 * include/Makefile.am (c++config.h): Define
2326 _GLIBCXX_VERBOSE_ASSERT based on configure output.
2327 * include/Makefile.in: Regenerate.
2328 * include/bits/c++config: Fix condition for verbose assertions.
2329
23302021-10-01 Jonathan Wakely <jwakely@redhat.com>
2331
2332 PR libstdc++/92546
2333 * include/bits/erase_if.h (__erase_nodes_if): Use __niter_base to
2334 unwrap debug iterators.
2335 * include/bits/refwrap.h: Do not error if included in C++03.
2336 * include/bits/stl_algo.h (__remove_if): Move to ...
2337 * include/bits/stl_algobase.h (__remove_if): ... here.
2338 * include/std/deque (erase, erase_if): Use __remove_if instead of
2339 remove and remove_if.
2340 * include/std/string (erase, erase_if): Likewise.
2341 * include/std/vector (erase, erase_if): Likewise.
2342
23432021-10-01 Jonathan Wakely <jwakely@redhat.com>
2344
2345 PR libstdc++/66742
2346 * include/bits/list.tcc (list::sort()): Use _Scratch_list
2347 objects for splicing and merging.
2348 (list::sort(StrictWeakOrdering)): Likewise.
2349 * include/bits/stl_list.h (__detail::_Scratch_list): New type.
2350 * src/c++98/list.cc (_List_node_base::_M_transfer): Add
2351 assertion for --enable-libstdcxx-debug library.
2352 * testsuite/23_containers/list/operations/66742.cc: New test.
2353
23542021-10-01 Jonathan Wakely <jwakely@redhat.com>
2355
2356 PR libstdc++/100612
2357 * include/std/thread (__pmf_expects_stop_token): New variable
2358 template to detect a pointer to member function that needs a
2359 stop_token to be added to the arguments.
2360 (jthread::__S_create): Use __pmf_expects_stop_token.
2361 (jthread::__S_create_pmf): New function.
2362 * testsuite/30_threads/jthread/100612.cc: New test.
2363
23642021-10-01 Jonathan Wakely <jwakely@redhat.com>
2365
2366 * include/bits/stl_queue.h
2367 (__cpp_lib_adaptor_iterator_pair_constructor): Define for C++23, as
2368 per P1425R4.
2369 (queue(InputIterator, InputIterator)): Likewise.
2370 (queue(InputIterator, InputIterator, const Alloc&)): Likewise.
2371 * include/bits/stl_stack.h
2372 (__cpp_lib_adaptor_iterator_pair_constructor): Likewise.
2373 (stack(InputIterator, InputIterator)): Likewise.
2374 (stack(InputIterator, InputIterator, const Alloc&)): Likewise.
2375 * include/std/version (__cpp_lib_adaptor_iterator_pair_constructor):
2376 Define.
2377 * testsuite/23_containers/queue/cons_from_iters.cc: New test.
2378 * testsuite/23_containers/stack/cons_from_iters.cc: New test.
2379
23802021-10-01 Jonathan Wakely <jwakely@redhat.com>
2381
2382 * include/bits/stl_queue.h (priority_queue): Add
2383 allocator-extended overloads for constructors taking iterator.
2384 * testsuite/23_containers/priority_queue/lwg3506.cc: New test.
2385
23862021-10-01 Jonathan Wakely <jwakely@redhat.com>
2387
2388 * include/bits/stl_queue.h (priority_queue): Construct sequence
2389 from iterators when no sequence argument is present (LWG 3529).
2390 * testsuite/23_containers/priority_queue/lwg3529.cc: New test.
2391
23922021-10-01 Jonathan Wakely <jwakely@redhat.com>
2393
2394 * include/bits/stl_queue.h (priority_queue): Constrain
2395 constructors with InputIterator parameters (LWG 3522).
2396 * testsuite/23_containers/priority_queue/lwg3522.cc: New test.
2397
23982021-10-01 Jonathan Wakely <jwakely@redhat.com>
2399
2400 * include/bits/ranges_base.h (ranges::distance): Split overload
2401 into two (LWG 3392).
2402 * testsuite/24_iterators/range_operations/lwg3392.cc: New test.
2403
24042021-10-01 Jonathan Wakely <jwakely@redhat.com>
2405
2406 * testsuite/30_threads/thread/cons/3.cc: Remove derivation from
2407 std::unary_function.
2408 * testsuite/30_threads/thread/cons/4.cc: Likewise.
2409 * testsuite/30_threads/thread/cons/5.cc: Likewise.
2410
24112021-10-01 Jonathan Wakely <jwakely@redhat.com>
2412
2413 * testsuite/ext/pb_ds/example/basic_multimap.cc: Remove
2414 unnecesary derivation from std::unary_function.
2415 * testsuite/ext/pb_ds/example/erase_if.cc: Likewise.
2416 * testsuite/ext/pb_ds/example/hash_illegal_resize.cc: Likewise.
2417 * testsuite/ext/pb_ds/example/hash_initial_size.cc: Likewise.
2418 * testsuite/ext/pb_ds/example/hash_load_set_change.cc: Likewise.
2419 * testsuite/ext/pb_ds/example/hash_mod.cc: Likewise.
2420 * testsuite/ext/pb_ds/example/hash_resize.cc: Likewise.
2421 * testsuite/ext/pb_ds/example/hash_shift_mask.cc: Likewise.
2422 * testsuite/ext/pb_ds/example/priority_queue_dijkstra.cc:
2423 Likewise.
2424 * testsuite/ext/pb_ds/example/ranged_hash.cc: Likewise.
2425 * testsuite/ext/pb_ds/example/store_hash.cc: Likewise.
2426
24272021-10-01 Jonathan Wakely <jwakely@redhat.com>
2428
2429 * src/c++11/functexcept.cc (__throw_out_of_range_fmt): Do not
2430 expand the format string for freestanding, or non-vebose, or if
2431 we're just going to abort anyway.
2432 * src/c++11/snprintf_lite.cc: Remove unused header and
2433 declaration.
2434
24352021-10-01 Jonathan Wakely <jwakely@redhat.com>
2436
2437 * include/std/variant (__do_visit): Use variant_npos instead of
2438 literal -1 that requires a narrowing conversion.
2439
24402021-10-01 Jonathan Wakely <jwakely@redhat.com>
2441
2442 PR libstdc++/99327
2443 * src/filesystem/ops-common.h (__unsupported): New function to
2444 return a suitable error code for missing functionality.
2445 (posix::off_t): New typedef.
2446 (posix::*): Set errno to ENOSYS instead of ENOTSUP for no-op
2447 fallback implementations.
2448 (do_copy_file): Replace uses of errc::not_supported.
2449 * src/c++17/fs_ops.cc (fs::copy, fs::copy_file, create_dir)
2450 (fs::create_directory, fs::create_directory_symlink)
2451 (fs::create_hard_link, fs::create_symlink, fs::current_path)
2452 (fs::equivalent, do_stat, fs::file_size, fs::hard_link_count)
2453 (fs::last_write_time, fs::permissions, fs::read_symlink):
2454 Replace uses of errc::not_supported.
2455 (fs::resize_file): Qualify off_t.
2456 * src/filesystem/ops.cc (fs::copy, fs::copy_file, create_dir)
2457 (fs::create_directory, fs::create_directory_symlink)
2458 (fs::create_hard_link, fs::create_symlink, fs::current_path)
2459 (fs::equivalent, do_stat, fs::file_size, fs::last_write_time)
2460 (fs::permissions, fs::read_symlink, fs::system_complete):
2461 Replace uses of errc::not_supported.
2462 (fs::resize_file): Qualify off_t and enable unconditionally.
2463 * testsuite/19_diagnostics/system_error/cons-1.cc: Likewise.
2464
24652021-10-01 Jonathan Wakely <jwakely@redhat.com>
2466
2467 * src/filesystem/ops-common.h (last_error): New helper function.
2468 (filesystem::do_space): Use last_error().
2469 * src/c++17/fs_ops.cc (fs::absolute, fs::create_hard_link)
2470 (fs::equivalent, fs::remove, fs::temp_directory_path): Use
2471 last_error().
2472 * src/filesystem/ops.cc (fs::create_hard_link)
2473 (fs::remove, fs::temp_directory_path): Likewise.
2474
24752021-10-01 Jonathan Wakely <jwakely@redhat.com>
2476
2477 * include/std/type_traits (__conditional): New class template
2478 for internal uses of std::conditional.
2479 (__conditional_t): New alias template to replace conditional_t.
2480 (__and_, __or_, __result_of_memfun, __result_of_memobj): Use
2481 __conditional_t instead of conditional::type.
2482 * include/bits/atomic_base.h (__atomic_impl::_Diff): Likewise.
2483 * include/bits/hashtable.h (_Hashtable): Likewise.
2484 * include/bits/hashtable_policy.h (_Node_iterator, _Insert_base)
2485 (_Local_iterator): Likewise. Replace typedefs with
2486 using-declarations.
2487 * include/bits/move.h (move_if_noexcept): Use __conditional_t.
2488 * include/bits/parse_numbers.h (_Select_int_base): Likewise.
2489 * include/bits/ptr_traits.h (__make_not_void): Likewise.
2490 * include/bits/ranges_algobase.h (__copy_or_move_backward)
2491 (__copy_or_move): Likewise.
2492 * include/bits/ranges_base.h (borrowed_iterator_t): Likewise.
2493 * include/bits/ranges_util.h (borrowed_subrange_t): Likewise.
2494 * include/bits/regex_compiler.h (_BracketMatcher): Use
2495 __conditional_t. Replace typedefs with using-declarations.
2496 * include/bits/shared_ptr_base.h (__shared_count): Use
2497 __conditional_t.
2498 * include/bits/stl_algobase.h (__copy_move, __copy_move_backward):
2499 Likewise.
2500 * include/bits/stl_iterator.h (__detail::__clamp_iter_cat)
2501 (reverse_iterator::iterator_concept)
2502 (__make_move_if_noexcept_iterator)
2503 (iterator_traits<common_iterator<_It, _Sent>>)
2504 (iterator_traits<counted_iterator<_It>>): Likewise.
2505 * include/bits/stl_pair.h (_PCC, pair::operator=): Likewise.
2506 * include/bits/stl_tree.h (_Rb_tree::insert_return_type)
2507 (_Rb_tree::_M_clone_node): Likewise.
2508 * include/bits/unique_ptr.h (unique_ptr(unique_ptr<U,E>&&)):
2509 Likewise.
2510 * include/bits/uses_allocator.h (__uses_alloc): Likewise.
2511 (__is_uses_allocator_predicate): Likewise.
2512 * include/debug/functions.h (__foreign_iterator_aux2): Likewise.
2513 * include/experimental/any (any::_Manager, __any_caster):
2514 Likewise.
2515 * include/experimental/executor (async_completion): Likewise.
2516 * include/experimental/functional (__boyer_moore_base_t):
2517 Likewise.
2518 * include/std/any (any::_Manager): Likewise.
2519 * include/std/functional (__boyer_moore_base_t): Likewise.
2520 * include/std/ranges (borrowed_iterator_t)
2521 (borrowed_subrange_t, __detail::__maybe_present_t)
2522 (__detail::__maybe_const_t, split_view): Likewise.
2523 * include/std/tuple (__empty_not_final, tuple::operator=):
2524 Likewise.
2525 * include/std/variant (__detail::__variant::__get_t): Likewise.
2526
25272021-10-01 Jonathan Wakely <jwakely@redhat.com>
2528
2529 PR libstdc++/78113
2530 * include/std/variant (__do_visit): Use a switch when we have a
2531 single variant with a small number of alternatives.
2532
25332021-10-01 Jonathan Wakely <jwakely@redhat.com>
2534
2535 PR libstdc++/90943
2536 * include/std/variant (__cpp_lib_variant): Update value.
2537 (__detail::__variant::__as): New helpers implementing the
2538 as-variant exposition-only function templates.
2539 (visit, visit<R>): Use __as to upcast the variant parameters.
2540 * include/std/version (__cpp_lib_variant): Update value.
2541 * testsuite/20_util/variant/visit_inherited.cc: New test.
2542
25432021-10-01 Jonathan Wakely <jwakely@redhat.com>
2544
2545 * include/bits/stl_iterator.h (__normal_iterator): Simplify
2546 converting constructor and do not require _Container::pointer.
2547
25482021-10-01 Jonathan Wakely <jwakely@redhat.com>
2549
2550 * include/bits/cow_string.h [_GLIBCXX_FULLY_DYNAMIC_STRING]
2551 (basic_string(basic_string&&)): Add noexcept and avoid
2552 allocation, by sharing rep with the rvalue string.
2553
25542021-10-01 Jonathan Wakely <jwakely@redhat.com>
2555
2556 * include/bits/stl_iterator.h (common_iterator::__arrow_proxy)
2557 (common_iterator::__postfix_proxy): Add noexcept.
2558
25592021-10-01 Jonathan Wakely <jwakely@redhat.com>
2560
2561 PR libstdc++/94418
2562 * include/bits/stl_iterator.h (reverse_iterator): Use
2563 conditional noexcept on constructors and assignment operators.
2564 * testsuite/24_iterators/reverse_iterator/noexcept.cc: New test.
2565
25662021-10-01 Jonathan Wakely <jwakely@redhat.com>
2567
2568 PR libstdc++/100153
2569 * include/bits/vector.tcc (vector<bool>::_M_shrink_to_fit()):
2570 When size() is zero just deallocate and reset.
2571
25722021-10-01 Jonathan Wakely <jwakely@redhat.com>
2573
2574 PR libstdc++/96733
2575 * include/bits/stl_algo.h (clamp): Use std::min and std::max.
2576
25772021-10-01 Jonathan Wakely <jwakely@redhat.com>
2578
2579 * include/bits/regex.h (basic_regex::multiline): Define for
2580 non-strict C++11 and C++14 modes.
2581 * include/bits/regex_constants.h (regex_constants::multiline):
2582 Add _GLIBCXX_RESOLVE_LIB_DEFECTS comment.
2583
25842021-10-01 Jonathan Wakely <jwakely@redhat.com>
2585
2586 * testsuite/25_algorithms/is_permutation/2.cc: Include <iterator>.
2587
25882021-10-01 Jonathan Wakely <jwakely@redhat.com>
2589
2590 * include/bits/stream_iterator.h (istream_iterator): Add
2591 noexcept to constructors and non-throwing member functions and
2592 friend functions.
2593 (ostream_iterator): Likewise.
2594
25952021-10-01 Jonathan Wakely <jwakely@redhat.com>
2596
2597 * include/bits/boost_concept_check.h (_Is_vector_bool_iterator):
2598 New trait to identify vector<bool> iterators, including debug
2599 ones.
2600 (_ForwardIteratorReferenceConcept): Add default template
2601 argument using _Is_vector_bool_iterator and use it in partial
2602 specialization for the vector<bool> cases.
2603 (_Mutable_ForwardIteratorReferenceConcept): Likewise.
2604 * testsuite/24_iterators/operations/prev_neg.cc: Adjust dg-error
2605 line number.
2606
26072021-10-01 Jonathan Wakely <jwakely@redhat.com>
2608
2609 * include/bits/list.tcc (list::merge): Remove call to size() and
2610 try-catch block. Use _Finalize_merge instead.
2611 * include/bits/stl_list.h (list::_Finalize_merge): New
2612 scope guard type to update _M_size members after a merge.
2613
26142021-09-30 Jonathan Wakely <jwakely@redhat.com>
2615
2616 * include/bits/regex.h (basic_regex::multiline): Fix #if
2617 condition.
2618
26192021-09-29 Jonathan Wakely <jwakely@redhat.com>
2620
2621 * include/bits/regex.h (basic_regex::multiline): Define constant
2622 for C++17.
2623 * include/bits/regex_constants.h (regex_constants::multiline):
2624 Define constant for C++17.
2625 (regex_constants::__multiline): Define duplicate constant for
2626 internal use in C++11 and C++14.
2627 * include/bits/regex_executor.h (_Executor::_M_match_multiline()):
2628 New member function.
2629 (_Executor::_M_is_line_terminator(_CharT)): New member function.
2630 (_Executor::_M_at_begin(), _Executor::_M_at_end()): Use new
2631 member functions to support multiline matches.
2632 * testsuite/28_regex/algorithms/regex_match/multiline.cc: New test.
2633
26342021-09-29 Jonathan Wakely <jwakely@redhat.com>
2635
2636 * include/bits/regex_compiler.h (_Compiler::_S_validate): New
2637 function.
2638 * include/bits/regex_compiler.tcc (_Compiler::_Compiler): Use
2639 _S_validate to check flags.
2640 * include/bits/regex_error.h (_S_grammar): New error code for
2641 internal use.
2642 * testsuite/28_regex/basic_regex/ctors/grammar.cc: New test.
2643
26442021-09-29 Jonathan Wakely <jwakely@redhat.com>
2645
2646 PR libstdc++/84110
2647 * include/bits/regex_error.h (regex_constants::_S_null): New
2648 error code for internal use.
2649 * include/bits/regex_scanner.tcc (_Scanner::_M_scan_normal()):
2650 Check for null character.
2651 * testsuite/28_regex/basic_regex/84110.cc: New test.
2652
26532021-09-29 Jonathan Wakely <jwakely@redhat.com>
2654
2655 * include/bits/regex.h (__detail::__is_contiguous_iter): Move
2656 here from <bits/regex_compiler.h>.
2657 (basic_regex::_M_compile): New function to compile an NFA from
2658 a regular expression string.
2659 (basic_regex::basic_regex): Use _M_compile instead of delegating
2660 to other constructors.
2661 (basic_regex::operator=(const basic_regex&)): Define as
2662 defaulted.
2663 (basic_regex::operator=(initializer_list<C>)): Use _M_compile.
2664 (basic_regex::assign(const basic_regex&)): Use copy assignment.
2665 (basic_regex::assign(basic_regex&&)): Use move assignment.
2666 (basic_regex::assign(const C*, flag_type)): Use _M_compile
2667 instead of constructing a temporary string.
2668 (basic_regex::assign(const C*, size_t, flag_type)): Likewise.
2669 (basic_regex::assign(const basic_string<C,T,A>&, flag_type)):
2670 Use _M_compile instead of constructing a temporary basic_regex.
2671 (basic_regex::assign(InputIter, InputIter, flag_type)): Avoid
2672 constructing a temporary string for contiguous iterators of the
2673 right value type.
2674 * include/bits/regex_compiler.h (__is_contiguous_iter): Move to
2675 <bits/regex.h>.
2676 (__enable_if_contiguous_iter, __disable_if_contiguous_iter)
2677 (__compile_nfa): Remove.
2678 * testsuite/28_regex/basic_regex/assign/exception_safety.cc: New
2679 test.
2680 * testsuite/28_regex/basic_regex/ctors/char/other.cc: New test.
2681
26822021-09-28 Jonathan Wakely <jwakely@redhat.com>
2683
2684 * include/bits/atomic_timed_wait.h (__platform_wait_until_impl):
2685 Return false for ETIMEDOUT and true otherwise.
2686
26872021-09-28 François Dumont <fdumont@gcc.gnu.org>
2688
2689 * testsuite/20_util/default_delete/48631_neg.cc: Adapt dg-prune-output message
2690 to also match message with '__8' in it.
2691
26922021-09-28 Jonathan Wakely <jwakely@redhat.com>
2693
2694 * include/bits/regex_automaton.h (_NFA_base::_SizeT): Remove.
2695 * include/bits/regex_compiler.h (_Compiler::_IterT): Remove.
2696 * include/bits/regex_compiler.tcc: Likewise.
2697 * include/bits/regex_scanner.h (_Scanner::_IterT): Remove.
2698 * include/bits/regex_scanner.tcc: Likewise.
2699
27002021-09-28 Jonathan Wakely <jwakely@redhat.com>
2701
2702 * include/bits/regex_compiler.tcc: Add line break in empty while
2703 statement.
2704 * include/bits/regex_executor.tcc: Avoid unused parameter
2705 warning.
2706
27072021-09-28 Jonathan Wakely <jwakely@redhat.com>
2708
2709 * include/bits/regex.h (basic_regex, swap): Add noexcept to
2710 non-throwing functions.
2711 * include/bits/regex_automaton.h (_State_base, _State)
2712 (_NFA_base): Likewise.
2713 * include/bits/regex_compiler.h (_Compiler): Likewise.
2714 * include/bits/regex_error.h (regex_error::code()): Likewise.
2715 * include/bits/regex_scanner.h (_Scanner): Likewise.
2716
27172021-09-28 Jonathan Wakely <jwakely@redhat.com>
2718
2719 * include/bits/atomic_wait.h (_GLIBCXX_HAVE_PLATFORM_WAIT):
2720 Define before first attempt to check it.
2721
27222021-09-28 Jonathan Wakely <jwakely@redhat.com>
2723
2724 * testsuite/23_containers/priority_queue/requirements/explicit_instantiation/1.cc:
2725 Do not check non-default constructible sequences when
2726 _GLIBCXX_CONCEPT_CHECKS is defined.
2727 * testsuite/23_containers/priority_queue/requirements/explicit_instantiation/1_c++98.cc:
2728 Likewise.
2729 * testsuite/23_containers/queue/requirements/explicit_instantiation/1.cc:
2730 Likewise.
2731 * testsuite/23_containers/queue/requirements/explicit_instantiation/1_c++98.cc:
2732 Likewise.
2733 * testsuite/23_containers/stack/requirements/explicit_instantiation/1.cc:
2734 Likewise.
2735 * testsuite/23_containers/stack/requirements/explicit_instantiation/1_c++98.cc:
2736 Likewise.
2737
27382021-09-28 Jonathan Wakely <jwakely@redhat.com>
2739
2740 * testsuite/23_containers/deque/requirements/explicit_instantiation/3.cc:
2741 Do not test implicit allocator rebinding when _GLIBCXX_CONCEPT_CHECKS
2742 is defined.
2743 * testsuite/23_containers/forward_list/requirements/explicit_instantiation/3.cc:
2744 Likewise.
2745 * testsuite/23_containers/list/requirements/explicit_instantiation/3.cc:
2746 Likewise.
2747 * testsuite/23_containers/list/requirements/explicit_instantiation/5.cc:
2748 Likewise.
2749 * testsuite/23_containers/map/requirements/explicit_instantiation/3.cc:
2750 Likewise.
2751 * testsuite/23_containers/map/requirements/explicit_instantiation/5.cc:
2752 Likewise.
2753 * testsuite/23_containers/multimap/requirements/explicit_instantiation/3.cc:
2754 Likewise.
2755 * testsuite/23_containers/multimap/requirements/explicit_instantiation/5.cc:
2756 Likewise.
2757 * testsuite/23_containers/multiset/requirements/explicit_instantiation/3.cc:
2758 Likewise.
2759 * testsuite/23_containers/multiset/requirements/explicit_instantiation/5.cc:
2760 Likewise.
2761 * testsuite/23_containers/set/requirements/explicit_instantiation/3.cc:
2762 Likewise.
2763 * testsuite/23_containers/set/requirements/explicit_instantiation/5.cc:
2764 Likewise.
2765 * testsuite/23_containers/unordered_map/requirements/explicit_instantiation/3.cc:
2766 Likewise.
2767 * testsuite/23_containers/unordered_multimap/requirements/explicit_instantiation/3.cc:
2768 Likewise.
2769 * testsuite/23_containers/unordered_multiset/requirements/explicit_instantiation/3.cc:
2770 Likewise.
2771 * testsuite/23_containers/unordered_set/requirements/explicit_instantiation/3.cc:
2772 Likewise.
2773 * testsuite/23_containers/vector/ext_pointer/explicit_instantiation/3.cc:
2774 Likewise.
2775 * testsuite/23_containers/vector/requirements/explicit_instantiation/3.cc:
2776 Likewise.
2777
27782021-09-28 Jonathan Wakely <jwakely@redhat.com>
2779
2780 * include/bits/boost_concept_check.h (_ForwardIteratorConcept)
2781 (_BidirectionalIteratorConcept, _RandomAccessIteratorConcept):
2782 Check result types of iterator operations.
2783 (_Mutable_ForwardIteratorConcept): Check that iterator's
2784 reference type is a reference to its value type.
2785 (_Mutable_BidirectionalIteratorConcept): Do not require the
2786 value type to be assignable.
2787 (_Mutable_RandomAccessIteratorConcept): Likewise.
2788 * testsuite/24_iterators/operations/prev_neg.cc: Adjust dg-error
2789 line number.
2790
27912021-09-28 Jonathan Wakely <jwakely@redhat.com>
2792
2793 * testsuite/25_algorithms/copy/34595.cc: Add missing operation
2794 for type used as an iterator.
2795 * testsuite/25_algorithms/unique_copy/check_type.cc: Likewise.
2796
27972021-09-28 Jonathan Wakely <jwakely@redhat.com>
2798
2799 * testsuite/20_util/is_nothrow_swappable/value.h: Use custom
2800 comparison function for priority_queue of type with no
2801 relational operators.
2802 * testsuite/20_util/is_swappable/value.h: Likewise.
2803 * testsuite/24_iterators/output/concept.cc: Add operator< to
2804 type used in set.
2805
28062021-09-28 Jonathan Wakely <jwakely@redhat.com>
2807
2808 * include/bits/boost_concept_check.h (_OutputIteratorConcept):
2809 Use a function to preserve value category of the type.
2810 * include/bits/stl_algobase.h (copy, move, fill_n): Use a
2811 reference as the second argument for _OutputIteratorConcept.
2812 (copy_backward, move_backward): Use _OutputIteratorConcept
2813 instead of _ConvertibleConcept.
2814
28152021-09-28 Jonathan Wakely <jwakely@redhat.com>
2816
2817 * include/bits/stl_iterator.h (pointer_traits): Define partial
2818 specialization for __normal_iterator.
2819 * testsuite/24_iterators/normal_iterator/to_address.cc: New test.
2820
28212021-09-28 Jonathan Wakely <jwakely@redhat.com>
2822
2823 * include/bits/move.h (forward(remove_reference_t<T>&&)):
2824 Improve text of static_assert.
2825 * testsuite/20_util/forward/c_neg.cc: Adjust dg-error.
2826 * testsuite/20_util/forward/f_neg.cc: Likewise.
2827
28282021-09-28 Jonathan Wakely <jwakely@redhat.com>
2829
2830 PR libstdc++/102499
2831 * include/bits/fs_path.h (path::begin, path::end): Add noexcept
2832 to declarations, to match definitions.
2833
28342021-09-24 Jonathan Wakely <jwakely@redhat.com>
2835
2836 * include/bits/range_access.h (cbegin, cend): Remove redundant
2837 'inline' specifier.
2838
28392021-09-23 Jonathan Wakely <jwakely@redhat.com>
2840
2841 * testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc:
2842 Remove dg-error lines for C++20-only errors.
2843
28442021-09-23 Jonathan Wakely <jwakely@redhat.com>
2845
2846 * testsuite/19_diagnostics/headers/system_error/93151.cc:
2847 Disable PCH.
2848
28492021-09-23 Jonathan Wakely <jwakely@redhat.com>
2850
2851 * src/c++11/system_error.cc (system_error_category) [_WIN32]:
2852 Map Windows error codes to generic POSIX error numbers. Use
2853 FormatMessage instead of strerror.
2854 * testsuite/19_diagnostics/error_category/system_category.cc:
2855 Adjust for new behaviour on Windows.
2856
28572021-09-23 Jonathan Wakely <jwakely@redhat.com>
2858
2859 * src/c++11/system_error.cc (generic_error_category): Define
2860 class and virtual functions as 'final'.
2861 (generic_error_category::equivalent(int, const error_condition&)):
2862 Override.
2863 (system_error_category): Define class and virtual functions as
2864 'final'.
2865 (system_error_category::equivalent(int, const error_condition&)):
2866 Override.
2867 (generic_category_instance, system_category_instance): Use
2868 constinit union to make the objects immortal.
2869
28702021-09-23 Jonathan Wakely <jwakely@redhat.com>
2871
2872 PR libstdc++/102425
2873 * src/c++11/system_error.cc
2874 (system_error_category::default_error_condition): Add 0 to
2875 switch.
2876 * testsuite/19_diagnostics/error_category/102425.cc: New test.
2877
28782021-09-17 Jonathan Wakely <jwakely@redhat.com>
2879
2880 * include/bits/fs_path.h (path::iterator): Add noexcept to all
2881 member functions and friend functions.
2882 (distance): Add noexcept.
2883 (advance): Add noexcept and inline.
2884 * include/experimental/bits/fs_path.h (path::iterator):
2885 Add noexcept to all member functions.
2886
28872021-09-17 Jonathan Wakely <jwakely@redhat.com>
2888
2889 PR libstdc++/102270
2890 * include/std/tuple (_Tuple_impl): Add constexpr to constructor
2891 missed in previous patch.
2892 * testsuite/20_util/tuple/cons/102270.C: Moved to...
2893 * testsuite/20_util/tuple/cons/102270.cc: ...here.
2894 * testsuite/util/testsuite_allocator.h (SimpleAllocator): Add
2895 constexpr to constructor so it can be used for C++20 tests.
2896
28972021-09-17 Jonathan Wakely <jwakely@redhat.com>
2898
2899 * testsuite/26_numerics/valarray/dr630-3.C: Moved to...
2900 * testsuite/26_numerics/valarray/dr630-3.cc: ...here.
2901 * testsuite/27_io/basic_iostream/cons/16251.C: Moved to...
2902 * testsuite/27_io/basic_iostream/cons/16251.cc: ...here.
2903
29042021-09-16 Jonathan Wakely <jwakely@redhat.com>
2905
2906 * src/Makefile.am (stamp-debug): Add all Makefiles as
2907 prerequisites.
2908 * src/Makefile.in: Regenerate.
2909
29102021-09-16 Jonathan Wakely <jwakely@redhat.com>
2911
2912 * testsuite/ext/pb_ds/regression/tree_map_rand.cc: Increase
2913 timeout factor to 3.
2914 * testsuite/ext/pb_ds/regression/tree_set_rand.cc: Likewise.
2915
29162021-09-16 Jonathan Wakely <jwakely@redhat.com>
2917
2918 * doc/xml/manual/using.xml: Generalize to apply to more than
2919 just -std=c++11.
2920 * doc/html/manual/using_macros.html: Regenerate.
2921
29222021-09-16 Jonathan Wakely <jwakely@redhat.com>
2923
2924 * include/std/optional (nullptr_t): Make constructor noexcept.
2925
29262021-09-16 Jonathan Wakely <jwakely@redhat.com>
2927
2928 * include/bits/fs_path.h (advance): Remove non-deducible
2929 template parameter.
2930
29312021-09-16 Jonathan Wakely <jwakely@redhat.com>
2932
2933 PR libstdc++/102270
2934 * include/std/tuple (_Head_base, _Tuple_impl): Add
2935 _GLIBCXX20_CONSTEXPR to allocator-extended constructors.
2936 (tuple<>::swap(tuple&)): Add _GLIBCXX20_CONSTEXPR.
2937 * testsuite/20_util/tuple/cons/102270.C: New test.
2938
29392021-09-16 Jonathan Wakely <jwakely@redhat.com>
2940
2941 PR libstdc++/102280
2942 * include/std/span (span(Range&&)): Add constraint to deduction
2943 guide.
2944
29452021-09-16 Jonathan Wakely <jwakely@redhat.com>
2946
2947 * src/c++98/Makefile.am: Use CXXCOMPILE not LTCXXCOMPILE.
2948 * src/c++98/Makefile.in: Regenerate.
2949
29502021-09-16 Jonathan Wakely <jwakely@redhat.com>
2951
2952 * include/bits/basic_string.h [_GLIBCXX_USE_CXX11_ABI]
2953 (to_string): Add noexcept if the type width is 32 bits or less.
2954
29552021-09-16 Jonathan Wakely <jwakely@redhat.com>
2956
2957 * include/bits/unique_ptr.h (__uniq_ptr_impl::_M_ptr)
2958 (__uniq_ptr_impl::_M_deleter): Add noexcept.
2959
29602021-09-16 Thomas Rodgers <rodgert@twrodgers.com>
2961
2962 PR libstdc++/101761
2963 * testsuite/29_atomics/atomic_ref/wait_notify.cc (test): Use
2964 va and vb as arguments to wait/notify, remove unused bb local.
2965
29662021-09-15 Hugo Beauzée-Luyssen <hugo@beauzee.fr>
2967
2968 * crossconfig.m4: Check for TLS support on mingw.
2969 * configure: Regenerate.
2970
29712021-09-13 Jason Merrill <jason@redhat.com>
2972
2973 * include/std/version: Define __cpp_lib_hardware_interference_size.
2974 * libsupc++/new: Define hardware interference size variables.
2975
29762021-09-10 Jonathan Wakely <jwakely@redhat.com>
2977
2978 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
2979 Fix invalid hostname to only match the .invalid TLD.
2980
29812021-09-02 Jonathan Wakely <jwakely@redhat.com>
2982
2983 * include/bits/atomic_base.h (__atomic_base<P*>::compare_exchange_weak):
2984 Add new functions.
2985 * include/std/atomic (atomic<T*>::compare_exchange_weak): Use
2986 it.
2987
29882021-09-02 Jonathan Wakely <jwakely@redhat.com>
2989
2990 * include/std/atomic: Tweak whitespace.
2991
29922021-09-02 Jonathan Wakely <jwakely@redhat.com>
2993
2994 PR c++/102177
2995 * include/bits/atomic_base.h (__is_valid_cmpexch_failure_order):
2996 New function to check if a memory order is valid for the failure
2997 case of compare exchange operations.
2998 (__atomic_base<I>::compare_exchange_weak): Simplify assertions
2999 by using __is_valid_cmpexch_failure_order.
3000 (__atomic_base<I>::compare_exchange_strong): Likewise.
3001 (__atomic_base<P*>::compare_exchange_weak): Likewise.
3002 (__atomic_base<P*>::compare_exchange_strong): Likewise.
3003 (__atomic_impl::compare_exchange_weak): Add assertion.
3004 (__atomic_impl::compare_exchange_strong): Likewise.
3005 * include/std/atomic (atomic::compare_exchange_weak): Likewise.
3006 (atomic::compare_exchange_strong): Likewise.
3007
30082021-09-02 Jonathan Wakely <jwakely@redhat.com>
3009
3010 * include/std/functional (invoke_r): Define.
3011 * include/std/version (__cpp_lib_invoke_r): Define.
3012 * testsuite/20_util/function_objects/invoke/version.cc: Check
3013 for __cpp_lib_invoke_r as well as __cpp_lib_invoke.
3014 * testsuite/20_util/function_objects/invoke/4.cc: New test.
3015
30162021-08-31 Jonathan Wakely <jwakely@redhat.com>
3017
3018 PR libstdc++/98421
3019 * include/std/span (span(Iter, size_type), span(Iter, Iter)):
3020 Add valid range checks.
3021 * testsuite/23_containers/span/cons_1_assert_neg.cc: New test.
3022 * testsuite/23_containers/span/cons_2_assert_neg.cc: New test.
3023
30242021-08-31 Jonathan Wakely <jwakely@redhat.com>
3025
3026 * configure.ac: Fix checks for F_GETFL, F_SETFL and O_NONBLOCK.
3027 * configure: Regenerate.
3028
30292021-08-31 Jonathan Wakely <jwakely@redhat.com>
3030
3031 * src/c++11/system_error.cc (error_category::~error_category()):
3032 Remove noexcept-specifier.
3033 (system_error::~system_error()): Likewise.
3034 * testsuite/19_diagnostics/error_category/noexcept.cc: New test.
3035 * testsuite/19_diagnostics/system_error/noexcept.cc: New test.
3036
30372021-08-31 Jonathan Wakely <jwakely@redhat.com>
3038
3039 PR libstdc++/102074
3040 * include/bits/atomic_timed_wait.h (__timed_waiter_pool)
3041 [!_GLIBCXX_HAVE_PLATFORM_TIMED_WAIT]: Add missing return.
3042
30432021-08-31 Jonathan Wakely <jwakely@redhat.com>
3044
3045 * include/experimental/internet (__make_resolver_error_code):
3046 Handle EAI_SYSTEM errors.
3047 (basic_resolver_results): Use __make_resolver_error_code. Use
3048 Glibc NI_MAXHOST and NI_MAXSERV values for buffer sizes.
3049
30502021-08-31 Jonathan Wakely <jwakely@redhat.com>
3051
3052 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
3053 Try other service if "http" fails.
3054
30552021-08-31 Jonathan Wakely <jwakely@redhat.com>
3056
3057 * testsuite/17_intro/names.cc: Undefine some more names used
3058 by Solaris system headers.
3059
30602021-08-30 Jason Merrill <jason@redhat.com>
3061
3062 PR c++/96286
3063 * testsuite/30_threads/promise/requirements/lwg3466.cc:
3064 Remove dg-prune-outputs.
3065
30662021-08-28 Jonathan Wakely <jwakely@redhat.com>
3067
3068 * include/bits/alloc_traits.h (allocator_traits): Add explicit
3069 specialization for allocator<void>. Improve doxygen comments.
3070 * include/bits/allocator.h (allocator<void>): Restore for the
3071 versioned namespace.
3072 (allocator<void>::construct, allocator<void>::destroy): Remove.
3073 * include/ext/extptr_allocator.h (_Extptr_allocator<void>):
3074 Add default constructor and converting constructor.
3075
30762021-08-28 Jonathan Wakely <jwakely@redhat.com>
3077
3078 * include/bits/stl_uninitialized.h: Fix typo in comment.
3079
30802021-08-28 Jonathan Wakely <jwakely@redhat.com>
3081
3082 PR libstdc++/99876
3083 * src/c++17/fs_ops.cc (fs::absolute): Call non-throwing form,
3084 to avoid unnecessary current_path() call.
3085
30862021-08-28 Jonathan Wakely <jwakely@redhat.com>
3087
3088 * include/bits/std_function.h (function::function(F&&)): Give
3089 name to defaulted template parameter, to improve diagnostics.
3090 Use markdown for more doxygen comments.
3091
30922021-08-26 Jonathan Wakely <jwakely@redhat.com>
3093
3094 * include/bits/std_function.h (function): Adjust doxygen
3095 comments.
3096 * include/bits/unique_ptr.h (make_unique_for_overwrite):
3097 Change parameter name to match doxygen comment.
3098
30992021-08-26 Jonathan Wakely <jwakely@redhat.com>
3100
3101 * include/bits/std_function.h (_function_base::_Base_manager):
3102 Replace _M_init_functor with a function template using a
3103 forwarding reference, and a pair of _M_create function
3104 templates. Reuse _M_create for the clone operation.
3105 (function::_Decay_t): New alias template.
3106 (function::_Callable): Simplify by using _Decay.
3107 (function::function(F)): Change parameter to forwarding
3108 reference, as per LWG 2447. Add noexcept-specifier. Simplify
3109 constraints.
3110 (function::operator=(F&&)): Add noexcept-specifier.
3111 * testsuite/20_util/function/cons/lwg2774.cc: New test.
3112 * testsuite/20_util/function/cons/noexcept.cc: New test.
3113
31142021-08-26 Jonathan Wakely <jwakely@redhat.com>
3115
3116 * include/bits/std_function.h (function::function(F)): Add
3117 static assertions to check constructibility requirements.
3118
31192021-08-26 Jonathan Wakely <jwakely@redhat.com>
3120
3121 PR libstdc++/100285
3122 * configure.ac: Check for O_NONBLOCK.
3123 * configure: Regenerate.
3124 * include/experimental/internet: Include <ws2tcpip.h> for
3125 Windows. Use preprocessor conditions around more constants.
3126 * include/experimental/socket: Use preprocessor conditions
3127 around more constants.
3128 * testsuite/experimental/net/internet/resolver/base.cc: Only use
3129 constants when the corresponding C macro is defined.
3130 * testsuite/experimental/net/socket/basic_socket.cc: Likewise.
3131 * testsuite/experimental/net/socket/socket_base.cc: Likewise.
3132 Make preprocessor checks more fine-grained.
3133
31342021-08-25 Jonathan Wakely <jwakely@redhat.com>
3135
3136 * testsuite/17_intro/names.cc: Check 'sz'.
3137
31382021-08-25 Jonathan Wakely <jwakely@redhat.com>
3139
3140 * testsuite/17_intro/names.cc: Adjust for Windows.
3141
31422021-08-25 Jonathan Wakely <jwakely@redhat.com>
3143
3144 * include/std/valarray: Uglify 'func' parameters.
3145 * testsuite/17_intro/names.cc: Add 'func' to checks.
3146
31472021-08-25 Jonathan Wakely <jwakely@redhat.com>
3148
3149 PR libstdc++/102064
3150 * include/bits/stl_uninitialized.h (_GLIBCXX_USE_ASSIGN_FOR_INIT):
3151 Define macro to check conditions for optimizing trivial cases.
3152 (__check_constructible): New function to do static assert.
3153 (uninitialized_copy, uninitialized_fill, uninitialized_fill_n):
3154 Use new macro.
3155 * testsuite/20_util/specialized_algorithms/uninitialized_copy/1.cc:
3156 Adjust dg-error pattern.
3157 * testsuite/23_containers/vector/cons/89164.cc: Likewise. Add
3158 C++17-specific checks from 89164_c++17.cc.
3159 * testsuite/23_containers/vector/cons/89164_c++17.cc: Removed.
3160 * testsuite/20_util/specialized_algorithms/uninitialized_copy/102064.cc:
3161 New test.
3162 * testsuite/20_util/specialized_algorithms/uninitialized_copy_n/102064.cc:
3163 New test.
3164 * testsuite/20_util/specialized_algorithms/uninitialized_fill/102064.cc:
3165 New test.
3166 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/102064.cc:
3167 New test.
3168
31692021-08-25 Jonathan Wakely <jwakely@redhat.com>
3170
3171 PR libstdc++/102048
3172 * include/ext/rope (rope::erase(size_type)): Remove broken
3173 function.
3174
31752021-08-24 Jonathan Wakely <jwakely@redhat.com>
3176
3177 * doc/xml/manual/status_cxx2020.xml: Update table.
3178 * doc/html/manual/status.html: Regenerate.
3179
31802021-08-24 Jonathan Wakely <jwakely@redhat.com>
3181
3182 * include/std/type_traits (is_layout_compatible): Define.
3183 (is_corresponding_member): Define.
3184 * include/std/version (__cpp_lib_is_layout_compatible): Define.
3185 * testsuite/20_util/is_layout_compatible/is_corresponding_member.cc:
3186 New test.
3187 * testsuite/20_util/is_layout_compatible/value.cc: New test.
3188 * testsuite/20_util/is_layout_compatible/version.cc: New test.
3189 * testsuite/20_util/is_pointer_interconvertible/with_class.cc:
3190 New test.
3191 * testsuite/23_containers/span/layout_compat.cc: Do not use real
3192 std::is_layout_compatible trait if available.
3193
31942021-08-24 Jonathan Wakely <jwakely@redhat.com>
3195
3196 * src/c++11/cxx11-shim_facets.cc: Fix mismatched class-key in
3197 explicit instantiation definitions.
3198
31992021-08-23 Jonathan Wakely <jwakely@redhat.com>
3200
3201 * include/std/ranges (basic_istream_view): Add default template
3202 argument.
3203 * testsuite/std/ranges/istream_view.cc: Check it.
3204
32052021-08-23 Jonathan Wakely <jwakely@redhat.com>
3206
3207 * libsupc++/dyncast.cc (__dynamic_cast): Add __builtin_expect to
3208 precondition check.
3209
32102021-08-23 Jonathan Wakely <jwakely@redhat.com>
3211
3212 PR libstdc++/90787
3213 * testsuite/util/testsuite_fs.h (permissions_are_testable):
3214 Define as inline.
3215
32162021-08-20 Jonathan Wakely <jwakely@redhat.com>
3217
3218 PR libstdc++/90787
3219 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
3220 Use new __gnu_test::permissions_are_testable() function.
3221 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
3222 Likewise.
3223 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
3224 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
3225 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
3226 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
3227 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
3228 * testsuite/27_io/filesystem/operations/symlink_status.cc:
3229 Likewise.
3230 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3231 Likewise.
3232 * testsuite/experimental/filesystem/iterators/directory_iterator.cc:
3233 Likewise.
3234 * testsuite/experimental/filesystem/iterators/recursive_directory_iterator.cc:
3235 Likewise.
3236 * testsuite/experimental/filesystem/operations/exists.cc:
3237 Likewise.
3238 * testsuite/experimental/filesystem/operations/is_empty.cc:
3239 Likewise.
3240 * testsuite/experimental/filesystem/operations/remove.cc:
3241 Likewise.
3242 * testsuite/experimental/filesystem/operations/remove_all.cc:
3243 Likewise.
3244 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
3245 Likewise.
3246 * testsuite/util/testsuite_fs.h (__gnu_test::permissions_are_testable):
3247 New function to guess whether testing permissions will work.
3248
32492021-08-19 Jonathan Wakely <jwakely@redhat.com>
3250
3251 * doc/xml/manual/status_cxx2020.xml: Move row earlier in table.
3252 * doc/html/manual/status.html: Regenerate.
3253
32542021-08-19 Jonathan Wakely <jwakely@redhat.com>
3255
3256 * doc/doxygen/user.cfg.in: Update to Doxygen 1.9.2
3257
32582021-08-19 Jonathan Wakely <jwakely@redhat.com>
3259
3260 PR libstdc++/101965
3261 * include/std/charconv (__to_chars_i): Remove redundant check.
3262
32632021-08-19 Jonathan Wakely <jwakely@redhat.com>
3264
3265 PR libstdc++/101960
3266 * include/std/tuple (_Tuple_impl(_Tuple_impl&&)): Use base
3267 class' move constructor. Define as defaulted for versioned
3268 namespace.
3269 * testsuite/20_util/tuple/cons/101960.cc: New test.
3270
32712021-08-19 Jonathan Wakely <jwakely@redhat.com>
3272
3273 PR libstdc++/100139
3274 * doc/xml/manual/status_cxx2020.xml: Add P1739R4 to status table.
3275 * doc/html/manual/status.html: Regenerate.
3276
32772021-08-19 Jonathan Wakely <jwakely@redhat.com>
3278
3279 * include/bits/shared_ptr.h: Add @since and @headerfile tags.
3280 * include/bits/unique_ptr.h: Add @headerfile tags.
3281
32822021-08-19 Jonathan Wakely <jwakely@redhat.com>
3283
3284 * src/filesystem/ops-common.h (filesystem::file_time): Improve
3285 overflow check by using system_clock::duration::max().
3286
32872021-08-19 Jonathan Wakely <jwakely@redhat.com>
3288
3289 * include/bits/stl_tree.h: Tweak whitespace.
3290
32912021-08-18 Jonathan Wakely <jwakely@redhat.com>
3292
3293 * include/bits/unique_ptr.h (default_delete): Add @since tag.
3294 (unique_ptr, unique_ptr<T[]>): Likewise. Improve @brief.
3295 (make_unique, make_unique_for_overwrite): Likewise. Add @tparam,
3296 @param, and @returns.
3297 (_MakeUniq): Move to __detail namespace. Add alias template
3298 helpers.
3299
33002021-08-18 Jonathan Wakely <jwakely@redhat.com>
3301
3302 * include/bits/stl_function.h: Improve doxygen comments.
3303
33042021-08-18 Jonathan Wakely <jwakely@redhat.com>
3305
3306 * doc/doxygen/user.cfg.in (PREDEFINED): Enable doxygen
3307 processing for C++20 components and components that depend on
3308 compiler features.
3309 * include/bits/stl_algo.h (random_shuffle): Use @deprecated.
3310 * include/std/type_traits: Improve doxygen comments for C++20
3311 traits.
3312
33132021-08-18 Jonathan Wakely <jwakely@redhat.com>
3314
3315 * include/ext/type_traits.h (__promote_2, __promote_3)
3316 (__promote_4): Redfine as alias templates using __promoted_t.
3317 * include/std/complex (__promote_2): Remove partial
3318 specializations for std::complex.
3319
33202021-08-18 Jonathan Wakely <jwakely@redhat.com>
3321
3322 * include/bits/stl_algo.h (min(initializer_list<T>))
3323 (min(initializer_list<T>, Compare)): Call __min_element directly to
3324 avoid redundant debug checks for valid ranges.
3325 (max(initializer_list<T>), max(initializer_list<T>, Compare)):
3326 Likewise, for __max_element.
3327 (minmax(initializer_list<T>), minmax(initializer_list<T>, Compare)):
3328 Likewise, for __minmax_element.
3329
33302021-08-18 Jonathan Wakely <jwakely@redhat.com>
3331
3332 * include/debug/deque (deque(size_type, const T&, const A&)):
3333 Prevent class template argument deduction and replace with a
3334 deduction guide.
3335 * include/debug/forward_list (forward_list(size_type, const T&, const A&)):
3336 Likewise.
3337 * include/debug/list (list(size_type, const T&, const A&)):
3338 Likewise.
3339 * include/debug/vector (vector(size_type, const T&, const A&)):
3340 Likewise.
3341
33422021-08-18 Jonathan Wakely <jwakely@redhat.com>
3343
3344 * python/libstdcxx/v6/printers.py (StdBitReferencePrinter): Use
3345 'std::vector<bool>::reference' as type name, not _Bit_reference.
3346 (build_libstdcxx_dictionary): Register printers for vector<bool>
3347 types in debug mode too.
3348 * testsuite/libstdc++-prettyprinters/simple.cc: Adjust expected
3349 output for invalid _Bit_reference. Use vector<bool>::reference
3350 instead of _Bit_reference.
3351 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
3352
33532021-08-17 Thomas Schwinge <thomas@codesourcery.com>
3354
3355 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose,
3356 continued.
3357
33582021-08-17 Luc Michel <lmichel@kalray.eu>
3359 Marc Poulhies <mpoulhies@kalrayinc.com>
3360
3361 * testsuite/lib/gdb-test.exp (gdb_version_check)
3362 (gdb_version_check_xmethods): Only check the GDB version for
3363 local native targets.
3364
33652021-08-17 Antony Polukhin <antoshkka@gmail.com>
3366 Jonathan Wakely <jwakely@redhat.com>
3367
3368 * include/bits/random.tcc (seed_seq::seed_seq): Reserve capacity
3369 if distance is O(1).
3370 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
3371 line number.
3372
33732021-08-17 Jonathan Wakely <jwakely@redhat.com>
3374
3375 * testsuite/26_numerics/random/seed_seq/cons/range.cc: Check
3376 construction from input iterators.
3377
33782021-08-17 Jonathan Wakely <jwakely@redhat.com>
3379
3380 * python/libstdcxx/v6/printers.py (StdErrorCatPrinter): Remove.
3381
33822021-08-17 Jonathan Wakely <jwakely@redhat.com>
3383
3384 PR libstdc++/101923
3385 * include/bits/std_function.h (function(function&&)): Check for
3386 non-empty parameter before doing any work.
3387
33882021-08-17 Jonathan Wakely <jwakely@redhat.com>
3389
3390 * include/bits/cow_string.h (basic_string::contains): Do not
3391 define for -std=gnu++20.
3392
33932021-08-17 Jonathan Wakely <jwakely@redhat.com>
3394
3395 * include/bits/ranges_util.h (__not_same_as): Rename to
3396 __different_from.
3397 * include/std/ranges (__not_same_as): Likewise.
3398
33992021-08-17 Jonathan Wakely <jwakely@redhat.com>
3400
3401 * include/std/utility (exchange): Add noexcept-specifier.
3402 * testsuite/20_util/exchange/noexcept.cc: New test.
3403
34042021-08-17 Jonathan Wakely <jwakely@redhat.com>
3405
3406 * python/libstdcxx/v6/printers.py (StdErrorCodePrinter): Define.
3407 (build_libstdcxx_dictionary): Register printer for
3408 std::error_code and std::error_condition.
3409 * testsuite/libstdc++-prettyprinters/cxx11.cc: Test it.
3410
34112021-08-16 Jonathan Wakely <jwakely@redhat.com>
3412
3413 PR libstdc++/101937
3414 * src/c++11/debug.cc (PrintContext::_M_indent): Replace with a
3415 static data member.
3416 (print_word): Use qualified-id to access it.
3417
34182021-08-16 Jonathan Wakely <jwakely@redhat.com>
3419
3420 * python/Makefile.am [GLIBCXX_BUILD_DEBUG] (install-data-local):
3421 Install another copy of the GDB hook.
3422 * python/Makefile.in: Regenerate.
3423
34242021-08-12 Jonathan Wakely <jwakely@redhat.com>
3425
3426 PR libstdc++/101870
3427 * include/c_global/cmath (hypot): Use __promoted_t.
3428 (lerp): Add new overload accepting any arithmetic types.
3429 * include/ext/type_traits.h (__promoted_t): New alias template.
3430 * testsuite/26_numerics/lerp.cc: Moved to...
3431 * testsuite/26_numerics/lerp/1.cc: ...here.
3432 * testsuite/26_numerics/lerp/constexpr.cc: New test.
3433 * testsuite/26_numerics/lerp/version.cc: New test.
3434
34352021-08-12 Jonathan Wakely <jwakely@redhat.com>
3436
3437 * testsuite/26_numerics/lerp.cc: Add header name to #error.
3438 * testsuite/26_numerics/midpoint/integral.cc: Likewise.
3439 * testsuite/26_numerics/midpoint/version.cc: New test.
3440
34412021-08-12 Jonathan Wakely <jwakely@redhat.com>
3442
3443 * include/experimental/random (experimental::randint): Add
3444 nodiscard attribute.
3445
34462021-08-12 Jonathan Wakely <jwakely@redhat.com>
3447
3448 * src/c++98/locale_init.cc: Require C++11.
3449 * src/c++98/localename.cc: Likewise.
3450 * src/c++98/misc-inst.cc: Require C++98.
3451
34522021-08-11 Jonathan Wakely <jwakely@redhat.com>
3453
3454 PR libstdc++/101866
3455 * testsuite/experimental/random/randint.cc: Loop and retry if
3456 reseed() produces the same sequence.
3457
34582021-08-11 Jonathan Wakely <jwakely@redhat.com>
3459
3460 * include/std/type_traits (__cpp_lib_is_pointer_interconvertible)
3461 (is_pointer_interconvertible_base_of_v)
3462 (is_pointer_interconvertible_base_of): Define for C++20.
3463 * include/std/version (__cpp_lib_is_pointer_interconvertible):
3464 Define.
3465 * testsuite/23_containers/span/layout_compat.cc: Use correct
3466 feature test macro for std::is_layout_compatible_v.
3467 * testsuite/20_util/is_pointer_interconvertible/value.cc: New test.
3468 * testsuite/20_util/is_pointer_interconvertible/version.cc: New test.
3469
34702021-08-09 Jonathan Wakely <jwakely@redhat.com>
3471
3472 * include/bits/regex.h (basic_regex::transform_primary): Use
3473 _GLIBCXX_STD_C::vector for local variable.
3474 * include/bits/regex.tcc (__regex_algo_impl): Use reference to
3475 _GLIBCXX_STD_C::vector base class of match_results.
3476 * include/bits/regex_automaton.tcc (_StateSeq:_M_clone): Use
3477 _GLIBCXX_STD_C::map and _GLIBCXX_STD_C::deque for local
3478 variables.
3479 * include/bits/regex_compiler.h (_BracketMatcher): Use
3480 _GLIBCXX_STD_C::vector for data members.
3481 * include/bits/regex_executor.h (_Executor): Likewise.
3482 * include/std/regex [_GLIBCXX_DEBUG]: Include <debug/vector>.
3483
34842021-08-09 François Dumont <fdumont@gcc.gnu.org>
3485
3486 * include/debug/safe_container.h
3487 (_Safe_container(_Safe_container&&, const _Alloc&, std::true_type)): New.
3488 (_Safe_container(_Safe_container&&, const _Alloc&, std::false_type)): New.
3489 (_Safe_container(_Safe_container&&, const _Alloc&)): Use latters.
3490
34912021-08-09 Jonathan Wakely <jwakely@redhat.com>
3492
3493 * testsuite/23_containers/unordered_map/cons/default.cc: Add
3494 equality comparison operators to allocator.
3495 * testsuite/23_containers/unordered_set/cons/default.cc:
3496 Likewise.
3497
34982021-08-08 François Dumont <fdumont@gcc.gnu.org>
3499
3500 * testsuite/25_algorithms/copy/debug/constexpr_neg.cc: Replace 'failed_assertion'
3501 dg-prune-output reason with 'builtin_unreachable'.
3502 * testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc: Likewise.
3503 * testsuite/25_algorithms/equal/debug/constexpr_neg.cc: Likewise.
3504 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc: Likewise.
3505 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc: Likewise.
3506 * testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc: Likewise.
3507 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc: Likewise.
3508 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc: Likewise.
3509 * testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc: Likewise.
3510
35112021-08-08 Hans-Peter Nilsson <hp@bitrange.com>
3512
3513 * testsuite/std/ranges/iota/max_size_type.cc: Set
3514 dg-timeout-factor to 4.
3515
35162021-08-06 Jonathan Wakely <jwakely@redhat.com>
3517
3518 * libsupc++/compare (compare_three_way, strong_order)
3519 (weak_order, partial_order, compare_strong_order_fallback)
3520 (compare_weak_order_fallback, compare_partial_order_fallback):
3521 Move nodiscard attributes to correct location.
3522
35232021-08-05 Jonathan Wakely <jwakely@redhat.com>
3524
3525 PR libstdc++/101782
3526 * include/bits/ranges_base.h (ranges::begin, ranges::end)
3527 (ranges::rbegin, ranges::rend, ranges::size, ranges::ssize)
3528 (ranges::empty, ranges::data): Move attribute after the
3529 declarator-id instead of at the end of the declarator.
3530 * include/bits/stl_iterator.h (__gnu_cxx::__normal_iterator):
3531 Move attributes back to the start of the function declarator,
3532 but move the requires-clause to the end.
3533 (common_iterator): Move attribute after the declarator-id.
3534 * include/bits/stl_queue.h (queue): Remove ill-formed attributes
3535 from friend declaration that are not definitions.
3536 * include/std/ranges (views::all, views::filter)
3537 (views::transform, views::take, views::take_while,
3538 views::drop) (views::drop_while, views::join,
3539 views::lazy_split) (views::split, views::counted,
3540 views::common, views::reverse) (views::elements): Move
3541 attributes after the declarator-id.
3542
35432021-08-05 Jonathan Wakely <jwakely@redhat.com>
3544
3545 * libsupc++/compare (partial_ordering, weak_ordering)
3546 (strong_ordering, is_eq, is_neq, is_lt, is_lteq, is_gt, is_gteq)
3547 (compare_three_way, strong_order, weak_order, partial_order)
3548 (compare_strong_order_fallback, compare_weak_order_fallback)
3549 (compare_partial_order_fallback, __detail::__synth3way): Add
3550 nodiscard attribute.
3551 * testsuite/18_support/comparisons/categories/zero_neg.cc: Add
3552 -Wno-unused-result to options.
3553
35542021-08-05 Jonathan Wakely <jwakely@redhat.com>
3555
3556 PR libstdc++/101782
3557 * include/bits/ranges_base.h (ranges::begin, ranges::end)
3558 (ranges::rbegin, ranges::rend, ranges::size, ranges::ssize)
3559 (ranges::empty, ranges::data): Move attribute to the end of
3560 the declarator.
3561 * include/bits/stl_iterator.h (__gnu_cxx::__normal_iterator)
3562 (common_iterator): Likewise for non-member operator functions.
3563 * include/std/ranges (views::all, views::filter)
3564 (views::transform, views::take, views::take_while, views::drop)
3565 (views::drop_while, views::join, views::lazy_split)
3566 (views::split, views::counted, views::common, views::reverse)
3567 (views::elements): Likewise.
3568 * testsuite/std/ranges/access/101782.cc: New test.
3569
35702021-08-04 Jonathan Wakely <jwakely@redhat.com>
3571
3572 * include/bits/forward_list.h: Add [[nodiscard]] to functions
3573 with no side-effects.
3574 * include/bits/stl_bvector.h: Likewise.
3575 * include/bits/stl_deque.h: Likewise.
3576 * include/bits/stl_list.h: Likewise.
3577 * include/bits/stl_queue.h: Likewise.
3578 * include/bits/stl_stack.h: Likewise.
3579 * include/bits/stl_vector.h: Likewise.
3580 * include/debug/deque: Likewise.
3581 * include/debug/forward_list: Likewise.
3582 * include/debug/list: Likewise.
3583 * include/debug/safe_iterator.h: Likewise.
3584 * include/debug/vector: Likewise.
3585 * include/std/array: Likewise.
3586 * testsuite/23_containers/array/creation/3_neg.cc: Use
3587 -Wno-unused-result.
3588 * testsuite/23_containers/array/debug/back1_neg.cc: Cast result
3589 to void.
3590 * testsuite/23_containers/array/debug/back2_neg.cc: Likewise.
3591 * testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
3592 * testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
3593 * testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc:
3594 Likewise.
3595 * testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc:
3596 Likewise.
3597 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
3598 Adjust dg-error line numbers.
3599 * testsuite/23_containers/deque/cons/clear_allocator.cc: Cast
3600 result to void.
3601 * testsuite/23_containers/deque/debug/invalidation/4.cc:
3602 Likewise.
3603 * testsuite/23_containers/deque/types/1.cc: Use
3604 -Wno-unused-result.
3605 * testsuite/23_containers/list/types/1.cc: Cast result to void.
3606 * testsuite/23_containers/priority_queue/members/7161.cc:
3607 Likewise.
3608 * testsuite/23_containers/queue/members/7157.cc: Likewise.
3609 * testsuite/23_containers/vector/59829.cc: Likewise.
3610 * testsuite/23_containers/vector/ext_pointer/types/1.cc:
3611 Likewise.
3612 * testsuite/23_containers/vector/ext_pointer/types/2.cc:
3613 Likewise.
3614 * testsuite/23_containers/vector/types/1.cc: Use
3615 -Wno-unused-result.
3616
36172021-08-04 Jonathan Wakely <jwakely@redhat.com>
3618
3619 * include/bits/iterator_concepts.h (iter_move): Add
3620 [[nodiscard]].
3621 * include/bits/range_access.h (begin, end, cbegin, cend)
3622 (rbegin, rend, crbegin, crend, size, data, ssize): Likewise.
3623 * include/bits/ranges_base.h (ranges::begin, ranges::end)
3624 (ranges::cbegin, ranges::cend, ranges::rbegin, ranges::rend)
3625 (ranges::crbegin, ranges::crend, ranges::size, ranges::ssize)
3626 (ranges::empty, ranges::data, ranges::cdata): Likewise.
3627 * include/bits/stl_iterator.h (reverse_iterator, __normal_iterator)
3628 (back_insert_iterator, front_insert_iterator, insert_iterator)
3629 (move_iterator, move_sentinel, common_iterator)
3630 (counted_iterator): Likewise.
3631 * include/bits/stl_iterator_base_funcs.h (distance, next, prev):
3632 Likewise.
3633 * include/bits/stream_iterator.h (istream_iterator)
3634 (ostream_iterartor): Likewise.
3635 * include/bits/streambuf_iterator.h (istreambuf_iterator)
3636 (ostreambuf_iterator): Likewise.
3637 * include/std/ranges (views::single, views::iota, views::all)
3638 (views::filter, views::transform, views::take, views::take_while)
3639 (views::drop, views::drop_while, views::join, views::lazy_split)
3640 (views::split, views::counted, views::common, views::reverse)
3641 (views::elements): Likewise.
3642 * testsuite/20_util/rel_ops.cc: Use -Wno-unused-result.
3643 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Likewise.
3644 * testsuite/24_iterators/normal_iterator/greedy_ops.cc:
3645 Likewise.
3646 * testsuite/24_iterators/reverse_iterator/2.cc: Likewise.
3647 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc:
3648 Likewise.
3649 * testsuite/21_strings/basic_string/range_access/char/1.cc:
3650 Cast result to void.
3651 * testsuite/21_strings/basic_string/range_access/wchar_t/1.cc:
3652 Likewise.
3653 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
3654 Likewise.
3655 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
3656 Likewise.
3657 * testsuite/23_containers/array/range_access.cc: Likewise.
3658 * testsuite/23_containers/deque/range_access.cc: Likewise.
3659 * testsuite/23_containers/forward_list/range_access.cc:
3660 Likewise.
3661 * testsuite/23_containers/list/range_access.cc: Likewise.
3662 * testsuite/23_containers/map/range_access.cc: Likewise.
3663 * testsuite/23_containers/multimap/range_access.cc: Likewise.
3664 * testsuite/23_containers/multiset/range_access.cc: Likewise.
3665 * testsuite/23_containers/set/range_access.cc: Likewise.
3666 * testsuite/23_containers/unordered_map/range_access.cc:
3667 Likewise.
3668 * testsuite/23_containers/unordered_multimap/range_access.cc:
3669 Likewise.
3670 * testsuite/23_containers/unordered_multiset/range_access.cc:
3671 Likewise.
3672 * testsuite/23_containers/unordered_set/range_access.cc:
3673 Likewise.
3674 * testsuite/23_containers/vector/range_access.cc: Likewise.
3675 * testsuite/24_iterators/customization_points/iter_move.cc:
3676 Likewise.
3677 * testsuite/24_iterators/istream_iterator/sentinel.cc:
3678 Likewise.
3679 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc:
3680 Likewise.
3681 * testsuite/24_iterators/move_iterator/dr2061.cc: Likewise.
3682 * testsuite/24_iterators/operations/prev_neg.cc: Likewise.
3683 * testsuite/24_iterators/ostreambuf_iterator/2.cc: Likewise.
3684 * testsuite/24_iterators/range_access/range_access.cc:
3685 Likewise.
3686 * testsuite/24_iterators/range_operations/100768.cc: Likewise.
3687 * testsuite/26_numerics/valarray/range_access2.cc: Likewise.
3688 * testsuite/28_regex/range_access.cc: Likewise.
3689 * testsuite/experimental/string_view/range_access/char/1.cc:
3690 Likewise.
3691 * testsuite/experimental/string_view/range_access/wchar_t/1.cc:
3692 Likewise.
3693 * testsuite/ext/vstring/range_access.cc: Likewise.
3694 * testsuite/std/ranges/adaptors/take.cc: Likewise.
3695 * testsuite/std/ranges/p2259.cc: Likewise.
3696
36972021-08-03 Jonathan Wakely <jwakely@redhat.com>
3698
3699 * include/bits/random.tcc (linear_congruential_engine): Do not
3700 define static constexpr members when they are implicitly inline.
3701 * include/std/ratio (ratio, __ratio_multiply, __ratio_divide)
3702 (__ratio_add, __ratio_subtract): Likewise.
3703 * include/std/type_traits (integral_constant): Likewise.
3704 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
3705 line number.
3706
37072021-08-03 Jonathan Wakely <jwakely@redhat.com>
3708
3709 * testsuite/util/testsuite_common_types.h: Replace uses of
3710 tr1::unordered_map and tr1::unordered_set with their C++11
3711 equivalents.
3712 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust
3713 dg-error line number.
3714 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3715 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc:
3716 Likewise.
3717 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc:
3718 Likewise.
3719 * testsuite/29_atomics/atomic_integral/operators/bitwise_neg.cc:
3720 Likewise.
3721 * testsuite/29_atomics/atomic_integral/operators/decrement_neg.cc:
3722 Likewise.
3723 * testsuite/29_atomics/atomic_integral/operators/increment_neg.cc:
3724 Likewise.
3725
37262021-08-03 Jonathan Wakely <jwakely@redhat.com>
3727
3728 * include/std/memory_resource (polymorphic_allocator::delete_object):
3729 Call destructor directly instead of using destroy.
3730 (allocator_traits<polymorphic_allocator<T>>): Define partial
3731 specialization.
3732
37332021-08-03 Jonathan Wakely <jwakely@redhat.com>
3734
3735 * testsuite/20_util/function_objects/binders/3113.cc: Remove
3736 trailing whitespace.
3737 * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise.
3738 * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
3739 * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc:
3740 Likewise.
3741 * testsuite/20_util/shared_ptr/creation/dr925.cc: Likewise.
3742 * testsuite/25_algorithms/headers/algorithm/synopsis.cc:
3743 Likewise.
3744 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
3745 Likewise.
3746 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
3747 Likewise.
3748
37492021-08-03 Jonathan Wakely <jwakely@redhat.com>
3750
3751 * doc/xml/manual/evolution.xml: Document deprecation.
3752 * doc/html/*: Regenerate.
3753 * include/bits/c++config (_GLIBCXX14_DEPRECATED): Define.
3754 (_GLIBCXX14_DEPRECATED_SUGGEST): Define.
3755 * include/bits/stl_algo.h (random_shuffle): Deprecate for C++14
3756 and later.
3757 * testsuite/25_algorithms/headers/algorithm/synopsis.cc: Adjust
3758 for C++11 and C++14 changes to std::random_shuffle and
3759 std::shuffle.
3760 * testsuite/25_algorithms/random_shuffle/1.cc: Add options to
3761 use deprecated algorithms.
3762 * testsuite/25_algorithms/random_shuffle/59603.cc: Likewise.
3763 * testsuite/25_algorithms/random_shuffle/moveable.cc: Likewise.
3764 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/2.cc:
3765 Likewise.
3766 * testsuite/25_algorithms/random_shuffle/requirements/explicit_instantiation/pod.cc:
3767 Likewise.
3768
37692021-08-03 Jonathan Wakely <jwakely@redhat.com>
3770
3771 * testsuite/23_containers/forward_list/operations/3.cc:
3772 Use lambda instead of std::bind2nd.
3773 * testsuite/20_util/function_objects/binders/3113.cc: Add
3774 options for testing deprecated features.
3775 * testsuite/20_util/pair/cons/99957.cc: Likewise.
3776 * testsuite/20_util/shared_ptr/assign/auto_ptr.cc: Likewise.
3777 * testsuite/20_util/shared_ptr/assign/auto_ptr_neg.cc: Likewise.
3778 * testsuite/20_util/shared_ptr/assign/auto_ptr_rvalue.cc:
3779 Likewise.
3780 * testsuite/20_util/shared_ptr/cons/43820_neg.cc: Likewise.
3781 * testsuite/20_util/shared_ptr/cons/auto_ptr.cc: Likewise.
3782 * testsuite/20_util/shared_ptr/cons/auto_ptr_neg.cc: Likewise.
3783 * testsuite/20_util/shared_ptr/creation/dr925.cc: Likewise.
3784 * testsuite/20_util/unique_ptr/cons/auto_ptr.cc: Likewise.
3785 * testsuite/20_util/unique_ptr/cons/auto_ptr_neg.cc: Likewise.
3786 * testsuite/ext/pb_ds/example/priority_queue_erase_if.cc:
3787 Likewise.
3788 * testsuite/ext/pb_ds/example/priority_queue_split_join.cc:
3789 Likewise.
3790 * testsuite/lib/dg-options.exp (dg_add_options_using-deprecated):
3791 New proc.
3792
37932021-08-03 Jonathan Wakely <jwakely@redhat.com>
3794
3795 * include/bits/regex_executor.h (_State_info): Replace
3796 unique_ptr<bool[]> with array of bool.
3797 * include/bits/regex_executor.tcc: Likewise.
3798 * include/bits/regex_scanner.tcc: Replace std::strchr with
3799 __builtin_strchr.
3800 * include/std/regex: Replace standard headers with smaller
3801 internal ones.
3802 * testsuite/28_regex/traits/char/lookup_classname.cc: Include
3803 <string.h> for strlen.
3804 * testsuite/28_regex/traits/char/lookup_collatename.cc:
3805 Likewise.
3806
38072021-08-03 Jonathan Wakely <jwakely@redhat.com>
3808
3809 * include/bits/locale_conv.h (__detail::_Scoped_ptr): Define new
3810 RAII class template.
3811 (wstring_convert, wbuffer_convert): Use __detail::_Scoped_ptr
3812 instead of unique_ptr.
3813
38142021-08-02 Patrick Palka <ppalka@redhat.com>
3815
3816 PR libstdc++/101599
3817 * include/bits/ranges_algo.h (__reverse_copy_fn::operator()):
3818 Add missing std::move in return statement.
3819 (__partition_copy_fn::operator()): Rename templtae parameter
3820 _O2 to _Out2. Uglify function parameters out_true and out_false.
3821 * include/bits/ranges_algobase.h (__copy_or_move): Add missing
3822 std::move to recursive call that unwraps a __normal_iterator
3823 output iterator.
3824 * testsuite/25_algorithms/copy/constrained.cc (test06): New test.
3825 * testsuite/25_algorithms/move/constrained.cc (test05): New test.
3826
38272021-08-02 Patrick Palka <ppalka@redhat.com>
3828
3829 PR libstdc++/101589
3830 * include/std/ranges (lazy_split_view::_InnerIter::base): Make
3831 the const& overload unconstrained and return a const reference
3832 as per LWG 3533. Make unconditionally noexcept.
3833 (elements_view::base): Revert accidental r12-569 change.
3834 (elements_view::_Iterator::base): Make the const& overload
3835 unconstrained and return a const reference as per LWG 3533.
3836 Make unconditionally noexcept.
3837
38382021-08-02 Patrick Palka <ppalka@redhat.com>
3839
3840 PR libstdc++/101483
3841 * include/std/ranges (join_view::_Iterator::_Iterator): Add
3842 missing std::move.
3843
38442021-08-02 Jonathan Wakely <jwakely@redhat.com>
3845
3846 PR libstdc++/101709
3847 * src/filesystem/ops-common.h (get_temp_directory_from_env):
3848 Add error_code parameter.
3849 * src/c++17/fs_ops.cc (fs::temp_directory_path): Pass error_code
3850 argument to get_temp_directory_from_env and check it.
3851 * src/filesystem/ops.cc (fs::temp_directory_path): Likewise.
3852
38532021-08-02 Jonathan Wakely <jwakely@redhat.com>
3854
3855 * testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
3856 Add dg-error for c++11_only target.
3857
38582021-07-30 Jonathan Wakely <jwakely@redhat.com>
3859
3860 PR libstdc++/65018
3861 * configure.ac: Check for secure_getenv.
3862 * config.h.in: Regenerate.
3863 * configure: Regenerate.
3864 * src/filesystem/ops-common.h (get_temp_directory_from_env): New
3865 helper function to obtain path from the environment.
3866 * src/c++17/fs_ops.cc (fs::temp_directory_path): Use new helper.
3867 * src/filesystem/ops.cc (fs::temp_directory_path): Likewise.
3868 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
3869 Print messages if test cannot be run.
3870 * testsuite/experimental/filesystem/operations/temp_directory_path.cc:
3871 Likewise. Fix incorrect condition. Use "TMP" to work with
3872 Windows as well as POSIX.
3873
38742021-07-29 Hans-Peter Nilsson <hp@bitrange.com>
3875
3876 * src/c++17/memory_resource.cc: Use __exchange instead
3877 of std::exchange.
3878
38792021-07-27 Jonathan Wakely <jwakely@redhat.com>
3880
3881 * include/experimental/optional (__throw_bad_optional_access):
3882 Replace GNU attribute with C++11 attribute.
3883 (optional::value, optional::value_or): Use if statements
3884 instead of conditional expressions.
3885 * include/std/optional (__throw_bad_optional_access)
3886 (optional::value, optional::value_or): Likewise.
3887
38882021-07-27 Marek Polacek <polacek@redhat.com>
3889
3890 DR 1512
3891 PR c++/99701
3892 * testsuite/20_util/tuple/comparison_operators/overloaded.cc:
3893 Move a line...
3894 * testsuite/20_util/tuple/comparison_operators/overloaded2.cc:
3895 ...here. New test.
3896
38972021-07-27 Jonathan Wakely <jwakely@redhat.com>
3898
3899 * include/bits/cow_string.h: Consistently use tab for
3900 indentation.
3901
39022021-07-27 Jonathan Wakely <jwakely@redhat.com>
3903
3904 * include/Makefile.am: Add new header.
3905 * include/Makefile.in: Regenerate.
3906 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
3907 (basic_string): Move definition of Copy-on-Write string to
3908 new file.
3909 * include/bits/basic_string.tcc: Likewise.
3910 * include/bits/cow_string.h: New file.
3911
39122021-07-27 Jonathan Wakely <jwakely@redhat.com>
3913
3914 * include/std/algorithm: Do not include <utility>.
3915 * include/std/functional: Likewise.
3916 * include/std/regex: Include <bits/stl_pair.h> instead of
3917 <utility>.
3918 * include/debug/map.h: Likewise.
3919 * include/debug/multimap.h: Likewise.
3920 * include/debug/multiset.h: Likewise.
3921 * include/debug/set.h: Likewise.
3922 * include/debug/vector: Likewise.
3923 * include/bits/fs_path.h: Likewise.
3924 * include/bits/unique_ptr.h: Do not include <utility>.
3925 * include/experimental/any: Likewise.
3926 * include/experimental/executor: Likewise.
3927 * include/experimental/memory: Likewise.
3928 * include/experimental/optional: Likewise.
3929 * include/experimental/socket: Use __exchange instead
3930 of std::exchange.
3931 * src/filesystem/ops-common.h: Likewise.
3932 * testsuite/20_util/default_delete/48631_neg.cc: Adjust expected
3933 errors to not use a hardcoded line number.
3934 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
3935 * testsuite/20_util/specialized_algorithms/uninitialized_copy/constrained.cc:
3936 Include <utility> for std::as_const.
3937 * testsuite/20_util/specialized_algorithms/uninitialized_default_construct/constrained.cc:
3938 Likewise.
3939 * testsuite/20_util/specialized_algorithms/uninitialized_move/constrained.cc:
3940 Likewise.
3941 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/constrained.cc:
3942 Likewise.
3943 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
3944 Adjust dg-error line number.
3945
39462021-07-27 Jonathan Wakely <jwakely@redhat.com>
3947
3948 * include/Makefile.am: Add bits/utility.h header.
3949 * include/Makefile.in: Regenerate.
3950 * include/bits/utility.h: New file.
3951 * include/std/utility (tuple_size, tuple_element): Move
3952 to new header.
3953 * include/std/type_traits (__is_tuple_like_impl<tuple<T...>>):
3954 Move to <tuple>.
3955 (_Index_tuple, _Build_index_tuple, integer_sequence): Likewise.
3956 (in_place_t, in_place_index_t, in_place_type_t): Likewise.
3957 * include/bits/ranges_util.h: Include new header instead of
3958 <utility>.
3959 * include/bits/stl_pair.h (tuple_size, tuple_element): Move
3960 partial specializations for std::pair here.
3961 (get): Move overloads for std::pair here.
3962 * include/std/any: Include new header instead of <utility>.
3963 * include/std/array: Likewise.
3964 * include/std/memory_resource: Likewise.
3965 * include/std/optional: Likewise.
3966 * include/std/variant: Likewise.
3967 * include/std/tuple: Likewise.
3968 (__is_tuple_like_impl<tuple<T...>>): Move here.
3969 (get) Declare overloads for std::array.
3970 * include/std/version (__cpp_lib_tuples_by_type): Change type
3971 to long.
3972 * testsuite/20_util/optional/84601.cc: Include <utility>.
3973 * testsuite/20_util/specialized_algorithms/uninitialized_fill/constrained.cc:
3974 Likewise.
3975 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
3976 Adjust dg-error line numbers.
3977 * testsuite/std/ranges/access/cbegin.cc: Include <utility>.
3978 * testsuite/std/ranges/access/cend.cc: Likewise.
3979 * testsuite/std/ranges/access/end.cc: Likewise.
3980 * testsuite/std/ranges/single_view.cc: Likewise.
3981
39822021-07-23 Jonathan Wakely <jwakely@redhat.com>
3983
3984 * include/std/future: Include <bits/atomic_base.h> instead of
3985 <atomic>.
3986
39872021-07-23 Jonathan Wakely <jwakely@redhat.com>
3988
3989 * include/bits/stl_relops.h: Update documentation comments.
3990
39912021-07-22 Jonathan Wakely <jwakely@redhat.com>
3992
3993 PR libstdc++/101583
3994 * include/bits/hashtable.h (_Hashtable): Replace mixin with
3995 _Enable_default_ctor. Construct it explicitly in all
3996 non-forwarding, non-defaulted constructors.
3997 * testsuite/23_containers/unordered_map/cons/default.cc: Check
3998 non-default constructors can be used.
3999 * testsuite/23_containers/unordered_set/cons/default.cc:
4000 Likewise.
4001
40022021-07-22 David Edelsohn <dje.gcc@gmail.com>
4003
4004 * config/os/aix/os_defines.h (__LIBC_NO_CPP_MATH_OVERLOADS__): Define.
4005
40062021-07-22 Jonathan Wakely <jwakely@redhat.com>
4007
4008 PR libstdc++/94295
4009 * include/ext/new_allocator.h (_GLIBCXX_OPERATOR_NEW)
4010 (_GLIBCXX_OPERATOR_DELETE, _GLIBCXX_SIZED_DEALLOC): Define.
4011 (allocator::allocate, allocator::deallocate): Use new macros.
4012
40132021-07-22 Jonathan Wakely <jwakely@redhat.com>
4014
4015 PR libstdc++/101571
4016 * include/bits/ranges_uninitialized.h (_DestroyGuard): Change
4017 constructor parameter to reference and use addressof.
4018 * testsuite/util/testsuite_iterators.h: Define deleted operator&
4019 overloads for test iterators.
4020
40212021-07-22 Jonathan Wakely <jwakely@redhat.com>
4022
4023 * include/bits/std_function.h (_Function_base): Add
4024 default member initializers and define constructor as defaulted.
4025 (function::_M_invoker): Add default member initializer.
4026
40272021-07-22 Jonathan Wakely <jwakely@redhat.com>
4028
4029 PR libstdc++/100682
4030 * doc/xml/manual/debug_mode.xml: Update documentation about
4031 debug capability of std::array.
4032 * doc/html/*: Regenerate.
4033 * include/debug/array: New file.
4034
40352021-07-21 Jonathan Wakely <jwakely@redhat.com>
4036
4037 PR libstdc++/101542
4038 * include/ext/rope (sequence_buffer): Add move constructor and
4039 move assignment operator.
4040 * testsuite/ext/rope/101542.cc: New test.
4041
40422021-07-20 Jonathan Wakely <jwakely@redhat.com>
4043
4044 PR libstdc++/101510
4045 * src/c++17/fs_ops.cc (fs::create_directories): Use status
4046 instead of symlink_status.
4047 * src/filesystem/ops.cc (fs::create_directories): Likewise.
4048 * testsuite/27_io/filesystem/operations/create_directories.cc:
4049 Check symlink to existing directory.
4050 * testsuite/27_io/filesystem/operations/create_directory.cc: Do
4051 not test with symlinks on Windows.
4052 * testsuite/experimental/filesystem/operations/create_directories.cc:
4053 Check symlink to existing directory.
4054 * testsuite/experimental/filesystem/operations/create_directory.cc:
4055 Do not test with symlinks on Windows.
4056
40572021-07-20 Jonathan Wakely <jwakely@redhat.com>
4058
4059 PR libstdc++/100863
4060 * include/bits/hashtable.h (_Hashtable): Conditionally delete
4061 default constructor by deriving from _Enable_special_members.
4062 * testsuite/23_containers/unordered_map/cons/default.cc: New test.
4063 * testsuite/23_containers/unordered_set/cons/default.cc: New test.
4064
40652021-07-20 Jonathan Wakely <jwakely@redhat.com>
4066
4067 PR libstdc++/101510
4068 * src/c++17/fs_ops.cc (create_dir): Adjust whitespace.
4069 * testsuite/27_io/filesystem/operations/create_directory.cc:
4070 Test creating directory with name of existing symlink to
4071 directory.
4072 * testsuite/experimental/filesystem/operations/create_directory.cc:
4073 Likewise.
4074
40752021-07-16 Jonathan Wakely <jwakely@redhat.com>
4076
4077 * include/std/tuple (get<I>): Add deleted overload for bad
4078 index.
4079 * testsuite/20_util/tuple/element_access/get_neg.cc: Adjust
4080 expected errors.
4081
40822021-07-16 Jonathan Wakely <jwakely@redhat.com>
4083
4084 * include/bits/max_size_type.h (numeric_limits<__max_size_type>):
4085 Use __int_traits unconditionally.
4086
40872021-07-16 Jonathan Wakely <jwakely@redhat.com>
4088
4089 * include/bits/random.h (_Shift::__value): Use constexpr.
4090 (_Select_uint_least_t::type): Use using-declaration.
4091 (_Mod): Likewise.
4092 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
4093 line number.
4094
40952021-07-16 Jonathan Wakely <jwakely@redhat.com>
4096
4097 * include/bits/cpp_type_traits.h (__INT_N): Use __extension__
4098 instead of diagnostic pragmas.
4099 * include/bits/functional_hash.h: Likewise.
4100 * include/bits/iterator_concepts.h (__is_signed_int128)
4101 (__is_unsigned_int128): Likewise.
4102 * include/bits/max_size_type.h (__max_size_type): Likewise.
4103 (numeric_limits<__max_size_type>): Likewise.
4104 * include/bits/std_abs.h (abs): Likewise.
4105 * include/bits/stl_algobase.h (__size_to_integer): Likewise.
4106 * include/bits/uniform_int_dist.h (uniform_int_distribution):
4107 Likewise.
4108 * include/ext/numeric_traits.h (_GLIBCXX_INT_N_TRAITS):
4109 Likewise.
4110 * include/std/type_traits (__is_integral_helper<INT_N>)
4111 (__is_signed_integer, __is_unsigned_integer)
4112 (__make_unsigned<INT_N>, __make_signed<INT_N>): Likewise.
4113 * include/std/limits (__INT_N): Add __extension__ keyword.
4114 * include/bits/random.h (_Select_uint_least_t)
4115 (random_device): Likewise.
4116
41172021-07-16 Patrick Palka <ppalka@redhat.com>
4118
4119 PR libstdc++/101231
4120 * include/std/ranges (_CachedPosition::_M_get): For non-forward
4121 ranges, just call __builtin_unreachable.
4122 * testsuite/std/ranges/istream_view.cc (test05): New test.
4123
41242021-07-16 Patrick Palka <ppalka@redhat.com>
4125
4126 PR libstdc++/101214
4127 * include/std/ranges (split_view::split_view): Use std::move.
4128 (split_view::_Iterator::_Iterator): Remove redundant
4129 default_initializable constraint.
4130 (split_view::_Sentinel::_Sentinel): Declare.
4131 * testsuite/std/ranges/adaptors/split.cc (test02): New test.
4132
41332021-07-16 Marek Polacek <polacek@redhat.com>
4134
4135 * testsuite/20_util/ratio/operations/ops_overflow_neg.cc: Add
4136 dg-error.
4137
41382021-07-16 Jonathan Wakely <jwakely@redhat.com>
4139
4140 * include/bits/unique_ptr.h: Adjust doxygen markup.
4141
41422021-07-16 Jonathan Wakely <jwakely@redhat.com>
4143
4144 PR libstdc++/101307
4145 * include/std/type_traits: Adjust doxygen markup.
4146
41472021-07-16 Jonathan Wakely <jwakely@redhat.com>
4148
4149 * include/bits/cpp_type_traits.h: Add diagnostic pragmas around
4150 uses of non-standard integer types.
4151 * include/bits/functional_hash.h: Likewise.
4152 * include/bits/iterator_concepts.h: Likewise.
4153 * include/bits/max_size_type.h: Likewise.
4154 * include/bits/std_abs.h: Likewise.
4155 * include/bits/stl_algobase.h: Likewise.
4156 * include/bits/uniform_int_dist.h: Likewise.
4157 * include/ext/numeric_traits.h: Likewise.
4158 * include/std/type_traits: Likewise.
4159
41602021-07-15 Jonathan Wakely <jwakely@redhat.com>
4161
4162 PR libstdc++/101427
4163 * include/std/tuple (tuple_element): Improve static_assert text.
4164 (__get_helper): Add deleted overload.
4165 (get<i>(tuple<T...>&&), get<i>(const tuple<T...>&&)): Use
4166 __get_helper directly.
4167 (__get_helper2): Remove.
4168 (__find_uniq_type_in_pack): New constexpr helper function.
4169 (get<T>): Use __find_uniq_type_in_pack and __get_helper instead
4170 of __get_helper2.
4171 * testsuite/20_util/tuple/element_access/get_neg.cc: Adjust
4172 expected errors.
4173 * testsuite/20_util/tuple/element_access/101427.cc: New test.
4174
41752021-07-15 Jonathan Wakely <jwakely@redhat.com>
4176
4177 PR libstdc++/101429
4178 * include/bits/c++config (__replacement_assert): Add noexcept.
4179 [!_GLIBCXX_VERBOSE] (__glibcxx_assert_impl): Use __builtin_abort
4180 instead of __replacement_assert.
4181
41822021-07-14 Jonathan Wakely <jwakely@redhat.com>
4183
4184 * include/std/string_view (basic_string_view(It, End)): Add
4185 noexcept-specifier.
4186 * testsuite/21_strings/basic_string_view/cons/char/range.cc:
4187 Check noexcept-specifier. Also check construction without CTAD.
4188
41892021-07-13 Jonathan Wakely <jwakely@redhat.com>
4190
4191 PR c++/101361
4192 * include/std/string_view (ends_with): Use traits_type::compare
4193 directly.
4194
41952021-07-13 Jonathan Wakely <jwakely@redhat.com>
4196
4197 * include/std/string_view: Only include <bits/ranges_base.h>
4198 once, and only for C++20 and later.
4199
42002021-07-12 Jonathan Wakely <jwakely@redhat.com>
4201
4202 PR libstdc++/101411
4203 * include/std/span (as_writable_bytes): Add requires-clause.
4204 * testsuite/23_containers/span/101411.cc: New test.
4205
42062021-07-09 Matheus Castanho <msc@linux.ibm.com>
4207
4208 * include/std/mutex (__lock_impl): Check
4209 _GLIBCXX_HAS_GTHREADS before using __gthread_yield.
4210
42112021-07-02 Jonathan Wakely <jwakely@redhat.com>
4212
4213 PR libstdc++/101271
4214 * include/bits/unique_ptr.h (unique_ptr<T[],D>::operator[]):
4215 Remove noexcept-specifier.
4216 (unique_ptr<T[],D>::_S_nothrow_deref): Remove.
4217 * testsuite/20_util/unique_ptr/lwg2762.cc: Remove checks for
4218 operator[].
4219
42202021-07-01 Jonathan Wakely <jwakely@redhat.com>
4221
4222 * doc/doxygen/doxygroups.cc: Fix docs for std::literals.
4223 * doc/doxygen/user.cfg.in: Exclude the Networking TS header.
4224 Add some more predefined macros.
4225 * include/bits/fs_fwd.h: Move @addtogroup commands inside
4226 namespaces. Add better documentation.
4227 * include/bits/fs_path.h: Likewise.
4228 * include/experimental/bits/fs_fwd.h: Likewise.
4229 * include/experimental/bits/fs_path.h: Likewise.
4230 * include/ext/throw_allocator.h: Fix typo and improve docs.
4231 * include/std/chrono: Move @addtogroup commands.
4232 * include/std/system_error: Move @addtogroup commands.
4233 * libsupc++/exception: Improve documentation.
4234 * libsupc++/exception.h: Add @since documentation.
4235
42362021-06-30 Jonathan Wakely <jwakely@redhat.com>
4237
4238 PR libstdc++/101258
4239 * doc/doxygen/user.cfg.in (INPUT): Add <experimental/simd>.
4240 (COLS_IN_ALPHA_INDEX): Remove obsolete tag.
4241 (PREDEFINED): Add/fix some more macros that need to be expanded.
4242 * include/bits/random.h: Stop Doxygen from documenting internal
4243 implementation details.
4244 * include/bits/random.tcc: Likewise.
4245 * include/bits/this_thread_sleep.h: Fix @file name.
4246 * include/experimental/bits/simd.h: Add to Doxygen group. Do not
4247 document internal implementation details.
4248 * include/experimental/bits/simd_detail.h: Do not document
4249 internal implementation details.
4250 * include/experimental/simd: Define Doxygen groups.
4251 * include/experimental/type_traits: Improve documentation for
4252 the header file. Define groups. Use @since commands.
4253 * include/std/scoped_allocator (scoped_allocator_adaptor): Move
4254 declaration before undocumented region.
4255 * include/std/type_traits (true_type, false_type): Use using
4256 declaration instead of typedef.
4257 (is_invocable_v, is_nothrow_invocable_v, is_invocable_r_v)
4258 (is_nothrow_invocable_r_v): Move definitions next to other C++17
4259 variable templates.
4260 Do not document internal implementation details. Move misplaced
4261 group-end command. Define group for variable templates.
4262 * include/std/variant: Do not document internal implementation
4263 details.
4264 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
4265 line number.
4266
42672021-06-30 Jonathan Wakely <jwakely@redhat.com>
4268
4269 * include/experimental/simd: Do not define anything pre-C++17.
4270
42712021-06-30 Jonathan Wakely <jwakely@redhat.com>
4272
4273 * include/bits/random.tcc [__cpp_inline_variables]: Remove
4274 redundant definitions of static constexpr member variables.
4275 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
4276 line number.
4277
42782021-06-28 Jonathan Wakely <jwakely@redhat.com>
4279
4280 * include/bits/streambuf.tcc (__copy_streambufs_eof): Remove
4281 explicit instantiation declarations.
4282 * src/c++11/streambuf-inst.cc (__copy_streambufs_eof): Remove
4283 explicit instantiation definitions.
4284
42852021-06-28 Jonathan Wakely <jwakely@redhat.com>
4286
4287 PR libstdc++/97088
4288 * testsuite/17_intro/names.cc: Fix #if condition for names used
4289 by newlib headers.
4290
42912021-06-28 Jonathan Wakely <jwakely@redhat.com>
4292
4293 PR libstdc++/101236
4294 * include/bits/unique_ptr.h (unique_ptr<T[], D>::operator[]):
4295 Fail gracefully if element_type is incomplete.
4296 * testsuite/20_util/unique_ptr/cons/incomplete.cc: Clarify that
4297 the standard doesn't require this test to work for array types.
4298 * testsuite/20_util/unique_ptr/lwg2762.cc: Check that incomplete
4299 types can be used with array specialization.
4300 * testsuite/20_util/unique_ptr/101236.cc: New test.
4301
43022021-06-28 Jonathan Wakely <jwakely@redhat.com>
4303
4304 * doc/xml/manual/intro.xml: Document LWG 415 change.
4305 * doc/html/manual/bugs.html: Regenerate.
4306 * include/bits/istream.tcc (ws): Create sentry and catch
4307 exceptions.
4308 * testsuite/27_io/basic_istream/ws/char/lwg415.cc: New test.
4309 * testsuite/27_io/basic_istream/ws/wchar_t/lwg415.cc: New test.
4310
43112021-06-25 Jonathan Wakely <jwakely@redhat.com>
4312
4313 * include/bits/ostream.tcc (basic_ostream::write): Call sputn
4314 directly instead of using _M_write. Do setstate(__err) all
4315 outside the try-catch block.
4316 * include/std/ostream (basic_ostream::_M_write): Declare
4317 private. Use __ostream_insert. Do not define for the versioned
4318 namespace.
4319
43202021-06-25 Jonathan Wakely <jwakely@redhat.com>
4321
4322 * doc/xml/manual/intro.xml: Document LWG 581 change.
4323 * doc/html/manual/bugs.html: Regenerate.
4324 * include/bits/basic_ios.tcc: Whitespace.
4325 * include/bits/ostream.tcc (basic_ostream::flush()): Construct
4326 sentry.
4327 * testsuite/27_io/basic_ostream/flush/char/2.cc: Check
4328 additional cases.
4329 * testsuite/27_io/basic_ostream/flush/char/exceptions_badbit_throw.cc:
4330 Likewise.
4331 * testsuite/27_io/basic_ostream/flush/wchar_t/2.cc: Likewise.
4332 * testsuite/27_io/basic_ostream/flush/wchar_t/exceptions_badbit_throw.cc:
4333 Likewise.
4334
43352021-06-25 Jonathan Wakely <jwakely@redhat.com>
4336
4337 * include/bits/ostream.tcc (sentry): Only set failbit if badbit
4338 is set, not if eofbit is set.
4339 (tellp, seekp, seekp): Create sentry object. Do not set badbit
4340 on exceptions.
4341 * testsuite/27_io/basic_ostream/seekp/char/exceptions_badbit_throw.cc:
4342 Adjust expected behaviour.
4343 * testsuite/27_io/basic_ostream/seekp/wchar_t/exceptions_badbit_throw.cc:
4344 Likewise.
4345 * testsuite/27_io/basic_ostream/tellp/char/exceptions_badbit_throw.cc:
4346 Likewise.
4347 * testsuite/27_io/basic_ostream/tellp/wchar_t/exceptions_badbit_throw.cc:
4348 Likewise.
4349 * testsuite/27_io/basic_ostream/seekp/char/n3168.cc: New test.
4350 * testsuite/27_io/basic_ostream/seekp/wchar_t/n3168.cc: New test.
4351 * testsuite/27_io/basic_ostream/tellp/char/n3168.cc: New test.
4352 * testsuite/27_io/basic_ostream/tellp/wchar_t/n3168.cc: New test.
4353
43542021-06-25 Jonathan Wakely <jwakely@redhat.com>
4355
4356 * include/std/syncstream (basic_syncbuf::swap()): Remove
4357 noexcept, as per LWG 3498.
4358
43592021-06-25 Jonathan Wakely <jwakely@redhat.com>
4360
4361 PR libstdc++/97088
4362 * testsuite/17_intro/names.cc: Undef more names for newlib and
4363 also for arm-none-linux-gnueabi.
4364 * testsuite/experimental/names.cc: Disable PCH.
4365
43662021-06-25 Matthias Kretz <m.kretz@gsi.de>
4367
4368 * include/experimental/bits/simd.h (__bit_cast): Implement via
4369 __builtin_bit_cast #if available.
4370 (__proposed::simd_bit_cast): Add overloads for simd and
4371 simd_mask, which use __builtin_bit_cast (or __bit_cast #if not
4372 available), which return an object of the requested type with
4373 the same bits as the argument.
4374 * include/experimental/bits/simd_math.h: Use simd_bit_cast
4375 instead of __bit_cast to allow casts to fixed_size_simd.
4376 (copysign): Remove branch that was only required if __bit_cast
4377 cannot be constexpr.
4378 * testsuite/experimental/simd/tests/bits/test_values.h: Switch
4379 from __bit_cast to __proposed::simd_bit_cast since the former
4380 will not cast fixed_size objects anymore.
4381
43822021-06-24 Matthias Kretz <m.kretz@gsi.de>
4383
4384 * include/experimental/bits/simd_math.h
4385 (_GLIBCXX_SIMD_MATH_CALL2_): Rename arg2_ to __arg2.
4386 (_GLIBCXX_SIMD_MATH_CALL3_): Rename arg2_ to __arg2 and arg3_ to
4387 __arg3.
4388
43892021-06-24 Matthias Kretz <m.kretz@gsi.de>
4390
4391 * include/experimental/bits/simd.h (__execute_on_index_sequence)
4392 (__execute_on_index_sequence_with_return)
4393 (__call_with_n_evaluations, __call_with_subscripts): Add flatten
4394 attribute.
4395
43962021-06-24 Matthias Kretz <m.kretz@gsi.de>
4397
4398 * include/experimental/bits/simd_x86.h (_S_trunc, _S_floor)
4399 (_S_ceil): Set bit 8 (_MM_FROUND_NO_EXC) on AVX and SSE4.1
4400 roundp[sd] calls.
4401
44022021-06-24 Matthias Kretz <m.kretz@gsi.de>
4403
4404 * include/experimental/bits/simd_x86.h (_S_ldexp): The AVX512F
4405 implementation doesn't require a _VecBltnBtmsk ABI tag, it
4406 requires either a 64-Byte input (in which case AVX512F must be
4407 available) or AVX512VL.
4408
44092021-06-24 Matthias Kretz <m.kretz@gsi.de>
4410
4411 * include/experimental/bits/simd_math.h: Undefine internal
4412 macros after use.
4413 (frexp): Move #if to a more sensible position and reformat
4414 preceding code.
4415 (logb): Call _SimdImpl::_S_logb for fixed_size instead of
4416 duplicating the code here.
4417 (modf): Simplify condition.
4418
44192021-06-24 Matthias Kretz <m.kretz@gsi.de>
4420
4421 * include/experimental/bits/simd_math.h (fabs): Remove
4422 fabs(simd<integral>) overload.
4423
44242021-06-24 Matthias Kretz <m.kretz@gsi.de>
4425
4426 * include/experimental/bits/simd_converter.h
4427 (_SimdConverter::operator()): Pass _SimdTuple by const-ref.
4428 * include/experimental/bits/simd_fixed_size.h
4429 (_GLIBCXX_SIMD_FIXED_OP): Pass binary operator _SimdTuple
4430 arguments by const-ref.
4431 (_S_masked_unary): Pass _SimdTuple by const-ref.
4432
44332021-06-24 Matthias Kretz <m.kretz@gsi.de>
4434
4435 * include/experimental/bits/simd_fixed_size.h
4436 (_AbisInSimdTuple): Removed.
4437
44382021-06-24 Matthias Kretz <m.kretz@gsi.de>
4439
4440 * include/experimental/bits/simd.h: Add missing operator~
4441 overload for simd<floating-point> to __float_bitwise_operators.
4442 * include/experimental/bits/simd_builtin.h
4443 (_SimdImplBuiltin::_S_complement): Bitcast to int (and back) to
4444 implement complement for floating-point vectors.
4445 * include/experimental/bits/simd_fixed_size.h
4446 (_SimdImplFixedSize::_S_copysign): New function, forwarding to
4447 copysign implementation of _SimdTuple members.
4448 * include/experimental/bits/simd_math.h (copysign): Call
4449 _SimdImpl::_S_copysign for fixed_size arguments. Simplify
4450 generic copysign implementation using the new ~ operator.
4451
44522021-06-24 Jonathan Wakely <jwakely@redhat.com>
4453
4454 * testsuite/experimental/simd/README.md: Fix typos.
4455
44562021-06-24 Jonathan Wakely <jwakely@redhat.com>
4457
4458 * include/bits/shared_ptr_base.h (__shared_ptr_access::operator[]):
4459 Add noexcept.
4460 * include/bits/unique_ptr.h (unique_ptr::operator*): Add
4461 conditional noexcept as per LWG 2762.
4462 * testsuite/20_util/shared_ptr/observers/array.cc: Check that
4463 dereferencing cannot throw.
4464 * testsuite/20_util/shared_ptr/observers/get.cc: Likewise.
4465 * testsuite/20_util/optional/observers/lwg2762.cc: New test.
4466 * testsuite/20_util/unique_ptr/lwg2762.cc: New test.
4467
44682021-06-23 Patrick Palka <ppalka@redhat.com>
4469
4470 PR c++/101174
4471 * testsuite/23_containers/multiset/cons/deduction.cc:
4472 Uncomment CTAD example that was rejected by this bug.
4473 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
4474
44752021-06-23 Jonathan Wakely <jwakely@redhat.com>
4476
4477 * include/std/chrono (chrono::year::is_leap()): Fix incorrect
4478 logic in comment.
4479
44802021-06-23 Matthias Kretz <m.kretz@gsi.de>
4481
4482 * testsuite/experimental/simd/README.md: New file.
4483
44842021-06-23 Matthias Kretz <m.kretz@gsi.de>
4485
4486 * testsuite/experimental/simd/driver.sh: Rewrite output
4487 verbosity logic. Add -p/--percentage option. Allow -v/--verbose
4488 to be used twice. Add -x and -o short options. Parse long
4489 options with = instead of separating space generically. Parce
4490 contracted short options. Make unrecognized options an error.
4491 If same-line output is active, trap on EXIT to increment the
4492 progress (only with --percentage), erase the line and print the
4493 current status.
4494 * testsuite/experimental/simd/generate_makefile.sh: Initialize
4495 helper files for progress account keeping. Update help target
4496 for changes to DRIVEROPTS.
4497
44982021-06-23 Matthias Kretz <m.kretz@gsi.de>
4499
4500 * testsuite/Makefile.am (check-simd): Remove -fno-tree-vrp flag
4501 and associated warning.
4502 * testsuite/Makefile.in: Regenerate.
4503
45042021-06-23 Cassio Neri <cassio.neri@gmail.com>
4505 Jonathan Wakely <jwakely@redhat.com>
4506 Ulrich Drepper <drepper@redhat.com>
4507
4508 * include/std/chrono (chrono::year::is_leap()): Optimize.
4509
45102021-06-23 Patrick Palka <ppalka@redhat.com>
4511
4512 PR c++/86439
4513 * testsuite/23_containers/map/cons/deduction.cc: Replace ambiguous
4514 CTAD examples.
4515 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
4516 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
4517 Mention one of the replaced examples is broken due to PR101174.
4518 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
4519 * testsuite/23_containers/unordered_map/cons/deduction.cc: Replace
4520 ambiguous CTAD examples.
4521 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
4522 Likewise.
4523 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
4524 Likewise.
4525 * testsuite/23_containers/unordered_set/cons/deduction.cc: Likewise.
4526
45272021-06-23 Jonathan Wakely <jwakely@redhat.com>
4528
4529 * include/std/mutex (__detail::__try_lock_impl): Rename
4530 parameter to avoid clashing with newlib's __lockable macro.
4531 (try_lock): Add 'inline' specifier.
4532 * testsuite/17_intro/names.cc: Add check for __lockable.
4533 * testsuite/30_threads/try_lock/5.cc: Add options for pthreads.
4534
45352021-06-22 Jonathan Wakely <jwakely@redhat.com>
4536 Matthias Kretz <m.kretz@gsi.de>
4537
4538 * include/std/mutex (lock): Replace recursion with iteration
4539 when lockables all have the same type.
4540 (__detail::__try_lock_impl): Likewise. Pass lockables as
4541 parameters, instead of a tuple. Always lock the first one, and
4542 recurse for the rest.
4543 (__detail::__lock_impl): Adjust call to __try_lock_impl.
4544 (__detail::__try_to_lock): Remove.
4545 * testsuite/30_threads/lock/3.cc: Check that mutexes are locked.
4546 * testsuite/30_threads/lock/4.cc: Also test non-heterogeneous
4547 arguments.
4548 * testsuite/30_threads/unique_lock/cons/60497.cc: Also check
4549 std::try_lock.
4550 * testsuite/30_threads/try_lock/5.cc: New test.
4551
45522021-06-22 Jonathan Wakely <jwakely@redhat.com>
4553
4554 * include/std/memory (declare_reachable, undeclare_reachable)
4555 (declare_no_pointers, undeclare_no_pointers, get_pointer_safety)
4556 (pointer_safety): Only define for C++11 to C++20 inclusive.
4557 * testsuite/20_util/pointer_safety/1.cc: Do not run for C++23.
4558
45592021-06-22 Jonathan Wakely <jwakely@redhat.com>
4560
4561 * include/bits/random.h (seed_seq): Constrain initializer-list
4562 constructor.
4563 * include/bits/random.tcc (seed_seq): Add template parameter.
4564 * testsuite/26_numerics/random/seed_seq/cons/default.cc: Check
4565 for noexcept.
4566 * testsuite/26_numerics/random/seed_seq/cons/initlist.cc: Check
4567 constraints.
4568
45692021-06-22 Thomas Rodgers <rodgert@appliantology.com>
4570
4571 PR libstdc++/100806
4572 * include/bits/semaphore_base.h (__atomic_semaphore::_M_release):
4573 Force _M_release() to wake all waiting threads.
4574 * testsuite/30_threads/semaphore/100806.cc: New test.
4575
45762021-06-21 Jonathan Wakely <jwakely@redhat.com>
4577
4578 * include/std/mutex (__try_to_lock): Move to __detail namespace.
4579 (struct __try_lock_impl): Replace with ...
4580 (__detail::__try_lock_impl<Idx>(tuple<Lockables...>&)): New
4581 function templates to implement std::try_lock.
4582 (try_lock): Use new __try_lock_impl.
4583 (__detail::__lock_impl(int, int&, L0&, L1&...)): New function
4584 template to implement std::lock.
4585 (lock): Use __lock_impl.
4586
45872021-06-21 Patrick Palka <ppalka@redhat.com>
4588
4589 * include/bits/ranges_cmp.h (__cpp_lib_ranges): Adjust value.
4590
45912021-06-20 Patrick Palka <ppalka@redhat.com>
4592
4593 * include/std/ranges (__non_propagating_cache::operator bool):
4594 Define for split_view::begin().
4595 (split_view): Define as per P2210.
4596 (views::__detail::__can_split_view): Define.
4597 (views::_Split, views::split): Define.
4598 * testsuite/std/ranges/adaptors/100577.cc (test01, test02):
4599 Test views::split.
4600 * testsuite/std/ranges/adaptors/split.cc: New test.
4601 * testsuite/std/ranges/p2325.cc (test08a): New test.
4602 * testsuite/std/ranges/p2367.cc (test01): Test views::split.
4603
46042021-06-20 Patrick Palka <ppalka@redhat.com>
4605
4606 * include/std/ranges: Rename views::split to views::lazy_split,
4607 split_view to lazy_split_view, etc. throughout.
4608 * testsuite/std/ranges/*: Likewise.
4609 * testsuite/std/ranges/adaptors/lazy_split.cc: New file.
4610 * testsuite/std/ranges/adaptors/lazy_split_neg.cc: New file.
4611
46122021-06-20 Patrick Palka <ppalka@redhat.com>
4613
4614 * include/std/ranges (split_view::_OuterIter::__at_end):
4615 Check _M_trailing_empty.
4616 (split_view::_OuterIter::_M_trailing_empty): Define this
4617 data member.
4618 (split_view::_OuterIter::operator++): Set _M_trailing_empty
4619 appropriately.
4620 (split_view::_OuterIter::operator==): Compare
4621 _M_trailing_empty.
4622 * testsuite/std/ranges/adaptors/100479.cc (test03): Expect two
4623 split parts instead of one.
4624 * testsuite/std/ranges/adaptors/split.cc (test11): New test.
4625
46262021-06-20 Patrick Palka <ppalka@redhat.com>
4627
4628 * include/std/ranges (split_view::_InnerIter::base): Define as
4629 per P2210.
4630
46312021-06-19 Patrick Palka <ppalka@redhat.com>
4632
4633 * include/std/ranges (transform_view::_Iterator::_S_iter_concept):
4634 Consider _Base instead of _Vp as per LWG 3555.
4635 (elements_view::_Iterator::_S_iter_concept): Likewise.
4636
46372021-06-19 Patrick Palka <ppalka@redhat.com>
4638
4639 * include/std/ranges (split_view::_OuterIter::value_type::begin):
4640 Remove the non-const overload, and remove the copyable constraint
4641 on the const overload as per LWG 3553.
4642
46432021-06-19 Patrick Palka <ppalka@redhat.com>
4644
4645 * include/bits/stl_iterator.h
4646 (__detail::__common_iter_use_postfix_proxy): Add
4647 move_constructible constraint as per LWG 3546.
4648 (common_iterator::__postfix_proxy): Adjust initializer of
4649 _M_keep as per LWG 3546.
4650
46512021-06-18 Patrick Palka <ppalka@redhat.com>
4652
4653 PR libstdc++/100387
4654 * include/bits/ranges_algo.h (__minmax_fn::operator()): Rewrite
4655 to limit comparison complexity to 3*N/2.
4656 (__minmax_element_fn::operator()): Likewise.
4657 (shift_right): Avoid premature std::move of __result.
4658 * testsuite/25_algorithms/minmax/constrained.cc (test04, test05):
4659 New tests.
4660 * testsuite/25_algorithms/minmax_element/constrained.cc (test02):
4661 Likewise.
4662
46632021-06-18 Patrick Palka <ppalka@redhat.com>
4664
4665 * include/std/concepts (convertible_to): Just use declval as per
4666 LWG 3557.
4667
46682021-06-18 Jonathan Wakely <jwakely@redhat.com>
4669
4670 PR libstdc++/95833
4671 * include/std/numeric (reduce(Iter, Iter, T, BinaryOp)): Replace
4672 incorrect static_assert with ones matching the 'Mandates'
4673 conditions in the standard.
4674 * testsuite/26_numerics/reduce/95833.cc: New test.
4675
46762021-06-18 Jonathan Wakely <jwakely@redhat.com>
4677
4678 * testsuite/21_strings/basic_string/cons/char/1.cc: Use
4679 diagnostic pragma to suppress -Wstringop-overread error.
4680
46812021-06-18 Patrick Palka <ppalka@redhat.com>
4682
4683 * include/bits/ranges_algo.h (__find_fn, find, __find_if_fn)
4684 (find_if, __find_if_not_fn, find_if_not, _in_in_result)
4685 (__mismatch_fn, mismatch, __search_fn, search): Move to ...
4686 * include/bits/ranges_util.h: ... here.
4687 * include/std/ranges (__detail::find, __detail::find_if)
4688 (__detail::find_if_not, __detail::mismatch): Remove.
4689 (filter_view): Use ranges::find_if instead.
4690 (drop_while_view): Use ranges::find_if_not instead.
4691 (split_view): Use ranges::find and ranges::mismatch instead.
4692
46932021-06-18 Patrick Palka <ppalka@redhat.com>
4694
4695 * include/bits/iterator_concepts.h (weakly_incrementable): Remove
4696 default_initializable requirement.
4697 * include/bits/ranges_base.h (ranges::view): Likewise.
4698 * include/bits/ranges_util.h (subrange): Constrain the default
4699 ctor.
4700 * include/bits/stl_iterator.h (back_insert_iterator): Remove the
4701 default ctor.
4702 (front_insert_iterator): Likewise.
4703 (insert_iterator): Likewise. Remove NSDMIs.
4704 (common_iterator): Constrain the default ctor.
4705 (counted_iterator): Likewise.
4706 * include/bits/stream_iterator.h (ostream_iterator): Remove the
4707 default ctor.
4708 * include/std/ranges (__detail::__box::operator=): Handle
4709 self-assignment in the primary template.
4710 (__detail::__box): In the partial specialization: adjust
4711 constraints as per P2325. Add specialized operator= for the
4712 case when the wrapped type is not copyable. Constrain the
4713 default ctor. Avoid list-initialization.
4714 (single_view): Constraint the default ctor.
4715 (iota_view): Relax semiregular constraint to copyable.
4716 Constrain the default ctor.
4717 (iota_view::_Iterator): Constraint the default ctor.
4718 (basic_istream_view): Remove the default ctor. Remove NSDMIs.
4719 Remove redundant checks for empty _M_stream.
4720 (basic_istream_view::_Iterator): Likewise.
4721 (ref_view): Remove the default ctor. Remove NSDMIs.
4722 (ref_view::_Iterator): Constrain the default ctor.
4723 (__detail::__non_propagating_cache::operator=): Define overload
4724 for assigning from a value of the underlying type.
4725 (filter_view): Likewise.
4726 (filter_view::_Iterator): Likewise.
4727 (transform_view): Likewise.
4728 (transform_view::_Iterator): Likewise.
4729 (take_view): Likewise.
4730 (take_view::_Iterator): Likewise.
4731 (take_while_view): Likewise.
4732 (take_while_view::_Iterator): Likewise.
4733 (drop_while_view): Likewise.
4734 (drop_while_view::_Iterator): Likewise.
4735 (join_view): Likewise.
4736 (split_view::_OuterIter::__current): Adjust after changing the
4737 type of _M_current.
4738 (split_view::_M_current): Wrap it in a __non_propagating_cache.
4739 (split_view::split_view): Constrain the default ctor.
4740 (common_view): Constrain the default ctor.
4741 (reverse_view): Likewise.
4742 (elements_view): Likewise.
4743 * include/std/span (enable_view<span<_ElementType, _Extent>>):
4744 Define this partial specialization to true unconditionally.
4745 * include/std/version (__cpp_lib_ranges): Adjust value.
4746 * testsuite/24_iterators/back_insert_iterator/constexpr.cc:
4747 Don't attempt to default construct a back_insert_iterator.
4748 * testsuite/24_iterators/front_insert_iterator/constexpr.cc:
4749 Don't attempt to default construct a front_insert_iterator.
4750 * testsuite/24_iterators/insert_iterator/constexpr.cc:
4751 Don't attempt to default construct an insert_iterator.
4752 * testsuite/24_iterators/ostream_iterator/requirements/constexpr.cc:
4753 Remove this test for default constructibility of ostream_iterator.
4754 * testsuite/std/ranges/97600.cc: Don't attempt to default
4755 construct a basic_istream_view.
4756 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc:
4757 Rename to ...
4758 * testsuite/std/ranges/adaptors/detail/copyable_box.cc: ... this.
4759 (test02): Adjust now that __box is copyable-box not
4760 semiregular-box.
4761 (test03): New test.
4762 * testsuite/std/ranges/p2325.cc: New test.
4763 * testsuite/std/ranges/single_view.cc (test06): New test.
4764 * testsuite/std/ranges/view.cc: Adjust now that view doesn't
4765 require default_initializable.
4766
47672021-06-17 Jonathan Wakely <jwakely@redhat.com>
4768
4769 PR libstdc++/91488
4770 * include/bits/basic_string.h (__cpp_lib_constexpr_string): Only
4771 define when is_constant_evaluated is available.
4772 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
4773 Likewise.
4774 (__constant_string_p, __constant_array_p): Remove.
4775 (char_traits): Use is_constant_evaluated directly.
4776 * include/std/version (__cpp_lib_constexpr_char_traits)
4777 (__cpp_lib_constexpr_string): Only define when
4778 is_constant_evaluated is available.
4779
47802021-06-17 Patrick Palka <ppalka@redhat.com>
4781
4782 PR libstdc++/100940
4783 * include/std/ranges (__adaptor::_Partial): For the "simple"
4784 forwarding partial specializations, also require that
4785 the extra arguments are trivially copyable.
4786 * testsuite/std/ranges/adaptors/100577.cc (test04): New test.
4787
47882021-06-17 Patrick Palka <ppalka@redhat.com>
4789
4790 PR libstdc++/100940
4791 * include/std/ranges (__adaptor::_RangeAdaptor): Document the
4792 template form of _S_has_simple_extra_args.
4793 (__adaptor::__adaptor_has_simple_extra_args): Add _Args template
4794 parameter pack. Try to treat _S_has_simple_extra_args as a
4795 variable template parameterized by _Args.
4796 (__adaptor::_Partial): Pass _Arg/_Args to the constraint
4797 __adaptor_has_simple_extra_args.
4798 (views::_Take::_S_has_simple_extra_args): Templatize according
4799 to the type of the extra argument.
4800 (views::_Drop::_S_has_simple_extra_args): Likewise.
4801 (views::_Split::_S_has_simple_extra_args): Define.
4802 * testsuite/std/ranges/adaptors/100577.cc (test01, test02):
4803 Adjust after changes to _S_has_simple_extra_args mechanism.
4804 (test03): Define.
4805
48062021-06-16 Jonathan Wakely <jwakely@redhat.com>
4807
4808 * include/bits/iterator_concepts.h (__decay_copy): Name type.
4809
48102021-06-16 Jonathan Wakely <jwakely@redhat.com>
4811
4812 * include/bits/ranges_base.h (ranges::begin, ranges::end)
4813 (ranges::cbegin, ranges::cend, ranges::rbeing, ranges::rend)
4814 (ranges::crbegin, ranges::crend, ranges::size, ranges::ssize)
4815 (ranges::empty, ranges::data, ranges::cdata): Remove final
4816 keywords and deleted operator& overloads.
4817 * testsuite/24_iterators/customization_points/iter_move.cc: Use
4818 new is_customization_point_object function.
4819 * testsuite/24_iterators/customization_points/iter_swap.cc:
4820 Likewise.
4821 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
4822 Likewise.
4823 * testsuite/std/ranges/access/begin.cc: Likewise.
4824 * testsuite/std/ranges/access/cbegin.cc: Likewise.
4825 * testsuite/std/ranges/access/cdata.cc: Likewise.
4826 * testsuite/std/ranges/access/cend.cc: Likewise.
4827 * testsuite/std/ranges/access/crbegin.cc: Likewise.
4828 * testsuite/std/ranges/access/crend.cc: Likewise.
4829 * testsuite/std/ranges/access/data.cc: Likewise.
4830 * testsuite/std/ranges/access/empty.cc: Likewise.
4831 * testsuite/std/ranges/access/end.cc: Likewise.
4832 * testsuite/std/ranges/access/rbegin.cc: Likewise.
4833 * testsuite/std/ranges/access/rend.cc: Likewise.
4834 * testsuite/std/ranges/access/size.cc: Likewise.
4835 * testsuite/std/ranges/access/ssize.cc: Likewise.
4836 * testsuite/util/testsuite_iterators.h
4837 (is_customization_point_object): New function.
4838
48392021-06-15 Jonathan Wakely <jwakely@redhat.com>
4840
4841 * include/bits/ranges_base.h (ranges::begin, ranges::end)
4842 (ranges::cbegin, ranges::cend, ranges::rbeing, ranges::rend)
4843 (ranges::crbegin, ranges::crend, ranges::size, ranges::ssize)
4844 (ranges::empty, ranges::data, ranges::cdata): Make types final.
4845 Add deleted operator& overloads.
4846 (ranges::advance, ranges::distance, ranges::next, ranges::prev):
4847 Likewise.
4848 * testsuite/std/ranges/headers/ranges/synopsis.cc: Replace
4849 ill-formed & expressions with using-declarations. Add checks for
4850 other function objects.
4851
48522021-06-15 Jonathan Wakely <jwakely@redhat.com>
4853
4854 * include/bits/ranges_util.h (view_interface): Add noexcept to
4855 empty, operator bool, data and size members.
4856 (subrange): Add noexcept to constructors.
4857 * include/std/ranges (single_view, ref_view): Add noexcept to
4858 constructors.
4859 (views::single, views::all): Add noexcept.
4860 * testsuite/std/ranges/adaptors/all.cc: Check noexcept.
4861 * testsuite/std/ranges/single_view.cc: Likewise.
4862
48632021-06-15 Jonathan Wakely <jwakely@redhat.com>
4864
4865 * include/bits/ranges_util.h (subrange): Add __size_type typedef
4866 and use it to simplify declarations.
4867 (subrange(i, s, n)): Remove assertion.
4868 * testsuite/std/ranges/subrange/constexpr.cc: New test.
4869
48702021-06-15 Jonathan Wakely <jwakely@redhat.com>
4871
4872 * include/bits/iterator_concepts.h (__cust_access::__decay_copy):
4873 Replace with function object.
4874 (__cust_access::__member_begin, ___cust_access::_adl_begin): Use
4875 __decay_copy unqualified.
4876 * include/bits/ranges_base.h (__member_end, __adl_end):
4877 Likewise. Use __range_iter_t for type of ranges::begin.
4878 (__member_rend): Use correct value category for rbegin argument.
4879 (__member_data): Use __decay_copy unqualified.
4880 (__begin_data): Use __range_iter_t for type of ranges::begin.
4881
48822021-06-14 Jonathan Wakely <jwakely@redhat.com>
4883
4884 * include/bits/ranges_base.h (ranges::empty): Check whether
4885 conversion to bool can throw.
4886 * testsuite/std/ranges/access/empty.cc: Check for correct
4887 noexcept-specifier.
4888
48892021-06-14 Jonathan Wakely <jwakely@redhat.com>
4890
4891 PR libstdc++/100894
4892 * include/std/type_traits (__common_ref_impl<X&, Y&>): Only
4893 use the type if it's a reference.
4894 * testsuite/20_util/common_reference/100894.cc: New test.
4895
48962021-06-14 Jonathan Wakely <jwakely@redhat.com>
4897
4898 * testsuite/experimental/filesystem/path/native/conv_c++23.cc:
4899 Add dg-require-filesystem-ts directive.
4900
49012021-06-14 Jonathan Wakely <jwakely@redhat.com>
4902
4903 PR libstdc++/101034
4904 * include/std/any (any(in_place_t<T>, initializer_list<U>, A&&...))
4905 (any::emplace<T>(initializer_list<U>, A&&...)): Fix constraint
4906 to use lvalue.
4907 * testsuite/20_util/any/cons/101034.cc: New test.
4908
49092021-06-14 Jonathan Wakely <jwakely@redhat.com>
4910
4911 * testsuite/17_intro/headers/c++2017/all_attributes.cc: Add
4912 -std=gnu++17 option.
4913
49142021-06-14 Jonathan Wakely <jwakely@redhat.com>
4915
4916 PR libstdc++/101056
4917 * libsupc++/compare (compare_partial_order_fallback): Add
4918 constraint using reversed parameter order, as per LWG 3465.
4919 * testsuite/18_support/comparisons/algorithms/fallback.cc:
4920 Adjust expected result.
4921
49222021-06-14 Jonathan Wakely <jwakely@redhat.com>
4923
4924 * libsupc++/compare (__decayed_same_as): New helper concept.
4925 (strong_order, weak_order, partial_order): Constrain with new
4926 concept instead of using static_assert.
4927 (compare_strong_order_fallback, compare_weak_order_fallback)
4928 (compare_partial_order_fallback): Likewise. Do not deduce return
4929 types. Remove redundant if-constexpr checks.
4930 * testsuite/18_support/comparisons/algorithms/fallback.cc: New test.
4931
49322021-06-14 Jonathan Wakely <jwakely@redhat.com>
4933
4934 PR libstdc++/101055
4935 * include/std/tuple: Use reserved form of attribute name.
4936 * testsuite/17_intro/headers/c++2011/all_attributes.cc: Add
4937 check for no_unique_address.
4938 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
4939 Likewise.
4940 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
4941 Likewise.
4942
49432021-06-11 Jonathan Wakely <jwakely@redhat.com>
4944
4945 * include/bits/fs_path.h (operator==, operator<=>): Use new
4946 _S_compare function.
4947 (path::_S_compare): New function to call path::compare in a
4948 context where path::iterator is complete.
4949 * include/experimental/bits/fs_path.h (operator<, operator==):
4950 Define after path::iterator is complete.
4951 * testsuite/27_io/filesystem/path/native/conv_c++23.cc: New
4952 test.
4953 * testsuite/experimental/filesystem/path/native/conv_c++23.cc:
4954 New test.
4955
49562021-06-09 Thomas Rodgers <rodgert@appliantology.com>
4957
4958 * testsuite/29_atomics/atomic_ref/wait_notify.cc: Guard
4959 test logic with constexpr check for is_always_lock_free.
4960
49612021-06-09 Jonathan Wakely <jwakely@redhat.com>
4962
4963 PR libstdc++/100982
4964 * include/std/optional (optional::operator=(const optional<U>&)):
4965 Fix value category used in is_assignable check.
4966 * testsuite/20_util/optional/assignment/100982.cc: New test.
4967
49682021-06-09 Jonathan Wakely <jwakely@redhat.com>
4969
4970 * include/bits/allocator.h (allocator::is_always_equal): Deprecate.
4971 * include/bits/iterator_concepts.h (indirectly_readable_traits):
4972 Add LWG issue number to comment.
4973 * include/std/memory_resource (polymorphic_allocator::release):
4974 Deprecate.
4975 * testsuite/20_util/allocator/requirements/typedefs.cc: Add
4976 dg-warning for deprecation. Also check std::allocator<void>.
4977
49782021-06-08 Thomas Rodgers <rodgert@appliantology.com>
4979
4980 PR libstdc++/100889
4981 * include/bits/atomic_base.h (atomic_ref<_Tp*>::wait):
4982 Change parameter type from _Tp to _Tp*.
4983 * testsuite/29_atomics/atomic_ref/wait_notify.cc: Extend
4984 coverage of types tested.
4985
49862021-06-08 Thomas Rodgers <rodgert@appliantology.com>
4987
4988 * include/std/barrier (__tree_barrier::_M_arrive): Remove
4989 unnecessary hasher instantiation.
4990
49912021-06-08 Jonathan Wakely <jwakely@redhat.com>
4992
4993 * include/experimental/propagate_const (swap): Constrain.
4994 * testsuite/experimental/propagate_const/swap/lwg3413.cc: New test.
4995
49962021-06-07 Avi Kivity <avi@scylladb.com>
4997
4998 PR libstdc++/100900
4999 * include/std/ranges (elements_view::__iter_cat::_S_iter_cat):
5000 Add missing typename.
5001
50022021-06-07 Jonathan Wakely <jwakely@redhat.com>
5003
5004 PR libstdc++/98842
5005 * include/std/optional (operator<=>(const optional<T>& const U&)):
5006 Add missing constraint and add workaround for template
5007 recursion.
5008 * testsuite/20_util/optional/relops/three_way.cc: Check that
5009 type without equality comparison cannot be compared when wrapped
5010 in std::optional.
5011
50122021-06-05 Jonathan Wakely <jwakely@redhat.com>
5013
5014 PR libstdc++/100824
5015 * include/bits/ranges_base.h (_SSize): Return signed type.
5016 * testsuite/std/ranges/access/ssize.cc: Check with __int128.
5017
50182021-06-04 Jonathan Wakely <jwakely@redhat.com>
5019
5020 * include/bits/ranges_base.h (_SSize): Return the result of
5021 ranges::size converted to the wider of make-signed-like-t<S> and
5022 ptrdiff_t, rather than the ranges different type.
5023 * testsuite/std/ranges/access/ssize.cc: Adjust expected result
5024 for an iota_view that uses an integer class type for its
5025 difference_type.
5026
50272021-06-04 Jonathan Wakely <jwakely@redhat.com>
5028
5029 PR libstdc++/100824
5030 * include/bits/ranges_base.h (__member_data): Use __decay_copy.
5031 * testsuite/std/ranges/access/data.cc: Add testcase from PR.
5032
50332021-06-04 Jonathan Wakely <jwakely@redhat.com>
5034
5035 PR libstdc++/100824
5036 * include/bits/iterator_concepts.h (__detail::__decay_copy)
5037 (__detail::__member_begin, __detail::__adl_begin): Move to
5038 namespace ranges::__cust_access.
5039 (__detail::__ranges_begin): Likewise, and rename to __begin.
5040 Remove redundant static assertion.
5041 * include/bits/ranges_base.h (_Begin, _End, _RBegin, _REnd):
5042 Use lvalue in noexcept specifier.
5043 (__as_const): Add non-deduced parameter for value category.
5044 (_CBegin, _CEnd, _CRBegin, _CREnd, _CData): Adjust uses of
5045 __as_const.
5046 (__member_size, __adl_size, __member_empty, __size0_empty):
5047 (__eq_iter_empty, __adl_data): Use lvalue objects in
5048 requirements.
5049 (__sentinel_size): Likewise. Add check for conversion to
5050 unsigned-like.
5051 (__member_data): Allow non-lvalue types to satisfy the concept,
5052 but use lvalue object in requirements.
5053 (_Size, _SSize): Remove forwarding to always use an lvalue.
5054 (_Data): Likewise. Add static assertion for arrays.
5055 * testsuite/std/ranges/access/cdata.cc: Adjust expected
5056 behaviour for rvalues. Add negative tests for ill-formed
5057 expressions.
5058 * testsuite/std/ranges/access/data.cc: Likewise.
5059 * testsuite/std/ranges/access/empty.cc: Adjust expected
5060 behaviour for rvalues.
5061 * testsuite/std/ranges/access/size.cc: Likewise.
5062
50632021-06-04 Tim Adye <Tim.Adye@cern.ch>
5064
5065 * include/std/any (any::_Manager::_S_access): New static
5066 function to access the contained value.
5067 (any::emplace, __any_caster): Use _S_access member of the
5068 manager type.
5069
50702021-06-04 Jonathan Wakely <jwakely@redhat.com>
5071
5072 * doc/xml/manual/status_cxx2020.xml:
5073 * doc/html/*: Regenerate.
5074 * include/bits/hashtable.h (__cpp_lib_generic_unordered_lookup):
5075 Define.
5076 * include/std/version (__cpp_lib_generic_unordered_lookup):
5077 Define.
5078 * testsuite/23_containers/unordered_map/operations/1.cc: Check
5079 feature test macro.
5080 * testsuite/23_containers/unordered_set/operations/1.cc:
5081 Likewise.
5082
50832021-06-03 Patrick Palka <ppalka@redhat.com>
5084
5085 * include/bits/ranges_algo.h (__detail::__can_reread_output):
5086 Factor out this concept from ...
5087 (__unique_copy_fn::operator()): ... here. Use the concept
5088 throughout.
5089 * testsuite/std/ranges/range.cc: Remove now ill-formed use
5090 of range_value_t on an output_range.
5091 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper):
5092 Define value_type, pointer and reference member types to void.
5093
50942021-06-03 Patrick Palka <ppalka@redhat.com>
5095
5096 PR libstdc++/100577
5097 * include/std/ranges (_RangeAdaptorClosure): Document
5098 _S_has_simple_call_op mechanism.
5099 (_RangeAdaptor): Document _S_has_simple_extra_args mechanism.
5100 (__closure_has_simple_call_op): New concept.
5101 (__adaptor_has_simple_extra_args): Likewise.
5102 (_Partial<_Adaptor, _Args...>): New partial specialization.
5103 (_Partial<_Adaptor, _Arg>): Likewise.
5104 (_Pipe<_Lhs, _Rhs>): Likewise.
5105 (views::_All::_S_has_simple_call_op): Define to true.
5106 (views::_Filter::_S_has_simple_extra_args): Likewise.
5107 (views::_Transform::_S_has_simple_extra_args): Likewise.
5108 (views::_Take::_S_has_simple_extra_args): Likewise.
5109 (views::_TakeWhile::_S_has_simple_extra_args): Likewise.
5110 (views::_Drop::_S_has_simple_extra_args): Likewise.
5111 (views::_DropWhile::_S_has_simple_extra_args): Likewise.
5112 (views::_Join::_S_has_simple_call_op): Likewise.
5113 (views::_Split): Document why we don't define
5114 _S_has_simple_extra_args to true for this adaptor.
5115 (views::_Common::_S_has_simple_call_op): Define to true.
5116 (views::_Reverse::_S_has_simple_call_op): Likewise.
5117 (views::_Elements::_S_has_simple_call_op): Likewise.
5118 * testsuite/std/ranges/adaptors/100577.cc: New test.
5119
51202021-06-02 Jonathan Wakely <jwakely@redhat.com>
5121
5122 PR libstdc++/100863
5123 PR libstdc++/65816
5124 * include/bits/hashtable_policy.h (_Hashtable_ebo_helper):
5125 Value-initialize subobject.
5126 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
5127 Remove XFAIL.
5128 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
5129 Remove XFAIL.
5130
51312021-06-02 Jonathan Wakely <jwakely@redhat.com>
5132
5133 PR libstdc++/96088
5134 * testsuite/23_containers/unordered_map/96088.cc: Adjust
5135 expected number of allocations.
5136 * testsuite/23_containers/unordered_set/96088.cc: Likewise.
5137
51382021-06-02 Jonathan Wakely <jwakely@redhat.com>
5139
5140 * doc/xml/manual/status_cxxis29124.xml: Improve punctuation.
5141 * doc/xml/manual/status_cxxtr1.xml: Likewise.
5142 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
5143 * doc/html/*: Regenerate.
5144
51452021-06-01 Patrick Palka <ppalka@redhat.com>
5146
5147 PR c++/65816
5148 * testsuite/23_containers/deque/allocator/default_init.cc,
5149 testsuite/23_containers/forward_list/allocator/default_init.cc,
5150 testsuite/23_containers/list/allocator/default_init.cc,
5151 testsuite/23_containers/map/allocator/default_init.cc,
5152 testsuite/23_containers/set/allocator/default_init.cc,
5153 testsuite/23_containers/vector/allocator/default_init.cc,
5154 testsuite/23_containers/vector/bool/allocator/default_init.cc:
5155 Remove xfail.
5156
51572021-06-01 Jonathan Wakely <jwakely@redhat.com>
5158
5159 * testsuite/23_containers/unordered_map/96088.cc: Change
5160 effective target to c++17.
5161 * testsuite/23_containers/unordered_set/96088.cc: Likewise.
5162
51632021-06-01 Jonathan Wakely <jwakely@redhat.com>
5164
5165 * testsuite/22_locale/ctype/is/string/89728_neg.cc: Only test
5166 isblank for C++11 and later.
5167
51682021-06-01 Jonathan Wakely <jwakely@redhat.com>
5169
5170 PR libstdc++/100833
5171 * include/bits/ranges_base.h (ranges::advance(iter, n, sentinel)):
5172 Fix return value for no-op case.
5173 * testsuite/24_iterators/range_operations/advance.cc: Test
5174 return values of three-argument overload.
5175
51762021-06-01 Jonathan Wakely <jwakely@redhat.com>
5177
5178 PR libstdc++/99453
5179 * python/Makefile.am: Use archive name for printer hook if no
5180 dynamic library name is available.
5181 * python/Makefile.in: Regenerate.
5182
51832021-05-30 Gerald Pfeifer <gerald@pfeifer.com>
5184
5185 * doc/xml/manual/abi.xml: Remove dead reference to "Intel
5186 Compilers for Linux: Compatibility with GNU Compilers" article.
5187 * doc/html/manual/abi.html: Regenerate.
5188
51892021-05-26 François Dumont <fdumont@gcc.gnu.org>
5190
5191 * include/debug/formatter.h
5192 (_Error_formatter::_Parameter::_Named): New.
5193 (_Error_formatter::_Parameter::_Type): Inherit latter.
5194 (_Error_formatter::_Parameter::_M_integer): Likewise.
5195 (_Error_formatter::_Parameter::_M_string): Likewise.
5196 * src/c++11/debug.cc: Include <cstring>.
5197 (_Print_func_t): New.
5198 (print_raw(PrintContext&, const char*, ptrdiff_t)): New.
5199 (print_word): Use '%.*s' format in fprintf to render only expected number of chars.
5200 (pretty_print(PrintContext&, const char*, _Print_func_t)): New.
5201 (print_type): Rename in...
5202 (print_type_info): ...this. Use pretty_print.
5203 (print_address, print_integer): New.
5204 (print_named_name, print_iterator_constness, print_iterator_state): New.
5205 (print_iterator_seq_type): New.
5206 (print_named_field, print_type_field, print_instance_field, print_iterator_field): New.
5207 (print_field): Use latters.
5208 (print_quoted_named_name, print_type_type, print_type, print_instance): New.
5209 (print_string(PrintContext&, const char*, const _Parameter*, size_t)):
5210 Change signature to...
5211 (print_string(PrintContext&, const char*, ptrdiff_t, const _Parameter*, size_t)):
5212 ...this and adapt. Remove intermediate buffer to render input string.
5213 (print_string(PrintContext&, const char*, ptrdiff_t)): New.
5214
52152021-05-26 Jonathan Wakely <jwakely@redhat.com>
5216
5217 PR libstdc++/100768
5218 * include/bits/ranges_base.h (advance, distance, next, prev):
5219 Replace function templates with function objects.
5220 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc:
5221 Adjust for changes to function objects.
5222 * testsuite/std/ranges/adaptors/elements.cc: Add using
5223 declarations for names from namespace ranges.
5224 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
5225 * testsuite/24_iterators/range_operations/100768.cc: New test.
5226
52272021-05-24 François Dumont <fdumont@gcc.gnu.org>
5228
5229 PR libstdc++/96088
5230 * include/bits/hashtable_policy.h (_Select2nd): New.
5231 (_NodeBuilder<>): New.
5232 (_ReuseOrAllocNode<>::operator()): Use variadic template args.
5233 (_AllocNode<>::operator()): Likewise.
5234 * include/bits/hashtable.h
5235 (_Hashtable<>::__node_builder_t): New.
5236 (_Hashtable<>::_M_insert_unique<>(_Kt&&, _Arg&&, const _NodeGenerator&)):
5237 New.
5238 (_Hashtable<>::_S_forward_key): New.
5239 (_Hashtable<>::_M_insert): Use latter.
5240 (_Hashtable<>::_M_insert(const_iterator, _Arg&&, const _NodeGenerator&, false_type)):
5241 Instantiate node first, compute hash code second.
5242 * testsuite/23_containers/unordered_map/96088.cc: New test.
5243 * testsuite/23_containers/unordered_multimap/96088.cc: New test.
5244 * testsuite/23_containers/unordered_multiset/96088.cc: New test.
5245 * testsuite/23_containers/unordered_set/96088.cc: New test.
5246 * testsuite/util/replacement_memory_operators.h
5247 (counter::_M_increment): New.
5248 (counter::_M_decrement): New.
5249 (counter::reset()): New.
5250
52512021-05-24 Patrick Palka <ppalka@redhat.com>
5252
5253 PR libstdc++/100479
5254 * include/std/ranges (__detail::__non_propagating_cache): Move
5255 definition up to before that of _CachedPosition. Make base
5256 class _Optional_base protected instead of private. Add const
5257 overload for operator*.
5258 (__detail::_CachedPosition): Rewrite the partial specialization
5259 for forward ranges as a derived class of __non_propagating_cache.
5260 Remove the size constraint on the partial specialization for
5261 random access ranges. Add copy/move/copy-assignment/move-assignment
5262 members to the offset partial specialization for random
5263 access ranges that propagate the cached value but additionally
5264 invalidate it in the source object on move.
5265 * testsuite/std/ranges/adaptors/100479.cc: New test.
5266
52672021-05-24 Jonathan Wakely <jwakely@redhat.com>
5268
5269 * testsuite/25_algorithms/inplace_merge/constrained.cc: Qualify
5270 call to ranges::next.
5271 * testsuite/25_algorithms/is_sorted/constrained.cc: Likewise.
5272 * testsuite/25_algorithms/is_sorted_until/constrained.cc:
5273 Likewise.
5274 * testsuite/25_algorithms/swap_ranges/1.cc: Qualify call to
5275 swap_ranges.
5276
52772021-05-21 Patrick Palka <ppalka@redhat.com>
5278
5279 PR libstdc++/100606
5280 * include/std/ranges (drop_while_view::begin): Assert the
5281 precondition added by LWG 3490.
5282
52832021-05-21 Patrick Palka <ppalka@redhat.com>
5284
5285 PR libstdc++/100690
5286 * include/std/ranges (iota_view::_Sentinel::_M_distance_from):
5287 Split out this member function from ...
5288 (iota_view::_Sentinel::operator-): ... here, for sake of access
5289 control.
5290 * testsuite/std/ranges/iota/iota_view.cc (test05): New test.
5291
52922021-05-20 Jonathan Wakely <jwakely@redhat.com>
5293
5294 * include/bits/random.tcc (__representable_as_double)
5295 (__p1_representable_as_double): Add "" to static asserts.
5296
52972021-05-20 Jonathan Wakely <jwakely@redhat.com>
5298
5299 PR libstdc++/100676
5300 * include/bits/c++config (__glibcxx_assert_1): Rename to ...
5301 (__glibcxx_constexpr_assert): ... this.
5302 (__glibcxx_assert_impl): Use __glibcxx_constexpr_assert.
5303 (__glibcxx_assert): Define as either __glibcxx_constexpr_assert
5304 or __glibcxx_assert_impl.
5305 (__glibcxx_assert_2): Remove
5306 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_AT_F): Use
5307 __glibcxx_constexpr_assert instead of __glibcxx_assert_1.
5308 * testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
5309 Adjust expected error.
5310 * testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc:
5311 Likewise.
5312 * testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
5313 Likewise.
5314 Likewise.
5315 * testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
5316 Likewise.
5317 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc:
5318 Likewise.
5319 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
5320 Likewise.
5321 * testsuite/23_containers/span/back_neg.cc: Likewise.
5322 * testsuite/23_containers/span/front_neg.cc: Likewise.
5323 * testsuite/23_containers/span/index_op_neg.cc: Likewise.
5324
53252021-05-20 Patrick Palka <ppalka@redhat.com>
5326
5327 PR libstdc++/100639
5328 * include/bits/stl_iterator.h (reverse_iterator::difference_type):
5329 In C++20 mode, define in terms of iter_difference_t as per P0896R4.
5330 (reverse_iterator::reference): Likewise, but with iter_reference_t.
5331 (reverse_iterator::value_type): Likewise, but with iter_value_t.
5332 * testsuite/std/ranges/adaptors/reverse.cc (test08): New test.
5333 * testsuite/24_iterators/reverse_iterator/100639.cc: New test.
5334
53352021-05-20 Joern Rennecke <joern.rennecke@riscy-ip.com>
5336
5337 PR libstdc++/100361
5338 * include/std/charconv (to_chars): Hide the overloads for
5339 floating-point types for 16 bit targets.
5340 * src/c++17/floating_to_chars.cc: Don't compile for 16 bit targets.
5341 * testsuite/20_util/to_chars/double.cc: Run this test only on
5342 size32plus targets.
5343 * testsuite/20_util/to_chars/float.cc: Likewise.
5344 * testsuite/20_util/to_chars/long_double.cc: Likewise.
5345
53462021-05-18 Patrick Palka <ppalka@redhat.com>
5347
5348 PR libstdc++/100631
5349 * include/std/ranges (elements_view::_Sentinel::operator-): Use
5350 _M_distance_from in the other operator- overload too.
5351 * testsuite/std/ranges/adaptors/elements.cc (test06): Augment test.
5352
53532021-05-18 Thomas Schwinge <thomas@codesourcery.com>
5354
5355 * testsuite/lib/prune.exp: Add note about 'dg-note'.
5356
53572021-05-18 Patrick Palka <ppalka@redhat.com>
5358
5359 PR libstdc++/100475
5360 * include/std/ranges (__box::__box): Use non-list-initialization
5361 in member initializer list of in-place constructor of the
5362 partial specialization for semiregular types.
5363 (__box::operator->): Use std::__addressof.
5364 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc
5365 (test02): New test.
5366 * testsuite/std/ranges/single_view.cc (test04): New test.
5367
53682021-05-18 Patrick Palka <ppalka@redhat.com>
5369
5370 PR libstdc++/100621
5371 * include/std/ranges (reverse_view::_S_needs_cached_begin):
5372 Set to true if the underlying non-common random-access range
5373 doesn't have a sized sentinel.
5374
53752021-05-18 Patrick Palka <ppalka@redhat.com>
5376
5377 PR libstdc++/100631
5378 * include/std/ranges (elements_view::_Iterator): Also befriend
5379 _Sentinel<!_Const>.
5380 (elements_view::_Sentinel::_M_equal): Templatize.
5381 (elements_view::_Sentinel::_M_distance_from): Split out from ...
5382 (elements_view::_Sentinel::operator-): ... here. Depend on
5383 _Base2 instead of _Base in the return type.
5384 * testsuite/std/ranges/adaptors/elements.cc (test06, test07):
5385 New tests.
5386
53872021-05-17 Thomas Rodgers <rodgert@twrodgers.com>
5388
5389 * include/bits/atomic_wait.h (__waiter::_M_do_wait_v): loop
5390 until value change observed.
5391 (__waiter_base::_M_laundered): New member.
5392 (__waiter_base::_M_notify): Check _M_laundered to determine
5393 whether to wake one or all.
5394 (__detail::__atomic_compare): Return true if call to
5395 __builtin_memcmp() == 0.
5396 (__waiter_base::_S_do_spin_v): Adjust predicate.
5397 * testsuite/29_atomics/atomic/wait_notify/100334.cc: New
5398 test.
5399
54002021-05-17 Jonathan Wakely <jwakely@redhat.com>
5401
5402 PR libstdc++/100630
5403 * include/experimental/bits/fs_path.h (__is_constructible_from):
5404 Test construction from a const lvalue, not an rvalue.
5405 * testsuite/27_io/filesystem/path/construct/100630.cc: New test.
5406 * testsuite/experimental/filesystem/path/construct/100630.cc:
5407 New test.
5408
54092021-05-17 Antony Polukhin <antoshkka@gmail.com>
5410
5411 PR libstdc++/89728
5412 * include/bits/locale_facets.h (ctype<basic_string<C,T,A>>):
5413 Declare (but do not define) partial specialization.
5414 * testsuite/22_locale/ctype/is/string/89728_neg.cc: New test.
5415
54162021-05-17 Jonathan Wakely <jwakely@redhat.com>
5417
5418 * include/std/thread (jthread::_S_create): Fix static assert
5419 message.
5420 * testsuite/30_threads/jthread/95989.cc: Re-enable test.
5421 * testsuite/30_threads/jthread/jthread.cc: Do not require
5422 pthread effective target.
5423 * testsuite/30_threads/jthread/2.cc: Moved to...
5424 * testsuite/30_threads/jthread/version.cc: ...here.
5425
54262021-05-17 Jonathan Wakely <jwakely@redhat.com>
5427
5428 * doc/Makefile.am: Simplify doxygen recipes and use --latex_cmd.
5429 * doc/Makefile.in: Regenerate.
5430 * doc/doxygen/user.cfg.in (LATEX_CMD_NAME): Add placeholder
5431 value.
5432 * scripts/run_doxygen (print_usage): Always print to stdout and
5433 do not exit.
5434 (fail): New function for exiting on error.
5435 (parse_options): Handle --latex_cmd. Do not treat --help the
5436 same as errors. Simplify handling of required arguments.
5437
54382021-05-12 Jonathan Wakely <jwakely@redhat.com>
5439
5440 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc:
5441 Increase dg-timeout-factor to 4. Fix -Wunused-parameter
5442 warnings. Replace bitwise AND with logical AND in loop
5443 condition.
5444 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc:
5445 Replace bitwise AND with logical AND in loop condition.
5446 * testsuite/util/pstl/test_utils.h: Remove unused parameter
5447 names.
5448
54492021-05-11 Patrick Palka <ppalka@redhat.com>
5450
5451 * src/c++17/ryu/LOCAL_PATCHES: Update.
5452 * src/c++17/ryu/ryu_generic_128.h: Remove extern "C".
5453 Remove declarations for never-defined functions.
5454 * testsuite/20_util/to_chars/4.cc: New test.
5455
54562021-05-11 Jonathan Wakely <jwakely@redhat.com>
5457
5458 * testsuite/20_util/headers/memory/synopsis.cc: Define C++98
5459 alternative for macro.
5460 * testsuite/20_util/shared_ptr/creation/99006.cc: Add effective
5461 target keyword.
5462 * testsuite/25_algorithms/copy/debug/99402.cc: Avoid C++11
5463 syntax.
5464
54652021-05-11 Jonathan Wakely <jwakely@redhat.com>
5466
5467 * include/bits/allocator.h (allocator<void>) [C++20]: Add
5468 missing noexcept to constructor. Restore missing POCMA and
5469 is_always_equal_traits.
5470 [C++17]: Make construct and destroy members private and
5471 declare allocator_traits as a friend.
5472 * include/bits/memoryfwd.h (allocator_traits): Declare.
5473 * include/ext/malloc_allocator.h (malloc_allocator::allocate):
5474 Add nodiscard attribute. Add static assertion for LWG 3307.
5475 * include/ext/new_allocator.h (new_allocator::allocate): Add
5476 static assertion for LWG 3307.
5477 * testsuite/20_util/allocator/void.cc: Check that converting
5478 constructor is noexcept. Check for propagation traits and
5479 size_type and difference_type. Check that pointer and
5480 const_pointer are gone in C++20.
5481
54822021-05-10 Jonathan Wakely <jwakely@redhat.com>
5483
5484 * include/std/stop_token: Remove TODO comment.
5485
54862021-05-10 Jonathan Wakely <jwakely@redhat.com>
5487
5488 * include/bits/shared_ptr_base.h (__shared_count(unique_ptr&&)):
5489 Initialize a non-reference deleter from an rvalue, as per LWG
5490 3548.
5491 (__shared_ptr::_UniqCompatible): Add missing constraint.
5492 * testsuite/20_util/shared_ptr/cons/lwg3548.cc: New test.
5493 * testsuite/20_util/shared_ptr/cons/unique_ptr_deleter.cc: Check
5494 constraints.
5495
54962021-05-10 Jonathan Wakely <jwakely@redhat.com>
5497
5498 * testsuite/17_intro/headers/c++2017/all_attributes.cc: Remove
5499 -std=gnu++17 from dg-options directive.
5500 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
5501 Likewise.
5502 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
5503 Likewise.
5504 * testsuite/17_intro/headers/c++2017/operator_names.cc:
5505 Likewise.
5506 * testsuite/17_intro/headers/c++2017/parallel_mode.cc: Likewise.
5507 * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
5508 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
5509 Likewise.
5510 * testsuite/18_support/aligned_alloc/aligned_alloc.cc: Likewise.
5511 * testsuite/18_support/byte/81076.cc: Likewise.
5512 * testsuite/18_support/byte/global_neg.cc: Likewise.
5513 * testsuite/18_support/byte/ops.cc: Likewise.
5514 * testsuite/18_support/byte/requirements.cc: Likewise.
5515 * testsuite/18_support/headers/cfloat/values_c++17.cc: Likewise.
5516 * testsuite/18_support/launder/1.cc: Likewise.
5517 * testsuite/18_support/launder/nodiscard.cc: Likewise.
5518 * testsuite/18_support/launder/requirements.cc: Likewise.
5519 * testsuite/18_support/launder/requirements_neg.cc: Likewise.
5520 * testsuite/18_support/new_aligned.cc: Likewise.
5521 * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
5522 Likewise.
5523 * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
5524 Likewise.
5525 * testsuite/19_diagnostics/error_condition/hash.cc: Likewise.
5526 * testsuite/20_util/addressof/requirements/constexpr.cc:
5527 Likewise.
5528 * testsuite/20_util/as_const/1.cc: Likewise.
5529 * testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
5530 * testsuite/20_util/bind/83427.cc: Likewise.
5531 * testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
5532 * testsuite/20_util/bool_constant/requirements.cc: Likewise.
5533 * testsuite/20_util/duration/arithmetic/constexpr_c++17.cc:
5534 Likewise.
5535 * testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
5536 Likewise.
5537 * testsuite/20_util/duration_cast/rounding.cc: Likewise.
5538 * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
5539 Likewise.
5540 * testsuite/20_util/from_chars/1_neg.cc: Likewise.
5541 * testsuite/20_util/from_chars/requirements.cc: Likewise.
5542 * testsuite/20_util/function/91456.cc: Likewise.
5543 * testsuite/20_util/function/cons/deduction.cc: Likewise.
5544 * testsuite/20_util/function_objects/83607.cc: Likewise.
5545 * testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
5546 * testsuite/20_util/function_objects/mem_fn/80478.cc: Likewise.
5547 * testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
5548 * testsuite/20_util/function_objects/not_fn/87538.cc: Likewise.
5549 * testsuite/20_util/has_unique_object_representations/requirements/explicit_instantiation.cc:
5550 Likewise.
5551 * testsuite/20_util/has_unique_object_representations/requirements/typedefs.cc:
5552 Likewise.
5553 * testsuite/20_util/has_unique_object_representations/value.cc:
5554 Likewise.
5555 * testsuite/20_util/hash/nullptr.cc: Likewise.
5556 * testsuite/20_util/in_place/requirements.cc: Likewise.
5557 * testsuite/20_util/is_aggregate/incomplete_neg.cc: Likewise.
5558 * testsuite/20_util/is_aggregate/requirements/explicit_instantiation.cc:
5559 Likewise.
5560 * testsuite/20_util/is_aggregate/requirements/typedefs.cc:
5561 Likewise.
5562 * testsuite/20_util/is_aggregate/value.cc: Likewise.
5563 * testsuite/20_util/is_invocable/83395.cc: Likewise.
5564 * testsuite/20_util/is_invocable/91456.cc: Likewise.
5565 * testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
5566 Likewise.
5567 * testsuite/20_util/is_invocable/requirements/typedefs.cc:
5568 Likewise.
5569 * testsuite/20_util/is_invocable/value.cc: Likewise.
5570 * testsuite/20_util/is_literal_type/deprecated-1z.cc: Likewise.
5571 * testsuite/20_util/is_nothrow_constructible/94003.cc: Likewise.
5572 * testsuite/20_util/is_nothrow_invocable/83395.cc: Likewise.
5573 * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
5574 Likewise.
5575 * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc: Likewise.
5576 * testsuite/20_util/is_nothrow_invocable/value.cc: Likewise.
5577 * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
5578 Likewise.
5579 * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
5580 Likewise.
5581 * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
5582 * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
5583 Likewise.
5584 * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
5585 Likewise.
5586 * testsuite/20_util/is_nothrow_swappable_with/value.cc:
5587 Likewise.
5588 * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
5589 Likewise.
5590 * testsuite/20_util/is_swappable/requirements/typedefs.cc:
5591 Likewise.
5592 * testsuite/20_util/is_swappable/value.cc: Likewise.
5593 * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
5594 Likewise.
5595 * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
5596 Likewise.
5597 * testsuite/20_util/is_swappable_with/value.cc: Likewise.
5598 * testsuite/20_util/logical_traits/83134.cc: Likewise.
5599 * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
5600 Likewise.
5601 * testsuite/20_util/logical_traits/requirements/typedefs.cc:
5602 Likewise.
5603 * testsuite/20_util/logical_traits/value.cc: Likewise.
5604 * testsuite/20_util/pair/cons/deduction.cc: Likewise.
5605 * testsuite/20_util/pair/swap_cxx17.cc: Likewise.
5606 * testsuite/20_util/ratio/requirements/ratio_equal_v.cc:
5607 Likewise.
5608 * testsuite/20_util/reference_wrapper/83427.cc: Likewise.
5609 * testsuite/20_util/reference_wrapper/deduction.cc: Likewise.
5610 * testsuite/20_util/shared_ptr/casts/reinterpret.cc: Likewise.
5611 * testsuite/20_util/shared_ptr/cons/deduction.cc: Likewise.
5612 * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
5613 Likewise.
5614 * testsuite/20_util/time_point/arithmetic/constexpr.cc:
5615 Likewise.
5616 * testsuite/20_util/time_point_cast/rounding.cc: Likewise.
5617 * testsuite/20_util/to_chars/3.cc: Likewise.
5618 * testsuite/20_util/to_chars/chars_format.cc: Likewise.
5619 * testsuite/20_util/to_chars/lwg3266.cc: Likewise.
5620 * testsuite/20_util/to_chars/requirements.cc: Likewise.
5621 * testsuite/20_util/tuple/78939.cc: Likewise.
5622 * testsuite/20_util/tuple/apply/1.cc: Likewise.
5623 * testsuite/20_util/tuple/apply/2.cc: Likewise.
5624 * testsuite/20_util/tuple/cons/deduction.cc: Likewise.
5625 * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
5626 * testsuite/20_util/tuple/make_from_tuple/2.cc: Likewise.
5627 * testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
5628 * testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
5629 * testsuite/20_util/unique_ptr/cons/deduction_neg.cc: Likewise.
5630 * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
5631 Likewise.
5632 * testsuite/20_util/variable_templates_for_traits.cc: Likewise.
5633 * testsuite/20_util/void_t/1.cc: Likewise.
5634 * testsuite/20_util/weak_ptr/cons/deduction.cc: Likewise.
5635 * testsuite/24_iterators/container_access.cc: Likewise.
5636 * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
5637 Likewise.
5638 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
5639 Likewise.
5640 * testsuite/24_iterators/range_access/range_access_cpp17.cc:
5641 Likewise.
5642 * testsuite/24_iterators/range_access/range_access_cpp17_neg.cc:
5643 Likewise.
5644 * testsuite/26_numerics/gcd/gcd_neg.cc: Likewise.
5645 * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
5646 Likewise.
5647 * testsuite/26_numerics/headers/cmath/hypot.cc: Likewise.
5648 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
5649 Likewise.
5650 * testsuite/26_numerics/lcm/1.cc: Likewise.
5651 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
5652 * testsuite/26_numerics/valarray/deduction.cc: Likewise.
5653 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
5654 Likewise.
5655 * testsuite/27_io/manipulators/standard/char/quoted_sv.cc:
5656 Likewise.
5657 * testsuite/27_io/manipulators/standard/wchar_t/quoted_sv.cc:
5658 Likewise.
5659 * testsuite/27_io/types/4.cc: Likewise.
5660 * testsuite/28_regex/basic_regex/ctors/deduction.cc: Likewise.
5661 * testsuite/libstdc++-prettyprinters/91997.cc: Likewise.
5662 * testsuite/libstdc++-prettyprinters/cxx17.cc: Likewise.
5663
56642021-05-10 Jonathan Wakely <jwakely@redhat.com>
5665
5666 * testsuite/20_util/function_objects/searchers.cc: Remove
5667 -std=gnu++17 from dg-options directive.
5668 * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
5669 Likewise.
5670 * testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc:
5671 Likewise.
5672 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
5673 Likewise.
5674 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94831.cc:
5675 Likewise.
5676 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
5677 Likewise.
5678 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
5679 Likewise.
5680 * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
5681 Likewise.
5682 * testsuite/25_algorithms/clamp/1.cc: Likewise.
5683 * testsuite/25_algorithms/clamp/2.cc: Likewise.
5684 * testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
5685 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
5686 Likewise.
5687 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
5688 Likewise.
5689 * testsuite/25_algorithms/for_each/for_each_n.cc: Likewise.
5690 * testsuite/25_algorithms/for_each/for_each_n_debug.cc:
5691 Likewise.
5692 * testsuite/25_algorithms/sample/1.cc: Likewise.
5693 * testsuite/25_algorithms/sample/2.cc: Likewise.
5694 * testsuite/25_algorithms/sample/3.cc: Likewise.
5695 * testsuite/25_algorithms/sample/81221.cc: Likewise.
5696 * testsuite/25_algorithms/search/searcher.cc: Likewise.
5697 * testsuite/26_numerics/exclusive_scan/1.cc: Likewise.
5698 * testsuite/26_numerics/inclusive_scan/1.cc: Likewise.
5699 * testsuite/26_numerics/reduce/1.cc: Likewise.
5700 * testsuite/26_numerics/reduce/2.cc: Likewise.
5701 * testsuite/26_numerics/transform_exclusive_scan/1.cc: Likewise.
5702 * testsuite/26_numerics/transform_inclusive_scan/1.cc: Likewise.
5703 * testsuite/26_numerics/transform_reduce/1.cc: Likewise.
5704
57052021-05-10 Jonathan Wakely <jwakely@redhat.com>
5706
5707 * testsuite/23_containers/array/cons/deduction.cc: Remove
5708 -std=gnu++17 from dg-options directive.
5709 * testsuite/23_containers/array/cons/deduction_neg.cc: Likewise.
5710 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
5711 Likewise.
5712 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
5713 Likewise.
5714 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
5715 Likewise.
5716 * testsuite/23_containers/deque/cons/deduction.cc: Likewise.
5717 * testsuite/23_containers/deque/modifiers/emplace/cxx17_return.cc:
5718 Likewise.
5719 * testsuite/23_containers/forward_list/cons/deduction.cc:
5720 Likewise.
5721 * testsuite/23_containers/forward_list/modifiers/emplace_cxx17_return.cc:
5722 Likewise.
5723 * testsuite/23_containers/list/cons/deduction.cc: Likewise.
5724 * testsuite/23_containers/list/modifiers/emplace/cxx17_return.cc:
5725 Likewise.
5726 * testsuite/23_containers/map/cons/deduction.cc: Likewise.
5727 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
5728 * testsuite/23_containers/map/modifiers/insert/83226.cc:
5729 Likewise.
5730 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
5731 Likewise.
5732 * testsuite/23_containers/map/modifiers/merge.cc: Likewise.
5733 * testsuite/23_containers/map/modifiers/try_emplace/1.cc:
5734 Likewise.
5735 * testsuite/23_containers/multimap/cons/deduction.cc: Likewise.
5736 * testsuite/23_containers/multimap/modifiers/extract.cc:
5737 Likewise.
5738 * testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
5739 * testsuite/23_containers/multiset/cons/deduction.cc: Likewise.
5740 * testsuite/23_containers/multiset/modifiers/extract.cc:
5741 Likewise.
5742 * testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
5743 * testsuite/23_containers/priority_queue/deduction.cc: Likewise.
5744 * testsuite/23_containers/queue/deduction.cc: Likewise.
5745 * testsuite/23_containers/queue/members/emplace_cxx17_return.cc:
5746 Likewise.
5747 * testsuite/23_containers/set/cons/deduction.cc: Likewise.
5748 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
5749 * testsuite/23_containers/set/modifiers/merge.cc: Likewise.
5750 * testsuite/23_containers/set/modifiers/node_swap.cc: Likewise.
5751 * testsuite/23_containers/stack/deduction.cc: Likewise.
5752 * testsuite/23_containers/stack/members/emplace_cxx17_return.cc:
5753 Likewise.
5754 * testsuite/23_containers/unordered_map/cons/deduction.cc:
5755 Likewise.
5756 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
5757 Likewise.
5758 * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
5759 Likewise.
5760 * testsuite/23_containers/unordered_map/modifiers/merge.cc:
5761 Likewise.
5762 * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
5763 Likewise.
5764 * testsuite/23_containers/unordered_multimap/cons/deduction.cc:
5765 Likewise.
5766 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
5767 Likewise.
5768 * testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
5769 Likewise.
5770 * testsuite/23_containers/unordered_multiset/cons/deduction.cc:
5771 Likewise.
5772 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
5773 Likewise.
5774 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
5775 Likewise.
5776 * testsuite/23_containers/unordered_set/cons/deduction.cc:
5777 Likewise.
5778 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
5779 Likewise.
5780 * testsuite/23_containers/unordered_set/modifiers/merge.cc:
5781 Likewise.
5782 * testsuite/23_containers/vector/bool/emplace_cxx17_return.cc:
5783 Likewise.
5784 * testsuite/23_containers/vector/cons/89164_c++17.cc: Likewise.
5785 * testsuite/23_containers/vector/cons/deduction.cc: Likewise.
5786 * testsuite/23_containers/vector/modifiers/emplace/cxx17_return.cc:
5787 Likewise.
5788
57892021-05-10 Jonathan Wakely <jwakely@redhat.com>
5790
5791 * testsuite/21_strings/basic_string/79162.cc: Remove
5792 -std=gnu++17 from dg-options directive.
5793 * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
5794 * testsuite/21_strings/basic_string/cons/char/79162.cc:
5795 Likewise.
5796 * testsuite/21_strings/basic_string/cons/char/86138.cc:
5797 Likewise.
5798 * testsuite/21_strings/basic_string/cons/char/9.cc: Likewise.
5799 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
5800 Likewise.
5801 * testsuite/21_strings/basic_string/cons/char/moveable2_c++17.cc:
5802 Likewise.
5803 * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
5804 * testsuite/21_strings/basic_string/cons/wchar_t/79162.cc:
5805 Likewise.
5806 * testsuite/21_strings/basic_string/cons/wchar_t/86138.cc:
5807 Likewise.
5808 * testsuite/21_strings/basic_string/cons/wchar_t/9.cc: Likewise.
5809 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
5810 Likewise.
5811 * testsuite/21_strings/basic_string/cons/wchar_t/moveable2_c++17.cc:
5812 Likewise.
5813 * testsuite/21_strings/basic_string/hash/hash.cc: Likewise.
5814 * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
5815 * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
5816 * testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
5817 Likewise.
5818 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
5819 Likewise.
5820 * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
5821 Likewise.
5822 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
5823 Likewise.
5824 * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
5825 Likewise.
5826 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
5827 Likewise.
5828 * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
5829 Likewise.
5830 * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
5831 Likewise.
5832 * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
5833 Likewise.
5834 * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
5835 Likewise.
5836 * testsuite/21_strings/basic_string/operations/data/char/2.cc:
5837 Likewise.
5838 * testsuite/21_strings/basic_string/operations/data/char/86169.cc:
5839 Likewise.
5840 * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
5841 Likewise.
5842 * testsuite/21_strings/basic_string/operations/find/char/5.cc:
5843 Likewise.
5844 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
5845 Likewise.
5846 * testsuite/21_strings/basic_string/operators/char/5.cc:
5847 Likewise.
5848 * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
5849 Likewise.
5850 * testsuite/21_strings/basic_string_view/capacity/1.cc:
5851 Likewise.
5852 * testsuite/21_strings/basic_string_view/capacity/empty_neg.cc:
5853 Likewise.
5854 * testsuite/21_strings/basic_string_view/cons/char/1.cc:
5855 Likewise.
5856 * testsuite/21_strings/basic_string_view/cons/char/2.cc:
5857 Likewise.
5858 * testsuite/21_strings/basic_string_view/cons/char/3.cc:
5859 Likewise.
5860 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc:
5861 Likewise.
5862 * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
5863 Likewise.
5864 * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
5865 Likewise.
5866 * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
5867 Likewise.
5868 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc:
5869 Likewise.
5870 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
5871 Likewise.
5872 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
5873 Likewise.
5874 * testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
5875 Likewise.
5876 * testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc:
5877 Likewise.
5878 * testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc:
5879 Likewise.
5880 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
5881 Likewise.
5882 * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
5883 Likewise.
5884 * testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc:
5885 Likewise.
5886 * testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
5887 Likewise.
5888 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
5889 Likewise.
5890 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
5891 Likewise.
5892 * testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
5893 Likewise.
5894 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc:
5895 Likewise.
5896 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc:
5897 Likewise.
5898 * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
5899 Likewise.
5900 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
5901 Likewise.
5902 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
5903 Likewise.
5904 * testsuite/21_strings/basic_string_view/include.cc: Likewise.
5905 * testsuite/21_strings/basic_string_view/inserters/94051.cc:
5906 Likewise.
5907 * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
5908 Likewise.
5909 * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
5910 Likewise.
5911 * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
5912 Likewise.
5913 * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
5914 Likewise.
5915 * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
5916 Likewise.
5917 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
5918 Likewise.
5919 * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
5920 Likewise.
5921 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
5922 Likewise.
5923 * testsuite/21_strings/basic_string_view/literals/types.cc:
5924 Likewise.
5925 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
5926 Likewise.
5927 * testsuite/21_strings/basic_string_view/literals/values.cc:
5928 Likewise.
5929 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
5930 Likewise.
5931 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
5932 Likewise.
5933 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
5934 Likewise.
5935 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
5936 Likewise.
5937 * testsuite/21_strings/basic_string_view/modifiers/swap/char/1.cc:
5938 Likewise.
5939 * testsuite/21_strings/basic_string_view/modifiers/swap/wchar_t/1.cc:
5940 Likewise.
5941 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
5942 Likewise.
5943 * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
5944 Likewise.
5945 * testsuite/21_strings/basic_string_view/operations/compare/char/2.cc:
5946 Likewise.
5947 * testsuite/21_strings/basic_string_view/operations/compare/char/70483.cc:
5948 Likewise.
5949 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc:
5950 Likewise.
5951 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
5952 Likewise.
5953 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
5954 Likewise.
5955 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/2.cc:
5956 Likewise.
5957 * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
5958 Likewise.
5959 * testsuite/21_strings/basic_string_view/operations/copy/char/2.cc:
5960 Likewise.
5961 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
5962 Likewise.
5963 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/2.cc:
5964 Likewise.
5965 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
5966 Likewise.
5967 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
5968 Likewise.
5969 * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
5970 Likewise.
5971 * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
5972 Likewise.
5973 * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
5974 Likewise.
5975 * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
5976 Likewise.
5977 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc:
5978 Likewise.
5979 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
5980 Likewise.
5981 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
5982 Likewise.
5983 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
5984 Likewise.
5985 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
5986 Likewise.
5987 * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
5988 Likewise.
5989 * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
5990 Likewise.
5991 * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
5992 Likewise.
5993 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc:
5994 Likewise.
5995 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
5996 Likewise.
5997 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
5998 Likewise.
5999 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
6000 Likewise.
6001 * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
6002 Likewise.
6003 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
6004 Likewise.
6005 * testsuite/21_strings/basic_string_view/operations/substr/char/83511.cc:
6006 Likewise.
6007 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
6008 Likewise.
6009 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/83511.cc:
6010 Likewise.
6011 * testsuite/21_strings/basic_string_view/operators/char/2.cc:
6012 Likewise.
6013 * testsuite/21_strings/basic_string_view/operators/char/89446.cc:
6014 Likewise.
6015 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
6016 Likewise.
6017 * testsuite/21_strings/basic_string_view/operators/wchar_t/89446.cc:
6018 Likewise.
6019 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
6020 Likewise.
6021 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
6022 Likewise.
6023 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
6024 Likewise.
6025 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
6026 Likewise.
6027 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
6028 Likewise.
6029 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
6030 Likewise.
6031 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
6032 Likewise.
6033 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
6034 Likewise.
6035 * testsuite/21_strings/basic_string_view/requirements/traits_neg.cc:
6036 Likewise.
6037 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
6038 Likewise.
6039 * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
6040 * testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
6041 * testsuite/21_strings/char_traits/requirements/char/99181.cc:
6042 Likewise.
6043 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
6044
60452021-05-10 Jonathan Wakely <jwakely@redhat.com>
6046
6047 * testsuite/20_util/memory_resource/1.cc: Remove -std=gnu++17
6048 from dg-options directive.
6049 * testsuite/20_util/memory_resource/2.cc: Likewise.
6050 * testsuite/20_util/monotonic_buffer_resource/1.cc: Likewise.
6051 * testsuite/20_util/monotonic_buffer_resource/93208.cc:
6052 Likewise.
6053 * testsuite/20_util/monotonic_buffer_resource/allocate.cc:
6054 Likewise.
6055 * testsuite/20_util/monotonic_buffer_resource/deallocate.cc:
6056 Likewise.
6057 * testsuite/20_util/monotonic_buffer_resource/release.cc:
6058 Likewise.
6059 * testsuite/20_util/monotonic_buffer_resource/upstream_resource.cc:
6060 Likewise.
6061 * testsuite/20_util/polymorphic_allocator/1.cc: Likewise.
6062 * testsuite/20_util/polymorphic_allocator/construct_pair.cc:
6063 Likewise.
6064 * testsuite/20_util/polymorphic_allocator/resource.cc: Likewise.
6065 * testsuite/20_util/polymorphic_allocator/select.cc: Likewise.
6066 * testsuite/20_util/synchronized_pool_resource/allocate.cc:
6067 Likewise.
6068 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
6069 Likewise.
6070 * testsuite/20_util/synchronized_pool_resource/cons.cc:
6071 Likewise.
6072 * testsuite/20_util/synchronized_pool_resource/cons_single.cc:
6073 Likewise.
6074 * testsuite/20_util/synchronized_pool_resource/is_equal.cc:
6075 Likewise.
6076 * testsuite/20_util/synchronized_pool_resource/multithreaded.cc:
6077 Likewise.
6078 * testsuite/20_util/synchronized_pool_resource/options.cc:
6079 Likewise.
6080 * testsuite/20_util/synchronized_pool_resource/release.cc:
6081 Likewise.
6082 * testsuite/20_util/synchronized_pool_resource/release_single.cc:
6083 Likewise.
6084 * testsuite/20_util/unsynchronized_pool_resource/allocate-max-chunks.cc:
6085 Likewise.
6086 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
6087 Likewise.
6088 * testsuite/20_util/unsynchronized_pool_resource/cons.cc:
6089 Likewise.
6090 * testsuite/20_util/unsynchronized_pool_resource/is_equal.cc:
6091 Likewise.
6092 * testsuite/20_util/unsynchronized_pool_resource/options.cc:
6093 Likewise.
6094 * testsuite/20_util/unsynchronized_pool_resource/release.cc:
6095 Likewise.
6096 * testsuite/21_strings/basic_string/types/pmr_typedefs.cc:
6097 Likewise.
6098 * testsuite/23_containers/deque/types/pmr_typedefs.cc: Likewise.
6099 * testsuite/23_containers/deque/types/pmr_typedefs_debug.cc:
6100 Likewise.
6101 * testsuite/23_containers/forward_list/pmr_typedefs.cc:
6102 Likewise.
6103 * testsuite/23_containers/forward_list/pmr_typedefs_debug.cc:
6104 Likewise.
6105 * testsuite/23_containers/list/pmr_typedefs.cc: Likewise.
6106 * testsuite/23_containers/list/pmr_typedefs_debug.cc: Likewise.
6107 * testsuite/23_containers/map/pmr_typedefs.cc: Likewise.
6108 * testsuite/23_containers/map/pmr_typedefs_debug.cc: Likewise.
6109 * testsuite/23_containers/multimap/pmr_typedefs.cc: Likewise.
6110 * testsuite/23_containers/multimap/pmr_typedefs_debug.cc:
6111 Likewise.
6112 * testsuite/23_containers/multiset/pmr_typedefs.cc: Likewise.
6113 * testsuite/23_containers/multiset/pmr_typedefs_debug.cc:
6114 Likewise.
6115 * testsuite/23_containers/set/pmr_typedefs.cc: Likewise.
6116 * testsuite/23_containers/set/pmr_typedefs_debug.cc: Likewise.
6117 * testsuite/23_containers/unordered_map/pmr_typedefs.cc:
6118 Likewise.
6119 * testsuite/23_containers/unordered_map/pmr_typedefs_debug.cc:
6120 Likewise.
6121 * testsuite/23_containers/unordered_multimap/pmr_typedefs.cc:
6122 Likewise.
6123 * testsuite/23_containers/unordered_multimap/pmr_typedefs_debug.cc:
6124 Likewise.
6125 * testsuite/23_containers/unordered_multiset/pmr_typedefs.cc:
6126 Likewise.
6127 * testsuite/23_containers/unordered_multiset/pmr_typedefs_debug.cc:
6128 Likewise.
6129 * testsuite/23_containers/unordered_set/pmr_typedefs.cc:
6130 Likewise.
6131 * testsuite/23_containers/unordered_set/pmr_typedefs_debug.cc:
6132 Likewise.
6133 * testsuite/23_containers/vector/pmr_typedefs.cc: Likewise.
6134 * testsuite/23_containers/vector/types/pmr_typedefs_debug.cc:
6135 Likewise.
6136 * testsuite/28_regex/match_results/pmr_typedefs.cc: Likewise.
6137
61382021-05-10 Jonathan Wakely <jwakely@redhat.com>
6139
6140 * testsuite/29_atomics/atomic/69769.cc: Remove -std=gnu++17 from
6141 dg-options.
6142 * testsuite/29_atomics/atomic/is_always_lock_free.cc:
6143 * testsuite/29_atomics/atomic/requirements/typedefs.cc:
6144 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
6145 * testsuite/29_atomics/atomic_integral/requirements/typedefs.cc:
6146 * testsuite/30_threads/lock_guard/cons/deduction.cc: Likewise.
6147 * testsuite/30_threads/scoped_lock/cons/1.cc: Likewise.
6148 * testsuite/30_threads/scoped_lock/cons/deduction.cc: Likewise.
6149 * testsuite/30_threads/scoped_lock/requirements/explicit_instantiation.cc:
6150 Likewise.
6151 * testsuite/30_threads/scoped_lock/requirements/typedefs.cc:
6152 Likewise.
6153 * testsuite/30_threads/shared_lock/70766.cc: Likewise.
6154 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
6155 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
6156 Likewise.
6157 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc: Likewise.
6158 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
6159 Likewise.
6160 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
6161 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
6162 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
6163 * testsuite/30_threads/unique_lock/cons/deduction.cc: Likewise.
6164
61652021-05-10 Jonathan Wakely <jwakely@redhat.com>
6166
6167 * testsuite/20_util/any/assign/1.cc: Remove -std=gnu++17 from
6168 dg-options directive.
6169 * testsuite/20_util/any/assign/2.cc: Likewise.
6170 * testsuite/20_util/any/assign/emplace.cc: Likewise.
6171 * testsuite/20_util/any/assign/exception.cc: Likewise.
6172 * testsuite/20_util/any/assign/self.cc: Likewise.
6173 * testsuite/20_util/any/cons/1.cc: Likewise.
6174 * testsuite/20_util/any/cons/2.cc: Likewise.
6175 * testsuite/20_util/any/cons/90415.cc: Likewise.
6176 * testsuite/20_util/any/cons/92156.cc: Likewise.
6177 * testsuite/20_util/any/cons/aligned.cc: Likewise.
6178 * testsuite/20_util/any/cons/explicit.cc: Likewise.
6179 * testsuite/20_util/any/cons/in_place.cc: Likewise.
6180 * testsuite/20_util/any/cons/nontrivial.cc: Likewise.
6181 * testsuite/20_util/any/make_any.cc: Likewise.
6182 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
6183 * testsuite/20_util/any/misc/any_cast_neg.cc: Likewise.
6184 * testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
6185 * testsuite/20_util/any/misc/swap.cc: Likewise.
6186 * testsuite/20_util/any/modifiers/1.cc: Likewise.
6187 * testsuite/20_util/any/modifiers/83658.cc: Likewise.
6188 * testsuite/20_util/any/modifiers/92156.cc: Likewise.
6189 * testsuite/20_util/any/observers/type.cc: Likewise.
6190 * testsuite/20_util/any/requirements.cc: Likewise.
6191 * testsuite/20_util/any/typedefs.cc: Likewise.
6192 * testsuite/20_util/optional/77288.cc: Likewise.
6193 * testsuite/20_util/optional/84601.cc: Likewise.
6194 * testsuite/20_util/optional/assignment/1.cc: Likewise.
6195 * testsuite/20_util/optional/assignment/2.cc: Likewise.
6196 * testsuite/20_util/optional/assignment/3.cc: Likewise.
6197 * testsuite/20_util/optional/assignment/4.cc: Likewise.
6198 * testsuite/20_util/optional/assignment/5.cc: Likewise.
6199 * testsuite/20_util/optional/assignment/6.cc: Likewise.
6200 * testsuite/20_util/optional/assignment/7.cc: Likewise.
6201 * testsuite/20_util/optional/assignment/8.cc: Likewise.
6202 * testsuite/20_util/optional/assignment/9.cc: Likewise.
6203 * testsuite/20_util/optional/bad_access.cc: Likewise.
6204 * testsuite/20_util/optional/cons/77727.cc: Likewise.
6205 * testsuite/20_util/optional/cons/85642.cc: Likewise.
6206 * testsuite/20_util/optional/cons/copy.cc: Likewise.
6207 * testsuite/20_util/optional/cons/deduction.cc: Likewise.
6208 * testsuite/20_util/optional/cons/default.cc: Likewise.
6209 * testsuite/20_util/optional/cons/move.cc: Likewise.
6210 * testsuite/20_util/optional/cons/trivial.cc: Likewise.
6211 * testsuite/20_util/optional/cons/value.cc: Likewise.
6212 * testsuite/20_util/optional/cons/value_neg.cc: Likewise.
6213 * testsuite/20_util/optional/constexpr/cons/default.cc:
6214 Likewise.
6215 * testsuite/20_util/optional/constexpr/cons/value.cc: Likewise.
6216 * testsuite/20_util/optional/constexpr/in_place.cc: Likewise.
6217 * testsuite/20_util/optional/constexpr/make_optional.cc:
6218 Likewise.
6219 * testsuite/20_util/optional/constexpr/nullopt.cc: Likewise.
6220 * testsuite/20_util/optional/constexpr/observers/1.cc: Likewise.
6221 * testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
6222 * testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
6223 * testsuite/20_util/optional/constexpr/observers/4.cc: Likewise.
6224 * testsuite/20_util/optional/constexpr/observers/5.cc: Likewise.
6225 * testsuite/20_util/optional/constexpr/relops/1.cc: Likewise.
6226 * testsuite/20_util/optional/constexpr/relops/2.cc: Likewise.
6227 * testsuite/20_util/optional/constexpr/relops/3.cc: Likewise.
6228 * testsuite/20_util/optional/constexpr/relops/4.cc: Likewise.
6229 * testsuite/20_util/optional/constexpr/relops/5.cc: Likewise.
6230 * testsuite/20_util/optional/constexpr/relops/6.cc: Likewise.
6231 * testsuite/20_util/optional/hash.cc: Likewise.
6232 * testsuite/20_util/optional/in_place.cc: Likewise.
6233 * testsuite/20_util/optional/make_optional.cc: Likewise.
6234 * testsuite/20_util/optional/nullopt.cc: Likewise.
6235 * testsuite/20_util/optional/observers/1.cc: Likewise.
6236 * testsuite/20_util/optional/observers/2.cc: Likewise.
6237 * testsuite/20_util/optional/observers/3.cc: Likewise.
6238 * testsuite/20_util/optional/observers/4.cc: Likewise.
6239 * testsuite/20_util/optional/observers/5.cc: Likewise.
6240 * testsuite/20_util/optional/observers/6.cc: Likewise.
6241 * testsuite/20_util/optional/relops/1.cc: Likewise.
6242 * testsuite/20_util/optional/relops/2.cc: Likewise.
6243 * testsuite/20_util/optional/relops/3.cc: Likewise.
6244 * testsuite/20_util/optional/relops/4.cc: Likewise.
6245 * testsuite/20_util/optional/relops/5.cc: Likewise.
6246 * testsuite/20_util/optional/relops/6.cc: Likewise.
6247 * testsuite/20_util/optional/relops/7.cc: Likewise.
6248 * testsuite/20_util/optional/requirements.cc: Likewise.
6249 * testsuite/20_util/optional/swap/1.cc: Likewise.
6250 * testsuite/20_util/optional/swap/2.cc: Likewise.
6251 * testsuite/20_util/optional/typedefs.cc: Likewise.
6252 * testsuite/20_util/variant/80165.cc: Likewise.
6253 * testsuite/20_util/variant/85183.cc: Likewise.
6254 * testsuite/20_util/variant/86874.cc: Likewise.
6255 * testsuite/20_util/variant/87431.cc: Likewise.
6256 * testsuite/20_util/variant/87619.cc: Likewise.
6257 * testsuite/20_util/variant/91807.cc: Likewise.
6258 * testsuite/20_util/variant/any.cc: Likewise.
6259 * testsuite/20_util/variant/compile.cc: Likewise.
6260 * testsuite/20_util/variant/deduction.cc: Likewise.
6261 * testsuite/20_util/variant/exception_safety.cc: Likewise.
6262 * testsuite/20_util/variant/hash.cc: Likewise.
6263 * testsuite/20_util/variant/index_type.cc: Likewise.
6264 * testsuite/20_util/variant/relops/89851.cc: Likewise.
6265 * testsuite/20_util/variant/relops/90008.cc: Likewise.
6266 * testsuite/20_util/variant/run.cc: Likewise.
6267 * testsuite/20_util/variant/visit.cc: Likewise.
6268
62692021-05-10 Jonathan Wakely <jwakely@redhat.com>
6270
6271 * testsuite/27_io/basic_filebuf/open/char/path.cc: Remove
6272 -std=gnu++17 from dg-options directive.
6273 * testsuite/27_io/basic_fstream/cons/char/path.cc: Likewise.
6274 * testsuite/27_io/basic_fstream/open/char/path.cc: Likewise.
6275 * testsuite/27_io/basic_ifstream/cons/char/path.cc: Likewise.
6276 * testsuite/27_io/basic_ifstream/open/char/path.cc: Likewise.
6277 * testsuite/27_io/basic_ofstream/cons/char/path.cc: Likewise.
6278 * testsuite/27_io/basic_ofstream/open/char/path.cc: Likewise.
6279 * testsuite/27_io/filesystem/directory_entry/86597.cc: Likewise.
6280 * testsuite/27_io/filesystem/directory_entry/lwg3171.cc:
6281 Likewise.
6282 * testsuite/27_io/filesystem/file_status/1.cc: Likewise.
6283 * testsuite/27_io/filesystem/filesystem_error/cons.cc: Likewise.
6284 * testsuite/27_io/filesystem/filesystem_error/copy.cc: Likewise.
6285 * testsuite/27_io/filesystem/iterators/91067.cc: Likewise.
6286 * testsuite/27_io/filesystem/iterators/caching.cc: Likewise.
6287 * testsuite/27_io/filesystem/iterators/directory_iterator.cc:
6288 Likewise.
6289 * testsuite/27_io/filesystem/iterators/pop.cc: Likewise.
6290 * testsuite/27_io/filesystem/iterators/recursion_pending.cc:
6291 Likewise.
6292 * testsuite/27_io/filesystem/iterators/recursive_directory_iterator.cc:
6293 Likewise.
6294 * testsuite/27_io/filesystem/operations/absolute.cc: Likewise.
6295 * testsuite/27_io/filesystem/operations/all.cc: Likewise.
6296 * testsuite/27_io/filesystem/operations/canonical.cc: Likewise.
6297 * testsuite/27_io/filesystem/operations/copy.cc: Likewise.
6298 * testsuite/27_io/filesystem/operations/copy_file.cc: Likewise.
6299 * testsuite/27_io/filesystem/operations/create_directories.cc:
6300 Likewise.
6301 * testsuite/27_io/filesystem/operations/create_directory.cc:
6302 Likewise.
6303 * testsuite/27_io/filesystem/operations/create_symlink.cc:
6304 Likewise.
6305 * testsuite/27_io/filesystem/operations/current_path.cc:
6306 Likewise.
6307 * testsuite/27_io/filesystem/operations/equivalent.cc: Likewise.
6308 * testsuite/27_io/filesystem/operations/exists.cc: Likewise.
6309 * testsuite/27_io/filesystem/operations/file_size.cc: Likewise.
6310 * testsuite/27_io/filesystem/operations/is_empty.cc: Likewise.
6311 * testsuite/27_io/filesystem/operations/last_write_time.cc:
6312 Likewise.
6313 * testsuite/27_io/filesystem/operations/permissions.cc:
6314 Likewise.
6315 * testsuite/27_io/filesystem/operations/proximate.cc: Likewise.
6316 * testsuite/27_io/filesystem/operations/read_symlink.cc:
6317 Likewise.
6318 * testsuite/27_io/filesystem/operations/relative.cc: Likewise.
6319 * testsuite/27_io/filesystem/operations/remove.cc: Likewise.
6320 * testsuite/27_io/filesystem/operations/remove_all.cc: Likewise.
6321 * testsuite/27_io/filesystem/operations/rename.cc: Likewise.
6322 * testsuite/27_io/filesystem/operations/resize_file.cc:
6323 Likewise.
6324 * testsuite/27_io/filesystem/operations/space.cc: Likewise.
6325 * testsuite/27_io/filesystem/operations/status.cc: Likewise.
6326 * testsuite/27_io/filesystem/operations/symlink_status.cc:
6327 Likewise.
6328 * testsuite/27_io/filesystem/operations/temp_directory_path.cc:
6329 Likewise.
6330 * testsuite/27_io/filesystem/operations/weakly_canonical.cc:
6331 Likewise.
6332 * testsuite/27_io/filesystem/path/append/path.cc: Likewise.
6333 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
6334 * testsuite/27_io/filesystem/path/assign/assign.cc: Likewise.
6335 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
6336 * testsuite/27_io/filesystem/path/compare/compare.cc: Likewise.
6337 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
6338 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
6339 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
6340 * testsuite/27_io/filesystem/path/concat/92853.cc: Likewise.
6341 * testsuite/27_io/filesystem/path/concat/94063.cc: Likewise.
6342 * testsuite/27_io/filesystem/path/concat/path.cc: Likewise.
6343 * testsuite/27_io/filesystem/path/concat/strings.cc: Likewise.
6344 * testsuite/27_io/filesystem/path/construct/80762.cc: Likewise.
6345 * testsuite/27_io/filesystem/path/construct/90281.cc: Likewise.
6346 * testsuite/27_io/filesystem/path/construct/90634.cc: Likewise.
6347 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
6348 * testsuite/27_io/filesystem/path/construct/default.cc:
6349 Likewise.
6350 * testsuite/27_io/filesystem/path/construct/format.cc: Likewise.
6351 * testsuite/27_io/filesystem/path/construct/locale.cc: Likewise.
6352 * testsuite/27_io/filesystem/path/construct/range.cc: Likewise.
6353 * testsuite/27_io/filesystem/path/construct/string_view.cc:
6354 Likewise.
6355 * testsuite/27_io/filesystem/path/decompose/extension.cc:
6356 Likewise.
6357 * testsuite/27_io/filesystem/path/decompose/filename.cc:
6358 Likewise.
6359 * testsuite/27_io/filesystem/path/decompose/parent_path.cc:
6360 Likewise.
6361 * testsuite/27_io/filesystem/path/decompose/relative_path.cc:
6362 Likewise.
6363 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
6364 Likewise.
6365 * testsuite/27_io/filesystem/path/decompose/root_name.cc:
6366 Likewise.
6367 * testsuite/27_io/filesystem/path/decompose/root_path.cc:
6368 Likewise.
6369 * testsuite/27_io/filesystem/path/decompose/stem.cc: Likewise.
6370 * testsuite/27_io/filesystem/path/factory/u8path-char8_t.cc:
6371 Likewise.
6372 * testsuite/27_io/filesystem/path/factory/u8path.cc: Likewise.
6373 * testsuite/27_io/filesystem/path/generation/normal.cc:
6374 Likewise.
6375 * testsuite/27_io/filesystem/path/generation/normal2.cc:
6376 Likewise.
6377 * testsuite/27_io/filesystem/path/generation/proximate.cc:
6378 Likewise.
6379 * testsuite/27_io/filesystem/path/generation/relative.cc:
6380 Likewise.
6381 * testsuite/27_io/filesystem/path/generic/94242.cc: Likewise.
6382 * testsuite/27_io/filesystem/path/generic/generic_string.cc:
6383 Likewise.
6384 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
6385 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
6386 * testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise.
6387 * testsuite/27_io/filesystem/path/itr/components.cc: Likewise.
6388 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
6389 * testsuite/27_io/filesystem/path/modifiers/clear.cc: Likewise.
6390 * testsuite/27_io/filesystem/path/modifiers/make_preferred.cc:
6391 Likewise.
6392 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
6393 Likewise.
6394 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
6395 Likewise.
6396 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
6397 Likewise.
6398 * testsuite/27_io/filesystem/path/modifiers/swap.cc: Likewise.
6399 * testsuite/27_io/filesystem/path/native/alloc.cc: Likewise.
6400 * testsuite/27_io/filesystem/path/native/string-char8_t.cc:
6401 Likewise.
6402 * testsuite/27_io/filesystem/path/native/string.cc: Likewise.
6403 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
6404 * testsuite/27_io/filesystem/path/nonmember/cmp.cc: Likewise.
6405 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
6406 Likewise.
6407 * testsuite/27_io/filesystem/path/query/empty.cc: Likewise.
6408 * testsuite/27_io/filesystem/path/query/empty_neg.cc:
6409 * testsuite/27_io/filesystem/path/query/has_extension.cc:
6410 Likewise.
6411 * testsuite/27_io/filesystem/path/query/has_filename.cc:
6412 Likewise.
6413 * testsuite/27_io/filesystem/path/query/has_parent_path.cc:
6414 Likewise.
6415 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
6416 Likewise.
6417 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
6418 Likewise.
6419 * testsuite/27_io/filesystem/path/query/has_root_name.cc:
6420 Likewise.
6421 * testsuite/27_io/filesystem/path/query/has_root_path.cc:
6422 Likewise.
6423 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
6424 * testsuite/27_io/filesystem/path/query/is_absolute.cc:
6425 Likewise.
6426 * testsuite/27_io/filesystem/path/query/is_relative.cc:
6427 Likewise.
6428 * testsuite/experimental/filesystem/path/construct/string_view.cc:
6429 Likewise.
6430
64312021-05-10 Jonathan Wakely <jwakely@redhat.com>
6432
6433 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_construct.cc:
6434 Remove -std=gnu++17 from dg-options.
6435 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_copy_move.cc:
6436 Likewise.
6437 * testsuite/20_util/specialized_algorithms/pstl/uninitialized_fill_destroy.cc:
6438 Likewise.
6439 * testsuite/25_algorithms/pstl/alg_merge/inplace_merge.cc:
6440 Likewise.
6441 * testsuite/25_algorithms/pstl/alg_merge/merge.cc: Likewise.
6442 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_if.cc:
6443 Likewise.
6444 * testsuite/25_algorithms/pstl/alg_modifying_operations/copy_move.cc:
6445 Likewise.
6446 * testsuite/25_algorithms/pstl/alg_modifying_operations/fill.cc:
6447 Likewise.
6448 * testsuite/25_algorithms/pstl/alg_modifying_operations/generate.cc:
6449 Likewise.
6450 * testsuite/25_algorithms/pstl/alg_modifying_operations/is_partitioned.cc:
6451 Likewise.
6452 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition.cc:
6453 Likewise.
6454 * testsuite/25_algorithms/pstl/alg_modifying_operations/partition_copy.cc:
6455 Likewise.
6456 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove.cc:
6457 Likewise.
6458 * testsuite/25_algorithms/pstl/alg_modifying_operations/remove_copy.cc:
6459 Likewise.
6460 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace.cc:
6461 Likewise.
6462 * testsuite/25_algorithms/pstl/alg_modifying_operations/replace_copy.cc:
6463 Likewise.
6464 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate.cc:
6465 Likewise.
6466 * testsuite/25_algorithms/pstl/alg_modifying_operations/rotate_copy.cc:
6467 Likewise.
6468 * testsuite/25_algorithms/pstl/alg_modifying_operations/swap_ranges.cc:
6469 Likewise.
6470 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_binary.cc:
6471 Likewise.
6472 * testsuite/25_algorithms/pstl/alg_modifying_operations/transform_unary.cc:
6473 Likewise.
6474 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique.cc:
6475 Likewise.
6476 * testsuite/25_algorithms/pstl/alg_modifying_operations/unique_copy_equal.cc:
6477 Likewise.
6478 * testsuite/25_algorithms/pstl/alg_nonmodifying/adjacent_find.cc:
6479 Likewise.
6480 * testsuite/25_algorithms/pstl/alg_nonmodifying/all_of.cc:
6481 Likewise.
6482 * testsuite/25_algorithms/pstl/alg_nonmodifying/any_of.cc:
6483 Likewise.
6484 * testsuite/25_algorithms/pstl/alg_nonmodifying/count.cc:
6485 Likewise.
6486 * testsuite/25_algorithms/pstl/alg_nonmodifying/equal.cc:
6487 Likewise.
6488 * testsuite/25_algorithms/pstl/alg_nonmodifying/find.cc:
6489 Likewise.
6490 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_end.cc:
6491 Likewise.
6492 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_first_of.cc:
6493 Likewise.
6494 * testsuite/25_algorithms/pstl/alg_nonmodifying/find_if.cc:
6495 Likewise.
6496 * testsuite/25_algorithms/pstl/alg_nonmodifying/for_each.cc:
6497 Likewise.
6498 * testsuite/25_algorithms/pstl/alg_nonmodifying/mismatch.cc:
6499 Likewise.
6500 * testsuite/25_algorithms/pstl/alg_nonmodifying/none_of.cc:
6501 Likewise.
6502 * testsuite/25_algorithms/pstl/alg_nonmodifying/nth_element.cc:
6503 Likewise.
6504 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse.cc:
6505 Likewise.
6506 * testsuite/25_algorithms/pstl/alg_nonmodifying/reverse_copy.cc:
6507 Likewise.
6508 * testsuite/25_algorithms/pstl/alg_nonmodifying/search_n.cc:
6509 Likewise.
6510 * testsuite/25_algorithms/pstl/alg_sorting/includes.cc:
6511 Likewise.
6512 * testsuite/25_algorithms/pstl/alg_sorting/is_heap.cc: Likewise.
6513 * testsuite/25_algorithms/pstl/alg_sorting/is_sorted.cc:
6514 Likewise.
6515 * testsuite/25_algorithms/pstl/alg_sorting/lexicographical_compare.cc:
6516 Likewise.
6517 * testsuite/25_algorithms/pstl/alg_sorting/minmax_element.cc:
6518 Likewise.
6519 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort.cc:
6520 Likewise.
6521 * testsuite/25_algorithms/pstl/alg_sorting/partial_sort_copy.cc:
6522 Likewise.
6523 * testsuite/25_algorithms/pstl/alg_sorting/set.cc: Likewise.
6524 * testsuite/25_algorithms/pstl/alg_sorting/sort.cc: Likewise.
6525 * testsuite/25_algorithms/pstl/feature_test-2.cc: Likewise.
6526 * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
6527 * testsuite/25_algorithms/pstl/feature_test-4.cc: Likewise.
6528 * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
6529 * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
6530 * testsuite/26_numerics/pstl/numeric_ops/adjacent_difference.cc:
6531 Likewise.
6532 * testsuite/26_numerics/pstl/numeric_ops/reduce.cc: Likewise.
6533 * testsuite/26_numerics/pstl/numeric_ops/scan.cc: Likewise.
6534 * testsuite/26_numerics/pstl/numeric_ops/transform_reduce.cc:
6535 Likewise.
6536 * testsuite/26_numerics/pstl/numeric_ops/transform_scan.cc:
6537 Likewise.
6538
65392021-05-10 Jonathan Wakely <jwakely@redhat.com>
6540
6541 * testsuite/20_util/scoped_allocator/69293_neg.cc: Add dg-error
6542 for additional errors in C++20.
6543 * testsuite/20_util/specialized_algorithms/memory_management_tools/destroy_neg.cc:
6544 Likewise.
6545 * testsuite/20_util/uses_allocator/69293_neg.cc: Likewise.
6546 * testsuite/27_io/filesystem/path/io/dr2989.cc: Likewise.
6547
65482021-05-10 Jonathan Wakely <jwakely@redhat.com>
6549
6550 * testsuite/20_util/variant/compile.cc: Rename 'any' to avoid
6551 clash with std::any.
6552
65532021-05-07 Jonathan Wakely <jwakely@redhat.com>
6554
6555 * include/std/istream (__rvalue_stream_extraction_t): Replace
6556 use of __rval_streamable.
6557 * include/std/ostream (__rvalue_stream_insertion_t): Likewise.
6558 (__rval_streamable): Remove.
6559 (_Require_derived_from_ios_base, __derived_from_ios_base): New
6560 helper for checking constraints.
6561 * testsuite/27_io/basic_istream/extractors_other/char/4.cc: Fix
6562 reference to the wrong subclause of the standard.
6563 * testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc:
6564 Likewise.
6565 * testsuite/27_io/basic_ostream/inserters_other/char/6.cc:
6566 Likewise.
6567 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/6.cc:
6568 Likewise.
6569 * testsuite/27_io/basic_ostream/inserters_other/char/99692.cc:
6570 New test.
6571 * testsuite/27_io/filesystem/path/io/dr2989.cc: Adjust pruned
6572 errors.
6573
65742021-05-06 Jonathan Wakely <jwakely@redhat.com>
6575
6576 * include/bits/stl_algobase.h (__copy_move, __copy_move_backward):
6577 Improve static_assert messages.
6578 * testsuite/25_algorithms/copy/58982.cc: Adjust expected output.
6579 * testsuite/25_algorithms/copy_n/58982.cc: Likewise.
6580
65812021-05-06 Patrick Palka <ppalka@redhat.com>
6582
6583 * include/std/ranges (filter_view::_Iterator::base): Make the
6584 const& overload unconstrained and return a const reference as
6585 per LWG 3533. Make unconditionally noexcept.
6586 (transform_view::_Iterator::base): Likewise.
6587 (elements_view::_Iterator::base): Likewise.
6588
65892021-05-06 Patrick Palka <ppalka@redhat.com>
6590
6591 * include/bits/stl_iterator.h (move_iterator::base): Make the
6592 const& overload unconstrained and return a const reference as
6593 per LWG 3391. Make unconditionally noexcept.
6594 (counted_iterator::base): Likewise.
6595 * testsuite/24_iterators/move_iterator/lwg3391.cc: New test.
6596 * testsuite/24_iterators/move_iterator/move_only.cc: Adjust
6597 has_member_base concept to decay-copy the result of base().
6598
65992021-05-06 Jonathan Wakely <jwakely@redhat.com>
6600
6601 * include/std/type_traits (remove_cvref_t): Define in terms of
6602 remove_cvref.
6603 * testsuite/20_util/remove_cvref/value.cc: Check alias.
6604
66052021-05-06 Jonathan Wakely <jwakely@redhat.com>
6606
6607 Revert:
6608 2021-05-05 Jonathan Wakely <jwakely@redhat.com>
6609
6610 * include/std/charconv (__from_chars_alnum): Pass unsigned
6611 char to std::isdigit.
6612
66132021-05-05 Patrick Palka <ppalka@redhat.com>
6614
6615 * include/bits/ranges_util.h (enable_borrowed_range<subrange>):
6616 Remove constraints on this partial specialization.
6617 * include/std/ranges (enable_borrowed_range<iota_view>):
6618 Likewise.
6619
66202021-05-05 Patrick Palka <ppalka@redhat.com>
6621
6622 * include/std/ranges (transform_view::_Iterator::iter_swap):
6623 Remove as per LWG 3520.
6624 (join_view::_Iterator::iter_swap): Add indirectly_swappable
6625 constraint as per LWG 3517.
6626
66272021-05-05 Jonathan Wakely <jwakely@redhat.com>
6628
6629 * testsuite/20_util/function_objects/invoke/3.cc: Check feature
6630 test macro.
6631 * testsuite/20_util/function_objects/invoke/version.cc: New test.
6632
66332021-05-05 Jonathan Wakely <jwakely@redhat.com>
6634
6635 * include/std/charconv (__from_chars_alnum): Pass unsigned
6636 char to std::isdigit.
6637
66382021-05-05 Corentin Gay <gay@adacore.com>
6639
6640 * acinclude.m4: Add VxWorks-specific case for the
6641 configuration of ctypes.
6642 * configure: Regenerate.
6643 * config/locale/vxworks/ctype_members.cc: Add VxWorks-specific
6644 version.
6645 * config/os/vxworks/ctype_base.h: Adjust for VxWorks7+.
6646 * config/os/vxworks/ctype_configure_char.cc: Likewise.
6647 * config/os/vxworks/ctype_inline.h: Likewise.
6648 * testsuite/28_regex/traits/char/isctype.cc: Defines
6649 NEWLINE_IN_CLASS_BLANK if the target is VxWorks.
6650 * testsuite/28_regex/traits/wchar_t/isctype.cc: Likewise.
6651
66522021-05-04 Jonathan Wakely <jwakely@redhat.com>
6653
6654 * include/std/future (promise::set_value): Check for existence
6655 of shared state before dereferncing it.
6656 (promise::set_exception, promise::set_value_at_thread_exit)
6657 (promise::set_exception_at_thread_exit): Likewise.
6658 (promise<R&>::set_value, promise<R&>::set_exception)
6659 (promise<R&>::set_value_at_thread_exit)
6660 (promise<R&>::set_exception_at_thread_exit): Likewise.
6661 (promise<void>::set_value, promise<void>::set_exception)
6662 (promise<void>::set_value_at_thread_exit)
6663 (promise<void>::set_exception_at_thread_exit): Likewise.
6664 * testsuite/30_threads/promise/members/at_thread_exit2.cc:
6665 Remove unused variable.
6666
66672021-05-04 Jonathan Wakely <jwakely@redhat.com>
6668
6669 * include/bits/basic_string.h (basic_string(const CharT*, const A&)):
6670 Do not do arithmetic on null pointer.
6671
66722021-05-04 Jonathan Wakely <jwakely@redhat.com>
6673
6674 * include/ext/pb_ds/detail/cc_hash_table_map_/cc_ht_map_.hpp
6675 (find_key_pointer(key_const_reference, false_type))
6676 (find_key_pointer(key_const_reference, true_type)): Do not
6677 dereference null pointer.
6678
66792021-05-04 Jonathan Wakely <jwakely@redhat.com>
6680
6681 * testsuite/20_util/from_chars/3.cc: Use unsigned type to avoid
6682 overflow.
6683 * testsuite/24_iterators/reverse_iterator/2.cc: Do not add
6684 non-zero value to null pointer.
6685 * testsuite/25_algorithms/copy_backward/move_iterators/69478.cc:
6686 Use past-the-end iterator for result.
6687 * testsuite/25_algorithms/move_backward/69478.cc: Likewise.
6688 * testsuite/25_algorithms/move_backward/93872.cc: Likewise.
6689
66902021-05-04 Jonathan Wakely <jwakely@redhat.com>
6691
6692 PR libstdc++/100384
6693 * include/std/variant (__get_t): New alias template yielding the
6694 return type of std::get<N> on a variant.
6695 (__visit_result_t): New alias template yielding the result of
6696 std::visit.
6697 (__same_types): Move into namespace __detail::__variant.
6698 (__check_visitor_results): Likewise. Use __invoke_result_t and
6699 __get_t.
6700 (__check_visitor_result): Remove.
6701 (visit): Use __visit_result_t for return type.
6702 * testsuite/20_util/variant/100384.cc: New test.
6703
67042021-05-04 Jonathan Wakely <jwakely@redhat.com>
6705
6706 * acinclude.m4 (GLIBCXX_ENABLE_INT128_FLOAT128): Remove
6707 checks for __int128 and rename to GLIBCXX_ENABLE_FLOAT128.
6708 * config.h.in: Regenerate.
6709 * configure: Regenerate.
6710 * configure.ac: Adjust to use GLIBCXX_ENABLE_FLOAT128.
6711 * include/bits/random.h (_Select_uint_least_t<s, 1>):
6712 Use __SIZEOF_INT128__ to decide whether to use __int128.
6713 * include/std/charconv (__to_chars_unsigned_type): Likewise.
6714
67152021-05-03 Gerald Pfeifer <gerald@pfeifer.com>
6716
6717 * doc/xml/manual/ctype.xml: Move unix.org reference to https.
6718 * doc/html/manual/facets.html: Regenerate.
6719
67202021-04-30 Patrick Palka <ppalka@redhat.com>
6721
6722 * include/std/ranges (__detail::__non_propating_cache): Define
6723 as per P2328.
6724 (join_view): Remove constraints on the value and reference types
6725 of the wrapped iterator type as per P2328.
6726 (join_view::_Iterator::_M_satisfy): Adjust as per P2328.
6727 (join_view::_Iterator::operator++): Likewise.
6728 (join_view::_M_inner): Use __non_propating_cache as per P2328.
6729 Remove now-redundant use of __maybe_present_t.
6730 * testsuite/std/ranges/adaptors/join.cc: Include <array>.
6731 (test10): New test.
6732
67332021-04-30 Jonathan Wakely <jwakely@redhat.com>
6734
6735 * include/bits/basic_string.h (__cpp_lib_constexpr_string):
6736 Only define for C++17 and later.
6737 * include/std/version (__cpp_lib_semaphore): Fix condition
6738 to match the one in <semaphore>.
6739
67402021-04-30 Jonathan Wakely <jwakely@redhat.com>
6741
6742 * acinclude.m4 (GLIBCXX_CHECK_INT64_T): Delete.
6743 * config.h.in: Regenerate.
6744 * configure: Regenerate.
6745 * configure.ac: Do not use GLIBCXX_CHECK_INT64_T.
6746 * include/bits/postypes.h: Remove include of <stdint.h> and
6747 definition/undefinition of the __STDC_LIMIT_MACROS and
6748 __STDC_CONSTANT_MACROS macros.
6749 (streamoff): Use __INT64_TYPE__ if defined.
6750
67512021-04-30 Patrick Palka <ppalka@redhat.com>
6752
6753 * include/std/ranges (split_view::_InnerIter::operator++):
6754 Depend on _Base instead of _Vp directly, as per LWG 3532.
6755
67562021-04-30 Patrick Palka <ppalka@redhat.com>
6757
6758 * include/bits/ranges_util.h (subrange::subrange): Avoid
6759 list-initialization in delegating constructor.
6760 * include/std/ranges (single_view): Replace implicit guide
6761 with explicit deduction guide that decays its argument.
6762 (_Single::operator()): Avoid CTAD when constructing the
6763 single_view object.
6764 (_Iota::operator()): Avoid list-initialization.
6765 (__detail::__can_filter_view, _Filter::operator()): Likewise.
6766 (__detail::__can_transform_view, _Transform::operator()): Likewise.
6767 (take_view::begin): Likewise.
6768 (__detail::__can_take_view, _Take::operator()): Likewise.
6769 (__detail::__can_take_while_view, _TakeWhile::operator()): Likewise.
6770 (__detail::__can_drop_view, _Drop::operator()): Likewise.
6771 (__detail::__can_drop_while_view, _DropWhile::operator()): Likewise.
6772 (split_view::split_view): Use views::single when initializing
6773 _M_pattern.
6774 (__detail::__can_split_view, _Split::operator()): Avoid
6775 list-initialization.
6776 (_Counted::operator()): Likewise.
6777 * testsuite/std/ranges/p2367.cc: New test.
6778
67792021-04-30 Jonathan Wakely <jwakely@redhat.com>
6780
6781 PR libstdc++/60497
6782 * include/bits/basic_ios.tcc (basic_ios::copyfmt): use
6783 std::addressof.
6784 * include/bits/basic_string.tcc (basic_string::swap)
6785 (basic_string::assign): Likewise.
6786 * include/bits/deque.tcc (deque::operator=(const deque&)):
6787 Likewise.
6788 * include/bits/stl_tree.h (_Rb_tree::operator=(const * _Rb_tree&)):
6789 Likewise.
6790 * include/bits/vector.tcc (vector::operator=(const vector&)):
6791 Likewise.
6792
67932021-04-30 Jonathan Wakely <jwakely@redhat.com>
6794
6795 * include/std/istream (operator>>(Istream&&, x&)): Simplify, as
6796 per LWG 1203.
6797 * include/std/ostream (operator<<(Ostream&&, const x&)):
6798 Likewise.
6799 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
6800 Adjust dg-error pattern.
6801 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
6802 Likewise.
6803 * testsuite/27_io/basic_istream/extractors_other/char/4.cc: Define
6804 is_extractable trait to replace std::__is_extractable. Make it
6805 work with rvalue streams as well as lvalues, to replace f() and
6806 g() helper functions.
6807 * testsuite/27_io/basic_istream/extractors_other/wchar_t/4.cc:
6808 Likewise.
6809 * testsuite/27_io/basic_ostream/inserters_other/char/6.cc:
6810 Define is_insertable trait to replace std::__is_insertable. Make
6811 it work with rvalue streams as well as lvalues, to replace f()
6812 and g() helper functions.
6813 * testsuite/27_io/basic_ostream/inserters_other/wchar_t/6.cc:
6814 Likewise.
6815 * testsuite/27_io/filesystem/path/io/dr2989.cc: Prune additional
6816 errors from new constraints.
6817 * testsuite/27_io/rvalue_streams-2.cc: Remove PR 80675 checks,
6818 which are no longer expected to compile.
6819 * testsuite/27_io/rvalue_streams.cc: Adjust existing test.
6820 Verify LWG 1203 changes.
6821
68222021-04-30 Jonathan Wakely <jwakely@redhat.com>
6823
6824 PR libstdc++/100285
6825 * include/experimental/socket (__basic_socket_impl::set_option)
6826 (__basic_socket_impl::get_option) [!_GLIBCXX_HAVE_SYS_SOCKET_H]:
6827 Just set error code.
6828 * testsuite/experimental/net/socket/socket_base.cc: CHeck
6829 for <sys/socket.h> not <socket.h>.
6830
68312021-04-30 Jonathan Wakely <jwakely@redhat.com>
6832
6833 PR libstdc++/100180
6834 PR libstdc++/100286
6835 PR libstdc++/100351
6836 * testsuite/experimental/net/internet/address/v4/comparisons.cc:
6837 Use new effective-target keyword.
6838 * testsuite/experimental/net/internet/address/v4/cons.cc:
6839 Likewise.
6840 * testsuite/experimental/net/internet/address/v4/creation.cc:
6841 Likewise.
6842 * testsuite/experimental/net/internet/address/v4/members.cc:
6843 Likewise.
6844 * testsuite/experimental/net/internet/address/v6/members.cc:
6845 Likewise.
6846 * testsuite/experimental/net/internet/resolver/base.cc:
6847 Likewise.
6848 * testsuite/experimental/net/internet/resolver/ops/lookup.cc:
6849 Likewise.
6850 * testsuite/experimental/net/internet/resolver/ops/reverse.cc:
6851 Likewise.
6852 * testsuite/experimental/net/internet/socket/opt.cc:
6853 Likewise.
6854 * testsuite/experimental/net/internet/tcp.cc:
6855 Likewise.
6856 * testsuite/experimental/net/internet/udp.cc:
6857 Likewise.
6858 * testsuite/lib/libstdc++.exp (check_effective_target_net_ts_ip):
6859 New proc to check net_ts_ip et.
6860
68612021-04-28 Jonathan Wakely <jwakely@redhat.com>
6862
6863 PR libstdc++/97930
6864 * testsuite/20_util/pair/requirements/structural.cc: New test.
6865
68662021-04-28 Jonathan Wakely <jwakely@redhat.com>
6867
6868 * include/bits/stl_pair.h (pair) [__cplusplus > 202002]: Add
6869 new definitions for constructors and assignment operators using
6870 concepts for constraints.
6871 * testsuite/20_util/pair/cons/99957.cc: Disable for C++20 and
6872 later.
6873 * testsuite/20_util/pair/cons/explicit_construct.cc: Adjust
6874 expected error messages to also match C++20 errors.
6875
68762021-04-28 Jonathan Wakely <jwakely@redhat.com>
6877
6878 PR libstdc++/99957
6879 * include/bits/stl_pair.h (_PCC::_MoveCopyPair, _PCC::_CopyMovePair):
6880 Combine and replace with ...
6881 (_PCC::_DeprConsPair): New SFINAE helper function.
6882 (pair): Merge preprocessor blocks so that all C++03 members
6883 are defined together at the end.
6884 (pair::pair(const _T1&, _U2&&), pair::pair(_U1&&, const _T2&)):
6885 Replace _T1 and _T2 parameters with __null_ptr_constant and
6886 adjust constraints.
6887 * testsuite/20_util/pair/40925.cc: Use nullptr instead of 0.
6888 * testsuite/20_util/pair/cons/explicit_construct.cc: Likewise.
6889 * testsuite/20_util/pair/cons/99957.cc: New test.
6890
68912021-04-28 Jonathan Wakely <jwakely@redhat.com>
6892
6893 * include/bits/basic_string.h (__cpp_lib_constexpr_string): Define.
6894 * include/std/version (__cpp_lib_constexpr_string): Define.
6895 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
6896 Check for __cpp_lib_constexpr_string.
6897 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
6898 Likewise.
6899 * testsuite/21_strings/char_traits/requirements/version.cc: New test.
6900
69012021-04-28 Jonathan Wakely <jwakely@redhat.com>
6902
6903 * doc/Makefile.am (stamp-pdf-doxygen): Improve comment about
6904 dealing with errors. Use '@' to prevent shell command being
6905 echoed.
6906 * doc/Makefile.in: Regenerate.
6907
69082021-04-28 Jonathan Wakely <jwakely@redhat.com>
6909
6910 PR libstdc++/100298
6911 * include/bits/std_thread.h (thread::hardware_concurrency): Add
6912 missing noexcept to inline definition for non-gthreads targets.
6913
69142021-04-28 Patrick Palka <ppalka@redhat.com>
6915
6916 PR libstdc++/100187
6917 PR libstdc++/100237
6918 PR libstdc++/100249
6919 PR libstdc++/100287
6920 * include/bits/ranges_algo.h (__search_n_fn::operator()): Give
6921 the __value_comp lambda an explicit bool return type.
6922 (__is_permutation_fn::operator()): Give the __proj_scan local
6923 variable auto&& return type. Give the __comp_scan lambda an
6924 explicit bool return type.
6925 (__remove_fn::operator()): Give the __pred lambda an explicit
6926 bool return type.
6927 (__partition_fn::operator()): Don't std::move __first twice
6928 when returning an empty subrange.
6929 (__min_fn::operator()): Don't std::move __comp.
6930 (__max_fn::operator()): Likewise.
6931 (__minmax_fn::operator()): Likewise.
6932
69332021-04-27 Patrick Palka <ppalka@redhat.com>
6934
6935 PR libstdc++/100290
6936 * include/std/ranges (join_view::_Iterator::operator++): Correct
6937 the return type of the lambda to avoid returning a copy of
6938 _M_parent->_M_inner.
6939 * testsuite/std/ranges/adaptors/join.cc (test10): New test.
6940
69412021-04-27 Jakub Jelinek <jakub@redhat.com>
6942
6943 Revert:
6944 2021-04-22 Jakub Jelinek <jakub@redhat.com>
6945
6946 PR target/100182
6947 * testsuite/29_atomics/atomic_float/1.cc: Add dg-xfail-run-if for
6948 ia32.
6949 * testsuite/29_atomics/atomic_float/wait_notify.cc: Add dg-skip-if for
6950 ia32.
6951
69522021-04-27 Jonathan Wakely <jwakely@redhat.com>
6953
6954 * include/experimental/internet (address_v6::bytes_type): Adjust
6955 formatting.
6956 (basic_endpoint): Define _M_is_v6() to put all checks for
6957 AF_INET6 in one place.
6958 (basic_endpoint::resize): Simplify.
6959 (operator==(const tcp&, const tcp&)): Add constexpr and noexcept.
6960 (operator!=(const tcp&, const tcp&)): Likewise.
6961 (operator==(const udp&, const udp&)): Likewise.
6962 (operator!=(const udp&, const udp&)): Likewise.
6963 * testsuite/experimental/net/internet/tcp.cc: New test.
6964 * testsuite/experimental/net/internet/udp.cc: New test.
6965
69662021-04-27 Jonathan Wakely <jwakely@redhat.com>
6967
6968 PR libstdc++/100286
6969 * include/experimental/internet (resolver_errc, resolver_category())
6970 (make_error_code, make_error_condition): Define unconditionally,
6971 only make enumerators and use of gai_strerror depend on the
6972 availability of <netdb.h>.
6973 (address_v4::to_string): Use correct constant for string length.
6974 (address_v4::to_string, address_v6::to_string): Define
6975 unconditionally, throw if unsupported.
6976 (make_address_v4, make_address_v6): Define unconditionally.
6977 Return an error if unsupported.
6978 (tcp, udp, v6_only, unicast::hops, multicast::*): Define
6979 conditionally,
6980 * testsuite/experimental/net/internet/socket/opt.cc: Check for
6981 <netinet/in.h> and <netinet/tcp.h> before using types from
6982 namespace net::ip.
6983
69842021-04-27 Jonathan Wakely <jwakely@redhat.com>
6985
6986 PR libstdc++/100285
6987 * include/experimental/internet (resolver_base::flags):
6988 Define overloaded operators as hidden friends.
6989 * include/experimental/socket (socket_base::message_flags):
6990 Likewise.
6991
69922021-04-26 Jonathan Wakely <jwakely@redhat.com>
6993
6994 * include/experimental/internet (tcp::no_delay, v6_only)
6995 (unicast::hops, multicast::hops, multicast::enable_loopback):
6996 Change access of base class and static data members. Add
6997 using-declaration for __socket_crtp::operator=(_Tp).
6998 (multicast::__mcastopt): New type.
6999 (multicast::join_group, multicast::leave_group): Derive from
7000 __mcastopt for common implementation.
7001 * include/experimental/socket: Add comment.
7002 * testsuite/experimental/net/internet/socket/opt.cc: New test.
7003 * testsuite/experimental/net/socket/socket_base.cc: Check for
7004 protected constructor/destructor of socket_base. Check for
7005 explicit constructors of socket option classes.
7006
70072021-04-26 Jonathan Wakely <jwakely@redhat.com>
7008
7009 * include/experimental/bits/net.h (__socket_base): Add
7010 bool template parameter to allow BooleanSocketOption and
7011 IntegerSocketOption to have different __socket_base<int>
7012 base classes.
7013 (__socket_base<bool>): Adjust base class.
7014 (__socket_base<int>): Add partial specialization.
7015 (__socket_crtp::operator=(_Tp)): Add noexcept-specifier.
7016 * include/experimental/socket (socket_base::broadcast)
7017 (socket_base::debug, socket_base::do_not_route)
7018 (socket_base::keep_alive, socket_base::linger)
7019 (socket_base::out_of_band_inline)
7020 (socket_base::receive_buffer_size)
7021 (socket_base::receive_low_watermark)
7022 (socket_base::reuse_address, socket_base::send_buffer_size)
7023 (socket_base::send_low_watermark): Add using-declaration for
7024 __socket_crtp::operator=(_Tp).
7025 * testsuite/experimental/net/socket/socket_base.cc: Check
7026 properties of socket option types.
7027
70282021-04-26 Jonathan Wakely <jwakely@redhat.com>
7029
7030 * include/experimental/internet (resolver_base::flags): Remove
7031 enumerators. Initialize constants directly with desired values.
7032 Make all operators constexpr and noexcept.
7033 * testsuite/experimental/net/internet/resolver/base.cc: Use
7034 __gnu_test::test_bitmask_values for bitmask type. Check
7035 construction and destruction is protected.
7036
70372021-04-26 Jonathan Wakely <jwakely@redhat.com>
7038
7039 * include/bits/semaphore_base.h: Include <exception> and <errno.h>.
7040
70412021-04-26 Jonathan Wakely <jwakely@redhat.com>
7042
7043 PR libstdc++/100259
7044 * include/experimental/internet (net::ip::make_error_code)
7045 (net::ip::make_error_condition, net::ip::make_network_v4)
7046 (net::ip::operator==(const udp&, const udp&)): Add 'inline'.
7047
70482021-04-24 David Edelsohn <dje.gcc@gmail.com>
7049
7050 * testsuite/lib/dg-options.exp (atomic_link_flags): New.
7051 (add_options_for_libatomic): Use atomic_link_flags.
7052
70532021-04-23 Jonathan Wakely <jwakely@redhat.com>
7054
7055 PR libstdc++/100180
7056 * include/experimental/io_context (io_context): Define
7057 dummy_pollfd type so that most member functions still compile
7058 without <poll.h> and struct pollfd.
7059
70602021-04-23 Jonathan Wakely <jwakely@redhat.com>
7061
7062 * include/experimental/io_context (io_context::async_wait): Add
7063 comment.
7064 * include/experimental/socket (basic_socket::async_connect):
7065 Cast wait_type constant to int.
7066 (basic_datagram_socket::async_receive): Likewise.
7067 (basic_datagram_socket::async_receive_from): Likewise.
7068 (basic_datagram_socket::async_send): Likewise.
7069 (basic_datagram_socket::async_send_to): Likewise.
7070 (basic_stream_socket::async_receive): Likewise.
7071 (basic_stream_socket::async_send): Likewise. Use io_context
7072 parameter directly, instead of via an executor.
7073 (basic_socket_acceptor::async_accept): Likewise.
7074
70752021-04-23 Jonathan Wakely <jwakely@redhat.com>
7076
7077 * include/experimental/socket (socket_base::shutdown_type):
7078 (socket_base::wait_type, socket_base::message_flags):
7079 Remove enumerators. Initialize constants directly with desired
7080 values.
7081 (socket_base::message_flags): Make all operators constexpr and
7082 noexcept.
7083 * testsuite/util/testsuite_common_types.h (test_bitmask_values):
7084 New test utility.
7085 * testsuite/experimental/net/socket/socket_base.cc: New test.
7086
70872021-04-22 David Edelsohn <dje.gcc@gmail.com>
7088
7089 * config/os/aix/atomicity.h: Delete.
7090
70912021-04-22 Jonathan Wakely <jwakely@redhat.com>
7092
7093 * include/bits/atomic_timed_wait.h (__cond_wait_until_impl):
7094 Handle system_clock as well as steady_clock.
7095 * testsuite/30_threads/semaphore/try_acquire_for.cc: Re-enable.
7096 * testsuite/30_threads/semaphore/try_acquire_until.cc:
7097 Re-enable.
7098
70992021-04-22 Jonathan Wakely <jwakely@redhat.com>
7100
7101 * testsuite/30_threads/semaphore/try_acquire_posix.cc: Add
7102 options for libatomic.
7103
71042021-04-22 Jonathan Wakely <jwakely@redhat.com>
7105
7106 * config/os/gnu-linux/os_defines.h: Fix type in comment.
7107
71082021-04-22 Jonathan Wakely <jwakely@redhat.com>
7109
7110 PR libstdc++/99006
7111 * include/bits/shared_ptr.h (allocate_shared): Assert that _Tp
7112 is not an array type.
7113 * include/bits/shared_ptr_base.h (__allocate_shared): Likewise.
7114 * testsuite/20_util/shared_ptr/creation/99006.cc: New test.
7115
71162021-04-22 Thomas Rodgers <rodgert@twrodgers.com>
7117
7118 * include/bits/atomic_wait.h: Always notify waiters in the
7119 case of 'bare' address notification.
7120
71212021-04-22 Jakub Jelinek <jakub@redhat.com>
7122
7123 PR target/100182
7124 * testsuite/29_atomics/atomic_float/1.cc: Add dg-xfail-run-if for
7125 ia32.
7126 * testsuite/29_atomics/atomic_float/wait_notify.cc: Add dg-skip-if for
7127 ia32.
7128
71292021-04-22 Jonathan Wakely <jwakely@redhat.com>
7130
7131 PR libstdc++/100179
7132 * include/bits/semaphore_base.h: Remove #error.
7133 * include/std/semaphore: Do not define anything unless one of
7134 the implementations is available.
7135
71362021-04-21 Thomas Rodgers <rodgert@twrodgers.com>
7137
7138 * include/bits/semaphore_base.h: Always reload __old in
7139 __atomic_semaphore::_S_do_try_acquire().
7140 * testsuite/30_threads/stop_token/stop_callback/destroy.cc:
7141 re-enable testcase.
7142
71432021-04-21 Philippe Blain <levraiphilippeblain@gmail.com>
7144 Jonathan Wakely <jwakely@redhat.com>
7145
7146 PR libstdc++/99453
7147 * python/Makefile.am: Install libstdc++*-gdb.py more robustly.
7148 * python/Makefile.in: Regenerate.
7149
71502021-04-21 Thomas Rodgers <rodgert@twrodgers.com>
7151
7152 * include/bits/semaphore_base.h: Add missing _M_try_acquire()
7153 member to __platform_wait.
7154
71552021-04-21 Jonathan Wakely <jwakely@redhat.com>
7156
7157 * include/std/latch: Replace tab characters in license text.
7158 * include/std/semaphore: Likewise.
7159
71602021-04-21 Jakub Jelinek <jakub@redhat.com>
7161
7162 PR libstdc++/100164
7163 * acinclude.m4: For POSIX semaphores AC_DEFINE HAVE_POSIX_SEMAPHORE
7164 rather than _GLIBCXX_HAVE_POSIX_SEMAPHORE.
7165 * configure: Regenerated.
7166 * config.h.in: Regenerated.
7167
71682021-04-20 Jonathan Wakely <jwakely@redhat.com>
7169
7170 * testsuite/30_threads/semaphore/try_acquire_for.cc: Disable
7171 test for targets not using futexes for semaphores.
7172 * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
7173 * testsuite/30_threads/stop_token/stop_callback/destroy.cc:
7174 Disable for all targets.
7175
71762021-04-20 Thomas Rodgers <trodgers@redhat.com>
7177
7178 * include/Makefile.am: Add new <bits/this_thread_sleep.h> header.
7179 * include/Makefile.in: Regenerate.
7180 * include/bits/this_thread_sleep.h: New file.
7181 * include/bits/atomic_base.h: Adjust all calls
7182 to __atomic_wait/__atomic_notify for new call signatures.
7183 * include/bits/atomic_timed_wait.h: Extensive rewrite.
7184 * include/bits/atomic_wait.h: Likewise.
7185 * include/bits/semaphore_base.h: Adjust all calls
7186 to __atomic_wait/__atomic_notify for new call signatures.
7187 * include/std/atomic: Likewise.
7188 * include/std/barrier: Likewise.
7189 * include/std/latch: Likewise.
7190 * include/std/semaphore: Likewise.
7191 * include/std/thread (this_thread::sleep_for)
7192 (this_thread::sleep_until): Move to new header.
7193 * testsuite/29_atomics/atomic/wait_notify/bool.cc: Simplify
7194 test.
7195 * testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
7196 * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
7197 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
7198 * testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
7199 * testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
7200 * testsuite/29_atomics/atomic_ref/wait_notify.cc: Likewise.
7201
72022021-04-20 Patrick Palka <ppalka@redhat.com>
7203
7204 PR libstdc++/95983
7205 * include/bits/stl_iterator.h (__detail::__move_iter_cat):
7206 Define.
7207 (move_iterator): Derive from the above in C++20 in order to
7208 conditionally define iterator_category as per P2259.
7209 (move_iterator::__base_cat): No longer used, so remove.
7210 (move_iterator::iterator_category): Remove in C++20.
7211 (__detail::__common_iter_use_postfix_proxy): Define.
7212 (common_iterator::_Proxy): Rename to ...
7213 (common_iterator:__arrow_proxy): ... this.
7214 (common_iterator::__postfix_proxy): Define as per P2259.
7215 (common_iterator::operator->): Adjust.
7216 (common_iterator::operator++): Adjust as per P2259.
7217 (iterator_traits<common_iterator>::_S_iter_cat): Define.
7218 (iterator_traits<common_iterator>::iterator_category): Change as
7219 per P2259.
7220 (__detail::__counted_iter_value_type): Define.
7221 (__detail::__counted_iter_concept): Define.
7222 (__detail::__counted_iter_cat): Define.
7223 (counted_iterator): Derive from the above three classes in order
7224 to conditionally define value_type, iterator_concept and
7225 iterator category respectively as per P2259.
7226 (counted_iterator::operator->): Define as per P2259.
7227 (incrementable_traits<counted_iterator>): Remove as per P2259.
7228 (iterator_traits<counted_iterator>): Adjust as per P2259.
7229 * include/std/ranges (__detail::__iota_view_iter_cat): Define.
7230 (iota_view::_Iterator): Derive from the above in order to
7231 conditionally define iterator_category as per P2259.
7232 (iota_view::_S_iter_cat): Rename to ...
7233 (iota_view::_S_iter_concept): ... this.
7234 (iota_view::iterator_concept): Use it to apply LWG 3291 changes.
7235 (iota_view::iterator_category): Remove.
7236 (__detail::__filter_view_iter_cat): Define.
7237 (filter_view::_Iterator): Derive from the above in order to
7238 conditionally define iterator_category as per P2259.
7239 (filter_view::_Iterator): Move to struct __filter_view_iter_cat.
7240 (filter_view::_Iterator::iterator_category): Remove.
7241 (transform_view::_Base): Define.
7242 (transform_view::__iter_cat): Define.
7243 (transform_view::_Iterator): Derive from the above in order to
7244 conditionally define iterator_category as per P2259.
7245 (transform_view::_Iterator::_Base): Just alias
7246 transform_view::_Base.
7247 (transform_view::_Iterator::_S_iter_cat): Move to struct
7248 transform_view::__iter_cat.
7249 (transform_view::_Iterator::iterator_category): Remove.
7250 (transform_view::_Sentinel::_Base): Just alias
7251 transform_view::_Base.
7252 (join_view::_Base): Define.
7253 (join_view::_Outer_iter): Define.
7254 (join_view::_Inner_iter): Define.
7255 (join_view::_S_ref_is_glvalue): Define.
7256 (join_view::__iter_cat): Define.
7257 (join_view::_Iterator): Derive from it in order to conditionally
7258 define iterator_category as per P2259.
7259 (join_view::_Iterator::_Base): Just alias join_view::_Base.
7260 (join_view::_Iterator::_S_ref_is_glvalue): Just alias
7261 join_view::_S_ref_is_glvalue.
7262 (join_view::_Iterator::_S_iter_cat): Move to struct
7263 transform_view::__iter_cat.
7264 (join_view::_Iterator::_Outer_iter): Just alias
7265 join_view::_Outer_iter.
7266 (join_view::_Iterator::_Inner_iter): Just alias
7267 join_view::_Inner_iter.
7268 (join_view::_Iterator::iterator_category): Remove.
7269 (join_view::_Sentinel::_Base): Just alias join_view::_Base.
7270 (__detail::__split_view_outer_iter_cat): Define.
7271 (__detail::__split_view_inner_iter_cat): Define.
7272 (split_view::_Base): Define.
7273 (split_view::_Outer_iter): Derive from __split_view_outer_iter_cat
7274 in order to conditionally define iterator_category as per P2259.
7275 (split_view::_Outer_iter::iterator_category): Remove.
7276 (split_view::_Inner_iter): Derive from __split_view_inner_iter_cat
7277 in order to conditionally define iterator_category as per P2259.
7278 (split_view::_Inner_iter::_S_iter_cat): Move to
7279 __split_view_inner_iter_cat.
7280 (split_view::_Inner_iter::iterator_category): Remove.
7281 (elements_view::_Base): Define.
7282 (elements_view::__iter_cat): Define.
7283 (elements_view::_Iterator): Derive from the above in order to
7284 conditionall define iterator_category as per P2259.
7285 (elements_view::_Iterator::_Base): Just alias
7286 elements_view::_Base.
7287 (elements_view::_Iterator::_S_iter_concept)
7288 (elements_view::_Iterator::iterator_concept): Define as per
7289 P2259.
7290 (elements_view::_Iterator::iterator_category): Remove.
7291 (elements_view::_Sentinel::_Base): Just alias
7292 elements_view::_Base.
7293 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc:
7294 Adjust constraints on iterator_traits<counted_iterator>.
7295 * testsuite/std/ranges/p2259.cc: New test.
7296
72972021-04-20 Jonathan Wakely <jwakely@redhat.com>
7298
7299 PR libstdc++/100146
7300 * include/std/charconv (__cpp_lib_to_chars): Define
7301 conditionally.
7302 * include/std/version (__cpp_lib_to_chars): Likewise..
7303 * testsuite/20_util/from_chars/4.cc: Only check feature test
7304 macro, not _GLIBCXX_HAVE_USELOCALE.
7305 * testsuite/20_util/from_chars/5.cc: Likewise.
7306 * testsuite/20_util/from_chars/6.cc: Likewise.
7307 * testsuite/20_util/to_chars/long_double.cc: Likewise.
7308
73092021-04-20 Jakub Jelinek <jakub@redhat.com>
7310
7311 * testsuite/util/testsuite_abi.cc (compare_symbols): If any symbol
7312 versions with _IEEE128_ substring are found, set ieee_version_found
7313 to true. Ignore missing symbols with _IEEE128_ in version name if
7314 !ieee_version_found. Use i->first as version_name instead of
7315 i->second.version_name if the latter is empty.
7316 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
7317
73182021-04-19 H.J. Lu <hjl.tools@gmail.com>
7319
7320 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt:
7321 Updated.
7322
73232021-04-17 Jakub Jelinek <jakub@redhat.com>
7324
7325 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt: Update.
7326 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt: Update.
7327
73282021-04-17 Jakub Jelinek <jakub@redhat.com>
7329
7330 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
7331 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
7332 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
7333 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
7334 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
7335 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
7336
73372021-04-15 Jonathan Wakely <jwakely@redhat.com>
7338
7339 * testsuite/lib/dg-options.exp (add_options_for_libatomic): Also
7340 add libatomic options for 32-bit sparc*-*-linux-gnu.
7341
73422021-04-15 Jonathan Wakely <jwakely@redhat.com>
7343
7344 PR libstdc++/96657
7345 * libsupc++/Makefile.am: Add atomicity.cc here.
7346 * src/c++98/Makefile.am: Remove it from here.
7347 * libsupc++/Makefile.in: Regenerate.
7348 * src/c++98/Makefile.in: Regenerate.
7349 * testsuite/18_support/exception_ptr/96657.cc: New test.
7350
73512021-04-13 Jonathan Wakely <jwakely@redhat.com>
7352
7353 PR libstdc++/100060
7354 * include/std/bit: Only include <ext/numeric_traits.h> for
7355 hosted build, use <limits> otherwise.
7356
73572021-04-13 Jonathan Wakely <jwakely@redhat.com>
7358
7359 * doc/xml/manual/backwards_compatibility.xml: Remove porting
7360 notes for libg++ and libstdc++-v2, and bibliography.
7361 * doc/html/*: Regenerated.
7362
73632021-04-12 Jonathan Wakely <jwakely@redhat.com>
7364
7365 PR libstdc++/100044
7366 * include/bits/ranges_util.h (__detail::__iterator_sentinel_pair):
7367 Remove helper concept.
7368 (subrange(_Pr), subrange(Pr, __make_unsigned_like<...>)): Remove
7369 deduction guides, as per LWG 3404.
7370 * testsuite/std/ranges/subrange/lwg3282_neg.cc: Check that class
7371 template argument deduction fails.
7372
73732021-04-12 Jonathan Wakely <jwakely@redhat.com>
7374
7375 * testsuite/26_numerics/random/linear_congruential_engine/requirements/non_uint_neg.cc:
7376 Adjust expected error for C++20 mode.
7377 * testsuite/tr1/5_numerical_facilities/random/linear_congruential/requirements/non_uint_neg.cc:
7378 Likewise.
7379
73802021-04-12 Jonathan Wakely <jwakely@redhat.com>
7381
7382 PR libstdc++/99995
7383 * testsuite/17_intro/headers/c++1998/49745.cc: Include all
7384 standard headers and XFAIL for effective-target c++20.
7385
73862021-04-09 François Dumont <fdumont@gcc.gnu.org>
7387
7388 PR libstdc++/99402
7389 * include/debug/helper_functions.h (__can_advance(_InputIterator,
7390 const std::pair<_Diff, _Distance_precision>&, int)): New.
7391 (__can_advance(const _Safe_iterator<>&,
7392 const std::pair<_Diff, _Distance_precision>&, int)): New.
7393 * include/debug/macros.h (__glibcxx_check_can_increment_dist): New,
7394 use latter.
7395 (__glibcxx_check_can_increment_range): Adapt to use latter.
7396 (__glibcxx_check_can_decrement_range): Likewise.
7397 * include/debug/safe_iterator.h
7398 (_Safe_iterator<>::_M_can_advance(const std::pair<_Diff, _Distance_precision>&,
7399 int)): New.
7400 (__can_advance(const _Safe_iterator<>&,
7401 const std::pair<_Diff, _Distance_precision>&, int)): New.
7402 * include/debug/safe_iterator.tcc
7403 (_Safe_iterator<>::_M_can_advance(const std::pair<_Diff, _Distance_precision>&,
7404 int)): New.
7405 (_Safe_iterator<>::_M_valid_range(const _Safe_iterator<>&,
7406 std::pair<difference_type, _Distance_precision>&, bool)): Adapt for
7407 __dp_sign_max_size.
7408 (__copy_move_a): Adapt to use __glibcxx_check_can_increment_dist.
7409 (__copy_move_backward_a): Likewise.
7410 (__equal_aux): Likewise.
7411 * include/debug/stl_iterator.h (__can_advance(const std::reverse_iterator<>&,
7412 const std::pair<_Diff, _Distance_precision>&, int)): New.
7413 (__can_advance(const std::move_iterator<>&,
7414 const std::pair<_Diff, _Distance_precision>&, int)): New.
7415 * testsuite/25_algorithms/copy/debug/99402.cc: New test.
7416
74172021-04-09 Jonathan Wakely <jwakely@redhat.com>
7418
7419 PR libstdc++/99985
7420 * include/bits/hashtable.h (_Hashtable::_S_nothrow_move()): Fix
7421 to be a valid constexpr function in C++11.
7422 * testsuite/23_containers/unordered_set/cons/99985.cc: New test.
7423
74242021-04-09 Jonathan Wakely <jwakely@redhat.com>
7425
7426 * include/bits/fs_fwd.h: Fix doxygen group command.
7427 * include/bits/streambuf_iterator.h: Likewise.
7428 * include/bits/uses_allocator_args.h: Likewise.
7429 * include/std/memory: Likewise.
7430 * include/tr1/complex: Likewise.
7431
74322021-04-08 Jonathan Wakely <jwakely@redhat.com>
7433
7434 * include/bits/basic_string.h: Tweak doxygen comment.
7435
74362021-04-08 Patrick Palka <ppalka@redhat.com>
7437
7438 * include/std/ranges (__detail::find): Define.
7439 (split_view::_OuterIter::operator++): Apply proposed resolution
7440 of LWG 3505.
7441 * testsuite/std/ranges/adaptors/split.cc (test10): New test.
7442
74432021-04-08 Patrick Palka <ppalka@redhat.com>
7444
7445 * include/std/ranges (__detail::find_if): Simplify.
7446 (__detail::find_if_not): Likewise.
7447 (__detail::min): Remove.
7448 (__detail::mismatch): Simplify.
7449 (take_view::size): Use std::min instead of __detail::min.
7450
74512021-04-08 Patrick Palka <ppalka@redhat.com>
7452
7453 * include/std/ranges (__detail::__returnable_element): New
7454 concept.
7455 (elements_view): Use this concept in its constraints. Add
7456 missing private access specifier.
7457 (elements_view::_S_get_element): Define as per LWG 3502.
7458 (elements_view::operator*, elements_view::operator[]): Use
7459 _S_get_element.
7460 (elements_view::operator++): Remove unnecessary constraint
7461 as per LWG 3492.
7462 * testsuite/std/ranges/adaptors/elements.cc (test05): New test.
7463
74642021-04-08 Jonathan Wakely <jwakely@redhat.com>
7465
7466 * doc/Makefile.am (stamp-pdf-doxygen): Also grep for
7467 out-of-memory error in log file.
7468 * doc/Makefile.in: Regenerate.
7469
74702021-04-08 Jonathan Wakely <jwakely@redhat.com>
7471
7472 * configure: Regenerate.
7473
74742021-04-08 Jonathan Wakely <jwakely@redhat.com>
7475
7476 * include/bits/random.h: Fix doxygen group commands.
7477 * include/bits/regex_constants.h: Likewise.
7478 * include/tr1/random.h: Likewise.
7479
74802021-04-08 Jonathan Wakely <jwakely@redhat.com>
7481
7482 * include/bits/hashtable.h (_Hashtable::_S_nothrow_move()):
7483 New function to determine noexcept-specifier for move
7484 constructors.
7485 (_Hashtable): Use _S_nothrow_move() on move constructors.
7486 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
7487 Correct static assertion message.
7488 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
7489 Likewise.
7490 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
7491 Likewise.
7492 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
7493 Likewise.
7494
74952021-04-08 Patrick Palka <ppalka@redhat.com>
7496
7497 PR libstdc++/98384
7498 * testsuite/20_util/to_chars/long_double.cc: Don't run the test
7499 on targets without a large long double. XFAIL the execution on
7500 targets with a non-conforming printf.
7501
75022021-04-08 Patrick Palka <ppalka@redhat.com>
7503
7504 PR libstdc++/99433
7505 * include/std/ranges (__adaptor::__maybe_refwrap): Remove.
7506 (__adaptor::__adaptor_invocable): New concept.
7507 (__adaptor::__adaptor_partial_app_viable): New concept.
7508 (__adaptor::_RangeAdaptorClosure): Rewrite, turning it into a
7509 non-template base class.
7510 (__adaptor::_RangeAdaptor): Rewrite, turning it into a CRTP base
7511 class template.
7512 (__adaptor::_Partial): New class template that represents
7513 partial application of a range adaptor non-closure.
7514 (__adaptor::__pipe_invocable): New concept.
7515 (__adaptor::_Pipe): New class template.
7516 (__detail::__can_ref_view): New concept.
7517 (__detail::__can_subrange): New concept.
7518 (all): Replace the lambda here with ...
7519 (_All): ... this functor. Add appropriate constraints.
7520 (__detail::__can_filter_view): New concept.
7521 (filter, _Filter): As in all/_All.
7522 (__detail::__can_transform): New concept.
7523 (transform, _Transform): As in all/_All.
7524 (__detail::__can_take_view): New concept.
7525 (take, _Take): As in all/_All.
7526 (__detail::__can_take_while_view): New concept.
7527 (take_while, _TakeWhile): As in all/_All.
7528 (__detail::__can_drop_view): New concept.
7529 (drop, _Drop): As in all/_All.
7530 (__detail::__can_drop_while_view): New concept.
7531 (drop_while, _DropWhile): As in all/_All.
7532 (__detail::__can_join_view): New concept.
7533 (join, _Join): As in all/_All.
7534 (__detail::__can_split_view): New concept.
7535 (split, _Split): As in all/_All. Rename template parameter
7536 _Fp to _Pattern.
7537 (__detail::__already_common): New concept.
7538 (__detail::__can_common_view): New concept.
7539 (common, _Common): As in all/_All.
7540 (__detail::__can_reverse_view): New concept.
7541 (reverse, _Reverse): As in all/_All.
7542 (__detail::__can_elements_view): New concept.
7543 (elements, _Elements): As in all/_All.
7544 (keys, values): Adjust.
7545 * testsuite/std/ranges/adaptors/99433.cc: New test.
7546 * testsuite/std/ranges/adaptors/all.cc: No longer expect that
7547 adding empty range adaptor closure objects to a pipeline doesn't
7548 increase the size of the pipeline.
7549 (test05): New test.
7550 * testsuite/std/ranges/adaptors/common.cc (test03): New test.
7551 * testsuite/std/ranges/adaptors/drop.cc (test09): New test.
7552 * testsuite/std/ranges/adaptors/drop_while.cc (test04): New test.
7553 * testsuite/std/ranges/adaptors/elements.cc (test04): New test.
7554 * testsuite/std/ranges/adaptors/filter.cc (test06): New test.
7555 * testsuite/std/ranges/adaptors/join.cc (test09): New test.
7556 * testsuite/std/ranges/adaptors/p2281.cc: New test.
7557 * testsuite/std/ranges/adaptors/reverse.cc (test07): New test.
7558 * testsuite/std/ranges/adaptors/split.cc (test01, test04):
7559 Adjust.
7560 (test09): New test.
7561 * testsuite/std/ranges/adaptors/split_neg.cc (test01): Adjust
7562 expected error message.
7563 (test02): Likewise. Extend test.
7564 * testsuite/std/ranges/adaptors/take.cc (test06): New test.
7565 * testsuite/std/ranges/adaptors/take_while.cc (test05): New test.
7566 * testsuite/std/ranges/adaptors/transform.cc (test07, test08):
7567 New test.
7568
75692021-04-08 Jonathan Wakely <jwakely@redhat.com>
7570
7571 * include/std/string_view: Adjust Doxygen @file comment.
7572
75732021-04-08 Jonathan Wakely <jwakely@redhat.com>
7574
7575 * include/std/type_traits (is_scoped_enum<T>): Constrain partial
7576 specialization to not match incomplete enum types. Use a
7577 requires-expression instead of instantiating is_convertible.
7578 (is_scoped_enum<const T>): Add as workaround for PR c++/99968.
7579 * testsuite/20_util/is_scoped_enum/value.cc: Check with
7580 incomplete types and opaque-enum-declarations.
7581
75822021-04-07 Jonathan Wakely <jwakely@redhat.com>
7583
7584 PR libstdc++/99805
7585 * src/c++17/fs_path.cc (path::_M_split_cmpts): Do not call
7586 non-const member on _M_pathname, to avoid copy-on-write.
7587 * testsuite/27_io/filesystem/path/decompose/parent_path.cc:
7588 Check construction from strings that might be shared.
7589
75902021-04-06 Jonathan Wakely <jwakely@redhat.com>
7591
7592 * include/bits/move.h (forward, move, move_if_noexcept)
7593 (addressof): Add _GLIBCXX_NODISCARD.
7594 * include/bits/ranges_cmp.h (identity::operator()): Add
7595 nodiscard attribute.
7596 * include/c_global/cstddef (to_integer): Likewise.
7597 * include/std/bit (bit_cast): Likewise.
7598 * include/std/utility (as_const, to_underlying): Likewise.
7599
76002021-04-06 Jonathan Wakely <jwakely@redhat.com>
7601
7602 * include/bits/move.h (forward): Change static_assert message
7603 to be unambiguous about what must be true.
7604 * testsuite/20_util/forward/c_neg.cc: Adjust dg-error.
7605 * testsuite/20_util/forward/f_neg.cc: Likewise.
7606
76072021-04-06 Jonathan Wakely <jwakely@redhat.com>
7608
7609 * include/bits/alloc_traits.h: Use markdown for code font.
7610 * include/bits/basic_string.h: Fix @param names.
7611 * include/bits/max_size_type.h: Remove period after @file.
7612 * include/bits/regex.h: Fix duplicate @retval names, and rename.
7613 * include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp: Add
7614 group open to match existing group close.
7615 * include/ext/pb_ds/priority_queue.hpp: Add blank line before group
7616 open.
7617
76182021-04-06 Jonathan Wakely <jwakely@redhat.com>
7619
7620 * include/bits/atomic_base.h: Fix doxygen group close.
7621 * include/bits/basic_ios.h: Likewise.
7622 * include/bits/forward_list.h: Likewise.
7623 * include/bits/fs_dir.h: Likewise.
7624 * include/bits/fs_ops.h: Likewise.
7625 * include/bits/fs_path.h: Likewise.
7626 * include/bits/functional_hash.h: Likewise.
7627 * include/bits/gslice.h: Likewise.
7628 * include/bits/gslice_array.h: Likewise.
7629 * include/bits/hashtable_policy.h: Likewise.
7630 * include/bits/indirect_array.h: Likewise.
7631 * include/bits/locale_classes.h: Likewise.
7632 * include/bits/locale_facets.h: Likewise.
7633 * include/bits/locale_facets_nonio.h: Likewise.
7634 * include/bits/mask_array.h: Likewise.
7635 * include/bits/refwrap.h: Likewise.
7636 * include/bits/regex.h: Likewise.
7637 * include/bits/regex_automaton.h: Likewise.
7638 * include/bits/regex_compiler.h: Likewise.
7639 * include/bits/regex_constants.h: Likewise.
7640 * include/bits/regex_error.h: Likewise.
7641 * include/bits/regex_executor.h: Likewise.
7642 * include/bits/regex_scanner.h: Likewise.
7643 * include/bits/shared_ptr.h: Likewise.
7644 * include/bits/shared_ptr_atomic.h: Likewise.
7645 * include/bits/shared_ptr_base.h: Likewise.
7646 * include/bits/slice_array.h: Likewise.
7647 * include/bits/specfun.h: Likewise.
7648 * include/bits/std_function.h: Likewise.
7649 * include/bits/std_mutex.h: Likewise.
7650 * include/bits/stl_deque.h: Likewise.
7651 * include/bits/stl_iterator.h: Likewise.
7652 * include/bits/stl_iterator_base_types.h: Likewise.
7653 * include/bits/stl_map.h: Likewise.
7654 * include/bits/stl_multimap.h: Likewise.
7655 * include/bits/stl_multiset.h: Likewise.
7656 * include/bits/stl_numeric.h: Likewise.
7657 * include/bits/stl_pair.h: Likewise.
7658 * include/bits/stl_set.h: Likewise.
7659 * include/bits/stl_uninitialized.h: Likewise.
7660 * include/bits/stream_iterator.h: Likewise.
7661 * include/bits/streambuf_iterator.h: Likewise.
7662 * include/bits/unique_ptr.h: Likewise.
7663 * include/bits/unordered_map.h: Likewise.
7664 * include/bits/unordered_set.h: Likewise.
7665 * include/decimal/decimal: Likewise.
7666 * include/experimental/any: Likewise.
7667 * include/experimental/array: Likewise.
7668 * include/experimental/bits/fs_dir.h: Likewise.
7669 * include/experimental/bits/fs_fwd.h: Likewise.
7670 * include/experimental/bits/fs_ops.h: Likewise.
7671 * include/experimental/bits/fs_path.h: Likewise.
7672 * include/experimental/buffer: Likewise.
7673 * include/experimental/internet: Likewise.
7674 * include/experimental/optional: Likewise.
7675 * include/experimental/propagate_const: Likewise.
7676 * include/experimental/socket: Likewise.
7677 * include/ext/pb_ds/assoc_container.hpp: Likewise.
7678 * include/ext/pb_ds/detail/priority_queue_base_dispatch.hpp:
7679 Likewise.
7680 * include/ext/pb_ds/detail/tree_policy/node_metadata_selector.hpp: Likewise.
7681 * include/ext/pb_ds/detail/trie_policy/node_metadata_selector.hpp: Likewise.
7682 * include/ext/pb_ds/detail/types_traits.hpp: Likewise.
7683 * include/ext/pb_ds/exception.hpp: Likewise.
7684 * include/ext/pb_ds/priority_queue.hpp: Likewise.
7685 * include/ext/pb_ds/tag_and_trait.hpp: Likewise.
7686 * include/ext/random: Likewise.
7687 * include/std/any: Likewise.
7688 * include/std/atomic: Likewise.
7689 * include/std/bitset: Likewise.
7690 * include/std/chrono: Likewise.
7691 * include/std/complex: Likewise.
7692 * include/std/condition_variable: Likewise.
7693 * include/std/fstream: Likewise.
7694 * include/std/future: Likewise.
7695 * include/std/iostream: Likewise.
7696 * include/std/istream: Likewise.
7697 * include/std/mutex: Likewise.
7698 * include/std/numeric: Likewise.
7699 * include/std/ostream: Likewise.
7700 * include/std/ratio: Likewise.
7701 * include/std/shared_mutex: Likewise.
7702 * include/std/stdexcept: Likewise.
7703 * include/std/streambuf: Likewise.
7704 * include/std/system_error: Likewise.
7705 * include/std/thread: Likewise.
7706 * include/std/valarray: Likewise.
7707 * include/std/variant: Likewise.
7708 * include/tr1/cmath: Likewise.
7709 * include/tr1/regex: Likewise.
7710 * include/tr2/dynamic_bitset: Likewise.
7711 * libsupc++/atomic_lockfree_defines.h: Likewise.
7712 * libsupc++/exception: Likewise.
7713 * libsupc++/exception.h: Likewise.
7714 * libsupc++/exception_ptr.h: Likewise.
7715 * libsupc++/nested_exception.h: Likewise.
7716
77172021-03-31 Alexandre Oliva <oliva@adacore.com>
7718
7719 * testsuite/30_threads/future/members/poll.cc: Use faster
7720 after-ready call in the calibration loop.
7721
77222021-03-29 Jonathan Wakely <jwakely@redhat.com>
7723
7724 * doc/xml/manual/status_cxx2017.xml: Adjust link for PSTL.
7725 * doc/html/manual/status.html: Regenerate.
7726
77272021-03-28 François Dumont <fdumont@gcc.gnu.org>
7728
7729 * include/debug/forward_list
7730 (forward_list(forward_list&&, const allocator_type&)): Add noexcept qualification.
7731 * include/debug/list (list(list&&, const allocator_type&)): Likewise and add
7732 call to safe container allocator aware move constructor.
7733 * include/debug/vector (vector(vector&&, const allocator_type&)):
7734 Fix noexcept qualification.
7735 * testsuite/23_containers/forward_list/cons/noexcept_move_construct.cc:
7736 Add allocator-extended move constructor noexceot qualification check.
7737 * testsuite/23_containers/list/cons/noexcept_move_construct.cc: Likewise.
7738
77392021-03-26 Jonathan Wakely <jwakely@redhat.com>
7740
7741 * src/c++11/random.cc (USE_LCG): Define when a pseudo-random
7742 fallback is needed.
7743 [USE_LCG] (bad_seed, construct_lcg_at, destroy_lcg_at, __lcg):
7744 New helper functions and callback.
7745 (random_device::_M_init): Add 'prng' and 'all' enumerators.
7746 Replace switch with fallthrough with a series of 'if' statements.
7747 [USE_LCG]: Construct an lcg_type engine and use __lcg when cpuid
7748 checks fail.
7749 (random_device::_M_init_pretr1) [USE_MT19937]: Accept "prng"
7750 token.
7751 (random_device::_M_getval): Check for callback unconditionally
7752 and always pass _M_file pointer.
7753 * testsuite/26_numerics/random/random_device/85494.cc: Remove
7754 effective-target check. Use new random_device_available helper.
7755 * testsuite/26_numerics/random/random_device/94087.cc: Likewise.
7756 * testsuite/26_numerics/random/random_device/cons/default-cow.cc:
7757 Remove effective-target check.
7758 * testsuite/26_numerics/random/random_device/cons/default.cc:
7759 Likewise.
7760 * testsuite/26_numerics/random/random_device/cons/token.cc: Use
7761 new random_device_available helper. Test "prng" token.
7762 * testsuite/util/testsuite_random.h (random_device_available):
7763 New helper function.
7764
77652021-03-25 François Dumont <fdumont@gcc.gnu.org>
7766
7767 * include/debug/string
7768 (basic_string(const basic_string&, const _Alloc&)): Define even if !_GLIBCXX_USE_CXX11_ABI.
7769 (basic_string(basic_string&&, const _Alloc&)): Likewise and add noexcept qualification.
7770 (basic_string<>::erase): Adapt to take __const_iterator.
7771 (basic_string(const _CharT*, const _Allocator&)): Remove assign call.
7772 (basic_string<>::insert(const_iterator, _InputIte, _InputIte)): Try to
7773 remove iterator debug layer even if !_GLIBCXX_USE_CXX11_ABI.
7774 [_GLIBCXX_USE_CHAR8_T] (__gnu_debug::u8string): New.
7775 (__gnu_debug::u16string, __gnu_debug::u32string): New.
7776 (std::hash<__gnu_debug::basic_string<>>): New partial specialization.
7777 (std::__is_fast_hash<__gnu_debug::basic_string<>>): Likewise.
7778 * testsuite/util/exception/safety.h
7779 (erase_base<__gnu_debug::basic_string<>>): New partial specialization.
7780 (insert_base<__gnu_debug::basic_string<>>): Likewise.
7781 * testsuite/util/testsuite_container_traits.h (traits<__gnu_debug::basic_string<>>):
7782 New partial specialization.
7783 * testsuite/21_strings/basic_string/hash/debug.cc: New test.
7784 * testsuite/21_strings/basic_string/requirements/citerators.cc:
7785 Add test on __gnu_debug::string.
7786 * testsuite/21_strings/basic_string/requirements/dr438/constructor.cc: Likewise.
7787 * testsuite/21_strings/basic_string/requirements/exception/basic.cc: Likewise.
7788 * testsuite/21_strings/basic_string/requirements/exception/generation_prohibited.cc:
7789 Likewise.
7790 * testsuite/21_strings/basic_string/requirements/exception/propagation_consistent.cc:
7791 Likewise.
7792 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char/1.cc:
7793 Likewise.
7794 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char16_t/1.cc:
7795 Likewise.
7796 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char32_t/1.cc:
7797 Likewise.
7798 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/char8_t/1.cc:
7799 Likewise.
7800 * testsuite/21_strings/basic_string/requirements/explicit_instantiation/wchar_t/1.cc:
7801 Likewise.
7802 * testsuite/21_strings/basic_string/requirements/typedefs.cc: Likewise.
7803
78042021-03-25 Jakub Jelinek <jakub@redhat.com>
7805
7806 PR c++/99672
7807 * testsuite/18_support/source_location/consteval.cc (main): Adjust
7808 expected column numbers.
7809 * testsuite/18_support/source_location/1.cc (main): Likewise.
7810
78112021-03-25 Jonathan Wakely <jwakely@redhat.com>
7812
7813 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare malloc.
7814
78152021-03-25 Jonathan Wakely <jwakely@redhat.com>
7816
7817 * testsuite/util/exception/safety.h (setup_base::generate):
7818 Support seeding random engine.
7819 (erase_point, erase_range): Adjust range of random numbers to
7820 ensure dereferenceable iterators are used where required.
7821 (generation_prohibited::run): Do not try to erase from empty
7822 containers.
7823 * testsuite/util/testsuite_containergen.h (test_containers):
7824 Support seeding random engine.
7825
78262021-03-23 Jonathan Wakely <jwakely@redhat.com>
7827
7828 * testsuite/std/ranges/adaptors/reverse.cc: Replace duplicated
7829 line with a check that uses the const being/end overloads.
7830
78312021-03-23 Moritz Sichert <sichert@in.tum.de>
7832
7833 * include/std/ranges (reverse_view::begin, reverse_view::end):
7834 Qualify make_reverse_iterator calls to avoid ADL.
7835 * testsuite/std/ranges/adaptors/reverse.cc: Test that
7836 views::reverse works when make_reverse_iterator is defined
7837 in an associated namespace.
7838
78392021-03-23 Jonathan Wakely <jwakely@redhat.com>
7840
7841 * include/bits/c++config (_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT):
7842 Do not define when compiling with Clang.
7843
78442021-03-22 Jonathan Wakely <jwakely@redhat.com>
7845
7846 * include/std/string_view (basic_string_view(Range&&)): Define new
7847 constructor and deduction guide.
7848 * testsuite/21_strings/basic_string_view/cons/char/range_c++20.cc: New test.
7849 * testsuite/21_strings/basic_string_view/cons/wchar_t/range_c++20.cc: New test.
7850
78512021-03-22 Jonathan Wakely <jwakely@redhat.com>
7852
7853 * include/bits/range_access.h (begin(T (&)[N]), end(T (&)[N])):
7854 Add missing 'noexcept' as per LWG 2280.
7855 (rbegin(T (&)[N]), rend(T (&)[N]), rbegin(initializer_list<T>))
7856 (rend(initializer_list<T>)): Add 'noexcept' as per LWG 3537.
7857 * testsuite/24_iterators/range_access/range_access.cc: Check for
7858 expected noexcept specifiers. Check result types of generic
7859 std::begin and std::end overloads.
7860 * testsuite/24_iterators/range_access/range_access_cpp14.cc:
7861 Check for expected noexcept specifiers.
7862 * testsuite/24_iterators/range_access/range_access_cpp17.cc:
7863 Likewise.
7864
78652021-03-19 Jonathan Wakely <jwakely@redhat.com>
7866
7867 * include/std/type_traits (is_scoped_enum): Define.
7868 * include/std/version (__cpp_lib_is_scoped_enum): Define.
7869 * testsuite/20_util/is_scoped_enum/value.cc: New test.
7870 * testsuite/20_util/is_scoped_enum/version.cc: New test.
7871
78722021-03-16 Jonathan Wakely <jwakely@redhat.com>
7873
7874 PR libstdc++/99341
7875 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Remove
7876 std::once_flag symbols.
7877 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Likewise.
7878 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Likewise.
7879 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt:
7880 Likewise.
7881 * config/abi/pre/gnu.ver: Likewise.
7882 * src/c++11/mutex.cc [_GLIBCXX_HAVE_LINUX_FUTEX]
7883 (struct __once_flag_compat): Remove.
7884 (_ZNSt9once_flag11_M_activateEv): Remove.
7885 (_ZNSt9once_flag9_M_finishEb): Remove.
7886
78872021-03-16 Jonathan Wakely <jwakely@redhat.com>
7888
7889 PR libstdc++/99341
7890 * include/std/mutex [_GLIBCXX_HAVE_LINUX_FUTEX] (once_flag):
7891 Revert to pthread_once_t implementation.
7892 [_GLIBCXX_HAVE_LINUX_FUTEX] (call_once): Likewise.
7893 * src/c++11/mutex.cc [_GLIBCXX_HAVE_LINUX_FUTEX]
7894 (struct __once_flag_compat): New type matching the reverted
7895 implementation of once_flag using futexes.
7896 (once_flag::_M_activate): Remove, replace with ...
7897 (_ZNSt9once_flag11_M_activateEv): ... alias symbol.
7898 (once_flag::_M_finish): Remove, replace with ...
7899 (_ZNSt9once_flag9_M_finishEb): ... alias symbol.
7900 * testsuite/30_threads/call_once/66146.cc: Removed.
7901
79022021-03-15 Iain Sandoe <iain@sandoe.co.uk>
7903
7904 * testsuite/17_intro/names.cc: Exclude j from the list
7905 of test symbols for Darwin.
7906
79072021-03-15 Iain Sandoe <iain@sandoe.co.uk>
7908
7909 * config/os/bsd/darwin/ppc-extra.ver: Add matching for
7910 to_chars and from_chars for long double.
7911
79122021-03-15 Patrick Palka <ppalka@redhat.com>
7913
7914 * include/bits/max_size_type.h (__max_size_type::operator _Tp):
7915 Fix formatting.
7916 (__max_size_type::operator++): Define.
7917 (__max_size_type::operator--): Likewise.
7918 (__max_size_type::operator<=>): Conditionally define (in place
7919 of the other comparison operators).
7920 (__max_diff_type::operator _Tp): Fix formatting.
7921 (__max_diff_type::operator++): Define.
7922 (__max_diff_type::operator--): Likewise.
7923 (__max_diff_type::operator<=>): Conditionally define (in place
7924 of the other comparison operators).
7925 * testsuite/std/ranges/iota/max_size_type.cc (test01): Test
7926 these operator overloads.
7927
79282021-03-15 Caroline Tice <cmtice@google.com>
7929
7930 PR libstdc++/99172
7931 * src/Makefile.am (AM_CXXFLAGS_PRE, AM_CXXFLAGS): Add
7932 AM_CXXFLAGS_PRE with the old definition of AM_CXXFLAGS; make
7933 AM_CXXFLAGS to be AM_CXXFLAGS_PRE with '-fvtable-verify=std'
7934 filtered out.
7935 * src/Makefile.in: Regenerate.
7936
79372021-03-11 Patrick Palka <ppalka@redhat.com>
7938
7939 * src/c++17/floating_to_chars.cc: Simplify the file as if
7940 __SIZEOF_INT128__ is always defined.
7941 [!defined __SIZEOF_INT128__]: Include "uint128_t.h". Define
7942 a base-10 to_chars overload for the uint128_t class type.
7943 * src/c++17/uint128_t.h: New file.
7944 * testsuite/20_util/to_chars/long_double.cc: No longer expect an
7945 execution FAIL on targets that have a large long double type
7946 but lack __int128.
7947
79482021-03-11 Patrick Palka <ppalka@redhat.com>
7949
7950 * src/c++17/ryu/LOCAL_PATCHES: Update.
7951 * src/c++17/ryu/d2s_intrinsics.h: Don't define uint128_t.
7952 * src/c++17/ryu/generic_128.h: Likewise.
7953 * src/c++17/ryu/ryu_generic_128.h (struct floating_decimal_128):
7954 Use uint128_t instead of __uint128_t.
7955 (generic_binary_to_decimal): Likewise.
7956
79572021-03-11 Patrick Palka <ppalka@redhat.com>
7958
7959 * src/c++17/ryu/LOCAL_PATCHES: New file.
7960
79612021-03-11 Patrick Palka <ppalka@redhat.com>
7962
7963 * src/c++17/floating_to_chars.cc (uint128_t): New conditionally
7964 defined alias of unsigned __int128.
7965 (floating_type_traits_binary128::mantissa_t): Use uint128_t
7966 instead of unsigned __int128.
7967 (floating_type_traits<long double>::mantissa_t)
7968 [LONG_DOUBLE_KIND == LDK_IBM128]: Likewise.
7969 (get_ieee_repr): Likewise. Make casts from uint_t to mantissa_t
7970 and uint32_t explicit. Simplify the extraction of mantissa,
7971 exponent and sign bit.
7972
79732021-03-11 Jonathan Wakely <jwakely@redhat.com>
7974
7975 * include/std/barrier (barrier::arrival_token): New move-only
7976 class that encapsulates the underlying token value.
7977
79782021-03-11 Jonathan Wakely <jwakely@redhat.com>
7979
7980 * python/libstdcxx/v6/printers.py (find_type): Use tag attribute
7981 instead of unqualified() method.
7982
79832021-03-11 Jonathan Wakely <jwakely@redhat.com>
7984
7985 PR libstdc++/99537
7986 * include/std/stop_token (_Stop_state_t::_M_release_ownership):
7987 Use acq_rel memory ordering.
7988
79892021-03-11 Jonathan Wakely <jwakely@redhat.com>
7990
7991 PR libstdc++/99533
7992 * src/c++17/fs_dir.cc (recursive_directory_iterator): Use new
7993 helper function to check for permission denied errors.
7994 * src/filesystem/dir.cc (recursive_directory_iterator):
7995 Likewise.
7996 * src/filesystem/dir-common.h (is_permission_denied_error): New
7997 helper function.
7998
79992021-03-11 Jonathan Wakely <jwakely@redhat.com>
8000
8001 PR libstdc++/99536
8002 * include/bits/random.h (normal_distribution): Use
8003 default-initializer for _M_saved and _M_saved_available.
8004
80052021-03-10 John David Anglin <danglin@gcc.gnu.org>
8006
8007 * testsuite/29_atomics/atomic/wait_notify/bool.cc: Add options to
8008 link with libatomic.
8009 * testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
8010 * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
8011 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
8012 * testsuite/30_threads/barrier/arrive.cc: Likewise.
8013 * testsuite/30_threads/barrier/arrive_and_drop.cc: Likewise.
8014 * testsuite/30_threads/barrier/arrive_and_wait.cc: Likewise.
8015 * testsuite/30_threads/barrier/completion.cc: Likewise.
8016 * testsuite/30_threads/latch/3.cc: Likewise.
8017 * testsuite/30_threads/semaphore/try_acquire.cc: Likewise.
8018 * testsuite/30_threads/semaphore/try_acquire_for.cc: Likewise.
8019 * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
8020
80212021-03-10 Jonathan Wakely <jwakely@redhat.com>
8022
8023 PR libstdc++/99413
8024 * include/bits/align.h: Include debug/assertions.h.
8025 * include/bits/codecvt.h: Include bits/c++config.h.
8026 * include/bits/enable_special_members.h: Likewise.
8027 * include/bits/erase_if.h: Likewise.
8028 * include/bits/functional_hash.h: Include <type_traits>.
8029 * include/bits/invoke.h: Include bits/move.h.
8030 * include/bits/ostream_insert.h: Include bits/exception_defines.h.
8031 * include/bits/parse_numbers.h: Include <type_traits>.
8032 * include/bits/predefined_ops.h: Include bits/c++config.h.
8033 * include/bits/range_access.h: Include bits/stl_iterator.h.
8034 * include/bits/stl_bvector.h: Do not include bits/stl_vector.h.
8035 * include/bits/stl_iterator.h: Include bits/stl_iterator_base_types.h.
8036 * include/bits/stl_uninitialized.h: Include bits/stl_algobase.h.
8037 * include/bits/uniform_int_dist.h: Include bits/concept_check.h.
8038 * include/bits/unique_lock.h: Include bits/std_mutex.h.
8039 * include/debug/assertions.h: Include bits/c++config.h.
8040
80412021-03-10 Jonathan Wakely <jwakely@redhat.com>
8042
8043 * include/bits/ranges_cmp.h (__eq_builtin_ptr_cmp): Remove.
8044 (ranges::equal_to, ranges::not_equal_to): Do not constrain
8045 with __eq_builtin_ptr_cmp.
8046 (ranges::less, ranges::greater, ranges::less_equal)
8047 (ranges::greater_equal): Do not constrain with
8048 __less_builtin_ptr_cmp.
8049 * libsupc++/compare (compare_three_way): Do not constrain with
8050 __3way_builtin_ptr_cmp.
8051 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc: Moved to...
8052 * testsuite/18_support/comparisons/object/lwg3530.cc: ...here.
8053 * testsuite/20_util/function_objects/range.cmp/lwg3530.cc: New test.
8054
80552021-03-10 Jonathan Wakely <jwakely@redhat.com>
8056
8057 * testsuite/std/time/syn_c++20.cc: Enable synopsis checks for
8058 C++20 calendar types.
8059
80602021-03-06 Jakub Jelinek <jakub@redhat.com>
8061
8062 PR libstdc++/99396
8063 * include/std/bit (__rotl, __rotr): Add optimized variants for power of
8064 two _Nd which the compiler can pattern match the rotates.
8065
80662021-03-04 Jonathan Wakely <jwakely@redhat.com>
8067
8068 PR libstdc++/99382
8069 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
8070 Make storage larger than required. Verify no write to the last
8071 element.
8072 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
8073 Likewise.
8074
80752021-03-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8076
8077 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
8078 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
8079 Likewise.
8080 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
8081 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
8082 Likewise.
8083
80842021-03-03 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
8085
8086 * include/experimental/bits/simd.h: Replace reserved _X, _B by
8087 _Xp, _Bp.
8088 * include/experimental/bits/simd_builtin.h: Likewise.
8089 * include/experimental/bits/simd_x86.h: Likewise.
8090
80912021-02-27 Jonathan Wakely <jwakely@redhat.com>
8092
8093 PR libstdc++/99301
8094 * include/std/chrono (year_month_day::_M_days_since_epoch()):
8095 Convert chrono::month and chrono::day to unsigned before
8096 converting to uint32_t.
8097
80982021-02-25 Jonathan Wakely <jwakely@redhat.com>
8099
8100 * include/std/chrono (year_month_day::_S_from_days): Perform
8101 all calculations with type uint32_t.
8102
81032021-02-25 Jonathan Wakely <jwakely@redhat.com>
8104
8105 * doc/xml/manual/abi.xml: Document versioning for GCC 11.
8106 * doc/html/manual/abi.html: Regenerate.
8107
81082021-02-25 Jonathan Wakely <jwakely@redhat.com>
8109
8110 PR libstdc++/99270
8111 * testsuite/27_io/headers/cstdio/types_std.cc: Use pointer to
8112 FILE instead of FILE.
8113
81142021-02-25 Andreas Schwab <schwab@suse.de>
8115
8116 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
8117 * config/abi/post/ia64-linux-gnu/baseline_symbols.txt: Update.
8118 * config/abi/post/m68k-linux-gnu/baseline_symbols.txt: Update.
8119 * config/abi/post/riscv64-linux-gnu/baseline_symbols.txt: Update.
8120
81212021-02-25 Jonathan Wakely <jwakely@redhat.com>
8122
8123 PR libstdc++/99265
8124 * include/std/chrono (year_month_day::_S_from_days): Cast long
8125 to int explicitly.
8126
81272021-02-25 Jonathan Wakely <jwakely@redhat.com>
8128
8129 * include/std/utility (to_underlying): Define.
8130 * include/std/version (__cpp_lib_to_underlying): Define.
8131 * testsuite/20_util/to_underlying/1.cc: New test.
8132 * testsuite/20_util/to_underlying/version.cc: New test.
8133
81342021-02-24 Jonathan Wakely <jwakely@redhat.com>
8135
8136 PR libstdc++/99261
8137 * src/c++17/floating_to_chars.cc (sprintf_ld): Add extra args
8138 before value to be printed.
8139
81402021-02-24 Patrick Palka <ppalka@redhat.com>
8141
8142 * src/c++17/floating_to_chars.cc (__floating_to_chars_precision):
8143 Relax the condition that guards the printf code path to accept
8144 F128_type as well as long double.
8145
81462021-02-24 Cassio Neri <cassio.neri@gmail.com>
8147
8148 * include/std/chrono (year_month_day_last:day): New
8149 implementation.
8150
81512021-02-24 Cassio Neri <cassio.neri@gmail.com>
8152
8153 * include/std/chrono (year::is_leap): New implementation.
8154 * testsuite/std/time/year/2.cc: New test.
8155
81562021-02-24 Cassio Neri <cassio.neri@gmail.com>
8157
8158 * include/std/chrono (year_month_day::_M_days_since_epoch):
8159 New implementation.
8160 * testsuite/std/time/year_month_day/4.cc: New test.
8161
81622021-02-24 Cassio Neri <cassio.neri@gmail.com>
8163
8164 * include/std/chrono (year_month_day::_S_from_days): New
8165 implementation.
8166 * testsuite/std/time/year_month_day/3.cc: New test.
8167
81682021-02-24 Patrick Palka <ppalka@redhat.com>
8169
8170 PR libstdc++/98384
8171 * testsuite/20_util/to_chars/long_double.cc: Include <optional>.
8172 (test01): Simplify verifying the nearby values by using a
8173 2-iteration loop and a dedicated output buffer to check that the
8174 nearby values are different. Factor out the printf-based
8175 verification into a local function, and check that the leading
8176 hex digits agree before comparing to the output of printf. Also
8177 verify the output by round-tripping it through from_chars.
8178
81792021-02-24 Jonathan Wakely <jwakely@redhat.com>
8180
8181 PR libstdc++/98389
8182 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Do not match to_chars
8183 symbols for long double arguments mangled as 'g'.
8184 * config/os/gnu-linux/ldbl-extra.ver: Likewise.
8185 * config/os/gnu-linux/ldbl-ieee128-extra.ver: Likewise.
8186 * src/c++17/Makefile.am [GLIBCXX_LDBL_ALT128_COMPAT_TRUE]:
8187 Use -mabi=ibmlongdouble for floating_to_chars.cc.
8188 * src/c++17/Makefile.in: Regenerate.
8189 * src/c++17/floating_to_chars.cc (floating_type_traits_binary128):
8190 New type defining type traits of IEEE binary128 format.
8191 (floating_type_traits<__float128>): Define specialization.
8192 (floating_type_traits<long double>): Define in terms of
8193 floating_type_traits_binary128 when appropriate.
8194 (floating_to_shortest_scientific): Handle __float128.
8195 (sprintf_ld): New function template for printing a long double
8196 or __ieee128 value using sprintf.
8197 (__floating_to_chars_shortest, __floating_to_chars_precision):
8198 Use sprintf_ld.
8199 (to_chars): Define overloads for __float128.
8200
82012021-02-24 Jonathan Wakely <jwakely@redhat.com>
8202
8203 * testsuite/17_intro/names.cc: Undefine 'u' on powerpc*-linux*.
8204
82052021-02-23 Martin Sebor <msebor@redhat.com>
8206
8207 PR c++/99074
8208 * libsupc++/dyncast.cc (__dynamic_cast): Return null when
8209 first argument is null.
8210
82112021-02-23 Jakub Jelinek <jakub@redhat.com>
8212
8213 PR libstdc++/99181
8214 * testsuite/21_strings/char_traits/requirements/char/99181.cc: New
8215 test.
8216
82172021-02-23 Jakub Jelinek <jakub@redhat.com>
8218
8219 PR libstdc++/99181
8220 * include/bits/char_traits.h (char_traits<char>::compare): For
8221 constexpr evaluation don't call
8222 __gnu_cxx::char_traits<char_type>::compare but do the comparison loop
8223 directly.
8224
82252021-02-23 Jakub Jelinek <jakub@redhat.com>
8226
8227 PR libstdc++/97549
8228 * include/pstl/parallel_backend_serial.h: Remove __pstl::__par_backend.
8229
82302021-02-23 Patrick Palka <ppalka@redhat.com>
8231
8232 PR libstdc++/98384
8233 * src/c++17/floating_to_chars.cc (get_ieee_repr): Extract
8234 the high- and low-order parts from an IBM long double value
8235 in an endian-agnostic way.
8236
82372021-02-19 Jonathan Wakely <jwakely@redhat.com>
8238
8239 * include/bits/atomic_wait.h (__thread_relax()): Call
8240 __thread_yield() not __gthread_yield().
8241
82422021-02-15 Jonathan Wakely <jwakely@redhat.com>
8243
8244 * include/bits/atomic_wait.h (__thread_yield()): Check
8245 _GLIBCXX_HAS_GTHREADS before using __gthread_yield.
8246 (__thread_relax()): Use __thread_yield() instead of repeating
8247 the preprocessor checks for __gthread_yield.
8248
82492021-02-15 Jonathan Wakely <jwakely@redhat.com>
8250
8251 * include/std/mutex (once_flag::_M_activate()): Add explicit
8252 return statement for passive case.
8253 (once_flag::_M_finish(bool)): Use reserved name for parameter.
8254
82552021-02-14 Jonathan Wakely <jwakely@redhat.com>
8256
8257 PR libstdc++/99096
8258 * testsuite/util/testsuite_fs.h: Always include <unistd.h>.
8259
82602021-02-12 Jonathan Wakely <jwakely@redhat.com>
8261
8262 PR libstdc++/88881
8263 * src/c++17/fs_ops.cc (fs::symlink_status): Re-enable workaround.
8264
82652021-02-12 Jonathan Wakely <jwakely@redhat.com>
8266
8267 * doc/xml/manual/status_cxx2014.xml: Document implementation
8268 specific properties of std::experimental::filesystem::rename.
8269 * doc/xml/manual/status_cxx2017.xml: Document implementation
8270 specific properties of std::filesystem::rename.
8271 * doc/html/*: Regenerate.
8272 * src/c++17/fs_ops.cc (fs::rename): Implement correct behaviour
8273 for directories on Windows.
8274 * src/filesystem/ops-common.h (__gnu_posix::rename): Use
8275 MoveFileExW on Windows.
8276 * testsuite/27_io/filesystem/operations/rename.cc: New test.
8277 * testsuite/experimental/filesystem/operations/rename.cc: New test.
8278
82792021-02-12 Jonathan Wakely <jwakely@redhat.com>
8280
8281 * testsuite/util/testsuite_fs.h (nonexistent_path): Add
8282 random number to the path.
8283
82842021-02-12 Jonathan Wakely <jwakely@redhat.com>
8285
8286 * include/experimental/internet (address_v6::to_string): Include
8287 scope ID in string.
8288 * testsuite/experimental/net/internet/address/v6/members.cc:
8289 Test to_string() results.
8290
82912021-02-12 Jonathan Wakely <jwakely@redhat.com>
8292
8293 * include/experimental/internet (address_v6::any): Avoid using
8294 memcpy in constexpr function.
8295 (address_v6::loopback): Likewise.
8296 (make_address_v6): Fix missing return statements on error paths.
8297 * include/experimental/io_context: Avoid -Wdangling-else
8298 warning.
8299 * testsuite/experimental/net/internet/address/v4/members.cc:
8300 Remove unused variables.
8301 * testsuite/experimental/net/internet/address/v6/members.cc:
8302 New test.
8303
83042021-02-12 Jonathan Wakely <jwakely@redhat.com>
8305
8306 * include/bits/shared_ptr_base.h (__shared_ptr::_M_get_deleter):
8307 Add unused attribute to parameter.
8308 * src/c++11/shared_ptr.cc (_Sp_make_shared_tag::_S_eq):
8309 Likewise.
8310
83112021-02-12 Jonathan Wakely <jwakely@redhat.com>
8312
8313 * testsuite/27_io/basic_ostream/emit/1.cc: Expect test to fail
8314 if -fno-rtti is used.
8315 * testsuite/30_threads/async/forced_unwind.cc: Expect test
8316 to abort if -fno-rtti is used.
8317
83182021-02-12 Jonathan Wakely <jwakely@redhat.com>
8319
8320 * testsuite/util/testsuite_allocator.h (memory_resource):
8321 Remove requirement for RTTI and exceptions to be enabled.
8322
83232021-02-12 Jonathan Wakely <jwakely@redhat.com>
8324
8325 * testsuite/27_io/basic_istringstream/rdbuf/char/2832.cc: Use
8326 static_cast when RTTI is disabled.
8327 * testsuite/27_io/basic_istringstream/rdbuf/wchar_t/2832.cc:
8328 Likewise.
8329 * testsuite/27_io/basic_ostringstream/rdbuf/char/2832.cc:
8330 Likewise.
8331 * testsuite/27_io/basic_ostringstream/rdbuf/wchar_t/2832.cc:
8332 Likewise.
8333 * testsuite/27_io/basic_stringstream/str/char/2.cc:
8334 Likewise.
8335 * testsuite/27_io/basic_stringstream/str/wchar_t/2.cc:
8336 Likewise.
8337
83382021-02-12 Jonathan Wakely <jwakely@redhat.com>
8339
8340 * include/std/ostream (__syncbuf_base::_S_get): Mark parameter
8341 as unused and only use dynamic_cast when RTTI is enabled.
8342
83432021-02-12 Jonathan Wakely <jwakely@redhat.com>
8344
8345 PR libstdc++/99077
8346 * src/c++11/cxx11-ios_failure.cc (__ios_failure(const char*, int)):
8347 Change int parameter to error_code, to match std::ios_failure.
8348 (__throw_ios_failure(const char*, int)): Construct error_code
8349 from int parameter.
8350
83512021-02-11 Jonathan Wakely <jwakely@redhat.com>
8352
8353 * libsupc++/eh_ptr.cc (_GLIBCXX_EH_PTR_RELOPS_COMPAT): Define
8354 new macro.
8355 * libsupc++/exception_ptr.h (_GLIBCXX_EH_PTR_USED): Check new
8356 macro instead of _GLIBCXX_EH_PTR_COMPAT.
8357 (operator==): Likewise.
8358
83592021-02-11 Jonathan Wakely <jwakely@redhat.com>
8360
8361 PR libstdc++/99058
8362 * doc/xml/manual/status_cxx2011.xml: Document when support
8363 became stable.
8364 * doc/xml/manual/status_cxx2014.xml: Likewise.
8365 * doc/xml/manual/status_cxx2017.xml: Likewise.
8366 * doc/html/manual/status.html: Regenerate.
8367
83682021-02-10 Jonathan Wakely <jwakely@redhat.com>
8369
8370 PR libstdc++/88881
8371 * src/c++17/fs_ops.cc (fs::status): Re-enable workaround.
8372
83732021-02-10 Jonathan Wakely <jwakely@redhat.com>
8374
8375 * src/c++17/fs_ops.cc (fs::create_hard_link, fs::equivalent)
8376 (fs::remove): Use std::system_category() for error codes from
8377 GetLastError().
8378 * src/filesystem/ops.cc (fs::create_hard_link, fs::remove):
8379 Likewise.
8380
83812021-02-10 Jonathan Wakely <jwakely@redhat.com>
8382
8383 * testsuite/27_io/filesystem/operations/proximate.cc: Fix typo
8384 in __MINGW32__ macro name.
8385 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
8386 * testsuite/27_io/filesystem/path/generation/proximate.cc:
8387 Likewise.
8388 * testsuite/27_io/filesystem/path/generation/relative.cc:
8389 Likewise.
8390 * testsuite/util/testsuite_fs.h: Likewise.
8391
83922021-02-09 François Dumont <fdumont@gcc.gnu.org>
8393
8394 * include/bits/stl_tree.h
8395 (__has_is_transparent, __has_is_transparent_t): Move...
8396 * include/bits/stl_function.h: ...here.
8397 * include/bits/hashtable_policy.h (_Hash_code_base<>::_M_hash_code_tr): New..
8398 (_Hashtable_base<>::_M_equals_tr): New.
8399 * include/bits/hashtable.h (_Hashtable<>::_M_find_tr, _Hashtable<>::_M_count_tr,
8400 _Hashtable<>::_M_equal_range_tr): New member function templates to perform
8401 heterogeneous lookup.
8402 (_Hashtable<>::_M_find_before_node_tr): New.
8403 (_Hashtable<>::_M_find_node_tr): New.
8404 * include/bits/unordered_map.h (unordered_map::find<>, unordered_map::count<>,
8405 unordered_map::contains<>, unordered_map::equal_range<>): New member function
8406 templates to perform heterogeneous lookup.
8407 (unordered_multimap::find<>, unordered_multimap::count<>,
8408 unordered_multimap::contains<>, unordered_multimap::equal_range<>): Likewise.
8409 * include/bits/unordered_set.h (unordered_set::find<>, unordered_set::count<>,
8410 unordered_set::contains<>, unordered_set::equal_range<>): Likewise.
8411 (unordered_multiset::find<>, unordered_multiset::count<>,
8412 unordered_multiset::contains<>, unordered_multiset::equal_range<>): Likewise.
8413 * include/debug/unordered_map
8414 (unordered_map::find<>, unordered_map::equal_range<>): Likewise.
8415 (unordered_multimap::find<>, unordered_multimap::equal_range<>): Likewise.
8416 * include/debug/unordered_set
8417 (unordered_set::find<>, unordered_set::equal_range<>): Likewise.
8418 (unordered_multiset::find<>, unordered_multiset::equal_range<>): Likewise.
8419 * testsuite/23_containers/unordered_map/operations/1.cc: New test.
8420 * testsuite/23_containers/unordered_multimap/operations/1.cc: New test.
8421 * testsuite/23_containers/unordered_multiset/operations/1.cc: New test.
8422 * testsuite/23_containers/unordered_set/operations/1.cc: New test.
8423
84242021-02-09 François Dumont <fdumont@gcc.gnu.org>
8425
8426 * include/bits/stl_deque.h
8427 (std::operator-(deque::iterator, deque::iterator)): Replace if/then with
8428 a null pointer test.
8429
84302021-02-09 Jonathan Wakely <jwakely@redhat.com>
8431
8432 * testsuite/27_io/filesystem/operations/remove_all.cc: Remove
8433 test directory after making it writable again.
8434 * testsuite/experimental/filesystem/operations/remove_all.cc:
8435 Likewise.
8436
84372021-02-09 Jonathan Wakely <jwakely@redhat.com>
8438
8439 PR libstdc++/99021
8440 * include/std/coroutine (coroutine_handle<P>::from_address): Add
8441 noexcept.
8442
84432021-02-09 Vladimir Vishnevsky <vv.os.swe@gmail.com>
8444
8445 * include/ext/stdio_sync_filebuf.h: Remove unused <unistd.h>.
8446 * src/c++17/fs_ops.cc (fs::permissions): Qualify mode_t.
8447
84482021-02-09 Jakub Jelinek <jakub@redhat.com>
8449
8450 PR middle-end/98465
8451 * include/bits/basic_string.tcc (basic_string::_M_replace): When __s
8452 points to the characters moved by earlier _S_move, compute the source
8453 address using expression based on the __p pointer rather than __s
8454 pointer.
8455
84562021-02-03 Jonathan Wakely <jwakely@redhat.com>
8457
8458 * testsuite/19_diagnostics/error_code/operators/not_equal.cc:
8459 Add comparison with same category and different values.
8460 * testsuite/19_diagnostics/error_code/operators/less.cc:
8461 Likewise. Fix comparison involving different categories.
8462 * testsuite/19_diagnostics/error_code/operators/three_way.cc:
8463 Likewise.
8464 * testsuite/19_diagnostics/error_condition/operators/less.cc:
8465 Add comment.
8466 * testsuite/19_diagnostics/error_condition/operators/three_way.cc:
8467 Likewise.
8468
84692021-02-03 yaozhongxiao <yaozhongxiao@linux.alibaba.com>
8470
8471 * include/experimental/bits/simd_neon.h: Replace repeated vpadd
8472 calls with a single vaddv for aarch64.
8473
84742021-02-03 Matthias Kretz <kretz@kde.org>
8475
8476 * testsuite/Makefile.am: Warn about the workaround. Add
8477 -fno-tree-vrp to CXXFLAGS passed to the check_simd script.
8478 Improve initial user feedback from make check-simd.
8479 * testsuite/Makefile.in: Regenerated.
8480
84812021-02-03 Matthias Kretz <kretz@kde.org>
8482
8483 * include/experimental/bits/simd.h: Add __detail::_Minimum and
8484 __detail::_Maximum to use them as _BinaryOperation to _S_reduce.
8485 Add hmin and hmax overloads for simd and const_where_expression.
8486 * include/experimental/bits/simd_scalar.h
8487 (_SimdImplScalar::_S_reduce): Make unused _BinaryOperation
8488 parameter const-ref to allow calling _S_reduce with an rvalue.
8489 * testsuite/experimental/simd/tests/reductions.cc: Add tests for
8490 hmin and hmax. Since the compiler statically determined that all
8491 tests pass, repeat the test after a call to make_value_unknown.
8492
84932021-02-03 Matthias Kretz <kretz@kde.org>
8494
8495 * testsuite/experimental/simd/tests/bits/verify.h (verify): Add
8496 instruction pointer data member. Ensure that the `if (m_failed)`
8497 branch is always inlined into the calling code. The body of the
8498 conditional can still be a function call. Move the get_ip call
8499 into the verify ctor to simplify the ctor calls.
8500 (COMPARE): Don't mention the use of all_of for reduction of a
8501 simd_mask. It only distracts from the real issue.
8502
85032021-02-03 Matthias Kretz <kretz@kde.org>
8504
8505 * testsuite/experimental/simd/driver.sh: Abstract reading test
8506 options into read_src_option function. Read skip, only,
8507 expensive, and xfail via read_src_option. Add timeout and
8508 timeout-factor options and adjust timeout variable accordingly.
8509 * testsuite/experimental/simd/tests/loadstore.cc: Set
8510 timeout-factor 2.
8511
85122021-02-03 Matthias Kretz <kretz@kde.org>
8513
8514 * testsuite/experimental/simd/driver.sh: When handling the pipe
8515 to log (and on verbose to stdout) count the lines. If it exceeds
8516 1000 log the issue and exit 125, which is then handled as a
8517 failure.
8518
85192021-02-03 Matthias Kretz <kretz@kde.org>
8520
8521 * testsuite/experimental/simd/tests/hypot3_fma.cc: Add skip:
8522 markup for long double on powerpc64*.
8523
85242021-02-03 Matthias Kretz <kretz@kde.org>
8525
8526 * include/experimental/bits/simd.h: Add __have_power10vec
8527 conditional on _ARCH_PWR10.
8528 * include/experimental/bits/simd_builtin.h: Forward declare
8529 _MaskImplPpc and use it as _MaskImpl when __ALTIVEC__ is
8530 defined.
8531 (_MaskImplBuiltin::_S_some_of): Call _S_popcount from the
8532 _SuperImpl for optimizations and correctness.
8533 * include/experimental/bits/simd_ppc.h: Add _MaskImplPpc.
8534 (_MaskImplPpc::_S_popcount): Implement via vec_cntm for POWER10.
8535 Otherwise, for >=int use -vec_sums divided by a sizeof factor.
8536 For <int use -vec_sums(vec_sum4s(...)) to sum all mask entries.
8537
85382021-02-03 Matthias Kretz <kretz@kde.org>
8539
8540 * testsuite/experimental/simd/driver.sh: Remove executable on
8541 SIGINT. Process compiler and test executable output: In verbose
8542 mode print messages immediately, limited to 1000 lines and
8543 breaking long lines to below $COLUMNS (or 1024 if not set).
8544 Communicating the exit status of the compiler / test with the
8545 necessary pipe is done via a message through stdout/-in.
8546
85472021-02-03 Matthias Kretz <kretz@kde.org>
8548
8549 * testsuite/Makefile.am: Ensure .simd.summary is empty before
8550 collecting a new summary.
8551 * testsuite/Makefile.in: Regenerate.
8552
85532021-02-03 Matthias Kretz <kretz@kde.org>
8554
8555 * testsuite/experimental/simd/generate_makefile.sh: Use
8556 different variables internally than documented for user
8557 overrides. This makes internal append/prepend work as intended.
8558
85592021-02-03 Matthias Kretz <kretz@kde.org>
8560
8561 * testsuite/experimental/simd/driver.sh (verify_test): Print
8562 test output on run xfail. Do not repeat lines from the log that
8563 were already printed on stdout.
8564 (test_selector): Make the compiler flags pattern usable as a
8565 substring selector.
8566 (toplevel): Trap on SIGINT and remove the log and sum files.
8567 Call timout with --foreground to quickly terminate on SIGINT.
8568 * testsuite/experimental/simd/generate_makefile.sh: Simplify run
8569 targets via target patterns. Default DRIVEROPTS to -v for run
8570 targets. Remove log and sum files after completion of the run
8571 target (so that it's always recompiled).
8572 Place help text into text file for reasonable 'make help'
8573 performance.
8574
85752021-02-03 Matthias Kretz <kretz@kde.org>
8576
8577 * include/experimental/bits/simd.h: Remove unnecessary static
8578 assertion. Allow sizeof(8) integer __intrinsic_type to enable
8579 the necessary mask type.
8580
85812021-02-03 Matthias Kretz <kretz@kde.org>
8582
8583 * include/experimental/bits/simd.h: Let __intrinsic_type<long
8584 double, N> be valid if sizeof(long double) == sizeof(double) and
8585 use a __vector double as member type.
8586
85872021-02-03 Matthias Kretz <kretz@kde.org>
8588
8589 * include/experimental/bits/simd.h (__is_intrinsic_type): New
8590 internal type trait. Alias for __is_vector_type on x86.
8591 (_VectorTraitsImpl): Enable for __intrinsic_type in addition for
8592 __vector_type.
8593 (__intrin_bitcast): Allow casting to & from vector & intrinsic
8594 types.
8595 (__intrinsic_type): Explicitly specialize for NEON intrinsic
8596 vector types.
8597
85982021-02-03 Matthias Kretz <kretz@kde.org>
8599
8600 * testsuite/experimental/simd/driver.sh: Implement skip, only,
8601 expensive, and xfail markers. They can select on type, ABI tag
8602 subset number, target-triplet, and compiler flags.
8603 * testsuite/experimental/simd/generate_makefile.sh: The summary
8604 now includes lines for unexpected passes and expected failures.
8605 If the skip or only markers are only conditional on the type, do
8606 not generate rules for those types.
8607 * testsuite/experimental/simd/tests/abs.cc: Mark test expensive
8608 for ABI tag subsets 1-9.
8609 * testsuite/experimental/simd/tests/algorithms.cc: Ditto.
8610 * testsuite/experimental/simd/tests/broadcast.cc: Ditto.
8611 * testsuite/experimental/simd/tests/casts.cc: Ditto.
8612 * testsuite/experimental/simd/tests/generator.cc: Ditto.
8613 * testsuite/experimental/simd/tests/integer_operators.cc: Ditto.
8614 * testsuite/experimental/simd/tests/loadstore.cc: Ditto.
8615 * testsuite/experimental/simd/tests/mask_broadcast.cc: Ditto.
8616 * testsuite/experimental/simd/tests/mask_conversions.cc: Ditto.
8617 * testsuite/experimental/simd/tests/mask_implicit_cvt.cc: Ditto.
8618 * testsuite/experimental/simd/tests/mask_loadstore.cc: Ditto.
8619 * testsuite/experimental/simd/tests/mask_operator_cvt.cc: Ditto.
8620 * testsuite/experimental/simd/tests/mask_operators.cc: Ditto.
8621 * testsuite/experimental/simd/tests/mask_reductions.cc: Ditto.
8622 * testsuite/experimental/simd/tests/operator_cvt.cc: Ditto.
8623 * testsuite/experimental/simd/tests/operators.cc: Ditto.
8624 * testsuite/experimental/simd/tests/reductions.cc: Ditto.
8625 * testsuite/experimental/simd/tests/simd.cc: Ditto.
8626 * testsuite/experimental/simd/tests/split_concat.cc: Ditto.
8627 * testsuite/experimental/simd/tests/splits.cc: Ditto.
8628 * testsuite/experimental/simd/tests/where.cc: Ditto.
8629 * testsuite/experimental/simd/tests/fpclassify.cc: Ditto. In
8630 addition replace "test only floattypes" marker by unconditional
8631 "float|double|ldouble" only marker.
8632 * testsuite/experimental/simd/tests/frexp.cc: Ditto.
8633 * testsuite/experimental/simd/tests/hypot3_fma.cc: Ditto.
8634 * testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc:
8635 Ditto.
8636 * testsuite/experimental/simd/tests/logarithm.cc: Ditto.
8637 * testsuite/experimental/simd/tests/math_1arg.cc: Ditto.
8638 * testsuite/experimental/simd/tests/math_2arg.cc: Ditto.
8639 * testsuite/experimental/simd/tests/remqo.cc: Ditto.
8640 * testsuite/experimental/simd/tests/trigonometric.cc: Ditto.
8641 * testsuite/experimental/simd/tests/trunc_ceil_floor.cc: Ditto.
8642 * testsuite/experimental/simd/tests/sincos.cc: Ditto. In
8643 addition, xfail on run because the reference data is missing.
8644
86452021-02-02 Jonathan Wakely <jwakely@redhat.com>
8646
8647 * doc/xml/manual/status_cxx2011.xml: Remove stray table cell.
8648 * doc/xml/manual/status_cxx2014.xml: Likewise.
8649 * doc/xml/manual/status_cxx2017.xml: Likewise.
8650 * doc/html/manual/status.html: Regenerate.
8651
86522021-02-01 François Dumont <fdumont@gcc.gnu.org>
8653
8654 PR libstdc++/70303
8655 * include/bits/stl_deque.h (std::deque<>::operator-(iterator, iterator)):
8656 Return 0 if both iterators are value-initialized.
8657 * testsuite/23_containers/deque/70303.cc: New test.
8658 * testsuite/23_containers/vector/70303.cc: New test.
8659
86602021-02-01 Jonathan Wakely <jwakely@redhat.com>
8661
8662 * doc/xml/manual/status_cxx2011.xml: Update std::call_once
8663 status.
8664 * doc/xml/manual/status_cxx2014.xml: Likewise.
8665 * doc/xml/manual/status_cxx2017.xml: Likewise. Update
8666 std::from_chars and std::to_chars status. Fix formatting.
8667 * doc/html/manual/status.html: Regenerate.
8668
86692021-01-28 Jonathan Wakely <jwakely@redhat.com>
8670
8671 * include/experimental/bits/numeric_traits.h: Update copyright
8672 dates.
8673 * include/experimental/bits/simd.h: Likewise.
8674 * include/experimental/bits/simd_builtin.h: Likewise.
8675 * include/experimental/bits/simd_converter.h: Likewise.
8676 * include/experimental/bits/simd_detail.h: Likewise.
8677 * include/experimental/bits/simd_fixed_size.h: Likewise.
8678 * include/experimental/bits/simd_math.h: Likewise.
8679 * include/experimental/bits/simd_neon.h: Likewise.
8680 * include/experimental/bits/simd_ppc.h: Likewise.
8681 * include/experimental/bits/simd_scalar.h: Likewise.
8682 * include/experimental/bits/simd_x86.h: Likewise.
8683 * include/experimental/bits/simd_x86_conversions.h: Likewise.
8684 * include/experimental/simd: Likewise.
8685 * testsuite/experimental/simd/*: Likewise.
8686
86872021-01-27 Jonathan Wakely <jwakely@redhat.com>
8688
8689 * doc/xml/manual/status_cxx2017.xml: Replace invalid entity.
8690 * doc/html/*: Regenerate.
8691
86922021-01-27 Jonathan Wakely <jwakely@redhat.com>
8693
8694 * testsuite/experimental/simd/generate_makefile.sh: Use printf
8695 instead of echo when printing escape characters.
8696
86972021-01-27 Matthias Kretz <kretz@kde.org>
8698
8699 * scripts/check_simd: New file. This script is called from the
8700 the check-simd target. It determines a set of compiler flags and
8701 simulator setups for calling generate_makefile.sh and passes the
8702 information back to the check-simd target, which recurses to the
8703 generated Makefiles.
8704 * scripts/create_testsuite_files: Remove files below simd/tests/
8705 from testsuite_files and place them in testsuite_files_simd.
8706 * testsuite/Makefile.am: Add testsuite_files_simd. Add
8707 check-simd target.
8708 * testsuite/Makefile.in: Regenerate.
8709 * testsuite/experimental/simd/driver.sh: New file. This script
8710 compiles and runs a given simd test, logging its output and
8711 status. It uses the timeout command to implement compile and
8712 test timeouts.
8713 * testsuite/experimental/simd/generate_makefile.sh: New file.
8714 This script generates a Makefile which uses driver.sh to compile
8715 and run the tests and collect the logs into a single log file.
8716 * testsuite/experimental/simd/tests/abs.cc: New file. Tests
8717 abs(simd).
8718 * testsuite/experimental/simd/tests/algorithms.cc: New file.
8719 Tests min/max(simd, simd).
8720 * testsuite/experimental/simd/tests/bits/conversions.h: New
8721 file. Contains functions to support tests involving conversions.
8722 * testsuite/experimental/simd/tests/bits/make_vec.h: New file.
8723 Support functions make_mask and make_vec.
8724 * testsuite/experimental/simd/tests/bits/mathreference.h: New
8725 file. Support functions to supply precomputed math function
8726 reference data.
8727 * testsuite/experimental/simd/tests/bits/metahelpers.h: New
8728 file. Support code for SFINAE testing.
8729 * testsuite/experimental/simd/tests/bits/simd_view.h: New file.
8730 * testsuite/experimental/simd/tests/bits/test_values.h: New
8731 file. Test functions to easily drive a test with simd objects
8732 initialized from a given list of values and a range of random
8733 values.
8734 * testsuite/experimental/simd/tests/bits/ulp.h: New file.
8735 Support code to determine the ULP distance of simd objects.
8736 * testsuite/experimental/simd/tests/bits/verify.h: New file.
8737 Test framework for COMPARE'ing simd objects and instantiating
8738 the test templates with value_type and ABI tag.
8739 * testsuite/experimental/simd/tests/broadcast.cc: New file. Test
8740 simd broadcasts.
8741 * testsuite/experimental/simd/tests/casts.cc: New file. Test
8742 simd casts.
8743 * testsuite/experimental/simd/tests/fpclassify.cc: New file.
8744 Test floating-point classification functions.
8745 * testsuite/experimental/simd/tests/frexp.cc: New file. Test
8746 frexp(simd).
8747 * testsuite/experimental/simd/tests/generator.cc: New file. Test
8748 simd generator constructor.
8749 * testsuite/experimental/simd/tests/hypot3_fma.cc: New file.
8750 Test 3-arg hypot(simd,simd,simd) and fma(simd,simd,sim).
8751 * testsuite/experimental/simd/tests/integer_operators.cc: New
8752 file. Test integer operators.
8753 * testsuite/experimental/simd/tests/ldexp_scalbn_scalbln_modf.cc:
8754 New file. Test ldexp(simd), scalbn(simd), scalbln(simd), and
8755 modf(simd).
8756 * testsuite/experimental/simd/tests/loadstore.cc: New file. Test
8757 (converting) simd loads and stores.
8758 * testsuite/experimental/simd/tests/logarithm.cc: New file. Test
8759 log*(simd).
8760 * testsuite/experimental/simd/tests/mask_broadcast.cc: New file.
8761 Test simd_mask broadcasts.
8762 * testsuite/experimental/simd/tests/mask_conversions.cc: New
8763 file. Test simd_mask conversions.
8764 * testsuite/experimental/simd/tests/mask_implicit_cvt.cc: New
8765 file. Test simd_mask implicit conversions.
8766 * testsuite/experimental/simd/tests/mask_loadstore.cc: New file.
8767 Test simd_mask loads and stores.
8768 * testsuite/experimental/simd/tests/mask_operator_cvt.cc: New
8769 file. Test simd_mask operators convert as specified.
8770 * testsuite/experimental/simd/tests/mask_operators.cc: New file.
8771 Test simd_mask compares, subscripts, and negation.
8772 * testsuite/experimental/simd/tests/mask_reductions.cc: New
8773 file. Test simd_mask reductions.
8774 * testsuite/experimental/simd/tests/math_1arg.cc: New file. Test
8775 1-arg math functions on simd.
8776 * testsuite/experimental/simd/tests/math_2arg.cc: New file. Test
8777 2-arg math functions on simd.
8778 * testsuite/experimental/simd/tests/operator_cvt.cc: New file.
8779 Test implicit conversions on simd binary operators behave as
8780 specified.
8781 * testsuite/experimental/simd/tests/operators.cc: New file. Test
8782 simd compares, subscripts, not, unary minus, plus, minus,
8783 multiplies, divides, increment, and decrement.
8784 * testsuite/experimental/simd/tests/reductions.cc: New file.
8785 Test reduce(simd).
8786 * testsuite/experimental/simd/tests/remqo.cc: New file. Test
8787 remqo(simd).
8788 * testsuite/experimental/simd/tests/simd.cc: New file. Basic
8789 sanity checks of simd types.
8790 * testsuite/experimental/simd/tests/sincos.cc: New file. Test
8791 sin(simd) and cos(simd).
8792 * testsuite/experimental/simd/tests/split_concat.cc: New file.
8793 Test split(simd) and concat(simd, simd).
8794 * testsuite/experimental/simd/tests/splits.cc: New file. Test
8795 split(simd_mask).
8796 * testsuite/experimental/simd/tests/trigonometric.cc: New file.
8797 Test remaining trigonometric functions on simd.
8798 * testsuite/experimental/simd/tests/trunc_ceil_floor.cc: New
8799 file. Test trunc(simd), ceil(simd), and floor(simd).
8800 * testsuite/experimental/simd/tests/where.cc: New file. Test
8801 masked operations using where.
8802
88032021-01-27 Matthias Kretz <kretz@kde.org>
8804
8805 * doc/xml/manual/status_cxx2017.xml: Add implementation status
8806 of the Parallelism TS 2. Document implementation-defined types
8807 and behavior.
8808 * include/Makefile.am: Add new headers.
8809 * include/Makefile.in: Regenerate.
8810 * include/experimental/simd: New file. New header for
8811 Parallelism TS 2.
8812 * include/experimental/bits/numeric_traits.h: New file.
8813 Implementation of P1841R1 using internal naming. Addition of
8814 missing IEC559 functionality query.
8815 * include/experimental/bits/simd.h: New file. Definition of the
8816 public simd interfaces and general implementation helpers.
8817 * include/experimental/bits/simd_builtin.h: New file.
8818 Implementation of the _VecBuiltin simd_abi.
8819 * include/experimental/bits/simd_converter.h: New file. Generic
8820 simd conversions.
8821 * include/experimental/bits/simd_detail.h: New file. Internal
8822 macros for the simd implementation.
8823 * include/experimental/bits/simd_fixed_size.h: New file. Simd
8824 fixed_size ABI specific implementations.
8825 * include/experimental/bits/simd_math.h: New file. Math
8826 overloads for simd.
8827 * include/experimental/bits/simd_neon.h: New file. Simd NEON
8828 specific implementations.
8829 * include/experimental/bits/simd_ppc.h: New file. Implement bit
8830 shifts to avoid invalid results for integral types smaller than
8831 int.
8832 * include/experimental/bits/simd_scalar.h: New file. Simd scalar
8833 ABI specific implementations.
8834 * include/experimental/bits/simd_x86.h: New file. Simd x86
8835 specific implementations.
8836 * include/experimental/bits/simd_x86_conversions.h: New file.
8837 x86 specific conversion optimizations. The conversion patterns
8838 work around missing conversion patterns in the compiler and
8839 should be removed as soon as PR85048 is resolved.
8840 * testsuite/experimental/simd/standard_abi_usable.cc: New file.
8841 Test that all (not all fixed_size<N>, though) standard simd and
8842 simd_mask types are usable.
8843 * testsuite/experimental/simd/standard_abi_usable_2.cc: New
8844 file. As above but with -ffast-math.
8845 * testsuite/libstdc++-dg/conformance.exp: Don't build simd tests
8846 from the standard test loop. Instead use
8847 check_vect_support_and_set_flags to build simd tests with the
8848 relevant machine flags.
8849
88502021-01-27 Jonathan Wakely <jwakely@redhat.com>
8851
8852 PR libstdc++/66414
8853 * include/bits/string_view.tcc
8854 (basic_string_view::find(const CharT*, size_type, size_type)):
8855 Optimize.
8856
88572021-01-27 Paul Fee <paul.f.fee@gmail.com>
8858
8859 * include/bits/basic_string.h (basic_string::contains): New
8860 member functions.
8861 * include/std/string_view (basic_string_view::contains):
8862 Likewise.
8863 * include/std/version (__cpp_lib_string_contains): Define.
8864 * testsuite/21_strings/basic_string/operations/starts_with/char/1.cc:
8865 Remove trailing whitespace.
8866 * testsuite/21_strings/basic_string/operations/starts_with/wchar_t/1.cc:
8867 Likewise.
8868 * testsuite/21_strings/basic_string/operations/contains/char/1.cc: New test.
8869 * testsuite/21_strings/basic_string/operations/contains/wchar_t/1.cc: New test.
8870 * testsuite/21_strings/basic_string_view/operations/contains/char/1.cc: New test.
8871 * testsuite/21_strings/basic_string_view/operations/contains/char/2.cc: New test.
8872 * testsuite/21_strings/basic_string_view/operations/contains/wchar_t/1.cc: New test.
8873
88742021-01-21 Jonathan Wakely <jwakely@redhat.com>
8875
8876 * src/c++17/Makefile.in: Regenerate.
8877
88782021-01-20 David Edelsohn <dje.gcc@gmail.com>
8879
8880 * config/os/aix/ctype_inline.h (bool ctype<char>:: is): Cast
8881 _OBJ_DATA subscript to unsigned char. Add _THREAD_SAFE access to
8882 __lc_type.
8883 (const char* ctype<char>:: is): Same.
8884
88852021-01-18 Jonathan Wakely <jwakely@redhat.com>
8886
8887 PR libstdc++/98725
8888 * testsuite/20_util/unique_ptr/io/lwg2948.cc: Do not try to
8889 write to a wide character stream if wide character support is
8890 disabled in the library.
8891
88922021-01-18 Jonathan Wakely <jwakely@redhat.com>
8893
8894 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Use
8895 stringbuf not wstringbuf.
8896
88972021-01-18 Jakub Jelinek <jakub@redhat.com>
8898
8899 PR debug/98708
8900 * src/c++11/Makefile.am (cxx11-ios_failure-lt.s, cxx11-ios_failure.s):
8901 Compile with -gno-as-loc-support.
8902 * src/c++11/Makefile.in: Regenerated.
8903
89042021-01-16 H.J. Lu <hjl.tools@gmail.com>
8905
8906 * testsuite/29_atomics/atomic_flag/test_and_set/explicit-hle.cc:
8907 Add -fcf-protection=none to -march=i486.
8908
89092021-01-14 François Dumont <fdumont@gcc.gnu.org>
8910
8911 * testsuite/23_containers/deque/debug/98466.cc: Make it pre-C++11
8912 compliant.
8913
89142021-01-14 Alexandre Oliva <oliva@adacore.com>
8915
8916 * testsuite/30_threads/future/members/poll.cc: Calibrate
8917 iteration count.
8918
89192021-01-14 François Dumont <fdumont@gcc.gnu.org>
8920
8921 PR libstdc++/98466
8922 * include/bits/hashtable_policy.h (_Node_iterator_base()): Set _M_cur to nullptr.
8923 (_Node_iterator()): Make default.
8924 (_Node_const_iterator()): Make default.
8925 * include/debug/macros.h (__glibcxx_check_erae_range_after): Add _M_singular
8926 iterator checks.
8927 * include/debug/safe_iterator.h
8928 (_GLIBCXX_DEBUG_VERIFY_OPERANDS): Accept if both iterator are value initialized.
8929 * include/debug/safe_local_iterator.h (_GLIBCXX_DEBUG_VERIFY_OPERANDS):
8930 Likewise.
8931 * include/debug/safe_iterator.tcc (_Safe_iterator<>::_M_valid_range): Add
8932 _M_singular checks on input iterators.
8933 * src/c++11/debug.cc (_Safe_iterator_base::_M_can_compare): Remove _M_singular
8934 checks.
8935 * testsuite/23_containers/deque/debug/98466.cc: New test.
8936 * testsuite/23_containers/unordered_map/debug/98466.cc: New test.
8937
89382021-01-14 Jonathan Wakely <jwakely@redhat.com>
8939
8940 PR libstdc++/98471
8941 * include/bits/fs_path.h (__throw_conversion_error): New
8942 function to throw or abort on character conversion errors.
8943 (__wstr_from_utf8): Move definition after filesystem_error has
8944 been defined. Use __throw_conversion_error.
8945 (path::_S_convert<_EcharT>): Use __throw_conversion_error.
8946 (path::_S_str_convert<_CharT, _Traits, _Allocator>): Likewise.
8947 (path::u8string): Likewise.
8948
89492021-01-14 Jonathan Wakely <jwakely@redhat.com>
8950
8951 * include/std/barrier: Update copyright years. Fix whitespace.
8952 * include/std/version: Fix whitespace.
8953 * testsuite/30_threads/barrier/1.cc: Update copyright years.
8954 * testsuite/30_threads/barrier/2.cc: Likewise.
8955 * testsuite/30_threads/barrier/arrive.cc: Likewise.
8956 * testsuite/30_threads/barrier/arrive_and_drop.cc: Likewise.
8957 * testsuite/30_threads/barrier/arrive_and_wait.cc: Likewise.
8958 * testsuite/30_threads/barrier/completion.cc: Likewise.
8959
89602021-01-13 Jonathan Wakely <jwakely@redhat.com>
8961
8962 * doc/doxygen/user.cfg.in (INPUT): Remove include/debug/array.
8963
89642021-01-10 David Edelsohn <dje.gcc@gmail.com>
8965
8966 PR libstdc++/98613
8967 * testsuite/ext/vstring/cons/moveable.cc: Suppress false positive
8968 warning.
8969 * testsuite/ext/vstring/modifiers/assign/move_assign.cc: Same.
8970
89712021-01-08 Olivier Hainque <hainque@adacore.com>
8972
8973 * testsuite/20_util/bind/ref_neg.cc: Tweak the
8974 dg-prune-output regex for out-of-build-tree contexts.
8975
89762021-01-07 Thomas Rodgers <trodgers@redhat.com>
8977
8978 * doc/doxygen/user.cfg.in: Add new header.
8979 * include/Makefile.am (std_headers): likewise.
8980 * include/Makefile.in: Regenerate.
8981 * include/precompiled/stdc++.h: Add new header.
8982 * include/std/barrier: New file.
8983 * include/std/version: Add __cpp_lib_barrier feature test macro.
8984 * testsuite/30_threads/barrier/1.cc: New test.
8985 * testsuite/30_threads/barrier/2.cc: Likewise.
8986 * testsuite/30_threads/barrier/arrive_and_drop.cc: Likewise.
8987 * testsuite/30_threads/barrier/arrive_and_wait.cc: Likewise.
8988 * testsuite/30_threads/barrier/arrive.cc: Likewise.
8989 * testsuite/30_threads/barrier/completion.cc: Likewise.
8990
89912021-01-07 Patrick Palka <ppalka@redhat.com>
8992
8993 PR libstdc++/98384
8994 * testsuite/20_util/to_chars/long_double.cc: Use nexttowardl
8995 instead of the non-standard nextupl and nextdownl.
8996
89972021-01-05 Samuel Thibault <samuel.thibault@ens-lyon.org>
8998
8999 * configure: Re-generate.
9000
90012021-01-05 Ed Smith-Rowland <3dw4rd@verizon.net>
9002
9003 * include/precompiled/stdc++.h: Add <source_location> to C++20 section.
9004
90052021-01-01 Jakub Jelinek <jakub@redhat.com>
9006
9007 * ChangeLog-2020: Rotate ChangeLog. New file.
9008\f
9009Copyright (C) 2021 Free Software Foundation, Inc.
9010
9011Copying and distribution of this file, with or without modification,
9012are permitted in any medium without royalty provided the copyright
9013notice and this notice are preserved.