1 2020-12-17 Jonathan Wakely <jwakely@redhat.com>
3 * config/os/djgpp/error_constants.h: Test POSIX errno macros
4 directly, instead of corresponding _GLIBCXX_HAVE_EXXX macros.
5 * config/os/mingw32-w64/error_constants.h: Likewise.
6 * config/os/mingw32/error_constants.h: Likewise.
8 2020-12-17 Jonathan Wakely <jwakely@redhat.com>
10 * testsuite/lib/libstdc++.exp (check_v3_target_gthreads_timed):
11 Fix condition for _GTHREAD_USE_MUTEX_TIMEDLOCK test.
13 2020-12-17 Jonathan Wakely <jwakely@redhat.com>
15 * src/c++11/mutex.cc (std::once_flag::_M_finish): Add
16 maybe_unused attribute to variable used in assertion.
18 2020-12-17 Jonathan Wakely <jwakely@redhat.com>
21 * include/bits/semaphore_base.h: Fix preprocessor condition.
23 2020-12-17 Jonathan Wakely <jwakely@redhat.com>
25 * include/bits/std_thread.h (hash<thread::id>): Move here,
27 * include/std/thread (hash<thread::id>): ... here.
29 2020-12-17 Jonathan Wakely <jwakely@redhat.com>
31 * config.h.in: Regenerate.
32 * configure: Regenerate.
34 2020-12-16 Jonathan Wakely <jwakely@redhat.com>
36 * Makefile.in: Regenerate.
37 * config.h.in: Regenerate.
38 * config/abi/pre/gnu.ver: Make patterns less greedy.
39 * config/os/gnu-linux/ldbl-ieee128-extra.ver: New file with patterns
40 for IEEE128 long double symbols.
41 * configure: Regenerate.
42 * configure.ac: Enable alternative 128-bit long double format on
44 * doc/Makefile.in: Regenerate.
45 * fragment.am: Regenerate.
46 * include/Makefile.am: Set _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT.
47 * include/Makefile.in: Regenerate.
48 * include/bits/c++config: Define inline namespace for new long
49 double symbols. Don't define _GLIBCXX_USE_FLOAT128 when it's the
50 same type as long double.
51 * include/bits/locale_classes.h [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT]
52 (locale::_Impl::_M_init_extra_ldbl128): Declare new member function.
53 * include/bits/locale_facets.h (_GLIBCXX_NUM_FACETS): Simplify by
54 only counting narrow character facets.
55 (_GLIBCXX_NUM_CXX11_FACETS): Likewise.
56 (_GLIBCXX_NUM_LBDL_ALT128_FACETS): New.
57 [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT] (num_get::__do_get): Define
58 vtable placeholder for __ibm128 long double type.
59 [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
60 (num_get::__do_get): Declare vtable placeholder for __ibm128 long
62 [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
63 (num_put::__do_put): Likewise.
64 * include/bits/locale_facets.tcc
65 [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
66 (num_get::__do_get, num_put::__do_put): Define.
67 * include/bits/locale_facets_nonio.h
68 [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
69 (money_get::__do_get): Declare vtable placeholder for __ibm128 long
71 [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
72 (money_put::__do_put): Likewise.
73 * include/bits/locale_facets_nonio.tcc
74 [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
75 (money_get::__do_get, money_put::__do_put): Define.
76 * include/ext/numeric_traits.h [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT]
77 (__numeric_traits<__ibm128>, __numeric_traits<__ieee128>): Define.
78 * libsupc++/Makefile.in: Regenerate.
79 * po/Makefile.in: Regenerate.
80 * python/Makefile.in: Regenerate.
81 * src/Makefile.am: Add compatibility-ldbl-alt128.cc and
82 compatibility-ldbl-alt128-cxx11.cc sources and recipes for objects.
83 * src/Makefile.in: Regenerate.
84 * src/c++11/Makefile.in: Regenerate.
85 * src/c++11/compatibility-ldbl-alt128-cxx11.cc: New file defining
86 symbols using the old 128-bit long double format, for the cxx11 ABI.
87 * src/c++11/compatibility-ldbl-alt128.cc: Likewise, for the
89 * src/c++11/compatibility-ldbl-facets-aliases.h: New header for long
90 double compat aliases.
91 * src/c++11/cow-locale_init.cc: Add comment.
92 * src/c++11/cxx11-locale-inst.cc: Define C and C_is_char
94 * src/c++11/cxx11-wlocale-inst.cc: Add sanity check. Include
95 locale-inst.cc directly, not via cxx11-locale-inst.cc.
96 * src/c++11/locale-inst-monetary.h: New header for monetary
97 category instantiations.
98 * src/c++11/locale-inst-numeric.h: New header for numeric category
100 * src/c++11/locale-inst.cc: Include new headers for monetary,
101 numeric, and long double definitions.
102 * src/c++11/wlocale-inst.cc: Remove long double compat aliases that
103 are defined in new header now.
104 * src/c++17/Makefile.am: Use -mabi=ibmlongdouble for
105 floating_from_chars.cc.
106 * src/c++17/Makefile.in: Regenerate.
107 * src/c++17/floating_from_chars.cc (from_chars_impl): Add
108 if-constexpr branch for __ieee128.
109 (from_chars): Overload for __ieee128.
110 * src/c++20/Makefile.in: Regenerate.
111 * src/c++98/Makefile.in: Regenerate.
112 * src/c++98/locale_init.cc (num_facets): Adjust calculation.
113 (locale::_Impl::_Impl(size_t)): Call _M_init_extra_ldbl128.
114 * src/c++98/localename.cc (num_facets): Adjust calculation.
115 (locale::_Impl::_Impl(const char*, size_t)): Call
116 _M_init_extra_ldbl128.
117 * src/filesystem/Makefile.in: Regenerate.
118 * testsuite/Makefile.in: Regenerate.
119 * testsuite/util/testsuite_abi.cc: Add new symbol versions.
120 Allow new symbols to be added to GLIBCXX_IEEE128_3.4.29 and
121 CXXABI_IEEE128_1.3.13 too.
122 * testsuite/26_numerics/complex/abi_tag.cc: Add u9__ieee128 to
123 regex matching expected symbols.
125 2020-12-16 Jonathan Wakely <jwakely@redhat.com>
127 * include/std/utility: Use __has_builtin without checking if
130 2020-12-16 Jonathan Wakely <jwakely@redhat.com>
132 * include/bits/c++config: Warn if __STRICT_ANSI__ state is
133 inconsistent with __GLIBCXX_TYPE_INT_N_0.
135 2020-12-16 Jonathan Wakely <jwakely@redhat.com>
138 * include/ext/throw_allocator.h: Use __has_builtin to check for
139 __builtin_sprintf support, and use std::sprtinf if necessary.
141 2020-12-16 Jonathan Wakely <jwakely@redhat.com>
144 * include/experimental/random: Only define contents for C++14
146 * include/experimental/source_location: Likewise.
147 * include/experimental/utility: Likewise.
148 * testsuite/experimental/feat-lib-fund.cc: Include all LFTS
149 headers that are present. Allow test to run for all modes.
151 2020-12-16 Jonathan Wakely <jwakely@redhat.com>
154 * testsuite/performance/29_atomics/atomic_flag.cc: New test.
156 2020-12-16 Jonathan Wakely <jwakely@redhat.com>
159 * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Remove.
160 * configure.ac: Regenerate.
161 * config/os/generic/error_constants.h: Test POSIX errno macros
162 directly, instead of corresponding _GLIBCXX_HAVE_EXXX macros.
163 * testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc:
165 * testsuite/19_diagnostics/headers/system_error/93151.cc: New
168 2020-12-15 Jonathan Wakely <jwakely@redhat.com>
171 2020-12-15 Jonathan Wakely <jwakely@redhat.com>
174 * include/std/iostream (__ioinit): Add init_priority attribute.
176 2020-12-15 Keith Packard <keithp@keithp.com>
178 * acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Allow "stdio_pure"
179 option and define _GLIBCXX_USE_PURE_STDIO when it is used. Also
180 add "stdio_posix" option as an alias for "stdio".
181 * config/io/basic_file_stdio.cc [_GLIBCXX_USE_PURE_STDIO]: Only
182 use defined stdio entry points for all I/O operations, without
183 direct calls to underlying POSIX functions.
184 * config.h.in: Regenerate.
185 * configure: Regenerate.
187 2020-12-15 Ville Voutilainen <ville.voutilainen@gmail.com>
189 * testsuite/27_io/rvalue_streams.cc: Run the extraction to a char*
190 for C++17 and lower only.
192 2020-12-15 Jonathan Wakely <jwakely@redhat.com>
194 * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
195 Add dg-timeout-factor directive.
196 * testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc:
197 Increase timeout factor from 2.0 to 3.0.
198 * testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc:
200 * testsuite/lib/libstdc++.exp (check_effective_target_debug-mode):
201 Define "debug-mode" as an effective-target keyword.
203 2020-12-15 Jonathan Wakely <jwakely@redhat.com>
205 * include/bits/c++config (__glibcxx_assert_1): Define as empty
208 2020-12-15 Marius Hillenbrand <mhillen@linux.ibm.com>
210 * testsuite/22_locale/locale/cons/5.cc: Add missing directives
211 for required locales.
213 2020-12-15 Jonathan Wakely <jwakely@redhat.com>
215 * include/bits/iterator_concepts.h (incrementable_traits<Tp>):
216 Remove workaround for PR c++/78173.
218 2020-12-15 Vladimir Vishnevsky <vv.os.swe@gmail.com>
220 * configure.ac: Skip AC_LIBTOOL_DLOPEN check if avr-libc is used.
221 * configure: Regenerate.
223 2020-12-15 Jonathan Wakely <jwakely@redhat.com>
226 * include/std/iostream (__ioinit): Add init_priority attribute.
228 2020-12-15 Gerald Pfeifer <gerald@pfeifer.com>
230 * doc/xml/manual/codecvt.xml: Update link to Unicode-HOWTO.
231 * doc/html/manual/facets.html: Regenerate.
233 2020-12-14 François Dumont <fdumont@gcc.gnu.org>
235 * testsuite/23_containers/array/debug/back1_neg.cc: Target c++14 because assertion
236 is disabled in C++11.
237 * testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
238 * testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc: Likewise.
240 2020-12-14 Martin Sebor <msebor@redhat.com>
242 * testsuite/ext/vstring/requirements/exception/basic.cc: Suppress
243 a false positive warning.
244 * testsuite/ext/vstring/requirements/exception/propagation_consistent.cc:
247 2020-12-14 François Dumont <fdumont@gcc.gnu.org>
249 * testsuite/23_containers/array/debug/back2_neg.cc: target c++14 because assertion
250 for constexpr is disabled in C++11.
251 * testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
252 * testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc: Likewise.
253 * testsuite/23_containers/vector/debug/multithreaded_swap.cc: Include <memory>
256 2020-12-12 François Dumont <fdumont@gcc.gnu.org>
258 * include/debug/macros.h (__glibcxx_check_can_increment_range): Replace
259 _GLIBCXX_DEBUG_VERIFY_COND_AT usage with _GLIBCXX_DEBUG_VERIFY_AT_F.
260 (__glibcxx_check_can_decrement_range): Likewise.
261 * testsuite/25_algorithms/copy_backward/constexpr.cc (test03): New.
262 * testsuite/25_algorithms/copy/debug/constexpr_neg.cc: New test.
263 * testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc: New test.
264 * testsuite/25_algorithms/equal/constexpr_neg.cc: New test.
265 * testsuite/25_algorithms/equal/debug/constexpr_neg.cc: New test.
267 2020-12-10 Jonathan Wakely <jwakely@redhat.com>
270 * include/std/bit (__countl_one, __countr_one): Remove redundant
273 2020-12-09 Jonathan Wakely <jwakely@redhat.com>
275 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Define NO_SLEEP
276 if none of nanosleep, sleep and Sleep is available.
277 * config.h.in: Regenerate.
278 * configure: Regenerate.
279 * include/std/thread [_GLIBCXX_NO_SLEEP] (__sleep_for): Do
281 [_GLIBCXX_NO_SLEEP] (sleep_for, sleep_until): Do not
283 * src/c++11/thread.cc [_GLIBCXX_NO_SLEEP] (__sleep_for): Do
286 2020-12-08 Jason Merrill <jason@redhat.com>
289 * testsuite/18_support/comparisons/algorithms/partial_order.cc:
290 One more line needs to use VERIFY instead of static_assert.
292 2020-12-08 Jonathan Wakely <jwakely@redhat.com>
294 * doc/xml/manual/appendix_contributing.xml: Use consistent
296 * doc/html/manual/source_code_style.html: Regenerate.
298 2020-12-05 Iain Sandoe <iain@sandoe.co.uk>
301 * configure: Regenerate.
303 2020-12-04 Jakub Jelinek <jakub@redhat.com>
306 * testsuite/18_support/source_location/1.cc (main): Adjust for
307 __builtin_source_location using __PRETTY_FUNCTION__-like names instead
309 * testsuite/18_support/source_location/consteval.cc (main): Likewise.
311 2020-12-03 Martin Sebor <msebor@redhat.com>
313 * testsuite/ext/vstring/modifiers/clear/56166.cc: Suppress a false
316 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
318 * testsuite/26_numerics/bit/bit.cast/bit_cast.cc: Remove stray
319 word from copy&paste.
320 * testsuite/26_numerics/bit/bit.cast/version.cc: Likewise.
322 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
324 * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
325 * doc/html/*: Regenerate.
327 2020-12-03 JeanHeyd Meneide <phdofthehouse@gmail.com>
329 * doc/doxygen/user.cfg.in (INPUT): Add <source_location>.
330 * include/Makefile.am: Add <source_location>.
331 * include/Makefile.in: Regenerate.
332 * include/std/version (__cpp_lib_source_location): Define.
333 * include/std/source_location: New file.
334 * testsuite/18_support/source_location/1.cc: New test.
335 * testsuite/18_support/source_location/consteval.cc: New test.
336 * testsuite/18_support/source_location/srcloc.h: New test.
337 * testsuite/18_support/source_location/version.cc: New test.
339 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
342 * include/std/bit (__cpp_lib_bit_cast, bit_cast): Define.
343 * include/std/version (__cpp_lib_bit_cast): Define.
344 * testsuite/26_numerics/bit/bit.cast/bit_cast.cc: New test.
345 * testsuite/26_numerics/bit/bit.cast/version.cc: New test.
347 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
349 * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt:
351 * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt:
354 2020-12-03 Jonathan Wakely <jwakely@redhat.com>
356 * include/std/array (array::operator[](size_t) const, array::front() const)
357 (array::back() const) [__cplusplus == 201103]: Disable
359 * testsuite/23_containers/array/element_access/constexpr_element_access.cc:
360 Check for correct values.
361 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
362 Adjust dg-error line numbers.
363 * testsuite/23_containers/array/debug/constexpr_c++11.cc: New test.
365 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
369 * python/libstdcxx/v6/printers.py (function_pointer_to_name):
370 New helper function to get the name of a function from its
372 (StdExpAnyPrinter.__init__): Use it.
374 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
376 * testsuite/lib/dg-options.exp (add_options_for_libatomic):
377 Replace powerpc-ibm-aix* and powerpc*-*-darwin* with check for
380 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
382 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Add
383 dg-timeout-factor for ilp32 targets.
384 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
387 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
389 * include/ext/rope (rope::_S_concat_char_iter)
390 (rope::_S_destr_concat_char_iter): Add allocator parameter.
391 (rope::push_back, rope::append, rope::insert, operator+):
393 * include/ext/ropeimpl.h (rope::_S_concat_char_iter)
394 (rope::_S_destr_concat_char_iter): Add allocator parameter
396 (_Rope_char_ref_proxy::operator=(_CharT)): Pass allocator.
398 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
400 * include/ext/rope: Fix indentation of access specifiers.
402 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
404 * include/bits/atomic_timed_wait.h: Use #if instead of #ifdef.
405 * include/bits/semaphore_base.h: Likewise.
406 * include/std/version: Remove trailing whitespace.
408 2020-12-02 Jonathan Wakely <jwakely@redhat.com>
410 * python/libstdcxx/v6/printers.py (StdExpPathPrinter): Store the
411 name of the type and pass it to the iterator.
412 (StdPathPrinter): Likewise.
413 * testsuite/libstdc++-prettyprinters/filesystem-ts.cc: New test.
415 2020-12-01 Thomas Rodgers <trodgers@redhat.com>
417 * include/bits/atomic_base.h: Replace usage of
418 _GLIBCXX_HAVE_ATOMIC_WAIT with __cpp_lib_atomic_wait.
419 * include/bits/atomic_timed_wait.h: Likewise.
420 * include/bits/atomic_wait.h: Define __cpp_lib_atomic_wait
422 * include/bits/semaphore_base.h: Replace usage of
423 _GLIBCXX_HAVE_ATOMIC_WAIT with __cpp_lib_atomic_wait.
424 * include/std/atomic: Likewise.
425 * include/std/latch: Likewise.
426 * include/std/semaphore: Likewise.
427 * include/std/version: Define __cpp_lib_atomic wait
428 feature test macro and replace usage of
429 _GLIBCXX_HAVE_ATOMIC_WAIT.
430 * testsuite/29_atomics/atomic/wait_notify/1.cc: New test.
431 * testsuite/29_atomics/atomic/wait_notify/2.cc: Likewise.
433 2020-12-01 Michael Weghorn <m.weghorn@posteo.de>
435 * python/libstdcxx/v6/printers.py (StdBitIteratorPrinter)
436 (StdBitReferencePrinter): Add pretty-printers for
437 _Bit_reference, _Bit_iterator and _Bit_const_iterator.
438 * testsuite/libstdc++-prettyprinters/simple.cc: Test
439 std::_Bit_reference, std::_Bit_iterator and
440 std::_Bit_const_iterator.
441 * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
443 2020-12-01 Jonathan Wakely <jwakely@redhat.com>
445 * include/bits/c++config (_GLIBCXX_HAS_BUILTIN): Define macro to
446 work around different implementations of __has_builtin.
447 (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
448 (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE)
449 (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED)
450 (_GLIBCXX_HAVE_BUILTIN_IS_SAME, _GLIBCXX_HAVE_BUILTIN_LAUNDER):
451 Define using _GLIBCXX_HAS_BUILTIN.
453 2020-12-01 Jonathan Wakely <jwakely@redhat.com>
455 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: Add
456 dg-timeout-factor directive.
457 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc:
460 2020-12-01 Jonathan Wakely <jwakely@redhat.com>
463 * testsuite/27_io/basic_syncbuf/sync_ops/1.cc: Add options for
466 2020-11-30 Jonathan Wakely <jwakely@redhat.com>
468 * doc/doxygen/user.cfg.in (INPUT): Add <latch> and <semaphore>.
470 2020-11-30 Jonathan Wakely <jwakely@redhat.com>
472 * testsuite/lib/libstdc++.exp (libstdc++_init): Reduce
473 default tool_timeout to 360.
475 2020-11-30 Jonathan Wakely <jwakely@redhat.com>
477 * testsuite/20_util/specialized_algorithms/pstl/*: Add
479 * testsuite/25_algorithms/pstl/*: Likewise.
480 * testsuite/26_numerics/pstl/*: Likewise.
481 * testsuite/28_regex/*: Likewise.
483 2020-11-29 John David Anglin <danglin@gcc.gnu.org>
485 * configure: Regenerate.
487 2020-11-27 Jonathan Wakely <jwakely@redhat.com>
489 * testsuite/lib/libstdc++.exp (v3_try_preprocess): Define
490 new proc to preprocess a chunk of code.
491 (v3_check_preprocessor_condition): Define new proc to test
492 a preprocessor condition depending on GCC or libstdc++ macros.
493 (check_v3_target_debug_mode, check_v3_target_normal_mode):
494 Use v3_try_preprocess.
495 (check_v3_target_normal_namespace)
496 (check_v3_target_parallel_mode, check_v3_target_cstdint)
497 (check_v3_target_cmath, check_v3_target_atomic_builtins)
498 (check_v3_target_gthreads, check_v3_target_gthreads_timed)
499 (check_v3_target_sleep, check_v3_target_sched_yield)
500 (check_v3_target_string_conversions, check_v3_target_swprintf)
501 (check_v3_target_binary_io, check_v3_target_nprocs): Use
502 v3_check_preprocessor_condition.
503 (check_effective_target_cxx11): Likewise.
504 (check_effective_target_random_device): Likewise.
505 (check_effective_target_tbb-backend): Likewise.
506 (check_effective_target_futex): Likewise.
507 (check_v3_target_little_endian) Call check_effective_target_le.
508 (check_effective_target_atomic-builtins): New proc to define
509 new effective-target keyword.
510 (check_effective_target_gthreads-timed): Likewise.
512 2020-11-27 Jonathan Wakely <jwakely@redhat.com>
514 * testsuite/27_io/filesystem/operations/absolute.cc: Avoid
515 -Wrange-loop-construct warning.
516 * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
517 * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
518 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
519 * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
520 * testsuite/27_io/filesystem/path/decompose/extension.cc:
522 * testsuite/27_io/filesystem/path/decompose/filename.cc:
524 * testsuite/27_io/filesystem/path/decompose/parent_path.cc:
526 * testsuite/27_io/filesystem/path/decompose/relative_path.cc:
528 * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
530 * testsuite/27_io/filesystem/path/decompose/root_path.cc:
532 * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
533 * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
535 * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
537 * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
539 * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
540 * testsuite/27_io/filesystem/path/nonmember/cmp.cc: Likewise.
541 * testsuite/27_io/filesystem/path/nonmember/cmp_c++20.cc:
543 * testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
545 * testsuite/27_io/filesystem/path/query/has_extension.cc:
547 * testsuite/27_io/filesystem/path/query/has_filename.cc:
549 * testsuite/27_io/filesystem/path/query/has_parent_path.cc:
551 * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
553 * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
555 * testsuite/27_io/filesystem/path/query/has_root_name.cc:
557 * testsuite/27_io/filesystem/path/query/has_root_path.cc:
559 * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
560 * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
561 * testsuite/experimental/filesystem/operations/absolute.cc:
563 * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
564 * testsuite/experimental/filesystem/path/compare/path.cc:
566 * testsuite/experimental/filesystem/path/construct/copy.cc:
568 * testsuite/experimental/filesystem/path/decompose/extension.cc:
570 * testsuite/experimental/filesystem/path/decompose/filename.cc:
572 * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
574 * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
576 * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
578 * testsuite/experimental/filesystem/path/decompose/root_path.cc:
580 * testsuite/experimental/filesystem/path/itr/traversal.cc:
582 * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
584 * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
586 * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
588 * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
590 * testsuite/experimental/filesystem/path/query/has_extension.cc:
592 * testsuite/experimental/filesystem/path/query/has_filename.cc:
594 * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
596 * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
598 * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
600 * testsuite/experimental/filesystem/path/query/has_root_name.cc:
602 * testsuite/experimental/filesystem/path/query/has_root_path.cc:
604 * testsuite/experimental/filesystem/path/query/has_stem.cc:
606 * testsuite/experimental/filesystem/path/query/is_relative.cc:
609 2020-11-27 Jonathan Wakely <jwakely@redhat.com>
611 * src/c++98/locale.cc (locale::facet::_S_get_c_locale()):
612 Revert change to use __is_single_threaded.
613 * src/c++98/locale_init.cc (locale::_S_initialize()):
616 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
618 * include/bits/atomic_wait.h (_GLIBCXX_HAVE_ATOMIC_WAIT):
620 * include/bits/atomic_base.h: Check _GLIBCXX_HAVE_ATOMIC_WAIT.
621 * include/bits/atomic_timed_wait.h: Likewise.
622 * include/bits/semaphore_base.h: Likewise.
623 * include/std/atomic: Likewise.
624 * include/std/latch: Likewise.
625 * include/std/semaphore: Likewise.
627 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
629 * include/std/latch: Depend on _GLIBCXX_HAS_GTHREADS and
630 _GLIBCXX_HAVE_LINUX_FUTEX.
631 * include/std/version (__cpp_lib_latch): Define conditionally.
633 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
635 * testsuite/lib/libstdc++.exp (check_effective_target_gthreads):
636 Call check_v3_target_gthreads not check_v3_target_gthreads_timed.
638 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
640 * testsuite/28_regex/algorithms/regex_match/basic/string_range_01_03.cc:
641 Add dg-timeout-factor directive.
642 * testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc:
644 * testsuite/28_regex/algorithms/regex_match/ecma/char/backref.cc:
646 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/63199.cc:
648 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/anymatcher.cc:
650 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/cjk_match.cc:
652 * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc:
654 * testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc:
656 * testsuite/28_regex/algorithms/regex_search/61720.cc: Likewise.
657 * testsuite/28_regex/algorithms/regex_search/ecma/assertion.cc:
659 * testsuite/28_regex/algorithms/regex_search/ecma/string_01.cc:
661 * testsuite/28_regex/basic_regex/ctors/deduction.cc: Likewise.
663 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
665 * testsuite/lib/libstdc++.exp (libstdc++_init): Only set
666 tool_timeout if it hasn't been set by the user already.
668 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
671 * testsuite/29_atomics/atomic/wait_notify/bool.cc: Fix missed
672 notifications by making the new thread wait until the parent
673 thread is waiting on the condition variable.
674 * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
675 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
676 * testsuite/29_atomics/atomic_ref/wait_notify.cc: Likewise.
678 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
680 * testsuite/18_support/96817.cc: Use new effective-target
681 keywords to select supported targets more effectively.
682 * testsuite/30_threads/call_once/66146.cc: Likewise.
683 * testsuite/lib/libstdc++.exp (check_effective_target_futex):
685 (check_effective_target_gthreads): Define new proc to replace
688 2020-11-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
690 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Remove libposix4
692 <solaris*>: Don't use -lrt any longer.
693 * configure: Regenerate.
694 * doc/xml/manual/configure.xml (--enable-libstdcxx-time=OPTION):
695 Remove libposix4 reference.
697 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
700 * testsuite/ext/stdio_filebuf/char/79820.cc: Do not pass invalid
701 FILE* to constructor.
703 2020-11-26 Jonathan Wakely <jwakely@redhat.com>
705 * include/precompiled/stdc++.h: Add new headers.
706 * include/std/stop_token: Include <semaphore> unconditionally.
708 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
710 * include/bits/atomic_timed_wait.h (__cond_wait_until): Do not
711 perform redundant conversions to the same clock.
713 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
715 * include/bits/atomic_timed_wait.h (__cond_wait_until_impl):
716 Do not define when _GLIBCXX_HAVE_LINUX_FUTEX is defined. Use
717 __condvar and mutex instead of __gthread_cond_t and
719 (__cond_wait_until): Likewise. Fix test for return value of
720 __cond_wait_until_impl.
721 (__timed_waiters::_M_do_wait_until): Use __condvar instead
723 * include/bits/atomic_wait.h: Remove <bits/unique_lock.h>
724 include. Only include <bits/std_mutex.h> if not using futexes.
725 (__platform_wait_max_value): Remove unused variable.
726 (__waiters::lock_t): Use lock_guard instead of unique_lock.
727 (__waiters::_M_cv): Use __condvar instead of __gthread_cond_t.
728 (__waiters::_M_do_wait(__platform_wait_t)): Likewise.
729 (__waiters::_M_notify()): Likewise. Use notify_one() if not
731 * include/bits/std_mutex.h (__condvar): New type.
732 * include/std/condition_variable (condition_variable::_M_cond)
733 (condition_variable::wait_until): Use __condvar instead of
735 * src/c++11/condition_variable.cc (condition_variable): Define
736 default constructor and destructor as defaulted.
737 (condition_variable::wait, condition_variable::notify_one)
738 (condition_variable::notify_all): Forward to corresponding
739 member function of __condvar.
741 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
744 * testsuite/29_atomics/atomic/wait_notify/bool.cc: Re-eneable
746 * testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
747 * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
748 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
749 * testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
750 * testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
751 * testsuite/util/atomic/wait_notify_util.h: Fix missed
752 notifications by making the new thread wait until the parent
753 thread is waiting on the condition variable.
755 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
758 * include/bits/iterator_concepts.h (__detail::__iter_without_category):
760 (__iterator_traits::__cat): Use __detail::__iter_without_category.
761 * testsuite/24_iterators/associated_types/iterator.traits.cc: New test.
763 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
765 * testsuite/17_intro/names.cc: Do not test 'v' on AIX.
767 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
770 * include/bits/atomic_wait.h (__platform_wait): Check errno,
771 not just the value of EAGAIN.
772 (__waiters::__waiters()): Fix name of data member.
774 2020-11-25 Jonathan Wakely <jwakely@redhat.com>
777 * include/bits/atomic_wait.h (__platform_wait): Return if futex
779 * testsuite/30_threads/latch/3.cc: Re-enable test.
780 * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
782 2020-11-24 Jonathan Wakely <jwakely@redhat.com>
786 * testsuite/29_atomics/atomic_integral/wait_notify.cc: Disable.
787 Do not require pthreads, but add -pthread when appropriate.
788 * testsuite/30_threads/jthread/95989.cc: Likewise.
789 * testsuite/30_threads/latch/3.cc: Likewise.
790 * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
792 2020-11-24 Jonathan Wakely <jwakely@redhat.com>
794 * testsuite/30_threads/jthread/95989.cc: Run all three test
795 functions, not just the first one twice.
797 2020-11-24 Jonathan Wakely <jwakely@redhat.com>
800 * src/c++11/thread.cc (thread::_M_start_thread(_State_ptr, void (*)())):
801 Check that gthreads is available before calling __gthread_create.
803 2020-11-24 Jonathan Wakely <jwakely@redhat.com>
805 * src/c++98/locale.cc (locale::facet::_S_get_c_locale())
806 (locale::id::_M_id() const): Use __is_single_threaded.
807 * src/c++98/locale_init.cc (locale::_S_initialize()):
810 2020-11-23 Jonathan Wakely <jwakely@redhat.com>
812 * include/bits/semaphore_base.h
813 (__platform_semaphore::_M_try_acquire_until): Fix type of
816 2020-11-23 Stephan Bergmann <sbergman@redhat.com>
818 * include/bits/atomic_wait.h (__thread_relax, __thread_yield):
821 2020-11-23 Jonathan Wakely <jwakely@redhat.com>
823 * acinclude.m4 (GLIBCXX_CHECK_GTHREADS): Check for
824 * config.h.in: Regenerate.
825 * configure: Regenerate.
826 * include/bits/semaphore_base.h (_GLIBCXX_HAVE_POSIX_SEMAPHORE):
827 Check autoconf macro instead of defining it here.
829 2020-11-23 Jonathan Wakely <jwakely@redhat.com>
831 * include/bits/atomic_wait.h: Do not define anything unless
832 gthreads or futexes are available.
833 * include/bits/atomic_timed_wait.h: Likewise.
834 * include/bits/semaphore_base.h: Likewise.
835 * include/std/semaphore: Likewise.
836 * include/bits/atomic_base.h (atomic_flag::wait)
837 (atomic_flag::notify_one, atomic_flag::notify_all)
838 (__atomic_base<I>::wait, __atomic_base<I>::notify_one)
839 (__atomic_base<I>::notify_all, __atomic_base<P*>::wait)
840 (__atomic_base<P*>::notify_one, __atomic_base<P*>::notify_all)
841 (__atomic_impl::wait, __atomic_impl::notify_one)
842 (__atomic_impl::notify_all, __atomic_float::wait)
843 (__atomic_float::notify_one, __atomic_float::notify_all)
844 (__atomic_ref::wait, __atomic_ref::notify_one)
845 (__atomic_ref::notify_all): Only define if gthreads or futexes
847 * include/std/atomic (atomic::wait, atomic::notify_one)
848 (atomic::notify_all): Likewise.
849 * include/std/version (__cpp_lib_semaphore): Define
852 2020-11-23 Jonathan Wakely <jwakely@redhat.com>
855 * testsuite/29_atomics/atomic_float/wait_notify.cc: Add options
857 * testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
858 * testsuite/29_atomics/atomic_ref/wait_notify.cc: Likewise.
860 2020-11-21 Jonathan Wakely <jwakely@redhat.com>
862 * include/bits/atomic_base.h (atomic_flag::wait): Use correct
863 type for __atomic_wait call.
864 * include/bits/atomic_timed_wait.h (__atomic_wait_until): Check
865 _GLIBCXX_HAVE_LINUX_FUTEX.
866 * include/bits/atomic_wait.h (__atomic_notify): Likewise.
867 * include/bits/semaphore_base.h (_GLIBCXX_HAVE_POSIX_SEMAPHORE):
868 Only define if SEM_VALUE_MAX or _POSIX_SEM_VALUE_MAX is defined.
869 * testsuite/29_atomics/atomic/wait_notify/bool.cc: Disable on
871 * testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
872 * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
873 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
874 * testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
876 2020-11-20 Thomas Rodgers <trodgers@redhat.com>
878 * include/Makefile.am (bits_headers): Add new header.
879 * include/Makefile.in: Regenerate.
880 * include/bits/atomic_base.h (__atomic_flag::wait): Define.
881 (__atomic_flag::notify_one): Likewise.
882 (__atomic_flag::notify_all): Likewise.
883 (__atomic_base<_Itp>::wait): Likewise.
884 (__atomic_base<_Itp>::notify_one): Likewise.
885 (__atomic_base<_Itp>::notify_all): Likewise.
886 (__atomic_base<_Ptp*>::wait): Likewise.
887 (__atomic_base<_Ptp*>::notify_one): Likewise.
888 (__atomic_base<_Ptp*>::notify_all): Likewise.
889 (__atomic_impl::wait): Likewise.
890 (__atomic_impl::notify_one): Likewise.
891 (__atomic_impl::notify_all): Likewise.
892 (__atomic_float<_Fp>::wait): Likewise.
893 (__atomic_float<_Fp>::notify_one): Likewise.
894 (__atomic_float<_Fp>::notify_all): Likewise.
895 (__atomic_ref<_Tp>::wait): Likewise.
896 (__atomic_ref<_Tp>::notify_one): Likewise.
897 (__atomic_ref<_Tp>::notify_all): Likewise.
898 (atomic_wait<_Tp>): Likewise.
899 (atomic_wait_explicit<_Tp>): Likewise.
900 (atomic_notify_one<_Tp>): Likewise.
901 (atomic_notify_all<_Tp>): Likewise.
902 * include/bits/atomic_wait.h: New file.
903 * include/bits/atomic_timed_wait.h: New file.
904 * include/bits/semaphore_base.h: New file.
905 * include/std/atomic (atomic<bool>::wait): Define.
906 (atomic<bool>::wait_one): Likewise.
907 (atomic<bool>::wait_all): Likewise.
908 (atomic<_Tp>::wait): Likewise.
909 (atomic<_Tp>::wait_one): Likewise.
910 (atomic<_Tp>::wait_all): Likewise.
911 (atomic<_Tp*>::wait): Likewise.
912 (atomic<_Tp*>::wait_one): Likewise.
913 (atomic<_Tp*>::wait_all): Likewise.
914 * include/std/latch: New file.
915 * include/std/semaphore: New file.
916 * include/std/version: Add __cpp_lib_semaphore and
917 __cpp_lib_latch defines.
918 * testsuite/29_atomics/atomic/wait_notify/bool.cc: New test.
919 * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
920 * testsuite/29_atomics/atomic/wait_notify/generic.cc: Liekwise.
921 * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
922 * testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
923 * testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
924 * testsuite/29_atomics/atomic_ref/wait_notify.cc: Likewise.
925 * testsuite/30_threads/semaphore/1.cc: New test.
926 * testsuite/30_threads/semaphore/2.cc: Likewise.
927 * testsuite/30_threads/semaphore/least_max_value_neg.cc: Likewise.
928 * testsuite/30_threads/semaphore/try_acquire.cc: Likewise.
929 * testsuite/30_threads/semaphore/try_acquire_for.cc: Likewise.
930 * testsuite/30_threads/semaphore/try_acquire_posix.cc: Likewise.
931 * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
932 * testsuite/30_threads/latch/1.cc: New test.
933 * testsuite/30_threads/latch/2.cc: New test.
934 * testsuite/30_threads/latch/3.cc: New test.
935 * testsuite/util/atomic/wait_notify_util.h: New File.
937 2020-11-20 François Dumont <fdumont@gcc.gnu.org>
940 * include/bits/stl_tempbuf.h (get_temporary_buffer): Change __len
941 computation in the loop to avoid truncation.
942 * include/bits/stl_algo.h:
943 (__inplace_merge): Take temporary buffer length from smallest range.
944 (__stable_sort): Limit temporary buffer length.
945 * testsuite/25_algorithms/inplace_merge/1.cc (test4): New.
946 * testsuite/performance/25_algorithms/stable_sort.cc: Test stable_sort
947 under different heap memory conditions.
948 * testsuite/performance/25_algorithms/inplace_merge.cc: New test.
950 2020-11-20 François Dumont <fdumont@gcc.gnu.org>
952 * include/bits/move.h (_GLIBCXX_FWDREF): New.
953 * include/bits/stl_tree.h: Adapt to use latter.
954 (_Rb_tree<>::_M_clone_node): Add _MoveValue template parameter.
955 (_Rb_tree<>::_M_mbegin): New.
956 (_Rb_tree<>::_M_begin): Use latter.
957 (_Rb_tree<>::_M_copy): Add _MoveValues template parameter.
958 * testsuite/23_containers/map/allocator/move_cons.cc: New test.
959 * testsuite/23_containers/multimap/allocator/move_cons.cc: New test.
960 * testsuite/23_containers/multiset/allocator/move_cons.cc: New test.
961 * testsuite/23_containers/set/allocator/move_cons.cc: New test.
963 2020-11-20 Jonathan Wakely <jwakely@redhat.com>
966 * include/std/regex (pmr::smatch, pmr::wsmatch): Declare using
967 underlying __normal_iterator type, not nested typedef
968 basic_string::const_iterator.
970 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
973 * config/os/gnu-linux/os_defines.h (_GLIBCXX_NATIVE_THREAD_ID):
974 Define new macro to get reliable thread ID.
975 * include/bits/std_thread.h: (this_thread::get_id): Use new
976 macro if it's defined.
977 * testsuite/30_threads/jthread/95989.cc: New test.
978 * testsuite/30_threads/this_thread/95989.cc: New test.
980 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
982 * testsuite/30_threads/async/async.cc: Include <thread>.
983 * testsuite/30_threads/future/members/93456.cc: Likewise.
985 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
988 * include/Makefile.am: Add new <bits/std_thread.h> header.
989 * include/Makefile.in: Regenerate.
990 * include/std/future: Include new header instead of <thread>.
991 * include/std/stop_token: Include new header instead of
993 (stop_token::_S_yield()): Use this_thread::yield().
994 (_Stop_state_t::_M_requester): Change type to std::thread::id.
995 (_Stop_state_t::_M_request_stop()): Use this_thread::get_id().
996 (_Stop_state_t::_M_remove_callback(_Stop_cb*)): Likewise.
997 Use __is_single_threaded() to decide whether to synchronize.
998 * include/std/thread (thread, operator==, this_thread::get_id)
999 (this_thread::yield): Move to new header.
1000 (operator<=>, operator!=, operator<, operator<=, operator>)
1001 (operator>=, hash<thread::id>, operator<<): Define even when
1002 gthreads not available.
1003 * src/c++11/thread.cc: Include <memory>.
1004 * include/bits/std_thread.h: New file.
1005 (thread, operator==, this_thread::get_id, this_thread::yield):
1006 Define even when gthreads not available.
1007 [!_GLIBCXX_HAS_GTHREADS] (thread::join, thread::detach)
1008 (thread::hardware_concurrency): Define inline.
1010 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
1014 * src/c++11/futex.cc (syscall_time_t): New typedef for
1015 the type of the syscall_timespec::tv_sec member.
1016 (relative_timespec, _M_futex_wait_until)
1017 (_M_futex_wait_until_steady): Use syscall_time_t in overflow
1020 2020-11-18 Patrick Palka <ppalka@redhat.com>
1022 * include/std/ranges (join_view::_Iterator::_M_satisfy): Uglify
1023 local variable inner.
1024 (join_view::_Iterator::operator->): Use _Inner_iter instead of
1025 _Outer_iter in the function signature as per LWG 3500.
1026 * testsuite/std/ranges/adaptors/join.cc (test08): Test it.
1028 2020-11-17 Jonathan Wakely <jwakely@redhat.com>
1031 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Fail if struct
1032 timespec isn't compatible with SYS_clock_gettime.
1033 * configure: Regenerate.
1034 * src/c++11/chrono.cc: Revert changes for time64 compatibility.
1035 Add static_assert instead.
1036 * src/c++11/futex.cc (_M_futex_wait_until_steady): Assume
1037 SYS_clock_gettime can use struct timespec.
1039 2020-11-17 Jonathan Wakely <jwakely@redhat.com>
1042 * include/precompiled/stdc++.h: Include <coroutine>.
1043 * include/std/version (__cpp_lib_span): Check __cpp_lib_concepts
1046 2020-11-17 Patrick Palka <ppalka@redhat.com>
1049 * include/bits/ranges_algo.h (__search_n_fn::operator()): Check
1050 random_access_iterator before using the backtracking
1051 implementation. When the backwards scan fails prematurely,
1052 reset __remainder appropriately.
1053 * testsuite/25_algorithms/search_n/97828.cc: New test.
1055 2020-11-16 Jonathan Wakely <jwakely@redhat.com>
1057 * src/Makefile.am (libstdc++-symbols.ver-sun): Remove -lrt from
1058 arguments passed to make_sunver.pl script.
1059 * src/Makefile.in: Regenerate.
1061 2020-11-15 Jason Merrill <jason@redhat.com>
1063 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Adjust.
1065 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
1068 * src/c++11/chrono.cc [_GLIBCXX_USE_CLOCK_GETTIME_SYSCALL]
1069 (syscall_timespec): Define a type suitable for SYS_clock_gettime
1071 (system_clock::now(), steady_clock::now()): Use syscall_timespec
1072 instead of timespec.
1073 * src/c++11/futex.cc (syscall_timespec): Define a type suitable
1074 for SYS_futex and SYS_clock_gettime calls.
1075 (relative_timespec): Use syscall_timespec instead of timespec.
1076 (__atomic_futex_unsigned_base::_M_futex_wait_until): Likewise.
1077 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
1080 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
1083 * src/c++11/futex.cc (relative_timespec): Remove redundant check
1085 * testsuite/30_threads/future/members/wait_until_overflow.cc: Moved to...
1086 * testsuite/30_threads/future/members/93456.cc: ...here.
1088 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
1090 * src/c++11/futex.cc (relative_timespec): Add [[unlikely]]
1092 (__atomic_futex_unsigned_base::_M_futex_wait_until)
1093 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
1095 * testsuite/30_threads/future/members/wait_until_overflow.cc:
1098 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
1100 * src/c++11/futex.cc (relative_timespec): New function to
1101 create relative time from two absolute times.
1102 (__atomic_futex_unsigned_base::_M_futex_wait_until)
1103 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
1104 Use relative_timespec.
1106 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
1108 * testsuite/30_threads/future/members/poll.cc: Require gthreads
1109 and add -pthread for targets that require it. Relax required
1110 ratio of wait_for calls before/after the future is ready.
1112 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
1114 * include/std/future (future::wait_for): Do not wait for
1115 durations less than or equal to zero.
1116 * src/c++11/futex.cc (_M_futex_wait_until)
1117 (_M_futex_wait_until_steady): Do not wait for timeouts before
1119 * testsuite/30_threads/future/members/poll.cc: New test.
1121 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
1123 * include/ext/numeric_traits.h (__numeric_traits): Change
1124 primary template to always derive from __numeric_traits_integer.
1125 (__numeric_traits<float>, __numeric_traits<double>)
1126 (__numeric_traits<long double>): Add explicit specializations.
1128 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
1131 * include/ext/numeric_traits.h (__glibcxx_signed)
1132 (__glibcxx_digits, __glibcxx_min, __glibcxx_max): Remove
1134 (__is_integer_nonstrict::__width): Define new constant.
1135 (__numeric_traits_integer): Define constants in terms of each
1136 other and __is_integer_nonstrict::__width, rather than the
1138 (_GLIBCXX_INT_N_TRAITS): Macro to define explicit
1139 specializations for non-standard integer types.
1141 2020-11-11 Jonathan Yong <10walls@gmail.com>
1143 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Exclude
1144 cygwin and mingw from relro linker test.
1145 * configure: Regenerate.
1147 2020-11-11 Paul Scharnofske <asynts@gmail.com>
1149 * include/std/thread (jthread::operator=(jthread&&)): Transfer
1150 any existing state to a temporary that will request a stop and
1152 * testsuite/30_threads/jthread/jthread.cc: Test move assignment.
1154 2020-11-11 Jonathan Wakely <jwakely@redhat.com>
1156 * include/std/stop_token (_Stop_state_t::_M_requester): Define
1157 new struct with members to store and check the thread ID.
1158 (_Stop_state_t::_M_request_stop()): Use _M_requester._M_set().
1159 (_Stop_state_t::_M_remove_callback(_Stop_cb*)): Use
1160 _M_requester._M_is_current_thread().
1162 2020-11-11 Jonathan Wakely <jwakely@redhat.com>
1164 * include/std/ostream (__syncbuf_base): New class template.
1165 (emit_on_flush, noemit_on_flush, flush_emit): New manipulators.
1166 * include/std/syncstream (basic_syncbuf): Derive from
1167 __syncbuf_base instead of basic_streambuf.
1168 (basic_syncbuf::operator=): Remove self-assignment check.
1169 (basic_syncbuf::swap): Remove self-swap check.
1170 (basic_syncbuf::emit): Do not skip pubsync() call if sequence
1172 (basic_syncbuf::sync): Remove no-op pubsync on stringbuf.
1173 (basic_syncbuf::overflow): Define override.
1174 * testsuite/27_io/basic_syncstream/basic_ops/1.cc: Test
1175 basic_osyncstream::put(char_type).
1176 * testsuite/27_io/basic_ostream/emit/1.cc: New test.
1178 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
1180 * config/locale/generic/c_locale.cc (__set_C_locale()): New function
1181 to set the "C" locale and return the name of the previous locale.
1182 (__convert_to_v<float>, __convert_to_v<double>)
1183 (__convert_to_v<long double>): Use __set_C_locale and set failbit on
1186 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
1188 * include/std/sstream (basic_stringbug, basic_istringstream)
1189 (basic_ostringstream, basic_stringstream): Reorder C++20
1190 constructors to be declared next to other constructors.
1192 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
1194 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten patterns.
1195 (GLIBCXX_3.4.29): Export new symbols.
1196 * include/bits/alloc_traits.h (__allocator_like): New concept.
1197 * include/std/sstream (basic_stringbuf::swap): Add exception
1199 (basic_stringbuf::str() const): Add ref-qualifier. Use new
1200 _M_high_mark function.
1201 (basic_stringbuf::str(const SAlloc&) const): Define new function.
1202 (basic_stringbuf::str() &&): Likewise.
1203 (basic_stringbuf::str(const basic_string<C,T,SAlloc>&)):
1205 (basic_stringbuf::str(basic_string<C,T,Alloc>&&)): Likewise.
1206 (basic_stringbuf::view() const): Use _M_high_mark.
1207 (basic_istringstream::str, basic_ostringstream::str)
1208 (basic_stringstream::str): Define new overloads.
1209 * src/c++20/sstream-inst.cc (basic_stringbuf::str)
1210 (basic_istringstream::str, basic_ostringstream::str)
1211 (basic_stringstream::str): Explicit instantiation definitions
1213 * testsuite/27_io/basic_istringstream/view/char/1.cc: Add more
1215 * testsuite/27_io/basic_istringstream/view/wchar_t/1.cc:
1217 * testsuite/27_io/basic_ostringstream/view/char/1.cc:
1219 * testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc:
1221 * testsuite/27_io/basic_stringstream/view/char/1.cc:
1223 * testsuite/27_io/basic_stringstream/view/wchar_t/1.cc:
1225 * testsuite/27_io/basic_istringstream/str/char/2.cc: New test.
1226 * testsuite/27_io/basic_istringstream/str/wchar_t/2.cc: New test.
1227 * testsuite/27_io/basic_ostringstream/str/char/3.cc: New test.
1228 * testsuite/27_io/basic_ostringstream/str/wchar_t/3.cc: New test.
1229 * testsuite/27_io/basic_stringbuf/str/char/4.cc: New test.
1230 * testsuite/27_io/basic_stringbuf/str/wchar_t/4.cc: New test.
1231 * testsuite/27_io/basic_stringstream/str/char/5.cc: New test.
1232 * testsuite/27_io/basic_stringstream/str/wchar_t/5.cc.cc: New test.
1234 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
1237 * include/std/sstream (basic_stringbuf::_M_update_egptr)
1238 (basic_stringbuf::__xfer_bufptrs::__xfer_bufptrs): Check for
1239 null before comparing pointers.
1241 2020-11-09 François Dumont <fdumont@gcc.gnu.org>
1243 * include/debug/array: Remove.
1244 * include/Makefile.am: Remove <debug/array>.
1245 * include/Makefile.in: Regenerate.
1246 * include/experimental/functional: Adapt.
1247 * include/std/array: Move to _GLIBCXX_INLINE_VERSION namespace.
1248 * include/std/functional: Adapt.
1249 * include/std/span: Adapt.
1250 * testsuite/23_containers/array/debug/back1_neg.cc:
1251 Remove dg-require-debug-mode. Add -D_GLIBCXX_ASSERTIONS option.
1252 * testsuite/23_containers/array/debug/back2_neg.cc: Likewise.
1253 * testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
1254 * testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
1255 * testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc:
1257 * testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc:
1259 * testsuite/23_containers/array/element_access/60497.cc
1260 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
1262 * testsuite/23_containers/array/tuple_interface/get_neg.cc
1263 * testsuite/23_containers/array/tuple_interface/tuple_element_debug_neg.cc
1264 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
1266 2020-11-09 François Dumont <fdumont@gcc.gnu.org>
1268 * include/debug/assertions.h (__glibcxx_requires_non_empty_range):
1269 Remove __builtin_expect.
1270 (__glibcxx_requires_subscript): Likewise.
1271 (__glibcxx_requires_nonempty): Likewise.
1272 * include/debug/formatter.h (__check_singular): Add C++11 constexpr
1274 * include/debug/helper_functions.h (__check_singular): Likewise. Skip
1275 check if constant evaluated.
1276 (__valid_range): Do not skip check if constant evaluated.
1277 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_COND_AT): Add
1279 (_GLIBCXX_DEBUG_VERIFY_AT_F): Use __glibcxx_assert_1.
1280 * testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
1282 * testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc: New test.
1283 * testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc: New test.
1284 * testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc:
1286 * testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
1288 * testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
1290 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc: New test.
1291 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc: New test.
1292 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
1294 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc: New test.
1295 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc: New test.
1296 * testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc: New test.
1297 * testsuite/25_algorithms/lower_bound/debug/partitioned_neg.cc: New test.
1298 * testsuite/25_algorithms/lower_bound/debug/partitioned_pred_neg.cc: New test.
1299 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc: New test.
1300 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc: New test.
1301 * testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc: New test.
1302 * testsuite/25_algorithms/upper_bound/debug/partitioned_neg.cc: New test.
1303 * testsuite/25_algorithms/upper_bound/debug/partitioned_pred_neg.cc: New test.
1305 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
1307 * include/bits/uniform_int_dist.h (__detail::_Power_of_2):
1308 Document that true result for zero is intentional.
1310 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
1312 * include/std/bit (__popcount): Remove redundant check for zero.
1314 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
1317 * libsupc++/exception_ptr.h (exception_ptr::exception_ptr())
1318 (exception_ptr::exception_ptr(const exception_ptr&))
1319 (exception_ptr::~exception_ptr()): Remove 'always_inline'
1320 attributes. Use 'inline' unconditionally.
1322 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
1325 * include/bits/std_function.h [!__cpp_rtti]: Include <typeinfo>.
1327 2020-11-07 Liu Hao <lh_mouse@126.com>
1329 * libsupc++/cxxabi.h: (__cxa_atexit): mark with _GLIBCXX_CDTOR_CALLABI
1330 (__cxa_thread_atexit): ditto
1331 * libsupc++/atexit_thread.cc: (__cxa_atexit): mark with
1332 _GLIBCXX_CDTOR_CALLABI
1333 (__cxa_thread_atexit): ditto
1336 2020-11-06 Jonathan Wakely <jwakely@redhat.com>
1338 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten up patterns
1339 for basic_stringbuf that refer to __xfer_bufptrs.
1341 2020-11-05 Marek Polacek <polacek@redhat.com>
1344 * testsuite/20_util/reference_wrapper/lwg2993.cc: Add a dg-warning.
1345 * testsuite/25_algorithms/generate_n/87982_neg.cc: Likewise.
1347 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
1350 * include/std/optional (operator==, operator!=, operator<)
1351 (operator>, operator<=, operator>=): Fix types used in
1353 * testsuite/20_util/optional/relops/96269.cc: New test.
1355 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
1358 * src/filesystem/dir.cc (recursive_directory_iterator): Call the
1359 right overload of _Dir::advance.
1360 * testsuite/experimental/filesystem/iterators/97731.cc: New test.
1362 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
1365 * include/std/future (__basic_future::_M_get_result): Use
1366 nullptr for null pointer constant.
1367 * libsupc++/eh_ptr.cc (operator==, operator!=): Remove
1369 * libsupc++/exception_ptr.h (_GLIBCXX_EH_PTR_USED): Define
1370 macro to conditionally add __attribute__((__used__)).
1371 (operator==, operator!=, exception_ptr::exception_ptr())
1372 (exception_ptr::exception_ptr(const exception_ptr&))
1373 (exception_ptr::~exception_ptr())
1374 (exception_ptr::operator=(const exception_ptr&))
1375 (exception_ptr::swap(exception_ptr&)): Always define as
1376 inline. Add macro to be conditionally "used".
1378 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
1381 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Add exports.
1382 * src/c++20/sstream-inst.cc (basic_stringbuf): Instantiate
1383 private constructor taking __xfer_bufptrs.
1385 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
1387 * include/std/sstream (basic_stringbuf(const allocator_type&):
1389 (basic_stringbuf(const basic_string<C,T,SA>&, openmode, const A&)):
1390 Call _M_stringbuf_init. Construct _M_string from pointer and length
1391 to avoid constraint checks for string view.
1392 (basic_stringbuf::view()): Make __sv_type alias local to the
1394 (basic_istringstream(const basic_string<C,T,SA>&, openmode, const A&)):
1395 Pass string to _M_streambuf instead of constructing a temporary
1396 with the wrong allocator.
1397 (basic_ostringstream(const basic_string<C,T,SA>&, openmode, const A&)):
1399 (basic_stringstream(const basic_string<C,T,SA>&, openmode, const A&)):
1401 * src/c++20/sstream-inst.cc: Use string_view and wstring_view
1402 typedefs in explicit instantiations.
1403 * testsuite/27_io/basic_istringstream/cons/char/1.cc: Add more
1404 tests for constructors.
1405 * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
1406 * testsuite/27_io/basic_stringbuf/cons/char/1.cc: Likewise.
1407 * testsuite/27_io/basic_stringbuf/cons/char/2.cc: Likewise.
1408 * testsuite/27_io/basic_stringbuf/cons/wchar_t/1.cc: Likewise.
1409 * testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
1410 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
1412 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
1414 * include/std/sstream: Adjust whitespace.
1416 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
1419 * include/std/sstream (basic_stringstream(string_type&&, openmode)):
1420 Fix default argument.
1421 * testsuite/27_io/basic_stringstream/cons/char/97719.cc: New test.
1423 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
1425 * testsuite/18_support/96817.cc: Fail fast if the library is
1426 configured to not use futexes.
1428 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
1431 * include/bits/stl_algo.h (search(FIter, FIter, const Searcher):
1432 Adjust #if condition.
1433 * include/parallel/algo.h (search(FIter, FIter, const Searcher&):
1434 Define new overload for C++17.
1436 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
1439 * doc/xml/manual/evolution.xml: Document change to base class.
1440 * doc/html/manual/api.html: Regenerate.
1442 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
1444 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
1445 Use qualified-id to refer to static member functions.
1447 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
1449 * include/std/syncstream: Include <bits/std_mutex.h>
1452 2020-11-03 François Dumont <fdumont@gcc.gnu.org>
1454 * config/abi/pre/gnu-versioned-namespace.ver:
1455 Add __istream_extract and _Safe_local_iterator_base::_M_attach_single
1458 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
1460 * src/c++11/mutex.cc [_GLIBCXX_HAVE_TLS] (__once_proxy): Define
1461 separately for TLS targets.
1462 [!_GLIBCXX_HAVE_TLS] (__get_once_functor_lock_ptr): Replace with ...
1463 (set_lock_ptr): ... this. Set new value and return previous
1465 [!_GLIBCXX_HAVE_TLS] (__set_once_functor_lock_ptr): Adjust to
1467 [!_GLIBCXX_HAVE_TLS] (__once_proxy): Likewise.
1469 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
1474 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Add new symbols.
1475 * include/std/mutex [!_GLIBCXX_HAS_GTHREADS] (once_flag): Define
1476 even when gthreads is not supported.
1477 (once_flag::_M_once) [_GLIBCXX_HAVE_LINUX_FUTEX]: Change type
1478 from __gthread_once_t to int.
1479 (once_flag::_M_passive(), once_flag::_M_activate())
1480 (once_flag::_M_finish(bool), once_flag::_Active_execution):
1481 Define new members for futex and non-threaded implementation.
1482 [_GLIBCXX_HAS_GTHREADS] (once_flag::_Prepare_execution): New
1484 (call_once): Use new members of once_flag.
1485 * src/c++11/mutex.cc (std::once_flag::_M_activate): Define.
1486 (std::once_flag::_M_finish): Define.
1487 * testsuite/30_threads/call_once/39909.cc: Do not require
1489 * testsuite/30_threads/call_once/49668.cc: Likewise.
1490 * testsuite/30_threads/call_once/60497.cc: Likewise.
1491 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
1492 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
1493 * testsuite/30_threads/call_once/once_flag.cc: Add test for
1494 constexpr constructor.
1495 * testsuite/30_threads/call_once/66146.cc: New test.
1496 * testsuite/30_threads/call_once/constexpr.cc: Removed.
1497 * testsuite/30_threads/once_flag/cons/constexpr.cc: Removed.
1499 2020-11-03 Jonathan Yong <10walls@gmail.com>
1501 * src/Makefile.am (libstdc___la_LINK): Add lt_host_flags.
1502 * src/Makefile.in: Regenerate.
1504 2020-11-02 Thomas Rodgers <trodgers@redhat.com>
1506 * doc/doxygen/user.cfg.in (INPUT): Add new header.
1507 * include/Makefile.am (std_headers): Add new header.
1508 * include/Makefile.in: Regenerate.
1509 * include/precompiled/stdc++.h: Include new header.
1510 * include/std/syncstream: New header.
1511 * include/std/version: Add __cpp_lib_syncbuf.
1512 * testsuite/27_io/basic_syncbuf/1.cc: New test.
1513 * testsuite/27_io/basic_syncbuf/2.cc: Likewise.
1514 * testsuite/27_io/basic_syncbuf/basic_ops/1.cc:
1516 * testsuite/27_io/basic_syncbuf/requirements/types.cc:
1518 * testsuite/27_io/basic_syncbuf/sync_ops/1.cc:
1520 * testsuite/27_io/basic_syncstream/1.cc: Likewise.
1521 * testsuite/27_io/basic_syncstream/2.cc: Likewise.
1522 * testsuite/27_io/basic_syncstream/basic_ops/1.cc:
1524 * testsuite/27_io/basic_syncstream/requirements/types.cc:
1527 2020-11-01 Jonathan Wakely <jwakely@redhat.com>
1529 * include/std/type_traits (is_integral<wchar_t>)
1530 (make_unsigned<wchar_t>, make_signed<wchar_t>): Define based
1531 on #ifdef __WCHAR_TYPE__ instead of _GLIBCXX_USE_WCHAR_T.
1532 * include/bits/cpp_type_traits.h (__is_integer<wchar_t>)
1533 (__is_char<wchar_t>): Likewise.
1535 2020-10-31 François Dumont <fdumont@gcc.gnu.org>
1537 * src/c++17/floating_from_chars.cc (_GLIBCXX_USE_CX11_ABI): Add define.
1538 (buffering_string): New.
1539 [!_GLIBCXX_USE_CXX11_ABI](reserve_string): New.
1540 (from_chars): Adapt.
1541 * src/c++20/sstream-inst.cc: Limit instantiations to
1542 _GLIBCXX_USE_CXX11_ABI.
1544 2020-10-31 Jonathan Wakely <jwakely@redhat.com>
1546 * include/bits/random.h (independent_bit_engine): Fix typo
1548 (shuffle_order_engine): Fix incorrect description in comment.
1549 * include/bits/random.tcc (__representable_as_double
1550 (__p1_representable_as_double): New helper functions.
1551 (shuffle_order_engine::operator()): Use double for calculation
1552 if (max() - min() + 1) is representable as double.
1553 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
1556 2020-10-31 Jonathan Wakely <jwakely@redhat.com>
1559 * include/bits/hashtable_policy.h (_Prime_rehash_policy)
1560 (_Power2_rehash_policy): Use ceil and floor instead of ceill and
1562 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy): Likewise.
1563 Use double instead of long double.
1565 2020-10-31 Patrick Palka <ppalka@redhat.com>
1568 * include/std/ranges (basic_istream_view::begin): Initialize
1569 _Iterator from 'this' instead of '*this'.
1570 (basic_istream_view::_Iterator::_Iterator): Adjust constructor
1572 (filter_view::_Iterator::_Iterator): Take a filter_view*
1573 argument instead of a filter_view& argument.
1574 (filter_view::_Sentinel::_Sentinel): Likewise.
1575 (filter_view::begin): Initialize _Iterator from 'this' instead
1577 (filter_view::end): Likewise.
1578 (transform_view::_Iterator::_Iterator): Take a _Parent* instead
1580 (filter_view::_Iterator::operator+): Adjust accordingly.
1581 (filter_view::_Iterator::operator-): Likewise.
1582 (filter_view::begin): Initialize _Iterator from 'this' instead
1584 (filter_view::end): Likewise.
1585 (join_view::_Iterator): Take a _Parent* instead of a _Parent&.
1586 (join_view::_Sentinel): Likewise.
1587 (join_view::begin): Initialize _Iterator from 'this' instead of
1589 (join_view::end): Initialize _Sentinel from 'this' instead of
1591 (split_view::_OuterIter): Take a _Parent& instead of a _Parent*.
1592 (split_view::begin): Initialize _OuterIter from 'this' instead
1594 (split_view::end): Likewise.
1595 * testsuite/std/ranges/97600.cc: New test.
1597 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
1599 * include/std/ranges (enable_borrowed_view<take_view<T>>)
1600 (enable_borrowed_view<drop_view<T>>)
1601 (enable_borrowed_view<drop_while_view<T>>)
1602 (enable_borrowed_view<reverse_view<T>>)
1603 (enable_borrowed_view<common_view<T>>)
1604 (enable_borrowed_view<elements_view<T>>): Add partial
1605 specializations as per P2017R1.
1606 * testsuite/std/ranges/adaptors/conditionally_borrowed.cc:
1609 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
1612 * include/bits/hashtable_policy.h (_Prime_rehash_policy)
1613 (_Power2_rehash_policy): Use double instead of long double.
1615 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
1617 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1618 Avoid -Wcatch-value warnings.
1620 2020-10-30 Patrick Palka <ppalka@redhat.com>
1622 * include/std/ranges (__detail::__box): For the partial
1623 specialization used by types that are already semiregular,
1624 make the default constructor value-initialize the underlying
1625 object instead of default-initializing it. Make its in place
1626 constructor explicit.
1627 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc:
1630 2020-10-30 David Edelsohn <dje.gcc@gmail.com>
1632 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: XFAIL on AIX.
1634 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1636 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten patterns
1637 for old <sstream> symbols some more.
1639 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1641 * include/bits/ranges_util.h (subrange::subrange(R&&)): Use
1642 direct-initialization instead of list-initialization, so a
1643 potential narrowing conversion from ranges::size(r) to the
1644 stored size isn't ill-formed.
1646 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1648 * include/bits/parse_numbers.h (_Select_int_base): Avoid
1649 narrowing conversion in constant expression.
1650 * include/experimental/buffer (buffer_copy): Avoid narrowing
1652 * include/experimental/internet (hash<>::operator()): Do not
1653 use deprecated 'argument_type' member.
1654 * include/std/variant (variant::emplace): Use cast instead
1655 of implicit conversion from size_t to narrower unsigned type.
1657 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1659 * include/tr1/shared_ptr.h (__shared_count, __shared_ptr)
1660 (shared_ptr): Add diagnostic pragmas around uses of auto_ptr.
1661 * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
1662 Adust dg-error line numbers.
1664 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1666 * testsuite/18_support/96817.cc: Avoid -Wunused warnings.
1667 * testsuite/20_util/any/assign/2.cc: Likewise.
1668 * testsuite/20_util/any/cons/2.cc: Likewise.
1669 * testsuite/20_util/align/1.cc: Avoid -Wsign-compare warning.
1670 * testsuite/20_util/function/65760.cc: Avoid -Wunused warning.
1671 * testsuite/20_util/function/1.cc: Avoid -Wcatch-value warning.
1672 * testsuite/20_util/function/cons/move_target.cc: Avoid -Wunused
1674 * testsuite/20_util/headers/memory/synopsis.cc: Add exception
1676 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Avoid
1677 -Wsign-compare warning.
1678 * testsuite/20_util/tuple/cons/deduction.cc: Avoid -Wunused
1680 * testsuite/20_util/specialized_algorithms/uninitialized_copy/808590-cxx11.cc:
1681 Avoid -Wdeprecated-copy warning.
1682 * testsuite/21_strings/basic_string/56166.cc: Avoid
1683 -Wcatch-value warning.
1684 * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
1685 Avoid -Wcatch-value warnings.
1686 * testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc:
1688 * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
1690 * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
1692 * testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc:
1694 * testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
1696 * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
1698 * testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc:
1700 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc:
1702 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc:
1704 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc:
1706 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc:
1708 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc:
1710 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc:
1712 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc:
1714 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc:
1716 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc:
1717 Prune additional diagnostics.
1718 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc:
1720 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc:
1722 * testsuite/21_strings/headers/string/synopsis.cc: Add exception
1724 * testsuite/22_locale/locale/cons/12352.cc: Define sized
1725 delete operators to avoid warnings.
1726 * testsuite/23_containers/deque/modifiers/swap/1.cc: Add
1727 exception specification.
1728 * testsuite/23_containers/forward_list/cons/11.cc: Avoid
1729 -Wdeprecated-copy warning.
1730 * testsuite/23_containers/headers/bitset/synopsis.cc: Add
1731 exception specification.
1732 * testsuite/23_containers/headers/deque/synopsis.cc: Likewise.
1733 * testsuite/23_containers/headers/forward_list/synopsis.cc:
1735 * testsuite/23_containers/headers/list/synopsis.cc: Likewise.
1736 * testsuite/23_containers/headers/map/synopsis.cc: Likewise.
1737 * testsuite/23_containers/headers/queue/synopsis.cc: Likewise.
1738 * testsuite/23_containers/headers/set/synopsis.cc: Likewise.
1739 * testsuite/23_containers/headers/vector/synopsis.cc: Likewise.
1740 * testsuite/23_containers/list/modifiers/swap/1.cc: Likewise.
1741 * testsuite/23_containers/map/modifiers/swap/1.cc: Likewise.
1742 * testsuite/23_containers/multimap/modifiers/swap/1.cc:
1744 * testsuite/23_containers/multiset/modifiers/swap/1.cc:
1746 * testsuite/23_containers/set/modifiers/swap/1.cc: Likewise.
1747 * testsuite/23_containers/unordered_set/56267-2.cc: Avoid
1748 -Wdeprecated-copy warning.
1749 * testsuite/23_containers/vector/bool/23632.cc: Avoid
1750 -Wempty-body warning.
1751 * testsuite/23_containers/vector/modifiers/swap/1.cc: Add
1752 exception specification.
1753 * testsuite/25_algorithms/heap/moveable2.cc: Fix misplaced
1754 parentheses around arguments.
1755 * testsuite/25_algorithms/sample/1.cc: Use return value.
1756 * testsuite/25_algorithms/search/searcher.cc: Avoid -Wunused
1758 * testsuite/27_io/basic_ostream/exceptions/char/9561.cc:
1760 * testsuite/27_io/basic_ostream/exceptions/wchar_t/9561.cc:
1762 * testsuite/27_io/filesystem/operations/remove_all.cc: Avoid
1763 -Wsign-compare warning.
1764 * testsuite/experimental/any/assign/2.cc: Avoid -Wunused warnings.
1765 * testsuite/experimental/any/cons/2.cc: Likewise.
1766 * testsuite/experimental/filesystem/operations/remove_all.cc:
1767 Avoid -Wign-compare warning.
1768 * testsuite/experimental/memory/observer_ptr/cons/cons.cc:
1770 * testsuite/experimental/memory_resource/null_memory_resource.cc:
1772 * testsuite/experimental/source_location/1.cc: Avoid -Waddress
1774 * testsuite/ext/pod_char_traits.cc: Avoid -Wunused warning.
1775 * testsuite/ext/vstring/modifiers/clear/56166.cc: Avoid
1777 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
1778 Avoid -Wunused warning.
1779 * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc:
1781 * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
1782 Prune additional warnings.
1783 * testsuite/tr1/3_function_objects/function/1.cc: Avoid
1784 -Wcatch-value warning.
1785 * testsuite/util/replacement_memory_operators.h: Define sized
1786 delete to avoid warnings.
1787 * testsuite/util/testsuite_api.h (_NonDefaultConstructible): Add
1788 user-declared assignment operator to stop -Wdeprecated-copy
1790 * testsuite/util/testsuite_containers.h: Avoid -Wunused warning.
1791 * testsuite/util/testsuite_iterators.h: Avoid -Wsign-compare
1793 * testsuite/util/testsuite_new_operators.h: Define sized deleted.
1795 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1797 * testsuite/25_algorithms/all_of/constexpr.cc: Check result of
1799 * testsuite/25_algorithms/any_of/constexpr.cc: Likewise.
1800 * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
1801 * testsuite/25_algorithms/copy_backward/constexpr.cc: Likewise.
1802 * testsuite/25_algorithms/count/constexpr.cc: Likewise.
1803 * testsuite/25_algorithms/equal/constexpr.cc: Likewise.
1804 * testsuite/25_algorithms/equal_range/constexpr.cc: Likewise.
1805 * testsuite/25_algorithms/fill/constexpr.cc: Likewise.
1806 * testsuite/25_algorithms/find_end/constexpr.cc: Likewise.
1807 * testsuite/25_algorithms/find_if/constexpr.cc: Likewise.
1808 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Likewise.
1809 * testsuite/25_algorithms/is_permutation/constexpr.cc: Likewise.
1810 * testsuite/25_algorithms/is_sorted_until/constexpr.cc:
1812 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
1814 * testsuite/25_algorithms/lower_bound/constexpr.cc: Likewise.
1815 * testsuite/25_algorithms/merge/constexpr.cc: Likewise.
1816 * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
1817 * testsuite/25_algorithms/none_of/constexpr.cc: Likewise.
1818 * testsuite/25_algorithms/partition_copy/constexpr.cc: Likewise.
1819 * testsuite/25_algorithms/remove_copy/constexpr.cc: Likewise.
1820 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Likewise.
1821 * testsuite/25_algorithms/remove_if/constexpr.cc: Likewise.
1822 * testsuite/25_algorithms/replace_if/constexpr.cc: Likewise.
1823 * testsuite/25_algorithms/reverse/constexpr.cc: Likewise.
1824 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Likewise.
1825 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Likewise.
1826 * testsuite/25_algorithms/search/constexpr.cc: Likewise.
1827 * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
1828 * testsuite/25_algorithms/set_intersection/constexpr.cc:
1830 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
1832 * testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
1833 * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
1834 * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
1836 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1838 * include/bits/uniform_int_dist.h (_Power_of_two): Add
1840 (uniform_int_distribution::_S_nd): Add static_assert to ensure
1841 the wider type is twice as wide as the result type.
1842 (uniform_int_distribution::__generate_impl): Add static_assert
1843 and declare variables as constexpr where appropriate.
1844 (uniform_int_distribution:operator()): Likewise. Only consider
1845 the uniform random bit generator's range of possible results
1846 when deciding whether _S_nd can be used, not the __uctype type.
1848 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1850 * include/ext/rope (_Refcount_Base::_M_ref_count): Remove
1852 (_Refcount_Base::_M_decr()): Likewise.
1854 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1856 * include/bits/std_function.h (_Function_handler<void, void>):
1857 Define explicit specialization used for invalid target types.
1858 (_Base_manager::_M_manager) [!__cpp_rtti]: Return null.
1859 (function::target_type()): Check for null pointer.
1860 (function::target()): Define unconditionall. Fix bug with
1861 const_cast of function pointer type.
1862 (function::target() const): Define unconditionally, but
1863 only use RTTI if enabled.
1864 * testsuite/20_util/function/target_no_rtti.cc: New test.
1866 2020-10-29 Patrick Palka <ppalka@redhat.com>
1868 * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
1869 (test03): Fix initializing the vector vy with the array y of size 4.
1871 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1873 * include/bits/hashtable_policy.h (_Local_iterator_base): Cast
1874 value to avoid -Wsign-compare warnings.
1875 * include/bits/regex.h (sub_match::_M_str): Avoid narrowing
1877 * include/bits/regex_compiler.tcc (_Compiler::_M_quantifier):
1878 Initialize variable to avoid -Wmaybe-uninitialized warning.
1879 * include/bits/shared_ptr_base.h (_Sp_counted_deleter::_Impl):
1880 Reorder mem-initializer-list to avoid -Wreorder warning.
1881 * include/bits/stl_tree.h (_Rb_tree_impl): Explicitly
1882 initialize base class in copy constructor.
1883 * include/debug/safe_iterator.h (_Safe_iterator): Likewise.
1884 * include/ext/debug_allocator.h: Reorder mem-initializer-list
1885 to avoid -Wreorder warning.
1886 * include/ext/throw_allocator.h (throw_allocator_limit)
1887 (throw_allocator_random): Add user-declared assignment operators
1888 to avoid -Wdeprecated-copy warnings.
1890 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1892 * include/bits/uniform_int_dist.h (uniform_int_distribution):
1893 Rename _UniformRandomNumberGenerator template parameters to
1894 _UniformRandomBitGenerator, as per P0346R1.
1896 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1898 * include/std/sstream (basic_stringbuf(__string_type&&, openmode)):
1899 Call _M_init_syncbuf to set up get/put areas. Also qualify
1902 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1904 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Remove duplicate
1906 (CXXABI_1.3.13): Restore missing piece.
1908 2020-10-28 Thomas Rodgers <trodgers@redhat.com>
1910 * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++20.
1911 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): New symbols.
1912 * configure: Regenerate.
1913 * include/std/sstream:
1914 (basic_stringbuf::basic_stringbuf(allocator const&)): New constructor.
1915 (basic_stringbuf::basic_stringbuf(openmode, allocator const&)): Likewise.
1916 (basic_stringbuf::basic_stringbuf(basic_string&&, openmode)): Likewise.
1917 (basic_stringbuf::basic_stringbuf(basic_stringbuf&&, allocator const&)):
1919 (basic_stringbuf::get_allocator()): New method.
1920 (basic_stringbuf::view()): Likewise.
1921 (basic_istringstream::basic_istringstream(basic_string&&, openmode)):
1923 (basic_istringstream::basic_istringstream(openmode, allocator const&)):
1925 (basic_istringstream::view()): New method.
1926 (basic_ostringstream::basic_ostringstream(basic_string&&, openmode)):
1928 (basic_ostringstream::basic_ostringstream(openmode, allocator const&)):
1930 (basic_ostringstream::view()): New method.
1931 (basic_stringstream::basic_stringstream(basic_string&&, openmode)):
1933 (basic_stringstream::basic_stringstream(openmode, allocator const&)):
1935 (basic_stringstream::view()): New method.
1936 * src/Makefile.in: Add c++20 directory.
1937 * src/Makefile.am: Regenerate.
1938 * src/c++20/Makefile.am: Add makefile for new sub-directory.
1939 * src/c++20/Makefile.in: Generate.
1940 * src/c++20/sstream-inst.cc: New file defining explicit
1941 instantiations for basic_stringbuf, basic_istringstream,
1942 basic_ostringstream, and basic_stringstream member functions
1944 * testsuite/27_io/basic_stringbuf/cons/char/2.cc: New test.
1945 * testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
1946 * testsuite/27_io/basic_stringbuf/view/char/1.cc: Likewise.
1947 * testsuite/27_io/basic_stringbuf/view/wchar_t/1.cc: Likewise.
1948 * testsuite/27_io/basic_istringstream/cons/char/1.cc: Likewise.
1949 * testsuite/27_io/basic_istringstream/cons/wchar_t/1.cc: Likewise.
1950 * testsuite/27_io/basic_istringstream/view/char/1.cc: Likewise.
1951 * testsuite/27_io/basic_istringstream/view/wchar_t/1.cc: Likewise.
1952 * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
1953 * testsuite/27_io/basic_ostringstream/cons/wchar_t/1.cc: Likewise.
1954 * testsuite/27_io/basic_ostringstream/view/char/1.cc: Likewise.
1955 * testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc: Likewise.
1956 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
1957 * testsuite/27_io/basic_stringstream/cons/wchar_t/1.cc: Likewise.
1958 * testsuite/27_io/basic_stringstream/view/char/1.cc: Likewise.
1959 * testsuite/27_io/basic_stringstream/view/wchar_t/1.cc: Likewise.
1961 2020-10-28 Patrick Palka <ppalka@redhat.com>
1964 * include/std/chrono (year_month_weekday::operator sys_days):
1965 Cast the result of index() to int so that the initializer for
1966 days{} is sign-extended when it's converted to the underlying
1968 * testsuite/std/time/year_month_weekday/3.cc: New test.
1970 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1972 * libsupc++/new_opnt.cc (new): Add comment about forced unwind
1975 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1978 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_BUFSIZ):
1980 * config/os/mingw32/os_defines.h (_GLIBCXX_BUFSIZ):
1982 * include/bits/fstream.tcc: Use _GLIBCXX_BUFSIZ instead
1984 * include/ext/stdio_filebuf.h: Likewise.
1985 * include/std/fstream (_GLIBCXX_BUFSIZ): Define.
1987 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1990 * include/bits/valarray_after.h (_DEFINE_EXPR_UNARY_OPERATOR)
1991 (_DEFINE_EXPR_BINARY_OPERATOR, _DEFINE_EXPR_BINARY_FUNCTION):
1992 Use elaborated-type-specifier and qualified-id to avoid
1993 ambiguities with QNX system headers.
1994 * testsuite/26_numerics/valarray/95592.cc: New test.
1996 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1999 * include/std/span (span): Reorder data members to match common
2000 implementations of struct iovec.
2001 * testsuite/23_containers/span/layout_compat.cc: New test.
2003 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
2005 * include/std/functional (std::_Placeholder): Define for C++98
2006 as well as later standards.
2007 * include/tr1/functional (std::placeholders::_1 etc): Declare
2009 (tr1::_Placeholder): Replace with using-declaration for
2011 (tr1::placeholders::_1 etc.): Replace with using-directive for
2014 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
2016 * include/tr1/ell_integral.tcc (__ellint_rf, __ellint_rd)
2017 (__ellint_rc, __ellint_rj): Remove unused variables.
2018 * include/tr1/modified_bessel_func.tcc (__airy): Likewise.
2020 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
2022 * include/bits/locale_conv.h (__str_codecvt_out_all):
2023 Add cast to compare operands of the same signedness.
2024 * include/bits/locale_facets_nonio.tcc
2025 (time_get::_M_extract_wday_or_month): Likewise.
2026 * include/bits/sstream.tcc (basic_stringbuf::overflow):
2028 * include/tr1/legendre_function.tcc (__sph_legendre): Use
2029 unsigned for loop variable.
2031 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
2033 * include/std/charconv (from_chars): Add noexcept to match
2034 definitions in src/c++17/floating_from_chars.cc
2036 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
2038 * src/c++17/fs_dir.cc (fs::directory_iterator::operator*):
2039 Add noexcept. Do not throw on precondition violation.
2041 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
2043 * include/bits/fs_path.h (path::_List::begin, path::_List::end):
2044 Add noexcept to match definitions in src/c++17/fs_path.cc.
2046 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
2048 * testsuite/experimental/memory_resource/new_delete_resource.cc:
2049 Add missing <cstdint> header.
2050 * testsuite/experimental/memory_resource/resource_adaptor.cc:
2053 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
2055 * include/experimental/executor (strand::_State): Fix thinko.
2057 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
2059 * include/std/type_traits (__is_nt_constructible_impl): Remove.
2060 (__is_nothrow_constructible_impl): Adjust.
2061 (is_nothrow_default_constructible): Likewise.
2062 (__is_nt_assignable_impl): Remove.
2063 (__is_nothrow_assignable_impl): Adjust.
2065 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
2068 * libsupc++/new_opa.cc: Declare size_t in global namespace.
2069 Remove unused header.
2071 2020-10-26 Stephan Bergmann <sbergman@redhat.com>
2073 * include/bits/shared_ptr_base.h
2074 (_Sp_counted_base::_M_add_ref_lock_nothrow(): Add noexcept to
2075 definitions to match declaration.
2076 (__shared_count(const __weak_count&, nothrow_t)): Add noexcept
2077 to declaration to match definition.
2079 2020-10-23 Patrick Palka <ppalka@redhat.com>
2081 * include/std/ranges (single_view::single_view): Mark the
2082 in place constructor explicit as per LWG 3428.
2083 (take_view): Remove the constraint on the deduction guide's
2084 template parameter as per LWG 3447.
2086 2020-10-23 Jonathan Wakely <jwakely@redhat.com>
2088 * include/experimental/memory_resource: Include <tuple>.
2089 (polymorphic_allocator::construct): Qualify forward_as_tuple.
2090 * include/std/memory_resource: Likewise.
2092 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
2094 * testsuite/30_threads/condition_variable/members/68519.cc:
2095 Define recent_epoch_float_clock::duration to meet the Cpp17Clock
2098 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
2100 * include/std/shared_mutex: Only include <condition_variable>
2101 when pthread_rwlock_t and POSIX timers are not available.
2102 (__cpp_lib_shared_mutex, __cpp_lib_shared_timed_mutex): Change
2103 value to be type 'long'.
2104 * include/std/version (__cpp_lib_shared_mutex)
2105 (__cpp_lib_shared_timed_mutex): Likewise.
2107 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
2109 * include/Makefile.am: Add new header.
2110 * include/Makefile.in: Regenerate.
2111 * include/bits/shared_ptr.h: Include <iosfwd>.
2112 * include/bits/shared_ptr_base.h: Include required headers here
2113 directly, instead of in <memory>.
2114 * include/bits/uses_allocator_args.h: New file. Move utility
2115 functions for uses-allocator construction from <memory> to here.
2116 Only define the utility functions when concepts are available.
2117 (__cpp_lib_make_obj_using_allocator): Define non-standard
2119 * include/std/condition_variable: Remove unused headers.
2120 * include/std/future: Likewise.
2121 * include/std/memory: Remove headers that are not needed
2122 directly, and are now inclkuded where they're needed. Include
2123 new <bits/uses_allocator_args.h> header.
2124 * include/std/memory_resource: Include only the necessary
2125 headers. Use new feature test macro to detect support for the
2127 * include/std/scoped_allocator: Likewise.
2128 * include/std/version (__cpp_lib_make_obj_using_allocator):
2131 2020-10-22 Olivier Hainque <hainque@adacore.com>
2133 * crossconfig.m4: Turn vxworks matcher into vxworks*.
2134 * configure.host: Likewise.
2135 * configure: Regenerate.
2137 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
2139 * include/bits/shared_ptr.h (shared_ptr(const weak_ptr&, nothrow_t)):
2141 * include/bits/shared_ptr_base.h (_Sp_counted_base::_M_add_ref_lock):
2142 Remove specializations and just call _M_add_ref_lock_nothrow.
2143 (__shared_count, __shared_ptr): Use nullptr for null pointer
2145 (__shared_count(const __weak_count&)): Use _M_add_ref_lock_nothrow
2146 instead of _M_add_ref_lock.
2147 (__shared_count(const __weak_count&, nothrow_t)): Add noexcept.
2148 (__shared_ptr::operator bool()): Add noexcept.
2149 (__shared_ptr(const __weak_ptr&, nothrow_t)): Add noexcept.
2151 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
2154 * include/bits/ranges_util.h (tuple_size<subrange>)
2155 (tuple_element<I, cv subrange>): Move here from ...
2156 * include/std/ranges: ... here.
2157 * testsuite/std/ranges/subrange/97512.cc: New test.
2159 2020-10-21 Thomas Rodgers <trodgers@redhat.com>
2161 * include/pstl/algorithm_impl.h: Update file.
2162 * include/pstl/execution_impl.h: Likewise.
2163 * include/pstl/glue_algorithm_impl.h: Likewise.
2164 * include/pstl/glue_memory_impl.h: Likewise.
2165 * include/pstl/glue_numeric_impl.h: Likewise.
2166 * include/pstl/memory_impl.h: Likewise.
2167 * include/pstl/numeric_impl.h: Likewise.
2168 * include/pstl/parallel_backend.h: Likewise.
2169 * include/pstl/parallel_backend_serial.h: Likewise.
2170 * include/pstl/parallel_backend_tbb.h: Likewise.
2171 * include/pstl/parallel_backend_utils.h: Likewise.
2172 * include/pstl/pstl_config.h: Likewise.
2173 * include/pstl/unseq_backend_simd.h: Likewise.
2175 2020-10-20 François Dumont <fdumont@gcc.gnu.org>
2177 * include/bits/hashtable_policy.h
2178 (_Hash_node_value_base<>): Remove _Hash_node_base inheritance.
2179 (_Hash_node_code_cache<bool _Cache_hash_code>): New.
2180 (_Hash_node_value<typename _Value, bool _Cache_hash_code>): New.
2181 (_Hash_node<>): Inherits _Hash_node_base<> and _Hash_node_value<>.
2182 (_Map_base<>::__node_type): Remove.
2183 (_Map_base<>::iterator): Remove.
2184 (_Insert_base<>::__hash_cached): New.
2185 (_Insert_base<>::__constant_iterators): New.
2186 (_Insert_base<>::__hashtable_alloc): New.
2187 (_Insert_base<>::__node_type): Remove.
2188 (_Insert_base<>::__node_ptr): New.
2189 (_Hash_code_base<>): Remove specializations.
2190 (_Hash_code_base<>::__node_type): Remove.
2191 (_Hash_code_base<>::_M_bucket_index(const __node_type*, size_t)):
2193 (_Hash_code_base<>::_M_bucket_index(const _Hash_node_value<>&, size_t)):
2195 (_Hash_code_base<>::_M_store_code(__node_type*, __hash_code)):
2197 (_Hash_code_base<>::_M_store_code(_Hash_node_code_cache<>&, __hash_code)):
2199 (_Hash_code_base<>::_M_copy_code(__node_type*, const __node_type*)):
2201 (_Hash_code_base<>::_M_copy_code(_Hash_node_code_cache<>&,
2202 const _Hash_node_code_base<>&)): ...this.
2203 (_Hashtable_base<>::__constant_iterators): Remove.
2204 (_Hashtable_base<>::__unique_keys): Remove.
2205 (_Hashtable_base<>::__node_type): Remove.
2206 (_Hashtable_base<>::iterator): Remove.
2207 (_Hashtable_base<>::const_iterator): Remove.
2208 (_Hashtable_base<>::local_iterator): Remove.
2209 (_Hashtable_base<>::const_local_iterator): Remove.
2210 (_Hashtable_base<>::__ireturn_type): Remove.
2211 (_Hashtable_base<>::_Equal_hash_code<>::_S_equals): Replace by...
2212 (_Hashtable_base<>::_S_equals(__hash_code, const _Hash_node_code_hash<>&)):
2214 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals): Replace by...
2215 (_Hashtable_base<>::_S_node_equals(__hash_code,
2216 const _Hash_node_code_hash<>&)): ...this.
2217 (_Hashtable_base<>::_Equal_hash_code<>): Remove.
2218 (_Hashtable_base<>::_M_equals): Adapt.
2219 (_Hashtable_baxe<>::_M_node_equals): Adapt.
2220 (_Equality<>::_M_equal): Adapt.
2221 (_Hashtable_alloc<>::__node_ptr): New.
2222 (_Hashtable_alloc<>::__bucket_type): Rename into...
2223 (_Hashtable_alloc<>::__node_base_ptr): ...this.
2224 (_Hashtable_alloc<>::__bucket_alloc_type): Rename into...
2225 (_Hashtable_alloc<>::__buckets_alloc_type): ...this.
2226 (_Hashtable_alloc<>::__bucket_alloc_traits): Rename into...
2227 (_Hashtable_alloc<>::__buckets_alloc_traits): ...this.
2228 (_Hashtable_alloc<>::__buckets_ptr): New.
2229 (_Hashtable_alloc<>::_M_allocate_node): Adapt.
2230 (_Hashtable_alloc<>::_M_deallocate_node): Adapt.
2231 (_Hashtable_alloc<>::_M_deallocate_node_ptr): Adapt.
2232 (_Hashtable_alloc<>::_M_deallocate_nodes): Adapt.
2233 (_Hashtable_alloc<>::_M_allocate_buckets): Adapt.
2234 (_Hashtable_alloc<>::_M_deallocate_buckets): Adapt.
2235 * include/bits/hashtable.h (_Hashtable<>): Adapt.
2237 2020-10-20 Aldy Hernandez <aldyh@redhat.com>
2239 * testsuite/21_strings/basic_string/capacity/1.cc: Pass
2240 -Wno-stringop-overflow to test.
2242 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
2245 * include/std/coroutine (__noop_coro_frame): Replace with
2246 noop_coroutine_handle::__frame.
2247 (__dummy_resume_destroy): Define inline in __frame.
2248 (__noop_coro_fr): Replace with noop_coroutine_handle::_S_fr
2249 and define as inline.
2250 * testsuite/18_support/coroutines/95917.cc: New test.
2252 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
2254 * include/std/coroutine (coroutine_handle<_Promise>): Remove
2255 base class. Add constructors, conversions, accessors etc. as
2256 proposed for LWG 3460.
2257 (coroutine_handle<noop_coroutine_promise>): Likewise.
2258 * testsuite/18_support/coroutines/lwg3460.cc: New test.
2260 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
2262 * include/bits/unique_ptr.h (make_unique_for_overwrite): Define
2264 * testsuite/20_util/unique_ptr/creation/array_neg.cc: Remove
2265 unused header. Adjust standard reference.
2266 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: New test.
2267 * testsuite/20_util/unique_ptr/creation/for_overwrite__neg.cc: New test.
2269 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
2271 * include/std/tuple (_Head_base<Idx, Head, true>): Use reserved
2272 form of __no_unique_address__ attribute because
2273 no_unique_address is not reserved prior to C++20.
2275 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
2277 * include/bits/node_handle.h (_Node_handle_common): Replace
2278 std::optional with custom type.
2279 * testsuite/20_util/variant/exception_safety.cc: Add missing
2282 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
2284 * include/precompiled/expc++.h: Removed.
2286 2020-10-17 Ville Voutilainen <ville.voutilainen@gmail.com>
2289 * include/std/variant
2290 (__gen_vtable_impl<>::_S_apply_single_alt):
2291 Diagnose visitor return type mismatches here..
2292 (__gen_vtable_impl</*base case*/>::_S_apply):
2295 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
2297 * include/std/concepts: Fix typos in copyright notice.
2298 * include/std/ranges: Likewise.
2300 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2303 * include/std/sstream (basic_stringbuf::str()): Check for
2304 null egptr() before comparing to non-null pptr().
2306 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2308 * testsuite/21_strings/basic_string/modifiers/assign/char/move_assign_optim.cc:
2309 Do not generate debug info.
2310 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/move_assign_optim.cc:
2313 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2315 * include/bits/basic_string.h (basic_string(const Alloc&))
2316 (basic_string(const basic_string&)
2317 (basic_string(const CharT*, size_type, const Alloc&))
2318 (basic_string(const CharT*, const Alloc&))
2319 (basic_string(size_type, CharT, const Alloc&))
2320 (basic_string(initializer_list<CharT>, const Alloc&))
2321 (basic_string(InputIterator, InputIterator, const Alloc&)):
2322 Define inline in class body.
2323 * include/bits/basic_string.tcc (basic_string(const Alloc&))
2324 (basic_string(const basic_string&)
2325 (basic_string(const CharT*, size_type, const Alloc&))
2326 (basic_string(const CharT*, const Alloc&))
2327 (basic_string(size_type, CharT, const Alloc&))
2328 (basic_string(initializer_list<CharT>, const Alloc&))
2329 (basic_string(InputIterator, InputIterator, const Alloc&)):
2330 Move definitions into class body.
2332 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2334 * testsuite/lib/libstdc++.exp (check_effective_target_cxx11-abi):
2335 Add comments about which test flags get used by the check.
2337 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2339 * testsuite/21_strings/basic_string/allocator/char/copy.cc: Make
2340 comment more precise about what isn't supported by COW strings.
2341 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
2343 * testsuite/21_strings/basic_string/allocator/char/move.cc:
2345 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
2347 * testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
2349 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2351 * testsuite/21_strings/basic_string/allocator/char/swap.cc:
2353 * testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
2355 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
2357 * testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
2359 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
2361 * testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
2363 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2365 * testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
2368 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2370 * testsuite/21_strings/basic_string/allocator/char/minimal.cc:
2371 Do not require cxx11-abi effective target.
2372 * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
2374 * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
2376 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
2378 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2379 (basic_string(const _CharT*, const _Alloc&)): Constrain to
2380 require an allocator-like type to fix CTAD ambiguity (LWG 3706).
2381 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
2383 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
2386 2020-10-13 Nuno Lopes <nuno.lopes@ist.utl.pt>
2388 * include/bits/stl_algo.h (any_of): Fix incorrect description
2391 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
2393 * doc/xml/manual/evolution.xml: Document some API changes
2395 * doc/xml/manual/intro.xml: Document LWG 2499.
2396 * doc/xml/manual/status_cxx2020.xml: Update status.
2397 * doc/html/*: Regenerate.
2399 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
2401 * doc/xml/book.txml: Remove trailing whitespace.
2402 * doc/xml/chapter.txml: Likewise.
2403 * doc/xml/class.txml: Likewise.
2404 * doc/xml/gnu/fdl-1.3.xml: Likewise.
2405 * doc/xml/gnu/gpl-3.0.xml: Likewise.
2406 * doc/xml/manual/abi.xml: Likewise.
2407 * doc/xml/manual/algorithms.xml: Likewise.
2408 * doc/xml/manual/allocator.xml: Likewise.
2409 * doc/xml/manual/appendix_contributing.xml: Likewise.
2410 * doc/xml/manual/appendix_free.xml: Likewise.
2411 * doc/xml/manual/appendix_porting.xml: Likewise.
2412 * doc/xml/manual/atomics.xml: Likewise.
2413 * doc/xml/manual/auto_ptr.xml: Likewise.
2414 * doc/xml/manual/backwards_compatibility.xml: Likewise.
2415 * doc/xml/manual/bitmap_allocator.xml: Likewise.
2416 * doc/xml/manual/build_hacking.xml: Likewise.
2417 * doc/xml/manual/codecvt.xml: Likewise.
2418 * doc/xml/manual/concurrency.xml: Likewise.
2419 * doc/xml/manual/concurrency_extensions.xml: Likewise.
2420 * doc/xml/manual/configure.xml: Likewise.
2421 * doc/xml/manual/containers.xml: Likewise.
2422 * doc/xml/manual/ctype.xml: Likewise.
2423 * doc/xml/manual/debug.xml: Likewise.
2424 * doc/xml/manual/debug_mode.xml: Likewise.
2425 * doc/xml/manual/diagnostics.xml: Likewise.
2426 * doc/xml/manual/documentation_hacking.xml: Likewise.
2427 * doc/xml/manual/evolution.xml: Likewise.
2428 * doc/xml/manual/internals.xml: Likewise.
2429 * doc/xml/manual/intro.xml: Likewise.
2430 * doc/xml/manual/io.xml: Likewise.
2431 * doc/xml/manual/iterators.xml: Likewise.
2432 * doc/xml/manual/locale.xml: Likewise.
2433 * doc/xml/manual/localization.xml: Likewise.
2434 * doc/xml/manual/messages.xml: Likewise.
2435 * doc/xml/manual/mt_allocator.xml: Likewise.
2436 * doc/xml/manual/numerics.xml: Likewise.
2437 * doc/xml/manual/parallel_mode.xml: Likewise.
2438 * doc/xml/manual/policy_data_structures.xml: Likewise.
2439 * doc/xml/manual/prerequisites.xml: Likewise.
2440 * doc/xml/manual/shared_ptr.xml: Likewise.
2441 * doc/xml/manual/spine.xml: Likewise.
2442 * doc/xml/manual/status_cxxtr1.xml: Likewise.
2443 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
2444 * doc/xml/manual/strings.xml: Likewise.
2445 * doc/xml/manual/support.xml: Likewise.
2446 * doc/xml/manual/test.xml: Likewise.
2447 * doc/xml/manual/test_policy_data_structures.xml: Likewise.
2448 * doc/xml/manual/using.xml: Likewise.
2449 * doc/xml/manual/using_exceptions.xml: Likewise.
2450 * doc/xml/manual/utilities.xml: Likewise.
2451 * doc/html/*: Regenerate.
2453 2020-10-12 Patrick Palka <ppalka@redhat.com>
2455 * include/std/ranges (take_while_view::begin): Constrain the
2456 const overload further as per LWG 3450.
2457 (take_while_view::end): Likewise.
2458 * testsuite/std/ranges/adaptors/take_while.cc: Add test for LWG
2461 2020-10-12 Patrick Palka <ppalka@redhat.com>
2464 * include/std/ranges (take_view::_CI): Define this alias
2465 template as per LWG 3449 and remove ...
2466 (take_view::_Sentinel::_CI): ... this type alias.
2467 (take_view::_Sentinel::operator==): Adjust use of _CI
2468 accordingly. Define a second overload that accepts an iterator
2469 of the opposite constness as per LWG 3449.
2470 (take_while_view::_Sentinel::operator==): Likewise.
2471 * testsuite/std/ranges/adaptors/95322.cc: Add tests for LWG 3449.
2473 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
2475 * doc/doxygen/user.cfg.in: Update to Doxygen 1.8.20 format.
2477 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
2479 * doc/doxygen/user.cfg.in (PREDEFINED): Use __cplusplus=201703L
2480 so that C++17 features are documented.
2482 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
2484 * include/bits/stl_algobase.h (copy, move, copy_backward)
2485 (move_backward): Fix documentation for returned iterator.
2487 2020-10-12 Martin Sebor <msebor@redhat.com>
2490 * libsupc++/new (operator new): Add attribute alloc_size and malloc.
2492 2020-10-11 Clement Chigot <clement.chigot@atos.net>
2494 * config/os/aix/t-aix: Add complementary mode object file to
2497 2020-10-10 Jonathan Wakely <jwakely@redhat.com>
2500 * doc/html/manual/source_code_style.html: Regenerate.
2501 * doc/xml/manual/appendix_contributing.xml: Add __deref to
2503 * include/debug/functions.h (_Irreflexive_checker::__deref):
2505 * testsuite/17_intro/badnames.cc: Check __deref.
2507 2020-10-10 Ville Voutilainen <ville.voutilainen@gmail.com>
2509 * include/std/variant (__check_visitor_result):
2510 Use size_t for indexes.
2511 (__check_visitor_results): Likewise.
2513 2020-10-09 Ville Voutilainen <ville.voutilainen@gmail.com>
2516 * include/std/variant (__deduce_visit_result): Add a nested ::type.
2517 (__gen_vtable_impl</*base case*/>::_S_apply):
2518 Check the visitor return type.
2519 (__same_types): New.
2520 (__check_visitor_result): Likewise.
2521 (__check_visitor_results): Likewise.
2522 (visit(_Visitor&&, _Variants&&...)): Use __check_visitor_results
2523 in case we're visiting just one variant.
2524 * testsuite/20_util/variant/visit_neg.cc: Adjust.
2526 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
2529 * include/bits/random.tcc (seed_seq::generate): Use uint32_t for
2530 calculations. Also split the first loop into three loops to
2531 avoid branching on k on every iteration, resolving PR 94823.
2532 * testsuite/26_numerics/random/seed_seq/97311.cc: New test.
2533 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-erro
2536 2020-10-09 Daniel Lemire <lemire@gmail.com>
2538 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
2539 New member function implementing Lemire's "nearly divisionless"
2541 (uniform_int_distribution::operator()): Use _S_nd when the range
2542 of the URBG is the full width of the result type.
2544 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
2546 * testsuite/Makefile.am: Set and export variable separately.
2547 * testsuite/Makefile.in: Regenerate.
2549 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
2551 * scripts/check_performance: Use gnu++11 instead of gnu++0x.
2552 * testsuite/Makefile.am (check-performance): Export CXXFLAGS to
2554 * testsuite/Makefile.in: Regenerate.
2556 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
2558 * testsuite/performance/26_numerics/random_dist.cc: New test.
2560 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
2562 * testsuite/util/testsuite_performance.h (report_header): Remove
2565 2020-10-08 Patrick Palka <ppalka@redhat.com>
2568 * include/bits/ranges_uninitialized.h:
2569 (__construct_at_fn::operator()): Rewrite in terms of
2570 std::construct_at. Declare it conditionally noexcept. Qualify
2571 calls to declval in its requires-clause.
2572 * testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
2575 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
2578 * include/bits/random.tcc
2579 (discrete_distribution::param_type::_M_initialize)
2580 (piecewise_constant_distribution::param_type::_M_initialize)
2581 (piecewise_linear_distribution::param_type::_M_initialize):
2582 Add assertions for positive sums..
2583 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
2586 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
2588 * include/bits/ios_base.h (ios_base::failure): Add constructors
2589 takeing error_code argument. Add code() member function.
2590 * testsuite/27_io/ios_base/failure/cxx11.cc: Allow test to
2591 run for the old ABI but do not check for derivation from
2593 * testsuite/27_io/ios_base/failure/error_code.cc: New test.
2595 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
2597 * include/bits/random.h (__detail::_Mod): Revert last change.
2598 (__detail::__mod): Do not use _Mod for a==0 case.
2599 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
2600 Check other cases with a==0. Also check runtime results.
2601 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
2604 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
2606 * include/bits/random.h (__detail::_Mod): Avoid divide by zero.
2607 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
2610 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
2612 * include/bits/random.h (seed_seq(initializer_list<T>)): Rename
2613 parameter to use reserved name.
2614 * include/bits/ranges_algo.h (shift_left, shift_right): Rename
2615 template parameters to use reserved name.
2616 * libsupc++/exception_ptr.h (exception_ptr): Likewise for
2617 parameters and local variables.
2618 * testsuite/17_intro/names.cc: Check "il". Do not check "d" and
2621 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
2624 * config/abi/pre/gnu.ver (CXXABI_1.3.13): New symbol version.
2625 (exception_ptr::_M_addref(), exception_ptr::_M_release()):
2627 * libsupc++/eh_ptr.cc (exception_ptr::exception_ptr()):
2628 Remove out-of-line definition.
2629 (exception_ptr::exception_ptr(const exception_ptr&)):
2631 (exception_ptr::~exception_ptr()): Likewise.
2632 (exception_ptr::operator=(const exception_ptr&)):
2634 (exception_ptr::swap(exception_ptr&)): Likewise.
2635 (exception_ptr::_M_addref()): Add branch prediction.
2636 * libsupc++/exception_ptr.h (exception_ptr::operator bool):
2638 [!_GLIBCXX_EH_PTR_COMPAT] (operator==, operator!=): Define
2639 inline as hidden friends. Remove declarations at namespace
2641 (exception_ptr::exception_ptr()): Define inline.
2642 (exception_ptr::exception_ptr(const exception_ptr&)):
2644 (exception_ptr::~exception_ptr()): Likewise.
2645 (exception_ptr::operator=(const exception_ptr&)):
2647 (exception_ptr::swap(exception_ptr&)): Likewise.
2648 * testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.13.
2649 * testsuite/18_support/exception_ptr/90295.cc: New test.
2651 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
2653 * include/std/ranges (join_view): Remove deduction guide.
2654 (views::join): Add explicit template argument list to prevent
2655 deducing the wrong type.
2656 * testsuite/std/ranges/adaptors/join.cc: Move test for LWG 3474
2658 * testsuite/std/ranges/adaptors/join_lwg3474.cc: Removed.
2660 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
2662 * include/bits/regex.h: Use __int_traits<int> instead of
2663 std::numeric_limits<int>.
2664 * include/bits/uniform_int_dist.h: Use __int_traits<T>::__max
2665 instead of std::numeric_limits<T>::max().
2666 * include/bits/hashtable_policy.h: Use size_t(-1) instead of
2667 std::numeric_limits<size_t>::max().
2668 * include/std/regex: Include <ext/numeric_traits.h>.
2669 * include/std/string_view: Use typedef for __int_traits<int>.
2670 * src/c++11/hashtable_c++0x.cc: Use size_t(-1) instead of
2671 std::numeric_limits<size_t>::max().
2672 * testsuite/std/ranges/iota/96042.cc: Include <limits>.
2673 * testsuite/std/ranges/iota/difference_type.cc: Likewise.
2674 * testsuite/std/ranges/subrange/96042.cc: Likewise.
2676 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
2678 * include/std/numeric: Move all #include directives to the top
2680 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line
2682 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
2684 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
2686 * config/abi/pre/gnu.ver: Add new symbol.
2687 * include/bits/functexcept.h (__throw_bad_array_new_length):
2688 Declare new function.
2689 * include/ext/malloc_allocator.h (malloc_allocator::allocate):
2690 Throw bad_array_new_length for impossible sizes (LWG 3190).
2691 * include/ext/new_allocator.h (new_allocator::allocate):
2693 * include/std/memory_resource (polymorphic_allocator::allocate)
2694 (polymorphic_allocator::allocate_object): Use new function,
2695 __throw_bad_array_new_length.
2696 * src/c++11/functexcept.cc (__throw_bad_array_new_length):
2698 * testsuite/20_util/allocator/lwg3190.cc: New test.
2700 2020-10-05 Mike Crowe <mac@mcrowe.com>
2703 * include/bits/atomic_futex.h:
2704 (__atomic_futex_unsigned::_M_load_when_equal_until): Use target
2705 clock duration type when rounding.
2706 * testsuite/30_threads/async/async.cc (test_pr91486_wait_for):
2707 Rename from test_pr91486.
2708 (float_steady_clock): New class for test.
2709 (test_pr91486_wait_until): New test.
2711 2020-10-05 Mike Crowe <mac@mcrowe.com>
2713 * testsuite/20_util/duration_cast/rounding_c++11.cc: Copy
2714 rounding.cc and alter to support compilation for C++11 and to
2715 test std::chrono::__detail::ceil.
2717 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
2719 * testsuite/29_atomics/atomic_float/value_init.cc: Use float
2720 instead of double so that __atomic_load_8 isn't needed.
2722 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
2724 * testsuite/18_support/96817.cc: Use terminate handler that
2727 2020-10-02 Patrick Palka <ppalka@redhat.com>
2729 * include/bits/stl_iterator.h (reverse_iterator::iter_move):
2730 Define for C++20 as per P0896.
2731 (reverse_iterator::iter_swap): Likewise.
2732 (move_iterator::operator*): Apply P0896 changes for C++20.
2733 (move_iterator::operator[]): Likewise.
2734 * testsuite/24_iterators/reverse_iterator/cust.cc: New test.
2736 2020-10-01 Jonathan Wakely <jwakely@redhat.com>
2738 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
2739 Do not try to dereference return value of __atomic_load_n.
2741 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
2743 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
2744 (_GLIBCXX_GUARD_SET_AND_RELEASE): Define for EABI.
2746 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
2748 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_IS_SAME):
2749 Define for GCC 11 or when !__is_identifier(__is_same).
2750 (_GLIBCXX_BUILTIN_IS_SAME_AS): Remove.
2751 * include/std/type_traits (is_same, is_same_v): Replace uses
2752 of _GLIBCXX_BUILTIN_IS_SAME_AS.
2754 2020-09-28 Patrick Palka <ppalka@redhat.com>
2756 * include/std/ranges (filter_view): Declare the data member
2757 _M_base last instead of first, and adjust constructors' member
2758 initializer lists accordingly.
2759 (transform_view): Likewise.
2760 (take_view): Likewise.
2761 (take_while_view): Likewise.
2762 (drop_view): Likewise.
2763 (drop_while_view): Likewise.
2764 (join_view): Likewise.
2765 (split_view): Likewise (and tweak nearby formatting).
2766 (reverse_view): Likewise.
2767 * testsuite/std/ranges/adaptors/sizeof.cc: Update expected
2770 2020-09-28 Patrick Palka <ppalka@redhat.com>
2772 * testsuite/std/ranges/adaptors/sizeof.cc: New test.
2774 2020-09-28 Patrick Palka <ppalka@redhat.com>
2776 * include/bits/ranges_util.h (subrange::_M_end): Give it
2777 [[no_unique_address]].
2778 * testsuite/std/ranges/subrange/sizeof.cc: New test.
2780 2020-09-28 Patrick Palka <ppalka@redhat.com>
2782 * include/std/ranges (iota_view::_M_bound): Give it
2783 [[no_unique_address]].
2784 * testsuite/std/ranges/iota/iota_view.cc: Check that an
2785 unbounded iota_view has minimal size.
2787 2020-09-27 Clement Chigot <clement.chigot@atos.net>
2789 * config/os/aix/t-aix: Use $(AR) without -X32_64.
2791 2020-09-26 Jonathan Wakely <jwakely@redhat.com>
2794 * include/ext/atomicity.h (__gnu_cxx::__is_single_threaded()):
2795 New function wrapping __libc_single_threaded if available.
2796 (__exchange_and_add_dispatch, __atomic_add_dispatch): Use it.
2797 * libsupc++/guard.cc (__cxa_guard_acquire, __cxa_guard_abort)
2798 (__cxa_guard_release): Likewise.
2799 * testsuite/18_support/96817.cc: New test.
2801 2020-09-25 Jonathan Wakely <jwakely@redhat.com>
2803 * libsupc++/Makefile.am: Remove redundant -std=gnu++1z flags.
2804 * libsupc++/Makefile.in: Regenerate.
2806 2020-09-24 Antony Polukhin <antoshkka@gmail.com>
2809 * include/std/type_traits (invoke_result, is_invocable)
2810 (is_invocable_r, is_nothrow_invocable, is_nothrow_invocable_r):
2811 Add static_asserts to make sure that the arguments of the type
2812 traits are not misused with incomplete types.
2813 * testsuite/20_util/invoke_result/incomplete_args_neg.cc: New test.
2814 * testsuite/20_util/is_invocable/incomplete_args_neg.cc: New test.
2815 * testsuite/20_util/is_invocable/incomplete_neg.cc: New test.
2816 * testsuite/20_util/is_nothrow_invocable/incomplete_args_neg.cc:
2818 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: Check
2819 for error on incomplete type usage in trait.
2821 2020-09-24 Patrick Palka <ppalka@redhat.com>
2823 * include/std/ranges (__detail::__boxable): Split out the
2824 associated constraints of __box into here.
2825 (__detail::__box): Use the __boxable concept. Define a leaner
2826 partial specialization for semiregular types.
2827 (single_view::_M_value): Give it [[no_unique_address]].
2828 (filter_view::_M_pred): Likewise.
2829 (transform_view::_M_fun): Likewise.
2830 (take_while_view::_M_pred): Likewise.
2831 (drop_while_view::_M_pred):: Likewise.
2832 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc: New
2835 2020-09-24 Jonathan Wakely <jwakely@redhat.com>
2837 * doc/xml/manual/configure.xml: Correct name of option.
2838 * doc/html/*: Regenerate.
2840 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
2843 * src/c++17/fs_path.cc (path::_Parser::root_path()): Check
2844 for empty string before inspecting the first character.
2845 * testsuite/27_io/filesystem/path/append/source.cc: Append
2846 empty string_view to path.
2848 2020-09-22 Glen Joseph Fernandes <glenjofe@gmail.com>
2850 * include/bits/align.h (align): Fix overflow handling.
2851 * testsuite/20_util/align/3.cc: New test.
2853 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
2855 * include/Makefile.am: Add new headers and adjust for renamed
2857 * include/Makefile.in: Regenerate.
2858 * include/bits/iterator_concepts.h: Adjust for renamed header.
2859 * include/bits/range_access.h (ranges::*): Move to new
2860 <bits/ranges_base.h> header.
2861 * include/bits/ranges_algobase.h: Include new <bits/ranges_base.h>
2862 header instead of <ranges>.
2863 * include/bits/ranges_algo.h: Include new <bits/ranges_util.h>
2865 * include/bits/range_cmp.h: Moved to...
2866 * include/bits/ranges_cmp.h: ...here.
2867 * include/bits/ranges_base.h: New header.
2868 * include/bits/ranges_util.h: New header.
2869 * include/experimental/string_view: Include new
2870 <bits/ranges_base.h> header.
2871 * include/std/functional: Adjust for renamed header.
2872 * include/std/ranges (ranges::view_base, ranges::enable_view)
2873 (ranges::dangling, ranges::borrowed_iterator_t): Move to new
2874 <bits/ranges_base.h> header.
2875 (ranges::view_interface, ranges::subrange)
2876 (ranges::borrowed_subrange_t): Move to new <bits/ranges_util.h>
2878 * include/std/span: Include new <bits/ranges_base.h> header.
2879 * include/std/string_view: Likewise.
2880 * testsuite/24_iterators/back_insert_iterator/pr93884.cc: Add
2881 missing <ranges> header.
2882 * testsuite/24_iterators/front_insert_iterator/pr93884.cc:
2885 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
2889 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
2890 Use correct value category in __use_alloc call.
2891 * testsuite/20_util/tuple/cons/96803.cc: Check with constructors
2892 that require correct value category to be used.
2894 2020-09-22 Patrick Palka <ppalka@redhat.com>
2896 * include/std/span (span::front): Remove static_assert.
2897 (span::back): Likewise.
2898 (span::operator[]): Likewise.
2899 * testsuite/23_containers/span/back_neg.cc: Rewrite to verify
2900 that we check the preconditions of back() only when it's called.
2901 * testsuite/23_containers/span/front_neg.cc: Likewise for
2903 * testsuite/23_containers/span/index_op_neg.cc: Likewise for
2906 2020-09-22 Patrick Palka <ppalka@redhat.com>
2908 * include/bits/stl_algo.h (__sample): Exit early when the
2909 input range is empty.
2910 * testsuite/25_algorithms/sample/3.cc: New test.
2912 2020-09-22 Patrick Palka <ppalka@redhat.com>
2914 * include/bits/stl_algo.h (for_each_n): Mark constexpr for C++20.
2915 (search): Likewise for the overload that takes a searcher.
2916 * testsuite/25_algorithms/for_each/constexpr.cc: Test constexpr
2918 * testsuite/25_algorithms/search/constexpr.cc: Test constexpr
2919 std::search overload that takes a searcher.
2921 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2923 * include/bits/c++config (__replacement_assert): Add noreturn
2925 (__glibcxx_assert_impl): Use __builtin_expect to hint that the
2926 assertion is expected to pass.
2928 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2930 * include/std/ranges (drop_view::begin()): Adjust constraints
2931 to match the correct condition for O(1) ranges::next (LWG 3482).
2932 * testsuite/std/ranges/adaptors/drop.cc: Check that iterator is
2933 cached for non-sized_range.
2935 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2937 * include/std/ranges (transform_view, elements_view): Relax
2938 constraints on operator- for iterators, as per LWG 3483.
2939 * testsuite/std/ranges/adaptors/elements.cc: Check that we
2940 can take the difference of two iterators from a non-random
2942 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
2944 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2947 * include/bits/align.h (align) [!_GLIBCXX_USE_C99_STDINT_TR1]:
2949 (assume_aligned): Do not use __builtin_assume_aligned during
2950 constant evaluation.
2951 * testsuite/20_util/assume_aligned/1.cc: Improve test.
2952 * testsuite/20_util/assume_aligned/97132.cc: New test.
2954 2020-09-20 Jonathan Wakely <jwakely@redhat.com>
2957 * include/std/functional (bind_front): Fix order of parameters
2958 in is_nothrow_constructible_v specialization.
2959 * testsuite/20_util/function_objects/bind_front/97101.cc: New test.
2961 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
2963 * include/std/memory: Move #include <bits/align.h> inside C++11
2964 conditional includes.
2966 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
2968 * include/Makefile.am (bits_headers): Add new header.
2969 * include/Makefile.in: Regenerate.
2970 * include/bits/align.h: New file.
2971 * include/std/memory (align): Move definition to bits/align.h.
2972 (assume_aligned): Likewise.
2974 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
2976 * include/std/chrono [C++17] (chrono::__detail::ceil): Add
2977 using declaration to make chrono::ceil available for internal
2978 use with a consistent name.
2979 (chrono::__detail::__ceil_impl): New function template.
2980 (chrono::__detail::ceil): Use __ceil_impl to compare and
2981 increment the value. Remove SFINAE constraint.
2983 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
2985 * include/bits/regex_error.h (__throw_regex_error): Fix
2986 parameter declaration and use reserved attribute names.
2988 2020-09-11 Mike Crowe <mac@mcrowe.com>
2990 * include/std/condition_variable (condition_variable::wait_until):
2991 Convert delta to steady_clock duration before adding to current
2992 steady_clock time to avoid rounding errors described in PR68519.
2993 (condition_variable::wait_for): Simplify calculation of absolute
2994 time by using chrono::__detail::ceil in both overloads.
2995 * testsuite/30_threads/condition_variable/members/68519.cc:
2996 (test_wait_for): Renamed from test01. Replace unassigned val
2997 variable with constant false. Reduce scope of mx and cv
2998 variables to just test_wait_for function.
2999 (test_wait_until): Add new test case.
3001 2020-09-11 Mike Crowe <mac@mcrowe.com>
3004 * include/bits/atomic_futex.h
3005 (__atomic_futex_unsigned::_M_load_when_equal_for)
3006 (__atomic_futex_unsigned::_M_load_when_equal_until): Use
3007 __detail::ceil to convert delta to the reference clock
3008 duration type to avoid resolution problems.
3009 * include/std/chrono (__detail::ceil): Move implementation
3010 of std::chrono::ceil into private namespace so that it's
3011 available to pre-C++17 code.
3012 * testsuite/30_threads/async/async.cc (test_pr91486):
3013 Test __atomic_futex_unsigned::_M_load_when_equal_for.
3015 2020-09-11 Mike Crowe <mac@mcrowe.com>
3017 * include/bits/atomic_futex.h
3018 (__atomic_futex_unsigned::_M_load_when_equal_until): Add
3019 loop on generic _Clock to check the timeout against _Clock
3020 again after _M_load_when_equal_until returns indicating a
3022 * testsuite/30_threads/async/async.cc: Invent slow_clock
3023 that runs at an eleventh of steady_clock's speed. Use it
3024 to test the user-supplied-clock variant of
3025 __atomic_futex_unsigned::_M_load_when_equal_until works
3026 generally with test03 and loops correctly when the timeout
3027 time hasn't been reached in test04.
3029 2020-09-11 Mike Crowe <mac@mcrowe.com>
3032 * include/bits/atomic_futex.h (__atomic_futex_unsigned): Change
3033 __clock_t typedef to use steady_clock so that unknown clocks are
3034 synced to it rather than system_clock. Change existing __clock_t
3035 overloads of _M_load_and_text_until_impl and
3036 _M_load_when_equal_until to use system_clock explicitly. Remove
3037 comment about DR 887 since these changes address that problem as
3038 best as we currently able.
3040 2020-09-11 Mike Crowe <mac@mcrowe.com>
3043 * config/abi/pre/gnu.ver: Update for addition of
3044 __atomic_futex_unsigned_base::_M_futex_wait_until_steady.
3045 * include/bits/atomic_futex.h (__atomic_futex_unsigned_base):
3046 Add comments to clarify that _M_futex_wait_until and
3047 _M_load_and_test_until use CLOCK_REALTIME.
3048 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady)
3049 (__atomic_futex_unsigned_base::_M_load_and_text_until_steady):
3050 New member functions that use CLOCK_MONOTONIC.
3051 (__atomic_futex_unsigned_base::_M_load_and_test_until_impl)
3052 (__atomic_futex_unsigned_base::_M_load_when_equal_until): Add
3053 overloads that accept a steady_clock time_point and use the
3054 new member functions.
3055 * src/c++11/futex.cc: Include headers required for
3057 (futex_clock_monotonic_flag): New constant to tell futex to
3058 use CLOCK_MONOTONIC to match existing futex_clock_realtime_flag.
3059 (futex_clock_monotonic_unavailable): New global to store the
3060 result of trying to use CLOCK_MONOTONIC.
3061 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady): Add
3062 new variant of _M_futex_wait_until that uses CLOCK_MONOTONIC to
3063 support waiting using steady_clock.
3065 2020-09-11 Mike Crowe <mac@mcrowe.com>
3067 * src/c++11/futex.cc: Add new constants for required futex
3068 flags. Add futex_clock_realtime_unavailable flag to store
3069 result of trying to use FUTEX_CLOCK_REALTIME.
3070 (__atomic_futex_unsigned_base::_M_futex_wait_until): Try to
3071 use FUTEX_WAIT_BITSET with FUTEX_CLOCK_REALTIME and only
3072 fall back to using gettimeofday and FUTEX_WAIT if that's not
3075 2020-09-11 Mike Crowe <mac@mcrowe.com>
3077 * testsuite/30_threads/async/async.cc (test02): Test steady_clock
3078 with std::future::wait_until.
3079 (test03): Add new test templated on clock type waiting for future
3080 associated with async to resolve.
3081 (main): Call test03 to test both system_clock and steady_clock.
3083 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
3084 Christophe Lyon <christophe.lyon@linaro.org>
3086 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
3088 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
3089 Christophe Lyon <christophe.lyon@linaro.org>
3091 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
3093 2020-09-11 Christophe Lyon <christophe.lyon@linaro.org>
3095 * include/bits/regex_error.h: Avoid warning with -fno-exceptions.
3097 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3099 * include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in_all):
3100 Add casts to compare types of the same signedness.
3102 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3104 * include/bits/ranges_algobase.h (__equal_fn): Remove unused
3107 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3109 * include/std/version (__cpp_lib_array_constexpr):
3110 (__cpp_lib_constexpr_char_traits): Only define C++17 value when
3113 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3115 * include/experimental/bits/shared_ptr.h (shared_ptr(auto_ptr&&))
3116 (operator=(auto_ptr&&)): Add diagnostic pragmas to suppress
3117 warnings for uses of std::auto_ptr.
3118 * include/experimental/type_traits (is_literal_type_v):
3119 Likewise, for use of std::is_literal_type.
3120 * include/std/condition_variable (condition_variable_any::_Unlock):
3121 Likewise, for use of std::uncaught_exception.
3123 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3125 * include/bits/fs_path.h (path::_List::type()): Avoid narrowing
3127 * include/std/chrono (operator+(const year&, const years&)):
3130 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3132 * include/bits/codecvt.h (codecvt_byname): Remove names of
3135 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3137 * include/bits/locale_facets_nonio.tcc: Adjust whitespace.
3139 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
3141 * include/c_global/cmath (__lerp): Avoid -Wparentheses warnings.
3143 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
3145 * include/bits/atomic_base.h: Fix -Wunused-variable
3147 * include/ext/new_allocator.h: Fix -Wunused-parameter
3150 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3152 * include/bits/stl_iterator.h (counted_iterator): Add assertions
3153 to check preconditions added by LWG 3472.
3155 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3158 * src/c++17/memory_resource.cc (munge_options): Round
3159 max_blocks_per_chunk to a multiple of four.
3160 (__pool_resource::_M_alloc_pools()): Simplify slightly.
3161 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
3162 Check that valid pointers are returned when small values are
3163 used for max_blocks_per_chunk.
3165 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
3168 * include/std/memory_resource (monotonic_buffer_resource::do_allocate):
3169 Use __builtin_expect when checking if a new buffer needs to be
3170 allocated from the upstream resource, and for checks for edge
3171 cases like zero sized buffers and allocations.
3172 * src/c++17/memory_resource.cc (aligned_size): New class template.
3173 (aligned_ceil): New helper function to round up to a given
3175 (monotonic_buffer_resource::chunk): Replace _M_size and _M_align
3176 with an aligned_size member. Remove _M_canary member. Change _M_next
3177 to pointer instead of unaligned buffer.
3178 (monotonic_buffer_resource::chunk::allocate): Round up to multiple
3179 of 64 instead of to power of two. Check for size overflow. Remove
3180 redundant check for minimum required alignment.
3181 (monotonic_buffer_resource::chunk::release): Adjust for changes
3183 (monotonic_buffer_resource::_M_new_buffer): Use aligned_ceil.
3184 (big_block): Replace _M_size and _M_align with aligned_size
3186 (big_block::big_block): Check for size overflow.
3187 (big_block::size, big_block::align): Adjust to use aligned_size.
3188 (big_block::alloc_size): Use aligned_ceil.
3189 (munge_options): Use aligned_ceil.
3190 (__pool_resource::allocate): Use big_block::align for alignment.
3191 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Check
3192 upstream resource gets expected values for impossible sizes.
3193 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
3194 Likewise. Adjust checks for expected alignment in existing test.
3196 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
3198 * include/std/chrono (duration::_S_gcd): Use invariant that
3199 neither value is zero initially.
3201 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
3203 * include/std/ranges (__box): Simplify constraints as per LWG 3477.
3205 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
3208 * include/std/tuple (_TupleConstraints<true, T...>): Use
3209 alternative is_constructible instead of std::is_constructible.
3210 * testsuite/20_util/tuple/cons/96592.cc: New test.
3212 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
3214 * include/std/chrono (duration::_S_gcd): Use iterative algorithm
3215 for C++14 and later.
3216 * include/std/numeric (__detail::__gcd): Replace recursive
3217 Euclidean algorithm with iterative version of binary GCD algorithm.
3218 * testsuite/26_numerics/gcd/1.cc: Test additional inputs.
3219 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
3220 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
3221 * testsuite/experimental/numeric/gcd.cc: Test additional inputs.
3222 * testsuite/26_numerics/gcd/2.cc: New test.
3224 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
3227 * testsuite/experimental/numeric/92978.cc: Use experimental::lcm
3230 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
3233 * include/bits/cpp_type_traits.h (__is_memcmp_ordered):
3234 New trait that says if memcmp can be used for ordering.
3235 (__is_memcmp_ordered_with): Likewise, for two types.
3236 * include/bits/deque.tcc (__lex_cmp_dit): Use new traits
3237 instead of __is_byte and __numeric_traits.
3238 (__lexicographical_compare_aux1): Likewise.
3239 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
3241 * include/bits/stl_algobase.h (__lexicographical_compare_aux1)
3242 (__is_byte_iter): Likewise.
3243 * include/std/array (operator<=>): Likewise. Only use memcmp
3244 when std::is_constant_evaluated() is false.
3245 * testsuite/23_containers/array/comparison_operators/96851.cc:
3247 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
3248 Adjust dg-error line numbers.
3250 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
3252 * include/bits/stl_iterator.h: Include <bits/exception_defines.h>
3253 for definitions of __try, __catch and __throw_exception_again.
3254 (counted_iterator::operator++(int)): Use __throw_exception_again
3256 * libsupc++/new: Include <bits/exception.h> not <exception>.
3257 * libsupc++/new_opvnt.cc: Include <bits/exception_defines.h>.
3258 * testsuite/18_support/destroying_delete.cc: Include
3259 <type_traits> for std::is_same_v definition.
3260 * testsuite/20_util/variant/index_type.cc: Qualify size_t.
3262 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
3265 * include/bits/c++config (__glibcxx_assert_impl): Remove
3266 do-while so that uses of the macro need to add it.
3267 (__glibcxx_assert): Rename macro for runtime assertions
3268 to __glibcxx_assert_2.
3269 (__glibcxx_assert_1): Define macro for constexpr assertions.
3270 (__glibcxx_assert): Define macro for constexpr and runtime
3272 * include/bits/range_access.h (ranges::advance): Remove
3273 redundant precondition checks during constant evaluation.
3274 * include/parallel/base.h (_GLIBCXX_PARALLEL_ASSERT): Always
3275 use do-while in macro expansion.
3276 * include/std/ranges (iota_view::iota_view(W, B)): Remove
3279 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
3281 * include/std/chrono (duration::_S_gcd(intmax_t, intmax_t)):
3282 New helper function for finding GCD of two positive intmax_t
3284 (duration::__divide): New helper alias for dividing one period
3286 (duration::__is_harmonic): Use __divide not ratio_divide.
3287 (duration(const duration<R2, P2>&)): Require the duration rep
3288 types to be convertible.
3289 * testsuite/20_util/duration/cons/dr2094.cc: New test.
3290 * testsuite/20_util/duration/requirements/reduced_period.cc:
3291 Fix definition of unused member functions in test type.
3292 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
3293 Adjust expected errors.
3295 2020-08-29 Jonathan Wakely <jwakely@redhat.com>
3297 * include/std/numeric (__detail::__absu(bool)): Make deleted
3298 function a function template, so it will be chosen for calls
3299 with an explicit template argument list.
3300 * testsuite/26_numerics/gcd/gcd_neg.cc: Add dg-prune-output.
3301 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
3303 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
3305 * include/std/chrono (common_type): Fix partial specializations
3306 for a single duration type to use the common_type of the rep.
3307 (duration::operator+, duration::operator-): Fix return types
3308 to also use the common_type of the rep.
3309 * testsuite/20_util/duration/requirements/reduced_period.cc:
3310 Check duration using a rep that has common_type specialized.
3312 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
3315 * include/std/numeric (__abs_integral): Replace with ...
3316 (__detail::__absu): New function template that returns an
3317 unsigned type, guaranteeing it can represent the most
3318 negative signed value.
3319 (__detail::__gcd, __detail::__lcm): Require arguments to
3320 be unsigned and therefore already non-negative.
3321 (gcd, lcm): Convert arguments to absolute value as unsigned
3322 type before calling __detail::__gcd or __detail::__lcm.
3323 * include/experimental/numeric (gcd, lcm): Likewise.
3324 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust expected
3326 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
3327 * testsuite/26_numerics/gcd/92978.cc: New test.
3328 * testsuite/26_numerics/lcm/92978.cc: New test.
3329 * testsuite/experimental/numeric/92978.cc: New test.
3331 2020-08-27 Jonathan Wakely <jwakely@redhat.com>
3333 * include/std/chrono (__duration_common_type): Ensure the
3334 reduced ratio is used. Remove unused partial specialization
3335 using __failure_type.
3336 (common_type): Pass reduced ratios to __duration_common_type.
3337 Add partial specializations for simple cases involving a single
3338 duration or time_point type.
3339 (duration::period): Use reduced ratio.
3340 (duration::operator+(), duration::operator-()): Return duration
3341 type using the reduced ratio.
3342 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
3343 Adjust expected errors.
3344 * testsuite/20_util/duration/requirements/reduced_period.cc: New test.
3346 2020-08-27 Patrick Palka <ppalka@redhat.com>
3348 * include/std/chrono (year_month::operator+): Properly handle a
3349 month value of 0 by casting the month value to int before
3350 subtracting 1 from it so that the difference is sign-extended in
3351 the subsequent addition.
3352 * testsuite/std/time/year_month/1.cc: Test adding months to a
3353 year_month whose month component is below or above the
3354 normalized range of [1,12].
3356 2020-08-27 Patrick Palka <ppalka@redhat.com>
3358 * include/std/chrono
3359 (__detail::__months_years_conversion_disambiguator): Define.
3360 (year_month::operator+=): Templatize the 'months'-based overload
3361 so that the 'years'-based overload is selected in case of
3362 equally-ranked implicit conversion sequences to both 'months'
3363 and 'years' from the supplied argument.
3364 (year_month::operator-=): Likewise.
3365 (year_month::operator+): Likewise.
3366 (year_month::operator-): Likewise.
3367 (year_month_day::operator+=): Likewise.
3368 (year_month_day::operator-=): Likewise.
3369 (year_month_day::operator+): Likewise.
3370 (year_month_day::operator-): Likewise.
3371 (year_month_day_last::operator+=): Likewise.
3372 (year_month_day_last::operator-=): Likewise.
3373 (year_month_day_last::operator+): Likewise
3374 (year_month_day_last::operator-): Likewise.
3375 (year_month_day_weekday::operator+=): Likewise
3376 (year_month_day_weekday::operator-=): Likewise.
3377 (year_month_day_weekday::operator+): Likewise.
3378 (year_month_day_weekday::operator-): Likewise.
3379 (year_month_day_weekday_last::operator+=): Likewise
3380 (year_month_day_weekday_last::operator-=): Likewise.
3381 (year_month_day_weekday_last::operator+): Likewise.
3382 (year_month_day_weekday_last::operator-): Likewise.
3383 (testsuite/std/time/year_month/2.cc): New test.
3384 (testsuite/std/time/year_month_day/2.cc): New test.
3385 (testsuite/std/time/year_month_day_last/2.cc): New test.
3386 (testsuite/std/time/year_month_weekday/2.cc): New test.
3387 (testsuite/std/time/year_month_weekday_last/2.cc): New test.
3388 * testsuite/std/time/year_month/2.cc: New file.
3389 * testsuite/std/time/year_month_day/2.cc: New file.
3390 * testsuite/std/time/year_month_day_last/2.cc: New file.
3391 * testsuite/std/time/year_month_weekday/2.cc: New file.
3392 * testsuite/std/time/year_month_weekday_last/2.cc: New file.
3394 2020-08-27 Patrick Palka <ppalka@redhat.com>
3397 * include/std/ranges (transform_view::sentinel::__distance_from):
3398 Give this a deduced return type.
3399 (transform_view::sentinel::operator-): Adjust the return type so
3400 that it's based on the constness of the iterator rather than
3401 that of the sentinel.
3402 * testsuite/std/ranges/adaptors/95322.cc: Refer to LWG 3488.
3404 2020-08-27 Patrick Palka <ppalka@redhat.com>
3406 * include/std/ranges (elements_view::begin): Adjust constraints.
3407 (elements_view::end): Likewise.
3408 (elements_view::_Sentinel::operator==): Templatize to take both
3409 _Iterator<true> and _Iterator<false>.
3410 (elements_view::_Sentinel::operator-): Likewise.
3411 * testsuite/std/ranges/adaptors/elements.cc: Add testcase for
3412 the example from P1994R1.
3413 * testsuite/std/ranges/adaptors/lwg3406.cc: New test.
3415 2020-08-27 Patrick Palka <ppalka@redhat.com>
3417 * include/std/ranges (elements_view::end): Replace these two
3418 overloads with four new overloads.
3419 (elements_view::_Iterator::operator==): Remove.
3420 (elements_view::_Iterator::operator-): Likewise.
3421 (elements_view::_Sentinel): Define.
3423 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
3425 * include/std/tuple (_Tuple_impl): Whitespaces changes for
3426 consistent indentation. Also use __enable_if_t alias template.
3428 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
3432 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
3433 Replace parameter pack with a type parameter and a pack and pass
3434 the first type to __use_alloc.
3435 * testsuite/20_util/tuple/cons/96803.cc: New test.
3437 2020-08-26 Patrick Palka <ppalka@redhat.com>
3439 * include/std/chrono (year_month_weekday::operator==): Compare
3440 weekday_indexed instead of weekday.
3441 * testsuite/std/time/year_month_weekday/1.cc: Augment testcase.
3443 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
3445 * include/bits/hashtable_policy.h (_Hash_code_base): Change
3446 index of _Hashtable_ebo_helper base class.
3447 * testsuite/23_containers/unordered_map/dup_types.cc: New test.
3449 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
3452 * include/experimental/string_view (basic_string_view):
3453 Enable debug assertions.
3454 * include/std/string_view (basic_string_view):
3457 2020-08-26 François Dumont <fdumont@gcc.gnu.org>
3459 * include/bits/hashtable_policy.h (_Hashtable<>): Rename _H1 into _Hash
3460 _H2 into _RangeHash and _Hash into _Unused.
3461 (_Hastable_base<>): Likewise.
3462 (_Map_base<>): Likewise.
3463 (_Insert_base<>): Likewise.
3464 (_Insert<>): Likewise.
3465 (_Rehash_base<>): Likewise.
3466 (_Local_iterator_base<>): Likewise.
3467 (_Hash_code_base<>): Likewise.
3468 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false>):
3470 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>):
3472 (_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHas, _Unused,
3473 bool>): Remove _Hashtable_ebo_helper<2, _RangeHash> base type..
3474 (_Hash_code_base<>::_M_bucket_index(const _Key&, __hash_code, size_t)):
3476 (_Hash_code_base<>::_M_bucket_index(__hash_code, size_t)): ...this.
3477 (_Local_iterator<>): Remove _H1 and _H2 template parameters.
3478 (_Local_const_iterator<>): Likewise.
3479 (_Equality<>): Likewise.
3480 (_Map_base<>::operator[](const key_type&): Adapt.
3481 (_Map_base<>::operator[](key_type&&): Adapt.
3482 (_Identity::operator()): Add noexcept.
3483 (_Select1st::operator()): Likewise.
3484 (_Hash_code_base<>): Remove _Hashtable_ebo_helper<0, _ExtractKey> base
3486 (_Hash_code_base::_M_extract): Remove.
3487 * include/bits/hashtable.h (_Hashtable<>): Remove _H1 and _H2 template
3488 parameters. Remove _ExtractKey from constructors.
3489 (_Hashtable<>::_M_insert_unique_node(const key_type&, size_t,
3490 __hash_code, __node_type*, size_t)): Replace by...
3491 (_Hashtable<>::_M_insert_unique_node(size_t, __hash_code,
3492 __node_type*, size_t)): ...this.
3493 (_Hashtable<>::_M_insert_muti_node(__node_type*, const key_type&,
3494 __hash_code, __node_type*)): Replace by...
3495 (_Hashtable<>::_M_insert_multi_node(__node_type*, __hash_code,
3496 __node_type*)): ...this.
3497 (_Hashtable<>::__key_extract): Remove.
3498 * include/bits/node_handle.h: Adapt.
3500 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
3502 * testsuite/21_strings/debug/iterator_self_move_assign_neg.cc: Removed.
3503 * testsuite/21_strings/debug/self_move_assign_neg.cc: Removed.
3504 * testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc: Removed.
3505 * testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Removed.
3506 * testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc: Removed.
3507 * testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc: Removed.
3508 * testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc: Removed.
3509 * testsuite/23_containers/list/debug/self_move_assign_neg.cc: Removed.
3510 * testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc: Removed.
3511 * testsuite/23_containers/map/debug/self_move_assign_neg.cc: Removed.
3512 * testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc: Removed.
3513 * testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: Removed.
3514 * testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc: Removed.
3515 * testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: Removed.
3516 * testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc: Removed.
3517 * testsuite/23_containers/set/debug/self_move_assign_neg.cc: Removed.
3518 * testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc: Removed.
3519 * testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc: Removed.
3520 * testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc:
3522 * testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc: Removed.
3523 * testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc:
3525 * testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc: Removed.
3526 * testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc: Removed.
3527 * testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc: Removed.
3528 * testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc: Removed.
3529 * testsuite/23_containers/vector/debug/self_move_assign_neg.cc: Removed.
3531 2020-08-25 Patrick Palka <ppalka@redhat.com>
3533 * include/std/chrono (year_month_weekday::ok): Fix assert.
3535 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
3537 * include/std/future (future, shared_future. promise): Add
3538 is_destructible assertion (LWG 3466). Adjust string-literal for
3539 !is_array and !is_function assertions.
3540 * testsuite/30_threads/future/requirements/lwg3458.cc: Check
3541 types with no accessible destructor. Adjust expected errors.
3542 * testsuite/30_threads/promise/requirements/lwg3466.cc:
3544 * testsuite/30_threads/shared_future/requirements/lwg3458.cc:
3547 2020-08-25 Patrick Palka <ppalka@redhat.com>
3548 Ed Smith-Rowland <3dw4rd@verizon.net>
3549 Jonathan Wakely <jwakely@redhat.com>
3551 * include/std/chrono (time_point::operator++)
3552 (time_point::operator--): Define.
3553 (utc_clock, tai_clock, gps_clock): Forward declare.
3554 (utc_time, utc_seconds, tai_time, tai_seconds, gps_time)
3555 (gps_seconds): Define.
3556 (is_clock<utc_clock>, is_clock<tai_clock>, is_clock<gps_clock>)
3557 (is_clock_v<utc_clock>, is_clock_v<tai_clock>)
3558 (is_clock_v<gps_clock>): Define these specializations.
3559 (leap_second_info): Define.
3560 (day, month, year, weekday, weekday_indexed)
3561 (weekday_last, month_day, month_day_last, month_weekday)
3562 (month_weekday_last, year_month, year_month_day)
3563 (year_month_day_last, year_month_weekday, year_month_weekday_last):
3564 Declare and later define.
3565 (last_spec, last, __detail::__days_per_month)
3566 (__detail::__days_per_month, __detail::__last_day): Define.
3567 (January, February, March, April, May, June, July, August)
3568 (September, October, November, December, Sunday, Monday, Tuesday)
3569 (Wednesday, Thursday, Friday, Saturday): Define.
3570 (weekday::operator[]): Define out-of-line.
3571 (year_month_day::_S_from_days, year_month_day::M_days_since_epoch):
3573 (year_month_day::year_month_day, year_month_day::ok): Likewise.
3574 (__detail::__pow10, hh_mm_ss): Define.
3575 (literals::chrono_literals::operator""d)
3576 (literals::chrono_literals::operator""y): Define.
3577 (is_am, is_pm, make12, make24): Define.
3578 * testsuite/20_util/time_point/4.cc: New test.
3579 * testsuite/std/time/day/1.cc: New test.
3580 * testsuite/std/time/hh_mm_ss/1.cc: New test.
3581 * testsuite/std/time/is_am/1.cc: New test.
3582 * testsuite/std/time/is_pm/1.cc: New test.
3583 * testsuite/std/time/make12/1.cc: New test.
3584 * testsuite/std/time/make24/1.cc: New test.
3585 * testsuite/std/time/month/1.cc: New test.
3586 * testsuite/std/time/month_day/1.cc: New test.
3587 * testsuite/std/time/month_day_last/1.cc: New test.
3588 * testsuite/std/time/month_weekday/1.cc: New test.
3589 * testsuite/std/time/month_weekday_last/1.cc: New test.
3590 * testsuite/std/time/weekday/1.cc: New test.
3591 * testsuite/std/time/weekday_indexed/1.cc: New test.
3592 * testsuite/std/time/weekday_last/1.cc: New test.
3593 * testsuite/std/time/year/1.cc: New test.
3594 * testsuite/std/time/year_month/1.cc: New test.
3595 * testsuite/std/time/year_month_day/1.cc: New test.
3596 * testsuite/std/time/year_month_day_last/1.cc: New test.
3597 * testsuite/std/time/year_month_weekday/1.cc: New test.
3598 * testsuite/std/time/year_month_weekday_last/1.cc: New test.
3600 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
3602 * include/std/ranges (join_view): Add deduction guide (LWG 3474).
3603 * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test.
3605 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
3607 * include/bits/iterator_concepts.h (indirectly_readable): Add
3608 partial specializations to resolve ambiguities (LWG 3446).
3609 * testsuite/24_iterators/associated_types/readable.traits.cc:
3610 Check types with both value_type and element_type.
3612 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
3614 * include/std/ranges (ranges::iota_view::size()): Perform all
3615 calculations in the right unsigned types.
3616 * testsuite/std/ranges/iota/size.cc: New test.
3618 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
3621 * include/std/variant (_Variant_storage): Replace implicit
3622 conversions from size_t to __index_type with explicit casts.
3624 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
3626 * testsuite/30_threads/packaged_task/cons/alloc.cc: Run for
3627 C++11 and skip for C++17 or later.
3629 2020-08-24 Corentin Gay <gay@adacore.com>
3631 * testsuite/20_util/shared_ptr/atomic/3.cc: Do not require POSIX
3632 threads and add -pthread only on targets supporting them.
3633 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
3635 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
3637 * testsuite/30_threads/async/42819.cc: Likewise.
3638 * testsuite/30_threads/async/49668.cc: Likewise.
3639 * testsuite/30_threads/async/54297.cc: Likewise.
3640 * testsuite/30_threads/async/any.cc: Likewise.
3641 * testsuite/30_threads/async/async.cc: Likewise.
3642 * testsuite/30_threads/async/except.cc: Likewise.
3643 * testsuite/30_threads/async/launch.cc: Likewise.
3644 * testsuite/30_threads/async/lwg2021.cc: Likewise.
3645 * testsuite/30_threads/async/sync.cc: Likewise. : Likewise.
3646 * testsuite/30_threads/call_once/39909.cc: Likewise.
3647 * testsuite/30_threads/call_once/49668.cc: Likewise.
3648 * testsuite/30_threads/call_once/60497.cc: Likewise.
3649 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
3650 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
3651 * testsuite/30_threads/condition_variable/54185.cc: Likewise.
3652 * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
3653 * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
3654 * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
3655 * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
3656 * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
3657 * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
3658 * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
3660 * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
3661 * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
3662 * testsuite/30_threads/condition_variable_any/cond.cc: Likewise.
3663 * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
3664 * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
3665 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
3666 * testsuite/30_threads/future/cons/move.cc: Likewise.
3667 * testsuite/30_threads/future/members/45133.cc: Likewise.
3668 * testsuite/30_threads/future/members/get.cc: Likewise.
3669 * testsuite/30_threads/future/members/get2.cc: Likewise.
3670 * testsuite/30_threads/future/members/share.cc: Likewise.
3671 * testsuite/30_threads/future/members/valid.cc: Likewise.
3672 * testsuite/30_threads/future/members/wait.cc: Likewise.
3673 * testsuite/30_threads/future/members/wait_for.cc: Likewise.
3674 * testsuite/30_threads/future/members/wait_until.cc: Likewise.
3675 * testsuite/30_threads/lock/1.cc: Likewise.
3676 * testsuite/30_threads/lock/2.cc: Likewise.
3677 * testsuite/30_threads/lock/3.cc: Likewise.
3678 * testsuite/30_threads/lock/4.cc: Likewise.
3679 * testsuite/30_threads/mutex/cons/1.cc: Likewise.
3680 * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
3681 * testsuite/30_threads/mutex/lock/1.cc: Likewise.
3682 * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
3683 * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
3684 * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
3685 * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
3686 * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
3687 * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
3688 * testsuite/30_threads/packaged_task/49668.cc: Likewise.
3689 * testsuite/30_threads/packaged_task/60564.cc: Likewise.
3690 * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
3691 * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
3692 * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
3693 * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
3694 * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
3695 * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
3696 * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
3697 * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
3699 * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
3700 * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
3701 * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
3702 * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
3703 * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
3704 * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
3705 * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
3706 * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
3707 * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
3708 * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
3709 * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
3710 * testsuite/30_threads/promise/60966.cc: Likewise.
3711 * testsuite/30_threads/promise/cons/1.cc: Likewise.
3712 * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
3713 * testsuite/30_threads/promise/cons/move.cc: Likewise.
3714 * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
3715 * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
3716 * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
3717 * testsuite/30_threads/promise/members/get_future.cc: Likewise.
3718 * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
3719 * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
3720 * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
3721 * testsuite/30_threads/promise/members/set_value.cc: Likewise.
3722 * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
3723 * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
3724 * testsuite/30_threads/promise/members/swap.cc: Likewise.
3725 * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
3726 * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
3728 * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
3729 * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
3730 * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
3732 * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
3733 * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
3734 * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
3735 * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
3736 * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
3737 * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
3739 * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
3740 * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
3741 * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
3743 * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
3745 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
3746 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
3747 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
3749 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
3751 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
3753 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
3755 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
3757 * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
3758 * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
3759 * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
3760 * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
3761 * testsuite/30_threads/shared_future/members/get.cc: Likewise.
3762 * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
3763 * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
3764 * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
3765 * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
3766 * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
3767 * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
3768 * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
3769 * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
3770 * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
3771 * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
3772 * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
3773 * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
3774 * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
3775 * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
3776 * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
3777 * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
3778 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
3779 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
3780 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
3781 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
3782 * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
3783 * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
3784 * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
3785 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
3786 * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
3787 * testsuite/30_threads/this_thread/1.cc: Likewise.
3788 * testsuite/30_threads/this_thread/sleep_for-mt.cc: Likewise.
3789 * testsuite/30_threads/this_thread/sleep_until-mt.cc: Likewise.
3790 * testsuite/30_threads/thread/cons/1.cc: Likewise.
3791 * testsuite/30_threads/thread/cons/2.cc: Likewise.
3792 * testsuite/30_threads/thread/cons/3.cc: Likewise.
3793 * testsuite/30_threads/thread/cons/4.cc: Likewise.
3794 * testsuite/30_threads/thread/cons/49668.cc: Likewise.
3795 * testsuite/30_threads/thread/cons/5.cc: Likewise.
3796 * testsuite/30_threads/thread/cons/6.cc: Likewise.
3797 * testsuite/30_threads/thread/cons/7.cc: Likewise.
3798 * testsuite/30_threads/thread/cons/8.cc: Likewise.
3799 * testsuite/30_threads/thread/cons/9.cc: Likewise.
3800 * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
3801 * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
3802 * testsuite/30_threads/thread/members/1.cc: Likewise.
3803 * testsuite/30_threads/thread/members/2.cc: Likewise.
3804 * testsuite/30_threads/thread/members/3.cc: Likewise.
3805 * testsuite/30_threads/thread/members/4.cc: Likewise.
3806 * testsuite/30_threads/thread/members/5.cc: Likewise.
3807 * testsuite/30_threads/thread/members/hardware_concurrency.cc:
3809 * testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise.
3810 * testsuite/30_threads/thread/swap/1.cc: Likewise.
3811 * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
3812 * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
3814 * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
3815 * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
3816 * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
3818 * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
3819 * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
3820 * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
3821 * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
3822 * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
3823 * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
3824 * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
3825 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
3826 * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
3827 * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
3828 * testsuite/30_threads/try_lock/1.cc: Likewise.
3829 * testsuite/30_threads/try_lock/2.cc: Likewise.
3830 * testsuite/30_threads/try_lock/3.cc: Likewise.
3831 * testsuite/30_threads/try_lock/4.cc: Likewise.
3832 * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
3833 * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
3834 * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
3835 * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
3836 * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
3837 * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
3838 * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
3839 * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
3840 * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
3841 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
3842 * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
3844 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
3847 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Do not
3848 test "cold" on darwin.
3849 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
3851 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
3853 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
3855 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
3858 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
3861 * testsuite/25_algorithms/pstl/feature_test-2.cc: Require
3862 tbb-backend effective target.
3863 * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
3864 * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
3865 * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
3867 2020-08-20 Jonathan Wakely <jwakely@redhat.com>
3869 * include/bits/iterator_concepts.h [__STRICT_ANSI__]
3870 (incrementable_traits<__int128>): Define specialization.
3871 (incrementable_traits<unsigned __int128>): Likewise.
3872 * testsuite/std/ranges/iota/96042.cc: Test iota_view with
3875 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3876 Patrick Palka <ppalka@redhat.com>
3879 * include/bits/range_access.h (__detail::__to_unsigned_like):
3880 Do not use make_unsigned_t<T> in the return type, as it can
3881 result in an error before the integral<T> constraint is checked.
3882 [__STRICT_ANSI__]: Add overloads for 128-bit integer types.
3883 (__detail::__make_unsigned_like_t): Define as the return type
3884 of __to_unsigned_like.
3885 * testsuite/std/ranges/subrange/96042.cc: New test.
3887 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3889 * include/bits/stl_tree.h (operator!=, operator>, operator<=)
3890 (operator>=): Remove deprecated functions.
3892 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3895 * include/ext/numeric_traits.h (__is_integer_nonstrict): New
3896 trait which is true for 128-bit integers even in strict modes.
3897 (__numeric_traits_integer, __numeric_traits): Use
3898 __is_integer_nonstrict instead of __is_integer.
3899 * include/std/limits [__STRICT_ANSI__ && __SIZEOF_INT128__]
3900 (numeric_limits<__int128>, (numeric_limits<unsigned __int128>):
3902 * testsuite/std/ranges/iota/96042.cc: New test.
3904 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3906 * include/bits/c++config (_GLIBCXX_DEPRECATED_SUGGEST)
3907 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST)
3908 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
3909 Add new macros to comment.
3911 2020-08-19 Patrick Palka <ppalka@redhat.com>
3913 * include/Makefile.am (bits_headers): Add new header
3914 <bits/max_size_type.h>.
3915 * include/Makefile.in: Regenerate.
3916 * include/bits/iterator_concepts.h
3917 (ranges::__detail::__max_diff_type): Remove definition, replace
3918 with forward declaration of class __max_diff_type.
3919 (__detail::__max_size_type): Remove definition, replace with
3920 forward declaration of class __max_size_type.
3921 (__detail::__is_unsigned_int128, __is_signed_int128)
3922 (__is_int128): New concepts.
3923 (__detail::__is_integer_like): Accept __int128 and unsigned
3925 (__detail::__is_signed_integer_like): Accept __int128.
3926 * include/bits/max_size_type.h: New header.
3927 * include/bits/range_access.h: Include <bits/max_size_type.h>.
3928 (__detail::__to_unsigned_like): Two new overloads.
3929 * testsuite/std/ranges/iota/difference_type.cc: New test.
3930 * testsuite/std/ranges/iota/max_size_type.cc: New test.
3932 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3934 * include/bits/c++config (_GLIBCXX_DEPRECATED): Define for all
3936 (_GLIBCXX_DEPRECATED_SUGGEST): New macro for "use 'foo' instead"
3937 message in deprecated warnings.
3938 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST): New
3939 macros for marking features deprecated in C++11.
3940 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
3942 * include/backward/auto_ptr.h (auto_ptr_ref, auto_ptr<void>):
3943 Use _GLIBCXX11_DEPRECATED instead of _GLIBCXX_DEPRECATED.
3944 (auto_ptr): Use _GLIBCXX11_DEPRECATED_SUGGEST.
3945 * include/backward/binders.h (binder1st, binder2nd): Likewise.
3946 * include/bits/ios_base.h (io_state, open_mode, seek_dir)
3947 (streampos, streamoff): Use _GLIBCXX_DEPRECATED_SUGGEST.
3948 * include/std/streambuf (stossc): Replace C++11 attribute
3949 with _GLIBCXX_DEPRECATED_SUGGEST.
3950 * include/std/type_traits (__is_nullptr_t): Use
3951 _GLIBCXX_DEPRECATED_SUGGEST instead of _GLIBCXX_DEPRECATED.
3952 * testsuite/27_io/types/1.cc: Check for deprecated warnings.
3953 Also check for io_state, open_mode and seek_dir typedefs.
3955 2020-08-19 Antony Polukhin <antoshkka@gmail.com>
3958 * include/std/type_traits (invoke_result, is_nothrow_invocable_r)
3959 Add static_asserts to make sure that the argument of the type
3960 trait is not misused with incomplete types.
3961 (is_swappable_with, is_nothrow_swappable_with): Add static_asserts
3962 to make sure that the first and second arguments of the type trait
3963 are not misused with incomplete types.
3964 * testsuite/20_util/invoke_result/incomplete_neg.cc: New test.
3965 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: New test.
3966 * testsuite/20_util/is_nothrow_swappable/incomplete_neg.cc: New test.
3967 * testsuite/20_util/is_nothrow_swappable_with/incomplete_neg.cc: New
3969 * testsuite/20_util/is_swappable_with/incomplete_neg.cc: New test.
3971 2020-08-18 David Edelsohn <dje.gcc@gmail.com>
3972 Clement Chigot <clement.chigot@atos.net>
3974 * config/os/aix/t-aix: Add complementary mode object files to
3977 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
3979 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Check
3980 "cold" isn't used in the library. Also check <cxxabi.h>.
3981 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
3983 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
3985 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
3987 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
3990 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
3993 * include/std/future (__future_base::_S_make_deferred_state)
3994 (__future_base::_S_make_async_state): Remove.
3995 (__future_base::_Deferred_state): Change constructor to accept a
3996 parameter pack of arguments and forward them to the call
3998 (__future_base::_Async_state_impl): Likewise. Replace lambda
3999 expression with a named member function.
4000 (async): Construct state object directly from the arguments,
4001 instead of using thread::__make_invoker, _S_make_deferred_state
4002 and _S_make_async_state. Move shared state into the returned
4004 * include/std/thread (thread::_Call_wrapper): New alias
4005 template for use by constructor and std::async.
4006 (thread::thread(Callable&&, Args&&...)): Create state object
4007 directly instead of using _S_make_state.
4008 (thread::__make_invoker, thread::__decayed_tuple)
4009 (thread::_S_make_state): Remove.
4010 * testsuite/30_threads/async/69724.cc: New test.
4012 2020-08-17 Jonathan Wakely <jwakely@redhat.com>
4017 * include/std/tuple [__has_cpp_attribute(no_unique_address)]
4018 (_Head_base<Idx, Head, true>): New definition of the partial
4019 specialization, using [[no_unique_address]] instead of
4021 * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
4023 * testsuite/20_util/tuple/comparison_operators/93147.cc: New test.
4024 * testsuite/20_util/tuple/creation_functions/55713.cc: New test.
4025 * testsuite/20_util/tuple/element_access/71096.cc: New test.
4027 2020-08-14 Lewis Hyatt <lhyatt@gmail.com>
4029 * testsuite/lib/libstdc++.exp: Use the new option
4030 -fdiagnostics-plain-output.
4032 2020-08-13 Jonathan Wakely <jwakely@redhat.com>
4034 * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Warn if the c_std
4035 option is used and fail unless --enable-cheaders-obsolete is
4037 * configure: Regenerate.
4039 2020-08-12 Jonathan Wakely <jwakely@redhat.com>
4042 * include/bits/basic_string.h (operator=(basic_string&&)): Check
4043 for self-move before copying with char_traits::copy.
4044 * include/bits/hashtable.h (operator=(_Hashtable&&)): Check for
4046 * include/bits/stl_deque.h (_M_move_assign1(deque&&, false_type)):
4047 Check for equal allocators.
4048 * include/bits/stl_list.h (_M_move_assign(list&&, true_type)):
4049 Call clear() instead of _M_clear().
4050 * include/debug/formatter.h (__msg_self_move_assign): Change
4052 * include/debug/macros.h (__glibcxx_check_self_move_assign):
4053 (_GLIBCXX_DEBUG_VERIFY): Remove.
4054 * include/debug/safe_container.h (operator=(_Safe_container&&)):
4055 Remove assertion check for safe move and make it well-defined.
4056 * include/debug/safe_iterator.h (operator=(_Safe_iterator&&)):
4057 Remove assertion check for self-move.
4058 * include/debug/safe_local_iterator.h
4059 (operator=(_Safe_local_iterator&&)): Likewise.
4060 * testsuite/21_strings/basic_string/cons/char/self_move.cc: New test.
4061 * testsuite/23_containers/deque/cons/self_move.cc: New test.
4062 * testsuite/23_containers/forward_list/cons/self_move.cc: New test.
4063 * testsuite/23_containers/list/cons/self_move.cc: New test.
4064 * testsuite/23_containers/set/cons/self_move.cc: New test.
4065 * testsuite/23_containers/unordered_set/cons/self_move.cc: New test.
4066 * testsuite/23_containers/vector/cons/self_move.cc: New test.
4068 2020-08-11 François Dumont <fdumont@gcc.gnu.org>
4071 * include/bits/forward_list.tcc (forward_list<>::remove): Collect nodes
4072 to destroy in an intermediate forward_list.
4073 (forward_list<>::remove_if, forward_list<>::unique): Likewise.
4074 * include/bits/list.tcc (list<>::remove, list<>::unique): Likewise.
4075 (list<>::remove_if): Likewise.
4076 * include/debug/forward_list (forward_list<>::_M_erase_after): Remove.
4077 (forward_list<>::erase_after): Adapt.
4078 (forward_list<>::remove, forward_list<>::remove_if): Collect nodes to
4079 destroy in an intermediate forward_list.
4080 (forward_list<>::unique): Likewise.
4081 * include/debug/list (list<>::remove, list<>::unique): Likewise.
4082 (list<>::remove_if): Likewise.
4083 * testsuite/23_containers/forward_list/operations/91620.cc: New test.
4084 * testsuite/23_containers/list/operations/91620.cc: New test.
4086 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
4088 * testsuite/30_threads/thread/cons/84535.cc: Use a custom
4090 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
4092 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
4095 * include/experimental/executor [!_GLIBCXX_HAS_GTHREADS]:
4096 (execution_context::mutex_type): Define dummy mutex type.
4097 (system_context): Use execution_context::mutex_type.
4098 (system_context) [!_GLIBCXX_HAS_GTHREADS]: Define dummy
4099 thread and condition variable types.
4100 [!_GLIBCXX_HAS_GTHREADS] (system_context::_M_run()): Do not
4102 (system_context::_M_post) [!_GLIBCXX_HAS_GTHREADS]: Throw
4103 an exception when threads aren't available.
4104 (strand::running_in_this_thread()): Defer to _M_state.
4105 (strand::_State::running_in_this_thread()): New function.
4106 (use_future_t): Do not depend on _GLIBCXX_USE_C99_STDINT_TR1.
4107 * include/experimental/io_context (io_context): Use the
4108 execution_context::mutex_type alias. Replace stack of thread
4110 * testsuite/experimental/net/execution_context/use_service.cc:
4111 Enable test for non-pthread targets.
4113 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
4115 * include/experimental/executor (system_context::a__tag): Make
4116 default constructor explicit.
4118 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
4120 * include/experimental/executor (system_context::_M_run()):
4122 * testsuite/experimental/net/system_context/1.cc: New test.
4124 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
4126 * include/std/stop_token: Check _GLIBCXX_HAS_GTHREADS using
4127 #ifdef instead of #if.
4128 (stop_token::_S_yield()): Check _GLIBCXX_HAS_GTHREADS before
4129 using __gthread_yield.
4131 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
4133 * include/std/thread [!_GLIBCXX_HAS_GTHREADS] (this_thread::yield)
4134 (this_thread::sleep_until): Define.
4135 [!_GLIBCXX_HAS_GTHREADS] (this_thread::sleep_for): Define. Replace
4136 use of __gthread_time_t typedef with timespec.
4137 * src/c++11/thread.cc [!_GLIBCXX_HAS_GTHREADS] (__sleep_for):
4139 * testsuite/30_threads/this_thread/2.cc: Moved to...
4140 * testsuite/30_threads/this_thread/yield.cc: ...here.
4141 * testsuite/30_threads/this_thread/3.cc: Moved to...
4142 * testsuite/30_threads/this_thread/sleep_for-mt.cc: ...here.
4143 * testsuite/30_threads/this_thread/4.cc: Moved to...
4144 * testsuite/30_threads/this_thread/sleep_until-mt.cc: ...here.
4145 * testsuite/30_threads/this_thread/58038.cc: Add
4147 * testsuite/30_threads/this_thread/60421.cc: Likewise.
4148 * testsuite/30_threads/this_thread/sleep_for.cc: New test.
4149 * testsuite/30_threads/this_thread/sleep_until.cc: New test.
4151 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
4154 * src/c++17/fs_ops.cc (read_symlink): Use posix::lstat instead
4155 of calling ::lstat directly.
4156 * src/filesystem/ops.cc (read_symlink): Likewise.
4158 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
4160 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
4161 Use gdb.Type.strip_typedefs().
4162 * testsuite/libstdc++-prettyprinters/compat.cc: Use a typedef in
4163 the emulated old type.
4165 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
4168 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
4169 $enable_libstdcxx_filesystem_ts.
4170 * configure: Regenerate.
4172 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
4175 * include/bits/stl_iterator.h (inserter): Do not deduce
4176 iterator type (LWG 561).
4177 * testsuite/24_iterators/insert_iterator/dr561.cc: New test.
4179 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
4181 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI=0]
4182 (basic_string::reserve()): Do nothing if exceptions are not
4185 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
4188 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
4189 (stat_type): Change to __stat64.
4190 (stat): Use _wstat64.
4192 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
4195 * include/debug/bitset (bitset::operator==): Call _M_base() on
4197 (bitset::operator!=): Likewise, but don't define it at all when
4198 default comparisons are supported by the compiler.
4199 * testsuite/23_containers/bitset/operations/96303.cc: New test.
4201 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
4203 * testsuite/18_support/comparisons/algorithms/partial_order.cc:
4204 Replace VERIFY with static_assert where the compiler now
4206 * testsuite/18_support/comparisons/algorithms/weak_order.cc:
4209 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
4211 * config/abi/pre/gnu.ver: Fix wildcards for wstring symbols.
4213 2020-08-06 Andrew Luo <andrewluotechnologies@outlook.com>
4214 Jonathan Wakely <jwakely@redhat.com>
4216 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Use less greedy
4217 patterns for basic_string members.
4218 (GLIBCXX_3.4.29): Export new basic_string::reserve symbols.
4219 * doc/xml/manual/status_cxx2020.xml: Update P0966 status.
4220 * include/bits/basic_string.h (shrink_to_fit()): Call reserve().
4221 (reserve(size_type)): Remove default argument.
4222 (reserve()): Declare new overload.
4223 [!_GLIBCXX_USE_CXX11_ABI] (shrink_to_fit, reserve): Likewise.
4224 * include/bits/basic_string.tcc (reserve(size_type)): Remove
4225 support for shrinking capacity.
4226 (reserve()): Perform shrink-to-fit operation.
4227 [!_GLIBCXX_USE_CXX11_ABI] (reserve): Likewise.
4228 * testsuite/21_strings/basic_string/capacity/1.cc: Adjust to
4229 reflect new behavior.
4230 * testsuite/21_strings/basic_string/capacity/char/1.cc:
4232 * testsuite/21_strings/basic_string/capacity/char/18654.cc:
4234 * testsuite/21_strings/basic_string/capacity/char/2.cc:
4236 * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
4238 * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
4240 * testsuite/21_strings/basic_string/capacity/wchar_t/2.cc:
4243 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
4245 * include/bits/basic_string.tcc
4246 (operator>>(basic_istream&, basic_string&)): Do not set eofbit
4247 if extraction stopped after in.width() characters.
4248 * src/c++98/istream-string.cc (operator>>(istream&, string&)):
4250 * include/bits/istream.tcc (__istream_extract): Do not set
4251 eofbit if extraction stopped after n-1 characters.
4252 * src/c++98/istream.cc (__istream_extract): Likewise.
4253 * testsuite/21_strings/basic_string/inserters_extractors/char/13.cc: New test.
4254 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/13.cc: New test.
4255 * testsuite/27_io/basic_istream/extractors_character/char/5.cc: New test.
4256 * testsuite/27_io/basic_istream/extractors_character/wchar_t/5.cc: New test.
4258 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
4261 * src/c++17/fs_ops.cc (fs::read_symlink): Return an error
4262 immediately for non-symlinks.
4263 * src/filesystem/ops.cc (fs::read_symlink): Likewise.
4265 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
4267 * include/std/istream (operator>>(istream&, char*)): Add
4268 attributes to get warnings for pointers that are null or known
4269 to point to the end of a buffer. Request upper bound from
4270 __builtin_object_size check and handle zero-sized buffer case.
4271 (operator>>(istream&, signed char))
4272 (operator>>(istream&, unsigned char*)): Add attributes.
4273 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
4274 Check extracting into the middle of a buffer.
4275 * testsuite/27_io/basic_istream/extractors_character/wchar_t/overflow.cc: New test.
4277 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
4279 * include/std/atomic (atomic<T>::store): Reformat.
4281 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
4283 * doc/xml/manual/status_cxx2017.xml: Replace oneAPI DPC++ link
4284 with LLVM repo for PSTL.
4285 * doc/html/manual/status.html: Regenerate.
4287 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
4289 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Export new symbols.
4290 * include/bits/istream.tcc (__istream_extract): New function
4291 template implementing both of operator>>(istream&, char*) and
4292 operator>>(istream&, char(&)[N]). Add explicit instantiation
4293 declaration for it. Remove explicit instantiation declarations
4294 for old function templates.
4295 * include/std/istream (__istream_extract): Declare.
4296 (operator>>(basic_istream<C,T>&, C*)): Define inline and simply
4297 call __istream_extract.
4298 (operator>>(basic_istream<char,T>&, signed char*)): Likewise.
4299 (operator>>(basic_istream<char,T>&, unsigned char*)): Likewise.
4300 (operator>>(basic_istream<C,T>&, C(7)[N])): Define for LWG 2499.
4301 (operator>>(basic_istream<char,T>&, signed char(&)[N])):
4303 (operator>>(basic_istream<char,T>&, unsigned char(&)[N])):
4305 * include/std/streambuf (basic_streambuf): Declare char overload
4306 of __istream_extract as a friend.
4307 * src/c++11/istream-inst.cc: Add explicit instantiation
4308 definition for wchar_t overload of __istream_extract. Remove
4309 explicit instantiation definitions of old operator>> overloads
4310 for versioned-namespace build.
4311 * src/c++98/istream.cc (operator>>(istream&, char*)): Replace
4312 with __istream_extract(istream&, char*, streamsize).
4313 * testsuite/27_io/basic_istream/extractors_character/char/3.cc:
4314 Do not use variable-length array.
4315 * testsuite/27_io/basic_istream/extractors_character/char/4.cc:
4316 Do not run test for C++20.
4317 * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
4318 Do not test writing to pointers for C++20.
4319 * testsuite/27_io/basic_istream/extractors_character/char/9826.cc:
4320 Use array instead of pointer.
4321 * testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc:
4322 Do not use variable-length array.
4323 * testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
4324 Do not run test for C++20.
4325 * testsuite/27_io/basic_istream/extractors_character/wchar_t/9555-ic.cc:
4326 Do not test writing to pointers for C++20.
4327 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499.cc:
4329 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
4331 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
4333 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
4335 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
4338 2020-08-01 Gerald Pfeifer <gerald@pfeifer.com>
4340 * doc/xml/manual/using_exceptions.xml: Move www.stroustrup.com to
4342 * doc/html/manual/using_exceptions.html: Regenerate.
4344 2020-07-31 Gerald Pfeifer <gerald@pfeifer.com>
4346 * doc/xml/manual/status_cxx2017.xml: ParallelSTL is now part
4347 of oneAPI DPC++ Library on Github.
4348 * doc/html/manual/status.html: Regenerate.
4350 2020-07-31 François Dumont <fdumont@gcc.gnu.org>
4352 * include/bits/stl_bvector.h
4353 [_GLIBCXX_INLINE_VERSION](_Bvector_impl_data::_M_start): Define as
4355 (_Bvector_impl_data(const _Bvector_impl_data&)): Default.
4356 (_Bvector_impl_data(_Bvector_impl_data&&)): Delegate to latter.
4357 (_Bvector_impl_data::operator=(const _Bvector_impl_data&)): Default.
4358 (_Bvector_impl_data::_M_move_data(_Bvector_impl_data&&)): Use latter.
4359 (_Bvector_impl_data::_M_reset()): Likewise.
4360 (_Bvector_impl_data::_M_swap_data): New.
4361 (_Bvector_impl::_Bvector_impl(_Bvector_impl&&)): Implement explicitely.
4362 (_Bvector_impl::_Bvector_impl(_Bit_alloc_type&&, _Bvector_impl&&)): New.
4363 (_Bvector_base::_Bvector_base(_Bvector_base&&, const allocator_type&)):
4365 (vector::vector(vector&&, const allocator_type&, true_type)): New, use
4367 (vector::vector(vector&&, const allocator_type&, false_type)): New.
4368 (vector::vector(vector&&, const allocator_type&)): Use latters.
4369 (vector::vector(const vector&, const allocator_type&)): Adapt.
4370 [__cplusplus >= 201103](vector::vector(_InputIt, _InputIt,
4371 const allocator_type&)): Use _M_initialize_range.
4372 (vector::operator[](size_type)): Use iterator operator[].
4373 (vector::operator[](size_type) const): Use const_iterator operator[].
4374 (vector::swap(vector&)): Add assertions on allocators. Use _M_swap_data.
4375 [__cplusplus >= 201103](vector::insert(const_iterator, _InputIt,
4376 _InputIt)): Use _M_insert_range.
4377 (vector::_M_initialize(size_type)): Adapt.
4378 [__cplusplus >= 201103](vector::_M_initialize_dispatch): Remove.
4379 [__cplusplus >= 201103](vector::_M_insert_dispatch): Remove.
4380 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Stop
4381 using start _M_offset.
4382 (StdVectorPrinter.to_string): Likewise.
4383 * testsuite/23_containers/vector/bool/allocator/swap.cc: Adapt.
4384 * testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc:
4387 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4389 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Use 0
4391 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
4394 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4396 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
4397 Move struct to namespace scope.
4399 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4401 * testsuite/26_numerics/numbers/float128.cc: Check
4402 __STRICT_ANSI__ before using __float128.
4403 * testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc:
4406 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4408 * testsuite/18_support/set_terminate.cc: Require C++11 or
4410 * testsuite/28_regex/simple_c++11.cc: Likewise.
4411 * testsuite/tr1/headers/c++200x/complex.cc: Likewise.
4412 * testsuite/24_iterators/headers/iterator/synopsis.cc:
4413 Require C++14 or lower.
4415 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4417 * testsuite/23_containers/span/back_assert_neg.cc: Split c++2a
4418 effective-target from xfail selector.
4419 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
4420 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
4421 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
4422 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
4423 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
4424 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
4425 * testsuite/23_containers/span/subspan_2_assert_neg.cc:
4427 * testsuite/23_containers/span/subspan_3_assert_neg.cc:
4429 * testsuite/23_containers/span/subspan_4_assert_neg.cc:
4431 * testsuite/23_containers/span/subspan_5_assert_neg.cc:
4433 * testsuite/23_containers/span/subspan_6_assert_neg.cc:
4435 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
4437 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4439 * testsuite/20_util/reference_wrapper/83427.cc: Adjust
4440 effective-target to specific language mode only.
4441 * testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
4443 * testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
4445 * testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
4447 * testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
4449 * testsuite/26_numerics/valarray/69116.cc:
4451 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
4452 Remove whitespace at end of file.
4453 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
4456 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4458 * testsuite/17_intro/headers/c++2017/all_attributes.cc: Add
4459 c++17 effective-target.
4460 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
4462 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: Likewise.
4463 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
4465 * testsuite/17_intro/headers/c++2017/operator_names.cc:
4467 * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
4468 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
4470 * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
4472 * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
4474 * testsuite/20_util/any/assign/1.cc: Likewise.
4475 * testsuite/20_util/any/assign/2.cc: Likewise.
4476 * testsuite/20_util/any/assign/emplace.cc: Likewise.
4477 * testsuite/20_util/any/assign/exception.cc: Likewise.
4478 * testsuite/20_util/any/assign/self.cc: Likewise.
4479 * testsuite/20_util/any/cons/1.cc: Likewise.
4480 * testsuite/20_util/any/cons/2.cc: Likewise.
4481 * testsuite/20_util/any/cons/aligned.cc: Likewise.
4482 * testsuite/20_util/any/cons/explicit.cc: Likewise.
4483 * testsuite/20_util/any/cons/in_place.cc: Likewise.
4484 * testsuite/20_util/any/cons/nontrivial.cc: Likewise.
4485 * testsuite/20_util/any/make_any.cc: Likewise.
4486 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
4487 * testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
4488 * testsuite/20_util/any/misc/swap.cc: Likewise.
4489 * testsuite/20_util/any/modifiers/1.cc: Likewise.
4490 * testsuite/20_util/any/observers/type.cc: Likewise.
4491 * testsuite/20_util/any/requirements.cc: Likewise.
4492 * testsuite/20_util/any/typedefs.cc: Likewise.
4493 * testsuite/20_util/as_const/1.cc: Likewise.
4494 * testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
4495 * testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
4496 * testsuite/20_util/bool_constant/requirements.cc: Likewise.
4497 * testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
4499 * testsuite/20_util/duration_cast/rounding.cc: Likewise.
4500 * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
4502 * testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
4503 * testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
4504 * testsuite/20_util/function_objects/searchers.cc: Likewise.
4505 * testsuite/20_util/in_place/requirements.cc: Likewise.
4506 * testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
4508 * testsuite/20_util/is_invocable/requirements/typedefs.cc:
4510 * testsuite/20_util/is_invocable/value.cc: Likewise.
4511 * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
4513 * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc:
4515 * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
4517 * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
4519 * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
4520 * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
4522 * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
4524 * testsuite/20_util/is_nothrow_swappable_with/value.cc:
4526 * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
4528 * testsuite/20_util/is_swappable/requirements/typedefs.cc:
4530 * testsuite/20_util/is_swappable/value.cc: Likewise.
4531 * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
4533 * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
4535 * testsuite/20_util/is_swappable_with/value.cc: Likewise.
4536 * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
4538 * testsuite/20_util/logical_traits/requirements/typedefs.cc:
4540 * testsuite/20_util/logical_traits/value.cc: Likewise.
4541 * testsuite/20_util/optional/constexpr/make_optional.cc: Likewise.
4542 * testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
4543 * testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
4544 * testsuite/20_util/optional/hash.cc: Likewise.
4545 * testsuite/20_util/pair/swap_cxx17.cc: Likewise.
4546 * testsuite/20_util/ratio/requirements/ratio_equal_v.cc: Likewise.
4547 * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
4549 * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
4551 * testsuite/20_util/tuple/apply/1.cc: Likewise.
4552 * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
4553 * testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
4554 * testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
4555 * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
4557 * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
4559 * testsuite/20_util/variant/any.cc: Likewise.
4560 * testsuite/20_util/variant/compile.cc: Likewise.
4561 * testsuite/20_util/variant/hash.cc: Likewise.
4562 * testsuite/20_util/variant/index_type.cc: Likewise.
4563 * testsuite/20_util/variant/run.cc: Likewise.
4564 * testsuite/20_util/void_t/1.cc: Likewise.
4565 * testsuite/21_strings/basic_string/79162.cc: Likewise.
4566 * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
4567 * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
4568 * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
4569 * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
4570 * testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
4572 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
4574 * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
4576 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
4578 * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
4580 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
4582 * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
4584 * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
4586 * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
4588 * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
4590 * testsuite/21_strings/basic_string/operations/data/char/2.cc:
4592 * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
4594 * testsuite/21_strings/basic_string/operations/find/char/5.cc:
4596 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
4598 * testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
4599 * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
4601 * testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise.
4602 * testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise.
4603 * testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise.
4604 * testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise.
4605 * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
4607 * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
4609 * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
4611 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
4613 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
4615 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4617 * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
4619 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
4621 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
4623 * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
4625 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
4627 * testsuite/21_strings/basic_string_view/include.cc: Likewise.
4628 * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
4630 * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
4632 * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
4634 * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
4636 * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
4638 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
4640 * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
4642 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
4644 * testsuite/21_strings/basic_string_view/literals/types.cc:
4646 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
4648 * testsuite/21_strings/basic_string_view/literals/values.cc:
4650 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
4652 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
4654 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
4656 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
4658 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
4660 * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
4662 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
4664 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
4666 * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
4668 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
4670 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
4672 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
4674 * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
4676 * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
4678 * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
4680 * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
4682 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
4684 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
4686 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
4688 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
4690 * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
4692 * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
4694 * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
4696 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
4698 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
4700 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
4702 * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
4704 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
4706 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
4708 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
4710 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
4712 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
4714 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
4716 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
4718 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
4720 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
4722 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
4724 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
4726 * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
4727 * testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
4728 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
4730 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
4731 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
4733 * testsuite/23_containers/map/modifiers/merge.cc: Likewise.
4734 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
4735 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
4736 * testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
4737 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
4738 * testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
4739 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
4740 * testsuite/23_containers/set/modifiers/merge.cc: Likewise.
4741 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
4743 * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
4745 * testsuite/23_containers/unordered_map/modifiers/merge.cc:
4747 * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
4749 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
4751 * testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
4753 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
4755 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
4757 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
4759 * testsuite/23_containers/unordered_set/modifiers/merge.cc:
4761 * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
4763 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
4765 * testsuite/25_algorithms/clamp/1.cc: Likewise.
4766 * testsuite/25_algorithms/clamp/2.cc: Likewise.
4767 * testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
4768 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
4770 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
4772 * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
4774 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
4776 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
4778 * testsuite/29_atomics/atomic/is_always_lock_free.cc: Likewise.
4779 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
4781 * testsuite/30_threads/shared_lock/70766.cc: Likewise.
4782 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
4783 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
4785 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc:
4787 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
4789 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
4790 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
4791 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
4793 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4796 * include/bits/stl_iterator.h (reverse_iterator): Friend
4797 declaration should not depend on __cplusplus.
4799 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4801 * testsuite/experimental/filesystem/filesystem_error/cons.cc:
4802 Remove -std=gnu++17 option.
4804 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4806 * testsuite/20_util/is_aggregate/value.cc: Adjust for changes to
4807 definition of aggregates in C++20.
4808 * testsuite/20_util/optional/requirements.cc: Adjust for
4809 defaulted comparisons in C++20.
4811 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4813 * testsuite/20_util/tuple/78939.cc: Suppress warnings about
4814 deprecation of volatile-qualified structured bindings in C++20.
4815 * testsuite/20_util/variable_templates_for_traits.cc: Likewise
4816 for deprecation of is_pod in C++20
4818 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4820 * testsuite/20_util/time_point_cast/rounding.cc: Remove
4821 duplicate dg-do directive and add c++17 effective target.
4823 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4825 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
4826 LC_ALL_MASK not LC_ALL.
4828 2020-07-31 Richard Biener <rguenther@suse.de>
4831 * testsuite/20_util/assume_aligned/3.cc: Use -g0.
4833 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4835 * include/bits/basic_string.h (size_type, difference_type):
4836 Use allocator_traits to obtain the allocator's size_type and
4839 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4842 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
4844 [!_GLIBCXX_USE_C99_STDLIB]: Use strtod for float and long
4847 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4849 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
4850 Use allocator with the correct value type.
4851 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
4854 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4856 * testsuite/20_util/from_chars/4.cc: Pass non-const iterator
4859 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4861 * include/bits/iterator_concepts.h (__detail::__cv_bool): New
4863 (__detail::__integral_nonbool): Likewise.
4864 (__detail::__is_integer_like): Use __integral_nonbool.
4865 * testsuite/std/ranges/access/lwg3467.cc: New test.
4867 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4869 * testsuite/20_util/from_chars/4.cc: Use dg-add-options ieee.
4870 * testsuite/29_atomics/atomic_float/1.cc: Likewise.
4872 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4874 * testsuite/23_containers/vector/bool/72847.cc: Use the
4875 exceptions_enabled effective-target keyword instead of
4876 checking for an explicit -fno-exceptions option.
4877 * testsuite/util/testsuite_abi.cc (examine_symbol): Remove
4878 redundant try-catch.
4879 * testsuite/util/testsuite_allocator.h [!__cpp_exceptions]:
4880 Do not define check_allocate_max_size and memory_resource.
4881 * testsuite/util/testsuite_containers.h: Replace comment with
4882 #error if wrong standard dialect used.
4883 * testsuite/util/testsuite_shared.cc: Likewise.
4885 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
4887 * include/bits/hashtable_policy.h (_Node_iterator_base()): New.
4888 (operator==(const _Node_iterator_base&, const _Node_iterator_base&)):
4890 (operator!=(const _Node_iterator_base&, const _Node_iterator_base&)):
4892 (_Local_iterator_base<>): Inherits _Node_iterator_base.
4893 (_Local_iterator_base<>::_M_cur): Remove.
4894 (_Local_iterator_base<>::_M_curr()): Remove.
4895 (operator==(const _Local_iterator_base&, const _Local_iterator_base&)):
4897 (operator!=(const _Local_iterator_base&, const _Local_iterator_base&)):
4899 * include/debug/unordered_map (unordered_map<>::_M_invalidate): Adapt.
4900 (unordered_multimap<>::_M_invalidate): Adapt.
4901 * include/debug/unordered_set (unordered_set<>::_M_invalidate): Adapt.
4902 (unordered_multiset<>::_M_invalidate): Adapt.
4904 2020-07-29 David Edelsohn <dje.gcc@gmail.com>
4905 Jonathan Wakely <jwakely@redhat.com>
4906 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4908 * testsuite/lib/dg-options.exp (add_options_for_libatomic): Add
4909 target powerpc-ibm-aix* and powerpc*-*-darwin*.
4910 * testsuite/29_atomics/atomic_float/value_init.cc: Add options
4913 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
4915 * include/bits/hashtable.h
4916 (_Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type)):
4917 Add noexcept qualification.
4918 (_Hashtable(_Hashtable&&)): Fix noexcept qualification.
4919 (_Hashtable(_Hashtable&&, const allocator_type&)): Add noexcept
4921 * include/bits/unordered_map.h
4922 (unordered_map(unordered_map&&, const allocator_type&)): Add noexcept
4924 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
4926 * include/bits/unordered_set.h
4927 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
4928 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
4930 * include/debug/unordered_map
4931 (unordered_map(unordered_map&&, const allocator_type&)): Likewise.
4932 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
4934 * include/debug/unordered_set
4935 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
4936 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
4938 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
4940 * testsuite/23_containers/unordered_map/cons/noexcept_default_construct.cc:
4942 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
4944 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
4946 * testsuite/23_containers/unordered_multimap/cons/noexcept_default_construct.cc:
4948 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
4950 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
4952 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
4954 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
4956 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
4958 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
4961 2020-07-28 François Dumont <fdumont@gcc.gnu.org>
4963 * include/bits/hashtable.h
4964 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
4965 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
4966 const allocator_type&, true_type)): New.
4967 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
4968 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
4969 const allocator_type&, false_type)): New.
4970 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
4971 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
4972 const allocator_type&)): Delegate to latters.
4973 (operator=(initializer_list<value_type>)): Rehash if too small.
4974 (_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Remove
4975 size_t len parameter.
4976 * include/bits/hashtable_policy.h (_Insert_base<>::_M_insert_range):
4977 Do not try to get input range distance.
4978 * testsuite/23_containers/unordered_set/cons/bucket_hint.cc: New test.
4979 * testsuite/23_containers/unordered_set/modifiers/insert.cc: New test.
4981 2020-07-27 François Dumont <fdumont@gcc.gnu.org>
4983 * include/bits/hashtable_policy.h (_Map_base<>::at): Use
4985 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals):New.
4986 (_Hashtable_base<>::_M_node_equals): New, use latter.
4987 (_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash,
4988 _RehashPolicy, false>::_M_equal): Adapt to use latter.
4989 * include/bits/hashtable.h (_Hashtable<>::_M_update_bbegin): New.
4990 (_Hashtable<>::_M_assign): Use latter.
4991 (_Hashtable<>::_M_move_assign): Likewise.
4992 (_Hashtable<>(_Hashtable<>&&)): Likewise.
4993 (_Hashtable<>(_Hashtable<>&&, const allocator_type&)): Likewise.
4994 (_Hashtable<>::swap): Likewise.
4995 (_Hashtable<>::find): Build iterator directly from _M_find_node result.
4996 (_Hashtable<>::count): Use _Hashtable<>::find.
4997 (_Hashtable<>::equal_range): Likewise.
4998 (_Hashtable<>::_M_erase(false_type, const key_type&)): Use
5001 2020-07-27 Jonathan Wakely <jwakely@redhat.com>
5003 * src/c++17/floating_from_chars.cc (from_chars_impl): Ensure
5004 that FE_NEAREST is used.
5005 * testsuite/20_util/from_chars/4.cc: Do not use if constexpr in
5006 a { target c++14 } test.
5007 [!_GLIBCXX_HAVE_USELOCALE]: Disable all tests.
5008 * testsuite/20_util/from_chars/5.cc [!_GLIBCXX_HAVE_USELOCALE]:
5010 * testsuite/20_util/from_chars/6.cc: New test.
5012 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
5014 * include/std/future (future, shared_future, promise): Add
5015 static assertions to the primary template to reject array and
5017 * testsuite/30_threads/future/requirements/lwg3458.cc: New test.
5018 * testsuite/30_threads/promise/requirements/lwg3466.cc: New test.
5019 * testsuite/30_threads/shared_future/requirements/lwg3458.cc: New test.
5021 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
5023 * include/bits/stl_iterator.h (reverse_iterator): Constrain
5024 converting constructor and converting assignment operator.
5025 Access source iterator's data member directly instead of
5027 (move_iterator): Likewise.
5028 * testsuite/24_iterators/move_iterator/dr3435.cc: New test.
5029 * testsuite/24_iterators/reverse_iterator/dr3435.cc: New test.
5031 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
5033 * acinclude.m4 (libtool_VERSION): Bump version.
5034 * config.h.in: Regenerate.
5035 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.29 version and new
5037 * config/os/gnu-linux/ldbl-extra.ver: Add _GLIBCXX_LDBL_3.4.29
5038 version and new export.
5039 * configure: Regenerate.
5040 * configure.ac: Check for <xlocale.h> and uselocale.
5041 * crossconfig.m4: Add macro or checks for uselocale.
5042 * include/std/charconv (from_chars): Declare overloads for
5043 float, double, and long double.
5044 * src/c++17/Makefile.am: Add new file.
5045 * src/c++17/Makefile.in: Regenerate.
5046 * src/c++17/floating_from_chars.cc: New file.
5047 (from_chars): Define for float, double, and long double.
5048 * testsuite/20_util/from_chars/1_c++20_neg.cc: Prune extra
5049 diagnostics caused by new overloads.
5050 * testsuite/20_util/from_chars/1_neg.cc: Likewise.
5051 * testsuite/20_util/from_chars/2.cc: Check leading '+'.
5052 * testsuite/20_util/from_chars/4.cc: New test.
5053 * testsuite/20_util/from_chars/5.cc: New test.
5054 * testsuite/util/testsuite_abi.cc: Add new symbol versions.
5056 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
5058 * include/bits/istream.tcc
5059 (basic_istream::get(__streambuf_type&, char_type): Use unsigned
5060 long long for counter and check if it would overflow _M_gcount.
5061 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: New test.
5062 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: New test.
5064 2020-07-17 Iain Sandoe <iain@sandoe.co.uk>
5066 * include/std/coroutine: Mark the methods of the
5067 trivial awaitables as constexpr.
5069 2020-07-14 David Edelsohn <dje.gcc@gmail.com>
5071 * config/os/aix/t-aix: Set BITS from compiler cpp macro.
5073 2020-07-13 Jonathan Wakely <jwakely@redhat.com>
5077 * include/bits/istream.tcc (basic_istream::ignore(streamsize))
5078 [n == max]: Check overflow conditions on _M_gcount. Rely on
5079 the fact that either EOF or the delimiter was reached.
5080 [n < max]: Check _M_gcount < n before checking for EOF or
5082 (basic_istream::ignore(streamsize, char_type): Likewise.
5083 * src/c++98/compatibility.cc (istream::ignore(streamsize))
5084 (wistream::ignore(streamsize)): Likewise.
5085 * src/c++98/istream.cc (istream::ignore(streamsize, char_type))
5086 (wistream::ignore(streamsize, char_type)): Likewise.
5087 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Check that
5088 delimiter is discarded if the number of characters ignored
5089 doesn't fit in streamsize.
5090 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
5092 * testsuite/27_io/basic_istream/ignore/char/96161.cc: New test.
5093 * testsuite/27_io/basic_istream/ignore/wchar_t/96161.cc: New test.
5095 2020-07-08 François Dumont <fdumont@gcc.gnu.org>
5097 * include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&)): Add noexcept
5098 qualification based only on _Compare one.
5099 * testsuite/23_containers/map/cons/noexcept_move_construct.cc: Add
5101 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
5103 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
5105 * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
5107 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
5109 * include/std/limits: Whitespace changes.
5111 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
5113 * include/Makefile.am: Remove bits/int_limits.h.
5114 * include/Makefile.in: Regenerate.
5115 * include/bits/int_limits.h: Removed.
5116 * include/bits/parse_numbers.h (_Select_int_base): Replace
5117 __int_limits with __int_traits.
5118 * include/bits/range_access.h (_SSize::operator()): Likewise.
5119 * include/ext/numeric_traits.h (__numeric_traits_integer): Add
5121 (__int_traits): New alias template.
5122 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
5123 (__countr_zero, __countr_one, __popcount, __bit_ceil)
5124 (__bit_floor, __bit_width) Replace __int_limits with
5126 * include/std/charconv (__to_chars_8, __from_chars_binary)
5127 (__from_chars_alpha_to_num, from_chars): Likewise.
5128 * include/std/memory_resource (polymorphic_allocator::allocate)
5129 (polymorphic_allocator::allocate_object): Likewise.
5130 * include/std/string_view (basic_string_view::_S_compare):
5132 * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
5134 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
5136 * include/std/limits: Whitespace changes.
5138 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
5140 * include/std/optional (_Optional_payload_base, _Optional_base)
5141 (optional, __optional_hash_call_base): Adjust whitespace and
5142 other formatting. Remove redundant && tokens on template
5143 arguments to type traits.
5145 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
5147 * include/std/optional (make_optional): Add enable_if
5148 constraints and noexcept-specifier to each overload.
5149 * testsuite/20_util/optional/make_optional-2.cc: New test.
5151 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
5154 * include/std/optional (optional): Add noexcept-specifier to
5155 every constructor, assignment operator, emplace function and
5156 dereference operator.
5157 * testsuite/20_util/optional/assignment/noexcept.cc: New test.
5158 * testsuite/20_util/optional/cons/noexcept.cc: New test.
5160 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
5163 * include/bits/fs_dir.h: Use consistent tag in class-head.
5164 * include/bits/localefwd.h: Likewise.
5165 * include/bits/regex.h: Likewise.
5166 * include/bits/stl_map.h: Likewise.
5167 * include/bits/stl_multimap.h: Likewise.
5168 * include/bits/stl_multiset.h: Likewise.
5169 * include/bits/stl_set.h: Likewise.
5170 * include/std/complex: Likewise.
5171 * include/std/functional: Likewise.
5172 * include/std/future: Likewise.
5173 * include/std/system_error: Likewise.
5174 * include/std/thread: Likewise.
5175 * include/std/tuple: Likewise.
5176 * include/std/type_traits: Likewise.
5177 * include/std/valarray: Likewise.
5179 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
5181 * testsuite/27_io/basic_ios/conv/voidptr.cc: Add c++98_only
5184 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
5186 * testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: Add
5187 c++98_only target selector.
5188 * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc:
5190 * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc:
5192 * testsuite/18_support/headers/new/synopsis_cxx98.cc: Likewise.
5193 * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc:
5195 * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc:
5197 * testsuite/23_containers/headers/array/std_c++0x_neg.cc:
5199 * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc:
5201 * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
5203 * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
5205 * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc:
5207 * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc:
5209 * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++98.cc:
5211 * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc:
5213 * testsuite/26_numerics/headers/random/std_c++0x_neg.cc:
5215 * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Likewise.
5216 * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Likewise.
5217 * testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc:
5219 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
5221 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
5223 * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: Likewise.
5224 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc:
5227 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
5230 * include/std/variant
5231 (_Copy_assign_base::operator=(const _Copy_assign_base&):
5232 Do the move-assignment from a temporary so that the temporary
5233 is constructed with an explicit index.
5234 * testsuite/20_util/variant/91807.cc: New.
5236 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
5240 * testsuite/29_atomics/atomic_float/1.cc: Use different values
5242 * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
5244 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
5247 * include/bits/regex.h (operator==, operator!=): Remove noexcept
5248 equality comparisons for match_results.
5249 * testsuite/28_regex/match_results/94627.cc: New test.
5251 2020-07-01 Martin Sebor <msebor@redhat.com>
5253 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Adjust
5254 text of expected warning.
5255 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Same.
5256 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc: Same.
5257 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc: Same.
5258 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc: Same.
5260 2020-06-29 Ville Voutilainen <ville.voutilainen@gmail.com>
5263 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
5265 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
5266 Add a __nonnull__ attribute.
5267 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
5268 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
5270 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
5272 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
5273 Add a __nonnull__ attribute.
5274 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
5275 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
5277 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
5280 * include/std/type_traits (is_literal_type, is_literal_type_v):
5282 * include/std/variant (_Uninitialized):
5283 Adjust the condition and the comment.
5284 * testsuite/20_util/is_literal_type/deprecated-1z.cc: New.
5285 * testsuite/20_util/is_literal_type/requirements/explicit_instantiation.cc:
5287 * testsuite/20_util/is_literal_type/requirements/typedefs.cc: Likewise.
5288 * testsuite/20_util/is_literal_type/value.cc: Likewise.
5289 * testsuite/20_util/optional/constexpr/nullopt.cc:
5290 Use __is_literal_type directly.
5291 * testsuite/20_util/optional/nullopt.cc: Likewise.
5292 * testsuite/20_util/variable_templates_for_traits.cc: Adjust.
5293 * testsuite/20_util/variant/95915.cc: New.
5294 * testsuite/20_util/variant/compile.cc: Add new test.
5295 * testsuite/experimental/optional/constexpr/nullopt.cc:
5296 Use __is_literal_type directly.
5297 * testsuite/experimental/optional/nullopt.cc: Likewise.
5298 * testsuite/experimental/type_traits/value.cc: Adjust.
5299 * testsuite/util/testsuite_common_types.h:
5300 Use __is_literal_type directly.
5302 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
5304 * include/std/charconv (__from_chars_binary): Ignore leading zeros.
5305 * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
5307 * testsuite/20_util/from_chars/3.cc: New test.
5309 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
5311 * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
5312 * include/std/charconv (__detail::__to_chars): Avoid
5313 -Wsign-compare warning.
5315 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
5318 * include/std/charconv (__to_chars_i): Check for zero-sized
5319 buffer unconditionally.
5320 * testsuite/20_util/to_chars/95851.cc: New test.
5322 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
5324 * testsuite/20_util/from_chars/1_c++20_neg.cc: Check enumeration
5326 * testsuite/20_util/from_chars/1_neg.cc: Likewise. Move dg-error
5327 directives outside preprocessor condition.
5329 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
5332 * include/std/variant (__detail::__variant::_Build_FUN): Remove
5333 partial specialization to prevent narrowing conversions to bool.
5334 * testsuite/20_util/variant/compile.cc: Test non-narrowing
5335 conversions to bool.
5336 * testsuite/20_util/variant/run.cc: Likewise.
5338 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
5340 * doc/Makefile.in: Regenerate.
5341 * include/Makefile.in: Regenerate.
5342 * libsupc++/Makefile.in: Regenerate.
5343 * po/Makefile.in: Regenerate.
5344 * python/Makefile.in: Regenerate.
5345 * src/Makefile.in: Regenerate.
5346 * src/c++11/Makefile.in: Regenerate.
5347 * src/c++17/Makefile.in: Regenerate.
5348 * src/c++98/Makefile.in: Regenerate.
5349 * src/filesystem/Makefile.in: Regenerate.
5350 * testsuite/Makefile.in: Regenerate.
5352 2020-06-22 David Edelsohn <dje.gcc@gmail.com>
5354 * Makefile.am: Use -include.
5355 * Makefile.in: Regenerate.
5357 2020-06-21 David Edelsohn <dje.gcc@gmail.com>
5359 * Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
5360 * Makefile.in: Regenerate.
5361 * configure.ac (tmake_file): Substitute.
5362 * configure: Regenerate.
5363 * configure.host (aix*): Define tmake_file.
5364 * config/os/aix/t-aix: New file.
5366 2020-06-20 Jason Merrill <jason@redhat.com>
5368 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
5369 Remove greedy_ops tests.
5370 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
5371 Remove greedy_ops tests.
5373 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
5376 * include/bits/stl_algobase.h (__size_to_integer(float))
5377 (__size_to_integer(double), __size_to_integer(long double))
5378 (__size_to_integer(__float128)): Cast return type explicitly.
5379 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
5380 Remove unused typedef.
5382 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
5384 * include/bits/stl_pair.h (_Index_tuple): Remove redundant
5385 namespace qualification.
5386 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
5388 * include/std/tuple (_Head_base, _Tuple_impl, tuple_size)
5389 (tuple_element, __get_helper, get, __make_tuple_impl)
5390 (__make_1st_indices, __tuple_concater)
5391 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
5393 * include/std/utility (tuple_element, __is_tuple_like_impl)
5394 (tuple_size, __pair_get, get): Likewise.
5396 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
5398 * include/bits/std_function.h (function): Define all member
5401 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
5403 * include/bits/stl_algo.h (__includes): Simplify the code.
5405 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
5407 * include/std/optional (optional()): Explicitly define it.
5409 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
5412 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
5413 Construct the first value at *__first instead of on the stack.
5414 (__uninitialized_default_n_1<true>): Likewise.
5415 Improve comments on several of the non-standard algorithms.
5416 * testsuite/20_util/specialized_algorithms/uninitialized_default/94540.cc:
5418 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/94540.cc:
5420 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
5422 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
5424 * testsuite/23_containers/vector/cons/94540.cc: New test.
5426 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
5428 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
5429 Replace Value type with int so trivial code path is used.
5430 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
5433 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
5435 * include/bits/stl_uninitialized.h (uninitialized_fill_n): Only
5436 use std::fill_n when the size is an integral type.
5437 (__uninitialized_default_n): Likewise.
5438 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
5440 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
5442 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
5445 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
5448 * include/bits/atomic_base.h (__atomic_impl::load): Use the _Val
5449 alias instead of deducing _Tp as an unqualified type.
5450 (__atomic_impl::exchange): Use the _Val alias to remove volatile
5451 from the reinterpret_cast result type.
5453 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
5455 * include/std/atomic (atomic): Add static assertions.
5456 * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
5458 2020-06-16 Patrick Palka <ppalka@redhat.com>
5461 * testsuite/20_util/is_constructible/94003.cc: New test.
5463 2020-06-15 Jonathan Wakely <jwakely@redhat.com>
5465 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
5466 Update value for C++20.
5467 * include/std/version (__cpp_lib_constexpr_char_traits): Likewise.
5468 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
5469 Update expected value.
5470 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
5473 2020-06-15 Paul Keir <paul.keir@uws.ac.uk>
5475 * include/bits/char_traits.h (char_traits::move): constexpr move with
5476 overlap was using copy_backward incorrectly.
5477 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
5480 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
5482 * testsuite/29_atomics/atomic_flag/clear/1.cc: Also test clear()
5483 when the value is currently set.
5484 * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc:
5485 Actually check the return value.
5486 * testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc:
5489 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
5491 * include/bits/atomic_base.h (atomic_flag::test): Add missing
5493 * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
5494 dg-options and verify results of test function.
5495 * testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
5497 2020-06-11 Jonathan Wakely <jwakely@redhat.com>
5500 * include/bits/istream.tcc (basic_istream::ignore(streamsize, CharT)):
5501 Only discard an extra character if we didn't already reach the
5503 * src/c++98/istream.cc (istream::ignore(streamsiz, char))
5504 (wistream::ignore(streamsize, wchar_t)): Likewise.
5505 * testsuite/27_io/basic_istream/ignore/char/94749.cc: New test.
5506 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc: New test.
5508 2020-06-10 Patrick Palka <ppalka@redhat.com>
5511 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
5512 Also check that the iterator and sentinel have the same type before
5513 applying the unwrapping optimization for __normal_iterator.
5514 Split the check into two, one for the first iterator/sentinel
5515 pair and another for second iterator/sentinel pair. Remove uses
5516 of __niter_base, and remove uses of std::move on a
5518 * include/bits/ranges_algobase.h (__equal_fn): Likewise.
5519 (__copy_or_move): Likewise. Perform similar adjustments for
5520 the reverse_iterator and move_iterator optimizations. Inline
5521 the checks into the if-constexprs, and use using-declarations to
5522 make them less visually noisy. Remove uses of __niter_wrap.
5523 (__copy_or_move_backward): Likewise.
5524 * testsuite/25_algorithms/copy/95578.cc: New test.
5525 * testsuite/25_algorithms/copy_backward/95578.cc: New test.
5526 * testsuite/25_algorithms/equal/95578.cc: New test.
5527 * testsuite/25_algorithms/lexicographical_compare/95578.cc: New test.
5528 * testsuite/25_algorithms/move/95578.cc: New test.
5529 * testsuite/25_algorithms/move_backward/95578.cc: New test.
5531 2020-06-10 François Dumont <fdumont@gcc.gnu.org>
5532 Jonathan Wakely <jwakely@redhat.com>
5534 * include/bits/deque.tcc (__lex_cmp_dit): New.
5535 (__lexicographical_compare_aux1): Define overloads for deque
5537 * include/bits/stl_algobase.h (__lexicographical_compare::__3way):
5538 New static member function.
5539 (__lexicographical_compare<true>::__3way): Likewise.
5540 (__lexicographical_compare<true>::__lc): Use __3way.
5541 (__lexicographical_compare_aux): Rename to
5542 __lexicographical_compare_aux1 and declare overloads for deque
5544 (__lexicographical_compare_aux): Define new forwarding function
5545 that calls __lexicographical_compare_aux1 and declare new overloads
5547 (lexicographical_compare): Do not use __niter_base on
5549 * include/debug/safe_iterator.tcc
5550 (__lexicographical_compare_aux): Define overloads for safe
5552 * testsuite/25_algorithms/lexicographical_compare/1.cc: Add
5553 checks with random access iterators.
5554 * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
5557 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
5559 * include/bits/stl_iterator.h (move_iterator::operator=): Define.
5560 * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
5562 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
5564 * include/std/optional (bad_optional_access): Define default
5565 constructor and destructor as defaulted.
5566 * testsuite/20_util/optional/bad_access.cc: New test.
5568 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
5570 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
5572 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
5574 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
5576 * include/bits/unique_ptr.h (operator<<): Define for C++20.
5577 * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
5579 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
5581 * include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
5582 (__detail::__cat, __detail::__diff): Move to class scope in the
5583 relevant __iterator_traits specializations.
5584 (__iterator_traits<>): Use nested class templates instead of ones from
5586 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
5587 class scope in iterator_traits<common_iterator<I, S>>.
5588 (iterator_traits<common_iterator<I, S>>): Use nested class template
5589 instead of __detail::__common_iter_ptr.
5591 2020-06-04 François Dumont <fdumont@gcc.gnu.org>
5593 * include/bits/stl_algo.h (__copy_n_a): Move to ...
5594 * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict
5596 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
5598 (__niter_base(const _Safe_iterator<_Ite, _Seq,
5599 random_access_iterator_tag>&)): Declare.
5600 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
5601 _Deque_iterator<>)): Declare.
5602 * include/bits/deque.tcc
5603 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
5604 _Deque_iterator<>)): New.
5605 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
5607 * include/bits/streambuf_iterator.h
5608 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*, bool)): Adapt.
5609 * include/debug/safe_iterator.tcc (__niter_base): New.
5610 * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
5612 * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc:
5614 * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:
5616 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New test.
5617 * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc:
5620 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
5622 * include/bits/ranges_algobase.h (__copy_n_fn): Only call
5623 ranges::copy for positive values.
5624 * include/bits/stl_algo.h (copy_n): Convert Size argument to an
5625 integral type and only call __copy_n for positive values.
5626 * testsuite/util/testsuite_iterators.h
5627 (random_access_iterator_wrapper::operator+=): Fix range check for
5629 (output_container, input_container, forward_container)
5630 (bidirectional_container, random_access_container): New alias
5632 * testsuite/25_algorithms/copy_n/5.cc: New test.
5634 2020-06-02 Jonathan Wakely <jwakely@redhat.com>
5637 * include/debug/deque (deque(const _Base&)): Replace parameter
5638 with a struct that wraps a const _Base&.
5639 * include/debug/forward_list (forward_list(_Base_ref)): New
5641 * include/debug/list (list(const _Base&)): Replace parameter
5642 with a struct that wraps a const _Base&.
5643 * include/debug/map.h (map(const _Base&)): Likewise.
5644 * include/debug/multimap.h (multimap(const _Base&)): Likewise.
5645 * include/debug/multiset.h (multiset(const _Base&)): Likewise.
5646 * include/debug/set.h (set(const _Base&)): Likewise.
5647 * include/debug/unordered_map (unordered_map(const _Base&))
5648 (unordered_multimap(const _Base&)): Likewise.
5649 * include/debug/unordered_set (unordered_set(const _Base&))
5650 (unordered_multiset(const _Base&)): Likewise.
5651 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
5652 Adjust dg-error line number.
5653 * include/debug/vector (vector(const _Base&)): Likewise.
5654 * testsuite/23_containers/deque/debug/90102.cc: New test.
5655 * testsuite/23_containers/forward_list/debug/90102.cc: New test.
5656 * testsuite/23_containers/list/debug/90102.cc: New test.
5657 * testsuite/23_containers/map/debug/90102.cc: New test.
5658 * testsuite/23_containers/multimap/debug/90102.cc: New test.
5659 * testsuite/23_containers/multiset/debug/90102.cc: New test.
5660 * testsuite/23_containers/set/debug/90102.cc: New test.
5661 * testsuite/23_containers/unordered_map/debug/90102.cc: New test.
5662 * testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
5663 * testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
5664 * testsuite/23_containers/unordered_set/debug/90102.cc: New test.
5665 * testsuite/23_containers/vector/debug/90102.cc: New test.
5667 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
5670 * include/bits/fs_path.h (path::_S_to_string): Move to
5671 namespace-scope and rename to ...
5672 (__detail::__string_from_range): ... this.
5673 [WINDOWS] (__detail::__wstr_from_utf8): New function template to
5674 convert a char sequence containing UTF-8 to wstring.
5675 (path::_S_convert(Iter, Iter)): Adjust call to _S_to_string.
5676 (path::_S_convert_loc(Iter, Iter, const locale&)): Likewise.
5677 (u8path(InputIterator, InputIterator)) [WINDOWS]: Use
5678 __string_from_range to obtain a contiguous range and
5679 __wstr_from_utf8 to obtain a wide string.
5680 (u8path(const Source&)) [WINDOWS]: Use __effective_range to
5681 obtain a contiguous range and __wstr_from_utf8 to obtain a wide
5683 (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
5684 Use __wstr_from_utf8.
5686 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
5688 * testsuite/util/testsuite_iterators.h:
5689 (input_iterator_wrapper::operator++(int)): Return proxy object.
5691 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
5693 * doc/xml/manual/evolution.xml: Document deprecation of
5694 __is_nullptr_t and removal of std::allocator members.
5695 * doc/html/manual/api.html: Regenerate.
5697 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
5699 * doc/xml/manual/containers.xml: Replace <xref> with <link>.
5700 * doc/xml/manual/evolution.xml: Likewise.
5701 * doc/html/manual/api.html: Regenerate.
5702 * doc/html/manual/containers.html: Regenerate.
5704 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
5706 * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
5707 * doc/html/faq.html: Regenerate.
5709 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
5711 * doc/xml/manual/policy_data_structures_biblio.xml: Remove
5714 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
5716 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
5717 www.cs.princeton.edu to https.
5718 * doc/html/manual/policy_data_structures.html: Regenerate.
5720 2020-05-31 Douglas B Rupp <douglas.b.rupp@gmail.com>
5722 * crossconfig.m4 (<*-vxworks>): Check for more math decls.
5723 * configure: Rebuild.
5725 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
5728 * configure: Regenerated.
5730 2020-05-29 François Dumont <fdumont@gcc.gnu.org>
5733 * include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
5734 * include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
5735 (unordered_map<>::insert_or_assign): Adapt.
5737 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
5740 * include/bits/atomic_base.h (__atomic_impl::load): Add
5741 cv-qualifiers to parameter so that _Tp is deduced as the
5743 * testsuite/29_atomics/atomic_float/95282.cc: New test.
5745 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
5748 * include/std/ranges (transform_view::_Sentinel): Allow hidden
5749 friends to work with _Iterator<true> and _Iterator<false>.
5750 (join_view::_Sentinel): Likewise.
5751 * testsuite/std/ranges/adaptors/95322.cc: New test.
5753 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
5756 * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
5757 operators to use the correct operations on the underlying
5759 * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
5761 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
5763 * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
5765 2020-05-26 Patrick Palka <ppalka@redhat.com>
5768 * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
5769 Remove and instead define it ...
5770 (common_iterator::_Proxy): ... here.
5771 (common_iterator::operator->): Use it.
5772 * testsuite/24_iterators/common_iterator/2.cc: New test.
5773 * testsuite/std/ranges/adaptors/95322.cc: New test.
5775 2020-05-23 Patrick Palka <ppalka@redhat.com>
5778 * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
5779 dg-additional-options. Avoid unused-but-set-variable warning.
5781 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
5784 * include/debug/helper_functions.h (__get_distance): Only declare
5785 as a constexpr function for C++14 and up.
5786 * testsuite/25_algorithms/copy/debug/95289.cc: New test.
5788 * include/bits/fs_path.h (__detail::_S_range_begin)
5789 (__detail::_S_range_end, path::_S_string_from_iter): Replace with
5790 overloaded function template __detail::__effective_range.
5791 (__detail::__effective_range): New overloaded function template to
5792 create a basic_string or basic_string_view for an effective range.
5793 (__detail::__value_type_is_char): Use __detail::__effective_range.
5794 Do not use remove_const on value type.
5795 (__detail::__value_type_is_char_or_char8_t): Likewise.
5796 (path::path(const Source&, format))
5797 (path::path(const Source&, const locale&))
5798 (path::operator/=(const Source&), path::append(const Source&))
5799 (path::concat(const Source&)): Use __detail::__effective_range.
5800 (path::_S_to_string(InputIterator, InputIterator)): New function
5801 template to create a string view if possible, or string otherwise.
5802 (path::_S_convert): Add overloads that convert a string returned
5803 by __detail::__effective_range. Use if-constexpr to inline conversion
5804 logic from all overloads of _Cvt::_S_convert.
5805 (path::_S_convert_loc): Add overload that converts a string. Use
5806 _S_to_string to avoid allocation when possible.
5807 (path::_Cvt): Remove.
5808 (path::operator+=(CharT)): Remove indirection through path::concat.
5809 * include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
5810 overload for non-const pointers, to avoid constructing a std::string.
5811 * src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
5812 compilation with call to _S_convert.
5814 * include/bits/fs_path.h (__detail::_S_range_begin)
5815 (__detail::_S_range_end): Remove unintentional static specifiers.
5816 * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
5817 (__detail::_S_range_end): Likewise.
5819 * include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
5820 Replace alias template with variable template. Don't remove const.
5821 (filesystem::__detail::__is_path_src): Replace overloaded function
5822 template with variable template and specializations.
5823 (filesystem::__detail::__is_path_iter_src): Replace alias template
5824 with class template.
5825 (filesystem::__detail::_Path): Use __is_path_src. Remove support for
5827 (filesystem::__detail::_Path2): New alias template for checking
5828 InputIterator requirements.
5829 (filesystem::__detail::__constructible_from): Remove.
5830 (filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
5831 * testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
5832 constructor arguments of void and void* types.
5834 2020-05-21 Matthias Kretz <kretz@kde.org>
5836 * testsuite/Makefile.am: Remove dup target_triplet and set tool,
5837 allowing runtest to work without arguments.
5838 * testsuite/Makefile.in: Regenerate.
5840 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
5843 * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
5844 Reorder constraints to avoid recursion when constructors use
5845 iterator_traits (LWG 3420).
5846 * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
5848 * include/experimental/socket (basic_socket::is_open()
5849 (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
5851 * include/experimental/bits/net.h (__endpoint, __protocol)
5852 (__acceptable_protocol, __inet_protocol): New concepts.
5853 (__detail::__is_endpoint): Move trait from <experimental/socket>.
5854 (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
5856 (__endpoint, __protocol, __acceptable_protocol): New variable
5858 * include/experimental/socket (__is_endpoint): Move to net.h header.
5859 (basic_socket, basic_socket_acceptor): Check requirements.
5861 * include/experimental/executor (use_future_t::use_future_t()): Fix
5862 incorrect noexcept-specifier.
5863 * include/experimental/internet (basic_resolver_results): Adjust
5865 * include/experimental/socket (__basic_socket_impl::release): Add
5867 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
5869 (basic_socket::release(), basic_socket::release(error_code&)): Add
5870 missing member functions.
5871 (basic_socket::is_open()): Add nodiscard attribute.
5872 (basic_socket::close(error_code&)): Pass argument to base function.
5873 (basic_socket_acceptor::release())
5874 (basic_socket_acceptor::release(error_code&)): Add missing member
5876 (basic_socket_acceptor::is_open()): Add nodiscard attribute.
5877 (basic_socket_streambuf::error()): Add noexcept.
5878 (basic_socket_iostream::error()): Likewise.
5879 * testsuite/experimental/net/socket/basic_socket.cc: New test.
5881 * include/experimental/buffer: Replace typedefs with
5883 * include/experimental/executor: Likewise.
5884 * include/experimental/internet: Likewise.
5885 * include/experimental/socket: Likewise.
5886 * include/experimental/timer: Likewise.
5888 2020-05-19 Jonathan Wakely <jwakely@redhat.com>
5891 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
5893 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
5895 (random_device::_M_init): Use __x86_rdseed_rdrand when both
5896 instructions are available.
5897 * testsuite/26_numerics/random/random_device/94087.cc: New test.
5899 2020-05-19 Patrick Palka <ppalka@redhat.com>
5902 * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
5904 * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
5906 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
5909 * configure: Regenerated.
5911 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
5913 * configure: Regenerated.
5915 2020-05-13 Alexandre Oliva <oliva@adacore.com>
5918 * include/experimental/memory_resource
5919 (__resource_adaptor_imp::do_allocate): Handle max_align_t on
5920 x86-vxworks as on x86-solaris.
5921 (__resource_adaptor_imp::do_deallocate): Likewise.
5922 * testsuite/experimental/memory_resource/new_delete_resource.cc:
5924 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
5925 (test03): Drop max-align test for char-aligned alloc.
5927 2020-05-08 Ulrich Drepper <drepper@redhat.com>
5929 * include/bits/atomic_base.h (atomic_flag): Implement test member
5931 * include/std/version: Define __cpp_lib_atomic_flag_test.
5932 * testsuite/29_atomics/atomic_flag/test/explicit.cc: New file.
5933 * testsuite/29_atomics/atomic_flag/test/implicit.cc: New file.
5935 2020-05-07 Jonathan Wakely <jwakely@redhat.com>
5937 PR libstdc++/94971 (partial)
5938 * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify
5939 std::sample using macro to work in parallel mode.
5940 (__sort_fn): Likewise for std::sort.
5941 (ranges::__nth_element_fn): Likewise for std::nth_element.
5942 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
5943 Likewise for std::__min_cmp.
5944 * include/parallel/algobase.h (lexicographical_compare_three_way):
5945 Add to namespace std::__parallel.
5948 * include/parallel/multiway_merge.h (_GuardedIterator::operator*)
5949 (_GuardedIterator::operator _RAIter, _UnguardedIterator::operator*)
5950 (_UnguardedIterator::operator _RAIter): Add const qualifier.
5951 (operator<(_GuardedIterator&, _GuardedIterator&)
5952 (operator<=(_GuardedIterator&, _GuardedIterator&)
5953 (operator<(_UnguardedIterator&, _UnguardedIterator&)
5954 (operator<=(_UnguardedIterator&, _UnguardedIterator&): Change
5955 parameters to const references.
5957 2020-05-07 Eric Botcazou <ebotcazou@adacore.com>
5959 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
5960 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
5962 2020-05-06 François Dumont <fdumont@gcc.gnu.org>
5964 * include/bits/stl_algobase.h (struct _Bit_iterator): New declaration.
5965 (std::__fill_a1(_Bit_iterator, _Bit_iterator, const bool&)): Likewise.
5966 * include/bits/stl_bvector.h (__fill_bvector): Move outside
5967 _GLIBCXX_STD_C namespace.
5968 (fill(_Bit_iterator, _Bit_iterator, const bool&)): Likewise and rename
5970 (__fill_a1): ...this.
5971 * testsuite/25_algorithms/fill/bvector/1.cc: New.
5973 2020-05-06 H.J. Lu <hongjiu.lu@intel.com>
5975 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
5977 2020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5979 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
5980 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
5982 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
5983 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
5986 2020-05-06 Martin Liska <mliska@suse.cz>
5989 2020-05-05 Martin Liska <mliska@suse.cz>
5991 * include/parallel/multiway_merge.h:
5992 Use const for _Compare template argument.
5994 2020-05-06 Jonathan Wakely <jwakely@redhat.com>
5996 * doc/xml/manual/abi.xml (abi.versioning.history): Document library
5997 versions for GCC 9.[123] and 10.1 releases.
5998 * doc/html/*: Regenerate.
6000 2020-05-06 Jakub Jelinek <jakub@redhat.com>
6002 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
6003 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
6004 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
6005 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
6006 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
6007 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
6008 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
6010 2020-05-05 Martin Liska <mliska@suse.cz>
6013 * include/parallel/multiway_merge.h:
6014 Use const for _Compare template argument.
6016 2020-05-04 Fangrui Song <maskray@google.com>
6018 * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
6020 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
6022 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
6023 * doc/html/*: Regenerate.
6026 * src/c++17/memory_resource.cc
6027 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
6030 2020-05-04 Nathan Sidwell <nathan@acm.org>
6033 * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
6034 ptrdiff_t before negation, to show intent more clearly.
6036 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
6039 * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
6040 Add comment about single-threaded behaviour.
6041 (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
6042 class member access out of loop.
6043 (synchronized_pool_resource::synchronized_pool_resource())
6044 (synchronized_pool_resource::~synchronized_pool_resource())
6045 (synchronized_pool_resource::release()): Check __gthread_active_p
6046 before creating and/or deleting the thread-specific data key.
6047 (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
6049 (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
6050 path for single-threaded case.
6051 (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
6052 Likewise. Return if unable to find a pool that owns the allocation.
6053 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
6055 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
6057 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
6060 2020-05-03 Jonathan Wakely <jwakely@redhat.com>
6063 * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
6064 usable in constant expressions.
6065 * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
6068 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
6071 * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
6073 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
6074 Patrick Palka <ppalka@redhat.com>
6077 * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
6078 Add trait to determine return type and an alias for it.
6079 (ranges::__cust_imove::_IMove::operator()): Use __result instead of
6080 deduced return type.
6081 (iter_rvalue_reference_t): Use _IMove::__type instead of checking
6082 the result of ranges::iter_move.
6083 (__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
6084 instead of checking the result of ranges::iter_move.
6085 * testsuite/24_iterators/customization_points/92894.cc: New test.
6086 * testsuite/24_iterators/indirect_callable/92894.cc: New test.
6088 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
6091 * include/std/type_traits (__is_complete_or_unbounded): Replace
6092 BADNAME _T with _Tp.
6093 * testsuite/17_intro/badnames.cc: New test.
6095 2020-04-30 Jonathan Wakely <jwakely@redhat.com>
6098 * include/bits/alloc_traits.h (allocator_traits::_S_construct)
6099 (allocator_traits::_S_destroy)
6100 (allocator_traits<allocator<T>>::construct): Use traits in
6101 noexcept-specifiers.
6102 * include/bits/allocator.h (allocator<void>::construct)
6103 (allocator<void>::destroy): Likewise.
6104 * include/ext/malloc_allocator.h (malloc_allocator::construct)
6105 (malloc_allocator::destroy): Likewise.
6106 * include/ext/new_allocator.h (new_allocator::construct)
6107 (new_allocator::destroy): Likewise.
6108 * testsuite/20_util/allocator/89510.cc: New test.
6109 * testsuite/ext/malloc_allocator/89510.cc: New test.
6110 * testsuite/ext/new_allocator/89510.cc: New test.
6112 2020-04-29 Jonathan Wakely <jwakely@redhat.com>
6115 * include/bits/basic_string.tcc: Update comment about explicit
6118 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
6121 * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
6122 Remove non-standard macro.
6123 * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
6124 to indicate P1032R1 support.
6125 * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
6126 * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
6127 * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
6128 * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
6129 (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
6130 (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
6131 * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
6133 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
6134 * testsuite/21_strings/basic_string_view/operations/copy/char/
6135 constexpr.cc: Likewise.
6136 * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
6139 * include/bits/alloc_traits.h (_S_construct): Restore placement
6140 new-expression for C++11/14/17 and call std::construct_at directly
6142 * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
6143 function returning void.
6144 * testsuite/20_util/specialized_algorithms/
6145 uninitialized_value_construct/94831.cc: New test.
6146 * testsuite/23_containers/vector/cons/94831.cc: New test.
6148 2020-04-28 Patrick Palka <ppalka@redhat.com>
6150 LWG 3433 subrange::advance(n) has UB when n < 0
6151 * include/std/ranges (subrange::prev): Fix typo.
6152 (subrange::advance): Handle a negative argument as per the proposed
6153 resolution of LWG 3433.
6154 * testsuite/std/ranges/subrange/lwg3433.cc: New test.
6156 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
6157 Iain Sandoe <iain@sandoe.co.uk>
6160 * include/std/coroutine: Implement handing for non-
6161 class coroutine return types.
6163 2020-04-24 Jonathan Wakely <jwakely@redhat.com>
6165 * include/experimental/executor (service_already_exists): Make default
6166 constructor public (LWG 3414).
6167 * testsuite/experimental/net/execution_context/make_service.cc: Check
6168 the service_already_exists can be default constructed.
6170 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
6171 Jonathan Wakely <jwakely@redhat.com>
6175 * include/std/any (any): Rename template parameters for consistency
6177 (any::_Decay): Rename to _Decay_if_not_any.
6178 (any::any(T&&):: Remove is_constructible from constraints. Remove
6179 non-standard overload.
6180 (any::any(in_place_type_t<T>, Args&&...))
6181 (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
6182 (any::emplace(Args&&...))
6183 (any::emplace(initializer_list<U>, Args&&...)):
6184 Use decay_t instead of _Decay.
6185 * testsuite/20_util/any/cons/90415.cc: New test.
6186 * testsuite/20_util/any/cons/92156.cc: New Test.
6187 * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
6189 * testsuite/20_util/any/modifiers/92156.cc: New test.
6191 2020-04-23 Jonathan Wakely <jwakely@redhat.com>
6193 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
6194 * doc/html/*: Regenerate.
6196 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
6197 value for C++17 to 201803L because P0858R0 is supported for C++17.
6198 * include/std/version (__cpp_lib_array_constexpr): Likewise.
6199 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
6200 Check for value corresponding to P0031R0 features being tested.
6201 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
6202 Check for value corresponding to P0858R0 features being tested.
6204 * include/std/version (__cpp_lib_three_way_comparison): Define for
6205 freestanding builds.
6207 2020-04-23 Thomas Rodgers <rodgert@appliantology.com>
6209 * include/experimental/net/executor (system_context): Mark
6210 system_context::system_context() = delete.
6211 * testsuite/experimental/net/executor/1.cc: Add new
6212 test to check system_context is not default constructible.
6214 2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
6216 * include/std/coroutine: Update the inline namespace to __n4861.
6217 Add the __cpp_lib_coroutine define, set to 201902L.
6218 * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
6220 2020-04-22 Jonathan Wakely <jwakely@redhat.com>
6222 * include/std/execution (__cpp_lib_execution): Define to indicate
6223 support for P0024R2 and P1001R2.
6224 * include/std/version (__cpp_lib_execution): Define.
6225 * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
6226 defined by <algorithm>, move other tests to new tests ...
6227 * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
6228 * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
6229 * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
6230 * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
6232 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
6233 different values for C++17 and C++20, to indicate different feature
6234 sets. Update value for C++20 to indicate P1032R1 support.
6235 * include/std/version (__cpp_lib_array_constexpr): Likewise.
6236 * testsuite/23_containers/array/comparison_operators/constexpr.cc:
6237 Check feature test macro.
6238 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
6240 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
6242 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
6243 in C++17 mode and check feature test macro.
6245 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
6247 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
6248 defined by <utility>.
6250 * include/std/functional (__cpp_lib_concepts): Update macro value to
6251 indicate P1964R2 support.
6252 * include/std/version (__cpp_lib_concepts): Likewise.
6253 * testsuite/std/concepts/1.cc: Adjust expected value.
6254 * testsuite/std/concepts/2.cc: Likewise.
6256 * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
6257 __cpp_lib_constexpr_functional.
6258 * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
6259 * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
6261 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
6262 indicate P1006R1 support.
6263 (__cpp_lib_to_address): Define to indicate P0653R2 support.
6264 * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
6266 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
6268 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
6270 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
6272 * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
6273 Define to indicate P0339R6 support.
6274 * include/std/string_view (__cpp_lib_starts_ends_with): Define to
6275 indicate P0457R2 support.
6276 * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
6277 to indicate P0758R1 support.
6278 (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
6279 (__cpp_lib_type_identity): Define to indicate P0887R1 support.
6280 * include/std/version (__cpp_lib_atomic_float)
6281 (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
6282 (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
6283 (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
6284 (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
6285 (__cpp_lib_to_address): Define.
6286 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
6288 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
6290 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
6292 * include/std/version (__cpp_lib_map_insertion)
6293 (__cpp_lib_unordered_map_insertion): Remove.
6295 * include/std/condition_variable (__cpp_lib_jthread): Remove
6296 redundant definition.
6297 * include/std/stop_token (__cpp_lib_jthread): Update macro value to
6298 indicate P1869R1 support.
6299 * include/std/version (__cpp_lib_jthread): Update value.
6300 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
6301 for updated macro value.
6302 * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
6304 * testsuite/30_threads/jthread/1.cc: Likewise.
6305 * testsuite/30_threads/jthread/2.cc: Likewise.
6306 * testsuite/30_threads/stop_token/1.cc: Likewise.
6307 * testsuite/30_threads/stop_token/2.cc: Likewise.
6309 * testsuite/21_strings/basic_string/erasure.cc: Check for
6310 __cpp_lib_erase_if macro.
6311 * testsuite/23_containers/deque/erasure.cc: Add header name to #error
6313 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
6314 * testsuite/23_containers/list/erasure.cc: Likewise.
6315 * testsuite/23_containers/map/erasure.cc: Likewise.
6316 * testsuite/23_containers/set/erasure.cc: Likewise.
6317 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
6318 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
6319 * testsuite/23_containers/vector/erasure.cc: Likewise.
6321 2020-04-21 Jonathan Wakely <jwakely@redhat.com>
6323 * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
6324 to define operator<=>.
6325 * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
6327 * doc/Makefile.am (xml_sources_manual): Add missing XML files.
6328 * doc/Makefile.in: Regenerate.
6329 * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
6331 * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
6332 to the C++11 status table.
6333 * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
6334 proposals with table matching contents of the C++14 standard.
6335 * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
6337 * doc/html/*: Regenerate.
6340 * include/std/type_traits (__is_nt_constructible_impl): Add partial
6341 specializations for bounded arrays with non-empty initializers.
6342 * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
6344 2020-04-20 Thomas Rodgers <trodgers@redhat.com>
6346 * testsuite/lib/libstdc++.exp: Add additional_flags=
6347 -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
6348 compiling with a newer Thread Building Blocks.
6350 2020-04-20 Jonathan Wakely <jwakely@redhat.com>
6352 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
6354 * testsuite/20_util/is_constructible/51185.cc: Make test class a
6355 non-aggregate so that the test verifies the same thing in all -std
6357 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
6358 results for some types when paren-init for aggregates is supported.
6360 * include/std/version (__cpp_lib_three_way_comparison): Update value.
6361 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
6362 (__detail::__synth3way): Add noexcept-specifier.
6364 * include/bits/stl_map.h (map): Define operator<=> and remove
6365 operator< for C++20.
6366 * include/bits/stl_multimap.h (multimap): Likewise.
6367 * include/bits/stl_multiset.h (multiset): Likewise.
6368 * include/bits/stl_set.h (set): Likewise.
6369 * include/bits/stl_tree.h (_Rb_tree): Likewise.
6370 (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
6371 operator!= for C++20.
6372 * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
6373 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
6374 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
6375 * include/debug/set.h (__gnu_debug::set): Likewise.
6376 * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
6377 * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
6378 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
6379 * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
6381 2020-04-20 Matthias Kretz <kretz@kde.org>
6383 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
6385 2020-04-19 Jonathan Wakely <jwakely@redhat.com>
6387 * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
6388 * include/bits/stl_stack.h (stack): Likewise.
6389 * testsuite/23_containers/queue/cmp_c++20.cc: New test.
6390 * testsuite/23_containers/stack/cmp_c++20.cc: New test.
6392 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
6393 Remove redundant operator!= for C++20.
6394 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
6396 * include/debug/unordered_map (unordered_map, unordered_multimap):
6398 * include/debug/unordered_set (unordered_set, unordered_multiset):
6402 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
6403 redundant assignment in constructor.
6405 2020-04-18 Jonathan Wakely <jwakely@redhat.com>
6407 * include/std/chrono (duration, time_point): Define operator<=> and
6408 remove redundant operator!= for C++20.
6409 * testsuite/20_util/duration/comparison_operators/three_way.cc: New
6411 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
6414 * testsuite/util/native_type/native_priority_queue.hpp: Use
6415 allocator_traits to rebind allocator.
6417 2020-04-17 Jonathan Wakely <jwakely@redhat.com>
6419 * include/bits/forward_list.h (forward_list): Define operator<=> and
6420 remove redundant comparison operators for C++20.
6421 * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
6422 * include/bits/stl_deque.h (deque): Likewise.
6423 * include/bits/stl_iterator.h (__normal_iterator): Likewise.
6424 * include/bits/stl_list.h (list): Likewise.
6425 * include/bits/stl_vector.h (vector): Likewise.
6426 * include/debug/deque (__gnu_debug::deque): Likewise.
6427 * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
6428 * include/debug/list (__gnu_debug::list): Likewise.
6429 * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
6431 * include/debug/vector (__gnu_debug::vector): Likewise.
6432 * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
6433 operator<=> for C++20.
6434 * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
6435 * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
6436 * testsuite/23_containers/list/cmp_c++20.cc: New test.
6437 * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
6438 * testsuite/23_containers/vector/cmp_c++20.cc: New test.
6440 * include/bits/basic_string.h (basic_string): Define operator<=> and
6441 remove redundant comparison operators for C++20.
6442 * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
6443 Add comparison_category members.
6444 (__detail::__char_traits_cmp_cat): New helper to get comparison
6445 category from char traits class.
6446 * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
6448 (sub_match): Define operator<=> and remove redundant comparison
6449 operators for C++20.
6450 (match_results): Remove redundant operator!= for C++20.
6451 * include/std/string_view (basic_string_view): Define operator<=> and
6452 remove redundant comparison operators for C++20.
6453 * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
6455 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
6457 * testsuite/21_strings/basic_string_view/operations/copy/char/
6458 constexpr.cc: Initialize variable.
6459 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
6460 constexpr.cc: Likewise.
6461 * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
6462 dg-do directive and remove comments showing incorrect signatures.
6463 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
6465 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
6467 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
6469 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
6471 2020-04-16 Jonathan Wakely <jwakely@redhat.com>
6473 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
6474 name of unused parameter.
6476 2020-04-15 Jonathan Wakely <jwakely@redhat.com>
6478 * include/bits/fs_dir.h (file_status): Define operator== for C++20.
6479 (directory_entry): Define operator<=> and remove redundant comparison
6480 operators for C++20.
6481 * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
6482 * include/bits/fs_path.h (path): Define operator<=> and remove
6483 redundant comparison operators for C++20.
6484 * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
6485 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
6486 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
6487 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
6489 * include/bits/allocator.h (operator!=): Do not define for C++20.
6490 * include/bits/locale_classes.h (operator!=): Likewise.
6491 * include/bits/std_function.h (operator==(nullptr_t, const function&))
6492 (operator!=(const function&, nullptr_t))
6493 (operator!=(nullptr_t, const function&)): Likewise.
6494 * include/ext/bitmap_allocator.h (operator!=): Likewise.
6495 * include/ext/debug_allocator.h (operator!=): Likewise.
6496 * include/ext/extptr_allocator.h (operator!=): Likewise.
6497 * include/ext/malloc_allocator.h (operator!=): Likewise.
6498 * include/ext/mt_allocator.h (operator!=): Likewise.
6499 * include/ext/new_allocator.h (operator!=): Likewise.
6500 * include/ext/pool_allocator.h (operator!=): Likewise.
6501 * include/ext/throw_allocator.h (operator!=): Likewise.
6502 * include/std/bitset (bitset::operator!=): Likewise.
6503 * include/std/memory_resource (operator!=): Likewise.
6504 * include/std/scoped_allocator (operator!=): Likewise.
6506 * include/std/typeindex (operator<=>): Define for C++20.
6507 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
6509 2020-04-14 Jonathan Wakely <jwakely@redhat.com>
6511 * libsupc++/compare (compare_three_way): Fix constraint so that
6512 BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
6513 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
6517 * include/bits/shared_ptr.h (operator<=>): Define for C++20.
6518 * include/bits/shared_ptr_base.h (operator<=>): Likewise.
6519 * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
6520 * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
6521 * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
6522 std::less<A*> to be used when comparing std::shared_ptr<A> objects in
6526 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
6527 * testsuite/18_support/comparisons/categories/94565.cc: New test.
6529 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
6531 * include/std/coroutine: Update coroutines builtin define,
6534 2020-04-09 Jonathan Wakely <jwakely@redhat.com>
6536 * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
6537 (strong_order, weak_order, partial_order): Replace uses of <=> with
6538 compare_three_way function object (LWG 3324).
6539 * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
6540 equality operator so that X satisfies three_way_comparable.
6541 * testsuite/18_support/comparisons/algorithms/strong_order.cc:
6543 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
6545 * include/bits/unique_ptr.h (operator<=>): Define for C++20.
6546 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
6547 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
6548 * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
6549 * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
6551 2020-04-08 Jonathan Wakely <jwakely@redhat.com>
6553 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
6555 * include/std/complex (operator==(const T&, const complex<T>&))
6556 (operator!=(const complex<T>&, const complex<T>&))
6557 (operator!=(const complex<T>&, const T&))
6558 (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
6559 * testsuite/26_numerics/slice/compare.cc: New test.
6561 * include/std/charconv (to_chars_result, from_chars_result): Add
6562 defaulted equality comparisons for C++20.
6563 * testsuite/20_util/from_chars/compare.cc: New test.
6564 * testsuite/20_util/to_chars/compare.cc: New test.
6566 2020-04-07 Jonathan Wakely <jwakely@redhat.com>
6569 * include/std/charconv (__integer_to_chars_result_type)
6570 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
6572 * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
6573 use of std::string_view with std::string.
6574 * testsuite/20_util/from_chars/2.cc: Likewise.
6575 * testsuite/20_util/to_chars/1.cc: Likewise.
6576 * testsuite/20_util/to_chars/2.cc: Likewise.
6578 2020-04-06 Jonathan Wakely <jwakely@redhat.com>
6581 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
6582 usable in constant expressions for C++20.
6583 (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
6584 _GLIBCXX20_CONSTEXPR.
6585 (std::char_traits<char>, std::char_traits<wchar_t>)
6586 (std::char_traits<char8_t>): Make move, copy and assign usable in
6587 constant expressions for C++20.
6588 (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
6589 and copy usable in constant expressions for C++20.
6590 * include/std/string_view (basic_string_view::copy): Add
6591 _GLIBCXX20_CONSTEXPR.
6592 * testsuite/21_strings/basic_string_view/operations/copy/char/
6593 constexpr.cc: New test.
6594 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
6595 constexpr.cc: New test.
6597 2020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
6599 * doc/xml/manual/appendix_contributing.xml: Refer to Git
6600 documentation instead of Subversion. Switch to https.
6601 * doc/html/manual/appendix_contributing.html: Regenerate.
6603 2020-04-03 Jonathan Wakely <jwakely@redhat.com>
6606 * include/bits/ptr_traits.h (__to_address): Add special case for debug
6607 iterators, to avoid dereferenceable check.
6608 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
6609 * testsuite/20_util/to_address/debug.cc: New test.
6611 2020-04-01 Andrea Corallo <andrea.corallo@arm.com>
6613 * testsuite/experimental/net/execution_context/use_service.cc:
6614 Require pthread and gthreads.
6616 2020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
6618 * doc/xml/manual/appendix_free.xml: Move "free books" list from
6620 * doc/html/manual/appendix_free.html: Regenerate.
6622 2020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
6624 Library-side tests for parenthesized aggregate init
6629 * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
6630 * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
6631 * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
6632 * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
6633 * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
6634 * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
6635 * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
6636 * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
6637 * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
6639 * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
6640 * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
6641 * testsuite/20_util/variant/92878_92947.cc: Likewise.
6642 * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
6644 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
6646 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
6648 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
6650 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
6652 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
6654 * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
6655 * testsuite/23_containers/queue/92878_92947.cc: Likewise.
6656 * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
6658 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
6659 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
6661 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
6663 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
6665 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
6667 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
6670 2020-03-28 Jonathan Wakely <jwakely@redhat.com>
6672 * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
6673 for changes due to parenthesized aggregate-initialization in C++20.
6674 * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
6675 with std::chrono::sys_time in C++20.
6677 * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
6678 to constrain C++20 versions of comparison operators. Fix backwards
6679 logic of relational operators.
6680 (move_iterator): Use requires-clause to constrain comparison operators
6681 in C++20. Do not declare non-standard same-type overloads for C++20.
6682 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
6683 of comparisons and check using greedy_ops type.
6684 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
6685 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
6686 main function from compile-only test.
6687 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
6689 2020-03-27 Jonathan Wakely <jwakely@redhat.com>
6691 * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
6692 * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
6693 C++20 concepts are required.
6694 * include/bits/stl_iterator_base_types.h: Likewise.
6695 * include/std/concepts: Likewise.
6696 * include/std/version: Likewise.
6697 * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
6700 * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
6701 (reverse_iterator::iterator_category): Define for C++20.
6702 (reverse_iterator): Define comparison operators correctly for C++20.
6703 (__normal_iterator): Add constraints to comparison operators for C++20.
6704 (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
6705 overload for input iterators.
6706 (move_iterator): Add constraints to comparison operators for C++20.
6707 Define operator<=> for C++20.
6708 * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
6709 * testsuite/24_iterators/move_iterator/move_only.cc: New test.
6710 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
6711 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
6713 * include/bits/iterator_concepts.h (__detail::__decay_copy)
6714 (__detail::__member_begin, __detail::__adl_begin): Move here from
6715 <bits/range_access.h>.
6716 (__detail::__ranges_begin, __detail::__range_iter_t): Define.
6717 * bits/range_access.h (__cust_access::__decay_copy)
6718 (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
6719 <bits/iterator_concepts.h>.
6720 (ranges::iterator_t): Use __detail::__range_iter_t.
6721 * include/bits/stl_iterator.h (back_insert_iterator): Simplify
6722 conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
6723 (front_insert_iterator): Likewise.
6724 (insert_iterator): Implement changes from P0896R4 for C++20.
6725 * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
6726 * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
6727 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
6728 for inclusion in synopsis_c++20.cc which expects different signatures
6729 for some function templates.
6730 * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
6732 * include/std/type_traits (__is_array_convertible): Move definition
6733 to immediately after is_convertible.
6735 2020-03-26 Jonathan Wakely <jwakely@redhat.com>
6737 * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
6738 (chrono::months, chrono::sys_days, chrono::local_t)
6739 (chrono::local_time, chrono::local_seconds, chrono::local_days):
6741 (chrono::time_point): Add missing static assert.
6742 * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
6743 * testsuite/std/time/clock/file/overview.cc: New test.
6744 * testsuite/std/time/clock/file/members.cc: New test.
6745 * testsuite/std/time/syn_c++20.cc: New test.
6747 2020-03-25 Mike Crowe <mac@mcrowe.com>
6749 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
6751 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
6754 2020-03-25 Jonathan Wakely <jwakely@redhat.com>
6756 * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
6757 * include/std/chrono (filesystem::__file_clock): Here.
6758 (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
6759 Define public member functions for C++20.
6760 (is_clock, is_clock_v): Define traits for C++20.
6761 * include/std/condition_variable (condition_variable::wait_until): Add
6762 check for valid clock.
6763 * include/std/future (_State_baseV2::wait_until): Likewise.
6764 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
6765 * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
6767 * include/std/thread (this_thread::sleep_until): Likewise.
6768 * testsuite/30_threads/condition_variable/members/2.cc: Qualify
6769 slow_clock with new namespace.
6770 * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
6772 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
6774 * testsuite/30_threads/future/members/clock_neg.cc: New test.
6775 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
6776 Qualify slow_clock with new namespace.
6777 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
6778 clock_neg.cc: New test.
6779 * testsuite/30_threads/shared_future/members/clock_neg.cc: New
6781 * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
6782 * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
6784 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
6785 slow_clock with new namespace.
6786 * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
6787 * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
6789 * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
6790 * testsuite/std/time/traits/is_clock.cc: New test.
6791 * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
6794 2020-03-21 Jonathan Wakely <jwakely@redhat.com>
6797 * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
6798 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
6799 Improve test coverage.
6802 * include/bits/fs_path.h (path::_S_str_convert): Replace first
6803 parameter with basic_string_view so that strings with different
6804 allocators can be accepted.
6805 (path::generic_string<C,T,A>()): Use basic_string object that uses the
6806 right allocator type.
6807 * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
6808 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
6811 2020-03-18 Jonathan Wakely <jwakely@redhat.com>
6814 * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
6815 (__is_nt_default_constructible_impl): Remove.
6816 (__is_nothrow_default_constructible_impl): Remove.
6817 (__is_nt_constructible_impl): Add bool template parameter. Adjust
6818 partial specializations.
6819 (__is_nothrow_constructible_impl): Replace class template with alias
6821 (is_nothrow_default_constructible): Derive from alias template
6822 __is_nothrow_constructible_impl instead of
6823 __is_nothrow_default_constructible_impl.
6824 * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
6826 * include/std/stop_token (stop_token::_Stop_state_ref): Define
6827 comparison operators explicitly if the compiler won't synthesize them.
6829 * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
6830 __cpp_lib_concepts before using iter_reference_t.
6831 * include/bits/stream_iterator.h (istream_iterator): Check
6832 __cpp_lib_concepts before using default_sentinel_t.
6833 * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
6836 * include/experimental/executor (executor::executor(Executor)): Call
6837 make_shared directly instead of _M_create. Create _Tgt1 object.
6838 (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
6839 Call allocate_shared directly instead of _M_create. Create _Tgt2
6841 (executor::target_type): Add cast needed for new _Tgt interface.
6842 (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
6843 (executor::_Tgt): Define the same interface whether RTTI is enabled or
6845 (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
6846 std::type_info in the interface.
6847 (executor::_Tgt::_M_func): Add data member.
6848 (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
6849 (executor::_Tgt1::_S_func): Define function to access target without
6851 (executor::_M_create): Remove.
6852 (operator==, operator!=): Simplify comparisons for executor.
6853 * include/experimental/socket (is_error_code_enum<socket_errc>):
6854 Define specialization before use.
6855 * testsuite/experimental/net/executor/1.cc: New test.
6857 2020-03-16 Jonathan Wakely <jwakely@redhat.com>
6860 * include/experimental/executor (service_already_exists): Add default
6861 constructor. Declare make_service to be a friend.
6862 * testsuite/experimental/net/execution_context/make_service.cc: New
6865 2020-03-12 Jonathan Wakely <jwakely@redhat.com>
6867 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
6868 a null pointer to functions with nonnull(1) attribute.
6870 2020-03-11 Patrick Palka <ppalka@redhat.com>
6872 * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
6873 'address' -> 'std::__addressof'.
6874 * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
6875 a non-forward input_range.
6876 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
6877 default constructor protected instead of deleted, like with
6878 input_iterator_wrapper.
6879 (test_range::iterator): Add comment explaining that this type is used
6880 only when the underlying wrapper is input_iterator_wrapper or
6881 output_iterator_wrapper. Remove delegating defaulted constructor so
6882 that the inherited default constructor is used instead.
6884 LWG 3286 ranges::size is not required to be valid after a call to
6885 ranges::begin on an input range
6886 * include/std/ranges (subrange::subrange): Split single-argument
6887 constructor into two, one constrained by _S_store_size and another by
6889 (take_view::begin): Call size() before calling ranges::begin(_M_base).
6890 * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
6891 * testsuite/std/ranges/subrange/lwg3286.cc: New test.
6893 2020-03-10 Jonathan Wakely <jwakely@redhat.com>
6895 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
6896 instead of _M_current.
6897 (split_view::_OuterIter::operator++): Likewise.
6899 * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
6900 (transform_view::_Iterator::operator*): Add noexcept-specifier.
6901 (transform_view::_Iterator::iter_move): Inline __iter_move body here.
6902 (split_view::_OuterIter::__current): Add noexcept.
6903 (split_view::_InnerIter::__iter_swap): Remove.
6904 (split_view::_InnerIter::__iter_move): Remove.
6905 (split_view::_InnerIter::_M_i_current): New accessors.
6906 (split_view::_InnerIter::__at_end): Use _M_i_current().
6907 (split_view::_InnerIter::operator*): Likewise.
6908 (split_view::_InnerIter::operator++): Likewise.
6909 (iter_move(const _InnerIter&)): Likewise.
6910 (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
6911 * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
6912 for iter_move and iter_swap on split_view's inner iterator.
6915 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
6916 Change expression in noexcept-specifier to match function body.
6918 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
6919 comment explaining multiple dg-do directives.
6920 * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
6921 so test is run as well as compiled.
6923 2020-03-09 Jonathan Wakely <jwakely@redhat.com>
6926 * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
6927 handle concatenations that change the type of the first component.
6928 (path::operator+=(basic_string_view<value_type>)): Likewise.
6929 * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
6931 2020-03-06 Patrick Palka <ppalka@redhat.com>
6933 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
6934 join_view::_Sentinel<!_Const>.
6935 * testsuite/std/ranges/adaptors/join.cc: Augment test.
6938 * include/bits/range_access.h (__cust_access::_Empty::operator()):
6939 Declare return type to be bool instead of auto.
6940 * testsuite/std/ranges/adaptors/93978.cc: New test.
6942 2020-03-06 Jonathan Wakely <jwakely@redhat.com>
6945 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
6946 (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
6947 second argument to __glibcxx_rwlock_init.
6948 * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
6951 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
6952 test to not fail due to PR 94063.
6953 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
6954 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
6956 2020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
6958 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
6961 2020-03-05 Jonathan Wakely <jwakely@redhat.com>
6963 * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
6964 * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
6965 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
6966 * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
6967 for return value, and in comparison.
6968 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
6971 * include/std/string_view: Include <bits/ostream_insert.h>.
6972 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
6974 2020-03-04 Jonathan Wakely <jwakely@redhat.com>
6976 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
6978 2020-03-04 Patrick Palka <ppalka@redhat.com>
6981 * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
6982 condition for when to use memset, making sure to additionally check that
6983 the output pointer's value type is a non-volatile byte type. Instead of
6984 requiring that the fill type is a byte type, just require that it's an
6986 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
6988 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
6990 * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
6991 blocked by PR 94017.
6992 * testsuite/25_algorithms/fill/94017.cc: New test.
6993 * testsuite/25_algorithms/fill_n/94017.cc: New test.
6995 LWG 3355 The memory algorithms should support move-only input iterators
6997 * include/bits/ranges_uninitialized.h
6998 (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
6999 to copy __ifirst, which could be a move-only input iterator. Use
7000 operator- instead of ranges::distance to compute distance from a sized
7002 (__uninitialized_copy_n_fn::operator()): Likewise.
7003 (__uninitialized_move_fn::operator()): Likewise.
7004 (__uninitialized_move_n_fn::operator()): Likewise.
7005 (__uninitialized_destroy_fn::operator()): Use std::move to avoid
7006 attempting to copy __first.
7007 (__uninitialized_destroy_n_fn::operator()): Likewise.
7008 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
7010 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
7012 * .../specialized_algorithms/uninitialized_move/constrained.cc:
7015 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
7016 protected instead of private.
7017 (test_sized_range_sized_sent): New.
7019 * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
7020 New testsuite iterator.
7021 * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
7022 * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
7024 * include/bits/ranges_uninitialized.h
7025 (uninitialized_copy_fn::operator()): Pass a reference type as the first
7026 argument to is_nothrow_assignable_v.
7027 (uninitialized_copy_fn::operator()): Likewise.
7028 (uninitialized_move_fn::operator()): Likewise. Return an in_out_result
7029 with the input iterator stripped of its move_iterator.
7030 (uninitialized_move_n_fn::operator()): Likewise.
7031 (uninitialized_fill_fn::operator()): Pass a reference type as the first
7032 argument to is_nothrow_assignable_v.
7033 (uninitialized_fill_n_fn::operator()): Likewise.
7035 2020-03-03 Jonathan Wakely <jwakely@redhat.com>
7038 * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
7039 traits to control when to use memmove and memcmp optimizations.
7040 (__is_nonvolatile_trivially_copyable): New helper trait.
7041 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
7042 use memcmp optimization with volatile data.
7043 * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
7044 (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
7045 * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
7046 (__copy_move_backward_a2): Likewise.
7047 (__equal_aux1): Use __memcmpable.
7048 (__lexicographical_compare_aux): Do not use memcmp optimization with
7050 * testsuite/25_algorithms/copy/94013.cc: New test.
7051 * testsuite/25_algorithms/copy_backward/94013.cc: New test.
7052 * testsuite/25_algorithms/equal/94013.cc: New test.
7053 * testsuite/25_algorithms/fill/94013.cc: New test.
7054 * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
7055 * testsuite/25_algorithms/move/94013.cc: New test.
7056 * testsuite/25_algorithms/move_backward/94013.cc: New test.
7058 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
7059 Avoid redundant iterator comparisons (LWG 3410).
7061 2020-03-02 Jonathan Wakely <jwakely@redhat.com>
7064 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
7066 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
7068 * include/std/ranges (__detail::__maybe_empty_t): Rename to
7070 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
7072 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
7075 2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
7077 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
7079 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
7081 * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
7082 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
7083 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
7084 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
7085 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
7087 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
7088 Add libatomic option.
7089 * testsuite/30_threads/jthread/jthread.cc: Likewise.
7091 2020-02-29 François Dumont <fdumont@gcc.gnu.org>
7093 * include/bits/stl_algo.h
7094 (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
7095 * include/bits/stl_algobase.h: ...here.
7096 * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
7098 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
7100 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
7102 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
7104 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
7105 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
7106 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
7107 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
7108 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
7109 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
7110 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
7114 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
7116 2020-02-28 Patrick Palka <ppalka@redhat.com>
7119 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
7120 Fix condition for when to use memcmp, making it consistent with the
7121 corresponding condition used in std::lexicographical_compare.
7122 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
7124 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
7125 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
7126 existing signatures for C++2a.
7128 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
7130 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
7131 test instead of just compiling it.
7133 2020-02-28 Patrick Palka <ppalka@redhat.com>
7135 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
7136 whenever the underlying range models common_range.
7138 * include/std/ranges (__detail::_CachedPosition): New struct.
7139 (views::filter_view::_S_needs_cached_begin): New member variable.
7140 (views::filter_view::_M_cached_begin): New member variable.
7141 (views::filter_view::begin): Use _M_cached_begin to cache its
7143 (views::drop_view::_S_needs_cached_begin): New static member variable.
7144 (views::drop_view::_M_cached_begin): New member variable.
7145 (views::drop_view::begin): Use _M_cached_begin to cache its result
7146 when _S_needs_cached_begin.
7147 (views::drop_while_view::_M_cached_begin): New member variable.
7148 (views::drop_while_view::begin): Use _M_cached_begin to cache its
7150 (views::reverse_view::_S_needs_cached_begin): New static member
7152 (views::reverse_view::_M_cached_begin): New member variable.
7153 (views::reverse_view::begin): Use _M_cached_begin to cache its result
7154 when _S_needs_cached_begin.
7155 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
7156 drop_view::begin caches its result.
7157 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
7158 that drop_while_view::begin caches its result.
7159 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
7160 filter_view::begin caches its result.
7161 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
7162 reverse_view::begin caches its result.
7164 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
7166 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
7167 filesystems that silently truncate timestamps.
7168 * testsuite/experimental/filesystem/operations/last_write_time.cc:
7171 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
7172 -Wstringop-overflow warnings.
7174 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
7176 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
7177 -fdiagnostics-urls=never to options.
7179 2020-02-27 Patrick Palka <ppalka@redhat.com>
7181 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
7183 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
7184 (take_view::_Sentinel<_Const>): Likewise.
7185 (take_while_view::_Sentinel<_Const>): Likewise.
7186 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
7187 * testsuite/std/ranges/adaptors/split.cc: Augment test.
7188 * testsuite/std/ranges/adaptors/take.cc: Augment test.
7189 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
7190 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
7192 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
7193 base() of a vector<>::iterator is a pointer.
7194 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
7195 * testsuite/25_algorithms/move/constrained.cc: Likewise.
7196 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
7197 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
7199 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
7200 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
7201 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
7202 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
7203 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
7205 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
7207 * include/debug/array (operator<=>): Define for C++20.
7208 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
7209 Adjust dg-error line numbers.
7210 * testsuite/23_containers/array/tuple_interface/
7211 tuple_element_debug_neg.cc: Likewise.
7213 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
7214 defining _GLIBCXX_ASSERTIONS.
7215 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
7216 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
7217 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
7218 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
7219 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
7220 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
7221 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
7222 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
7223 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
7224 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
7225 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
7226 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
7228 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
7229 C++98 where the member function of the base class returns void.
7231 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
7232 equality comparisons that support value-initialized iterators.
7234 * include/bits/boost_concept_check.h (__function_requires): Add
7235 _GLIBCXX14_CONSTEXPR.
7236 * testsuite/25_algorithms/min/concept_checks.cc: New test.
7238 2020-02-26 Patrick Palka <ppalka@redhat.com>
7241 * include/std/ranges (split_view::_InnerIter::operator==): Compare
7242 the operands' _M_i rather than their _M_i.current().
7243 * testsuite/std/ranges/adaptors/split.cc: Augment test.
7245 P1645R1 constexpr for <numeric> algorithms
7246 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
7247 partial_sum, adjacent_difference): Make conditionally constexpr for
7249 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
7251 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
7252 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
7253 constexpr for C++20.
7254 * include/std/version (__cpp_lib_constexpr_numeric): Define.
7255 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
7256 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
7257 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
7258 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
7259 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
7260 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
7261 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
7262 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
7263 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
7264 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
7265 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
7267 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
7269 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
7270 variables in smaller scope and avoid calling ranges::distance when we
7271 know they are pointers. Remove statically-unreachable use of
7272 __builtin_unreachable().
7273 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
7276 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
7278 (__detail::__maybe_const_t): Likewise.
7279 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
7280 (transform_view, take_view, take_while_view, elements_view): Use
7282 (join_view, split_view): Use both.
7284 2020-02-25 Patrick Palka <ppalka@redhat.com>
7286 LWG 3397 basic_istream_view::iterator should not provide
7288 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
7290 (basic_istream_view:_Iterator::iterator_concept): ... this.
7291 * testsuite/std/ranges/istream_view.cc: Augment test.
7293 LWG 3325 Constrain return type of transformation function for
7295 * include/std/ranges (transform_view): Constrain the return type of the
7296 transformation function as per LWG 3325.
7297 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
7299 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
7300 * include/std/ranges (join_view::_Iterator::operator--): Require that
7301 range_reference_t<_Base> models common_range.
7302 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
7304 LWG 3301 transform_view::_Iterator has incorrect iterator_category
7305 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
7306 determination of iterator_category as per LWG 3301.
7307 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
7309 LWG 3292 iota_view is under-constrained
7310 * include/std/ranges (iota_view): Require that _Winc models semiregular
7312 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
7314 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
7316 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
7317 during constant evaluation. Call __builtin_memmove directly instead of
7319 (__copy_or_move_backward): Likewise.
7320 * include/bits/stl_algobase.h (__memmove): Remove.
7321 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
7322 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
7323 Use __builtin_memmove directly instead of __memmove.
7324 (__copy_move_a2): Do not use memmove during constant evaluation.
7325 (__copy_move_backward_a2): Use _IsMove constant to select correct
7326 __copy_move_backward specialization.
7327 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
7328 begin turned into moves during constant evaluation.
7330 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
7334 * include/bits/stl_algobase.h (__memmove): Cast away const before
7335 doing move assignment.
7336 * testsuite/25_algorithms/move/93872.cc: New test.
7337 * testsuite/25_algorithms/move_backward/93872.cc: New test.
7339 2020-02-24 Patrick Palka <ppalka@redhat.com>
7342 * include/bits/ranges_algobase.h (__copy_or_move,
7343 __copy_or_move_backward): Don't inspect the iter_value_t of the output
7344 iterator, instead inspect its iterator_traits directly.
7345 * include/bits/stl_iterator.h (back_insert_iterator::container):
7346 Conditionally initialize.
7347 (back_insert_iterator::difference_type): Conditionally define.
7348 (back_insert_iterator::back_insert_iterator): Conditionally define this
7349 default constructor.
7350 (front_insert_iterator::container): Conditionally initialize.
7351 (front_insert_iterator::difference_type): Conditionally define.
7352 (front_insert_iterator::front_insert_iterator): Conditionally define
7353 this default constructor.
7354 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
7355 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
7357 P0769R2 Add shift to <algorithm>
7358 * include/bits/ranges_algo.h (shift_left, shift_right): New.
7359 * testsuite/25_algorithms/shift_left/1.cc: New test.
7360 * testsuite/25_algorithms/shift_right/1.cc: New test.
7362 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
7364 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
7365 Make noexcept-specifier conditional.
7366 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
7369 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
7371 (operator==(istream_iterator, default_sentinel_t)): Add operator.
7372 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
7373 * include/bits/streambuf_iterator.h
7374 (istreambuf_iterator(default_sentinel_t)): Add constructor.
7375 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
7376 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
7378 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
7379 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
7381 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
7383 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
7384 (ranges::enable_view): Simplify (LWG 3326).
7385 * include/bits/range_access.h (ranges::enable_view): Declare.
7386 * include/bits/regex.h (__enable_view_impl): Remove partial
7388 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
7389 * include/bits/stl_set.h (__enable_view_impl): Likewise.
7390 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
7391 * include/debug/multiset.h (__enable_view_impl): Likewise.
7392 * include/debug/set.h (__enable_view_impl): Likewise.
7393 * include/debug/unordered_set (__enable_view_impl): Likewise.
7394 * include/experimental/string_view (ranges::enable_view): Define
7395 partial specialization.
7396 * include/std/span (ranges::enable_view): Likewise.
7397 * include/std/string_view (ranges::enable_view): Likewise.
7398 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
7400 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
7402 * include/std/optional (operator<=>(optional<T>, optional<U>))
7403 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
7405 * include/std/tuple (__tuple_cmp): New helper function for <=>.
7406 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
7407 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
7408 (operator<=>(monostate, monostate)): Define for C++20.
7409 * testsuite/20_util/optional/relops/three_way.cc: New test.
7410 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
7411 * testsuite/20_util/variant/89851.cc: Move to ...
7412 * testsuite/20_util/variant/relops/89851.cc: ... here.
7413 * testsuite/20_util/variant/90008.cc: Move to ...
7414 * testsuite/20_util/variant/relops/90008.cc: ... here.
7415 * testsuite/20_util/variant/relops/three_way.cc: New test.
7417 2020-02-20 Patrick Palka <ppalka@redhat.com>
7419 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
7421 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
7422 __maybe_refwrap to capture lvalue references by reference, and then use
7423 unwrap_reference_t to forward the by-reference captures as references.
7424 * testsuite/std/ranges/adaptors/split.cc: Augment test.
7425 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
7427 * include/std/ranges (iota_view): Forward declare _Sentinel.
7428 (iota_view::_Iterator): Befriend _Sentinel.
7429 (iota_view::_Sentinel::_M_equal): New member function.
7430 (iota_view::_Sentinel::operator==): Use it.
7431 (views::_Iota::operator()): Forward __f using the correct type.
7432 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
7433 with integers of different signedness, to appease iota_view's deduction
7435 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
7437 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
7439 * include/bits/range_access.h (ranges::begin): Reject array of
7441 (ranges::end, ranges::size): Require arrays to be bounded.
7442 (ranges::data): Require lvalue or borrowed_range.
7443 (ranges::iterator_t): Remove constraint.
7444 * testsuite/std/ranges/access/begin.cc: Do not check array of
7446 * testsuite/std/ranges/access/begin_neg.cc: New test.
7447 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
7448 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
7449 * testsuite/std/ranges/access/ssize.cc: Do not check array of
7452 * include/std/system_error (error_category::operator<=>)
7453 (operator<=>(const error_code&, const error_code&))
7454 (operator<=>(const error_condition&, const error_condition&)): Define
7456 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
7457 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
7459 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
7461 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
7462 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
7464 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
7465 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
7467 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
7468 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
7469 Remove incorrect comment.
7470 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
7473 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
7475 * include/std/thread (thread::id::operator<=>): Define for C++20.
7476 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
7477 functions in namespace std.
7478 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
7480 2020-02-19 Patrick Palka <ppalka@redhat.com>
7482 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
7483 null terminator of the underlying string as part of the test_range.
7484 (main): Call test03.
7486 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
7488 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
7489 requirement (LWG 3385).
7490 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
7491 expected declaration.
7493 * include/std/ranges (take_while_view, drop_view, drop_while_view)
7494 (elements_view:_Iterator): Initialize data members (LWG 3364).
7496 * libsupc++/compare (three_way_comparable): Remove always-false check
7497 that should have been removed with weak_equality (P1959R0).
7498 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
7500 * include/std/concepts (__detail::__partially_ordered_with): Move here
7502 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
7503 to simplify definition (LWG 3331).
7504 * libsupc++/compare (__detail::__partially_ordered_with): Move to
7507 * include/std/concepts (totally_ordered_with): Remove redundant
7508 requirement (LWG 3329).
7510 * include/std/ranges (__detail::__convertible_to_non_slicing): New
7512 (__detail::__pair_like_convertible_to): Remove.
7513 (__detail::__pair_like_convertible_from): Add requirements for
7514 non-slicing conversions.
7515 (subrange): Constrain constructors with __convertible_to_non_slicing.
7516 Remove constructors from pair-like types. Add new deduction guide.
7517 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
7519 * include/bits/iterator_concepts.h (iter_move): Add declaration to
7520 prevent unqualified lookup finding a suitable declaration (LWG 3247).
7522 * include/std/memory_resource (polymorphic_allocator::allocate)
7523 (polymorphic_allocator::allocate_object): Change type of exception to
7524 bad_array_new_length (LWG 3237).
7525 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
7527 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
7528 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
7529 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
7530 * testsuite/20_util/unwrap_reference/3.cc: New test.
7532 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
7533 type during overload resolution, use static assert instead (LWG 3200).
7534 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
7536 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
7538 * include/std/span (span(T (&)[N])): Use non-deduced context to
7539 prevent first parameter from interfering with class template argument
7540 deduction (LWG 3369).
7541 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
7542 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
7545 * include/std/span (span::const_iterator, span::const_reverse_iterator)
7546 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
7548 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
7550 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
7552 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
7553 constrained.cc: Likewise.
7554 * testsuite/20_util/specialized_algorithms/
7555 uninitialized_default_construct/constrained.cc: Likewise.
7556 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
7557 constrained.cc: Likewise.
7558 * testsuite/20_util/specialized_algorithms/uninitialized_move/
7559 constrained.cc: Likewise.
7560 * testsuite/20_util/specialized_algorithms/
7561 uninitialized_value_construct/constrained.cc: Likewise.
7563 * include/bits/range_access.h (range_size_t): Define alias template.
7564 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
7565 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
7567 * include/std/ranges (filter_view, transform_view, take_view)
7568 (join_view, split_view, reverse_view): Remove commented-out converting
7569 constructors (LWG 3280).
7571 * include/std/memory (uninitialized_construct_using_allocator): Use
7572 std::construct_at (LWG 3321).
7574 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
7575 (polymorphic_allocator::allocate_object)
7576 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
7578 LWG 3379. "safe" in several library names is misleading
7579 * include/bits/range_access.h (enable_safe_range): Rename to
7580 enable_borrowed_range.
7581 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
7582 (safe_range): Rename to borrowed_range.
7583 * include/bits/ranges_algo.h: Adjust to use new names.
7584 * include/bits/ranges_algobase.h: Likewise.
7585 * include/bits/ranges_uninitialized.h: Likewise.
7586 * include/std/ranges: Likewise.
7587 (safe_iterator_t): Rename to borrowed_iterator_t.
7588 (safe_subrange_t): Rename to borrowed_subrange_t.
7589 * include/std/span: Adjust to use new names.
7590 * include/std/string_view: Likewise.
7591 * include/experimental/string_view: Likewise.
7592 * testsuite/std/ranges/access/begin.cc: Likewise.
7593 * testsuite/std/ranges/access/cbegin.cc: Likewise.
7594 * testsuite/std/ranges/access/cdata.cc: Likewise.
7595 * testsuite/std/ranges/access/cend.cc: Likewise.
7596 * testsuite/std/ranges/access/crbegin.cc: Likewise.
7597 * testsuite/std/ranges/access/crend.cc: Likewise.
7598 * testsuite/std/ranges/access/data.cc: Likewise.
7599 * testsuite/std/ranges/access/end.cc: Likewise.
7600 * testsuite/std/ranges/access/rbegin.cc: Likewise.
7601 * testsuite/std/ranges/access/rend.cc: Likewise.
7602 * testsuite/std/ranges/safe_range.cc: Likewise.
7603 * testsuite/std/ranges/safe_range_types.cc: Likewise.
7604 * testsuite/util/testsuite_iterators.h: Likewise.
7606 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
7607 (tuple_element<1, const subrange<I, S, K>>): Add partial
7608 specializations (LWG 3398).
7609 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
7611 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
7612 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
7613 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
7615 2020-02-18 Patrick Palka <ppalka@redhat.com>
7617 P1983R0 Wording for GB301, US296, US292, US291, and US283
7618 * include/std/ranges (filter_view::pred): New member function.
7619 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
7620 P1983R0 fixes the highlighted issue in the same way.
7621 (join_view::_Iterator<_Const>): Add friend
7622 join_view::_Iterator<!_Const>.
7623 (join_view::_M_inner): Remove mutable specifier, effectively reverting
7624 the proposed wording changes of P3278.
7625 (join_view::begin): Refine the condition for when to return a const
7627 (split_view::_OuterIter::_OuterIter): Adjust constraints.
7628 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
7631 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
7634 * include/std/ranges (_RangeAdaptor): Add deduction guide.
7635 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
7637 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
7638 (transform_view::_Iterator): Add alias _Base_iter and use in place of
7640 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
7641 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
7642 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
7643 (split_view::_InnerIter::_S_iter_cat()): Likewise.
7645 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
7646 assumption that long is wider than int.
7647 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
7648 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
7649 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
7650 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
7652 P1976R2 Fixed-size span construction from dynamic range
7653 * include/std/span (__cpp_lib_span): Update value.
7654 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
7656 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
7658 (span::first<Count>(), span::last<Count>()): Use explicit type in
7660 (as_bytes, as_writable_bytes): Likewise.
7661 * include/std/version (__cpp_lib_span): Update value.
7662 * testsuite/23_containers/span/1.cc: Check new value.
7663 * testsuite/23_containers/span/2.cc: Check new value.
7664 * testsuite/23_containers/span/explicit.cc: New test.
7666 * include/std/span (span::__is_compatible_array): Simplify alias
7667 template by using requires-clause.
7668 (span::__is_compatible_ref): New alias template for constraining
7670 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
7671 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
7672 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
7673 redundant parentheses.
7674 (span(R&&)): Add missing constraints.
7676 * include/std/span (span): Reorder members and rename template
7677 parameters to match declarations in the C++2a working paper.
7679 P2116R0 Remove tuple-like protocol support from fixed-extent span
7680 * include/std/span (get, tuple_size, tuple_element): Remove.
7681 * testsuite/23_containers/span/everything.cc: Remove checks for
7683 * testsuite/23_containers/span/get_neg.cc: Remove.
7684 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
7685 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
7686 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
7688 2020-02-17 Patrick Palka <ppalka@redhat.com>
7690 P2106R0 Alternative wording for GB315 and GB316
7691 * include/bits/ranges_algo.h (in_fun_result): New.
7692 (for_each_result, for_each_n_result): Change into an alias of
7694 (in_in_result): New.
7695 (mismatch_result): Change into an alias of in_in_result.
7696 (copy_if_result): Change into an alias of in_out_result.
7697 (swap_ranges_result): Change into an alias of in_in_result.
7698 (unary_transform_result): Change into an alias of in_out_result.
7699 (in_in_out_result): New.
7700 (binary_transform_result): Change into an alias of in_in_out_result.
7701 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
7702 remove_copy_result, unique_copy_result, reverse_copy_result,
7703 rotate_copy_result, partial_sort_copy_result): Change into an alias of
7705 (in_out_out_result): New.
7706 (partition_copy_result, merge_result): Change into an alias of
7708 (set_union_result, set_intersection_result): Change into an alias of
7710 (set_difference_result): Change into an alias of in_out_result.
7711 (set_symmetric_difference): Change into an alias of in_in_out_result.
7712 (min_max_result): New.
7713 (minmax_result, minmax_element_result): Change into an alias of
7715 (in_found_result): New.
7716 (next_permutation_result, prev_permutation_result): Change into an alias
7718 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
7719 Adjust following changes to next_permutation_result and
7720 prev_permutation_result.
7721 * include/bits/ranges_algobase.h (in_out_result): New.
7722 (copy_result, move_result, move_backward_result, copy_backward_result,
7723 copy_n_result): Change into an alias of in_out_result.
7724 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
7725 uninitialized_copy_n_result, uninitialized_move_result,
7726 uninitialized_move_n_result): Likewise.
7727 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
7728 structured bindings.
7729 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
7731 P1243R4 Rangify new algorithms
7732 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
7733 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
7734 * testsuite/25_algorithms/clamp/constrained.cc: New test.
7735 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
7736 * testsuite/25_algorithms/sample/constrained.cc: New test.
7738 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
7740 P1964R2 Wording for boolean-testable
7741 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
7742 (__adjacent_find_fn): Cast result of predicate to bool.
7743 * include/std/concepts (__boolean): Remove.
7744 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
7745 new helper concepts.
7746 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
7747 (predicate): Use __boolean_testable instead of boolean.
7748 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
7751 P1970R2 Consistency for size() functions: Add ranges::ssize
7752 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
7753 * testsuite/std/ranges/access/ssize.cc: New test.
7755 P1956R1 On the names of low-level bit manipulation functions
7756 * include/bits/hashtable_policy.h: Update comment.
7757 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
7758 (ispow2, ceil2, floor2, log2p1): Likewise.
7759 (__cpp_lib_int_pow2): Add feature test macro.
7760 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
7761 * include/std/memory (assume_aligned): Adjust use of ispow2.
7762 * include/std/version (__cpp_lib_int_pow2): Add.
7763 * libsupc++/new_opa.cc: Adjust use of __ispow2.
7764 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
7765 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
7766 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
7767 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
7768 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
7769 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
7770 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
7771 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
7772 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
7773 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
7774 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
7775 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
7777 * include/std/charconv: Add comment.
7779 PR libstdc++/92546 (partial)
7780 * include/bits/random.h (uniform_random_bit_generator): Move definition
7781 to <bits/uniform_int_dist.h>.
7782 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
7784 * include/bits/ranges_algobase.h: Do not include <cmath>.
7785 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
7787 * include/std/ranges: Do not include <limits>.
7788 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
7790 PR libstdc++/92546 (partial)
7791 * include/Makefile.am: Add new header.
7792 * include/Makefile.in: Regenerate.
7793 * include/bits/int_limits.h: New header.
7794 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
7795 numeric_limits with __detail::__int_limits.
7796 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
7797 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
7799 * include/std/charconv (__to_chars_8, __from_chars_binary)
7800 (__from_chars_alpha_to_num, from_chars): Likewise.
7801 * include/std/memory_resource (polymorphic_allocator::allocate)
7802 (polymorphic_allocator::allocate_object): Likewise.
7803 * include/std/string_view (basic_string_view::_S_compare): Likewise.
7804 * include/std/utility (in_range): Likewise.
7805 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
7806 extra error about incomplete type __int_limits<bool>.
7807 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
7808 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
7809 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
7810 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
7811 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
7812 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
7813 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
7814 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
7815 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
7816 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
7817 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
7818 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
7820 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
7821 value for partial_ordering::unordered.
7823 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
7824 const-qualified expression variations.
7825 * include/std/concepts (copyable): Likewise.
7827 * include/std/type_traits (__is_standard_integer): New helper trait.
7828 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
7829 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
7830 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
7831 * testsuite/20_util/integer_comparisons/1.cc: New test.
7832 * testsuite/20_util/integer_comparisons/2.cc: New test.
7833 * testsuite/20_util/integer_comparisons/equal.cc: New test.
7834 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
7835 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
7836 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
7837 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
7838 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
7839 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
7840 * testsuite/20_util/integer_comparisons/less.cc: New test.
7841 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
7842 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
7843 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
7844 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
7845 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
7847 2020-02-16 Patrick Palka <ppalka@redhat.com>
7849 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
7850 Move code after an early exit constexpr if to under an else branch.
7851 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
7853 2020-02-15 Patrick Palka <ppalka@redhat.com>
7855 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
7856 * include/bits/ranges_algobase.h: Likewise.
7857 * include/bits/ranges_uninitialized.h: Likewise.
7859 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
7860 binary_search, copy_if, count, count_if, equal_range, find, find_end,
7861 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
7862 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
7863 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
7864 lower_bound, make_heap, max, max_element, merge, min, min_element,
7865 minmax, minmax_element, mismatch, next_permutation, none_of,
7866 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
7867 partition_point, pop_heap, prev_permutation, push_heap, remove,
7868 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
7869 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
7870 search, search_n, set_difference, set_intersection,
7871 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
7872 stable_partition, stable_sort, swap_ranges, transform, unique,
7873 unique_copy, upper_bound): Convert into function objects.
7874 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
7875 fill, move_backward, copy_backward): Likewise.
7876 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
7877 uninitialized_default_construct_n, uninitialized_value_construct,
7878 uninitialized_value_construct_n, uninitialized_copy,
7879 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
7880 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
7881 destroy, destroy_n): Likewise.
7883 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
7884 (ranges::find_end): ... here.
7885 (ranges::__lexicographical_compare): Fold into ...
7886 (ranges::lexicographical_compare): ... here.
7887 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
7888 (ranges::equal): ... here.
7890 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
7892 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
7893 * include/std/deque: Likewise.
7894 * include/std/forward_list: Likewise.
7895 * include/std/list: Likewise.
7896 * include/std/string: Likewise.
7897 * include/std/vector: Likewise.
7898 * include/std/version: Likewise.
7899 * testsuite/23_containers/deque/erasure.cc: Test for new value.
7900 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
7901 * testsuite/23_containers/list/erasure.cc: Likewise.
7902 * testsuite/23_containers/map/erasure.cc: Likewise.
7903 * testsuite/23_containers/set/erasure.cc: Likewise.
7904 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
7905 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
7906 * testsuite/23_containers/vector/erasure.cc: Likewise.
7908 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
7910 * include/bits/random.h (uniform_random_bit_generator): Require min()
7911 and max() to be constant expressions and min() to be less than max().
7912 * testsuite/26_numerics/random/concept.cc: Check additional cases.
7913 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
7915 2020-02-13 Patrick Palka <ppalka@redhat.com>
7917 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
7918 * include/Makefile.in: Regenerate.
7919 * include/bits/ranges_uninitialized.h: New header.
7920 * include/std/memory: Include it.
7921 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
7923 * .../uninitialized_copy/constrained.cc: New test.
7924 * .../uninitialized_default_construct/constrained.cc: New test.
7925 * .../uninitialized_fill/constrained.cc: New test.
7926 * .../uninitialized_move/constrained.cc: New test.
7927 * .../uninitialized_value_construct/constrained.cc: New test.
7929 * include/Makefile.am: Add bits/ranges_algobase.h
7930 * include/Makefile.in: Regenerate.
7931 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
7933 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
7934 __detail::__is_move_iterator, copy_result, move_result,
7935 __equal, equal, copy_result, move_result, move_backward_result,
7936 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
7937 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
7938 fill): Split out into ...
7939 * bits/range_algobase.h: ... this new header.
7941 2020-02-12 Patrick Palka <ppalka@redhat.com>
7943 LWG 3389 and LWG 3390
7944 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
7945 constructing the move_iterator with __i.
7946 (counted_iterator::counted_iterator): Use std::move when initializing
7948 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
7949 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
7951 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
7956 * configure: Regenerated.
7958 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
7960 * include/bits/hashtable.h
7961 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
7962 missing std namespace qualification to forward call.
7964 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
7966 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
7968 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
7970 * include/std/ranges: Fix non-ASCII characters in comment.
7972 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
7973 equality comparison to be valid and return bool.
7974 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
7975 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
7976 type with ambiguous conversion to fundamental types.
7977 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
7979 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
7981 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
7983 (readable_traits): Rename to indirectly_readable_traits.
7984 (readable): Rename to indirectly_readable.
7985 (writable): Rename to indirectly_writable.
7986 (__detail::__iter_exchange_move): Do not use remove_reference_t.
7987 (indirectly_swappable): Adjust requires expression parameter types.
7989 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
7990 (ranges::replace_if, ranges::generate_n, ranges::generate)
7991 (ranges::remove): Use new name for writable.
7992 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
7993 Use new name for readable.
7994 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
7995 new name for readable_traits.
7996 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
7997 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
7998 new definition of indirectly_readable.
8000 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
8001 to take parameters of common_iterator, instead of the common_iterator
8002 type itself. Fix argument for __common_iter_has_arrow constraint.
8003 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
8005 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
8007 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
8009 (basic_istream_view::_Iterator::operator++()): Add missing return.
8011 2020-02-07 Patrick Palka <ppalka@redhat.com>
8013 * include/bits/ranges_algo.h: Remove extraneous &&.
8015 * include/std/ranges (ranges::__detail::__stream_extractable,
8016 ranges::basic_istream_view, ranges::istream_view): Define.
8017 * testsuite/std/ranges/istream_view: New test.
8019 Implement C++20 range adaptors
8020 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
8021 (subrange::_S_store_size): Mark as const instead of constexpr to
8022 avoid what seems to be a bug in GCC.
8023 (__detail::__box): Give it defaulted copy and move constructors.
8024 (ranges::views::_Single::operator()): Mark constexpr.
8025 (ranges::views::_Iota::operator()): Mark constexpr.
8026 (__detail::Empty): Define.
8027 (ranges::views::__closure::_RangeAdaptor,
8028 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
8029 ranges::views::all, ranges::__detail::find_if,
8030 ranges::__detail::find_if_not, ranges::__detail::mismatch,
8031 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
8032 ranges::views::transform, take_view, ranges::views::take,
8033 take_while_view, ranges::views::take_while, drop_view,
8034 ranges::views::drop, join_view, ranges::views::join,
8035 __detail::require_constant, __detail::tiny_range, split_view,
8036 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
8037 common_view, ranges::views::common, reverse_view,
8038 ranges::views::reverse,
8039 ranges::views::__detail::__is_reversible_subrange,
8040 ranges::views::__detail::__is_reverse_view, reverse_view,
8041 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
8042 ranges::views::elements, ranges::views::keys, ranges::views::values):
8044 (views): Alias for ranges::views.
8045 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
8046 tuple_element<1, ranges::subrange>): New partial specializations.
8047 * testsuite/std/ranges/adaptors/all.cc: New test.
8048 * testsuite/std/ranges/adaptors/common.cc: Likewise.
8049 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
8050 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
8051 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
8052 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
8053 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
8054 * testsuite/std/ranges/adaptors/join.cc: Likewise.
8055 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
8056 * testsuite/std/ranges/adaptors/split.cc: Likewise.
8057 * testsuite/std/ranges/adaptors/take.cc: Likewise.
8058 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
8059 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
8061 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
8063 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
8064 type of enumerations and comparison category types.
8065 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
8066 (__cmp_cat::_Ncmp::unordered): Change value to 2.
8067 (partial_ordering::_M_value, weak_ordering::_M_value)
8068 (strong_ordering::_M_value): Change type to __cmp_cat::type.
8069 (partial_ordering::_M_is_ordered): Remove data member.
8070 (partial_ordering): Use second bit of _M_value for unordered. Adjust
8071 comparison operators.
8072 (weak_ordering::operator partial_ordering): Simplify to remove
8074 (operator<=>(unspecified, weak_ordering)): Likewise.
8075 (strong_ordering::operator partial_ordering): Likewise.
8076 (strong_ordering::operator weak_ordering): Likewise.
8077 (operator<=>(unspecified, strong_ordering)): Likewise.
8078 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
8079 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
8080 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
8082 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
8083 __cpp_lib_three_way_comparison macro and use deduced return type for
8085 * testsuite/std/ranges/iota/iterator.cc: New test.
8087 2020-02-07 Patrick Palka <ppalka@redhat.com>
8088 Jonathan Wakely <jwakely@redhat.com>
8090 Implement C++20 constrained algorithms
8091 * include/Makefile.am: Add new header.
8092 * include/Makefile.in: Regenerate.
8093 * include/std/algorithm: Include <bits/ranges_algo.h>.
8094 * include/bits/ranges_algo.h: New file.
8095 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
8096 * testsuite/25_algorithms/all_of/constrained.cc: New test.
8097 * testsuite/25_algorithms/any_of/constrained.cc: New test.
8098 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
8099 * testsuite/25_algorithms/copy/constrained.cc: New test.
8100 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
8101 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
8102 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
8103 * testsuite/25_algorithms/count/constrained.cc: New test.
8104 * testsuite/25_algorithms/count_if/constrained.cc: New test.
8105 * testsuite/25_algorithms/equal/constrained.cc: New test.
8106 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
8107 * testsuite/25_algorithms/fill/constrained.cc: New test.
8108 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
8109 * testsuite/25_algorithms/find/constrained.cc: New test.
8110 * testsuite/25_algorithms/find_end/constrained.cc: New test.
8111 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
8112 * testsuite/25_algorithms/find_if/constrained.cc: New test.
8113 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
8114 * testsuite/25_algorithms/for_each/constrained.cc: New test.
8115 * testsuite/25_algorithms/generate/constrained.cc: New test.
8116 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
8117 * testsuite/25_algorithms/heap/constrained.cc: New test.
8118 * testsuite/25_algorithms/includes/constrained.cc: New test.
8119 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
8120 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
8121 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
8122 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
8123 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
8124 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
8126 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
8127 * testsuite/25_algorithms/max/constrained.cc: New test.
8128 * testsuite/25_algorithms/max_element/constrained.cc: New test.
8129 * testsuite/25_algorithms/merge/constrained.cc: New test.
8130 * testsuite/25_algorithms/min/constrained.cc: New test.
8131 * testsuite/25_algorithms/min_element/constrained.cc: New test.
8132 * testsuite/25_algorithms/minmax/constrained.cc: New test.
8133 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
8134 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
8135 * testsuite/25_algorithms/move/constrained.cc: New test.
8136 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
8137 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
8138 * testsuite/25_algorithms/none_of/constrained.cc: New test.
8139 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
8140 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
8141 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
8142 * testsuite/25_algorithms/partition/constrained.cc: New test.
8143 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
8144 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
8145 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
8146 * testsuite/25_algorithms/remove/constrained.cc: New test.
8147 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
8148 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
8149 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
8150 * testsuite/25_algorithms/replace/constrained.cc: New test.
8151 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
8152 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
8153 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
8154 * testsuite/25_algorithms/reverse/constrained.cc: New test.
8155 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
8156 * testsuite/25_algorithms/rotate/constrained.cc: New test.
8157 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
8158 * testsuite/25_algorithms/search/constrained.cc: New test.
8159 * testsuite/25_algorithms/search_n/constrained.cc: New test.
8160 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
8161 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
8162 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
8164 * testsuite/25_algorithms/set_union/constrained.cc: New test.
8165 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
8166 * testsuite/25_algorithms/sort/constrained.cc: New test.
8167 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
8168 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
8169 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
8170 * testsuite/25_algorithms/transform/constrained.cc: New test.
8171 * testsuite/25_algorithms/unique/constrained.cc: New test.
8172 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
8173 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
8175 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
8177 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
8178 number in comment. Fix indentation.
8180 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
8181 redundant _GLIBCXX20_CONSTEXPR.
8183 * include/std/ranges (viewable_range): Replace decay_t with
8184 remove_cvref_t (LWG 3375).
8186 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
8188 * include/bits/iterator_concepts.h (iter_reference_t)
8189 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
8190 Remove workarounds for PR c++/67704.
8191 * testsuite/24_iterators/aliases.cc: New test.
8193 2020-02-05 Patrick Palka <ppalka@redhat.com>
8195 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
8196 when initializing _M_current.
8197 (move_iterator::base): Split into two overloads differing in
8198 ref-qualifiers as in P1207R4 for C++20.
8200 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
8202 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
8206 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
8207 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
8208 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
8210 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
8212 * configure: Regenerate.
8214 2020-01-31 Patrick Palka <ppalka@redhat.com>
8216 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
8217 test_range::end() returns the same type as test_range::begin().
8218 * testsuite/24_iterators/range_operations/next.cc: Likewise.
8219 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
8220 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
8221 Always return a sentinel<I>.
8223 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
8226 * include/std/stop_token (stop_token::stop_possible()): Call new
8227 _M_stop_possible() function.
8228 (stop_token::stop_requested()): Do not use stop_possible().
8229 (stop_token::binary_semaphore): New class, as temporary stand-in for
8230 std::binary_semaphore.
8231 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
8232 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
8233 New data members for symchronization with stop_callback destruction.
8234 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
8235 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
8237 (stop_token::_Stop_cb::_M_run): New member function.
8238 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
8240 (stop_token::_Stop_state::_M_owners): New data member to track
8241 reference count for ownership.
8242 (stop_token::_Stop_state::_M_value): New data member combining a
8243 spinlock, the stop requested flag, and the reference count for
8244 associated stop_source objects.
8245 (stop_token::_Stop_state::_M_requester): New data member for
8246 synchronization with stop_callback destruction.
8247 (stop_token::_Stop_state::_M_stop_possible()): New member function.
8248 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
8250 (stop_token::_Stop_state::_M_add_owner)
8251 (stop_token::_Stop_state::_M_release_ownership)
8252 (stop_token::_Stop_state::_M_add_ssrc)
8253 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
8254 updating reference counts.
8255 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
8256 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
8257 (stop_token::_Stop_state::_M_try_lock)
8258 (stop_token::_Stop_state::_M_try_lock_and_stop)
8259 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
8261 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
8262 read and update state. Release lock while running callbacks. Use new
8263 data members to synchronize with callback destruction.
8264 (stop_token::_Stop_state::_M_remove_callback): Likewise.
8265 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
8266 to read and update state.
8267 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
8268 replacing shared_ptr.
8269 (stop_source::stop_source(const stop_source&)): Update reference count.
8270 (stop_source::operator=(const stop_source&)): Likewise.
8271 (stop_source::~stop_source()): Likewise.
8272 (stop_source::stop_source(stop_source&&)): Define as defaulted.
8273 (stop_source::operator=(stop_source&&)): Establish postcondition on
8275 (stop_callback): Enforce preconditions on template parameter. Replace
8276 base class with data member of new _Cb_impl type.
8277 (stop_callback::stop_callback(const stop_token&, Cb&&))
8278 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
8279 (stop_callback::_Cb_impl): New type wrapping _Callback member and
8280 defining the _S_execute member function.
8281 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
8283 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
8284 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
8285 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
8287 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
8289 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
8290 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
8291 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
8294 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
8295 three_way_comparable_with.
8296 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
8297 (compare_three_way::operator()): Remove redundant constraint from
8299 (__detail::_Synth3way::operator()): Use three_way_comparable_with
8300 instead of workaround.
8301 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
8302 output due to simplified constraints on compare_three_way::operator().
8305 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
8306 * testsuite/18_support/comparisons/object/93479.cc: New test.
8308 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
8309 returns the same type as test_range::begin(). Add comments.
8310 * testsuite/std/ranges/access/rbegin.cc: Likewise.
8311 * testsuite/std/ranges/access/rend.cc: Likewise.
8312 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
8313 test_range is the same as its iterator type.
8314 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
8315 operator- overloads to satisfy sized_sentinel_for when the iterator
8316 satisfies random_access_iterator.
8318 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
8321 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
8322 static assertion to object types.
8325 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
8326 clock_gettime instead of explicit glibc version check.
8327 * configure: Regenerate.
8329 2020-01-28 Martin Liska <mliska@suse.cz>
8332 * include/std/atomic: Fix typo.
8333 * include/std/optional: Likewise.
8335 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
8337 * configure: Regenerate.
8339 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
8342 * include/std/span (span): Fix deduction guide.
8343 * testsuite/23_containers/span/deduction.cc: New test.
8345 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
8347 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
8348 (__cmp_cat::_Ord::equivalent): Add enumerator.
8349 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
8351 (partial_ordering, weak_ordering, strong_ordering): Remove
8352 constructors taking __cmp_cat::_Eq parameters. Use renamed
8355 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
8357 * acinclude.m4: Handle `--with-toolexeclibdir='.
8358 * Makefile.in: Regenerate.
8359 * aclocal.m4: Regenerate.
8360 * configure: Regenerate.
8361 * doc/Makefile.in: Regenerate.
8362 * include/Makefile.in: Regenerate.
8363 * libsupc++/Makefile.in: Regenerate.
8364 * po/Makefile.in: Regenerate.
8365 * python/Makefile.in: Regenerate.
8366 * src/Makefile.in: Regenerate.
8367 * src/c++11/Makefile.in: Regenerate.
8368 * src/c++17/Makefile.in: Regenerate.
8369 * src/c++98/Makefile.in: Regenerate.
8370 * src/filesystem/Makefile.in: Regenerate.
8371 * testsuite/Makefile.in: Regenerate.
8373 2020-01-23 Alexandre Oliva <oliva@adacore.com>
8375 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
8376 * configure: Rebuild.
8378 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
8380 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
8383 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
8385 * include/Makefile.in: Regenerate.
8387 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
8389 * doc/xml/faq.xml: Fix grammar.
8390 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
8391 * doc/xml/manual/spine.xml: Update copyright years.
8392 * doc/html/*: Regenerate.
8394 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
8396 * doc/xml/faq.xml: Update for SVN -> Git transition.
8397 * doc/xml/manual/appendix_contributing.xml: Likewise.
8398 * doc/xml/manual/status_cxx1998.xml: Likewise.
8399 * doc/xml/manual/status_cxx2011.xml: Likewise.
8400 * doc/xml/manual/status_cxx2014.xml: Likewise.
8401 * doc/xml/manual/status_cxx2017.xml: Likewise.
8402 * doc/xml/manual/status_cxx2020.xml: Likewise.
8403 * doc/xml/manual/status_cxxtr1.xml: Likewise.
8404 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
8406 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
8408 * include/Makefile.am: Add coroutine to the std set.
8409 * include/Makefile.in: Regenerated.
8410 * include/std/coroutine: New file.
8412 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
8415 * include/bits/c++config: Only do PSTL config when the header is
8416 present, to fix freestanding.
8417 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
8418 functions if they were detected by configure.
8420 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
8421 Matthew Bauer <mjbauer95@gmail.com>
8422 Jonathan Wakely <jwakely@redhat.com>
8424 PR bootstrap/64271 (partial)
8425 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
8427 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
8428 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
8429 definitions with NetBSD upstream.
8430 (ctype_base::blank): Use _CTYPE_BL.
8431 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
8433 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
8434 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
8435 parameters to unsigned char.
8436 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
8438 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
8441 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
8442 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
8443 (_Equality_base): Remove.
8444 (_Equality<>::_M_equal): Review implementation. Use
8445 std::is_permutation.
8446 * testsuite/23_containers/unordered_multiset/operators/1.cc
8447 (Hash, Equal, test02, test03): New.
8448 * testsuite/23_containers/unordered_set/operators/1.cc
8449 (Hash, Equal, test02, test03): New.
8451 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
8454 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
8455 Move here from <bits/range_access.h> and define using __int128 when
8457 (__is_integer_like, __is_signed_integer_like): Move here from
8458 <bits/range_access.h>.
8459 (weakly_incrementable): Use __is_signed_integer_like.
8460 * include/bits/range_access.h (__max_diff_type, __max_size_type)
8461 (__is_integer_like, __is_signed_integer_like): Move to
8462 <bits/iterator_concepts.h>.
8463 (__make_unsigned_like_t): Move here from <ranges>.
8464 * include/std/ranges (__make_unsigned_like_t): Move to
8465 <bits/range_access.h>.
8466 (iota_view): Replace using-directive with using-declarations.
8467 * testsuite/std/ranges/iota/93267.cc: New test.
8468 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
8470 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
8473 * include/bits/fs_path.h (path::generic_string<C,A>)
8474 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
8475 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
8476 root-dir is converted to forward slash in generic pathname.
8477 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
8478 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
8481 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
8483 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
8484 (__atomic_float): Add default member initializer for C++20.
8485 * include/std/atomic (atomic): Likewise.
8486 (atomic::atomic()): Remove noexcept-specifier on default constructor.
8487 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
8488 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
8490 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
8491 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
8492 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
8493 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
8494 expected result for is_trivially_default_constructible.
8495 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
8496 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
8497 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
8498 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
8499 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
8500 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
8501 expected results for is_trivially_default_constructible.
8502 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
8505 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
8507 * testsuite/util/testsuite_iterators.h: Improve comment.
8509 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
8510 initialization syntax.
8513 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
8514 of base class independent of __cplusplus value.
8515 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
8516 type defined in the base class
8517 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
8518 * testsuite/24_iterators/istreambuf_iterator/requirements/
8519 base_classes.cc: Adjust expected base class for C++98.
8521 2020-01-09 Olivier Hainque <hainque@adacore.com>
8523 * doc/xml/manual/appendix_contributing.xml: Document _C2
8524 as a reserved identifier, by VxWorks.
8525 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
8526 * include/bits/stl_multimap.h: Likewise.
8528 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
8530 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
8531 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
8532 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
8533 partial specialization to disambiguate the two constrained
8536 * include/experimental/type_traits (experimental::is_pod_v): Disable
8537 -Wdeprecated-declarations warnings around reference to std::is_pod.
8538 * include/std/type_traits (is_pod_v): Likewise.
8539 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
8540 is_standard_layout and is_trivial. Do not check is_pod for C++20.
8541 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
8542 Add -Wno-deprecated for C++20.
8543 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
8544 * testsuite/20_util/is_pod/value.cc: Likewise.
8545 * testsuite/experimental/type_traits/value.cc: Likewise.
8547 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
8549 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
8550 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
8551 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
8553 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
8556 * include/bits/random.h (operator>>): Check stream operation succeeds.
8557 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
8559 (operator>>): Remove redundant __istream_type typedefs. Check stream
8561 (__extract_params): New function to fill a vector from a stream.
8562 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
8565 * config/abi/pre/gnu.ver: Add new exports.
8566 * include/std/memory_resource (memory_resource::~memory_resource()):
8567 Do not define inline.
8568 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
8569 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
8571 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
8572 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
8574 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
8577 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
8579 (_Hashtable<>::__fwd_value_for): New.
8580 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
8582 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
8583 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
8584 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
8586 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
8587 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
8589 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
8591 * testsuite/23_containers/unordered_set/92124.cc: New.
8593 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
8596 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
8597 detailed error reporting for remove_all. Check result of recursive
8598 call before incrementing iterator.
8599 (remove_all(const path&), remove_all(const path&, error_code&)): Use
8601 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
8602 result of recursive call before incrementing iterator.
8603 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
8604 are reported correctly.
8605 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
8607 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
8609 * include/std/condition_variable
8610 (condition_variable_any::wait_on): Rename to match current draft
8612 (condition_variable_any::wait_on_until): Likewise.
8613 (condition_variable_any::wait_on_for): Likewise.
8614 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
8615 Adjust tests to account for renamed methods.
8617 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
8620 * include/bits/stl_tree.h
8621 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
8622 std::move_if_noexcept by std::move.
8623 * testsuite/23_containers/map/92124.cc: New.
8624 * testsuite/23_containers/set/92124.cc: New.
8626 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
8628 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
8629 (stop_source): Likewise (LWG 3362).
8630 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
8633 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
8634 (lexicographical_compare_three_way): Do not depend on
8636 * include/std/version (__cpp_lib_three_way_comparison): Only define
8637 when __cpp_lib_concepts is defined.
8638 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
8640 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
8642 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
8643 Only define four-argument overload when __cpp_lib_concepts is defined.
8645 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
8647 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
8649 2020-01-01 Jakub Jelinek <jakub@redhat.com>
8651 Update copyright years.
8653 Copyright (C) 2020 Free Software Foundation, Inc.
8655 Copying and distribution of this file, with or without modification,
8656 are permitted in any medium without royalty provided the copyright
8657 notice and this notice are preserved.