1 2020-12-12 François Dumont <fdumont@gcc.gnu.org>
3 * include/debug/macros.h (__glibcxx_check_can_increment_range): Replace
4 _GLIBCXX_DEBUG_VERIFY_COND_AT usage with _GLIBCXX_DEBUG_VERIFY_AT_F.
5 (__glibcxx_check_can_decrement_range): Likewise.
6 * testsuite/25_algorithms/copy_backward/constexpr.cc (test03): New.
7 * testsuite/25_algorithms/copy/debug/constexpr_neg.cc: New test.
8 * testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc: New test.
9 * testsuite/25_algorithms/equal/constexpr_neg.cc: New test.
10 * testsuite/25_algorithms/equal/debug/constexpr_neg.cc: New test.
12 2020-12-10 Jonathan Wakely <jwakely@redhat.com>
15 * include/std/bit (__countl_one, __countr_one): Remove redundant
18 2020-12-09 Jonathan Wakely <jwakely@redhat.com>
20 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Define NO_SLEEP
21 if none of nanosleep, sleep and Sleep is available.
22 * config.h.in: Regenerate.
23 * configure: Regenerate.
24 * include/std/thread [_GLIBCXX_NO_SLEEP] (__sleep_for): Do
26 [_GLIBCXX_NO_SLEEP] (sleep_for, sleep_until): Do not
28 * src/c++11/thread.cc [_GLIBCXX_NO_SLEEP] (__sleep_for): Do
31 2020-12-08 Jason Merrill <jason@redhat.com>
34 * testsuite/18_support/comparisons/algorithms/partial_order.cc:
35 One more line needs to use VERIFY instead of static_assert.
37 2020-12-08 Jonathan Wakely <jwakely@redhat.com>
39 * doc/xml/manual/appendix_contributing.xml: Use consistent
41 * doc/html/manual/source_code_style.html: Regenerate.
43 2020-12-05 Iain Sandoe <iain@sandoe.co.uk>
46 * configure: Regenerate.
48 2020-12-04 Jakub Jelinek <jakub@redhat.com>
51 * testsuite/18_support/source_location/1.cc (main): Adjust for
52 __builtin_source_location using __PRETTY_FUNCTION__-like names instead
54 * testsuite/18_support/source_location/consteval.cc (main): Likewise.
56 2020-12-03 Martin Sebor <msebor@redhat.com>
58 * testsuite/ext/vstring/modifiers/clear/56166.cc: Suppress a false
61 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
63 * testsuite/26_numerics/bit/bit.cast/bit_cast.cc: Remove stray
65 * testsuite/26_numerics/bit/bit.cast/version.cc: Likewise.
67 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
69 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
70 * doc/html/*: Regenerate.
72 2020-12-03 JeanHeyd Meneide <phdofthehouse@gmail.com>
74 * doc/doxygen/user.cfg.in (INPUT): Add <source_location>.
75 * include/Makefile.am: Add <source_location>.
76 * include/Makefile.in: Regenerate.
77 * include/std/version (__cpp_lib_source_location): Define.
78 * include/std/source_location: New file.
79 * testsuite/18_support/source_location/1.cc: New test.
80 * testsuite/18_support/source_location/consteval.cc: New test.
81 * testsuite/18_support/source_location/srcloc.h: New test.
82 * testsuite/18_support/source_location/version.cc: New test.
84 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
87 * include/std/bit (__cpp_lib_bit_cast, bit_cast): Define.
88 * include/std/version (__cpp_lib_bit_cast): Define.
89 * testsuite/26_numerics/bit/bit.cast/bit_cast.cc: New test.
90 * testsuite/26_numerics/bit/bit.cast/version.cc: New test.
92 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
94 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt:
96 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt:
99 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
101 * include/std/array (array::operator[](size_t) const, array::front() const)
102 (array::back() const) [__cplusplus == 201103]: Disable
104 * testsuite/23_containers/array/element_access/constexpr_element_access.cc:
105 Check for correct values.
106 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
107 Adjust dg-error line numbers.
108 * testsuite/23_containers/array/debug/constexpr_c++11.cc: New test.
110 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
114 * python/libstdcxx/v6/printers.py (function_pointer_to_name):
115 New helper function to get the name of a function from its
117 (StdExpAnyPrinter.__init__): Use it.
119 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
121 * testsuite/lib/dg-options.exp (add_options_for_libatomic):
122 Replace powerpc-ibm-aix* and powerpc*-*-darwin* with check for
125 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
127 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Add
128 dg-timeout-factor for ilp32 targets.
129 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
132 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
134 * include/ext/rope (rope::_S_concat_char_iter)
135 (rope::_S_destr_concat_char_iter): Add allocator parameter.
136 (rope::push_back, rope::append, rope::insert, operator+):
138 * include/ext/ropeimpl.h (rope::_S_concat_char_iter)
139 (rope::_S_destr_concat_char_iter): Add allocator parameter
141 (_Rope_char_ref_proxy::operator=(_CharT)): Pass allocator.
143 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
145 * include/ext/rope: Fix indentation of access specifiers.
147 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
149 * include/bits/atomic_timed_wait.h: Use #if instead of #ifdef.
150 * include/bits/semaphore_base.h: Likewise.
151 * include/std/version: Remove trailing whitespace.
153 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
155 * python/libstdcxx/v6/printers.py (StdExpPathPrinter): Store the
156 name of the type and pass it to the iterator.
157 (StdPathPrinter): Likewise.
158 * testsuite/libstdc++-prettyprinters/filesystem-ts.cc: New test.
160 2020-12-01 Thomas Rodgers <trodgers@redhat.com>
162 * include/bits/atomic_base.h: Replace usage of
163 _GLIBCXX_HAVE_ATOMIC_WAIT with __cpp_lib_atomic_wait.
164 * include/bits/atomic_timed_wait.h: Likewise.
165 * include/bits/atomic_wait.h: Define __cpp_lib_atomic_wait
167 * include/bits/semaphore_base.h: Replace usage of
168 _GLIBCXX_HAVE_ATOMIC_WAIT with __cpp_lib_atomic_wait.
169 * include/std/atomic: Likewise.
170 * include/std/latch: Likewise.
171 * include/std/semaphore: Likewise.
172 * include/std/version: Define __cpp_lib_atomic wait
173 feature test macro and replace usage of
174 _GLIBCXX_HAVE_ATOMIC_WAIT.
175 * testsuite/29_atomics/atomic/wait_notify/1.cc: New test.
176 * testsuite/29_atomics/atomic/wait_notify/2.cc: Likewise.
178 2020-12-01 Michael Weghorn <m.weghorn@posteo.de>
180 * python/libstdcxx/v6/printers.py (StdBitIteratorPrinter)
181 (StdBitReferencePrinter): Add pretty-printers for
182 _Bit_reference, _Bit_iterator and _Bit_const_iterator.
183 * testsuite/libstdc++-prettyprinters/simple.cc: Test
184 std::_Bit_reference, std::_Bit_iterator and
185 std::_Bit_const_iterator.
186 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
188 2020-12-01 Jonathan Wakely <jwakely@redhat.com>
190 * include/bits/c++config (_GLIBCXX_HAS_BUILTIN): Define macro to
191 work around different implementations of __has_builtin.
192 (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
193 (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE)
194 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED)
195 (_GLIBCXX_HAVE_BUILTIN_IS_SAME, _GLIBCXX_HAVE_BUILTIN_LAUNDER):
196 Define using _GLIBCXX_HAS_BUILTIN.
198 2020-12-01 Jonathan Wakely <jwakely@redhat.com>
200 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: Add
201 dg-timeout-factor directive.
202 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc:
205 2020-12-01 Jonathan Wakely <jwakely@redhat.com>
208 * testsuite/27_io/basic_syncbuf/sync_ops/1.cc: Add options for
211 2020-11-30 Jonathan Wakely <jwakely@redhat.com>
213 * doc/doxygen/user.cfg.in (INPUT): Add <latch> and <semaphore>.
215 2020-11-30 Jonathan Wakely <jwakely@redhat.com>
217 * testsuite/lib/libstdc++.exp (libstdc++_init): Reduce
218 default tool_timeout to 360.
220 2020-11-30 Jonathan Wakely <jwakely@redhat.com>
222 * testsuite/20_util/specialized_algorithms/pstl/*: Add
224 * testsuite/25_algorithms/pstl/*: Likewise.
225 * testsuite/26_numerics/pstl/*: Likewise.
226 * testsuite/28_regex/*: Likewise.
228 2020-11-29 John David Anglin <danglin@gcc.gnu.org>
230 * configure: Regenerate.
232 2020-11-27 Jonathan Wakely <jwakely@redhat.com>
234 * testsuite/lib/libstdc++.exp (v3_try_preprocess): Define
235 new proc to preprocess a chunk of code.
236 (v3_check_preprocessor_condition): Define new proc to test
237 a preprocessor condition depending on GCC or libstdc++ macros.
238 (check_v3_target_debug_mode, check_v3_target_normal_mode):
239 Use v3_try_preprocess.
240 (check_v3_target_normal_namespace)
241 (check_v3_target_parallel_mode, check_v3_target_cstdint)
242 (check_v3_target_cmath, check_v3_target_atomic_builtins)
243 (check_v3_target_gthreads, check_v3_target_gthreads_timed)
244 (check_v3_target_sleep, check_v3_target_sched_yield)
245 (check_v3_target_string_conversions, check_v3_target_swprintf)
246 (check_v3_target_binary_io, check_v3_target_nprocs): Use
247 v3_check_preprocessor_condition.
248 (check_effective_target_cxx11): Likewise.
249 (check_effective_target_random_device): Likewise.
250 (check_effective_target_tbb-backend): Likewise.
251 (check_effective_target_futex): Likewise.
252 (check_v3_target_little_endian) Call check_effective_target_le.
253 (check_effective_target_atomic-builtins): New proc to define
254 new effective-target keyword.
255 (check_effective_target_gthreads-timed): Likewise.
257 2020-11-27 Jonathan Wakely <jwakely@redhat.com>
259 * testsuite/27_io/filesystem/operations/absolute.cc: Avoid
260 -Wrange-loop-construct warning.
261 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
262 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
263 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
264 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
265 * testsuite/27_io/filesystem/path/decompose/extension.cc:
267 * testsuite/27_io/filesystem/path/decompose/filename.cc:
269 * testsuite/27_io/filesystem/path/decompose/parent_path.cc:
271 * testsuite/27_io/filesystem/path/decompose/relative_path.cc:
273 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
275 * testsuite/27_io/filesystem/path/decompose/root_path.cc:
277 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
278 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
280 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
282 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
284 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
285 * testsuite/27_io/filesystem/path/nonmember/cmp.cc: Likewise.
286 * testsuite/27_io/filesystem/path/nonmember/cmp_c++20.cc:
288 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
290 * testsuite/27_io/filesystem/path/query/has_extension.cc:
292 * testsuite/27_io/filesystem/path/query/has_filename.cc:
294 * testsuite/27_io/filesystem/path/query/has_parent_path.cc:
296 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
298 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
300 * testsuite/27_io/filesystem/path/query/has_root_name.cc:
302 * testsuite/27_io/filesystem/path/query/has_root_path.cc:
304 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
305 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
306 * testsuite/experimental/filesystem/operations/absolute.cc:
308 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
309 * testsuite/experimental/filesystem/path/compare/path.cc:
311 * testsuite/experimental/filesystem/path/construct/copy.cc:
313 * testsuite/experimental/filesystem/path/decompose/extension.cc:
315 * testsuite/experimental/filesystem/path/decompose/filename.cc:
317 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
319 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
321 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
323 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
325 * testsuite/experimental/filesystem/path/itr/traversal.cc:
327 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
329 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
331 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
333 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
335 * testsuite/experimental/filesystem/path/query/has_extension.cc:
337 * testsuite/experimental/filesystem/path/query/has_filename.cc:
339 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
341 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
343 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
345 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
347 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
349 * testsuite/experimental/filesystem/path/query/has_stem.cc:
351 * testsuite/experimental/filesystem/path/query/is_relative.cc:
354 2020-11-27 Jonathan Wakely <jwakely@redhat.com>
356 * src/c++98/locale.cc (locale::facet::_S_get_c_locale()):
357 Revert change to use __is_single_threaded.
358 * src/c++98/locale_init.cc (locale::_S_initialize()):
361 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
363 * include/bits/atomic_wait.h (_GLIBCXX_HAVE_ATOMIC_WAIT):
365 * include/bits/atomic_base.h: Check _GLIBCXX_HAVE_ATOMIC_WAIT.
366 * include/bits/atomic_timed_wait.h: Likewise.
367 * include/bits/semaphore_base.h: Likewise.
368 * include/std/atomic: Likewise.
369 * include/std/latch: Likewise.
370 * include/std/semaphore: Likewise.
372 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
374 * include/std/latch: Depend on _GLIBCXX_HAS_GTHREADS and
375 _GLIBCXX_HAVE_LINUX_FUTEX.
376 * include/std/version (__cpp_lib_latch): Define conditionally.
378 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
380 * testsuite/lib/libstdc++.exp (check_effective_target_gthreads):
381 Call check_v3_target_gthreads not check_v3_target_gthreads_timed.
383 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
385 * testsuite/28_regex/algorithms/regex_match/basic/string_range_01_03.cc:
386 Add dg-timeout-factor directive.
387 * testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc:
389 * testsuite/28_regex/algorithms/regex_match/ecma/char/backref.cc:
391 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/63199.cc:
393 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/anymatcher.cc:
395 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/cjk_match.cc:
397 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc:
399 * testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc:
401 * testsuite/28_regex/algorithms/regex_search/61720.cc: Likewise.
402 * testsuite/28_regex/algorithms/regex_search/ecma/assertion.cc:
404 * testsuite/28_regex/algorithms/regex_search/ecma/string_01.cc:
406 * testsuite/28_regex/basic_regex/ctors/deduction.cc: Likewise.
408 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
410 * testsuite/lib/libstdc++.exp (libstdc++_init): Only set
411 tool_timeout if it hasn't been set by the user already.
413 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
416 * testsuite/29_atomics/atomic/wait_notify/bool.cc: Fix missed
417 notifications by making the new thread wait until the parent
418 thread is waiting on the condition variable.
419 * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
420 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
421 * testsuite/29_atomics/atomic_ref/wait_notify.cc: Likewise.
423 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
425 * testsuite/18_support/96817.cc: Use new effective-target
426 keywords to select supported targets more effectively.
427 * testsuite/30_threads/call_once/66146.cc: Likewise.
428 * testsuite/lib/libstdc++.exp (check_effective_target_futex):
430 (check_effective_target_gthreads): Define new proc to replace
433 2020-11-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
435 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Remove libposix4
437 <solaris*>: Don't use -lrt any longer.
438 * configure: Regenerate.
439 * doc/xml/manual/configure.xml (--enable-libstdcxx-time=OPTION):
440 Remove libposix4 reference.
442 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
445 * testsuite/ext/stdio_filebuf/char/79820.cc: Do not pass invalid
446 FILE* to constructor.
448 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
450 * include/precompiled/stdc++.h: Add new headers.
451 * include/std/stop_token: Include <semaphore> unconditionally.
453 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
455 * include/bits/atomic_timed_wait.h (__cond_wait_until): Do not
456 perform redundant conversions to the same clock.
458 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
460 * include/bits/atomic_timed_wait.h (__cond_wait_until_impl):
461 Do not define when _GLIBCXX_HAVE_LINUX_FUTEX is defined. Use
462 __condvar and mutex instead of __gthread_cond_t and
464 (__cond_wait_until): Likewise. Fix test for return value of
465 __cond_wait_until_impl.
466 (__timed_waiters::_M_do_wait_until): Use __condvar instead
468 * include/bits/atomic_wait.h: Remove <bits/unique_lock.h>
469 include. Only include <bits/std_mutex.h> if not using futexes.
470 (__platform_wait_max_value): Remove unused variable.
471 (__waiters::lock_t): Use lock_guard instead of unique_lock.
472 (__waiters::_M_cv): Use __condvar instead of __gthread_cond_t.
473 (__waiters::_M_do_wait(__platform_wait_t)): Likewise.
474 (__waiters::_M_notify()): Likewise. Use notify_one() if not
476 * include/bits/std_mutex.h (__condvar): New type.
477 * include/std/condition_variable (condition_variable::_M_cond)
478 (condition_variable::wait_until): Use __condvar instead of
480 * src/c++11/condition_variable.cc (condition_variable): Define
481 default constructor and destructor as defaulted.
482 (condition_variable::wait, condition_variable::notify_one)
483 (condition_variable::notify_all): Forward to corresponding
484 member function of __condvar.
486 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
489 * testsuite/29_atomics/atomic/wait_notify/bool.cc: Re-eneable
491 * testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
492 * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
493 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
494 * testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
495 * testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
496 * testsuite/util/atomic/wait_notify_util.h: Fix missed
497 notifications by making the new thread wait until the parent
498 thread is waiting on the condition variable.
500 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
503 * include/bits/iterator_concepts.h (__detail::__iter_without_category):
505 (__iterator_traits::__cat): Use __detail::__iter_without_category.
506 * testsuite/24_iterators/associated_types/iterator.traits.cc: New test.
508 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
510 * testsuite/17_intro/names.cc: Do not test 'v' on AIX.
512 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
515 * include/bits/atomic_wait.h (__platform_wait): Check errno,
516 not just the value of EAGAIN.
517 (__waiters::__waiters()): Fix name of data member.
519 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
522 * include/bits/atomic_wait.h (__platform_wait): Return if futex
524 * testsuite/30_threads/latch/3.cc: Re-enable test.
525 * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
527 2020-11-24 Jonathan Wakely <jwakely@redhat.com>
531 * testsuite/29_atomics/atomic_integral/wait_notify.cc: Disable.
532 Do not require pthreads, but add -pthread when appropriate.
533 * testsuite/30_threads/jthread/95989.cc: Likewise.
534 * testsuite/30_threads/latch/3.cc: Likewise.
535 * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
537 2020-11-24 Jonathan Wakely <jwakely@redhat.com>
539 * testsuite/30_threads/jthread/95989.cc: Run all three test
540 functions, not just the first one twice.
542 2020-11-24 Jonathan Wakely <jwakely@redhat.com>
545 * src/c++11/thread.cc (thread::_M_start_thread(_State_ptr, void (*)())):
546 Check that gthreads is available before calling __gthread_create.
548 2020-11-24 Jonathan Wakely <jwakely@redhat.com>
550 * src/c++98/locale.cc (locale::facet::_S_get_c_locale())
551 (locale::id::_M_id() const): Use __is_single_threaded.
552 * src/c++98/locale_init.cc (locale::_S_initialize()):
555 2020-11-23 Jonathan Wakely <jwakely@redhat.com>
557 * include/bits/semaphore_base.h
558 (__platform_semaphore::_M_try_acquire_until): Fix type of
561 2020-11-23 Stephan Bergmann <sbergman@redhat.com>
563 * include/bits/atomic_wait.h (__thread_relax, __thread_yield):
566 2020-11-23 Jonathan Wakely <jwakely@redhat.com>
568 * acinclude.m4 (GLIBCXX_CHECK_GTHREADS): Check for
569 * config.h.in: Regenerate.
570 * configure: Regenerate.
571 * include/bits/semaphore_base.h (_GLIBCXX_HAVE_POSIX_SEMAPHORE):
572 Check autoconf macro instead of defining it here.
574 2020-11-23 Jonathan Wakely <jwakely@redhat.com>
576 * include/bits/atomic_wait.h: Do not define anything unless
577 gthreads or futexes are available.
578 * include/bits/atomic_timed_wait.h: Likewise.
579 * include/bits/semaphore_base.h: Likewise.
580 * include/std/semaphore: Likewise.
581 * include/bits/atomic_base.h (atomic_flag::wait)
582 (atomic_flag::notify_one, atomic_flag::notify_all)
583 (__atomic_base<I>::wait, __atomic_base<I>::notify_one)
584 (__atomic_base<I>::notify_all, __atomic_base<P*>::wait)
585 (__atomic_base<P*>::notify_one, __atomic_base<P*>::notify_all)
586 (__atomic_impl::wait, __atomic_impl::notify_one)
587 (__atomic_impl::notify_all, __atomic_float::wait)
588 (__atomic_float::notify_one, __atomic_float::notify_all)
589 (__atomic_ref::wait, __atomic_ref::notify_one)
590 (__atomic_ref::notify_all): Only define if gthreads or futexes
592 * include/std/atomic (atomic::wait, atomic::notify_one)
593 (atomic::notify_all): Likewise.
594 * include/std/version (__cpp_lib_semaphore): Define
597 2020-11-23 Jonathan Wakely <jwakely@redhat.com>
600 * testsuite/29_atomics/atomic_float/wait_notify.cc: Add options
602 * testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
603 * testsuite/29_atomics/atomic_ref/wait_notify.cc: Likewise.
605 2020-11-21 Jonathan Wakely <jwakely@redhat.com>
607 * include/bits/atomic_base.h (atomic_flag::wait): Use correct
608 type for __atomic_wait call.
609 * include/bits/atomic_timed_wait.h (__atomic_wait_until): Check
610 _GLIBCXX_HAVE_LINUX_FUTEX.
611 * include/bits/atomic_wait.h (__atomic_notify): Likewise.
612 * include/bits/semaphore_base.h (_GLIBCXX_HAVE_POSIX_SEMAPHORE):
613 Only define if SEM_VALUE_MAX or _POSIX_SEM_VALUE_MAX is defined.
614 * testsuite/29_atomics/atomic/wait_notify/bool.cc: Disable on
616 * testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
617 * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
618 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
619 * testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
621 2020-11-20 Thomas Rodgers <trodgers@redhat.com>
623 * include/Makefile.am (bits_headers): Add new header.
624 * include/Makefile.in: Regenerate.
625 * include/bits/atomic_base.h (__atomic_flag::wait): Define.
626 (__atomic_flag::notify_one): Likewise.
627 (__atomic_flag::notify_all): Likewise.
628 (__atomic_base<_Itp>::wait): Likewise.
629 (__atomic_base<_Itp>::notify_one): Likewise.
630 (__atomic_base<_Itp>::notify_all): Likewise.
631 (__atomic_base<_Ptp*>::wait): Likewise.
632 (__atomic_base<_Ptp*>::notify_one): Likewise.
633 (__atomic_base<_Ptp*>::notify_all): Likewise.
634 (__atomic_impl::wait): Likewise.
635 (__atomic_impl::notify_one): Likewise.
636 (__atomic_impl::notify_all): Likewise.
637 (__atomic_float<_Fp>::wait): Likewise.
638 (__atomic_float<_Fp>::notify_one): Likewise.
639 (__atomic_float<_Fp>::notify_all): Likewise.
640 (__atomic_ref<_Tp>::wait): Likewise.
641 (__atomic_ref<_Tp>::notify_one): Likewise.
642 (__atomic_ref<_Tp>::notify_all): Likewise.
643 (atomic_wait<_Tp>): Likewise.
644 (atomic_wait_explicit<_Tp>): Likewise.
645 (atomic_notify_one<_Tp>): Likewise.
646 (atomic_notify_all<_Tp>): Likewise.
647 * include/bits/atomic_wait.h: New file.
648 * include/bits/atomic_timed_wait.h: New file.
649 * include/bits/semaphore_base.h: New file.
650 * include/std/atomic (atomic<bool>::wait): Define.
651 (atomic<bool>::wait_one): Likewise.
652 (atomic<bool>::wait_all): Likewise.
653 (atomic<_Tp>::wait): Likewise.
654 (atomic<_Tp>::wait_one): Likewise.
655 (atomic<_Tp>::wait_all): Likewise.
656 (atomic<_Tp*>::wait): Likewise.
657 (atomic<_Tp*>::wait_one): Likewise.
658 (atomic<_Tp*>::wait_all): Likewise.
659 * include/std/latch: New file.
660 * include/std/semaphore: New file.
661 * include/std/version: Add __cpp_lib_semaphore and
662 __cpp_lib_latch defines.
663 * testsuite/29_atomics/atomic/wait_notify/bool.cc: New test.
664 * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
665 * testsuite/29_atomics/atomic/wait_notify/generic.cc: Liekwise.
666 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
667 * testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
668 * testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
669 * testsuite/29_atomics/atomic_ref/wait_notify.cc: Likewise.
670 * testsuite/30_threads/semaphore/1.cc: New test.
671 * testsuite/30_threads/semaphore/2.cc: Likewise.
672 * testsuite/30_threads/semaphore/least_max_value_neg.cc: Likewise.
673 * testsuite/30_threads/semaphore/try_acquire.cc: Likewise.
674 * testsuite/30_threads/semaphore/try_acquire_for.cc: Likewise.
675 * testsuite/30_threads/semaphore/try_acquire_posix.cc: Likewise.
676 * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
677 * testsuite/30_threads/latch/1.cc: New test.
678 * testsuite/30_threads/latch/2.cc: New test.
679 * testsuite/30_threads/latch/3.cc: New test.
680 * testsuite/util/atomic/wait_notify_util.h: New File.
682 2020-11-20 François Dumont <fdumont@gcc.gnu.org>
685 * include/bits/stl_tempbuf.h (get_temporary_buffer): Change __len
686 computation in the loop to avoid truncation.
687 * include/bits/stl_algo.h:
688 (__inplace_merge): Take temporary buffer length from smallest range.
689 (__stable_sort): Limit temporary buffer length.
690 * testsuite/25_algorithms/inplace_merge/1.cc (test4): New.
691 * testsuite/performance/25_algorithms/stable_sort.cc: Test stable_sort
692 under different heap memory conditions.
693 * testsuite/performance/25_algorithms/inplace_merge.cc: New test.
695 2020-11-20 François Dumont <fdumont@gcc.gnu.org>
697 * include/bits/move.h (_GLIBCXX_FWDREF): New.
698 * include/bits/stl_tree.h: Adapt to use latter.
699 (_Rb_tree<>::_M_clone_node): Add _MoveValue template parameter.
700 (_Rb_tree<>::_M_mbegin): New.
701 (_Rb_tree<>::_M_begin): Use latter.
702 (_Rb_tree<>::_M_copy): Add _MoveValues template parameter.
703 * testsuite/23_containers/map/allocator/move_cons.cc: New test.
704 * testsuite/23_containers/multimap/allocator/move_cons.cc: New test.
705 * testsuite/23_containers/multiset/allocator/move_cons.cc: New test.
706 * testsuite/23_containers/set/allocator/move_cons.cc: New test.
708 2020-11-20 Jonathan Wakely <jwakely@redhat.com>
711 * include/std/regex (pmr::smatch, pmr::wsmatch): Declare using
712 underlying __normal_iterator type, not nested typedef
713 basic_string::const_iterator.
715 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
718 * config/os/gnu-linux/os_defines.h (_GLIBCXX_NATIVE_THREAD_ID):
719 Define new macro to get reliable thread ID.
720 * include/bits/std_thread.h: (this_thread::get_id): Use new
721 macro if it's defined.
722 * testsuite/30_threads/jthread/95989.cc: New test.
723 * testsuite/30_threads/this_thread/95989.cc: New test.
725 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
727 * testsuite/30_threads/async/async.cc: Include <thread>.
728 * testsuite/30_threads/future/members/93456.cc: Likewise.
730 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
733 * include/Makefile.am: Add new <bits/std_thread.h> header.
734 * include/Makefile.in: Regenerate.
735 * include/std/future: Include new header instead of <thread>.
736 * include/std/stop_token: Include new header instead of
738 (stop_token::_S_yield()): Use this_thread::yield().
739 (_Stop_state_t::_M_requester): Change type to std::thread::id.
740 (_Stop_state_t::_M_request_stop()): Use this_thread::get_id().
741 (_Stop_state_t::_M_remove_callback(_Stop_cb*)): Likewise.
742 Use __is_single_threaded() to decide whether to synchronize.
743 * include/std/thread (thread, operator==, this_thread::get_id)
744 (this_thread::yield): Move to new header.
745 (operator<=>, operator!=, operator<, operator<=, operator>)
746 (operator>=, hash<thread::id>, operator<<): Define even when
747 gthreads not available.
748 * src/c++11/thread.cc: Include <memory>.
749 * include/bits/std_thread.h: New file.
750 (thread, operator==, this_thread::get_id, this_thread::yield):
751 Define even when gthreads not available.
752 [!_GLIBCXX_HAS_GTHREADS] (thread::join, thread::detach)
753 (thread::hardware_concurrency): Define inline.
755 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
759 * src/c++11/futex.cc (syscall_time_t): New typedef for
760 the type of the syscall_timespec::tv_sec member.
761 (relative_timespec, _M_futex_wait_until)
762 (_M_futex_wait_until_steady): Use syscall_time_t in overflow
765 2020-11-18 Patrick Palka <ppalka@redhat.com>
767 * include/std/ranges (join_view::_Iterator::_M_satisfy): Uglify
768 local variable inner.
769 (join_view::_Iterator::operator->): Use _Inner_iter instead of
770 _Outer_iter in the function signature as per LWG 3500.
771 * testsuite/std/ranges/adaptors/join.cc (test08): Test it.
773 2020-11-17 Jonathan Wakely <jwakely@redhat.com>
776 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Fail if struct
777 timespec isn't compatible with SYS_clock_gettime.
778 * configure: Regenerate.
779 * src/c++11/chrono.cc: Revert changes for time64 compatibility.
780 Add static_assert instead.
781 * src/c++11/futex.cc (_M_futex_wait_until_steady): Assume
782 SYS_clock_gettime can use struct timespec.
784 2020-11-17 Jonathan Wakely <jwakely@redhat.com>
787 * include/precompiled/stdc++.h: Include <coroutine>.
788 * include/std/version (__cpp_lib_span): Check __cpp_lib_concepts
791 2020-11-17 Patrick Palka <ppalka@redhat.com>
794 * include/bits/ranges_algo.h (__search_n_fn::operator()): Check
795 random_access_iterator before using the backtracking
796 implementation. When the backwards scan fails prematurely,
797 reset __remainder appropriately.
798 * testsuite/25_algorithms/search_n/97828.cc: New test.
800 2020-11-16 Jonathan Wakely <jwakely@redhat.com>
802 * src/Makefile.am (libstdc++-symbols.ver-sun): Remove -lrt from
803 arguments passed to make_sunver.pl script.
804 * src/Makefile.in: Regenerate.
806 2020-11-15 Jason Merrill <jason@redhat.com>
808 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Adjust.
810 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
813 * src/c++11/chrono.cc [_GLIBCXX_USE_CLOCK_GETTIME_SYSCALL]
814 (syscall_timespec): Define a type suitable for SYS_clock_gettime
816 (system_clock::now(), steady_clock::now()): Use syscall_timespec
818 * src/c++11/futex.cc (syscall_timespec): Define a type suitable
819 for SYS_futex and SYS_clock_gettime calls.
820 (relative_timespec): Use syscall_timespec instead of timespec.
821 (__atomic_futex_unsigned_base::_M_futex_wait_until): Likewise.
822 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
825 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
828 * src/c++11/futex.cc (relative_timespec): Remove redundant check
830 * testsuite/30_threads/future/members/wait_until_overflow.cc: Moved to...
831 * testsuite/30_threads/future/members/93456.cc: ...here.
833 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
835 * src/c++11/futex.cc (relative_timespec): Add [[unlikely]]
837 (__atomic_futex_unsigned_base::_M_futex_wait_until)
838 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
840 * testsuite/30_threads/future/members/wait_until_overflow.cc:
843 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
845 * src/c++11/futex.cc (relative_timespec): New function to
846 create relative time from two absolute times.
847 (__atomic_futex_unsigned_base::_M_futex_wait_until)
848 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
849 Use relative_timespec.
851 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
853 * testsuite/30_threads/future/members/poll.cc: Require gthreads
854 and add -pthread for targets that require it. Relax required
855 ratio of wait_for calls before/after the future is ready.
857 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
859 * include/std/future (future::wait_for): Do not wait for
860 durations less than or equal to zero.
861 * src/c++11/futex.cc (_M_futex_wait_until)
862 (_M_futex_wait_until_steady): Do not wait for timeouts before
864 * testsuite/30_threads/future/members/poll.cc: New test.
866 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
868 * include/ext/numeric_traits.h (__numeric_traits): Change
869 primary template to always derive from __numeric_traits_integer.
870 (__numeric_traits<float>, __numeric_traits<double>)
871 (__numeric_traits<long double>): Add explicit specializations.
873 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
876 * include/ext/numeric_traits.h (__glibcxx_signed)
877 (__glibcxx_digits, __glibcxx_min, __glibcxx_max): Remove
879 (__is_integer_nonstrict::__width): Define new constant.
880 (__numeric_traits_integer): Define constants in terms of each
881 other and __is_integer_nonstrict::__width, rather than the
883 (_GLIBCXX_INT_N_TRAITS): Macro to define explicit
884 specializations for non-standard integer types.
886 2020-11-11 Jonathan Yong <10walls@gmail.com>
888 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Exclude
889 cygwin and mingw from relro linker test.
890 * configure: Regenerate.
892 2020-11-11 Paul Scharnofske <asynts@gmail.com>
894 * include/std/thread (jthread::operator=(jthread&&)): Transfer
895 any existing state to a temporary that will request a stop and
897 * testsuite/30_threads/jthread/jthread.cc: Test move assignment.
899 2020-11-11 Jonathan Wakely <jwakely@redhat.com>
901 * include/std/stop_token (_Stop_state_t::_M_requester): Define
902 new struct with members to store and check the thread ID.
903 (_Stop_state_t::_M_request_stop()): Use _M_requester._M_set().
904 (_Stop_state_t::_M_remove_callback(_Stop_cb*)): Use
905 _M_requester._M_is_current_thread().
907 2020-11-11 Jonathan Wakely <jwakely@redhat.com>
909 * include/std/ostream (__syncbuf_base): New class template.
910 (emit_on_flush, noemit_on_flush, flush_emit): New manipulators.
911 * include/std/syncstream (basic_syncbuf): Derive from
912 __syncbuf_base instead of basic_streambuf.
913 (basic_syncbuf::operator=): Remove self-assignment check.
914 (basic_syncbuf::swap): Remove self-swap check.
915 (basic_syncbuf::emit): Do not skip pubsync() call if sequence
917 (basic_syncbuf::sync): Remove no-op pubsync on stringbuf.
918 (basic_syncbuf::overflow): Define override.
919 * testsuite/27_io/basic_syncstream/basic_ops/1.cc: Test
920 basic_osyncstream::put(char_type).
921 * testsuite/27_io/basic_ostream/emit/1.cc: New test.
923 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
925 * config/locale/generic/c_locale.cc (__set_C_locale()): New function
926 to set the "C" locale and return the name of the previous locale.
927 (__convert_to_v<float>, __convert_to_v<double>)
928 (__convert_to_v<long double>): Use __set_C_locale and set failbit on
931 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
933 * include/std/sstream (basic_stringbug, basic_istringstream)
934 (basic_ostringstream, basic_stringstream): Reorder C++20
935 constructors to be declared next to other constructors.
937 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
939 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten patterns.
940 (GLIBCXX_3.4.29): Export new symbols.
941 * include/bits/alloc_traits.h (__allocator_like): New concept.
942 * include/std/sstream (basic_stringbuf::swap): Add exception
944 (basic_stringbuf::str() const): Add ref-qualifier. Use new
945 _M_high_mark function.
946 (basic_stringbuf::str(const SAlloc&) const): Define new function.
947 (basic_stringbuf::str() &&): Likewise.
948 (basic_stringbuf::str(const basic_string<C,T,SAlloc>&)):
950 (basic_stringbuf::str(basic_string<C,T,Alloc>&&)): Likewise.
951 (basic_stringbuf::view() const): Use _M_high_mark.
952 (basic_istringstream::str, basic_ostringstream::str)
953 (basic_stringstream::str): Define new overloads.
954 * src/c++20/sstream-inst.cc (basic_stringbuf::str)
955 (basic_istringstream::str, basic_ostringstream::str)
956 (basic_stringstream::str): Explicit instantiation definitions
958 * testsuite/27_io/basic_istringstream/view/char/1.cc: Add more
960 * testsuite/27_io/basic_istringstream/view/wchar_t/1.cc:
962 * testsuite/27_io/basic_ostringstream/view/char/1.cc:
964 * testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc:
966 * testsuite/27_io/basic_stringstream/view/char/1.cc:
968 * testsuite/27_io/basic_stringstream/view/wchar_t/1.cc:
970 * testsuite/27_io/basic_istringstream/str/char/2.cc: New test.
971 * testsuite/27_io/basic_istringstream/str/wchar_t/2.cc: New test.
972 * testsuite/27_io/basic_ostringstream/str/char/3.cc: New test.
973 * testsuite/27_io/basic_ostringstream/str/wchar_t/3.cc: New test.
974 * testsuite/27_io/basic_stringbuf/str/char/4.cc: New test.
975 * testsuite/27_io/basic_stringbuf/str/wchar_t/4.cc: New test.
976 * testsuite/27_io/basic_stringstream/str/char/5.cc: New test.
977 * testsuite/27_io/basic_stringstream/str/wchar_t/5.cc.cc: New test.
979 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
982 * include/std/sstream (basic_stringbuf::_M_update_egptr)
983 (basic_stringbuf::__xfer_bufptrs::__xfer_bufptrs): Check for
984 null before comparing pointers.
986 2020-11-09 François Dumont <fdumont@gcc.gnu.org>
988 * include/debug/array: Remove.
989 * include/Makefile.am: Remove <debug/array>.
990 * include/Makefile.in: Regenerate.
991 * include/experimental/functional: Adapt.
992 * include/std/array: Move to _GLIBCXX_INLINE_VERSION namespace.
993 * include/std/functional: Adapt.
994 * include/std/span: Adapt.
995 * testsuite/23_containers/array/debug/back1_neg.cc:
996 Remove dg-require-debug-mode. Add -D_GLIBCXX_ASSERTIONS option.
997 * testsuite/23_containers/array/debug/back2_neg.cc: Likewise.
998 * testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
999 * testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
1000 * testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc:
1002 * testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc:
1004 * testsuite/23_containers/array/element_access/60497.cc
1005 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
1007 * testsuite/23_containers/array/tuple_interface/get_neg.cc
1008 * testsuite/23_containers/array/tuple_interface/tuple_element_debug_neg.cc
1009 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
1011 2020-11-09 François Dumont <fdumont@gcc.gnu.org>
1013 * include/debug/assertions.h (__glibcxx_requires_non_empty_range):
1014 Remove __builtin_expect.
1015 (__glibcxx_requires_subscript): Likewise.
1016 (__glibcxx_requires_nonempty): Likewise.
1017 * include/debug/formatter.h (__check_singular): Add C++11 constexpr
1019 * include/debug/helper_functions.h (__check_singular): Likewise. Skip
1020 check if constant evaluated.
1021 (__valid_range): Do not skip check if constant evaluated.
1022 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_COND_AT): Add
1024 (_GLIBCXX_DEBUG_VERIFY_AT_F): Use __glibcxx_assert_1.
1025 * testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
1027 * testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc: New test.
1028 * testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc: New test.
1029 * testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc:
1031 * testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
1033 * testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
1035 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc: New test.
1036 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc: New test.
1037 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
1039 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc: New test.
1040 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc: New test.
1041 * testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc: New test.
1042 * testsuite/25_algorithms/lower_bound/debug/partitioned_neg.cc: New test.
1043 * testsuite/25_algorithms/lower_bound/debug/partitioned_pred_neg.cc: New test.
1044 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc: New test.
1045 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc: New test.
1046 * testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc: New test.
1047 * testsuite/25_algorithms/upper_bound/debug/partitioned_neg.cc: New test.
1048 * testsuite/25_algorithms/upper_bound/debug/partitioned_pred_neg.cc: New test.
1050 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
1052 * include/bits/uniform_int_dist.h (__detail::_Power_of_2):
1053 Document that true result for zero is intentional.
1055 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
1057 * include/std/bit (__popcount): Remove redundant check for zero.
1059 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
1062 * libsupc++/exception_ptr.h (exception_ptr::exception_ptr())
1063 (exception_ptr::exception_ptr(const exception_ptr&))
1064 (exception_ptr::~exception_ptr()): Remove 'always_inline'
1065 attributes. Use 'inline' unconditionally.
1067 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
1070 * include/bits/std_function.h [!__cpp_rtti]: Include <typeinfo>.
1072 2020-11-07 Liu Hao <lh_mouse@126.com>
1074 * libsupc++/cxxabi.h: (__cxa_atexit): mark with _GLIBCXX_CDTOR_CALLABI
1075 (__cxa_thread_atexit): ditto
1076 * libsupc++/atexit_thread.cc: (__cxa_atexit): mark with
1077 _GLIBCXX_CDTOR_CALLABI
1078 (__cxa_thread_atexit): ditto
1081 2020-11-06 Jonathan Wakely <jwakely@redhat.com>
1083 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten up patterns
1084 for basic_stringbuf that refer to __xfer_bufptrs.
1086 2020-11-05 Marek Polacek <polacek@redhat.com>
1089 * testsuite/20_util/reference_wrapper/lwg2993.cc: Add a dg-warning.
1090 * testsuite/25_algorithms/generate_n/87982_neg.cc: Likewise.
1092 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
1095 * include/std/optional (operator==, operator!=, operator<)
1096 (operator>, operator<=, operator>=): Fix types used in
1098 * testsuite/20_util/optional/relops/96269.cc: New test.
1100 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
1103 * src/filesystem/dir.cc (recursive_directory_iterator): Call the
1104 right overload of _Dir::advance.
1105 * testsuite/experimental/filesystem/iterators/97731.cc: New test.
1107 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
1110 * include/std/future (__basic_future::_M_get_result): Use
1111 nullptr for null pointer constant.
1112 * libsupc++/eh_ptr.cc (operator==, operator!=): Remove
1114 * libsupc++/exception_ptr.h (_GLIBCXX_EH_PTR_USED): Define
1115 macro to conditionally add __attribute__((__used__)).
1116 (operator==, operator!=, exception_ptr::exception_ptr())
1117 (exception_ptr::exception_ptr(const exception_ptr&))
1118 (exception_ptr::~exception_ptr())
1119 (exception_ptr::operator=(const exception_ptr&))
1120 (exception_ptr::swap(exception_ptr&)): Always define as
1121 inline. Add macro to be conditionally "used".
1123 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
1126 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Add exports.
1127 * src/c++20/sstream-inst.cc (basic_stringbuf): Instantiate
1128 private constructor taking __xfer_bufptrs.
1130 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
1132 * include/std/sstream (basic_stringbuf(const allocator_type&):
1134 (basic_stringbuf(const basic_string<C,T,SA>&, openmode, const A&)):
1135 Call _M_stringbuf_init. Construct _M_string from pointer and length
1136 to avoid constraint checks for string view.
1137 (basic_stringbuf::view()): Make __sv_type alias local to the
1139 (basic_istringstream(const basic_string<C,T,SA>&, openmode, const A&)):
1140 Pass string to _M_streambuf instead of constructing a temporary
1141 with the wrong allocator.
1142 (basic_ostringstream(const basic_string<C,T,SA>&, openmode, const A&)):
1144 (basic_stringstream(const basic_string<C,T,SA>&, openmode, const A&)):
1146 * src/c++20/sstream-inst.cc: Use string_view and wstring_view
1147 typedefs in explicit instantiations.
1148 * testsuite/27_io/basic_istringstream/cons/char/1.cc: Add more
1149 tests for constructors.
1150 * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
1151 * testsuite/27_io/basic_stringbuf/cons/char/1.cc: Likewise.
1152 * testsuite/27_io/basic_stringbuf/cons/char/2.cc: Likewise.
1153 * testsuite/27_io/basic_stringbuf/cons/wchar_t/1.cc: Likewise.
1154 * testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
1155 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
1157 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
1159 * include/std/sstream: Adjust whitespace.
1161 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
1164 * include/std/sstream (basic_stringstream(string_type&&, openmode)):
1165 Fix default argument.
1166 * testsuite/27_io/basic_stringstream/cons/char/97719.cc: New test.
1168 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
1170 * testsuite/18_support/96817.cc: Fail fast if the library is
1171 configured to not use futexes.
1173 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
1176 * include/bits/stl_algo.h (search(FIter, FIter, const Searcher):
1177 Adjust #if condition.
1178 * include/parallel/algo.h (search(FIter, FIter, const Searcher&):
1179 Define new overload for C++17.
1181 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
1184 * doc/xml/manual/evolution.xml: Document change to base class.
1185 * doc/html/manual/api.html: Regenerate.
1187 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
1189 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
1190 Use qualified-id to refer to static member functions.
1192 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
1194 * include/std/syncstream: Include <bits/std_mutex.h>
1197 2020-11-03 François Dumont <fdumont@gcc.gnu.org>
1199 * config/abi/pre/gnu-versioned-namespace.ver:
1200 Add __istream_extract and _Safe_local_iterator_base::_M_attach_single
1203 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
1205 * src/c++11/mutex.cc [_GLIBCXX_HAVE_TLS] (__once_proxy): Define
1206 separately for TLS targets.
1207 [!_GLIBCXX_HAVE_TLS] (__get_once_functor_lock_ptr): Replace with ...
1208 (set_lock_ptr): ... this. Set new value and return previous
1210 [!_GLIBCXX_HAVE_TLS] (__set_once_functor_lock_ptr): Adjust to
1212 [!_GLIBCXX_HAVE_TLS] (__once_proxy): Likewise.
1214 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
1219 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Add new symbols.
1220 * include/std/mutex [!_GLIBCXX_HAS_GTHREADS] (once_flag): Define
1221 even when gthreads is not supported.
1222 (once_flag::_M_once) [_GLIBCXX_HAVE_LINUX_FUTEX]: Change type
1223 from __gthread_once_t to int.
1224 (once_flag::_M_passive(), once_flag::_M_activate())
1225 (once_flag::_M_finish(bool), once_flag::_Active_execution):
1226 Define new members for futex and non-threaded implementation.
1227 [_GLIBCXX_HAS_GTHREADS] (once_flag::_Prepare_execution): New
1229 (call_once): Use new members of once_flag.
1230 * src/c++11/mutex.cc (std::once_flag::_M_activate): Define.
1231 (std::once_flag::_M_finish): Define.
1232 * testsuite/30_threads/call_once/39909.cc: Do not require
1234 * testsuite/30_threads/call_once/49668.cc: Likewise.
1235 * testsuite/30_threads/call_once/60497.cc: Likewise.
1236 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
1237 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
1238 * testsuite/30_threads/call_once/once_flag.cc: Add test for
1239 constexpr constructor.
1240 * testsuite/30_threads/call_once/66146.cc: New test.
1241 * testsuite/30_threads/call_once/constexpr.cc: Removed.
1242 * testsuite/30_threads/once_flag/cons/constexpr.cc: Removed.
1244 2020-11-03 Jonathan Yong <10walls@gmail.com>
1246 * src/Makefile.am (libstdc___la_LINK): Add lt_host_flags.
1247 * src/Makefile.in: Regenerate.
1249 2020-11-02 Thomas Rodgers <trodgers@redhat.com>
1251 * doc/doxygen/user.cfg.in (INPUT): Add new header.
1252 * include/Makefile.am (std_headers): Add new header.
1253 * include/Makefile.in: Regenerate.
1254 * include/precompiled/stdc++.h: Include new header.
1255 * include/std/syncstream: New header.
1256 * include/std/version: Add __cpp_lib_syncbuf.
1257 * testsuite/27_io/basic_syncbuf/1.cc: New test.
1258 * testsuite/27_io/basic_syncbuf/2.cc: Likewise.
1259 * testsuite/27_io/basic_syncbuf/basic_ops/1.cc:
1261 * testsuite/27_io/basic_syncbuf/requirements/types.cc:
1263 * testsuite/27_io/basic_syncbuf/sync_ops/1.cc:
1265 * testsuite/27_io/basic_syncstream/1.cc: Likewise.
1266 * testsuite/27_io/basic_syncstream/2.cc: Likewise.
1267 * testsuite/27_io/basic_syncstream/basic_ops/1.cc:
1269 * testsuite/27_io/basic_syncstream/requirements/types.cc:
1272 2020-11-01 Jonathan Wakely <jwakely@redhat.com>
1274 * include/std/type_traits (is_integral<wchar_t>)
1275 (make_unsigned<wchar_t>, make_signed<wchar_t>): Define based
1276 on #ifdef __WCHAR_TYPE__ instead of _GLIBCXX_USE_WCHAR_T.
1277 * include/bits/cpp_type_traits.h (__is_integer<wchar_t>)
1278 (__is_char<wchar_t>): Likewise.
1280 2020-10-31 François Dumont <fdumont@gcc.gnu.org>
1282 * src/c++17/floating_from_chars.cc (_GLIBCXX_USE_CX11_ABI): Add define.
1283 (buffering_string): New.
1284 [!_GLIBCXX_USE_CXX11_ABI](reserve_string): New.
1285 (from_chars): Adapt.
1286 * src/c++20/sstream-inst.cc: Limit instantiations to
1287 _GLIBCXX_USE_CXX11_ABI.
1289 2020-10-31 Jonathan Wakely <jwakely@redhat.com>
1291 * include/bits/random.h (independent_bit_engine): Fix typo
1293 (shuffle_order_engine): Fix incorrect description in comment.
1294 * include/bits/random.tcc (__representable_as_double
1295 (__p1_representable_as_double): New helper functions.
1296 (shuffle_order_engine::operator()): Use double for calculation
1297 if (max() - min() + 1) is representable as double.
1298 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
1301 2020-10-31 Jonathan Wakely <jwakely@redhat.com>
1304 * include/bits/hashtable_policy.h (_Prime_rehash_policy)
1305 (_Power2_rehash_policy): Use ceil and floor instead of ceill and
1307 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy): Likewise.
1308 Use double instead of long double.
1310 2020-10-31 Patrick Palka <ppalka@redhat.com>
1313 * include/std/ranges (basic_istream_view::begin): Initialize
1314 _Iterator from 'this' instead of '*this'.
1315 (basic_istream_view::_Iterator::_Iterator): Adjust constructor
1317 (filter_view::_Iterator::_Iterator): Take a filter_view*
1318 argument instead of a filter_view& argument.
1319 (filter_view::_Sentinel::_Sentinel): Likewise.
1320 (filter_view::begin): Initialize _Iterator from 'this' instead
1322 (filter_view::end): Likewise.
1323 (transform_view::_Iterator::_Iterator): Take a _Parent* instead
1325 (filter_view::_Iterator::operator+): Adjust accordingly.
1326 (filter_view::_Iterator::operator-): Likewise.
1327 (filter_view::begin): Initialize _Iterator from 'this' instead
1329 (filter_view::end): Likewise.
1330 (join_view::_Iterator): Take a _Parent* instead of a _Parent&.
1331 (join_view::_Sentinel): Likewise.
1332 (join_view::begin): Initialize _Iterator from 'this' instead of
1334 (join_view::end): Initialize _Sentinel from 'this' instead of
1336 (split_view::_OuterIter): Take a _Parent& instead of a _Parent*.
1337 (split_view::begin): Initialize _OuterIter from 'this' instead
1339 (split_view::end): Likewise.
1340 * testsuite/std/ranges/97600.cc: New test.
1342 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
1344 * include/std/ranges (enable_borrowed_view<take_view<T>>)
1345 (enable_borrowed_view<drop_view<T>>)
1346 (enable_borrowed_view<drop_while_view<T>>)
1347 (enable_borrowed_view<reverse_view<T>>)
1348 (enable_borrowed_view<common_view<T>>)
1349 (enable_borrowed_view<elements_view<T>>): Add partial
1350 specializations as per P2017R1.
1351 * testsuite/std/ranges/adaptors/conditionally_borrowed.cc:
1354 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
1357 * include/bits/hashtable_policy.h (_Prime_rehash_policy)
1358 (_Power2_rehash_policy): Use double instead of long double.
1360 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
1362 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1363 Avoid -Wcatch-value warnings.
1365 2020-10-30 Patrick Palka <ppalka@redhat.com>
1367 * include/std/ranges (__detail::__box): For the partial
1368 specialization used by types that are already semiregular,
1369 make the default constructor value-initialize the underlying
1370 object instead of default-initializing it. Make its in place
1371 constructor explicit.
1372 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc:
1375 2020-10-30 David Edelsohn <dje.gcc@gmail.com>
1377 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: XFAIL on AIX.
1379 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1381 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten patterns
1382 for old <sstream> symbols some more.
1384 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1386 * include/bits/ranges_util.h (subrange::subrange(R&&)): Use
1387 direct-initialization instead of list-initialization, so a
1388 potential narrowing conversion from ranges::size(r) to the
1389 stored size isn't ill-formed.
1391 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1393 * include/bits/parse_numbers.h (_Select_int_base): Avoid
1394 narrowing conversion in constant expression.
1395 * include/experimental/buffer (buffer_copy): Avoid narrowing
1397 * include/experimental/internet (hash<>::operator()): Do not
1398 use deprecated 'argument_type' member.
1399 * include/std/variant (variant::emplace): Use cast instead
1400 of implicit conversion from size_t to narrower unsigned type.
1402 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1404 * include/tr1/shared_ptr.h (__shared_count, __shared_ptr)
1405 (shared_ptr): Add diagnostic pragmas around uses of auto_ptr.
1406 * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
1407 Adust dg-error line numbers.
1409 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1411 * testsuite/18_support/96817.cc: Avoid -Wunused warnings.
1412 * testsuite/20_util/any/assign/2.cc: Likewise.
1413 * testsuite/20_util/any/cons/2.cc: Likewise.
1414 * testsuite/20_util/align/1.cc: Avoid -Wsign-compare warning.
1415 * testsuite/20_util/function/65760.cc: Avoid -Wunused warning.
1416 * testsuite/20_util/function/1.cc: Avoid -Wcatch-value warning.
1417 * testsuite/20_util/function/cons/move_target.cc: Avoid -Wunused
1419 * testsuite/20_util/headers/memory/synopsis.cc: Add exception
1421 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Avoid
1422 -Wsign-compare warning.
1423 * testsuite/20_util/tuple/cons/deduction.cc: Avoid -Wunused
1425 * testsuite/20_util/specialized_algorithms/uninitialized_copy/808590-cxx11.cc:
1426 Avoid -Wdeprecated-copy warning.
1427 * testsuite/21_strings/basic_string/56166.cc: Avoid
1428 -Wcatch-value warning.
1429 * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
1430 Avoid -Wcatch-value warnings.
1431 * testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc:
1433 * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
1435 * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
1437 * testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc:
1439 * testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
1441 * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
1443 * testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc:
1445 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc:
1447 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc:
1449 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc:
1451 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc:
1453 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc:
1455 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc:
1457 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc:
1459 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc:
1461 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc:
1462 Prune additional diagnostics.
1463 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc:
1465 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc:
1467 * testsuite/21_strings/headers/string/synopsis.cc: Add exception
1469 * testsuite/22_locale/locale/cons/12352.cc: Define sized
1470 delete operators to avoid warnings.
1471 * testsuite/23_containers/deque/modifiers/swap/1.cc: Add
1472 exception specification.
1473 * testsuite/23_containers/forward_list/cons/11.cc: Avoid
1474 -Wdeprecated-copy warning.
1475 * testsuite/23_containers/headers/bitset/synopsis.cc: Add
1476 exception specification.
1477 * testsuite/23_containers/headers/deque/synopsis.cc: Likewise.
1478 * testsuite/23_containers/headers/forward_list/synopsis.cc:
1480 * testsuite/23_containers/headers/list/synopsis.cc: Likewise.
1481 * testsuite/23_containers/headers/map/synopsis.cc: Likewise.
1482 * testsuite/23_containers/headers/queue/synopsis.cc: Likewise.
1483 * testsuite/23_containers/headers/set/synopsis.cc: Likewise.
1484 * testsuite/23_containers/headers/vector/synopsis.cc: Likewise.
1485 * testsuite/23_containers/list/modifiers/swap/1.cc: Likewise.
1486 * testsuite/23_containers/map/modifiers/swap/1.cc: Likewise.
1487 * testsuite/23_containers/multimap/modifiers/swap/1.cc:
1489 * testsuite/23_containers/multiset/modifiers/swap/1.cc:
1491 * testsuite/23_containers/set/modifiers/swap/1.cc: Likewise.
1492 * testsuite/23_containers/unordered_set/56267-2.cc: Avoid
1493 -Wdeprecated-copy warning.
1494 * testsuite/23_containers/vector/bool/23632.cc: Avoid
1495 -Wempty-body warning.
1496 * testsuite/23_containers/vector/modifiers/swap/1.cc: Add
1497 exception specification.
1498 * testsuite/25_algorithms/heap/moveable2.cc: Fix misplaced
1499 parentheses around arguments.
1500 * testsuite/25_algorithms/sample/1.cc: Use return value.
1501 * testsuite/25_algorithms/search/searcher.cc: Avoid -Wunused
1503 * testsuite/27_io/basic_ostream/exceptions/char/9561.cc:
1505 * testsuite/27_io/basic_ostream/exceptions/wchar_t/9561.cc:
1507 * testsuite/27_io/filesystem/operations/remove_all.cc: Avoid
1508 -Wsign-compare warning.
1509 * testsuite/experimental/any/assign/2.cc: Avoid -Wunused warnings.
1510 * testsuite/experimental/any/cons/2.cc: Likewise.
1511 * testsuite/experimental/filesystem/operations/remove_all.cc:
1512 Avoid -Wign-compare warning.
1513 * testsuite/experimental/memory/observer_ptr/cons/cons.cc:
1515 * testsuite/experimental/memory_resource/null_memory_resource.cc:
1517 * testsuite/experimental/source_location/1.cc: Avoid -Waddress
1519 * testsuite/ext/pod_char_traits.cc: Avoid -Wunused warning.
1520 * testsuite/ext/vstring/modifiers/clear/56166.cc: Avoid
1522 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
1523 Avoid -Wunused warning.
1524 * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc:
1526 * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
1527 Prune additional warnings.
1528 * testsuite/tr1/3_function_objects/function/1.cc: Avoid
1529 -Wcatch-value warning.
1530 * testsuite/util/replacement_memory_operators.h: Define sized
1531 delete to avoid warnings.
1532 * testsuite/util/testsuite_api.h (_NonDefaultConstructible): Add
1533 user-declared assignment operator to stop -Wdeprecated-copy
1535 * testsuite/util/testsuite_containers.h: Avoid -Wunused warning.
1536 * testsuite/util/testsuite_iterators.h: Avoid -Wsign-compare
1538 * testsuite/util/testsuite_new_operators.h: Define sized deleted.
1540 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1542 * testsuite/25_algorithms/all_of/constexpr.cc: Check result of
1544 * testsuite/25_algorithms/any_of/constexpr.cc: Likewise.
1545 * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
1546 * testsuite/25_algorithms/copy_backward/constexpr.cc: Likewise.
1547 * testsuite/25_algorithms/count/constexpr.cc: Likewise.
1548 * testsuite/25_algorithms/equal/constexpr.cc: Likewise.
1549 * testsuite/25_algorithms/equal_range/constexpr.cc: Likewise.
1550 * testsuite/25_algorithms/fill/constexpr.cc: Likewise.
1551 * testsuite/25_algorithms/find_end/constexpr.cc: Likewise.
1552 * testsuite/25_algorithms/find_if/constexpr.cc: Likewise.
1553 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Likewise.
1554 * testsuite/25_algorithms/is_permutation/constexpr.cc: Likewise.
1555 * testsuite/25_algorithms/is_sorted_until/constexpr.cc:
1557 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
1559 * testsuite/25_algorithms/lower_bound/constexpr.cc: Likewise.
1560 * testsuite/25_algorithms/merge/constexpr.cc: Likewise.
1561 * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
1562 * testsuite/25_algorithms/none_of/constexpr.cc: Likewise.
1563 * testsuite/25_algorithms/partition_copy/constexpr.cc: Likewise.
1564 * testsuite/25_algorithms/remove_copy/constexpr.cc: Likewise.
1565 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Likewise.
1566 * testsuite/25_algorithms/remove_if/constexpr.cc: Likewise.
1567 * testsuite/25_algorithms/replace_if/constexpr.cc: Likewise.
1568 * testsuite/25_algorithms/reverse/constexpr.cc: Likewise.
1569 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Likewise.
1570 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Likewise.
1571 * testsuite/25_algorithms/search/constexpr.cc: Likewise.
1572 * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
1573 * testsuite/25_algorithms/set_intersection/constexpr.cc:
1575 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
1577 * testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
1578 * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
1579 * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
1581 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1583 * include/bits/uniform_int_dist.h (_Power_of_two): Add
1585 (uniform_int_distribution::_S_nd): Add static_assert to ensure
1586 the wider type is twice as wide as the result type.
1587 (uniform_int_distribution::__generate_impl): Add static_assert
1588 and declare variables as constexpr where appropriate.
1589 (uniform_int_distribution:operator()): Likewise. Only consider
1590 the uniform random bit generator's range of possible results
1591 when deciding whether _S_nd can be used, not the __uctype type.
1593 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1595 * include/ext/rope (_Refcount_Base::_M_ref_count): Remove
1597 (_Refcount_Base::_M_decr()): Likewise.
1599 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1601 * include/bits/std_function.h (_Function_handler<void, void>):
1602 Define explicit specialization used for invalid target types.
1603 (_Base_manager::_M_manager) [!__cpp_rtti]: Return null.
1604 (function::target_type()): Check for null pointer.
1605 (function::target()): Define unconditionall. Fix bug with
1606 const_cast of function pointer type.
1607 (function::target() const): Define unconditionally, but
1608 only use RTTI if enabled.
1609 * testsuite/20_util/function/target_no_rtti.cc: New test.
1611 2020-10-29 Patrick Palka <ppalka@redhat.com>
1613 * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
1614 (test03): Fix initializing the vector vy with the array y of size 4.
1616 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1618 * include/bits/hashtable_policy.h (_Local_iterator_base): Cast
1619 value to avoid -Wsign-compare warnings.
1620 * include/bits/regex.h (sub_match::_M_str): Avoid narrowing
1622 * include/bits/regex_compiler.tcc (_Compiler::_M_quantifier):
1623 Initialize variable to avoid -Wmaybe-uninitialized warning.
1624 * include/bits/shared_ptr_base.h (_Sp_counted_deleter::_Impl):
1625 Reorder mem-initializer-list to avoid -Wreorder warning.
1626 * include/bits/stl_tree.h (_Rb_tree_impl): Explicitly
1627 initialize base class in copy constructor.
1628 * include/debug/safe_iterator.h (_Safe_iterator): Likewise.
1629 * include/ext/debug_allocator.h: Reorder mem-initializer-list
1630 to avoid -Wreorder warning.
1631 * include/ext/throw_allocator.h (throw_allocator_limit)
1632 (throw_allocator_random): Add user-declared assignment operators
1633 to avoid -Wdeprecated-copy warnings.
1635 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1637 * include/bits/uniform_int_dist.h (uniform_int_distribution):
1638 Rename _UniformRandomNumberGenerator template parameters to
1639 _UniformRandomBitGenerator, as per P0346R1.
1641 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1643 * include/std/sstream (basic_stringbuf(__string_type&&, openmode)):
1644 Call _M_init_syncbuf to set up get/put areas. Also qualify
1647 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1649 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Remove duplicate
1651 (CXXABI_1.3.13): Restore missing piece.
1653 2020-10-28 Thomas Rodgers <trodgers@redhat.com>
1655 * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++20.
1656 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): New symbols.
1657 * configure: Regenerate.
1658 * include/std/sstream:
1659 (basic_stringbuf::basic_stringbuf(allocator const&)): New constructor.
1660 (basic_stringbuf::basic_stringbuf(openmode, allocator const&)): Likewise.
1661 (basic_stringbuf::basic_stringbuf(basic_string&&, openmode)): Likewise.
1662 (basic_stringbuf::basic_stringbuf(basic_stringbuf&&, allocator const&)):
1664 (basic_stringbuf::get_allocator()): New method.
1665 (basic_stringbuf::view()): Likewise.
1666 (basic_istringstream::basic_istringstream(basic_string&&, openmode)):
1668 (basic_istringstream::basic_istringstream(openmode, allocator const&)):
1670 (basic_istringstream::view()): New method.
1671 (basic_ostringstream::basic_ostringstream(basic_string&&, openmode)):
1673 (basic_ostringstream::basic_ostringstream(openmode, allocator const&)):
1675 (basic_ostringstream::view()): New method.
1676 (basic_stringstream::basic_stringstream(basic_string&&, openmode)):
1678 (basic_stringstream::basic_stringstream(openmode, allocator const&)):
1680 (basic_stringstream::view()): New method.
1681 * src/Makefile.in: Add c++20 directory.
1682 * src/Makefile.am: Regenerate.
1683 * src/c++20/Makefile.am: Add makefile for new sub-directory.
1684 * src/c++20/Makefile.in: Generate.
1685 * src/c++20/sstream-inst.cc: New file defining explicit
1686 instantiations for basic_stringbuf, basic_istringstream,
1687 basic_ostringstream, and basic_stringstream member functions
1689 * testsuite/27_io/basic_stringbuf/cons/char/2.cc: New test.
1690 * testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
1691 * testsuite/27_io/basic_stringbuf/view/char/1.cc: Likewise.
1692 * testsuite/27_io/basic_stringbuf/view/wchar_t/1.cc: Likewise.
1693 * testsuite/27_io/basic_istringstream/cons/char/1.cc: Likewise.
1694 * testsuite/27_io/basic_istringstream/cons/wchar_t/1.cc: Likewise.
1695 * testsuite/27_io/basic_istringstream/view/char/1.cc: Likewise.
1696 * testsuite/27_io/basic_istringstream/view/wchar_t/1.cc: Likewise.
1697 * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
1698 * testsuite/27_io/basic_ostringstream/cons/wchar_t/1.cc: Likewise.
1699 * testsuite/27_io/basic_ostringstream/view/char/1.cc: Likewise.
1700 * testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc: Likewise.
1701 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
1702 * testsuite/27_io/basic_stringstream/cons/wchar_t/1.cc: Likewise.
1703 * testsuite/27_io/basic_stringstream/view/char/1.cc: Likewise.
1704 * testsuite/27_io/basic_stringstream/view/wchar_t/1.cc: Likewise.
1706 2020-10-28 Patrick Palka <ppalka@redhat.com>
1709 * include/std/chrono (year_month_weekday::operator sys_days):
1710 Cast the result of index() to int so that the initializer for
1711 days{} is sign-extended when it's converted to the underlying
1713 * testsuite/std/time/year_month_weekday/3.cc: New test.
1715 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1717 * libsupc++/new_opnt.cc (new): Add comment about forced unwind
1720 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1723 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_BUFSIZ):
1725 * config/os/mingw32/os_defines.h (_GLIBCXX_BUFSIZ):
1727 * include/bits/fstream.tcc: Use _GLIBCXX_BUFSIZ instead
1729 * include/ext/stdio_filebuf.h: Likewise.
1730 * include/std/fstream (_GLIBCXX_BUFSIZ): Define.
1732 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1735 * include/bits/valarray_after.h (_DEFINE_EXPR_UNARY_OPERATOR)
1736 (_DEFINE_EXPR_BINARY_OPERATOR, _DEFINE_EXPR_BINARY_FUNCTION):
1737 Use elaborated-type-specifier and qualified-id to avoid
1738 ambiguities with QNX system headers.
1739 * testsuite/26_numerics/valarray/95592.cc: New test.
1741 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1744 * include/std/span (span): Reorder data members to match common
1745 implementations of struct iovec.
1746 * testsuite/23_containers/span/layout_compat.cc: New test.
1748 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
1750 * include/std/functional (std::_Placeholder): Define for C++98
1751 as well as later standards.
1752 * include/tr1/functional (std::placeholders::_1 etc): Declare
1754 (tr1::_Placeholder): Replace with using-declaration for
1756 (tr1::placeholders::_1 etc.): Replace with using-directive for
1759 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
1761 * include/tr1/ell_integral.tcc (__ellint_rf, __ellint_rd)
1762 (__ellint_rc, __ellint_rj): Remove unused variables.
1763 * include/tr1/modified_bessel_func.tcc (__airy): Likewise.
1765 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
1767 * include/bits/locale_conv.h (__str_codecvt_out_all):
1768 Add cast to compare operands of the same signedness.
1769 * include/bits/locale_facets_nonio.tcc
1770 (time_get::_M_extract_wday_or_month): Likewise.
1771 * include/bits/sstream.tcc (basic_stringbuf::overflow):
1773 * include/tr1/legendre_function.tcc (__sph_legendre): Use
1774 unsigned for loop variable.
1776 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
1778 * include/std/charconv (from_chars): Add noexcept to match
1779 definitions in src/c++17/floating_from_chars.cc
1781 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
1783 * src/c++17/fs_dir.cc (fs::directory_iterator::operator*):
1784 Add noexcept. Do not throw on precondition violation.
1786 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
1788 * include/bits/fs_path.h (path::_List::begin, path::_List::end):
1789 Add noexcept to match definitions in src/c++17/fs_path.cc.
1791 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
1793 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1794 Add missing <cstdint> header.
1795 * testsuite/experimental/memory_resource/resource_adaptor.cc:
1798 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
1800 * include/experimental/executor (strand::_State): Fix thinko.
1802 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1804 * include/std/type_traits (__is_nt_constructible_impl): Remove.
1805 (__is_nothrow_constructible_impl): Adjust.
1806 (is_nothrow_default_constructible): Likewise.
1807 (__is_nt_assignable_impl): Remove.
1808 (__is_nothrow_assignable_impl): Adjust.
1810 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
1813 * libsupc++/new_opa.cc: Declare size_t in global namespace.
1814 Remove unused header.
1816 2020-10-26 Stephan Bergmann <sbergman@redhat.com>
1818 * include/bits/shared_ptr_base.h
1819 (_Sp_counted_base::_M_add_ref_lock_nothrow(): Add noexcept to
1820 definitions to match declaration.
1821 (__shared_count(const __weak_count&, nothrow_t)): Add noexcept
1822 to declaration to match definition.
1824 2020-10-23 Patrick Palka <ppalka@redhat.com>
1826 * include/std/ranges (single_view::single_view): Mark the
1827 in place constructor explicit as per LWG 3428.
1828 (take_view): Remove the constraint on the deduction guide's
1829 template parameter as per LWG 3447.
1831 2020-10-23 Jonathan Wakely <jwakely@redhat.com>
1833 * include/experimental/memory_resource: Include <tuple>.
1834 (polymorphic_allocator::construct): Qualify forward_as_tuple.
1835 * include/std/memory_resource: Likewise.
1837 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
1839 * testsuite/30_threads/condition_variable/members/68519.cc:
1840 Define recent_epoch_float_clock::duration to meet the Cpp17Clock
1843 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
1845 * include/std/shared_mutex: Only include <condition_variable>
1846 when pthread_rwlock_t and POSIX timers are not available.
1847 (__cpp_lib_shared_mutex, __cpp_lib_shared_timed_mutex): Change
1848 value to be type 'long'.
1849 * include/std/version (__cpp_lib_shared_mutex)
1850 (__cpp_lib_shared_timed_mutex): Likewise.
1852 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
1854 * include/Makefile.am: Add new header.
1855 * include/Makefile.in: Regenerate.
1856 * include/bits/shared_ptr.h: Include <iosfwd>.
1857 * include/bits/shared_ptr_base.h: Include required headers here
1858 directly, instead of in <memory>.
1859 * include/bits/uses_allocator_args.h: New file. Move utility
1860 functions for uses-allocator construction from <memory> to here.
1861 Only define the utility functions when concepts are available.
1862 (__cpp_lib_make_obj_using_allocator): Define non-standard
1864 * include/std/condition_variable: Remove unused headers.
1865 * include/std/future: Likewise.
1866 * include/std/memory: Remove headers that are not needed
1867 directly, and are now inclkuded where they're needed. Include
1868 new <bits/uses_allocator_args.h> header.
1869 * include/std/memory_resource: Include only the necessary
1870 headers. Use new feature test macro to detect support for the
1872 * include/std/scoped_allocator: Likewise.
1873 * include/std/version (__cpp_lib_make_obj_using_allocator):
1876 2020-10-22 Olivier Hainque <hainque@adacore.com>
1878 * crossconfig.m4: Turn vxworks matcher into vxworks*.
1879 * configure.host: Likewise.
1880 * configure: Regenerate.
1882 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
1884 * include/bits/shared_ptr.h (shared_ptr(const weak_ptr&, nothrow_t)):
1886 * include/bits/shared_ptr_base.h (_Sp_counted_base::_M_add_ref_lock):
1887 Remove specializations and just call _M_add_ref_lock_nothrow.
1888 (__shared_count, __shared_ptr): Use nullptr for null pointer
1890 (__shared_count(const __weak_count&)): Use _M_add_ref_lock_nothrow
1891 instead of _M_add_ref_lock.
1892 (__shared_count(const __weak_count&, nothrow_t)): Add noexcept.
1893 (__shared_ptr::operator bool()): Add noexcept.
1894 (__shared_ptr(const __weak_ptr&, nothrow_t)): Add noexcept.
1896 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
1899 * include/bits/ranges_util.h (tuple_size<subrange>)
1900 (tuple_element<I, cv subrange>): Move here from ...
1901 * include/std/ranges: ... here.
1902 * testsuite/std/ranges/subrange/97512.cc: New test.
1904 2020-10-21 Thomas Rodgers <trodgers@redhat.com>
1906 * include/pstl/algorithm_impl.h: Update file.
1907 * include/pstl/execution_impl.h: Likewise.
1908 * include/pstl/glue_algorithm_impl.h: Likewise.
1909 * include/pstl/glue_memory_impl.h: Likewise.
1910 * include/pstl/glue_numeric_impl.h: Likewise.
1911 * include/pstl/memory_impl.h: Likewise.
1912 * include/pstl/numeric_impl.h: Likewise.
1913 * include/pstl/parallel_backend.h: Likewise.
1914 * include/pstl/parallel_backend_serial.h: Likewise.
1915 * include/pstl/parallel_backend_tbb.h: Likewise.
1916 * include/pstl/parallel_backend_utils.h: Likewise.
1917 * include/pstl/pstl_config.h: Likewise.
1918 * include/pstl/unseq_backend_simd.h: Likewise.
1920 2020-10-20 François Dumont <fdumont@gcc.gnu.org>
1922 * include/bits/hashtable_policy.h
1923 (_Hash_node_value_base<>): Remove _Hash_node_base inheritance.
1924 (_Hash_node_code_cache<bool _Cache_hash_code>): New.
1925 (_Hash_node_value<typename _Value, bool _Cache_hash_code>): New.
1926 (_Hash_node<>): Inherits _Hash_node_base<> and _Hash_node_value<>.
1927 (_Map_base<>::__node_type): Remove.
1928 (_Map_base<>::iterator): Remove.
1929 (_Insert_base<>::__hash_cached): New.
1930 (_Insert_base<>::__constant_iterators): New.
1931 (_Insert_base<>::__hashtable_alloc): New.
1932 (_Insert_base<>::__node_type): Remove.
1933 (_Insert_base<>::__node_ptr): New.
1934 (_Hash_code_base<>): Remove specializations.
1935 (_Hash_code_base<>::__node_type): Remove.
1936 (_Hash_code_base<>::_M_bucket_index(const __node_type*, size_t)):
1938 (_Hash_code_base<>::_M_bucket_index(const _Hash_node_value<>&, size_t)):
1940 (_Hash_code_base<>::_M_store_code(__node_type*, __hash_code)):
1942 (_Hash_code_base<>::_M_store_code(_Hash_node_code_cache<>&, __hash_code)):
1944 (_Hash_code_base<>::_M_copy_code(__node_type*, const __node_type*)):
1946 (_Hash_code_base<>::_M_copy_code(_Hash_node_code_cache<>&,
1947 const _Hash_node_code_base<>&)): ...this.
1948 (_Hashtable_base<>::__constant_iterators): Remove.
1949 (_Hashtable_base<>::__unique_keys): Remove.
1950 (_Hashtable_base<>::__node_type): Remove.
1951 (_Hashtable_base<>::iterator): Remove.
1952 (_Hashtable_base<>::const_iterator): Remove.
1953 (_Hashtable_base<>::local_iterator): Remove.
1954 (_Hashtable_base<>::const_local_iterator): Remove.
1955 (_Hashtable_base<>::__ireturn_type): Remove.
1956 (_Hashtable_base<>::_Equal_hash_code<>::_S_equals): Replace by...
1957 (_Hashtable_base<>::_S_equals(__hash_code, const _Hash_node_code_hash<>&)):
1959 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals): Replace by...
1960 (_Hashtable_base<>::_S_node_equals(__hash_code,
1961 const _Hash_node_code_hash<>&)): ...this.
1962 (_Hashtable_base<>::_Equal_hash_code<>): Remove.
1963 (_Hashtable_base<>::_M_equals): Adapt.
1964 (_Hashtable_baxe<>::_M_node_equals): Adapt.
1965 (_Equality<>::_M_equal): Adapt.
1966 (_Hashtable_alloc<>::__node_ptr): New.
1967 (_Hashtable_alloc<>::__bucket_type): Rename into...
1968 (_Hashtable_alloc<>::__node_base_ptr): ...this.
1969 (_Hashtable_alloc<>::__bucket_alloc_type): Rename into...
1970 (_Hashtable_alloc<>::__buckets_alloc_type): ...this.
1971 (_Hashtable_alloc<>::__bucket_alloc_traits): Rename into...
1972 (_Hashtable_alloc<>::__buckets_alloc_traits): ...this.
1973 (_Hashtable_alloc<>::__buckets_ptr): New.
1974 (_Hashtable_alloc<>::_M_allocate_node): Adapt.
1975 (_Hashtable_alloc<>::_M_deallocate_node): Adapt.
1976 (_Hashtable_alloc<>::_M_deallocate_node_ptr): Adapt.
1977 (_Hashtable_alloc<>::_M_deallocate_nodes): Adapt.
1978 (_Hashtable_alloc<>::_M_allocate_buckets): Adapt.
1979 (_Hashtable_alloc<>::_M_deallocate_buckets): Adapt.
1980 * include/bits/hashtable.h (_Hashtable<>): Adapt.
1982 2020-10-20 Aldy Hernandez <aldyh@redhat.com>
1984 * testsuite/21_strings/basic_string/capacity/1.cc: Pass
1985 -Wno-stringop-overflow to test.
1987 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
1990 * include/std/coroutine (__noop_coro_frame): Replace with
1991 noop_coroutine_handle::__frame.
1992 (__dummy_resume_destroy): Define inline in __frame.
1993 (__noop_coro_fr): Replace with noop_coroutine_handle::_S_fr
1994 and define as inline.
1995 * testsuite/18_support/coroutines/95917.cc: New test.
1997 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
1999 * include/std/coroutine (coroutine_handle<_Promise>): Remove
2000 base class. Add constructors, conversions, accessors etc. as
2001 proposed for LWG 3460.
2002 (coroutine_handle<noop_coroutine_promise>): Likewise.
2003 * testsuite/18_support/coroutines/lwg3460.cc: New test.
2005 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
2007 * include/bits/unique_ptr.h (make_unique_for_overwrite): Define
2009 * testsuite/20_util/unique_ptr/creation/array_neg.cc: Remove
2010 unused header. Adjust standard reference.
2011 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: New test.
2012 * testsuite/20_util/unique_ptr/creation/for_overwrite__neg.cc: New test.
2014 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
2016 * include/std/tuple (_Head_base<Idx, Head, true>): Use reserved
2017 form of __no_unique_address__ attribute because
2018 no_unique_address is not reserved prior to C++20.
2020 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
2022 * include/bits/node_handle.h (_Node_handle_common): Replace
2023 std::optional with custom type.
2024 * testsuite/20_util/variant/exception_safety.cc: Add missing
2027 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
2029 * include/precompiled/expc++.h: Removed.
2031 2020-10-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2034 * include/std/variant
2035 (__gen_vtable_impl<>::_S_apply_single_alt):
2036 Diagnose visitor return type mismatches here..
2037 (__gen_vtable_impl</*base case*/>::_S_apply):
2040 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
2042 * include/std/concepts: Fix typos in copyright notice.
2043 * include/std/ranges: Likewise.
2045 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2048 * include/std/sstream (basic_stringbuf::str()): Check for
2049 null egptr() before comparing to non-null pptr().
2051 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2053 * testsuite/21_strings/basic_string/modifiers/assign/char/move_assign_optim.cc:
2054 Do not generate debug info.
2055 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/move_assign_optim.cc:
2058 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2060 * include/bits/basic_string.h (basic_string(const Alloc&))
2061 (basic_string(const basic_string&)
2062 (basic_string(const CharT*, size_type, const Alloc&))
2063 (basic_string(const CharT*, const Alloc&))
2064 (basic_string(size_type, CharT, const Alloc&))
2065 (basic_string(initializer_list<CharT>, const Alloc&))
2066 (basic_string(InputIterator, InputIterator, const Alloc&)):
2067 Define inline in class body.
2068 * include/bits/basic_string.tcc (basic_string(const Alloc&))
2069 (basic_string(const basic_string&)
2070 (basic_string(const CharT*, size_type, const Alloc&))
2071 (basic_string(const CharT*, const Alloc&))
2072 (basic_string(size_type, CharT, const Alloc&))
2073 (basic_string(initializer_list<CharT>, const Alloc&))
2074 (basic_string(InputIterator, InputIterator, const Alloc&)):
2075 Move definitions into class body.
2077 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2079 * testsuite/lib/libstdc++.exp (check_effective_target_cxx11-abi):
2080 Add comments about which test flags get used by the check.
2082 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2084 * testsuite/21_strings/basic_string/allocator/char/copy.cc: Make
2085 comment more precise about what isn't supported by COW strings.
2086 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
2088 * testsuite/21_strings/basic_string/allocator/char/move.cc:
2090 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
2092 * testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
2094 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2096 * testsuite/21_strings/basic_string/allocator/char/swap.cc:
2098 * testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
2100 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
2102 * testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
2104 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
2106 * testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
2108 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2110 * testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
2113 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2115 * testsuite/21_strings/basic_string/allocator/char/minimal.cc:
2116 Do not require cxx11-abi effective target.
2117 * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
2119 * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
2121 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2123 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2124 (basic_string(const _CharT*, const _Alloc&)): Constrain to
2125 require an allocator-like type to fix CTAD ambiguity (LWG 3706).
2126 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
2128 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
2131 2020-10-13 Nuno Lopes <nuno.lopes@ist.utl.pt>
2133 * include/bits/stl_algo.h (any_of): Fix incorrect description
2136 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
2138 * doc/xml/manual/evolution.xml: Document some API changes
2140 * doc/xml/manual/intro.xml: Document LWG 2499.
2141 * doc/xml/manual/status_cxx2020.xml: Update status.
2142 * doc/html/*: Regenerate.
2144 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
2146 * doc/xml/book.txml: Remove trailing whitespace.
2147 * doc/xml/chapter.txml: Likewise.
2148 * doc/xml/class.txml: Likewise.
2149 * doc/xml/gnu/fdl-1.3.xml: Likewise.
2150 * doc/xml/gnu/gpl-3.0.xml: Likewise.
2151 * doc/xml/manual/abi.xml: Likewise.
2152 * doc/xml/manual/algorithms.xml: Likewise.
2153 * doc/xml/manual/allocator.xml: Likewise.
2154 * doc/xml/manual/appendix_contributing.xml: Likewise.
2155 * doc/xml/manual/appendix_free.xml: Likewise.
2156 * doc/xml/manual/appendix_porting.xml: Likewise.
2157 * doc/xml/manual/atomics.xml: Likewise.
2158 * doc/xml/manual/auto_ptr.xml: Likewise.
2159 * doc/xml/manual/backwards_compatibility.xml: Likewise.
2160 * doc/xml/manual/bitmap_allocator.xml: Likewise.
2161 * doc/xml/manual/build_hacking.xml: Likewise.
2162 * doc/xml/manual/codecvt.xml: Likewise.
2163 * doc/xml/manual/concurrency.xml: Likewise.
2164 * doc/xml/manual/concurrency_extensions.xml: Likewise.
2165 * doc/xml/manual/configure.xml: Likewise.
2166 * doc/xml/manual/containers.xml: Likewise.
2167 * doc/xml/manual/ctype.xml: Likewise.
2168 * doc/xml/manual/debug.xml: Likewise.
2169 * doc/xml/manual/debug_mode.xml: Likewise.
2170 * doc/xml/manual/diagnostics.xml: Likewise.
2171 * doc/xml/manual/documentation_hacking.xml: Likewise.
2172 * doc/xml/manual/evolution.xml: Likewise.
2173 * doc/xml/manual/internals.xml: Likewise.
2174 * doc/xml/manual/intro.xml: Likewise.
2175 * doc/xml/manual/io.xml: Likewise.
2176 * doc/xml/manual/iterators.xml: Likewise.
2177 * doc/xml/manual/locale.xml: Likewise.
2178 * doc/xml/manual/localization.xml: Likewise.
2179 * doc/xml/manual/messages.xml: Likewise.
2180 * doc/xml/manual/mt_allocator.xml: Likewise.
2181 * doc/xml/manual/numerics.xml: Likewise.
2182 * doc/xml/manual/parallel_mode.xml: Likewise.
2183 * doc/xml/manual/policy_data_structures.xml: Likewise.
2184 * doc/xml/manual/prerequisites.xml: Likewise.
2185 * doc/xml/manual/shared_ptr.xml: Likewise.
2186 * doc/xml/manual/spine.xml: Likewise.
2187 * doc/xml/manual/status_cxxtr1.xml: Likewise.
2188 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
2189 * doc/xml/manual/strings.xml: Likewise.
2190 * doc/xml/manual/support.xml: Likewise.
2191 * doc/xml/manual/test.xml: Likewise.
2192 * doc/xml/manual/test_policy_data_structures.xml: Likewise.
2193 * doc/xml/manual/using.xml: Likewise.
2194 * doc/xml/manual/using_exceptions.xml: Likewise.
2195 * doc/xml/manual/utilities.xml: Likewise.
2196 * doc/html/*: Regenerate.
2198 2020-10-12 Patrick Palka <ppalka@redhat.com>
2200 * include/std/ranges (take_while_view::begin): Constrain the
2201 const overload further as per LWG 3450.
2202 (take_while_view::end): Likewise.
2203 * testsuite/std/ranges/adaptors/take_while.cc: Add test for LWG
2206 2020-10-12 Patrick Palka <ppalka@redhat.com>
2209 * include/std/ranges (take_view::_CI): Define this alias
2210 template as per LWG 3449 and remove ...
2211 (take_view::_Sentinel::_CI): ... this type alias.
2212 (take_view::_Sentinel::operator==): Adjust use of _CI
2213 accordingly. Define a second overload that accepts an iterator
2214 of the opposite constness as per LWG 3449.
2215 (take_while_view::_Sentinel::operator==): Likewise.
2216 * testsuite/std/ranges/adaptors/95322.cc: Add tests for LWG 3449.
2218 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
2220 * doc/doxygen/user.cfg.in: Update to Doxygen 1.8.20 format.
2222 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
2224 * doc/doxygen/user.cfg.in (PREDEFINED): Use __cplusplus=201703L
2225 so that C++17 features are documented.
2227 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
2229 * include/bits/stl_algobase.h (copy, move, copy_backward)
2230 (move_backward): Fix documentation for returned iterator.
2232 2020-10-12 Martin Sebor <msebor@redhat.com>
2235 * libsupc++/new (operator new): Add attribute alloc_size and malloc.
2237 2020-10-11 Clement Chigot <clement.chigot@atos.net>
2239 * config/os/aix/t-aix: Add complementary mode object file to
2242 2020-10-10 Jonathan Wakely <jwakely@redhat.com>
2245 * doc/html/manual/source_code_style.html: Regenerate.
2246 * doc/xml/manual/appendix_contributing.xml: Add __deref to
2248 * include/debug/functions.h (_Irreflexive_checker::__deref):
2250 * testsuite/17_intro/badnames.cc: Check __deref.
2252 2020-10-10 Ville Voutilainen <ville.voutilainen@gmail.com>
2254 * include/std/variant (__check_visitor_result):
2255 Use size_t for indexes.
2256 (__check_visitor_results): Likewise.
2258 2020-10-09 Ville Voutilainen <ville.voutilainen@gmail.com>
2261 * include/std/variant (__deduce_visit_result): Add a nested ::type.
2262 (__gen_vtable_impl</*base case*/>::_S_apply):
2263 Check the visitor return type.
2264 (__same_types): New.
2265 (__check_visitor_result): Likewise.
2266 (__check_visitor_results): Likewise.
2267 (visit(_Visitor&&, _Variants&&...)): Use __check_visitor_results
2268 in case we're visiting just one variant.
2269 * testsuite/20_util/variant/visit_neg.cc: Adjust.
2271 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
2274 * include/bits/random.tcc (seed_seq::generate): Use uint32_t for
2275 calculations. Also split the first loop into three loops to
2276 avoid branching on k on every iteration, resolving PR 94823.
2277 * testsuite/26_numerics/random/seed_seq/97311.cc: New test.
2278 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-erro
2281 2020-10-09 Daniel Lemire <lemire@gmail.com>
2283 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
2284 New member function implementing Lemire's "nearly divisionless"
2286 (uniform_int_distribution::operator()): Use _S_nd when the range
2287 of the URBG is the full width of the result type.
2289 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
2291 * testsuite/Makefile.am: Set and export variable separately.
2292 * testsuite/Makefile.in: Regenerate.
2294 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
2296 * scripts/check_performance: Use gnu++11 instead of gnu++0x.
2297 * testsuite/Makefile.am (check-performance): Export CXXFLAGS to
2299 * testsuite/Makefile.in: Regenerate.
2301 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
2303 * testsuite/performance/26_numerics/random_dist.cc: New test.
2305 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
2307 * testsuite/util/testsuite_performance.h (report_header): Remove
2310 2020-10-08 Patrick Palka <ppalka@redhat.com>
2313 * include/bits/ranges_uninitialized.h:
2314 (__construct_at_fn::operator()): Rewrite in terms of
2315 std::construct_at. Declare it conditionally noexcept. Qualify
2316 calls to declval in its requires-clause.
2317 * testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
2320 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
2323 * include/bits/random.tcc
2324 (discrete_distribution::param_type::_M_initialize)
2325 (piecewise_constant_distribution::param_type::_M_initialize)
2326 (piecewise_linear_distribution::param_type::_M_initialize):
2327 Add assertions for positive sums..
2328 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
2331 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
2333 * include/bits/ios_base.h (ios_base::failure): Add constructors
2334 takeing error_code argument. Add code() member function.
2335 * testsuite/27_io/ios_base/failure/cxx11.cc: Allow test to
2336 run for the old ABI but do not check for derivation from
2338 * testsuite/27_io/ios_base/failure/error_code.cc: New test.
2340 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
2342 * include/bits/random.h (__detail::_Mod): Revert last change.
2343 (__detail::__mod): Do not use _Mod for a==0 case.
2344 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
2345 Check other cases with a==0. Also check runtime results.
2346 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
2349 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
2351 * include/bits/random.h (__detail::_Mod): Avoid divide by zero.
2352 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
2355 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
2357 * include/bits/random.h (seed_seq(initializer_list<T>)): Rename
2358 parameter to use reserved name.
2359 * include/bits/ranges_algo.h (shift_left, shift_right): Rename
2360 template parameters to use reserved name.
2361 * libsupc++/exception_ptr.h (exception_ptr): Likewise for
2362 parameters and local variables.
2363 * testsuite/17_intro/names.cc: Check "il". Do not check "d" and
2366 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
2369 * config/abi/pre/gnu.ver (CXXABI_1.3.13): New symbol version.
2370 (exception_ptr::_M_addref(), exception_ptr::_M_release()):
2372 * libsupc++/eh_ptr.cc (exception_ptr::exception_ptr()):
2373 Remove out-of-line definition.
2374 (exception_ptr::exception_ptr(const exception_ptr&)):
2376 (exception_ptr::~exception_ptr()): Likewise.
2377 (exception_ptr::operator=(const exception_ptr&)):
2379 (exception_ptr::swap(exception_ptr&)): Likewise.
2380 (exception_ptr::_M_addref()): Add branch prediction.
2381 * libsupc++/exception_ptr.h (exception_ptr::operator bool):
2383 [!_GLIBCXX_EH_PTR_COMPAT] (operator==, operator!=): Define
2384 inline as hidden friends. Remove declarations at namespace
2386 (exception_ptr::exception_ptr()): Define inline.
2387 (exception_ptr::exception_ptr(const exception_ptr&)):
2389 (exception_ptr::~exception_ptr()): Likewise.
2390 (exception_ptr::operator=(const exception_ptr&)):
2392 (exception_ptr::swap(exception_ptr&)): Likewise.
2393 * testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.13.
2394 * testsuite/18_support/exception_ptr/90295.cc: New test.
2396 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
2398 * include/std/ranges (join_view): Remove deduction guide.
2399 (views::join): Add explicit template argument list to prevent
2400 deducing the wrong type.
2401 * testsuite/std/ranges/adaptors/join.cc: Move test for LWG 3474
2403 * testsuite/std/ranges/adaptors/join_lwg3474.cc: Removed.
2405 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
2407 * include/bits/regex.h: Use __int_traits<int> instead of
2408 std::numeric_limits<int>.
2409 * include/bits/uniform_int_dist.h: Use __int_traits<T>::__max
2410 instead of std::numeric_limits<T>::max().
2411 * include/bits/hashtable_policy.h: Use size_t(-1) instead of
2412 std::numeric_limits<size_t>::max().
2413 * include/std/regex: Include <ext/numeric_traits.h>.
2414 * include/std/string_view: Use typedef for __int_traits<int>.
2415 * src/c++11/hashtable_c++0x.cc: Use size_t(-1) instead of
2416 std::numeric_limits<size_t>::max().
2417 * testsuite/std/ranges/iota/96042.cc: Include <limits>.
2418 * testsuite/std/ranges/iota/difference_type.cc: Likewise.
2419 * testsuite/std/ranges/subrange/96042.cc: Likewise.
2421 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
2423 * include/std/numeric: Move all #include directives to the top
2425 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line
2427 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
2429 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
2431 * config/abi/pre/gnu.ver: Add new symbol.
2432 * include/bits/functexcept.h (__throw_bad_array_new_length):
2433 Declare new function.
2434 * include/ext/malloc_allocator.h (malloc_allocator::allocate):
2435 Throw bad_array_new_length for impossible sizes (LWG 3190).
2436 * include/ext/new_allocator.h (new_allocator::allocate):
2438 * include/std/memory_resource (polymorphic_allocator::allocate)
2439 (polymorphic_allocator::allocate_object): Use new function,
2440 __throw_bad_array_new_length.
2441 * src/c++11/functexcept.cc (__throw_bad_array_new_length):
2443 * testsuite/20_util/allocator/lwg3190.cc: New test.
2445 2020-10-05 Mike Crowe <mac@mcrowe.com>
2448 * include/bits/atomic_futex.h:
2449 (__atomic_futex_unsigned::_M_load_when_equal_until): Use target
2450 clock duration type when rounding.
2451 * testsuite/30_threads/async/async.cc (test_pr91486_wait_for):
2452 Rename from test_pr91486.
2453 (float_steady_clock): New class for test.
2454 (test_pr91486_wait_until): New test.
2456 2020-10-05 Mike Crowe <mac@mcrowe.com>
2458 * testsuite/20_util/duration_cast/rounding_c++11.cc: Copy
2459 rounding.cc and alter to support compilation for C++11 and to
2460 test std::chrono::__detail::ceil.
2462 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
2464 * testsuite/29_atomics/atomic_float/value_init.cc: Use float
2465 instead of double so that __atomic_load_8 isn't needed.
2467 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
2469 * testsuite/18_support/96817.cc: Use terminate handler that
2472 2020-10-02 Patrick Palka <ppalka@redhat.com>
2474 * include/bits/stl_iterator.h (reverse_iterator::iter_move):
2475 Define for C++20 as per P0896.
2476 (reverse_iterator::iter_swap): Likewise.
2477 (move_iterator::operator*): Apply P0896 changes for C++20.
2478 (move_iterator::operator[]): Likewise.
2479 * testsuite/24_iterators/reverse_iterator/cust.cc: New test.
2481 2020-10-01 Jonathan Wakely <jwakely@redhat.com>
2483 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
2484 Do not try to dereference return value of __atomic_load_n.
2486 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
2488 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
2489 (_GLIBCXX_GUARD_SET_AND_RELEASE): Define for EABI.
2491 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
2493 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_IS_SAME):
2494 Define for GCC 11 or when !__is_identifier(__is_same).
2495 (_GLIBCXX_BUILTIN_IS_SAME_AS): Remove.
2496 * include/std/type_traits (is_same, is_same_v): Replace uses
2497 of _GLIBCXX_BUILTIN_IS_SAME_AS.
2499 2020-09-28 Patrick Palka <ppalka@redhat.com>
2501 * include/std/ranges (filter_view): Declare the data member
2502 _M_base last instead of first, and adjust constructors' member
2503 initializer lists accordingly.
2504 (transform_view): Likewise.
2505 (take_view): Likewise.
2506 (take_while_view): Likewise.
2507 (drop_view): Likewise.
2508 (drop_while_view): Likewise.
2509 (join_view): Likewise.
2510 (split_view): Likewise (and tweak nearby formatting).
2511 (reverse_view): Likewise.
2512 * testsuite/std/ranges/adaptors/sizeof.cc: Update expected
2515 2020-09-28 Patrick Palka <ppalka@redhat.com>
2517 * testsuite/std/ranges/adaptors/sizeof.cc: New test.
2519 2020-09-28 Patrick Palka <ppalka@redhat.com>
2521 * include/bits/ranges_util.h (subrange::_M_end): Give it
2522 [[no_unique_address]].
2523 * testsuite/std/ranges/subrange/sizeof.cc: New test.
2525 2020-09-28 Patrick Palka <ppalka@redhat.com>
2527 * include/std/ranges (iota_view::_M_bound): Give it
2528 [[no_unique_address]].
2529 * testsuite/std/ranges/iota/iota_view.cc: Check that an
2530 unbounded iota_view has minimal size.
2532 2020-09-27 Clement Chigot <clement.chigot@atos.net>
2534 * config/os/aix/t-aix: Use $(AR) without -X32_64.
2536 2020-09-26 Jonathan Wakely <jwakely@redhat.com>
2539 * include/ext/atomicity.h (__gnu_cxx::__is_single_threaded()):
2540 New function wrapping __libc_single_threaded if available.
2541 (__exchange_and_add_dispatch, __atomic_add_dispatch): Use it.
2542 * libsupc++/guard.cc (__cxa_guard_acquire, __cxa_guard_abort)
2543 (__cxa_guard_release): Likewise.
2544 * testsuite/18_support/96817.cc: New test.
2546 2020-09-25 Jonathan Wakely <jwakely@redhat.com>
2548 * libsupc++/Makefile.am: Remove redundant -std=gnu++1z flags.
2549 * libsupc++/Makefile.in: Regenerate.
2551 2020-09-24 Antony Polukhin <antoshkka@gmail.com>
2554 * include/std/type_traits (invoke_result, is_invocable)
2555 (is_invocable_r, is_nothrow_invocable, is_nothrow_invocable_r):
2556 Add static_asserts to make sure that the arguments of the type
2557 traits are not misused with incomplete types.
2558 * testsuite/20_util/invoke_result/incomplete_args_neg.cc: New test.
2559 * testsuite/20_util/is_invocable/incomplete_args_neg.cc: New test.
2560 * testsuite/20_util/is_invocable/incomplete_neg.cc: New test.
2561 * testsuite/20_util/is_nothrow_invocable/incomplete_args_neg.cc:
2563 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: Check
2564 for error on incomplete type usage in trait.
2566 2020-09-24 Patrick Palka <ppalka@redhat.com>
2568 * include/std/ranges (__detail::__boxable): Split out the
2569 associated constraints of __box into here.
2570 (__detail::__box): Use the __boxable concept. Define a leaner
2571 partial specialization for semiregular types.
2572 (single_view::_M_value): Give it [[no_unique_address]].
2573 (filter_view::_M_pred): Likewise.
2574 (transform_view::_M_fun): Likewise.
2575 (take_while_view::_M_pred): Likewise.
2576 (drop_while_view::_M_pred):: Likewise.
2577 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc: New
2580 2020-09-24 Jonathan Wakely <jwakely@redhat.com>
2582 * doc/xml/manual/configure.xml: Correct name of option.
2583 * doc/html/*: Regenerate.
2585 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
2588 * src/c++17/fs_path.cc (path::_Parser::root_path()): Check
2589 for empty string before inspecting the first character.
2590 * testsuite/27_io/filesystem/path/append/source.cc: Append
2591 empty string_view to path.
2593 2020-09-22 Glen Joseph Fernandes <glenjofe@gmail.com>
2595 * include/bits/align.h (align): Fix overflow handling.
2596 * testsuite/20_util/align/3.cc: New test.
2598 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
2600 * include/Makefile.am: Add new headers and adjust for renamed
2602 * include/Makefile.in: Regenerate.
2603 * include/bits/iterator_concepts.h: Adjust for renamed header.
2604 * include/bits/range_access.h (ranges::*): Move to new
2605 <bits/ranges_base.h> header.
2606 * include/bits/ranges_algobase.h: Include new <bits/ranges_base.h>
2607 header instead of <ranges>.
2608 * include/bits/ranges_algo.h: Include new <bits/ranges_util.h>
2610 * include/bits/range_cmp.h: Moved to...
2611 * include/bits/ranges_cmp.h: ...here.
2612 * include/bits/ranges_base.h: New header.
2613 * include/bits/ranges_util.h: New header.
2614 * include/experimental/string_view: Include new
2615 <bits/ranges_base.h> header.
2616 * include/std/functional: Adjust for renamed header.
2617 * include/std/ranges (ranges::view_base, ranges::enable_view)
2618 (ranges::dangling, ranges::borrowed_iterator_t): Move to new
2619 <bits/ranges_base.h> header.
2620 (ranges::view_interface, ranges::subrange)
2621 (ranges::borrowed_subrange_t): Move to new <bits/ranges_util.h>
2623 * include/std/span: Include new <bits/ranges_base.h> header.
2624 * include/std/string_view: Likewise.
2625 * testsuite/24_iterators/back_insert_iterator/pr93884.cc: Add
2626 missing <ranges> header.
2627 * testsuite/24_iterators/front_insert_iterator/pr93884.cc:
2630 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
2634 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
2635 Use correct value category in __use_alloc call.
2636 * testsuite/20_util/tuple/cons/96803.cc: Check with constructors
2637 that require correct value category to be used.
2639 2020-09-22 Patrick Palka <ppalka@redhat.com>
2641 * include/std/span (span::front): Remove static_assert.
2642 (span::back): Likewise.
2643 (span::operator[]): Likewise.
2644 * testsuite/23_containers/span/back_neg.cc: Rewrite to verify
2645 that we check the preconditions of back() only when it's called.
2646 * testsuite/23_containers/span/front_neg.cc: Likewise for
2648 * testsuite/23_containers/span/index_op_neg.cc: Likewise for
2651 2020-09-22 Patrick Palka <ppalka@redhat.com>
2653 * include/bits/stl_algo.h (__sample): Exit early when the
2654 input range is empty.
2655 * testsuite/25_algorithms/sample/3.cc: New test.
2657 2020-09-22 Patrick Palka <ppalka@redhat.com>
2659 * include/bits/stl_algo.h (for_each_n): Mark constexpr for C++20.
2660 (search): Likewise for the overload that takes a searcher.
2661 * testsuite/25_algorithms/for_each/constexpr.cc: Test constexpr
2663 * testsuite/25_algorithms/search/constexpr.cc: Test constexpr
2664 std::search overload that takes a searcher.
2666 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2668 * include/bits/c++config (__replacement_assert): Add noreturn
2670 (__glibcxx_assert_impl): Use __builtin_expect to hint that the
2671 assertion is expected to pass.
2673 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2675 * include/std/ranges (drop_view::begin()): Adjust constraints
2676 to match the correct condition for O(1) ranges::next (LWG 3482).
2677 * testsuite/std/ranges/adaptors/drop.cc: Check that iterator is
2678 cached for non-sized_range.
2680 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2682 * include/std/ranges (transform_view, elements_view): Relax
2683 constraints on operator- for iterators, as per LWG 3483.
2684 * testsuite/std/ranges/adaptors/elements.cc: Check that we
2685 can take the difference of two iterators from a non-random
2687 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
2689 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2692 * include/bits/align.h (align) [!_GLIBCXX_USE_C99_STDINT_TR1]:
2694 (assume_aligned): Do not use __builtin_assume_aligned during
2695 constant evaluation.
2696 * testsuite/20_util/assume_aligned/1.cc: Improve test.
2697 * testsuite/20_util/assume_aligned/97132.cc: New test.
2699 2020-09-20 Jonathan Wakely <jwakely@redhat.com>
2702 * include/std/functional (bind_front): Fix order of parameters
2703 in is_nothrow_constructible_v specialization.
2704 * testsuite/20_util/function_objects/bind_front/97101.cc: New test.
2706 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
2708 * include/std/memory: Move #include <bits/align.h> inside C++11
2709 conditional includes.
2711 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
2713 * include/Makefile.am (bits_headers): Add new header.
2714 * include/Makefile.in: Regenerate.
2715 * include/bits/align.h: New file.
2716 * include/std/memory (align): Move definition to bits/align.h.
2717 (assume_aligned): Likewise.
2719 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
2721 * include/std/chrono [C++17] (chrono::__detail::ceil): Add
2722 using declaration to make chrono::ceil available for internal
2723 use with a consistent name.
2724 (chrono::__detail::__ceil_impl): New function template.
2725 (chrono::__detail::ceil): Use __ceil_impl to compare and
2726 increment the value. Remove SFINAE constraint.
2728 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
2730 * include/bits/regex_error.h (__throw_regex_error): Fix
2731 parameter declaration and use reserved attribute names.
2733 2020-09-11 Mike Crowe <mac@mcrowe.com>
2735 * include/std/condition_variable (condition_variable::wait_until):
2736 Convert delta to steady_clock duration before adding to current
2737 steady_clock time to avoid rounding errors described in PR68519.
2738 (condition_variable::wait_for): Simplify calculation of absolute
2739 time by using chrono::__detail::ceil in both overloads.
2740 * testsuite/30_threads/condition_variable/members/68519.cc:
2741 (test_wait_for): Renamed from test01. Replace unassigned val
2742 variable with constant false. Reduce scope of mx and cv
2743 variables to just test_wait_for function.
2744 (test_wait_until): Add new test case.
2746 2020-09-11 Mike Crowe <mac@mcrowe.com>
2749 * include/bits/atomic_futex.h
2750 (__atomic_futex_unsigned::_M_load_when_equal_for)
2751 (__atomic_futex_unsigned::_M_load_when_equal_until): Use
2752 __detail::ceil to convert delta to the reference clock
2753 duration type to avoid resolution problems.
2754 * include/std/chrono (__detail::ceil): Move implementation
2755 of std::chrono::ceil into private namespace so that it's
2756 available to pre-C++17 code.
2757 * testsuite/30_threads/async/async.cc (test_pr91486):
2758 Test __atomic_futex_unsigned::_M_load_when_equal_for.
2760 2020-09-11 Mike Crowe <mac@mcrowe.com>
2762 * include/bits/atomic_futex.h
2763 (__atomic_futex_unsigned::_M_load_when_equal_until): Add
2764 loop on generic _Clock to check the timeout against _Clock
2765 again after _M_load_when_equal_until returns indicating a
2767 * testsuite/30_threads/async/async.cc: Invent slow_clock
2768 that runs at an eleventh of steady_clock's speed. Use it
2769 to test the user-supplied-clock variant of
2770 __atomic_futex_unsigned::_M_load_when_equal_until works
2771 generally with test03 and loops correctly when the timeout
2772 time hasn't been reached in test04.
2774 2020-09-11 Mike Crowe <mac@mcrowe.com>
2777 * include/bits/atomic_futex.h (__atomic_futex_unsigned): Change
2778 __clock_t typedef to use steady_clock so that unknown clocks are
2779 synced to it rather than system_clock. Change existing __clock_t
2780 overloads of _M_load_and_text_until_impl and
2781 _M_load_when_equal_until to use system_clock explicitly. Remove
2782 comment about DR 887 since these changes address that problem as
2783 best as we currently able.
2785 2020-09-11 Mike Crowe <mac@mcrowe.com>
2788 * config/abi/pre/gnu.ver: Update for addition of
2789 __atomic_futex_unsigned_base::_M_futex_wait_until_steady.
2790 * include/bits/atomic_futex.h (__atomic_futex_unsigned_base):
2791 Add comments to clarify that _M_futex_wait_until and
2792 _M_load_and_test_until use CLOCK_REALTIME.
2793 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady)
2794 (__atomic_futex_unsigned_base::_M_load_and_text_until_steady):
2795 New member functions that use CLOCK_MONOTONIC.
2796 (__atomic_futex_unsigned_base::_M_load_and_test_until_impl)
2797 (__atomic_futex_unsigned_base::_M_load_when_equal_until): Add
2798 overloads that accept a steady_clock time_point and use the
2799 new member functions.
2800 * src/c++11/futex.cc: Include headers required for
2802 (futex_clock_monotonic_flag): New constant to tell futex to
2803 use CLOCK_MONOTONIC to match existing futex_clock_realtime_flag.
2804 (futex_clock_monotonic_unavailable): New global to store the
2805 result of trying to use CLOCK_MONOTONIC.
2806 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady): Add
2807 new variant of _M_futex_wait_until that uses CLOCK_MONOTONIC to
2808 support waiting using steady_clock.
2810 2020-09-11 Mike Crowe <mac@mcrowe.com>
2812 * src/c++11/futex.cc: Add new constants for required futex
2813 flags. Add futex_clock_realtime_unavailable flag to store
2814 result of trying to use FUTEX_CLOCK_REALTIME.
2815 (__atomic_futex_unsigned_base::_M_futex_wait_until): Try to
2816 use FUTEX_WAIT_BITSET with FUTEX_CLOCK_REALTIME and only
2817 fall back to using gettimeofday and FUTEX_WAIT if that's not
2820 2020-09-11 Mike Crowe <mac@mcrowe.com>
2822 * testsuite/30_threads/async/async.cc (test02): Test steady_clock
2823 with std::future::wait_until.
2824 (test03): Add new test templated on clock type waiting for future
2825 associated with async to resolve.
2826 (main): Call test03 to test both system_clock and steady_clock.
2828 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
2829 Christophe Lyon <christophe.lyon@linaro.org>
2831 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
2833 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
2834 Christophe Lyon <christophe.lyon@linaro.org>
2836 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
2838 2020-09-11 Christophe Lyon <christophe.lyon@linaro.org>
2840 * include/bits/regex_error.h: Avoid warning with -fno-exceptions.
2842 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2844 * include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in_all):
2845 Add casts to compare types of the same signedness.
2847 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2849 * include/bits/ranges_algobase.h (__equal_fn): Remove unused
2852 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2854 * include/std/version (__cpp_lib_array_constexpr):
2855 (__cpp_lib_constexpr_char_traits): Only define C++17 value when
2858 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2860 * include/experimental/bits/shared_ptr.h (shared_ptr(auto_ptr&&))
2861 (operator=(auto_ptr&&)): Add diagnostic pragmas to suppress
2862 warnings for uses of std::auto_ptr.
2863 * include/experimental/type_traits (is_literal_type_v):
2864 Likewise, for use of std::is_literal_type.
2865 * include/std/condition_variable (condition_variable_any::_Unlock):
2866 Likewise, for use of std::uncaught_exception.
2868 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2870 * include/bits/fs_path.h (path::_List::type()): Avoid narrowing
2872 * include/std/chrono (operator+(const year&, const years&)):
2875 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2877 * include/bits/codecvt.h (codecvt_byname): Remove names of
2880 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2882 * include/bits/locale_facets_nonio.tcc: Adjust whitespace.
2884 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
2886 * include/c_global/cmath (__lerp): Avoid -Wparentheses warnings.
2888 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
2890 * include/bits/atomic_base.h: Fix -Wunused-variable
2892 * include/ext/new_allocator.h: Fix -Wunused-parameter
2895 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2897 * include/bits/stl_iterator.h (counted_iterator): Add assertions
2898 to check preconditions added by LWG 3472.
2900 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2903 * src/c++17/memory_resource.cc (munge_options): Round
2904 max_blocks_per_chunk to a multiple of four.
2905 (__pool_resource::_M_alloc_pools()): Simplify slightly.
2906 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
2907 Check that valid pointers are returned when small values are
2908 used for max_blocks_per_chunk.
2910 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2913 * include/std/memory_resource (monotonic_buffer_resource::do_allocate):
2914 Use __builtin_expect when checking if a new buffer needs to be
2915 allocated from the upstream resource, and for checks for edge
2916 cases like zero sized buffers and allocations.
2917 * src/c++17/memory_resource.cc (aligned_size): New class template.
2918 (aligned_ceil): New helper function to round up to a given
2920 (monotonic_buffer_resource::chunk): Replace _M_size and _M_align
2921 with an aligned_size member. Remove _M_canary member. Change _M_next
2922 to pointer instead of unaligned buffer.
2923 (monotonic_buffer_resource::chunk::allocate): Round up to multiple
2924 of 64 instead of to power of two. Check for size overflow. Remove
2925 redundant check for minimum required alignment.
2926 (monotonic_buffer_resource::chunk::release): Adjust for changes
2928 (monotonic_buffer_resource::_M_new_buffer): Use aligned_ceil.
2929 (big_block): Replace _M_size and _M_align with aligned_size
2931 (big_block::big_block): Check for size overflow.
2932 (big_block::size, big_block::align): Adjust to use aligned_size.
2933 (big_block::alloc_size): Use aligned_ceil.
2934 (munge_options): Use aligned_ceil.
2935 (__pool_resource::allocate): Use big_block::align for alignment.
2936 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Check
2937 upstream resource gets expected values for impossible sizes.
2938 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
2939 Likewise. Adjust checks for expected alignment in existing test.
2941 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
2943 * include/std/chrono (duration::_S_gcd): Use invariant that
2944 neither value is zero initially.
2946 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
2948 * include/std/ranges (__box): Simplify constraints as per LWG 3477.
2950 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
2953 * include/std/tuple (_TupleConstraints<true, T...>): Use
2954 alternative is_constructible instead of std::is_constructible.
2955 * testsuite/20_util/tuple/cons/96592.cc: New test.
2957 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
2959 * include/std/chrono (duration::_S_gcd): Use iterative algorithm
2960 for C++14 and later.
2961 * include/std/numeric (__detail::__gcd): Replace recursive
2962 Euclidean algorithm with iterative version of binary GCD algorithm.
2963 * testsuite/26_numerics/gcd/1.cc: Test additional inputs.
2964 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
2965 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
2966 * testsuite/experimental/numeric/gcd.cc: Test additional inputs.
2967 * testsuite/26_numerics/gcd/2.cc: New test.
2969 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
2972 * testsuite/experimental/numeric/92978.cc: Use experimental::lcm
2975 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
2978 * include/bits/cpp_type_traits.h (__is_memcmp_ordered):
2979 New trait that says if memcmp can be used for ordering.
2980 (__is_memcmp_ordered_with): Likewise, for two types.
2981 * include/bits/deque.tcc (__lex_cmp_dit): Use new traits
2982 instead of __is_byte and __numeric_traits.
2983 (__lexicographical_compare_aux1): Likewise.
2984 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
2986 * include/bits/stl_algobase.h (__lexicographical_compare_aux1)
2987 (__is_byte_iter): Likewise.
2988 * include/std/array (operator<=>): Likewise. Only use memcmp
2989 when std::is_constant_evaluated() is false.
2990 * testsuite/23_containers/array/comparison_operators/96851.cc:
2992 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
2993 Adjust dg-error line numbers.
2995 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
2997 * include/bits/stl_iterator.h: Include <bits/exception_defines.h>
2998 for definitions of __try, __catch and __throw_exception_again.
2999 (counted_iterator::operator++(int)): Use __throw_exception_again
3001 * libsupc++/new: Include <bits/exception.h> not <exception>.
3002 * libsupc++/new_opvnt.cc: Include <bits/exception_defines.h>.
3003 * testsuite/18_support/destroying_delete.cc: Include
3004 <type_traits> for std::is_same_v definition.
3005 * testsuite/20_util/variant/index_type.cc: Qualify size_t.
3007 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
3010 * include/bits/c++config (__glibcxx_assert_impl): Remove
3011 do-while so that uses of the macro need to add it.
3012 (__glibcxx_assert): Rename macro for runtime assertions
3013 to __glibcxx_assert_2.
3014 (__glibcxx_assert_1): Define macro for constexpr assertions.
3015 (__glibcxx_assert): Define macro for constexpr and runtime
3017 * include/bits/range_access.h (ranges::advance): Remove
3018 redundant precondition checks during constant evaluation.
3019 * include/parallel/base.h (_GLIBCXX_PARALLEL_ASSERT): Always
3020 use do-while in macro expansion.
3021 * include/std/ranges (iota_view::iota_view(W, B)): Remove
3024 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
3026 * include/std/chrono (duration::_S_gcd(intmax_t, intmax_t)):
3027 New helper function for finding GCD of two positive intmax_t
3029 (duration::__divide): New helper alias for dividing one period
3031 (duration::__is_harmonic): Use __divide not ratio_divide.
3032 (duration(const duration<R2, P2>&)): Require the duration rep
3033 types to be convertible.
3034 * testsuite/20_util/duration/cons/dr2094.cc: New test.
3035 * testsuite/20_util/duration/requirements/reduced_period.cc:
3036 Fix definition of unused member functions in test type.
3037 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
3038 Adjust expected errors.
3040 2020-08-29 Jonathan Wakely <jwakely@redhat.com>
3042 * include/std/numeric (__detail::__absu(bool)): Make deleted
3043 function a function template, so it will be chosen for calls
3044 with an explicit template argument list.
3045 * testsuite/26_numerics/gcd/gcd_neg.cc: Add dg-prune-output.
3046 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
3048 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
3050 * include/std/chrono (common_type): Fix partial specializations
3051 for a single duration type to use the common_type of the rep.
3052 (duration::operator+, duration::operator-): Fix return types
3053 to also use the common_type of the rep.
3054 * testsuite/20_util/duration/requirements/reduced_period.cc:
3055 Check duration using a rep that has common_type specialized.
3057 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
3060 * include/std/numeric (__abs_integral): Replace with ...
3061 (__detail::__absu): New function template that returns an
3062 unsigned type, guaranteeing it can represent the most
3063 negative signed value.
3064 (__detail::__gcd, __detail::__lcm): Require arguments to
3065 be unsigned and therefore already non-negative.
3066 (gcd, lcm): Convert arguments to absolute value as unsigned
3067 type before calling __detail::__gcd or __detail::__lcm.
3068 * include/experimental/numeric (gcd, lcm): Likewise.
3069 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust expected
3071 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
3072 * testsuite/26_numerics/gcd/92978.cc: New test.
3073 * testsuite/26_numerics/lcm/92978.cc: New test.
3074 * testsuite/experimental/numeric/92978.cc: New test.
3076 2020-08-27 Jonathan Wakely <jwakely@redhat.com>
3078 * include/std/chrono (__duration_common_type): Ensure the
3079 reduced ratio is used. Remove unused partial specialization
3080 using __failure_type.
3081 (common_type): Pass reduced ratios to __duration_common_type.
3082 Add partial specializations for simple cases involving a single
3083 duration or time_point type.
3084 (duration::period): Use reduced ratio.
3085 (duration::operator+(), duration::operator-()): Return duration
3086 type using the reduced ratio.
3087 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
3088 Adjust expected errors.
3089 * testsuite/20_util/duration/requirements/reduced_period.cc: New test.
3091 2020-08-27 Patrick Palka <ppalka@redhat.com>
3093 * include/std/chrono (year_month::operator+): Properly handle a
3094 month value of 0 by casting the month value to int before
3095 subtracting 1 from it so that the difference is sign-extended in
3096 the subsequent addition.
3097 * testsuite/std/time/year_month/1.cc: Test adding months to a
3098 year_month whose month component is below or above the
3099 normalized range of [1,12].
3101 2020-08-27 Patrick Palka <ppalka@redhat.com>
3103 * include/std/chrono
3104 (__detail::__months_years_conversion_disambiguator): Define.
3105 (year_month::operator+=): Templatize the 'months'-based overload
3106 so that the 'years'-based overload is selected in case of
3107 equally-ranked implicit conversion sequences to both 'months'
3108 and 'years' from the supplied argument.
3109 (year_month::operator-=): Likewise.
3110 (year_month::operator+): Likewise.
3111 (year_month::operator-): Likewise.
3112 (year_month_day::operator+=): Likewise.
3113 (year_month_day::operator-=): Likewise.
3114 (year_month_day::operator+): Likewise.
3115 (year_month_day::operator-): Likewise.
3116 (year_month_day_last::operator+=): Likewise.
3117 (year_month_day_last::operator-=): Likewise.
3118 (year_month_day_last::operator+): Likewise
3119 (year_month_day_last::operator-): Likewise.
3120 (year_month_day_weekday::operator+=): Likewise
3121 (year_month_day_weekday::operator-=): Likewise.
3122 (year_month_day_weekday::operator+): Likewise.
3123 (year_month_day_weekday::operator-): Likewise.
3124 (year_month_day_weekday_last::operator+=): Likewise
3125 (year_month_day_weekday_last::operator-=): Likewise.
3126 (year_month_day_weekday_last::operator+): Likewise.
3127 (year_month_day_weekday_last::operator-): Likewise.
3128 (testsuite/std/time/year_month/2.cc): New test.
3129 (testsuite/std/time/year_month_day/2.cc): New test.
3130 (testsuite/std/time/year_month_day_last/2.cc): New test.
3131 (testsuite/std/time/year_month_weekday/2.cc): New test.
3132 (testsuite/std/time/year_month_weekday_last/2.cc): New test.
3133 * testsuite/std/time/year_month/2.cc: New file.
3134 * testsuite/std/time/year_month_day/2.cc: New file.
3135 * testsuite/std/time/year_month_day_last/2.cc: New file.
3136 * testsuite/std/time/year_month_weekday/2.cc: New file.
3137 * testsuite/std/time/year_month_weekday_last/2.cc: New file.
3139 2020-08-27 Patrick Palka <ppalka@redhat.com>
3142 * include/std/ranges (transform_view::sentinel::__distance_from):
3143 Give this a deduced return type.
3144 (transform_view::sentinel::operator-): Adjust the return type so
3145 that it's based on the constness of the iterator rather than
3146 that of the sentinel.
3147 * testsuite/std/ranges/adaptors/95322.cc: Refer to LWG 3488.
3149 2020-08-27 Patrick Palka <ppalka@redhat.com>
3151 * include/std/ranges (elements_view::begin): Adjust constraints.
3152 (elements_view::end): Likewise.
3153 (elements_view::_Sentinel::operator==): Templatize to take both
3154 _Iterator<true> and _Iterator<false>.
3155 (elements_view::_Sentinel::operator-): Likewise.
3156 * testsuite/std/ranges/adaptors/elements.cc: Add testcase for
3157 the example from P1994R1.
3158 * testsuite/std/ranges/adaptors/lwg3406.cc: New test.
3160 2020-08-27 Patrick Palka <ppalka@redhat.com>
3162 * include/std/ranges (elements_view::end): Replace these two
3163 overloads with four new overloads.
3164 (elements_view::_Iterator::operator==): Remove.
3165 (elements_view::_Iterator::operator-): Likewise.
3166 (elements_view::_Sentinel): Define.
3168 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
3170 * include/std/tuple (_Tuple_impl): Whitespaces changes for
3171 consistent indentation. Also use __enable_if_t alias template.
3173 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
3177 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
3178 Replace parameter pack with a type parameter and a pack and pass
3179 the first type to __use_alloc.
3180 * testsuite/20_util/tuple/cons/96803.cc: New test.
3182 2020-08-26 Patrick Palka <ppalka@redhat.com>
3184 * include/std/chrono (year_month_weekday::operator==): Compare
3185 weekday_indexed instead of weekday.
3186 * testsuite/std/time/year_month_weekday/1.cc: Augment testcase.
3188 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
3190 * include/bits/hashtable_policy.h (_Hash_code_base): Change
3191 index of _Hashtable_ebo_helper base class.
3192 * testsuite/23_containers/unordered_map/dup_types.cc: New test.
3194 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
3197 * include/experimental/string_view (basic_string_view):
3198 Enable debug assertions.
3199 * include/std/string_view (basic_string_view):
3202 2020-08-26 François Dumont <fdumont@gcc.gnu.org>
3204 * include/bits/hashtable_policy.h (_Hashtable<>): Rename _H1 into _Hash
3205 _H2 into _RangeHash and _Hash into _Unused.
3206 (_Hastable_base<>): Likewise.
3207 (_Map_base<>): Likewise.
3208 (_Insert_base<>): Likewise.
3209 (_Insert<>): Likewise.
3210 (_Rehash_base<>): Likewise.
3211 (_Local_iterator_base<>): Likewise.
3212 (_Hash_code_base<>): Likewise.
3213 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false>):
3215 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>):
3217 (_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHas, _Unused,
3218 bool>): Remove _Hashtable_ebo_helper<2, _RangeHash> base type..
3219 (_Hash_code_base<>::_M_bucket_index(const _Key&, __hash_code, size_t)):
3221 (_Hash_code_base<>::_M_bucket_index(__hash_code, size_t)): ...this.
3222 (_Local_iterator<>): Remove _H1 and _H2 template parameters.
3223 (_Local_const_iterator<>): Likewise.
3224 (_Equality<>): Likewise.
3225 (_Map_base<>::operator[](const key_type&): Adapt.
3226 (_Map_base<>::operator[](key_type&&): Adapt.
3227 (_Identity::operator()): Add noexcept.
3228 (_Select1st::operator()): Likewise.
3229 (_Hash_code_base<>): Remove _Hashtable_ebo_helper<0, _ExtractKey> base
3231 (_Hash_code_base::_M_extract): Remove.
3232 * include/bits/hashtable.h (_Hashtable<>): Remove _H1 and _H2 template
3233 parameters. Remove _ExtractKey from constructors.
3234 (_Hashtable<>::_M_insert_unique_node(const key_type&, size_t,
3235 __hash_code, __node_type*, size_t)): Replace by...
3236 (_Hashtable<>::_M_insert_unique_node(size_t, __hash_code,
3237 __node_type*, size_t)): ...this.
3238 (_Hashtable<>::_M_insert_muti_node(__node_type*, const key_type&,
3239 __hash_code, __node_type*)): Replace by...
3240 (_Hashtable<>::_M_insert_multi_node(__node_type*, __hash_code,
3241 __node_type*)): ...this.
3242 (_Hashtable<>::__key_extract): Remove.
3243 * include/bits/node_handle.h: Adapt.
3245 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
3247 * testsuite/21_strings/debug/iterator_self_move_assign_neg.cc: Removed.
3248 * testsuite/21_strings/debug/self_move_assign_neg.cc: Removed.
3249 * testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc: Removed.
3250 * testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Removed.
3251 * testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc: Removed.
3252 * testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc: Removed.
3253 * testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc: Removed.
3254 * testsuite/23_containers/list/debug/self_move_assign_neg.cc: Removed.
3255 * testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc: Removed.
3256 * testsuite/23_containers/map/debug/self_move_assign_neg.cc: Removed.
3257 * testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc: Removed.
3258 * testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: Removed.
3259 * testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc: Removed.
3260 * testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: Removed.
3261 * testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc: Removed.
3262 * testsuite/23_containers/set/debug/self_move_assign_neg.cc: Removed.
3263 * testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc: Removed.
3264 * testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc: Removed.
3265 * testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc:
3267 * testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc: Removed.
3268 * testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc:
3270 * testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc: Removed.
3271 * testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc: Removed.
3272 * testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc: Removed.
3273 * testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc: Removed.
3274 * testsuite/23_containers/vector/debug/self_move_assign_neg.cc: Removed.
3276 2020-08-25 Patrick Palka <ppalka@redhat.com>
3278 * include/std/chrono (year_month_weekday::ok): Fix assert.
3280 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
3282 * include/std/future (future, shared_future. promise): Add
3283 is_destructible assertion (LWG 3466). Adjust string-literal for
3284 !is_array and !is_function assertions.
3285 * testsuite/30_threads/future/requirements/lwg3458.cc: Check
3286 types with no accessible destructor. Adjust expected errors.
3287 * testsuite/30_threads/promise/requirements/lwg3466.cc:
3289 * testsuite/30_threads/shared_future/requirements/lwg3458.cc:
3292 2020-08-25 Patrick Palka <ppalka@redhat.com>
3293 Ed Smith-Rowland <3dw4rd@verizon.net>
3294 Jonathan Wakely <jwakely@redhat.com>
3296 * include/std/chrono (time_point::operator++)
3297 (time_point::operator--): Define.
3298 (utc_clock, tai_clock, gps_clock): Forward declare.
3299 (utc_time, utc_seconds, tai_time, tai_seconds, gps_time)
3300 (gps_seconds): Define.
3301 (is_clock<utc_clock>, is_clock<tai_clock>, is_clock<gps_clock>)
3302 (is_clock_v<utc_clock>, is_clock_v<tai_clock>)
3303 (is_clock_v<gps_clock>): Define these specializations.
3304 (leap_second_info): Define.
3305 (day, month, year, weekday, weekday_indexed)
3306 (weekday_last, month_day, month_day_last, month_weekday)
3307 (month_weekday_last, year_month, year_month_day)
3308 (year_month_day_last, year_month_weekday, year_month_weekday_last):
3309 Declare and later define.
3310 (last_spec, last, __detail::__days_per_month)
3311 (__detail::__days_per_month, __detail::__last_day): Define.
3312 (January, February, March, April, May, June, July, August)
3313 (September, October, November, December, Sunday, Monday, Tuesday)
3314 (Wednesday, Thursday, Friday, Saturday): Define.
3315 (weekday::operator[]): Define out-of-line.
3316 (year_month_day::_S_from_days, year_month_day::M_days_since_epoch):
3318 (year_month_day::year_month_day, year_month_day::ok): Likewise.
3319 (__detail::__pow10, hh_mm_ss): Define.
3320 (literals::chrono_literals::operator""d)
3321 (literals::chrono_literals::operator""y): Define.
3322 (is_am, is_pm, make12, make24): Define.
3323 * testsuite/20_util/time_point/4.cc: New test.
3324 * testsuite/std/time/day/1.cc: New test.
3325 * testsuite/std/time/hh_mm_ss/1.cc: New test.
3326 * testsuite/std/time/is_am/1.cc: New test.
3327 * testsuite/std/time/is_pm/1.cc: New test.
3328 * testsuite/std/time/make12/1.cc: New test.
3329 * testsuite/std/time/make24/1.cc: New test.
3330 * testsuite/std/time/month/1.cc: New test.
3331 * testsuite/std/time/month_day/1.cc: New test.
3332 * testsuite/std/time/month_day_last/1.cc: New test.
3333 * testsuite/std/time/month_weekday/1.cc: New test.
3334 * testsuite/std/time/month_weekday_last/1.cc: New test.
3335 * testsuite/std/time/weekday/1.cc: New test.
3336 * testsuite/std/time/weekday_indexed/1.cc: New test.
3337 * testsuite/std/time/weekday_last/1.cc: New test.
3338 * testsuite/std/time/year/1.cc: New test.
3339 * testsuite/std/time/year_month/1.cc: New test.
3340 * testsuite/std/time/year_month_day/1.cc: New test.
3341 * testsuite/std/time/year_month_day_last/1.cc: New test.
3342 * testsuite/std/time/year_month_weekday/1.cc: New test.
3343 * testsuite/std/time/year_month_weekday_last/1.cc: New test.
3345 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
3347 * include/std/ranges (join_view): Add deduction guide (LWG 3474).
3348 * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test.
3350 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
3352 * include/bits/iterator_concepts.h (indirectly_readable): Add
3353 partial specializations to resolve ambiguities (LWG 3446).
3354 * testsuite/24_iterators/associated_types/readable.traits.cc:
3355 Check types with both value_type and element_type.
3357 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
3359 * include/std/ranges (ranges::iota_view::size()): Perform all
3360 calculations in the right unsigned types.
3361 * testsuite/std/ranges/iota/size.cc: New test.
3363 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
3366 * include/std/variant (_Variant_storage): Replace implicit
3367 conversions from size_t to __index_type with explicit casts.
3369 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
3371 * testsuite/30_threads/packaged_task/cons/alloc.cc: Run for
3372 C++11 and skip for C++17 or later.
3374 2020-08-24 Corentin Gay <gay@adacore.com>
3376 * testsuite/20_util/shared_ptr/atomic/3.cc: Do not require POSIX
3377 threads and add -pthread only on targets supporting them.
3378 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
3380 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
3382 * testsuite/30_threads/async/42819.cc: Likewise.
3383 * testsuite/30_threads/async/49668.cc: Likewise.
3384 * testsuite/30_threads/async/54297.cc: Likewise.
3385 * testsuite/30_threads/async/any.cc: Likewise.
3386 * testsuite/30_threads/async/async.cc: Likewise.
3387 * testsuite/30_threads/async/except.cc: Likewise.
3388 * testsuite/30_threads/async/launch.cc: Likewise.
3389 * testsuite/30_threads/async/lwg2021.cc: Likewise.
3390 * testsuite/30_threads/async/sync.cc: Likewise. : Likewise.
3391 * testsuite/30_threads/call_once/39909.cc: Likewise.
3392 * testsuite/30_threads/call_once/49668.cc: Likewise.
3393 * testsuite/30_threads/call_once/60497.cc: Likewise.
3394 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
3395 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
3396 * testsuite/30_threads/condition_variable/54185.cc: Likewise.
3397 * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
3398 * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
3399 * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
3400 * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
3401 * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
3402 * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
3403 * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
3405 * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
3406 * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
3407 * testsuite/30_threads/condition_variable_any/cond.cc: Likewise.
3408 * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
3409 * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
3410 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
3411 * testsuite/30_threads/future/cons/move.cc: Likewise.
3412 * testsuite/30_threads/future/members/45133.cc: Likewise.
3413 * testsuite/30_threads/future/members/get.cc: Likewise.
3414 * testsuite/30_threads/future/members/get2.cc: Likewise.
3415 * testsuite/30_threads/future/members/share.cc: Likewise.
3416 * testsuite/30_threads/future/members/valid.cc: Likewise.
3417 * testsuite/30_threads/future/members/wait.cc: Likewise.
3418 * testsuite/30_threads/future/members/wait_for.cc: Likewise.
3419 * testsuite/30_threads/future/members/wait_until.cc: Likewise.
3420 * testsuite/30_threads/lock/1.cc: Likewise.
3421 * testsuite/30_threads/lock/2.cc: Likewise.
3422 * testsuite/30_threads/lock/3.cc: Likewise.
3423 * testsuite/30_threads/lock/4.cc: Likewise.
3424 * testsuite/30_threads/mutex/cons/1.cc: Likewise.
3425 * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
3426 * testsuite/30_threads/mutex/lock/1.cc: Likewise.
3427 * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
3428 * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
3429 * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
3430 * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
3431 * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
3432 * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
3433 * testsuite/30_threads/packaged_task/49668.cc: Likewise.
3434 * testsuite/30_threads/packaged_task/60564.cc: Likewise.
3435 * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
3436 * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
3437 * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
3438 * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
3439 * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
3440 * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
3441 * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
3442 * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
3444 * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
3445 * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
3446 * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
3447 * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
3448 * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
3449 * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
3450 * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
3451 * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
3452 * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
3453 * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
3454 * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
3455 * testsuite/30_threads/promise/60966.cc: Likewise.
3456 * testsuite/30_threads/promise/cons/1.cc: Likewise.
3457 * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
3458 * testsuite/30_threads/promise/cons/move.cc: Likewise.
3459 * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
3460 * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
3461 * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
3462 * testsuite/30_threads/promise/members/get_future.cc: Likewise.
3463 * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
3464 * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
3465 * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
3466 * testsuite/30_threads/promise/members/set_value.cc: Likewise.
3467 * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
3468 * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
3469 * testsuite/30_threads/promise/members/swap.cc: Likewise.
3470 * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
3471 * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
3473 * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
3474 * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
3475 * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
3477 * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
3478 * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
3479 * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
3480 * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
3481 * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
3482 * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
3484 * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
3485 * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
3486 * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
3488 * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
3490 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
3491 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
3492 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
3494 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
3496 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
3498 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
3500 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
3502 * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
3503 * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
3504 * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
3505 * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
3506 * testsuite/30_threads/shared_future/members/get.cc: Likewise.
3507 * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
3508 * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
3509 * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
3510 * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
3511 * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
3512 * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
3513 * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
3514 * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
3515 * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
3516 * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
3517 * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
3518 * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
3519 * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
3520 * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
3521 * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
3522 * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
3523 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
3524 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
3525 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
3526 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
3527 * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
3528 * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
3529 * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
3530 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
3531 * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
3532 * testsuite/30_threads/this_thread/1.cc: Likewise.
3533 * testsuite/30_threads/this_thread/sleep_for-mt.cc: Likewise.
3534 * testsuite/30_threads/this_thread/sleep_until-mt.cc: Likewise.
3535 * testsuite/30_threads/thread/cons/1.cc: Likewise.
3536 * testsuite/30_threads/thread/cons/2.cc: Likewise.
3537 * testsuite/30_threads/thread/cons/3.cc: Likewise.
3538 * testsuite/30_threads/thread/cons/4.cc: Likewise.
3539 * testsuite/30_threads/thread/cons/49668.cc: Likewise.
3540 * testsuite/30_threads/thread/cons/5.cc: Likewise.
3541 * testsuite/30_threads/thread/cons/6.cc: Likewise.
3542 * testsuite/30_threads/thread/cons/7.cc: Likewise.
3543 * testsuite/30_threads/thread/cons/8.cc: Likewise.
3544 * testsuite/30_threads/thread/cons/9.cc: Likewise.
3545 * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
3546 * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
3547 * testsuite/30_threads/thread/members/1.cc: Likewise.
3548 * testsuite/30_threads/thread/members/2.cc: Likewise.
3549 * testsuite/30_threads/thread/members/3.cc: Likewise.
3550 * testsuite/30_threads/thread/members/4.cc: Likewise.
3551 * testsuite/30_threads/thread/members/5.cc: Likewise.
3552 * testsuite/30_threads/thread/members/hardware_concurrency.cc:
3554 * testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise.
3555 * testsuite/30_threads/thread/swap/1.cc: Likewise.
3556 * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
3557 * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
3559 * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
3560 * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
3561 * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
3563 * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
3564 * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
3565 * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
3566 * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
3567 * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
3568 * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
3569 * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
3570 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
3571 * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
3572 * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
3573 * testsuite/30_threads/try_lock/1.cc: Likewise.
3574 * testsuite/30_threads/try_lock/2.cc: Likewise.
3575 * testsuite/30_threads/try_lock/3.cc: Likewise.
3576 * testsuite/30_threads/try_lock/4.cc: Likewise.
3577 * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
3578 * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
3579 * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
3580 * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
3581 * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
3582 * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
3583 * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
3584 * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
3585 * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
3586 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
3587 * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
3589 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
3592 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Do not
3593 test "cold" on darwin.
3594 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
3596 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
3598 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
3600 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
3603 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
3606 * testsuite/25_algorithms/pstl/feature_test-2.cc: Require
3607 tbb-backend effective target.
3608 * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
3609 * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
3610 * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
3612 2020-08-20 Jonathan Wakely <jwakely@redhat.com>
3614 * include/bits/iterator_concepts.h [__STRICT_ANSI__]
3615 (incrementable_traits<__int128>): Define specialization.
3616 (incrementable_traits<unsigned __int128>): Likewise.
3617 * testsuite/std/ranges/iota/96042.cc: Test iota_view with
3620 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3621 Patrick Palka <ppalka@redhat.com>
3624 * include/bits/range_access.h (__detail::__to_unsigned_like):
3625 Do not use make_unsigned_t<T> in the return type, as it can
3626 result in an error before the integral<T> constraint is checked.
3627 [__STRICT_ANSI__]: Add overloads for 128-bit integer types.
3628 (__detail::__make_unsigned_like_t): Define as the return type
3629 of __to_unsigned_like.
3630 * testsuite/std/ranges/subrange/96042.cc: New test.
3632 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3634 * include/bits/stl_tree.h (operator!=, operator>, operator<=)
3635 (operator>=): Remove deprecated functions.
3637 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3640 * include/ext/numeric_traits.h (__is_integer_nonstrict): New
3641 trait which is true for 128-bit integers even in strict modes.
3642 (__numeric_traits_integer, __numeric_traits): Use
3643 __is_integer_nonstrict instead of __is_integer.
3644 * include/std/limits [__STRICT_ANSI__ && __SIZEOF_INT128__]
3645 (numeric_limits<__int128>, (numeric_limits<unsigned __int128>):
3647 * testsuite/std/ranges/iota/96042.cc: New test.
3649 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3651 * include/bits/c++config (_GLIBCXX_DEPRECATED_SUGGEST)
3652 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST)
3653 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
3654 Add new macros to comment.
3656 2020-08-19 Patrick Palka <ppalka@redhat.com>
3658 * include/Makefile.am (bits_headers): Add new header
3659 <bits/max_size_type.h>.
3660 * include/Makefile.in: Regenerate.
3661 * include/bits/iterator_concepts.h
3662 (ranges::__detail::__max_diff_type): Remove definition, replace
3663 with forward declaration of class __max_diff_type.
3664 (__detail::__max_size_type): Remove definition, replace with
3665 forward declaration of class __max_size_type.
3666 (__detail::__is_unsigned_int128, __is_signed_int128)
3667 (__is_int128): New concepts.
3668 (__detail::__is_integer_like): Accept __int128 and unsigned
3670 (__detail::__is_signed_integer_like): Accept __int128.
3671 * include/bits/max_size_type.h: New header.
3672 * include/bits/range_access.h: Include <bits/max_size_type.h>.
3673 (__detail::__to_unsigned_like): Two new overloads.
3674 * testsuite/std/ranges/iota/difference_type.cc: New test.
3675 * testsuite/std/ranges/iota/max_size_type.cc: New test.
3677 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3679 * include/bits/c++config (_GLIBCXX_DEPRECATED): Define for all
3681 (_GLIBCXX_DEPRECATED_SUGGEST): New macro for "use 'foo' instead"
3682 message in deprecated warnings.
3683 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST): New
3684 macros for marking features deprecated in C++11.
3685 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
3687 * include/backward/auto_ptr.h (auto_ptr_ref, auto_ptr<void>):
3688 Use _GLIBCXX11_DEPRECATED instead of _GLIBCXX_DEPRECATED.
3689 (auto_ptr): Use _GLIBCXX11_DEPRECATED_SUGGEST.
3690 * include/backward/binders.h (binder1st, binder2nd): Likewise.
3691 * include/bits/ios_base.h (io_state, open_mode, seek_dir)
3692 (streampos, streamoff): Use _GLIBCXX_DEPRECATED_SUGGEST.
3693 * include/std/streambuf (stossc): Replace C++11 attribute
3694 with _GLIBCXX_DEPRECATED_SUGGEST.
3695 * include/std/type_traits (__is_nullptr_t): Use
3696 _GLIBCXX_DEPRECATED_SUGGEST instead of _GLIBCXX_DEPRECATED.
3697 * testsuite/27_io/types/1.cc: Check for deprecated warnings.
3698 Also check for io_state, open_mode and seek_dir typedefs.
3700 2020-08-19 Antony Polukhin <antoshkka@gmail.com>
3703 * include/std/type_traits (invoke_result, is_nothrow_invocable_r)
3704 Add static_asserts to make sure that the argument of the type
3705 trait is not misused with incomplete types.
3706 (is_swappable_with, is_nothrow_swappable_with): Add static_asserts
3707 to make sure that the first and second arguments of the type trait
3708 are not misused with incomplete types.
3709 * testsuite/20_util/invoke_result/incomplete_neg.cc: New test.
3710 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: New test.
3711 * testsuite/20_util/is_nothrow_swappable/incomplete_neg.cc: New test.
3712 * testsuite/20_util/is_nothrow_swappable_with/incomplete_neg.cc: New
3714 * testsuite/20_util/is_swappable_with/incomplete_neg.cc: New test.
3716 2020-08-18 David Edelsohn <dje.gcc@gmail.com>
3717 Clement Chigot <clement.chigot@atos.net>
3719 * config/os/aix/t-aix: Add complementary mode object files to
3722 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
3724 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Check
3725 "cold" isn't used in the library. Also check <cxxabi.h>.
3726 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
3728 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
3730 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
3732 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
3735 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
3738 * include/std/future (__future_base::_S_make_deferred_state)
3739 (__future_base::_S_make_async_state): Remove.
3740 (__future_base::_Deferred_state): Change constructor to accept a
3741 parameter pack of arguments and forward them to the call
3743 (__future_base::_Async_state_impl): Likewise. Replace lambda
3744 expression with a named member function.
3745 (async): Construct state object directly from the arguments,
3746 instead of using thread::__make_invoker, _S_make_deferred_state
3747 and _S_make_async_state. Move shared state into the returned
3749 * include/std/thread (thread::_Call_wrapper): New alias
3750 template for use by constructor and std::async.
3751 (thread::thread(Callable&&, Args&&...)): Create state object
3752 directly instead of using _S_make_state.
3753 (thread::__make_invoker, thread::__decayed_tuple)
3754 (thread::_S_make_state): Remove.
3755 * testsuite/30_threads/async/69724.cc: New test.
3757 2020-08-17 Jonathan Wakely <jwakely@redhat.com>
3762 * include/std/tuple [__has_cpp_attribute(no_unique_address)]
3763 (_Head_base<Idx, Head, true>): New definition of the partial
3764 specialization, using [[no_unique_address]] instead of
3766 * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
3768 * testsuite/20_util/tuple/comparison_operators/93147.cc: New test.
3769 * testsuite/20_util/tuple/creation_functions/55713.cc: New test.
3770 * testsuite/20_util/tuple/element_access/71096.cc: New test.
3772 2020-08-14 Lewis Hyatt <lhyatt@gmail.com>
3774 * testsuite/lib/libstdc++.exp: Use the new option
3775 -fdiagnostics-plain-output.
3777 2020-08-13 Jonathan Wakely <jwakely@redhat.com>
3779 * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Warn if the c_std
3780 option is used and fail unless --enable-cheaders-obsolete is
3782 * configure: Regenerate.
3784 2020-08-12 Jonathan Wakely <jwakely@redhat.com>
3787 * include/bits/basic_string.h (operator=(basic_string&&)): Check
3788 for self-move before copying with char_traits::copy.
3789 * include/bits/hashtable.h (operator=(_Hashtable&&)): Check for
3791 * include/bits/stl_deque.h (_M_move_assign1(deque&&, false_type)):
3792 Check for equal allocators.
3793 * include/bits/stl_list.h (_M_move_assign(list&&, true_type)):
3794 Call clear() instead of _M_clear().
3795 * include/debug/formatter.h (__msg_self_move_assign): Change
3797 * include/debug/macros.h (__glibcxx_check_self_move_assign):
3798 (_GLIBCXX_DEBUG_VERIFY): Remove.
3799 * include/debug/safe_container.h (operator=(_Safe_container&&)):
3800 Remove assertion check for safe move and make it well-defined.
3801 * include/debug/safe_iterator.h (operator=(_Safe_iterator&&)):
3802 Remove assertion check for self-move.
3803 * include/debug/safe_local_iterator.h
3804 (operator=(_Safe_local_iterator&&)): Likewise.
3805 * testsuite/21_strings/basic_string/cons/char/self_move.cc: New test.
3806 * testsuite/23_containers/deque/cons/self_move.cc: New test.
3807 * testsuite/23_containers/forward_list/cons/self_move.cc: New test.
3808 * testsuite/23_containers/list/cons/self_move.cc: New test.
3809 * testsuite/23_containers/set/cons/self_move.cc: New test.
3810 * testsuite/23_containers/unordered_set/cons/self_move.cc: New test.
3811 * testsuite/23_containers/vector/cons/self_move.cc: New test.
3813 2020-08-11 François Dumont <fdumont@gcc.gnu.org>
3816 * include/bits/forward_list.tcc (forward_list<>::remove): Collect nodes
3817 to destroy in an intermediate forward_list.
3818 (forward_list<>::remove_if, forward_list<>::unique): Likewise.
3819 * include/bits/list.tcc (list<>::remove, list<>::unique): Likewise.
3820 (list<>::remove_if): Likewise.
3821 * include/debug/forward_list (forward_list<>::_M_erase_after): Remove.
3822 (forward_list<>::erase_after): Adapt.
3823 (forward_list<>::remove, forward_list<>::remove_if): Collect nodes to
3824 destroy in an intermediate forward_list.
3825 (forward_list<>::unique): Likewise.
3826 * include/debug/list (list<>::remove, list<>::unique): Likewise.
3827 (list<>::remove_if): Likewise.
3828 * testsuite/23_containers/forward_list/operations/91620.cc: New test.
3829 * testsuite/23_containers/list/operations/91620.cc: New test.
3831 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3833 * testsuite/30_threads/thread/cons/84535.cc: Use a custom
3835 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
3837 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3840 * include/experimental/executor [!_GLIBCXX_HAS_GTHREADS]:
3841 (execution_context::mutex_type): Define dummy mutex type.
3842 (system_context): Use execution_context::mutex_type.
3843 (system_context) [!_GLIBCXX_HAS_GTHREADS]: Define dummy
3844 thread and condition variable types.
3845 [!_GLIBCXX_HAS_GTHREADS] (system_context::_M_run()): Do not
3847 (system_context::_M_post) [!_GLIBCXX_HAS_GTHREADS]: Throw
3848 an exception when threads aren't available.
3849 (strand::running_in_this_thread()): Defer to _M_state.
3850 (strand::_State::running_in_this_thread()): New function.
3851 (use_future_t): Do not depend on _GLIBCXX_USE_C99_STDINT_TR1.
3852 * include/experimental/io_context (io_context): Use the
3853 execution_context::mutex_type alias. Replace stack of thread
3855 * testsuite/experimental/net/execution_context/use_service.cc:
3856 Enable test for non-pthread targets.
3858 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3860 * include/experimental/executor (system_context::a__tag): Make
3861 default constructor explicit.
3863 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3865 * include/experimental/executor (system_context::_M_run()):
3867 * testsuite/experimental/net/system_context/1.cc: New test.
3869 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3871 * include/std/stop_token: Check _GLIBCXX_HAS_GTHREADS using
3872 #ifdef instead of #if.
3873 (stop_token::_S_yield()): Check _GLIBCXX_HAS_GTHREADS before
3874 using __gthread_yield.
3876 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3878 * include/std/thread [!_GLIBCXX_HAS_GTHREADS] (this_thread::yield)
3879 (this_thread::sleep_until): Define.
3880 [!_GLIBCXX_HAS_GTHREADS] (this_thread::sleep_for): Define. Replace
3881 use of __gthread_time_t typedef with timespec.
3882 * src/c++11/thread.cc [!_GLIBCXX_HAS_GTHREADS] (__sleep_for):
3884 * testsuite/30_threads/this_thread/2.cc: Moved to...
3885 * testsuite/30_threads/this_thread/yield.cc: ...here.
3886 * testsuite/30_threads/this_thread/3.cc: Moved to...
3887 * testsuite/30_threads/this_thread/sleep_for-mt.cc: ...here.
3888 * testsuite/30_threads/this_thread/4.cc: Moved to...
3889 * testsuite/30_threads/this_thread/sleep_until-mt.cc: ...here.
3890 * testsuite/30_threads/this_thread/58038.cc: Add
3892 * testsuite/30_threads/this_thread/60421.cc: Likewise.
3893 * testsuite/30_threads/this_thread/sleep_for.cc: New test.
3894 * testsuite/30_threads/this_thread/sleep_until.cc: New test.
3896 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3899 * src/c++17/fs_ops.cc (read_symlink): Use posix::lstat instead
3900 of calling ::lstat directly.
3901 * src/filesystem/ops.cc (read_symlink): Likewise.
3903 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3905 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
3906 Use gdb.Type.strip_typedefs().
3907 * testsuite/libstdc++-prettyprinters/compat.cc: Use a typedef in
3908 the emulated old type.
3910 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3913 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
3914 $enable_libstdcxx_filesystem_ts.
3915 * configure: Regenerate.
3917 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3920 * include/bits/stl_iterator.h (inserter): Do not deduce
3921 iterator type (LWG 561).
3922 * testsuite/24_iterators/insert_iterator/dr561.cc: New test.
3924 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3926 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI=0]
3927 (basic_string::reserve()): Do nothing if exceptions are not
3930 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3933 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
3934 (stat_type): Change to __stat64.
3935 (stat): Use _wstat64.
3937 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
3940 * include/debug/bitset (bitset::operator==): Call _M_base() on
3942 (bitset::operator!=): Likewise, but don't define it at all when
3943 default comparisons are supported by the compiler.
3944 * testsuite/23_containers/bitset/operations/96303.cc: New test.
3946 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
3948 * testsuite/18_support/comparisons/algorithms/partial_order.cc:
3949 Replace VERIFY with static_assert where the compiler now
3951 * testsuite/18_support/comparisons/algorithms/weak_order.cc:
3954 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
3956 * config/abi/pre/gnu.ver: Fix wildcards for wstring symbols.
3958 2020-08-06 Andrew Luo <andrewluotechnologies@outlook.com>
3959 Jonathan Wakely <jwakely@redhat.com>
3961 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Use less greedy
3962 patterns for basic_string members.
3963 (GLIBCXX_3.4.29): Export new basic_string::reserve symbols.
3964 * doc/xml/manual/status_cxx2020.xml: Update P0966 status.
3965 * include/bits/basic_string.h (shrink_to_fit()): Call reserve().
3966 (reserve(size_type)): Remove default argument.
3967 (reserve()): Declare new overload.
3968 [!_GLIBCXX_USE_CXX11_ABI] (shrink_to_fit, reserve): Likewise.
3969 * include/bits/basic_string.tcc (reserve(size_type)): Remove
3970 support for shrinking capacity.
3971 (reserve()): Perform shrink-to-fit operation.
3972 [!_GLIBCXX_USE_CXX11_ABI] (reserve): Likewise.
3973 * testsuite/21_strings/basic_string/capacity/1.cc: Adjust to
3974 reflect new behavior.
3975 * testsuite/21_strings/basic_string/capacity/char/1.cc:
3977 * testsuite/21_strings/basic_string/capacity/char/18654.cc:
3979 * testsuite/21_strings/basic_string/capacity/char/2.cc:
3981 * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
3983 * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
3985 * testsuite/21_strings/basic_string/capacity/wchar_t/2.cc:
3988 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
3990 * include/bits/basic_string.tcc
3991 (operator>>(basic_istream&, basic_string&)): Do not set eofbit
3992 if extraction stopped after in.width() characters.
3993 * src/c++98/istream-string.cc (operator>>(istream&, string&)):
3995 * include/bits/istream.tcc (__istream_extract): Do not set
3996 eofbit if extraction stopped after n-1 characters.
3997 * src/c++98/istream.cc (__istream_extract): Likewise.
3998 * testsuite/21_strings/basic_string/inserters_extractors/char/13.cc: New test.
3999 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/13.cc: New test.
4000 * testsuite/27_io/basic_istream/extractors_character/char/5.cc: New test.
4001 * testsuite/27_io/basic_istream/extractors_character/wchar_t/5.cc: New test.
4003 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
4006 * src/c++17/fs_ops.cc (fs::read_symlink): Return an error
4007 immediately for non-symlinks.
4008 * src/filesystem/ops.cc (fs::read_symlink): Likewise.
4010 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
4012 * include/std/istream (operator>>(istream&, char*)): Add
4013 attributes to get warnings for pointers that are null or known
4014 to point to the end of a buffer. Request upper bound from
4015 __builtin_object_size check and handle zero-sized buffer case.
4016 (operator>>(istream&, signed char))
4017 (operator>>(istream&, unsigned char*)): Add attributes.
4018 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
4019 Check extracting into the middle of a buffer.
4020 * testsuite/27_io/basic_istream/extractors_character/wchar_t/overflow.cc: New test.
4022 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
4024 * include/std/atomic (atomic<T>::store): Reformat.
4026 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
4028 * doc/xml/manual/status_cxx2017.xml: Replace oneAPI DPC++ link
4029 with LLVM repo for PSTL.
4030 * doc/html/manual/status.html: Regenerate.
4032 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
4034 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Export new symbols.
4035 * include/bits/istream.tcc (__istream_extract): New function
4036 template implementing both of operator>>(istream&, char*) and
4037 operator>>(istream&, char(&)[N]). Add explicit instantiation
4038 declaration for it. Remove explicit instantiation declarations
4039 for old function templates.
4040 * include/std/istream (__istream_extract): Declare.
4041 (operator>>(basic_istream<C,T>&, C*)): Define inline and simply
4042 call __istream_extract.
4043 (operator>>(basic_istream<char,T>&, signed char*)): Likewise.
4044 (operator>>(basic_istream<char,T>&, unsigned char*)): Likewise.
4045 (operator>>(basic_istream<C,T>&, C(7)[N])): Define for LWG 2499.
4046 (operator>>(basic_istream<char,T>&, signed char(&)[N])):
4048 (operator>>(basic_istream<char,T>&, unsigned char(&)[N])):
4050 * include/std/streambuf (basic_streambuf): Declare char overload
4051 of __istream_extract as a friend.
4052 * src/c++11/istream-inst.cc: Add explicit instantiation
4053 definition for wchar_t overload of __istream_extract. Remove
4054 explicit instantiation definitions of old operator>> overloads
4055 for versioned-namespace build.
4056 * src/c++98/istream.cc (operator>>(istream&, char*)): Replace
4057 with __istream_extract(istream&, char*, streamsize).
4058 * testsuite/27_io/basic_istream/extractors_character/char/3.cc:
4059 Do not use variable-length array.
4060 * testsuite/27_io/basic_istream/extractors_character/char/4.cc:
4061 Do not run test for C++20.
4062 * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
4063 Do not test writing to pointers for C++20.
4064 * testsuite/27_io/basic_istream/extractors_character/char/9826.cc:
4065 Use array instead of pointer.
4066 * testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc:
4067 Do not use variable-length array.
4068 * testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
4069 Do not run test for C++20.
4070 * testsuite/27_io/basic_istream/extractors_character/wchar_t/9555-ic.cc:
4071 Do not test writing to pointers for C++20.
4072 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499.cc:
4074 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
4076 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
4078 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
4080 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
4083 2020-08-01 Gerald Pfeifer <gerald@pfeifer.com>
4085 * doc/xml/manual/using_exceptions.xml: Move www.stroustrup.com to
4087 * doc/html/manual/using_exceptions.html: Regenerate.
4089 2020-07-31 Gerald Pfeifer <gerald@pfeifer.com>
4091 * doc/xml/manual/status_cxx2017.xml: ParallelSTL is now part
4092 of oneAPI DPC++ Library on Github.
4093 * doc/html/manual/status.html: Regenerate.
4095 2020-07-31 François Dumont <fdumont@gcc.gnu.org>
4097 * include/bits/stl_bvector.h
4098 [_GLIBCXX_INLINE_VERSION](_Bvector_impl_data::_M_start): Define as
4100 (_Bvector_impl_data(const _Bvector_impl_data&)): Default.
4101 (_Bvector_impl_data(_Bvector_impl_data&&)): Delegate to latter.
4102 (_Bvector_impl_data::operator=(const _Bvector_impl_data&)): Default.
4103 (_Bvector_impl_data::_M_move_data(_Bvector_impl_data&&)): Use latter.
4104 (_Bvector_impl_data::_M_reset()): Likewise.
4105 (_Bvector_impl_data::_M_swap_data): New.
4106 (_Bvector_impl::_Bvector_impl(_Bvector_impl&&)): Implement explicitely.
4107 (_Bvector_impl::_Bvector_impl(_Bit_alloc_type&&, _Bvector_impl&&)): New.
4108 (_Bvector_base::_Bvector_base(_Bvector_base&&, const allocator_type&)):
4110 (vector::vector(vector&&, const allocator_type&, true_type)): New, use
4112 (vector::vector(vector&&, const allocator_type&, false_type)): New.
4113 (vector::vector(vector&&, const allocator_type&)): Use latters.
4114 (vector::vector(const vector&, const allocator_type&)): Adapt.
4115 [__cplusplus >= 201103](vector::vector(_InputIt, _InputIt,
4116 const allocator_type&)): Use _M_initialize_range.
4117 (vector::operator[](size_type)): Use iterator operator[].
4118 (vector::operator[](size_type) const): Use const_iterator operator[].
4119 (vector::swap(vector&)): Add assertions on allocators. Use _M_swap_data.
4120 [__cplusplus >= 201103](vector::insert(const_iterator, _InputIt,
4121 _InputIt)): Use _M_insert_range.
4122 (vector::_M_initialize(size_type)): Adapt.
4123 [__cplusplus >= 201103](vector::_M_initialize_dispatch): Remove.
4124 [__cplusplus >= 201103](vector::_M_insert_dispatch): Remove.
4125 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Stop
4126 using start _M_offset.
4127 (StdVectorPrinter.to_string): Likewise.
4128 * testsuite/23_containers/vector/bool/allocator/swap.cc: Adapt.
4129 * testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc:
4132 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4134 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Use 0
4136 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
4139 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4141 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
4142 Move struct to namespace scope.
4144 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4146 * testsuite/26_numerics/numbers/float128.cc: Check
4147 __STRICT_ANSI__ before using __float128.
4148 * testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc:
4151 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4153 * testsuite/18_support/set_terminate.cc: Require C++11 or
4155 * testsuite/28_regex/simple_c++11.cc: Likewise.
4156 * testsuite/tr1/headers/c++200x/complex.cc: Likewise.
4157 * testsuite/24_iterators/headers/iterator/synopsis.cc:
4158 Require C++14 or lower.
4160 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4162 * testsuite/23_containers/span/back_assert_neg.cc: Split c++2a
4163 effective-target from xfail selector.
4164 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
4165 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
4166 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
4167 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
4168 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
4169 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
4170 * testsuite/23_containers/span/subspan_2_assert_neg.cc:
4172 * testsuite/23_containers/span/subspan_3_assert_neg.cc:
4174 * testsuite/23_containers/span/subspan_4_assert_neg.cc:
4176 * testsuite/23_containers/span/subspan_5_assert_neg.cc:
4178 * testsuite/23_containers/span/subspan_6_assert_neg.cc:
4180 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
4182 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4184 * testsuite/20_util/reference_wrapper/83427.cc: Adjust
4185 effective-target to specific language mode only.
4186 * testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
4188 * testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
4190 * testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
4192 * testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
4194 * testsuite/26_numerics/valarray/69116.cc:
4196 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
4197 Remove whitespace at end of file.
4198 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
4201 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4203 * testsuite/17_intro/headers/c++2017/all_attributes.cc: Add
4204 c++17 effective-target.
4205 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
4207 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: Likewise.
4208 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
4210 * testsuite/17_intro/headers/c++2017/operator_names.cc:
4212 * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
4213 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
4215 * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
4217 * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
4219 * testsuite/20_util/any/assign/1.cc: Likewise.
4220 * testsuite/20_util/any/assign/2.cc: Likewise.
4221 * testsuite/20_util/any/assign/emplace.cc: Likewise.
4222 * testsuite/20_util/any/assign/exception.cc: Likewise.
4223 * testsuite/20_util/any/assign/self.cc: Likewise.
4224 * testsuite/20_util/any/cons/1.cc: Likewise.
4225 * testsuite/20_util/any/cons/2.cc: Likewise.
4226 * testsuite/20_util/any/cons/aligned.cc: Likewise.
4227 * testsuite/20_util/any/cons/explicit.cc: Likewise.
4228 * testsuite/20_util/any/cons/in_place.cc: Likewise.
4229 * testsuite/20_util/any/cons/nontrivial.cc: Likewise.
4230 * testsuite/20_util/any/make_any.cc: Likewise.
4231 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
4232 * testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
4233 * testsuite/20_util/any/misc/swap.cc: Likewise.
4234 * testsuite/20_util/any/modifiers/1.cc: Likewise.
4235 * testsuite/20_util/any/observers/type.cc: Likewise.
4236 * testsuite/20_util/any/requirements.cc: Likewise.
4237 * testsuite/20_util/any/typedefs.cc: Likewise.
4238 * testsuite/20_util/as_const/1.cc: Likewise.
4239 * testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
4240 * testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
4241 * testsuite/20_util/bool_constant/requirements.cc: Likewise.
4242 * testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
4244 * testsuite/20_util/duration_cast/rounding.cc: Likewise.
4245 * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
4247 * testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
4248 * testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
4249 * testsuite/20_util/function_objects/searchers.cc: Likewise.
4250 * testsuite/20_util/in_place/requirements.cc: Likewise.
4251 * testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
4253 * testsuite/20_util/is_invocable/requirements/typedefs.cc:
4255 * testsuite/20_util/is_invocable/value.cc: Likewise.
4256 * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
4258 * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc:
4260 * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
4262 * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
4264 * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
4265 * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
4267 * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
4269 * testsuite/20_util/is_nothrow_swappable_with/value.cc:
4271 * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
4273 * testsuite/20_util/is_swappable/requirements/typedefs.cc:
4275 * testsuite/20_util/is_swappable/value.cc: Likewise.
4276 * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
4278 * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
4280 * testsuite/20_util/is_swappable_with/value.cc: Likewise.
4281 * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
4283 * testsuite/20_util/logical_traits/requirements/typedefs.cc:
4285 * testsuite/20_util/logical_traits/value.cc: Likewise.
4286 * testsuite/20_util/optional/constexpr/make_optional.cc: Likewise.
4287 * testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
4288 * testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
4289 * testsuite/20_util/optional/hash.cc: Likewise.
4290 * testsuite/20_util/pair/swap_cxx17.cc: Likewise.
4291 * testsuite/20_util/ratio/requirements/ratio_equal_v.cc: Likewise.
4292 * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
4294 * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
4296 * testsuite/20_util/tuple/apply/1.cc: Likewise.
4297 * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
4298 * testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
4299 * testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
4300 * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
4302 * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
4304 * testsuite/20_util/variant/any.cc: Likewise.
4305 * testsuite/20_util/variant/compile.cc: Likewise.
4306 * testsuite/20_util/variant/hash.cc: Likewise.
4307 * testsuite/20_util/variant/index_type.cc: Likewise.
4308 * testsuite/20_util/variant/run.cc: Likewise.
4309 * testsuite/20_util/void_t/1.cc: Likewise.
4310 * testsuite/21_strings/basic_string/79162.cc: Likewise.
4311 * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
4312 * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
4313 * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
4314 * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
4315 * testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
4317 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
4319 * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
4321 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
4323 * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
4325 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
4327 * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
4329 * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
4331 * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
4333 * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
4335 * testsuite/21_strings/basic_string/operations/data/char/2.cc:
4337 * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
4339 * testsuite/21_strings/basic_string/operations/find/char/5.cc:
4341 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
4343 * testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
4344 * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
4346 * testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise.
4347 * testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise.
4348 * testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise.
4349 * testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise.
4350 * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
4352 * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
4354 * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
4356 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
4358 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
4360 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4362 * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
4364 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
4366 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
4368 * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
4370 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
4372 * testsuite/21_strings/basic_string_view/include.cc: Likewise.
4373 * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
4375 * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
4377 * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
4379 * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
4381 * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
4383 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
4385 * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
4387 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
4389 * testsuite/21_strings/basic_string_view/literals/types.cc:
4391 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
4393 * testsuite/21_strings/basic_string_view/literals/values.cc:
4395 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
4397 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
4399 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
4401 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
4403 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
4405 * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
4407 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
4409 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
4411 * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
4413 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
4415 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
4417 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
4419 * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
4421 * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
4423 * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
4425 * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
4427 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
4429 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
4431 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
4433 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
4435 * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
4437 * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
4439 * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
4441 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
4443 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
4445 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
4447 * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
4449 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
4451 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
4453 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
4455 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
4457 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
4459 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
4461 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
4463 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
4465 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
4467 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
4469 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
4471 * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
4472 * testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
4473 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
4475 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
4476 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
4478 * testsuite/23_containers/map/modifiers/merge.cc: Likewise.
4479 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
4480 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
4481 * testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
4482 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
4483 * testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
4484 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
4485 * testsuite/23_containers/set/modifiers/merge.cc: Likewise.
4486 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
4488 * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
4490 * testsuite/23_containers/unordered_map/modifiers/merge.cc:
4492 * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
4494 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
4496 * testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
4498 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
4500 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
4502 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
4504 * testsuite/23_containers/unordered_set/modifiers/merge.cc:
4506 * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
4508 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
4510 * testsuite/25_algorithms/clamp/1.cc: Likewise.
4511 * testsuite/25_algorithms/clamp/2.cc: Likewise.
4512 * testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
4513 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
4515 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
4517 * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
4519 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
4521 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
4523 * testsuite/29_atomics/atomic/is_always_lock_free.cc: Likewise.
4524 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
4526 * testsuite/30_threads/shared_lock/70766.cc: Likewise.
4527 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
4528 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
4530 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc:
4532 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
4534 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
4535 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
4536 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
4538 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4541 * include/bits/stl_iterator.h (reverse_iterator): Friend
4542 declaration should not depend on __cplusplus.
4544 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4546 * testsuite/experimental/filesystem/filesystem_error/cons.cc:
4547 Remove -std=gnu++17 option.
4549 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4551 * testsuite/20_util/is_aggregate/value.cc: Adjust for changes to
4552 definition of aggregates in C++20.
4553 * testsuite/20_util/optional/requirements.cc: Adjust for
4554 defaulted comparisons in C++20.
4556 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4558 * testsuite/20_util/tuple/78939.cc: Suppress warnings about
4559 deprecation of volatile-qualified structured bindings in C++20.
4560 * testsuite/20_util/variable_templates_for_traits.cc: Likewise
4561 for deprecation of is_pod in C++20
4563 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4565 * testsuite/20_util/time_point_cast/rounding.cc: Remove
4566 duplicate dg-do directive and add c++17 effective target.
4568 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4570 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
4571 LC_ALL_MASK not LC_ALL.
4573 2020-07-31 Richard Biener <rguenther@suse.de>
4576 * testsuite/20_util/assume_aligned/3.cc: Use -g0.
4578 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4580 * include/bits/basic_string.h (size_type, difference_type):
4581 Use allocator_traits to obtain the allocator's size_type and
4584 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4587 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
4589 [!_GLIBCXX_USE_C99_STDLIB]: Use strtod for float and long
4592 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4594 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
4595 Use allocator with the correct value type.
4596 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
4599 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4601 * testsuite/20_util/from_chars/4.cc: Pass non-const iterator
4604 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4606 * include/bits/iterator_concepts.h (__detail::__cv_bool): New
4608 (__detail::__integral_nonbool): Likewise.
4609 (__detail::__is_integer_like): Use __integral_nonbool.
4610 * testsuite/std/ranges/access/lwg3467.cc: New test.
4612 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4614 * testsuite/20_util/from_chars/4.cc: Use dg-add-options ieee.
4615 * testsuite/29_atomics/atomic_float/1.cc: Likewise.
4617 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4619 * testsuite/23_containers/vector/bool/72847.cc: Use the
4620 exceptions_enabled effective-target keyword instead of
4621 checking for an explicit -fno-exceptions option.
4622 * testsuite/util/testsuite_abi.cc (examine_symbol): Remove
4623 redundant try-catch.
4624 * testsuite/util/testsuite_allocator.h [!__cpp_exceptions]:
4625 Do not define check_allocate_max_size and memory_resource.
4626 * testsuite/util/testsuite_containers.h: Replace comment with
4627 #error if wrong standard dialect used.
4628 * testsuite/util/testsuite_shared.cc: Likewise.
4630 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
4632 * include/bits/hashtable_policy.h (_Node_iterator_base()): New.
4633 (operator==(const _Node_iterator_base&, const _Node_iterator_base&)):
4635 (operator!=(const _Node_iterator_base&, const _Node_iterator_base&)):
4637 (_Local_iterator_base<>): Inherits _Node_iterator_base.
4638 (_Local_iterator_base<>::_M_cur): Remove.
4639 (_Local_iterator_base<>::_M_curr()): Remove.
4640 (operator==(const _Local_iterator_base&, const _Local_iterator_base&)):
4642 (operator!=(const _Local_iterator_base&, const _Local_iterator_base&)):
4644 * include/debug/unordered_map (unordered_map<>::_M_invalidate): Adapt.
4645 (unordered_multimap<>::_M_invalidate): Adapt.
4646 * include/debug/unordered_set (unordered_set<>::_M_invalidate): Adapt.
4647 (unordered_multiset<>::_M_invalidate): Adapt.
4649 2020-07-29 David Edelsohn <dje.gcc@gmail.com>
4650 Jonathan Wakely <jwakely@redhat.com>
4651 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4653 * testsuite/lib/dg-options.exp (add_options_for_libatomic): Add
4654 target powerpc-ibm-aix* and powerpc*-*-darwin*.
4655 * testsuite/29_atomics/atomic_float/value_init.cc: Add options
4658 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
4660 * include/bits/hashtable.h
4661 (_Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type)):
4662 Add noexcept qualification.
4663 (_Hashtable(_Hashtable&&)): Fix noexcept qualification.
4664 (_Hashtable(_Hashtable&&, const allocator_type&)): Add noexcept
4666 * include/bits/unordered_map.h
4667 (unordered_map(unordered_map&&, const allocator_type&)): Add noexcept
4669 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
4671 * include/bits/unordered_set.h
4672 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
4673 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
4675 * include/debug/unordered_map
4676 (unordered_map(unordered_map&&, const allocator_type&)): Likewise.
4677 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
4679 * include/debug/unordered_set
4680 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
4681 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
4683 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
4685 * testsuite/23_containers/unordered_map/cons/noexcept_default_construct.cc:
4687 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
4689 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
4691 * testsuite/23_containers/unordered_multimap/cons/noexcept_default_construct.cc:
4693 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
4695 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
4697 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
4699 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
4701 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
4703 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
4706 2020-07-28 François Dumont <fdumont@gcc.gnu.org>
4708 * include/bits/hashtable.h
4709 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
4710 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
4711 const allocator_type&, true_type)): New.
4712 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
4713 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
4714 const allocator_type&, false_type)): New.
4715 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
4716 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
4717 const allocator_type&)): Delegate to latters.
4718 (operator=(initializer_list<value_type>)): Rehash if too small.
4719 (_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Remove
4720 size_t len parameter.
4721 * include/bits/hashtable_policy.h (_Insert_base<>::_M_insert_range):
4722 Do not try to get input range distance.
4723 * testsuite/23_containers/unordered_set/cons/bucket_hint.cc: New test.
4724 * testsuite/23_containers/unordered_set/modifiers/insert.cc: New test.
4726 2020-07-27 François Dumont <fdumont@gcc.gnu.org>
4728 * include/bits/hashtable_policy.h (_Map_base<>::at): Use
4730 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals):New.
4731 (_Hashtable_base<>::_M_node_equals): New, use latter.
4732 (_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash,
4733 _RehashPolicy, false>::_M_equal): Adapt to use latter.
4734 * include/bits/hashtable.h (_Hashtable<>::_M_update_bbegin): New.
4735 (_Hashtable<>::_M_assign): Use latter.
4736 (_Hashtable<>::_M_move_assign): Likewise.
4737 (_Hashtable<>(_Hashtable<>&&)): Likewise.
4738 (_Hashtable<>(_Hashtable<>&&, const allocator_type&)): Likewise.
4739 (_Hashtable<>::swap): Likewise.
4740 (_Hashtable<>::find): Build iterator directly from _M_find_node result.
4741 (_Hashtable<>::count): Use _Hashtable<>::find.
4742 (_Hashtable<>::equal_range): Likewise.
4743 (_Hashtable<>::_M_erase(false_type, const key_type&)): Use
4746 2020-07-27 Jonathan Wakely <jwakely@redhat.com>
4748 * src/c++17/floating_from_chars.cc (from_chars_impl): Ensure
4749 that FE_NEAREST is used.
4750 * testsuite/20_util/from_chars/4.cc: Do not use if constexpr in
4751 a { target c++14 } test.
4752 [!_GLIBCXX_HAVE_USELOCALE]: Disable all tests.
4753 * testsuite/20_util/from_chars/5.cc [!_GLIBCXX_HAVE_USELOCALE]:
4755 * testsuite/20_util/from_chars/6.cc: New test.
4757 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
4759 * include/std/future (future, shared_future, promise): Add
4760 static assertions to the primary template to reject array and
4762 * testsuite/30_threads/future/requirements/lwg3458.cc: New test.
4763 * testsuite/30_threads/promise/requirements/lwg3466.cc: New test.
4764 * testsuite/30_threads/shared_future/requirements/lwg3458.cc: New test.
4766 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
4768 * include/bits/stl_iterator.h (reverse_iterator): Constrain
4769 converting constructor and converting assignment operator.
4770 Access source iterator's data member directly instead of
4772 (move_iterator): Likewise.
4773 * testsuite/24_iterators/move_iterator/dr3435.cc: New test.
4774 * testsuite/24_iterators/reverse_iterator/dr3435.cc: New test.
4776 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
4778 * acinclude.m4 (libtool_VERSION): Bump version.
4779 * config.h.in: Regenerate.
4780 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.29 version and new
4782 * config/os/gnu-linux/ldbl-extra.ver: Add _GLIBCXX_LDBL_3.4.29
4783 version and new export.
4784 * configure: Regenerate.
4785 * configure.ac: Check for <xlocale.h> and uselocale.
4786 * crossconfig.m4: Add macro or checks for uselocale.
4787 * include/std/charconv (from_chars): Declare overloads for
4788 float, double, and long double.
4789 * src/c++17/Makefile.am: Add new file.
4790 * src/c++17/Makefile.in: Regenerate.
4791 * src/c++17/floating_from_chars.cc: New file.
4792 (from_chars): Define for float, double, and long double.
4793 * testsuite/20_util/from_chars/1_c++20_neg.cc: Prune extra
4794 diagnostics caused by new overloads.
4795 * testsuite/20_util/from_chars/1_neg.cc: Likewise.
4796 * testsuite/20_util/from_chars/2.cc: Check leading '+'.
4797 * testsuite/20_util/from_chars/4.cc: New test.
4798 * testsuite/20_util/from_chars/5.cc: New test.
4799 * testsuite/util/testsuite_abi.cc: Add new symbol versions.
4801 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
4803 * include/bits/istream.tcc
4804 (basic_istream::get(__streambuf_type&, char_type): Use unsigned
4805 long long for counter and check if it would overflow _M_gcount.
4806 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: New test.
4807 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: New test.
4809 2020-07-17 Iain Sandoe <iain@sandoe.co.uk>
4811 * include/std/coroutine: Mark the methods of the
4812 trivial awaitables as constexpr.
4814 2020-07-14 David Edelsohn <dje.gcc@gmail.com>
4816 * config/os/aix/t-aix: Set BITS from compiler cpp macro.
4818 2020-07-13 Jonathan Wakely <jwakely@redhat.com>
4822 * include/bits/istream.tcc (basic_istream::ignore(streamsize))
4823 [n == max]: Check overflow conditions on _M_gcount. Rely on
4824 the fact that either EOF or the delimiter was reached.
4825 [n < max]: Check _M_gcount < n before checking for EOF or
4827 (basic_istream::ignore(streamsize, char_type): Likewise.
4828 * src/c++98/compatibility.cc (istream::ignore(streamsize))
4829 (wistream::ignore(streamsize)): Likewise.
4830 * src/c++98/istream.cc (istream::ignore(streamsize, char_type))
4831 (wistream::ignore(streamsize, char_type)): Likewise.
4832 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Check that
4833 delimiter is discarded if the number of characters ignored
4834 doesn't fit in streamsize.
4835 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
4837 * testsuite/27_io/basic_istream/ignore/char/96161.cc: New test.
4838 * testsuite/27_io/basic_istream/ignore/wchar_t/96161.cc: New test.
4840 2020-07-08 François Dumont <fdumont@gcc.gnu.org>
4842 * include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&)): Add noexcept
4843 qualification based only on _Compare one.
4844 * testsuite/23_containers/map/cons/noexcept_move_construct.cc: Add
4846 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
4848 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
4850 * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
4852 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
4854 * include/std/limits: Whitespace changes.
4856 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
4858 * include/Makefile.am: Remove bits/int_limits.h.
4859 * include/Makefile.in: Regenerate.
4860 * include/bits/int_limits.h: Removed.
4861 * include/bits/parse_numbers.h (_Select_int_base): Replace
4862 __int_limits with __int_traits.
4863 * include/bits/range_access.h (_SSize::operator()): Likewise.
4864 * include/ext/numeric_traits.h (__numeric_traits_integer): Add
4866 (__int_traits): New alias template.
4867 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
4868 (__countr_zero, __countr_one, __popcount, __bit_ceil)
4869 (__bit_floor, __bit_width) Replace __int_limits with
4871 * include/std/charconv (__to_chars_8, __from_chars_binary)
4872 (__from_chars_alpha_to_num, from_chars): Likewise.
4873 * include/std/memory_resource (polymorphic_allocator::allocate)
4874 (polymorphic_allocator::allocate_object): Likewise.
4875 * include/std/string_view (basic_string_view::_S_compare):
4877 * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
4879 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
4881 * include/std/limits: Whitespace changes.
4883 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
4885 * include/std/optional (_Optional_payload_base, _Optional_base)
4886 (optional, __optional_hash_call_base): Adjust whitespace and
4887 other formatting. Remove redundant && tokens on template
4888 arguments to type traits.
4890 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
4892 * include/std/optional (make_optional): Add enable_if
4893 constraints and noexcept-specifier to each overload.
4894 * testsuite/20_util/optional/make_optional-2.cc: New test.
4896 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
4899 * include/std/optional (optional): Add noexcept-specifier to
4900 every constructor, assignment operator, emplace function and
4901 dereference operator.
4902 * testsuite/20_util/optional/assignment/noexcept.cc: New test.
4903 * testsuite/20_util/optional/cons/noexcept.cc: New test.
4905 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
4908 * include/bits/fs_dir.h: Use consistent tag in class-head.
4909 * include/bits/localefwd.h: Likewise.
4910 * include/bits/regex.h: Likewise.
4911 * include/bits/stl_map.h: Likewise.
4912 * include/bits/stl_multimap.h: Likewise.
4913 * include/bits/stl_multiset.h: Likewise.
4914 * include/bits/stl_set.h: Likewise.
4915 * include/std/complex: Likewise.
4916 * include/std/functional: Likewise.
4917 * include/std/future: Likewise.
4918 * include/std/system_error: Likewise.
4919 * include/std/thread: Likewise.
4920 * include/std/tuple: Likewise.
4921 * include/std/type_traits: Likewise.
4922 * include/std/valarray: Likewise.
4924 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
4926 * testsuite/27_io/basic_ios/conv/voidptr.cc: Add c++98_only
4929 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
4931 * testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: Add
4932 c++98_only target selector.
4933 * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc:
4935 * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc:
4937 * testsuite/18_support/headers/new/synopsis_cxx98.cc: Likewise.
4938 * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc:
4940 * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc:
4942 * testsuite/23_containers/headers/array/std_c++0x_neg.cc:
4944 * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc:
4946 * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
4948 * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
4950 * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc:
4952 * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc:
4954 * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++98.cc:
4956 * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc:
4958 * testsuite/26_numerics/headers/random/std_c++0x_neg.cc:
4960 * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Likewise.
4961 * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Likewise.
4962 * testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc:
4964 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
4966 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
4968 * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: Likewise.
4969 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc:
4972 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
4975 * include/std/variant
4976 (_Copy_assign_base::operator=(const _Copy_assign_base&):
4977 Do the move-assignment from a temporary so that the temporary
4978 is constructed with an explicit index.
4979 * testsuite/20_util/variant/91807.cc: New.
4981 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
4985 * testsuite/29_atomics/atomic_float/1.cc: Use different values
4987 * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
4989 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
4992 * include/bits/regex.h (operator==, operator!=): Remove noexcept
4993 equality comparisons for match_results.
4994 * testsuite/28_regex/match_results/94627.cc: New test.
4996 2020-07-01 Martin Sebor <msebor@redhat.com>
4998 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Adjust
4999 text of expected warning.
5000 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Same.
5001 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc: Same.
5002 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc: Same.
5003 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc: Same.
5005 2020-06-29 Ville Voutilainen <ville.voutilainen@gmail.com>
5008 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
5010 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
5011 Add a __nonnull__ attribute.
5012 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
5013 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
5015 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
5017 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
5018 Add a __nonnull__ attribute.
5019 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
5020 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
5022 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
5025 * include/std/type_traits (is_literal_type, is_literal_type_v):
5027 * include/std/variant (_Uninitialized):
5028 Adjust the condition and the comment.
5029 * testsuite/20_util/is_literal_type/deprecated-1z.cc: New.
5030 * testsuite/20_util/is_literal_type/requirements/explicit_instantiation.cc:
5032 * testsuite/20_util/is_literal_type/requirements/typedefs.cc: Likewise.
5033 * testsuite/20_util/is_literal_type/value.cc: Likewise.
5034 * testsuite/20_util/optional/constexpr/nullopt.cc:
5035 Use __is_literal_type directly.
5036 * testsuite/20_util/optional/nullopt.cc: Likewise.
5037 * testsuite/20_util/variable_templates_for_traits.cc: Adjust.
5038 * testsuite/20_util/variant/95915.cc: New.
5039 * testsuite/20_util/variant/compile.cc: Add new test.
5040 * testsuite/experimental/optional/constexpr/nullopt.cc:
5041 Use __is_literal_type directly.
5042 * testsuite/experimental/optional/nullopt.cc: Likewise.
5043 * testsuite/experimental/type_traits/value.cc: Adjust.
5044 * testsuite/util/testsuite_common_types.h:
5045 Use __is_literal_type directly.
5047 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
5049 * include/std/charconv (__from_chars_binary): Ignore leading zeros.
5050 * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
5052 * testsuite/20_util/from_chars/3.cc: New test.
5054 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
5056 * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
5057 * include/std/charconv (__detail::__to_chars): Avoid
5058 -Wsign-compare warning.
5060 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
5063 * include/std/charconv (__to_chars_i): Check for zero-sized
5064 buffer unconditionally.
5065 * testsuite/20_util/to_chars/95851.cc: New test.
5067 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
5069 * testsuite/20_util/from_chars/1_c++20_neg.cc: Check enumeration
5071 * testsuite/20_util/from_chars/1_neg.cc: Likewise. Move dg-error
5072 directives outside preprocessor condition.
5074 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
5077 * include/std/variant (__detail::__variant::_Build_FUN): Remove
5078 partial specialization to prevent narrowing conversions to bool.
5079 * testsuite/20_util/variant/compile.cc: Test non-narrowing
5080 conversions to bool.
5081 * testsuite/20_util/variant/run.cc: Likewise.
5083 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
5085 * doc/Makefile.in: Regenerate.
5086 * include/Makefile.in: Regenerate.
5087 * libsupc++/Makefile.in: Regenerate.
5088 * po/Makefile.in: Regenerate.
5089 * python/Makefile.in: Regenerate.
5090 * src/Makefile.in: Regenerate.
5091 * src/c++11/Makefile.in: Regenerate.
5092 * src/c++17/Makefile.in: Regenerate.
5093 * src/c++98/Makefile.in: Regenerate.
5094 * src/filesystem/Makefile.in: Regenerate.
5095 * testsuite/Makefile.in: Regenerate.
5097 2020-06-22 David Edelsohn <dje.gcc@gmail.com>
5099 * Makefile.am: Use -include.
5100 * Makefile.in: Regenerate.
5102 2020-06-21 David Edelsohn <dje.gcc@gmail.com>
5104 * Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
5105 * Makefile.in: Regenerate.
5106 * configure.ac (tmake_file): Substitute.
5107 * configure: Regenerate.
5108 * configure.host (aix*): Define tmake_file.
5109 * config/os/aix/t-aix: New file.
5111 2020-06-20 Jason Merrill <jason@redhat.com>
5113 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
5114 Remove greedy_ops tests.
5115 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
5116 Remove greedy_ops tests.
5118 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
5121 * include/bits/stl_algobase.h (__size_to_integer(float))
5122 (__size_to_integer(double), __size_to_integer(long double))
5123 (__size_to_integer(__float128)): Cast return type explicitly.
5124 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
5125 Remove unused typedef.
5127 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
5129 * include/bits/stl_pair.h (_Index_tuple): Remove redundant
5130 namespace qualification.
5131 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
5133 * include/std/tuple (_Head_base, _Tuple_impl, tuple_size)
5134 (tuple_element, __get_helper, get, __make_tuple_impl)
5135 (__make_1st_indices, __tuple_concater)
5136 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
5138 * include/std/utility (tuple_element, __is_tuple_like_impl)
5139 (tuple_size, __pair_get, get): Likewise.
5141 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
5143 * include/bits/std_function.h (function): Define all member
5146 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
5148 * include/bits/stl_algo.h (__includes): Simplify the code.
5150 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
5152 * include/std/optional (optional()): Explicitly define it.
5154 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
5157 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
5158 Construct the first value at *__first instead of on the stack.
5159 (__uninitialized_default_n_1<true>): Likewise.
5160 Improve comments on several of the non-standard algorithms.
5161 * testsuite/20_util/specialized_algorithms/uninitialized_default/94540.cc:
5163 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/94540.cc:
5165 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
5167 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
5169 * testsuite/23_containers/vector/cons/94540.cc: New test.
5171 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
5173 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
5174 Replace Value type with int so trivial code path is used.
5175 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
5178 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
5180 * include/bits/stl_uninitialized.h (uninitialized_fill_n): Only
5181 use std::fill_n when the size is an integral type.
5182 (__uninitialized_default_n): Likewise.
5183 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
5185 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
5187 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
5190 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
5193 * include/bits/atomic_base.h (__atomic_impl::load): Use the _Val
5194 alias instead of deducing _Tp as an unqualified type.
5195 (__atomic_impl::exchange): Use the _Val alias to remove volatile
5196 from the reinterpret_cast result type.
5198 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
5200 * include/std/atomic (atomic): Add static assertions.
5201 * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
5203 2020-06-16 Patrick Palka <ppalka@redhat.com>
5206 * testsuite/20_util/is_constructible/94003.cc: New test.
5208 2020-06-15 Jonathan Wakely <jwakely@redhat.com>
5210 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
5211 Update value for C++20.
5212 * include/std/version (__cpp_lib_constexpr_char_traits): Likewise.
5213 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
5214 Update expected value.
5215 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
5218 2020-06-15 Paul Keir <paul.keir@uws.ac.uk>
5220 * include/bits/char_traits.h (char_traits::move): constexpr move with
5221 overlap was using copy_backward incorrectly.
5222 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
5225 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
5227 * testsuite/29_atomics/atomic_flag/clear/1.cc: Also test clear()
5228 when the value is currently set.
5229 * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc:
5230 Actually check the return value.
5231 * testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc:
5234 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
5236 * include/bits/atomic_base.h (atomic_flag::test): Add missing
5238 * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
5239 dg-options and verify results of test function.
5240 * testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
5242 2020-06-11 Jonathan Wakely <jwakely@redhat.com>
5245 * include/bits/istream.tcc (basic_istream::ignore(streamsize, CharT)):
5246 Only discard an extra character if we didn't already reach the
5248 * src/c++98/istream.cc (istream::ignore(streamsiz, char))
5249 (wistream::ignore(streamsize, wchar_t)): Likewise.
5250 * testsuite/27_io/basic_istream/ignore/char/94749.cc: New test.
5251 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc: New test.
5253 2020-06-10 Patrick Palka <ppalka@redhat.com>
5256 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
5257 Also check that the iterator and sentinel have the same type before
5258 applying the unwrapping optimization for __normal_iterator.
5259 Split the check into two, one for the first iterator/sentinel
5260 pair and another for second iterator/sentinel pair. Remove uses
5261 of __niter_base, and remove uses of std::move on a
5263 * include/bits/ranges_algobase.h (__equal_fn): Likewise.
5264 (__copy_or_move): Likewise. Perform similar adjustments for
5265 the reverse_iterator and move_iterator optimizations. Inline
5266 the checks into the if-constexprs, and use using-declarations to
5267 make them less visually noisy. Remove uses of __niter_wrap.
5268 (__copy_or_move_backward): Likewise.
5269 * testsuite/25_algorithms/copy/95578.cc: New test.
5270 * testsuite/25_algorithms/copy_backward/95578.cc: New test.
5271 * testsuite/25_algorithms/equal/95578.cc: New test.
5272 * testsuite/25_algorithms/lexicographical_compare/95578.cc: New test.
5273 * testsuite/25_algorithms/move/95578.cc: New test.
5274 * testsuite/25_algorithms/move_backward/95578.cc: New test.
5276 2020-06-10 François Dumont <fdumont@gcc.gnu.org>
5277 Jonathan Wakely <jwakely@redhat.com>
5279 * include/bits/deque.tcc (__lex_cmp_dit): New.
5280 (__lexicographical_compare_aux1): Define overloads for deque
5282 * include/bits/stl_algobase.h (__lexicographical_compare::__3way):
5283 New static member function.
5284 (__lexicographical_compare<true>::__3way): Likewise.
5285 (__lexicographical_compare<true>::__lc): Use __3way.
5286 (__lexicographical_compare_aux): Rename to
5287 __lexicographical_compare_aux1 and declare overloads for deque
5289 (__lexicographical_compare_aux): Define new forwarding function
5290 that calls __lexicographical_compare_aux1 and declare new overloads
5292 (lexicographical_compare): Do not use __niter_base on
5294 * include/debug/safe_iterator.tcc
5295 (__lexicographical_compare_aux): Define overloads for safe
5297 * testsuite/25_algorithms/lexicographical_compare/1.cc: Add
5298 checks with random access iterators.
5299 * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
5302 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
5304 * include/bits/stl_iterator.h (move_iterator::operator=): Define.
5305 * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
5307 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
5309 * include/std/optional (bad_optional_access): Define default
5310 constructor and destructor as defaulted.
5311 * testsuite/20_util/optional/bad_access.cc: New test.
5313 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
5315 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
5317 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
5319 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
5321 * include/bits/unique_ptr.h (operator<<): Define for C++20.
5322 * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
5324 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
5326 * include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
5327 (__detail::__cat, __detail::__diff): Move to class scope in the
5328 relevant __iterator_traits specializations.
5329 (__iterator_traits<>): Use nested class templates instead of ones from
5331 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
5332 class scope in iterator_traits<common_iterator<I, S>>.
5333 (iterator_traits<common_iterator<I, S>>): Use nested class template
5334 instead of __detail::__common_iter_ptr.
5336 2020-06-04 François Dumont <fdumont@gcc.gnu.org>
5338 * include/bits/stl_algo.h (__copy_n_a): Move to ...
5339 * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict
5341 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
5343 (__niter_base(const _Safe_iterator<_Ite, _Seq,
5344 random_access_iterator_tag>&)): Declare.
5345 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
5346 _Deque_iterator<>)): Declare.
5347 * include/bits/deque.tcc
5348 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
5349 _Deque_iterator<>)): New.
5350 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
5352 * include/bits/streambuf_iterator.h
5353 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*, bool)): Adapt.
5354 * include/debug/safe_iterator.tcc (__niter_base): New.
5355 * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
5357 * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc:
5359 * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:
5361 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New test.
5362 * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc:
5365 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
5367 * include/bits/ranges_algobase.h (__copy_n_fn): Only call
5368 ranges::copy for positive values.
5369 * include/bits/stl_algo.h (copy_n): Convert Size argument to an
5370 integral type and only call __copy_n for positive values.
5371 * testsuite/util/testsuite_iterators.h
5372 (random_access_iterator_wrapper::operator+=): Fix range check for
5374 (output_container, input_container, forward_container)
5375 (bidirectional_container, random_access_container): New alias
5377 * testsuite/25_algorithms/copy_n/5.cc: New test.
5379 2020-06-02 Jonathan Wakely <jwakely@redhat.com>
5382 * include/debug/deque (deque(const _Base&)): Replace parameter
5383 with a struct that wraps a const _Base&.
5384 * include/debug/forward_list (forward_list(_Base_ref)): New
5386 * include/debug/list (list(const _Base&)): Replace parameter
5387 with a struct that wraps a const _Base&.
5388 * include/debug/map.h (map(const _Base&)): Likewise.
5389 * include/debug/multimap.h (multimap(const _Base&)): Likewise.
5390 * include/debug/multiset.h (multiset(const _Base&)): Likewise.
5391 * include/debug/set.h (set(const _Base&)): Likewise.
5392 * include/debug/unordered_map (unordered_map(const _Base&))
5393 (unordered_multimap(const _Base&)): Likewise.
5394 * include/debug/unordered_set (unordered_set(const _Base&))
5395 (unordered_multiset(const _Base&)): Likewise.
5396 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
5397 Adjust dg-error line number.
5398 * include/debug/vector (vector(const _Base&)): Likewise.
5399 * testsuite/23_containers/deque/debug/90102.cc: New test.
5400 * testsuite/23_containers/forward_list/debug/90102.cc: New test.
5401 * testsuite/23_containers/list/debug/90102.cc: New test.
5402 * testsuite/23_containers/map/debug/90102.cc: New test.
5403 * testsuite/23_containers/multimap/debug/90102.cc: New test.
5404 * testsuite/23_containers/multiset/debug/90102.cc: New test.
5405 * testsuite/23_containers/set/debug/90102.cc: New test.
5406 * testsuite/23_containers/unordered_map/debug/90102.cc: New test.
5407 * testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
5408 * testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
5409 * testsuite/23_containers/unordered_set/debug/90102.cc: New test.
5410 * testsuite/23_containers/vector/debug/90102.cc: New test.
5412 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
5415 * include/bits/fs_path.h (path::_S_to_string): Move to
5416 namespace-scope and rename to ...
5417 (__detail::__string_from_range): ... this.
5418 [WINDOWS] (__detail::__wstr_from_utf8): New function template to
5419 convert a char sequence containing UTF-8 to wstring.
5420 (path::_S_convert(Iter, Iter)): Adjust call to _S_to_string.
5421 (path::_S_convert_loc(Iter, Iter, const locale&)): Likewise.
5422 (u8path(InputIterator, InputIterator)) [WINDOWS]: Use
5423 __string_from_range to obtain a contiguous range and
5424 __wstr_from_utf8 to obtain a wide string.
5425 (u8path(const Source&)) [WINDOWS]: Use __effective_range to
5426 obtain a contiguous range and __wstr_from_utf8 to obtain a wide
5428 (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
5429 Use __wstr_from_utf8.
5431 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
5433 * testsuite/util/testsuite_iterators.h:
5434 (input_iterator_wrapper::operator++(int)): Return proxy object.
5436 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
5438 * doc/xml/manual/evolution.xml: Document deprecation of
5439 __is_nullptr_t and removal of std::allocator members.
5440 * doc/html/manual/api.html: Regenerate.
5442 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
5444 * doc/xml/manual/containers.xml: Replace <xref> with <link>.
5445 * doc/xml/manual/evolution.xml: Likewise.
5446 * doc/html/manual/api.html: Regenerate.
5447 * doc/html/manual/containers.html: Regenerate.
5449 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
5451 * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
5452 * doc/html/faq.html: Regenerate.
5454 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
5456 * doc/xml/manual/policy_data_structures_biblio.xml: Remove
5459 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
5461 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
5462 www.cs.princeton.edu to https.
5463 * doc/html/manual/policy_data_structures.html: Regenerate.
5465 2020-05-31 Douglas B Rupp <douglas.b.rupp@gmail.com>
5467 * crossconfig.m4 (<*-vxworks>): Check for more math decls.
5468 * configure: Rebuild.
5470 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
5473 * configure: Regenerated.
5475 2020-05-29 François Dumont <fdumont@gcc.gnu.org>
5478 * include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
5479 * include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
5480 (unordered_map<>::insert_or_assign): Adapt.
5482 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
5485 * include/bits/atomic_base.h (__atomic_impl::load): Add
5486 cv-qualifiers to parameter so that _Tp is deduced as the
5488 * testsuite/29_atomics/atomic_float/95282.cc: New test.
5490 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
5493 * include/std/ranges (transform_view::_Sentinel): Allow hidden
5494 friends to work with _Iterator<true> and _Iterator<false>.
5495 (join_view::_Sentinel): Likewise.
5496 * testsuite/std/ranges/adaptors/95322.cc: New test.
5498 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
5501 * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
5502 operators to use the correct operations on the underlying
5504 * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
5506 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
5508 * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
5510 2020-05-26 Patrick Palka <ppalka@redhat.com>
5513 * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
5514 Remove and instead define it ...
5515 (common_iterator::_Proxy): ... here.
5516 (common_iterator::operator->): Use it.
5517 * testsuite/24_iterators/common_iterator/2.cc: New test.
5518 * testsuite/std/ranges/adaptors/95322.cc: New test.
5520 2020-05-23 Patrick Palka <ppalka@redhat.com>
5523 * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
5524 dg-additional-options. Avoid unused-but-set-variable warning.
5526 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
5529 * include/debug/helper_functions.h (__get_distance): Only declare
5530 as a constexpr function for C++14 and up.
5531 * testsuite/25_algorithms/copy/debug/95289.cc: New test.
5533 * include/bits/fs_path.h (__detail::_S_range_begin)
5534 (__detail::_S_range_end, path::_S_string_from_iter): Replace with
5535 overloaded function template __detail::__effective_range.
5536 (__detail::__effective_range): New overloaded function template to
5537 create a basic_string or basic_string_view for an effective range.
5538 (__detail::__value_type_is_char): Use __detail::__effective_range.
5539 Do not use remove_const on value type.
5540 (__detail::__value_type_is_char_or_char8_t): Likewise.
5541 (path::path(const Source&, format))
5542 (path::path(const Source&, const locale&))
5543 (path::operator/=(const Source&), path::append(const Source&))
5544 (path::concat(const Source&)): Use __detail::__effective_range.
5545 (path::_S_to_string(InputIterator, InputIterator)): New function
5546 template to create a string view if possible, or string otherwise.
5547 (path::_S_convert): Add overloads that convert a string returned
5548 by __detail::__effective_range. Use if-constexpr to inline conversion
5549 logic from all overloads of _Cvt::_S_convert.
5550 (path::_S_convert_loc): Add overload that converts a string. Use
5551 _S_to_string to avoid allocation when possible.
5552 (path::_Cvt): Remove.
5553 (path::operator+=(CharT)): Remove indirection through path::concat.
5554 * include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
5555 overload for non-const pointers, to avoid constructing a std::string.
5556 * src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
5557 compilation with call to _S_convert.
5559 * include/bits/fs_path.h (__detail::_S_range_begin)
5560 (__detail::_S_range_end): Remove unintentional static specifiers.
5561 * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
5562 (__detail::_S_range_end): Likewise.
5564 * include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
5565 Replace alias template with variable template. Don't remove const.
5566 (filesystem::__detail::__is_path_src): Replace overloaded function
5567 template with variable template and specializations.
5568 (filesystem::__detail::__is_path_iter_src): Replace alias template
5569 with class template.
5570 (filesystem::__detail::_Path): Use __is_path_src. Remove support for
5572 (filesystem::__detail::_Path2): New alias template for checking
5573 InputIterator requirements.
5574 (filesystem::__detail::__constructible_from): Remove.
5575 (filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
5576 * testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
5577 constructor arguments of void and void* types.
5579 2020-05-21 Matthias Kretz <kretz@kde.org>
5581 * testsuite/Makefile.am: Remove dup target_triplet and set tool,
5582 allowing runtest to work without arguments.
5583 * testsuite/Makefile.in: Regenerate.
5585 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
5588 * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
5589 Reorder constraints to avoid recursion when constructors use
5590 iterator_traits (LWG 3420).
5591 * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
5593 * include/experimental/socket (basic_socket::is_open()
5594 (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
5596 * include/experimental/bits/net.h (__endpoint, __protocol)
5597 (__acceptable_protocol, __inet_protocol): New concepts.
5598 (__detail::__is_endpoint): Move trait from <experimental/socket>.
5599 (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
5601 (__endpoint, __protocol, __acceptable_protocol): New variable
5603 * include/experimental/socket (__is_endpoint): Move to net.h header.
5604 (basic_socket, basic_socket_acceptor): Check requirements.
5606 * include/experimental/executor (use_future_t::use_future_t()): Fix
5607 incorrect noexcept-specifier.
5608 * include/experimental/internet (basic_resolver_results): Adjust
5610 * include/experimental/socket (__basic_socket_impl::release): Add
5612 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
5614 (basic_socket::release(), basic_socket::release(error_code&)): Add
5615 missing member functions.
5616 (basic_socket::is_open()): Add nodiscard attribute.
5617 (basic_socket::close(error_code&)): Pass argument to base function.
5618 (basic_socket_acceptor::release())
5619 (basic_socket_acceptor::release(error_code&)): Add missing member
5621 (basic_socket_acceptor::is_open()): Add nodiscard attribute.
5622 (basic_socket_streambuf::error()): Add noexcept.
5623 (basic_socket_iostream::error()): Likewise.
5624 * testsuite/experimental/net/socket/basic_socket.cc: New test.
5626 * include/experimental/buffer: Replace typedefs with
5628 * include/experimental/executor: Likewise.
5629 * include/experimental/internet: Likewise.
5630 * include/experimental/socket: Likewise.
5631 * include/experimental/timer: Likewise.
5633 2020-05-19 Jonathan Wakely <jwakely@redhat.com>
5636 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
5638 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
5640 (random_device::_M_init): Use __x86_rdseed_rdrand when both
5641 instructions are available.
5642 * testsuite/26_numerics/random/random_device/94087.cc: New test.
5644 2020-05-19 Patrick Palka <ppalka@redhat.com>
5647 * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
5649 * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
5651 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
5654 * configure: Regenerated.
5656 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
5658 * configure: Regenerated.
5660 2020-05-13 Alexandre Oliva <oliva@adacore.com>
5663 * include/experimental/memory_resource
5664 (__resource_adaptor_imp::do_allocate): Handle max_align_t on
5665 x86-vxworks as on x86-solaris.
5666 (__resource_adaptor_imp::do_deallocate): Likewise.
5667 * testsuite/experimental/memory_resource/new_delete_resource.cc:
5669 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
5670 (test03): Drop max-align test for char-aligned alloc.
5672 2020-05-08 Ulrich Drepper <drepper@redhat.com>
5674 * include/bits/atomic_base.h (atomic_flag): Implement test member
5676 * include/std/version: Define __cpp_lib_atomic_flag_test.
5677 * testsuite/29_atomics/atomic_flag/test/explicit.cc: New file.
5678 * testsuite/29_atomics/atomic_flag/test/implicit.cc: New file.
5680 2020-05-07 Jonathan Wakely <jwakely@redhat.com>
5682 PR libstdc++/94971 (partial)
5683 * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify
5684 std::sample using macro to work in parallel mode.
5685 (__sort_fn): Likewise for std::sort.
5686 (ranges::__nth_element_fn): Likewise for std::nth_element.
5687 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
5688 Likewise for std::__min_cmp.
5689 * include/parallel/algobase.h (lexicographical_compare_three_way):
5690 Add to namespace std::__parallel.
5693 * include/parallel/multiway_merge.h (_GuardedIterator::operator*)
5694 (_GuardedIterator::operator _RAIter, _UnguardedIterator::operator*)
5695 (_UnguardedIterator::operator _RAIter): Add const qualifier.
5696 (operator<(_GuardedIterator&, _GuardedIterator&)
5697 (operator<=(_GuardedIterator&, _GuardedIterator&)
5698 (operator<(_UnguardedIterator&, _UnguardedIterator&)
5699 (operator<=(_UnguardedIterator&, _UnguardedIterator&): Change
5700 parameters to const references.
5702 2020-05-07 Eric Botcazou <ebotcazou@adacore.com>
5704 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
5705 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
5707 2020-05-06 François Dumont <fdumont@gcc.gnu.org>
5709 * include/bits/stl_algobase.h (struct _Bit_iterator): New declaration.
5710 (std::__fill_a1(_Bit_iterator, _Bit_iterator, const bool&)): Likewise.
5711 * include/bits/stl_bvector.h (__fill_bvector): Move outside
5712 _GLIBCXX_STD_C namespace.
5713 (fill(_Bit_iterator, _Bit_iterator, const bool&)): Likewise and rename
5715 (__fill_a1): ...this.
5716 * testsuite/25_algorithms/fill/bvector/1.cc: New.
5718 2020-05-06 H.J. Lu <hongjiu.lu@intel.com>
5720 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
5722 2020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5724 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
5725 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
5727 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
5728 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
5731 2020-05-06 Martin Liska <mliska@suse.cz>
5734 2020-05-05 Martin Liska <mliska@suse.cz>
5736 * include/parallel/multiway_merge.h:
5737 Use const for _Compare template argument.
5739 2020-05-06 Jonathan Wakely <jwakely@redhat.com>
5741 * doc/xml/manual/abi.xml (abi.versioning.history): Document library
5742 versions for GCC 9.[123] and 10.1 releases.
5743 * doc/html/*: Regenerate.
5745 2020-05-06 Jakub Jelinek <jakub@redhat.com>
5747 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
5748 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
5749 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
5750 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
5751 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
5752 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
5753 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
5755 2020-05-05 Martin Liska <mliska@suse.cz>
5758 * include/parallel/multiway_merge.h:
5759 Use const for _Compare template argument.
5761 2020-05-04 Fangrui Song <maskray@google.com>
5763 * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
5765 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
5767 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
5768 * doc/html/*: Regenerate.
5771 * src/c++17/memory_resource.cc
5772 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
5775 2020-05-04 Nathan Sidwell <nathan@acm.org>
5778 * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
5779 ptrdiff_t before negation, to show intent more clearly.
5781 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
5784 * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
5785 Add comment about single-threaded behaviour.
5786 (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
5787 class member access out of loop.
5788 (synchronized_pool_resource::synchronized_pool_resource())
5789 (synchronized_pool_resource::~synchronized_pool_resource())
5790 (synchronized_pool_resource::release()): Check __gthread_active_p
5791 before creating and/or deleting the thread-specific data key.
5792 (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
5794 (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
5795 path for single-threaded case.
5796 (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
5797 Likewise. Return if unable to find a pool that owns the allocation.
5798 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
5800 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
5802 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
5805 2020-05-03 Jonathan Wakely <jwakely@redhat.com>
5808 * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
5809 usable in constant expressions.
5810 * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
5813 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
5816 * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
5818 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
5819 Patrick Palka <ppalka@redhat.com>
5822 * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
5823 Add trait to determine return type and an alias for it.
5824 (ranges::__cust_imove::_IMove::operator()): Use __result instead of
5825 deduced return type.
5826 (iter_rvalue_reference_t): Use _IMove::__type instead of checking
5827 the result of ranges::iter_move.
5828 (__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
5829 instead of checking the result of ranges::iter_move.
5830 * testsuite/24_iterators/customization_points/92894.cc: New test.
5831 * testsuite/24_iterators/indirect_callable/92894.cc: New test.
5833 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
5836 * include/std/type_traits (__is_complete_or_unbounded): Replace
5837 BADNAME _T with _Tp.
5838 * testsuite/17_intro/badnames.cc: New test.
5840 2020-04-30 Jonathan Wakely <jwakely@redhat.com>
5843 * include/bits/alloc_traits.h (allocator_traits::_S_construct)
5844 (allocator_traits::_S_destroy)
5845 (allocator_traits<allocator<T>>::construct): Use traits in
5846 noexcept-specifiers.
5847 * include/bits/allocator.h (allocator<void>::construct)
5848 (allocator<void>::destroy): Likewise.
5849 * include/ext/malloc_allocator.h (malloc_allocator::construct)
5850 (malloc_allocator::destroy): Likewise.
5851 * include/ext/new_allocator.h (new_allocator::construct)
5852 (new_allocator::destroy): Likewise.
5853 * testsuite/20_util/allocator/89510.cc: New test.
5854 * testsuite/ext/malloc_allocator/89510.cc: New test.
5855 * testsuite/ext/new_allocator/89510.cc: New test.
5857 2020-04-29 Jonathan Wakely <jwakely@redhat.com>
5860 * include/bits/basic_string.tcc: Update comment about explicit
5863 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
5866 * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
5867 Remove non-standard macro.
5868 * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
5869 to indicate P1032R1 support.
5870 * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
5871 * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
5872 * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
5873 * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
5874 (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
5875 (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
5876 * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
5878 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
5879 * testsuite/21_strings/basic_string_view/operations/copy/char/
5880 constexpr.cc: Likewise.
5881 * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
5884 * include/bits/alloc_traits.h (_S_construct): Restore placement
5885 new-expression for C++11/14/17 and call std::construct_at directly
5887 * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
5888 function returning void.
5889 * testsuite/20_util/specialized_algorithms/
5890 uninitialized_value_construct/94831.cc: New test.
5891 * testsuite/23_containers/vector/cons/94831.cc: New test.
5893 2020-04-28 Patrick Palka <ppalka@redhat.com>
5895 LWG 3433 subrange::advance(n) has UB when n < 0
5896 * include/std/ranges (subrange::prev): Fix typo.
5897 (subrange::advance): Handle a negative argument as per the proposed
5898 resolution of LWG 3433.
5899 * testsuite/std/ranges/subrange/lwg3433.cc: New test.
5901 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
5902 Iain Sandoe <iain@sandoe.co.uk>
5905 * include/std/coroutine: Implement handing for non-
5906 class coroutine return types.
5908 2020-04-24 Jonathan Wakely <jwakely@redhat.com>
5910 * include/experimental/executor (service_already_exists): Make default
5911 constructor public (LWG 3414).
5912 * testsuite/experimental/net/execution_context/make_service.cc: Check
5913 the service_already_exists can be default constructed.
5915 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
5916 Jonathan Wakely <jwakely@redhat.com>
5920 * include/std/any (any): Rename template parameters for consistency
5922 (any::_Decay): Rename to _Decay_if_not_any.
5923 (any::any(T&&):: Remove is_constructible from constraints. Remove
5924 non-standard overload.
5925 (any::any(in_place_type_t<T>, Args&&...))
5926 (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
5927 (any::emplace(Args&&...))
5928 (any::emplace(initializer_list<U>, Args&&...)):
5929 Use decay_t instead of _Decay.
5930 * testsuite/20_util/any/cons/90415.cc: New test.
5931 * testsuite/20_util/any/cons/92156.cc: New Test.
5932 * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
5934 * testsuite/20_util/any/modifiers/92156.cc: New test.
5936 2020-04-23 Jonathan Wakely <jwakely@redhat.com>
5938 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
5939 * doc/html/*: Regenerate.
5941 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
5942 value for C++17 to 201803L because P0858R0 is supported for C++17.
5943 * include/std/version (__cpp_lib_array_constexpr): Likewise.
5944 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
5945 Check for value corresponding to P0031R0 features being tested.
5946 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
5947 Check for value corresponding to P0858R0 features being tested.
5949 * include/std/version (__cpp_lib_three_way_comparison): Define for
5950 freestanding builds.
5952 2020-04-23 Thomas Rodgers <rodgert@appliantology.com>
5954 * include/experimental/net/executor (system_context): Mark
5955 system_context::system_context() = delete.
5956 * testsuite/experimental/net/executor/1.cc: Add new
5957 test to check system_context is not default constructible.
5959 2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
5961 * include/std/coroutine: Update the inline namespace to __n4861.
5962 Add the __cpp_lib_coroutine define, set to 201902L.
5963 * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
5965 2020-04-22 Jonathan Wakely <jwakely@redhat.com>
5967 * include/std/execution (__cpp_lib_execution): Define to indicate
5968 support for P0024R2 and P1001R2.
5969 * include/std/version (__cpp_lib_execution): Define.
5970 * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
5971 defined by <algorithm>, move other tests to new tests ...
5972 * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
5973 * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
5974 * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
5975 * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
5977 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
5978 different values for C++17 and C++20, to indicate different feature
5979 sets. Update value for C++20 to indicate P1032R1 support.
5980 * include/std/version (__cpp_lib_array_constexpr): Likewise.
5981 * testsuite/23_containers/array/comparison_operators/constexpr.cc:
5982 Check feature test macro.
5983 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
5985 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
5987 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
5988 in C++17 mode and check feature test macro.
5990 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
5992 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
5993 defined by <utility>.
5995 * include/std/functional (__cpp_lib_concepts): Update macro value to
5996 indicate P1964R2 support.
5997 * include/std/version (__cpp_lib_concepts): Likewise.
5998 * testsuite/std/concepts/1.cc: Adjust expected value.
5999 * testsuite/std/concepts/2.cc: Likewise.
6001 * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
6002 __cpp_lib_constexpr_functional.
6003 * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
6004 * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
6006 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
6007 indicate P1006R1 support.
6008 (__cpp_lib_to_address): Define to indicate P0653R2 support.
6009 * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
6011 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
6013 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
6015 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
6017 * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
6018 Define to indicate P0339R6 support.
6019 * include/std/string_view (__cpp_lib_starts_ends_with): Define to
6020 indicate P0457R2 support.
6021 * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
6022 to indicate P0758R1 support.
6023 (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
6024 (__cpp_lib_type_identity): Define to indicate P0887R1 support.
6025 * include/std/version (__cpp_lib_atomic_float)
6026 (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
6027 (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
6028 (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
6029 (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
6030 (__cpp_lib_to_address): Define.
6031 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
6033 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
6035 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
6037 * include/std/version (__cpp_lib_map_insertion)
6038 (__cpp_lib_unordered_map_insertion): Remove.
6040 * include/std/condition_variable (__cpp_lib_jthread): Remove
6041 redundant definition.
6042 * include/std/stop_token (__cpp_lib_jthread): Update macro value to
6043 indicate P1869R1 support.
6044 * include/std/version (__cpp_lib_jthread): Update value.
6045 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
6046 for updated macro value.
6047 * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
6049 * testsuite/30_threads/jthread/1.cc: Likewise.
6050 * testsuite/30_threads/jthread/2.cc: Likewise.
6051 * testsuite/30_threads/stop_token/1.cc: Likewise.
6052 * testsuite/30_threads/stop_token/2.cc: Likewise.
6054 * testsuite/21_strings/basic_string/erasure.cc: Check for
6055 __cpp_lib_erase_if macro.
6056 * testsuite/23_containers/deque/erasure.cc: Add header name to #error
6058 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
6059 * testsuite/23_containers/list/erasure.cc: Likewise.
6060 * testsuite/23_containers/map/erasure.cc: Likewise.
6061 * testsuite/23_containers/set/erasure.cc: Likewise.
6062 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
6063 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
6064 * testsuite/23_containers/vector/erasure.cc: Likewise.
6066 2020-04-21 Jonathan Wakely <jwakely@redhat.com>
6068 * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
6069 to define operator<=>.
6070 * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
6072 * doc/Makefile.am (xml_sources_manual): Add missing XML files.
6073 * doc/Makefile.in: Regenerate.
6074 * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
6076 * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
6077 to the C++11 status table.
6078 * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
6079 proposals with table matching contents of the C++14 standard.
6080 * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
6082 * doc/html/*: Regenerate.
6085 * include/std/type_traits (__is_nt_constructible_impl): Add partial
6086 specializations for bounded arrays with non-empty initializers.
6087 * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
6089 2020-04-20 Thomas Rodgers <trodgers@redhat.com>
6091 * testsuite/lib/libstdc++.exp: Add additional_flags=
6092 -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
6093 compiling with a newer Thread Building Blocks.
6095 2020-04-20 Jonathan Wakely <jwakely@redhat.com>
6097 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
6099 * testsuite/20_util/is_constructible/51185.cc: Make test class a
6100 non-aggregate so that the test verifies the same thing in all -std
6102 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
6103 results for some types when paren-init for aggregates is supported.
6105 * include/std/version (__cpp_lib_three_way_comparison): Update value.
6106 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
6107 (__detail::__synth3way): Add noexcept-specifier.
6109 * include/bits/stl_map.h (map): Define operator<=> and remove
6110 operator< for C++20.
6111 * include/bits/stl_multimap.h (multimap): Likewise.
6112 * include/bits/stl_multiset.h (multiset): Likewise.
6113 * include/bits/stl_set.h (set): Likewise.
6114 * include/bits/stl_tree.h (_Rb_tree): Likewise.
6115 (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
6116 operator!= for C++20.
6117 * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
6118 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
6119 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
6120 * include/debug/set.h (__gnu_debug::set): Likewise.
6121 * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
6122 * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
6123 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
6124 * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
6126 2020-04-20 Matthias Kretz <kretz@kde.org>
6128 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
6130 2020-04-19 Jonathan Wakely <jwakely@redhat.com>
6132 * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
6133 * include/bits/stl_stack.h (stack): Likewise.
6134 * testsuite/23_containers/queue/cmp_c++20.cc: New test.
6135 * testsuite/23_containers/stack/cmp_c++20.cc: New test.
6137 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
6138 Remove redundant operator!= for C++20.
6139 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
6141 * include/debug/unordered_map (unordered_map, unordered_multimap):
6143 * include/debug/unordered_set (unordered_set, unordered_multiset):
6147 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
6148 redundant assignment in constructor.
6150 2020-04-18 Jonathan Wakely <jwakely@redhat.com>
6152 * include/std/chrono (duration, time_point): Define operator<=> and
6153 remove redundant operator!= for C++20.
6154 * testsuite/20_util/duration/comparison_operators/three_way.cc: New
6156 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
6159 * testsuite/util/native_type/native_priority_queue.hpp: Use
6160 allocator_traits to rebind allocator.
6162 2020-04-17 Jonathan Wakely <jwakely@redhat.com>
6164 * include/bits/forward_list.h (forward_list): Define operator<=> and
6165 remove redundant comparison operators for C++20.
6166 * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
6167 * include/bits/stl_deque.h (deque): Likewise.
6168 * include/bits/stl_iterator.h (__normal_iterator): Likewise.
6169 * include/bits/stl_list.h (list): Likewise.
6170 * include/bits/stl_vector.h (vector): Likewise.
6171 * include/debug/deque (__gnu_debug::deque): Likewise.
6172 * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
6173 * include/debug/list (__gnu_debug::list): Likewise.
6174 * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
6176 * include/debug/vector (__gnu_debug::vector): Likewise.
6177 * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
6178 operator<=> for C++20.
6179 * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
6180 * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
6181 * testsuite/23_containers/list/cmp_c++20.cc: New test.
6182 * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
6183 * testsuite/23_containers/vector/cmp_c++20.cc: New test.
6185 * include/bits/basic_string.h (basic_string): Define operator<=> and
6186 remove redundant comparison operators for C++20.
6187 * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
6188 Add comparison_category members.
6189 (__detail::__char_traits_cmp_cat): New helper to get comparison
6190 category from char traits class.
6191 * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
6193 (sub_match): Define operator<=> and remove redundant comparison
6194 operators for C++20.
6195 (match_results): Remove redundant operator!= for C++20.
6196 * include/std/string_view (basic_string_view): Define operator<=> and
6197 remove redundant comparison operators for C++20.
6198 * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
6200 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
6202 * testsuite/21_strings/basic_string_view/operations/copy/char/
6203 constexpr.cc: Initialize variable.
6204 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
6205 constexpr.cc: Likewise.
6206 * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
6207 dg-do directive and remove comments showing incorrect signatures.
6208 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
6210 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
6212 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
6214 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
6216 2020-04-16 Jonathan Wakely <jwakely@redhat.com>
6218 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
6219 name of unused parameter.
6221 2020-04-15 Jonathan Wakely <jwakely@redhat.com>
6223 * include/bits/fs_dir.h (file_status): Define operator== for C++20.
6224 (directory_entry): Define operator<=> and remove redundant comparison
6225 operators for C++20.
6226 * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
6227 * include/bits/fs_path.h (path): Define operator<=> and remove
6228 redundant comparison operators for C++20.
6229 * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
6230 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
6231 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
6232 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
6234 * include/bits/allocator.h (operator!=): Do not define for C++20.
6235 * include/bits/locale_classes.h (operator!=): Likewise.
6236 * include/bits/std_function.h (operator==(nullptr_t, const function&))
6237 (operator!=(const function&, nullptr_t))
6238 (operator!=(nullptr_t, const function&)): Likewise.
6239 * include/ext/bitmap_allocator.h (operator!=): Likewise.
6240 * include/ext/debug_allocator.h (operator!=): Likewise.
6241 * include/ext/extptr_allocator.h (operator!=): Likewise.
6242 * include/ext/malloc_allocator.h (operator!=): Likewise.
6243 * include/ext/mt_allocator.h (operator!=): Likewise.
6244 * include/ext/new_allocator.h (operator!=): Likewise.
6245 * include/ext/pool_allocator.h (operator!=): Likewise.
6246 * include/ext/throw_allocator.h (operator!=): Likewise.
6247 * include/std/bitset (bitset::operator!=): Likewise.
6248 * include/std/memory_resource (operator!=): Likewise.
6249 * include/std/scoped_allocator (operator!=): Likewise.
6251 * include/std/typeindex (operator<=>): Define for C++20.
6252 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
6254 2020-04-14 Jonathan Wakely <jwakely@redhat.com>
6256 * libsupc++/compare (compare_three_way): Fix constraint so that
6257 BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
6258 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
6262 * include/bits/shared_ptr.h (operator<=>): Define for C++20.
6263 * include/bits/shared_ptr_base.h (operator<=>): Likewise.
6264 * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
6265 * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
6266 * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
6267 std::less<A*> to be used when comparing std::shared_ptr<A> objects in
6271 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
6272 * testsuite/18_support/comparisons/categories/94565.cc: New test.
6274 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
6276 * include/std/coroutine: Update coroutines builtin define,
6279 2020-04-09 Jonathan Wakely <jwakely@redhat.com>
6281 * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
6282 (strong_order, weak_order, partial_order): Replace uses of <=> with
6283 compare_three_way function object (LWG 3324).
6284 * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
6285 equality operator so that X satisfies three_way_comparable.
6286 * testsuite/18_support/comparisons/algorithms/strong_order.cc:
6288 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
6290 * include/bits/unique_ptr.h (operator<=>): Define for C++20.
6291 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
6292 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
6293 * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
6294 * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
6296 2020-04-08 Jonathan Wakely <jwakely@redhat.com>
6298 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
6300 * include/std/complex (operator==(const T&, const complex<T>&))
6301 (operator!=(const complex<T>&, const complex<T>&))
6302 (operator!=(const complex<T>&, const T&))
6303 (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
6304 * testsuite/26_numerics/slice/compare.cc: New test.
6306 * include/std/charconv (to_chars_result, from_chars_result): Add
6307 defaulted equality comparisons for C++20.
6308 * testsuite/20_util/from_chars/compare.cc: New test.
6309 * testsuite/20_util/to_chars/compare.cc: New test.
6311 2020-04-07 Jonathan Wakely <jwakely@redhat.com>
6314 * include/std/charconv (__integer_to_chars_result_type)
6315 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
6317 * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
6318 use of std::string_view with std::string.
6319 * testsuite/20_util/from_chars/2.cc: Likewise.
6320 * testsuite/20_util/to_chars/1.cc: Likewise.
6321 * testsuite/20_util/to_chars/2.cc: Likewise.
6323 2020-04-06 Jonathan Wakely <jwakely@redhat.com>
6326 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
6327 usable in constant expressions for C++20.
6328 (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
6329 _GLIBCXX20_CONSTEXPR.
6330 (std::char_traits<char>, std::char_traits<wchar_t>)
6331 (std::char_traits<char8_t>): Make move, copy and assign usable in
6332 constant expressions for C++20.
6333 (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
6334 and copy usable in constant expressions for C++20.
6335 * include/std/string_view (basic_string_view::copy): Add
6336 _GLIBCXX20_CONSTEXPR.
6337 * testsuite/21_strings/basic_string_view/operations/copy/char/
6338 constexpr.cc: New test.
6339 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
6340 constexpr.cc: New test.
6342 2020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
6344 * doc/xml/manual/appendix_contributing.xml: Refer to Git
6345 documentation instead of Subversion. Switch to https.
6346 * doc/html/manual/appendix_contributing.html: Regenerate.
6348 2020-04-03 Jonathan Wakely <jwakely@redhat.com>
6351 * include/bits/ptr_traits.h (__to_address): Add special case for debug
6352 iterators, to avoid dereferenceable check.
6353 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
6354 * testsuite/20_util/to_address/debug.cc: New test.
6356 2020-04-01 Andrea Corallo <andrea.corallo@arm.com>
6358 * testsuite/experimental/net/execution_context/use_service.cc:
6359 Require pthread and gthreads.
6361 2020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
6363 * doc/xml/manual/appendix_free.xml: Move "free books" list from
6365 * doc/html/manual/appendix_free.html: Regenerate.
6367 2020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
6369 Library-side tests for parenthesized aggregate init
6374 * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
6375 * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
6376 * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
6377 * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
6378 * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
6379 * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
6380 * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
6381 * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
6382 * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
6384 * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
6385 * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
6386 * testsuite/20_util/variant/92878_92947.cc: Likewise.
6387 * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
6389 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
6391 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
6393 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
6395 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
6397 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
6399 * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
6400 * testsuite/23_containers/queue/92878_92947.cc: Likewise.
6401 * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
6403 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
6404 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
6406 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
6408 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
6410 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
6412 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
6415 2020-03-28 Jonathan Wakely <jwakely@redhat.com>
6417 * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
6418 for changes due to parenthesized aggregate-initialization in C++20.
6419 * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
6420 with std::chrono::sys_time in C++20.
6422 * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
6423 to constrain C++20 versions of comparison operators. Fix backwards
6424 logic of relational operators.
6425 (move_iterator): Use requires-clause to constrain comparison operators
6426 in C++20. Do not declare non-standard same-type overloads for C++20.
6427 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
6428 of comparisons and check using greedy_ops type.
6429 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
6430 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
6431 main function from compile-only test.
6432 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
6434 2020-03-27 Jonathan Wakely <jwakely@redhat.com>
6436 * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
6437 * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
6438 C++20 concepts are required.
6439 * include/bits/stl_iterator_base_types.h: Likewise.
6440 * include/std/concepts: Likewise.
6441 * include/std/version: Likewise.
6442 * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
6445 * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
6446 (reverse_iterator::iterator_category): Define for C++20.
6447 (reverse_iterator): Define comparison operators correctly for C++20.
6448 (__normal_iterator): Add constraints to comparison operators for C++20.
6449 (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
6450 overload for input iterators.
6451 (move_iterator): Add constraints to comparison operators for C++20.
6452 Define operator<=> for C++20.
6453 * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
6454 * testsuite/24_iterators/move_iterator/move_only.cc: New test.
6455 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
6456 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
6458 * include/bits/iterator_concepts.h (__detail::__decay_copy)
6459 (__detail::__member_begin, __detail::__adl_begin): Move here from
6460 <bits/range_access.h>.
6461 (__detail::__ranges_begin, __detail::__range_iter_t): Define.
6462 * bits/range_access.h (__cust_access::__decay_copy)
6463 (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
6464 <bits/iterator_concepts.h>.
6465 (ranges::iterator_t): Use __detail::__range_iter_t.
6466 * include/bits/stl_iterator.h (back_insert_iterator): Simplify
6467 conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
6468 (front_insert_iterator): Likewise.
6469 (insert_iterator): Implement changes from P0896R4 for C++20.
6470 * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
6471 * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
6472 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
6473 for inclusion in synopsis_c++20.cc which expects different signatures
6474 for some function templates.
6475 * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
6477 * include/std/type_traits (__is_array_convertible): Move definition
6478 to immediately after is_convertible.
6480 2020-03-26 Jonathan Wakely <jwakely@redhat.com>
6482 * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
6483 (chrono::months, chrono::sys_days, chrono::local_t)
6484 (chrono::local_time, chrono::local_seconds, chrono::local_days):
6486 (chrono::time_point): Add missing static assert.
6487 * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
6488 * testsuite/std/time/clock/file/overview.cc: New test.
6489 * testsuite/std/time/clock/file/members.cc: New test.
6490 * testsuite/std/time/syn_c++20.cc: New test.
6492 2020-03-25 Mike Crowe <mac@mcrowe.com>
6494 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
6496 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
6499 2020-03-25 Jonathan Wakely <jwakely@redhat.com>
6501 * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
6502 * include/std/chrono (filesystem::__file_clock): Here.
6503 (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
6504 Define public member functions for C++20.
6505 (is_clock, is_clock_v): Define traits for C++20.
6506 * include/std/condition_variable (condition_variable::wait_until): Add
6507 check for valid clock.
6508 * include/std/future (_State_baseV2::wait_until): Likewise.
6509 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
6510 * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
6512 * include/std/thread (this_thread::sleep_until): Likewise.
6513 * testsuite/30_threads/condition_variable/members/2.cc: Qualify
6514 slow_clock with new namespace.
6515 * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
6517 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
6519 * testsuite/30_threads/future/members/clock_neg.cc: New test.
6520 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
6521 Qualify slow_clock with new namespace.
6522 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
6523 clock_neg.cc: New test.
6524 * testsuite/30_threads/shared_future/members/clock_neg.cc: New
6526 * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
6527 * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
6529 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
6530 slow_clock with new namespace.
6531 * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
6532 * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
6534 * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
6535 * testsuite/std/time/traits/is_clock.cc: New test.
6536 * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
6539 2020-03-21 Jonathan Wakely <jwakely@redhat.com>
6542 * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
6543 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
6544 Improve test coverage.
6547 * include/bits/fs_path.h (path::_S_str_convert): Replace first
6548 parameter with basic_string_view so that strings with different
6549 allocators can be accepted.
6550 (path::generic_string<C,T,A>()): Use basic_string object that uses the
6551 right allocator type.
6552 * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
6553 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
6556 2020-03-18 Jonathan Wakely <jwakely@redhat.com>
6559 * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
6560 (__is_nt_default_constructible_impl): Remove.
6561 (__is_nothrow_default_constructible_impl): Remove.
6562 (__is_nt_constructible_impl): Add bool template parameter. Adjust
6563 partial specializations.
6564 (__is_nothrow_constructible_impl): Replace class template with alias
6566 (is_nothrow_default_constructible): Derive from alias template
6567 __is_nothrow_constructible_impl instead of
6568 __is_nothrow_default_constructible_impl.
6569 * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
6571 * include/std/stop_token (stop_token::_Stop_state_ref): Define
6572 comparison operators explicitly if the compiler won't synthesize them.
6574 * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
6575 __cpp_lib_concepts before using iter_reference_t.
6576 * include/bits/stream_iterator.h (istream_iterator): Check
6577 __cpp_lib_concepts before using default_sentinel_t.
6578 * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
6581 * include/experimental/executor (executor::executor(Executor)): Call
6582 make_shared directly instead of _M_create. Create _Tgt1 object.
6583 (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
6584 Call allocate_shared directly instead of _M_create. Create _Tgt2
6586 (executor::target_type): Add cast needed for new _Tgt interface.
6587 (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
6588 (executor::_Tgt): Define the same interface whether RTTI is enabled or
6590 (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
6591 std::type_info in the interface.
6592 (executor::_Tgt::_M_func): Add data member.
6593 (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
6594 (executor::_Tgt1::_S_func): Define function to access target without
6596 (executor::_M_create): Remove.
6597 (operator==, operator!=): Simplify comparisons for executor.
6598 * include/experimental/socket (is_error_code_enum<socket_errc>):
6599 Define specialization before use.
6600 * testsuite/experimental/net/executor/1.cc: New test.
6602 2020-03-16 Jonathan Wakely <jwakely@redhat.com>
6605 * include/experimental/executor (service_already_exists): Add default
6606 constructor. Declare make_service to be a friend.
6607 * testsuite/experimental/net/execution_context/make_service.cc: New
6610 2020-03-12 Jonathan Wakely <jwakely@redhat.com>
6612 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
6613 a null pointer to functions with nonnull(1) attribute.
6615 2020-03-11 Patrick Palka <ppalka@redhat.com>
6617 * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
6618 'address' -> 'std::__addressof'.
6619 * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
6620 a non-forward input_range.
6621 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
6622 default constructor protected instead of deleted, like with
6623 input_iterator_wrapper.
6624 (test_range::iterator): Add comment explaining that this type is used
6625 only when the underlying wrapper is input_iterator_wrapper or
6626 output_iterator_wrapper. Remove delegating defaulted constructor so
6627 that the inherited default constructor is used instead.
6629 LWG 3286 ranges::size is not required to be valid after a call to
6630 ranges::begin on an input range
6631 * include/std/ranges (subrange::subrange): Split single-argument
6632 constructor into two, one constrained by _S_store_size and another by
6634 (take_view::begin): Call size() before calling ranges::begin(_M_base).
6635 * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
6636 * testsuite/std/ranges/subrange/lwg3286.cc: New test.
6638 2020-03-10 Jonathan Wakely <jwakely@redhat.com>
6640 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
6641 instead of _M_current.
6642 (split_view::_OuterIter::operator++): Likewise.
6644 * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
6645 (transform_view::_Iterator::operator*): Add noexcept-specifier.
6646 (transform_view::_Iterator::iter_move): Inline __iter_move body here.
6647 (split_view::_OuterIter::__current): Add noexcept.
6648 (split_view::_InnerIter::__iter_swap): Remove.
6649 (split_view::_InnerIter::__iter_move): Remove.
6650 (split_view::_InnerIter::_M_i_current): New accessors.
6651 (split_view::_InnerIter::__at_end): Use _M_i_current().
6652 (split_view::_InnerIter::operator*): Likewise.
6653 (split_view::_InnerIter::operator++): Likewise.
6654 (iter_move(const _InnerIter&)): Likewise.
6655 (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
6656 * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
6657 for iter_move and iter_swap on split_view's inner iterator.
6660 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
6661 Change expression in noexcept-specifier to match function body.
6663 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
6664 comment explaining multiple dg-do directives.
6665 * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
6666 so test is run as well as compiled.
6668 2020-03-09 Jonathan Wakely <jwakely@redhat.com>
6671 * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
6672 handle concatenations that change the type of the first component.
6673 (path::operator+=(basic_string_view<value_type>)): Likewise.
6674 * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
6676 2020-03-06 Patrick Palka <ppalka@redhat.com>
6678 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
6679 join_view::_Sentinel<!_Const>.
6680 * testsuite/std/ranges/adaptors/join.cc: Augment test.
6683 * include/bits/range_access.h (__cust_access::_Empty::operator()):
6684 Declare return type to be bool instead of auto.
6685 * testsuite/std/ranges/adaptors/93978.cc: New test.
6687 2020-03-06 Jonathan Wakely <jwakely@redhat.com>
6690 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
6691 (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
6692 second argument to __glibcxx_rwlock_init.
6693 * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
6696 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
6697 test to not fail due to PR 94063.
6698 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
6699 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
6701 2020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
6703 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
6706 2020-03-05 Jonathan Wakely <jwakely@redhat.com>
6708 * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
6709 * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
6710 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
6711 * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
6712 for return value, and in comparison.
6713 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
6716 * include/std/string_view: Include <bits/ostream_insert.h>.
6717 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
6719 2020-03-04 Jonathan Wakely <jwakely@redhat.com>
6721 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
6723 2020-03-04 Patrick Palka <ppalka@redhat.com>
6726 * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
6727 condition for when to use memset, making sure to additionally check that
6728 the output pointer's value type is a non-volatile byte type. Instead of
6729 requiring that the fill type is a byte type, just require that it's an
6731 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
6733 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
6735 * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
6736 blocked by PR 94017.
6737 * testsuite/25_algorithms/fill/94017.cc: New test.
6738 * testsuite/25_algorithms/fill_n/94017.cc: New test.
6740 LWG 3355 The memory algorithms should support move-only input iterators
6742 * include/bits/ranges_uninitialized.h
6743 (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
6744 to copy __ifirst, which could be a move-only input iterator. Use
6745 operator- instead of ranges::distance to compute distance from a sized
6747 (__uninitialized_copy_n_fn::operator()): Likewise.
6748 (__uninitialized_move_fn::operator()): Likewise.
6749 (__uninitialized_move_n_fn::operator()): Likewise.
6750 (__uninitialized_destroy_fn::operator()): Use std::move to avoid
6751 attempting to copy __first.
6752 (__uninitialized_destroy_n_fn::operator()): Likewise.
6753 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
6755 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
6757 * .../specialized_algorithms/uninitialized_move/constrained.cc:
6760 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
6761 protected instead of private.
6762 (test_sized_range_sized_sent): New.
6764 * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
6765 New testsuite iterator.
6766 * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
6767 * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
6769 * include/bits/ranges_uninitialized.h
6770 (uninitialized_copy_fn::operator()): Pass a reference type as the first
6771 argument to is_nothrow_assignable_v.
6772 (uninitialized_copy_fn::operator()): Likewise.
6773 (uninitialized_move_fn::operator()): Likewise. Return an in_out_result
6774 with the input iterator stripped of its move_iterator.
6775 (uninitialized_move_n_fn::operator()): Likewise.
6776 (uninitialized_fill_fn::operator()): Pass a reference type as the first
6777 argument to is_nothrow_assignable_v.
6778 (uninitialized_fill_n_fn::operator()): Likewise.
6780 2020-03-03 Jonathan Wakely <jwakely@redhat.com>
6783 * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
6784 traits to control when to use memmove and memcmp optimizations.
6785 (__is_nonvolatile_trivially_copyable): New helper trait.
6786 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
6787 use memcmp optimization with volatile data.
6788 * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
6789 (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
6790 * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
6791 (__copy_move_backward_a2): Likewise.
6792 (__equal_aux1): Use __memcmpable.
6793 (__lexicographical_compare_aux): Do not use memcmp optimization with
6795 * testsuite/25_algorithms/copy/94013.cc: New test.
6796 * testsuite/25_algorithms/copy_backward/94013.cc: New test.
6797 * testsuite/25_algorithms/equal/94013.cc: New test.
6798 * testsuite/25_algorithms/fill/94013.cc: New test.
6799 * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
6800 * testsuite/25_algorithms/move/94013.cc: New test.
6801 * testsuite/25_algorithms/move_backward/94013.cc: New test.
6803 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
6804 Avoid redundant iterator comparisons (LWG 3410).
6806 2020-03-02 Jonathan Wakely <jwakely@redhat.com>
6809 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
6811 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
6813 * include/std/ranges (__detail::__maybe_empty_t): Rename to
6815 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
6817 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
6820 2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
6822 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
6824 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
6826 * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
6827 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
6828 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
6829 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
6830 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
6832 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
6833 Add libatomic option.
6834 * testsuite/30_threads/jthread/jthread.cc: Likewise.
6836 2020-02-29 François Dumont <fdumont@gcc.gnu.org>
6838 * include/bits/stl_algo.h
6839 (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
6840 * include/bits/stl_algobase.h: ...here.
6841 * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
6843 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
6845 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
6847 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
6849 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
6850 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
6851 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
6852 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
6853 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
6854 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
6855 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
6859 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
6861 2020-02-28 Patrick Palka <ppalka@redhat.com>
6864 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
6865 Fix condition for when to use memcmp, making it consistent with the
6866 corresponding condition used in std::lexicographical_compare.
6867 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
6869 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
6870 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
6871 existing signatures for C++2a.
6873 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
6875 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
6876 test instead of just compiling it.
6878 2020-02-28 Patrick Palka <ppalka@redhat.com>
6880 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
6881 whenever the underlying range models common_range.
6883 * include/std/ranges (__detail::_CachedPosition): New struct.
6884 (views::filter_view::_S_needs_cached_begin): New member variable.
6885 (views::filter_view::_M_cached_begin): New member variable.
6886 (views::filter_view::begin): Use _M_cached_begin to cache its
6888 (views::drop_view::_S_needs_cached_begin): New static member variable.
6889 (views::drop_view::_M_cached_begin): New member variable.
6890 (views::drop_view::begin): Use _M_cached_begin to cache its result
6891 when _S_needs_cached_begin.
6892 (views::drop_while_view::_M_cached_begin): New member variable.
6893 (views::drop_while_view::begin): Use _M_cached_begin to cache its
6895 (views::reverse_view::_S_needs_cached_begin): New static member
6897 (views::reverse_view::_M_cached_begin): New member variable.
6898 (views::reverse_view::begin): Use _M_cached_begin to cache its result
6899 when _S_needs_cached_begin.
6900 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
6901 drop_view::begin caches its result.
6902 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
6903 that drop_while_view::begin caches its result.
6904 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
6905 filter_view::begin caches its result.
6906 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
6907 reverse_view::begin caches its result.
6909 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
6911 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
6912 filesystems that silently truncate timestamps.
6913 * testsuite/experimental/filesystem/operations/last_write_time.cc:
6916 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
6917 -Wstringop-overflow warnings.
6919 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
6921 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
6922 -fdiagnostics-urls=never to options.
6924 2020-02-27 Patrick Palka <ppalka@redhat.com>
6926 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
6928 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
6929 (take_view::_Sentinel<_Const>): Likewise.
6930 (take_while_view::_Sentinel<_Const>): Likewise.
6931 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
6932 * testsuite/std/ranges/adaptors/split.cc: Augment test.
6933 * testsuite/std/ranges/adaptors/take.cc: Augment test.
6934 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
6935 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
6937 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
6938 base() of a vector<>::iterator is a pointer.
6939 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
6940 * testsuite/25_algorithms/move/constrained.cc: Likewise.
6941 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
6942 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
6944 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
6945 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
6946 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
6947 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
6948 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
6950 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
6952 * include/debug/array (operator<=>): Define for C++20.
6953 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
6954 Adjust dg-error line numbers.
6955 * testsuite/23_containers/array/tuple_interface/
6956 tuple_element_debug_neg.cc: Likewise.
6958 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
6959 defining _GLIBCXX_ASSERTIONS.
6960 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
6961 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
6962 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
6963 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
6964 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
6965 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
6966 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
6967 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
6968 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
6969 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
6970 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
6971 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
6973 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
6974 C++98 where the member function of the base class returns void.
6976 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
6977 equality comparisons that support value-initialized iterators.
6979 * include/bits/boost_concept_check.h (__function_requires): Add
6980 _GLIBCXX14_CONSTEXPR.
6981 * testsuite/25_algorithms/min/concept_checks.cc: New test.
6983 2020-02-26 Patrick Palka <ppalka@redhat.com>
6986 * include/std/ranges (split_view::_InnerIter::operator==): Compare
6987 the operands' _M_i rather than their _M_i.current().
6988 * testsuite/std/ranges/adaptors/split.cc: Augment test.
6990 P1645R1 constexpr for <numeric> algorithms
6991 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
6992 partial_sum, adjacent_difference): Make conditionally constexpr for
6994 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
6996 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
6997 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
6998 constexpr for C++20.
6999 * include/std/version (__cpp_lib_constexpr_numeric): Define.
7000 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
7001 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
7002 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
7003 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
7004 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
7005 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
7006 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
7007 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
7008 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
7009 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
7010 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
7012 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
7014 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
7015 variables in smaller scope and avoid calling ranges::distance when we
7016 know they are pointers. Remove statically-unreachable use of
7017 __builtin_unreachable().
7018 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
7021 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
7023 (__detail::__maybe_const_t): Likewise.
7024 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
7025 (transform_view, take_view, take_while_view, elements_view): Use
7027 (join_view, split_view): Use both.
7029 2020-02-25 Patrick Palka <ppalka@redhat.com>
7031 LWG 3397 basic_istream_view::iterator should not provide
7033 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
7035 (basic_istream_view:_Iterator::iterator_concept): ... this.
7036 * testsuite/std/ranges/istream_view.cc: Augment test.
7038 LWG 3325 Constrain return type of transformation function for
7040 * include/std/ranges (transform_view): Constrain the return type of the
7041 transformation function as per LWG 3325.
7042 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
7044 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
7045 * include/std/ranges (join_view::_Iterator::operator--): Require that
7046 range_reference_t<_Base> models common_range.
7047 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
7049 LWG 3301 transform_view::_Iterator has incorrect iterator_category
7050 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
7051 determination of iterator_category as per LWG 3301.
7052 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
7054 LWG 3292 iota_view is under-constrained
7055 * include/std/ranges (iota_view): Require that _Winc models semiregular
7057 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
7059 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
7061 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
7062 during constant evaluation. Call __builtin_memmove directly instead of
7064 (__copy_or_move_backward): Likewise.
7065 * include/bits/stl_algobase.h (__memmove): Remove.
7066 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
7067 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
7068 Use __builtin_memmove directly instead of __memmove.
7069 (__copy_move_a2): Do not use memmove during constant evaluation.
7070 (__copy_move_backward_a2): Use _IsMove constant to select correct
7071 __copy_move_backward specialization.
7072 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
7073 begin turned into moves during constant evaluation.
7075 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
7079 * include/bits/stl_algobase.h (__memmove): Cast away const before
7080 doing move assignment.
7081 * testsuite/25_algorithms/move/93872.cc: New test.
7082 * testsuite/25_algorithms/move_backward/93872.cc: New test.
7084 2020-02-24 Patrick Palka <ppalka@redhat.com>
7087 * include/bits/ranges_algobase.h (__copy_or_move,
7088 __copy_or_move_backward): Don't inspect the iter_value_t of the output
7089 iterator, instead inspect its iterator_traits directly.
7090 * include/bits/stl_iterator.h (back_insert_iterator::container):
7091 Conditionally initialize.
7092 (back_insert_iterator::difference_type): Conditionally define.
7093 (back_insert_iterator::back_insert_iterator): Conditionally define this
7094 default constructor.
7095 (front_insert_iterator::container): Conditionally initialize.
7096 (front_insert_iterator::difference_type): Conditionally define.
7097 (front_insert_iterator::front_insert_iterator): Conditionally define
7098 this default constructor.
7099 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
7100 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
7102 P0769R2 Add shift to <algorithm>
7103 * include/bits/ranges_algo.h (shift_left, shift_right): New.
7104 * testsuite/25_algorithms/shift_left/1.cc: New test.
7105 * testsuite/25_algorithms/shift_right/1.cc: New test.
7107 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
7109 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
7110 Make noexcept-specifier conditional.
7111 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
7114 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
7116 (operator==(istream_iterator, default_sentinel_t)): Add operator.
7117 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
7118 * include/bits/streambuf_iterator.h
7119 (istreambuf_iterator(default_sentinel_t)): Add constructor.
7120 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
7121 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
7123 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
7124 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
7126 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
7128 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
7129 (ranges::enable_view): Simplify (LWG 3326).
7130 * include/bits/range_access.h (ranges::enable_view): Declare.
7131 * include/bits/regex.h (__enable_view_impl): Remove partial
7133 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
7134 * include/bits/stl_set.h (__enable_view_impl): Likewise.
7135 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
7136 * include/debug/multiset.h (__enable_view_impl): Likewise.
7137 * include/debug/set.h (__enable_view_impl): Likewise.
7138 * include/debug/unordered_set (__enable_view_impl): Likewise.
7139 * include/experimental/string_view (ranges::enable_view): Define
7140 partial specialization.
7141 * include/std/span (ranges::enable_view): Likewise.
7142 * include/std/string_view (ranges::enable_view): Likewise.
7143 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
7145 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
7147 * include/std/optional (operator<=>(optional<T>, optional<U>))
7148 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
7150 * include/std/tuple (__tuple_cmp): New helper function for <=>.
7151 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
7152 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
7153 (operator<=>(monostate, monostate)): Define for C++20.
7154 * testsuite/20_util/optional/relops/three_way.cc: New test.
7155 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
7156 * testsuite/20_util/variant/89851.cc: Move to ...
7157 * testsuite/20_util/variant/relops/89851.cc: ... here.
7158 * testsuite/20_util/variant/90008.cc: Move to ...
7159 * testsuite/20_util/variant/relops/90008.cc: ... here.
7160 * testsuite/20_util/variant/relops/three_way.cc: New test.
7162 2020-02-20 Patrick Palka <ppalka@redhat.com>
7164 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
7166 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
7167 __maybe_refwrap to capture lvalue references by reference, and then use
7168 unwrap_reference_t to forward the by-reference captures as references.
7169 * testsuite/std/ranges/adaptors/split.cc: Augment test.
7170 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
7172 * include/std/ranges (iota_view): Forward declare _Sentinel.
7173 (iota_view::_Iterator): Befriend _Sentinel.
7174 (iota_view::_Sentinel::_M_equal): New member function.
7175 (iota_view::_Sentinel::operator==): Use it.
7176 (views::_Iota::operator()): Forward __f using the correct type.
7177 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
7178 with integers of different signedness, to appease iota_view's deduction
7180 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
7182 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
7184 * include/bits/range_access.h (ranges::begin): Reject array of
7186 (ranges::end, ranges::size): Require arrays to be bounded.
7187 (ranges::data): Require lvalue or borrowed_range.
7188 (ranges::iterator_t): Remove constraint.
7189 * testsuite/std/ranges/access/begin.cc: Do not check array of
7191 * testsuite/std/ranges/access/begin_neg.cc: New test.
7192 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
7193 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
7194 * testsuite/std/ranges/access/ssize.cc: Do not check array of
7197 * include/std/system_error (error_category::operator<=>)
7198 (operator<=>(const error_code&, const error_code&))
7199 (operator<=>(const error_condition&, const error_condition&)): Define
7201 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
7202 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
7204 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
7206 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
7207 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
7209 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
7210 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
7212 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
7213 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
7214 Remove incorrect comment.
7215 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
7218 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
7220 * include/std/thread (thread::id::operator<=>): Define for C++20.
7221 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
7222 functions in namespace std.
7223 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
7225 2020-02-19 Patrick Palka <ppalka@redhat.com>
7227 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
7228 null terminator of the underlying string as part of the test_range.
7229 (main): Call test03.
7231 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
7233 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
7234 requirement (LWG 3385).
7235 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
7236 expected declaration.
7238 * include/std/ranges (take_while_view, drop_view, drop_while_view)
7239 (elements_view:_Iterator): Initialize data members (LWG 3364).
7241 * libsupc++/compare (three_way_comparable): Remove always-false check
7242 that should have been removed with weak_equality (P1959R0).
7243 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
7245 * include/std/concepts (__detail::__partially_ordered_with): Move here
7247 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
7248 to simplify definition (LWG 3331).
7249 * libsupc++/compare (__detail::__partially_ordered_with): Move to
7252 * include/std/concepts (totally_ordered_with): Remove redundant
7253 requirement (LWG 3329).
7255 * include/std/ranges (__detail::__convertible_to_non_slicing): New
7257 (__detail::__pair_like_convertible_to): Remove.
7258 (__detail::__pair_like_convertible_from): Add requirements for
7259 non-slicing conversions.
7260 (subrange): Constrain constructors with __convertible_to_non_slicing.
7261 Remove constructors from pair-like types. Add new deduction guide.
7262 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
7264 * include/bits/iterator_concepts.h (iter_move): Add declaration to
7265 prevent unqualified lookup finding a suitable declaration (LWG 3247).
7267 * include/std/memory_resource (polymorphic_allocator::allocate)
7268 (polymorphic_allocator::allocate_object): Change type of exception to
7269 bad_array_new_length (LWG 3237).
7270 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
7272 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
7273 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
7274 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
7275 * testsuite/20_util/unwrap_reference/3.cc: New test.
7277 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
7278 type during overload resolution, use static assert instead (LWG 3200).
7279 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
7281 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
7283 * include/std/span (span(T (&)[N])): Use non-deduced context to
7284 prevent first parameter from interfering with class template argument
7285 deduction (LWG 3369).
7286 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
7287 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
7290 * include/std/span (span::const_iterator, span::const_reverse_iterator)
7291 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
7293 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
7295 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
7297 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
7298 constrained.cc: Likewise.
7299 * testsuite/20_util/specialized_algorithms/
7300 uninitialized_default_construct/constrained.cc: Likewise.
7301 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
7302 constrained.cc: Likewise.
7303 * testsuite/20_util/specialized_algorithms/uninitialized_move/
7304 constrained.cc: Likewise.
7305 * testsuite/20_util/specialized_algorithms/
7306 uninitialized_value_construct/constrained.cc: Likewise.
7308 * include/bits/range_access.h (range_size_t): Define alias template.
7309 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
7310 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
7312 * include/std/ranges (filter_view, transform_view, take_view)
7313 (join_view, split_view, reverse_view): Remove commented-out converting
7314 constructors (LWG 3280).
7316 * include/std/memory (uninitialized_construct_using_allocator): Use
7317 std::construct_at (LWG 3321).
7319 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
7320 (polymorphic_allocator::allocate_object)
7321 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
7323 LWG 3379. "safe" in several library names is misleading
7324 * include/bits/range_access.h (enable_safe_range): Rename to
7325 enable_borrowed_range.
7326 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
7327 (safe_range): Rename to borrowed_range.
7328 * include/bits/ranges_algo.h: Adjust to use new names.
7329 * include/bits/ranges_algobase.h: Likewise.
7330 * include/bits/ranges_uninitialized.h: Likewise.
7331 * include/std/ranges: Likewise.
7332 (safe_iterator_t): Rename to borrowed_iterator_t.
7333 (safe_subrange_t): Rename to borrowed_subrange_t.
7334 * include/std/span: Adjust to use new names.
7335 * include/std/string_view: Likewise.
7336 * include/experimental/string_view: Likewise.
7337 * testsuite/std/ranges/access/begin.cc: Likewise.
7338 * testsuite/std/ranges/access/cbegin.cc: Likewise.
7339 * testsuite/std/ranges/access/cdata.cc: Likewise.
7340 * testsuite/std/ranges/access/cend.cc: Likewise.
7341 * testsuite/std/ranges/access/crbegin.cc: Likewise.
7342 * testsuite/std/ranges/access/crend.cc: Likewise.
7343 * testsuite/std/ranges/access/data.cc: Likewise.
7344 * testsuite/std/ranges/access/end.cc: Likewise.
7345 * testsuite/std/ranges/access/rbegin.cc: Likewise.
7346 * testsuite/std/ranges/access/rend.cc: Likewise.
7347 * testsuite/std/ranges/safe_range.cc: Likewise.
7348 * testsuite/std/ranges/safe_range_types.cc: Likewise.
7349 * testsuite/util/testsuite_iterators.h: Likewise.
7351 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
7352 (tuple_element<1, const subrange<I, S, K>>): Add partial
7353 specializations (LWG 3398).
7354 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
7356 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
7357 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
7358 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
7360 2020-02-18 Patrick Palka <ppalka@redhat.com>
7362 P1983R0 Wording for GB301, US296, US292, US291, and US283
7363 * include/std/ranges (filter_view::pred): New member function.
7364 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
7365 P1983R0 fixes the highlighted issue in the same way.
7366 (join_view::_Iterator<_Const>): Add friend
7367 join_view::_Iterator<!_Const>.
7368 (join_view::_M_inner): Remove mutable specifier, effectively reverting
7369 the proposed wording changes of P3278.
7370 (join_view::begin): Refine the condition for when to return a const
7372 (split_view::_OuterIter::_OuterIter): Adjust constraints.
7373 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
7376 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
7379 * include/std/ranges (_RangeAdaptor): Add deduction guide.
7380 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
7382 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
7383 (transform_view::_Iterator): Add alias _Base_iter and use in place of
7385 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
7386 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
7387 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
7388 (split_view::_InnerIter::_S_iter_cat()): Likewise.
7390 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
7391 assumption that long is wider than int.
7392 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
7393 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
7394 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
7395 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
7397 P1976R2 Fixed-size span construction from dynamic range
7398 * include/std/span (__cpp_lib_span): Update value.
7399 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
7401 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
7403 (span::first<Count>(), span::last<Count>()): Use explicit type in
7405 (as_bytes, as_writable_bytes): Likewise.
7406 * include/std/version (__cpp_lib_span): Update value.
7407 * testsuite/23_containers/span/1.cc: Check new value.
7408 * testsuite/23_containers/span/2.cc: Check new value.
7409 * testsuite/23_containers/span/explicit.cc: New test.
7411 * include/std/span (span::__is_compatible_array): Simplify alias
7412 template by using requires-clause.
7413 (span::__is_compatible_ref): New alias template for constraining
7415 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
7416 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
7417 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
7418 redundant parentheses.
7419 (span(R&&)): Add missing constraints.
7421 * include/std/span (span): Reorder members and rename template
7422 parameters to match declarations in the C++2a working paper.
7424 P2116R0 Remove tuple-like protocol support from fixed-extent span
7425 * include/std/span (get, tuple_size, tuple_element): Remove.
7426 * testsuite/23_containers/span/everything.cc: Remove checks for
7428 * testsuite/23_containers/span/get_neg.cc: Remove.
7429 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
7430 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
7431 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
7433 2020-02-17 Patrick Palka <ppalka@redhat.com>
7435 P2106R0 Alternative wording for GB315 and GB316
7436 * include/bits/ranges_algo.h (in_fun_result): New.
7437 (for_each_result, for_each_n_result): Change into an alias of
7439 (in_in_result): New.
7440 (mismatch_result): Change into an alias of in_in_result.
7441 (copy_if_result): Change into an alias of in_out_result.
7442 (swap_ranges_result): Change into an alias of in_in_result.
7443 (unary_transform_result): Change into an alias of in_out_result.
7444 (in_in_out_result): New.
7445 (binary_transform_result): Change into an alias of in_in_out_result.
7446 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
7447 remove_copy_result, unique_copy_result, reverse_copy_result,
7448 rotate_copy_result, partial_sort_copy_result): Change into an alias of
7450 (in_out_out_result): New.
7451 (partition_copy_result, merge_result): Change into an alias of
7453 (set_union_result, set_intersection_result): Change into an alias of
7455 (set_difference_result): Change into an alias of in_out_result.
7456 (set_symmetric_difference): Change into an alias of in_in_out_result.
7457 (min_max_result): New.
7458 (minmax_result, minmax_element_result): Change into an alias of
7460 (in_found_result): New.
7461 (next_permutation_result, prev_permutation_result): Change into an alias
7463 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
7464 Adjust following changes to next_permutation_result and
7465 prev_permutation_result.
7466 * include/bits/ranges_algobase.h (in_out_result): New.
7467 (copy_result, move_result, move_backward_result, copy_backward_result,
7468 copy_n_result): Change into an alias of in_out_result.
7469 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
7470 uninitialized_copy_n_result, uninitialized_move_result,
7471 uninitialized_move_n_result): Likewise.
7472 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
7473 structured bindings.
7474 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
7476 P1243R4 Rangify new algorithms
7477 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
7478 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
7479 * testsuite/25_algorithms/clamp/constrained.cc: New test.
7480 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
7481 * testsuite/25_algorithms/sample/constrained.cc: New test.
7483 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
7485 P1964R2 Wording for boolean-testable
7486 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
7487 (__adjacent_find_fn): Cast result of predicate to bool.
7488 * include/std/concepts (__boolean): Remove.
7489 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
7490 new helper concepts.
7491 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
7492 (predicate): Use __boolean_testable instead of boolean.
7493 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
7496 P1970R2 Consistency for size() functions: Add ranges::ssize
7497 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
7498 * testsuite/std/ranges/access/ssize.cc: New test.
7500 P1956R1 On the names of low-level bit manipulation functions
7501 * include/bits/hashtable_policy.h: Update comment.
7502 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
7503 (ispow2, ceil2, floor2, log2p1): Likewise.
7504 (__cpp_lib_int_pow2): Add feature test macro.
7505 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
7506 * include/std/memory (assume_aligned): Adjust use of ispow2.
7507 * include/std/version (__cpp_lib_int_pow2): Add.
7508 * libsupc++/new_opa.cc: Adjust use of __ispow2.
7509 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
7510 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
7511 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
7512 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
7513 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
7514 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
7515 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
7516 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
7517 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
7518 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
7519 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
7520 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
7522 * include/std/charconv: Add comment.
7524 PR libstdc++/92546 (partial)
7525 * include/bits/random.h (uniform_random_bit_generator): Move definition
7526 to <bits/uniform_int_dist.h>.
7527 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
7529 * include/bits/ranges_algobase.h: Do not include <cmath>.
7530 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
7532 * include/std/ranges: Do not include <limits>.
7533 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
7535 PR libstdc++/92546 (partial)
7536 * include/Makefile.am: Add new header.
7537 * include/Makefile.in: Regenerate.
7538 * include/bits/int_limits.h: New header.
7539 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
7540 numeric_limits with __detail::__int_limits.
7541 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
7542 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
7544 * include/std/charconv (__to_chars_8, __from_chars_binary)
7545 (__from_chars_alpha_to_num, from_chars): Likewise.
7546 * include/std/memory_resource (polymorphic_allocator::allocate)
7547 (polymorphic_allocator::allocate_object): Likewise.
7548 * include/std/string_view (basic_string_view::_S_compare): Likewise.
7549 * include/std/utility (in_range): Likewise.
7550 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
7551 extra error about incomplete type __int_limits<bool>.
7552 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
7553 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
7554 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
7555 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
7556 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
7557 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
7558 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
7559 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
7560 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
7561 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
7562 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
7563 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
7565 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
7566 value for partial_ordering::unordered.
7568 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
7569 const-qualified expression variations.
7570 * include/std/concepts (copyable): Likewise.
7572 * include/std/type_traits (__is_standard_integer): New helper trait.
7573 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
7574 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
7575 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
7576 * testsuite/20_util/integer_comparisons/1.cc: New test.
7577 * testsuite/20_util/integer_comparisons/2.cc: New test.
7578 * testsuite/20_util/integer_comparisons/equal.cc: New test.
7579 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
7580 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
7581 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
7582 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
7583 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
7584 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
7585 * testsuite/20_util/integer_comparisons/less.cc: New test.
7586 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
7587 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
7588 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
7589 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
7590 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
7592 2020-02-16 Patrick Palka <ppalka@redhat.com>
7594 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
7595 Move code after an early exit constexpr if to under an else branch.
7596 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
7598 2020-02-15 Patrick Palka <ppalka@redhat.com>
7600 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
7601 * include/bits/ranges_algobase.h: Likewise.
7602 * include/bits/ranges_uninitialized.h: Likewise.
7604 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
7605 binary_search, copy_if, count, count_if, equal_range, find, find_end,
7606 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
7607 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
7608 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
7609 lower_bound, make_heap, max, max_element, merge, min, min_element,
7610 minmax, minmax_element, mismatch, next_permutation, none_of,
7611 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
7612 partition_point, pop_heap, prev_permutation, push_heap, remove,
7613 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
7614 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
7615 search, search_n, set_difference, set_intersection,
7616 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
7617 stable_partition, stable_sort, swap_ranges, transform, unique,
7618 unique_copy, upper_bound): Convert into function objects.
7619 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
7620 fill, move_backward, copy_backward): Likewise.
7621 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
7622 uninitialized_default_construct_n, uninitialized_value_construct,
7623 uninitialized_value_construct_n, uninitialized_copy,
7624 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
7625 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
7626 destroy, destroy_n): Likewise.
7628 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
7629 (ranges::find_end): ... here.
7630 (ranges::__lexicographical_compare): Fold into ...
7631 (ranges::lexicographical_compare): ... here.
7632 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
7633 (ranges::equal): ... here.
7635 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
7637 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
7638 * include/std/deque: Likewise.
7639 * include/std/forward_list: Likewise.
7640 * include/std/list: Likewise.
7641 * include/std/string: Likewise.
7642 * include/std/vector: Likewise.
7643 * include/std/version: Likewise.
7644 * testsuite/23_containers/deque/erasure.cc: Test for new value.
7645 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
7646 * testsuite/23_containers/list/erasure.cc: Likewise.
7647 * testsuite/23_containers/map/erasure.cc: Likewise.
7648 * testsuite/23_containers/set/erasure.cc: Likewise.
7649 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
7650 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
7651 * testsuite/23_containers/vector/erasure.cc: Likewise.
7653 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
7655 * include/bits/random.h (uniform_random_bit_generator): Require min()
7656 and max() to be constant expressions and min() to be less than max().
7657 * testsuite/26_numerics/random/concept.cc: Check additional cases.
7658 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
7660 2020-02-13 Patrick Palka <ppalka@redhat.com>
7662 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
7663 * include/Makefile.in: Regenerate.
7664 * include/bits/ranges_uninitialized.h: New header.
7665 * include/std/memory: Include it.
7666 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
7668 * .../uninitialized_copy/constrained.cc: New test.
7669 * .../uninitialized_default_construct/constrained.cc: New test.
7670 * .../uninitialized_fill/constrained.cc: New test.
7671 * .../uninitialized_move/constrained.cc: New test.
7672 * .../uninitialized_value_construct/constrained.cc: New test.
7674 * include/Makefile.am: Add bits/ranges_algobase.h
7675 * include/Makefile.in: Regenerate.
7676 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
7678 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
7679 __detail::__is_move_iterator, copy_result, move_result,
7680 __equal, equal, copy_result, move_result, move_backward_result,
7681 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
7682 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
7683 fill): Split out into ...
7684 * bits/range_algobase.h: ... this new header.
7686 2020-02-12 Patrick Palka <ppalka@redhat.com>
7688 LWG 3389 and LWG 3390
7689 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
7690 constructing the move_iterator with __i.
7691 (counted_iterator::counted_iterator): Use std::move when initializing
7693 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
7694 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
7696 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
7701 * configure: Regenerated.
7703 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
7705 * include/bits/hashtable.h
7706 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
7707 missing std namespace qualification to forward call.
7709 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
7711 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
7713 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
7715 * include/std/ranges: Fix non-ASCII characters in comment.
7717 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
7718 equality comparison to be valid and return bool.
7719 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
7720 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
7721 type with ambiguous conversion to fundamental types.
7722 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
7724 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
7726 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
7728 (readable_traits): Rename to indirectly_readable_traits.
7729 (readable): Rename to indirectly_readable.
7730 (writable): Rename to indirectly_writable.
7731 (__detail::__iter_exchange_move): Do not use remove_reference_t.
7732 (indirectly_swappable): Adjust requires expression parameter types.
7734 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
7735 (ranges::replace_if, ranges::generate_n, ranges::generate)
7736 (ranges::remove): Use new name for writable.
7737 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
7738 Use new name for readable.
7739 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
7740 new name for readable_traits.
7741 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
7742 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
7743 new definition of indirectly_readable.
7745 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
7746 to take parameters of common_iterator, instead of the common_iterator
7747 type itself. Fix argument for __common_iter_has_arrow constraint.
7748 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
7750 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
7752 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
7754 (basic_istream_view::_Iterator::operator++()): Add missing return.
7756 2020-02-07 Patrick Palka <ppalka@redhat.com>
7758 * include/bits/ranges_algo.h: Remove extraneous &&.
7760 * include/std/ranges (ranges::__detail::__stream_extractable,
7761 ranges::basic_istream_view, ranges::istream_view): Define.
7762 * testsuite/std/ranges/istream_view: New test.
7764 Implement C++20 range adaptors
7765 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
7766 (subrange::_S_store_size): Mark as const instead of constexpr to
7767 avoid what seems to be a bug in GCC.
7768 (__detail::__box): Give it defaulted copy and move constructors.
7769 (ranges::views::_Single::operator()): Mark constexpr.
7770 (ranges::views::_Iota::operator()): Mark constexpr.
7771 (__detail::Empty): Define.
7772 (ranges::views::__closure::_RangeAdaptor,
7773 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
7774 ranges::views::all, ranges::__detail::find_if,
7775 ranges::__detail::find_if_not, ranges::__detail::mismatch,
7776 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
7777 ranges::views::transform, take_view, ranges::views::take,
7778 take_while_view, ranges::views::take_while, drop_view,
7779 ranges::views::drop, join_view, ranges::views::join,
7780 __detail::require_constant, __detail::tiny_range, split_view,
7781 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
7782 common_view, ranges::views::common, reverse_view,
7783 ranges::views::reverse,
7784 ranges::views::__detail::__is_reversible_subrange,
7785 ranges::views::__detail::__is_reverse_view, reverse_view,
7786 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
7787 ranges::views::elements, ranges::views::keys, ranges::views::values):
7789 (views): Alias for ranges::views.
7790 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
7791 tuple_element<1, ranges::subrange>): New partial specializations.
7792 * testsuite/std/ranges/adaptors/all.cc: New test.
7793 * testsuite/std/ranges/adaptors/common.cc: Likewise.
7794 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
7795 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
7796 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
7797 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
7798 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
7799 * testsuite/std/ranges/adaptors/join.cc: Likewise.
7800 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
7801 * testsuite/std/ranges/adaptors/split.cc: Likewise.
7802 * testsuite/std/ranges/adaptors/take.cc: Likewise.
7803 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
7804 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
7806 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
7808 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
7809 type of enumerations and comparison category types.
7810 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
7811 (__cmp_cat::_Ncmp::unordered): Change value to 2.
7812 (partial_ordering::_M_value, weak_ordering::_M_value)
7813 (strong_ordering::_M_value): Change type to __cmp_cat::type.
7814 (partial_ordering::_M_is_ordered): Remove data member.
7815 (partial_ordering): Use second bit of _M_value for unordered. Adjust
7816 comparison operators.
7817 (weak_ordering::operator partial_ordering): Simplify to remove
7819 (operator<=>(unspecified, weak_ordering)): Likewise.
7820 (strong_ordering::operator partial_ordering): Likewise.
7821 (strong_ordering::operator weak_ordering): Likewise.
7822 (operator<=>(unspecified, strong_ordering)): Likewise.
7823 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
7824 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
7825 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
7827 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
7828 __cpp_lib_three_way_comparison macro and use deduced return type for
7830 * testsuite/std/ranges/iota/iterator.cc: New test.
7832 2020-02-07 Patrick Palka <ppalka@redhat.com>
7833 Jonathan Wakely <jwakely@redhat.com>
7835 Implement C++20 constrained algorithms
7836 * include/Makefile.am: Add new header.
7837 * include/Makefile.in: Regenerate.
7838 * include/std/algorithm: Include <bits/ranges_algo.h>.
7839 * include/bits/ranges_algo.h: New file.
7840 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
7841 * testsuite/25_algorithms/all_of/constrained.cc: New test.
7842 * testsuite/25_algorithms/any_of/constrained.cc: New test.
7843 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
7844 * testsuite/25_algorithms/copy/constrained.cc: New test.
7845 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
7846 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
7847 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
7848 * testsuite/25_algorithms/count/constrained.cc: New test.
7849 * testsuite/25_algorithms/count_if/constrained.cc: New test.
7850 * testsuite/25_algorithms/equal/constrained.cc: New test.
7851 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
7852 * testsuite/25_algorithms/fill/constrained.cc: New test.
7853 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
7854 * testsuite/25_algorithms/find/constrained.cc: New test.
7855 * testsuite/25_algorithms/find_end/constrained.cc: New test.
7856 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
7857 * testsuite/25_algorithms/find_if/constrained.cc: New test.
7858 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
7859 * testsuite/25_algorithms/for_each/constrained.cc: New test.
7860 * testsuite/25_algorithms/generate/constrained.cc: New test.
7861 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
7862 * testsuite/25_algorithms/heap/constrained.cc: New test.
7863 * testsuite/25_algorithms/includes/constrained.cc: New test.
7864 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
7865 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
7866 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
7867 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
7868 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
7869 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
7871 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
7872 * testsuite/25_algorithms/max/constrained.cc: New test.
7873 * testsuite/25_algorithms/max_element/constrained.cc: New test.
7874 * testsuite/25_algorithms/merge/constrained.cc: New test.
7875 * testsuite/25_algorithms/min/constrained.cc: New test.
7876 * testsuite/25_algorithms/min_element/constrained.cc: New test.
7877 * testsuite/25_algorithms/minmax/constrained.cc: New test.
7878 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
7879 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
7880 * testsuite/25_algorithms/move/constrained.cc: New test.
7881 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
7882 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
7883 * testsuite/25_algorithms/none_of/constrained.cc: New test.
7884 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
7885 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
7886 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
7887 * testsuite/25_algorithms/partition/constrained.cc: New test.
7888 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
7889 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
7890 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
7891 * testsuite/25_algorithms/remove/constrained.cc: New test.
7892 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
7893 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
7894 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
7895 * testsuite/25_algorithms/replace/constrained.cc: New test.
7896 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
7897 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
7898 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
7899 * testsuite/25_algorithms/reverse/constrained.cc: New test.
7900 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
7901 * testsuite/25_algorithms/rotate/constrained.cc: New test.
7902 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
7903 * testsuite/25_algorithms/search/constrained.cc: New test.
7904 * testsuite/25_algorithms/search_n/constrained.cc: New test.
7905 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
7906 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
7907 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
7909 * testsuite/25_algorithms/set_union/constrained.cc: New test.
7910 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
7911 * testsuite/25_algorithms/sort/constrained.cc: New test.
7912 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
7913 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
7914 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
7915 * testsuite/25_algorithms/transform/constrained.cc: New test.
7916 * testsuite/25_algorithms/unique/constrained.cc: New test.
7917 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
7918 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
7920 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
7922 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
7923 number in comment. Fix indentation.
7925 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
7926 redundant _GLIBCXX20_CONSTEXPR.
7928 * include/std/ranges (viewable_range): Replace decay_t with
7929 remove_cvref_t (LWG 3375).
7931 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
7933 * include/bits/iterator_concepts.h (iter_reference_t)
7934 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
7935 Remove workarounds for PR c++/67704.
7936 * testsuite/24_iterators/aliases.cc: New test.
7938 2020-02-05 Patrick Palka <ppalka@redhat.com>
7940 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
7941 when initializing _M_current.
7942 (move_iterator::base): Split into two overloads differing in
7943 ref-qualifiers as in P1207R4 for C++20.
7945 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
7947 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
7951 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
7952 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
7953 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
7955 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
7957 * configure: Regenerate.
7959 2020-01-31 Patrick Palka <ppalka@redhat.com>
7961 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
7962 test_range::end() returns the same type as test_range::begin().
7963 * testsuite/24_iterators/range_operations/next.cc: Likewise.
7964 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
7965 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
7966 Always return a sentinel<I>.
7968 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
7971 * include/std/stop_token (stop_token::stop_possible()): Call new
7972 _M_stop_possible() function.
7973 (stop_token::stop_requested()): Do not use stop_possible().
7974 (stop_token::binary_semaphore): New class, as temporary stand-in for
7975 std::binary_semaphore.
7976 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
7977 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
7978 New data members for symchronization with stop_callback destruction.
7979 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
7980 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
7982 (stop_token::_Stop_cb::_M_run): New member function.
7983 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
7985 (stop_token::_Stop_state::_M_owners): New data member to track
7986 reference count for ownership.
7987 (stop_token::_Stop_state::_M_value): New data member combining a
7988 spinlock, the stop requested flag, and the reference count for
7989 associated stop_source objects.
7990 (stop_token::_Stop_state::_M_requester): New data member for
7991 synchronization with stop_callback destruction.
7992 (stop_token::_Stop_state::_M_stop_possible()): New member function.
7993 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
7995 (stop_token::_Stop_state::_M_add_owner)
7996 (stop_token::_Stop_state::_M_release_ownership)
7997 (stop_token::_Stop_state::_M_add_ssrc)
7998 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
7999 updating reference counts.
8000 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
8001 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
8002 (stop_token::_Stop_state::_M_try_lock)
8003 (stop_token::_Stop_state::_M_try_lock_and_stop)
8004 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
8006 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
8007 read and update state. Release lock while running callbacks. Use new
8008 data members to synchronize with callback destruction.
8009 (stop_token::_Stop_state::_M_remove_callback): Likewise.
8010 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
8011 to read and update state.
8012 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
8013 replacing shared_ptr.
8014 (stop_source::stop_source(const stop_source&)): Update reference count.
8015 (stop_source::operator=(const stop_source&)): Likewise.
8016 (stop_source::~stop_source()): Likewise.
8017 (stop_source::stop_source(stop_source&&)): Define as defaulted.
8018 (stop_source::operator=(stop_source&&)): Establish postcondition on
8020 (stop_callback): Enforce preconditions on template parameter. Replace
8021 base class with data member of new _Cb_impl type.
8022 (stop_callback::stop_callback(const stop_token&, Cb&&))
8023 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
8024 (stop_callback::_Cb_impl): New type wrapping _Callback member and
8025 defining the _S_execute member function.
8026 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
8028 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
8029 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
8030 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
8032 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
8034 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
8035 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
8036 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
8039 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
8040 three_way_comparable_with.
8041 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
8042 (compare_three_way::operator()): Remove redundant constraint from
8044 (__detail::_Synth3way::operator()): Use three_way_comparable_with
8045 instead of workaround.
8046 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
8047 output due to simplified constraints on compare_three_way::operator().
8050 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
8051 * testsuite/18_support/comparisons/object/93479.cc: New test.
8053 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
8054 returns the same type as test_range::begin(). Add comments.
8055 * testsuite/std/ranges/access/rbegin.cc: Likewise.
8056 * testsuite/std/ranges/access/rend.cc: Likewise.
8057 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
8058 test_range is the same as its iterator type.
8059 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
8060 operator- overloads to satisfy sized_sentinel_for when the iterator
8061 satisfies random_access_iterator.
8063 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
8066 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
8067 static assertion to object types.
8070 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
8071 clock_gettime instead of explicit glibc version check.
8072 * configure: Regenerate.
8074 2020-01-28 Martin Liska <mliska@suse.cz>
8077 * include/std/atomic: Fix typo.
8078 * include/std/optional: Likewise.
8080 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
8082 * configure: Regenerate.
8084 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
8087 * include/std/span (span): Fix deduction guide.
8088 * testsuite/23_containers/span/deduction.cc: New test.
8090 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
8092 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
8093 (__cmp_cat::_Ord::equivalent): Add enumerator.
8094 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
8096 (partial_ordering, weak_ordering, strong_ordering): Remove
8097 constructors taking __cmp_cat::_Eq parameters. Use renamed
8100 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
8102 * acinclude.m4: Handle `--with-toolexeclibdir='.
8103 * Makefile.in: Regenerate.
8104 * aclocal.m4: Regenerate.
8105 * configure: Regenerate.
8106 * doc/Makefile.in: Regenerate.
8107 * include/Makefile.in: Regenerate.
8108 * libsupc++/Makefile.in: Regenerate.
8109 * po/Makefile.in: Regenerate.
8110 * python/Makefile.in: Regenerate.
8111 * src/Makefile.in: Regenerate.
8112 * src/c++11/Makefile.in: Regenerate.
8113 * src/c++17/Makefile.in: Regenerate.
8114 * src/c++98/Makefile.in: Regenerate.
8115 * src/filesystem/Makefile.in: Regenerate.
8116 * testsuite/Makefile.in: Regenerate.
8118 2020-01-23 Alexandre Oliva <oliva@adacore.com>
8120 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
8121 * configure: Rebuild.
8123 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
8125 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
8128 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
8130 * include/Makefile.in: Regenerate.
8132 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
8134 * doc/xml/faq.xml: Fix grammar.
8135 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
8136 * doc/xml/manual/spine.xml: Update copyright years.
8137 * doc/html/*: Regenerate.
8139 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
8141 * doc/xml/faq.xml: Update for SVN -> Git transition.
8142 * doc/xml/manual/appendix_contributing.xml: Likewise.
8143 * doc/xml/manual/status_cxx1998.xml: Likewise.
8144 * doc/xml/manual/status_cxx2011.xml: Likewise.
8145 * doc/xml/manual/status_cxx2014.xml: Likewise.
8146 * doc/xml/manual/status_cxx2017.xml: Likewise.
8147 * doc/xml/manual/status_cxx2020.xml: Likewise.
8148 * doc/xml/manual/status_cxxtr1.xml: Likewise.
8149 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
8151 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
8153 * include/Makefile.am: Add coroutine to the std set.
8154 * include/Makefile.in: Regenerated.
8155 * include/std/coroutine: New file.
8157 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
8160 * include/bits/c++config: Only do PSTL config when the header is
8161 present, to fix freestanding.
8162 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
8163 functions if they were detected by configure.
8165 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
8166 Matthew Bauer <mjbauer95@gmail.com>
8167 Jonathan Wakely <jwakely@redhat.com>
8169 PR bootstrap/64271 (partial)
8170 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
8172 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
8173 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
8174 definitions with NetBSD upstream.
8175 (ctype_base::blank): Use _CTYPE_BL.
8176 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
8178 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
8179 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
8180 parameters to unsigned char.
8181 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
8183 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
8186 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
8187 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
8188 (_Equality_base): Remove.
8189 (_Equality<>::_M_equal): Review implementation. Use
8190 std::is_permutation.
8191 * testsuite/23_containers/unordered_multiset/operators/1.cc
8192 (Hash, Equal, test02, test03): New.
8193 * testsuite/23_containers/unordered_set/operators/1.cc
8194 (Hash, Equal, test02, test03): New.
8196 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
8199 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
8200 Move here from <bits/range_access.h> and define using __int128 when
8202 (__is_integer_like, __is_signed_integer_like): Move here from
8203 <bits/range_access.h>.
8204 (weakly_incrementable): Use __is_signed_integer_like.
8205 * include/bits/range_access.h (__max_diff_type, __max_size_type)
8206 (__is_integer_like, __is_signed_integer_like): Move to
8207 <bits/iterator_concepts.h>.
8208 (__make_unsigned_like_t): Move here from <ranges>.
8209 * include/std/ranges (__make_unsigned_like_t): Move to
8210 <bits/range_access.h>.
8211 (iota_view): Replace using-directive with using-declarations.
8212 * testsuite/std/ranges/iota/93267.cc: New test.
8213 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
8215 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
8218 * include/bits/fs_path.h (path::generic_string<C,A>)
8219 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
8220 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
8221 root-dir is converted to forward slash in generic pathname.
8222 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
8223 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
8226 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
8228 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
8229 (__atomic_float): Add default member initializer for C++20.
8230 * include/std/atomic (atomic): Likewise.
8231 (atomic::atomic()): Remove noexcept-specifier on default constructor.
8232 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
8233 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
8235 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
8236 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
8237 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
8238 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
8239 expected result for is_trivially_default_constructible.
8240 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
8241 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
8242 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
8243 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
8244 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
8245 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
8246 expected results for is_trivially_default_constructible.
8247 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
8250 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
8252 * testsuite/util/testsuite_iterators.h: Improve comment.
8254 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
8255 initialization syntax.
8258 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
8259 of base class independent of __cplusplus value.
8260 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
8261 type defined in the base class
8262 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
8263 * testsuite/24_iterators/istreambuf_iterator/requirements/
8264 base_classes.cc: Adjust expected base class for C++98.
8266 2020-01-09 Olivier Hainque <hainque@adacore.com>
8268 * doc/xml/manual/appendix_contributing.xml: Document _C2
8269 as a reserved identifier, by VxWorks.
8270 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
8271 * include/bits/stl_multimap.h: Likewise.
8273 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
8275 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
8276 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
8277 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
8278 partial specialization to disambiguate the two constrained
8281 * include/experimental/type_traits (experimental::is_pod_v): Disable
8282 -Wdeprecated-declarations warnings around reference to std::is_pod.
8283 * include/std/type_traits (is_pod_v): Likewise.
8284 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
8285 is_standard_layout and is_trivial. Do not check is_pod for C++20.
8286 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
8287 Add -Wno-deprecated for C++20.
8288 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
8289 * testsuite/20_util/is_pod/value.cc: Likewise.
8290 * testsuite/experimental/type_traits/value.cc: Likewise.
8292 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
8294 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
8295 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
8296 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
8298 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
8301 * include/bits/random.h (operator>>): Check stream operation succeeds.
8302 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
8304 (operator>>): Remove redundant __istream_type typedefs. Check stream
8306 (__extract_params): New function to fill a vector from a stream.
8307 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
8310 * config/abi/pre/gnu.ver: Add new exports.
8311 * include/std/memory_resource (memory_resource::~memory_resource()):
8312 Do not define inline.
8313 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
8314 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
8316 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
8317 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
8319 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
8322 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
8324 (_Hashtable<>::__fwd_value_for): New.
8325 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
8327 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
8328 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
8329 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
8331 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
8332 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
8334 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
8336 * testsuite/23_containers/unordered_set/92124.cc: New.
8338 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
8341 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
8342 detailed error reporting for remove_all. Check result of recursive
8343 call before incrementing iterator.
8344 (remove_all(const path&), remove_all(const path&, error_code&)): Use
8346 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
8347 result of recursive call before incrementing iterator.
8348 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
8349 are reported correctly.
8350 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
8352 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
8354 * include/std/condition_variable
8355 (condition_variable_any::wait_on): Rename to match current draft
8357 (condition_variable_any::wait_on_until): Likewise.
8358 (condition_variable_any::wait_on_for): Likewise.
8359 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
8360 Adjust tests to account for renamed methods.
8362 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
8365 * include/bits/stl_tree.h
8366 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
8367 std::move_if_noexcept by std::move.
8368 * testsuite/23_containers/map/92124.cc: New.
8369 * testsuite/23_containers/set/92124.cc: New.
8371 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
8373 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
8374 (stop_source): Likewise (LWG 3362).
8375 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
8378 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
8379 (lexicographical_compare_three_way): Do not depend on
8381 * include/std/version (__cpp_lib_three_way_comparison): Only define
8382 when __cpp_lib_concepts is defined.
8383 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
8385 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
8387 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
8388 Only define four-argument overload when __cpp_lib_concepts is defined.
8390 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
8392 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
8394 2020-01-01 Jakub Jelinek <jakub@redhat.com>
8396 Update copyright years.
8398 Copyright (C) 2020 Free Software Foundation, Inc.
8400 Copying and distribution of this file, with or without modification,
8401 are permitted in any medium without royalty provided the copyright
8402 notice and this notice are preserved.