libstdc++: Reformat Python code
[official-gcc.git] / libstdc++-v3 / ChangeLog-2020
blobb7d0f7da16a48c433907254be137e93f9402eb86
1 2020-12-27  Gerald Pfeifer  <gerald@pfeifer.com>
3         * doc/xml/manual/abi.xml: Update link to Arm ABI.
4         * doc/html/manual/abi.html: Regenerate.
6 2020-12-27  Gerald Pfeifer  <gerald@pfeifer.com>
8         * doc/xml/manual/debug.xml: Move Valgrind references to https.
9         * doc/html/manual/debug.html: Regenerate.
11 2020-12-26  Gerald Pfeifer  <gerald@pfeifer.com>
13         * doc/xml/manual/abi.xml: Update link to Intel's compatibility
14         with GNU compilers document.
15         * doc/html/manual/abi.html: Regenerate.
17 2020-12-25  Gerald Pfeifer  <gerald@pfeifer.com>
19         * doc/xml/manual/messages.xml: Update link to Java docs.
20         * doc/html/manual/facets.html: Ditto.
22 2020-12-25  Gerald Pfeifer  <gerald@pfeifer.com>
24         * doc/xml/manual/documentation_hacking.xml: Convert three links
25         to doxygen.nl to https.
26         * doc/html/manual/documentation_hacking.html: Regenerate.
28 2020-12-23  Olivier Hainque  <hainque@adacore.com>
30         * testsuite/17_intro/names.cc: Account for VxWorks headers.
32 2020-12-21  Patrick Palka  <ppalka@redhat.com>
34         * include/bits/c++config (_GLIBCXX_FLOAT_IS_IEEE_BINARY_32):
35         Define this macro.
36         (_GLIBCXX_DOUBLE_IS_IEEE_BINARY_64): Likewise.
37         * include/std/charconv (to_chars): Use these macros to
38         conditionally hide the overloads for floating-point types.
39         * src/c++17/floating_to_chars.cc: Use the macros to
40         conditionally disable this file.
41         (floating_type_traits<float>): Remove redundant static assert.
42         (floating_type_traits<double>): Likewise.
43         * testsuite/20_util/to_chars/double.cc: Run this test only on
44         ieee-floats effective targets.
45         * testsuite/20_util/to_chars/float.cc: Likewise.
46         * testsuite/20_util/to_chars/long_double.cc: Likewise.
47         * testsuite/lib/libstdc++.exp
48         (check_effective_target_ieee-floats): Define new proc for
49         detecting whether float and double have the IEEE binary32 and
50         binary64 formats.
52 2020-12-20  Jonathan Wakely  <jwakely@redhat.com>
54         * include/std/semaphore: Fix indentation.
56 2020-12-18  Patrick Palka  <ppalka@redhat.com>
58         PR libstdc++/98377
59         * src/c++17/floating_to_chars.cc (__floating_to_chars_precision):
60         Fix mistake.
62 2020-12-18  Patrick Palka  <ppalka@redhat.com>
64         PR libstdc++/98370
65         * src/c++17/floating_to_chars.cc (__floating_to_chars_shortest):
66         Provide explicit template arguments to the call to std::max.
68 2020-12-18  Patrick Palka  <ppalka@redhat.com>
70         PR libstdc++/98374
71         * src/c++17/floating_to_chars.cc: Guard include of <langinfo.h>
72         with __has_include.
73         (__floating_to_chars_precision) [!defined(RADIXCHAR)]: Don't
74         attempt to obtain the radix character of the current locale,
75         just assume it's '.'.
77 2020-12-18  Patrick Palka  <ppalka@redhat.com>
79         * src/c++17/floating_from_chars.cc (from_chars_impl)
80         [!defined(FE_TONEAREST)]: Don't adjust the rounding mode.
81         * src/c++17/floating_to_chars.cc (__floating_to_chars_precision):
82         Likewise.
84 2020-12-18  Patrick Palka  <ppalka@redhat.com>
86         * testsuite/20_util/to_chars/double.cc: New test, consisting of
87         testcases imported from the MSVC STL testsuite.
88         * testsuite/20_util/to_chars/float.cc: Likewise.
90 2020-12-18  Patrick Palka  <ppalka@redhat.com>
92         * config/abi/pre/gnu.ver: Add new exports.
93         * include/std/charconv (to_chars): Declare the floating-point
94         overloads for float, double and long double.
95         * src/c++17/Makefile.am (sources): Add floating_to_chars.cc.
96         * src/c++17/Makefile.in: Regenerate.
97         * src/c++17/floating_to_chars.cc: New file.
98         (to_chars): Define for float, double and long double.
99         * testsuite/20_util/to_chars/long_double.cc: New test.
101 2020-12-18  Patrick Palka  <ppalka@redhat.com>
103         * src/c++17/ryu/common.h, src/c++17/ryu/d2fixed.c,
104         src/c++17/ryu/d2fixed_full_table.h, src/c++17/ryu/d2s.c,
105         src/c++17/ryu/d2s_intrinsics.h, src/c++17/ryu/f2s.c,
106         src/c++17/ryu/f2s_intrinsics.h, src/c++17/ryu/generic_128.c:
107         Apply local modifications.
109 2020-12-18  Patrick Palka  <ppalka@redhat.com>
111         * src/c++17/ryu/MERGE: New file.
112         * src/c++17/ryu/common.h, src/c++17/ryu/d2fixed.c,
113         src/c++17/ryu/d2fixed_full_table.h, src/c++17/ryu/d2s.c,
114         src/c++17/ryu/d2s_full_table.h, src/c++17/ryu/d2s_intrinsics.h,
115         src/c++17/ryu/digit_table.h, src/c++17/ryu/f2s.c,
116         src/c++17/ryu/f2s_intrinsics.h, src/c++17/ryu/generic_128.c,
117         src/c++17/ryu/generic_128.h, src/c++17/ryu/ryu_generic_128.h:
118         Import these files from the Ryu library.
120 2020-12-17  Jonathan Wakely  <jwakely@redhat.com>
122         * config/os/djgpp/error_constants.h: Test POSIX errno macros
123         directly, instead of corresponding _GLIBCXX_HAVE_EXXX macros.
124         * config/os/mingw32-w64/error_constants.h: Likewise.
125         * config/os/mingw32/error_constants.h: Likewise.
127 2020-12-17  Jonathan Wakely  <jwakely@redhat.com>
129         * testsuite/lib/libstdc++.exp (check_v3_target_gthreads_timed):
130         Fix condition for _GTHREAD_USE_MUTEX_TIMEDLOCK test.
132 2020-12-17  Jonathan Wakely  <jwakely@redhat.com>
134         * src/c++11/mutex.cc (std::once_flag::_M_finish): Add
135         maybe_unused attribute to variable used in assertion.
137 2020-12-17  Jonathan Wakely  <jwakely@redhat.com>
139         PR libstdc++/98344
140         * include/bits/semaphore_base.h: Fix preprocessor condition.
142 2020-12-17  Jonathan Wakely  <jwakely@redhat.com>
144         * include/bits/std_thread.h (hash<thread::id>): Move here,
145         from ...
146         * include/std/thread (hash<thread::id>): ... here.
148 2020-12-17  Jonathan Wakely  <jwakely@redhat.com>
150         * config.h.in: Regenerate.
151         * configure: Regenerate.
153 2020-12-16  Jonathan Wakely  <jwakely@redhat.com>
155         * Makefile.in: Regenerate.
156         * config.h.in: Regenerate.
157         * config/abi/pre/gnu.ver: Make patterns less greedy.
158         * config/os/gnu-linux/ldbl-ieee128-extra.ver: New file with patterns
159         for IEEE128 long double symbols.
160         * configure: Regenerate.
161         * configure.ac: Enable alternative 128-bit long double format on
162         powerpc64*-*-linux*.
163         * doc/Makefile.in: Regenerate.
164         * fragment.am: Regenerate.
165         * include/Makefile.am: Set _GLIBCXX_LONG_DOUBLE_ALT128_COMPAT.
166         * include/Makefile.in: Regenerate.
167         * include/bits/c++config: Define inline namespace for new long
168         double symbols. Don't define _GLIBCXX_USE_FLOAT128 when it's the
169         same type as long double.
170         * include/bits/locale_classes.h [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT]
171         (locale::_Impl::_M_init_extra_ldbl128): Declare new member function.
172         * include/bits/locale_facets.h (_GLIBCXX_NUM_FACETS): Simplify by
173         only counting narrow character facets.
174         (_GLIBCXX_NUM_CXX11_FACETS): Likewise.
175         (_GLIBCXX_NUM_LBDL_ALT128_FACETS): New.
176         [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT] (num_get::__do_get): Define
177         vtable placeholder for __ibm128 long double type.
178         [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
179         (num_get::__do_get): Declare vtable placeholder for __ibm128 long
180         double type.
181         [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
182         (num_put::__do_put): Likewise.
183         * include/bits/locale_facets.tcc
184         [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
185         (num_get::__do_get, num_put::__do_put): Define.
186         * include/bits/locale_facets_nonio.h
187         [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
188         (money_get::__do_get): Declare vtable placeholder for __ibm128 long
189         double type.
190         [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
191         (money_put::__do_put): Likewise.
192         * include/bits/locale_facets_nonio.tcc
193         [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT && __LONG_DOUBLE_IEEE128__]
194         (money_get::__do_get, money_put::__do_put): Define.
195         * include/ext/numeric_traits.h [_GLIBCXX_LONG_DOUBLE_ALT128_COMPAT]
196         (__numeric_traits<__ibm128>, __numeric_traits<__ieee128>): Define.
197         * libsupc++/Makefile.in: Regenerate.
198         * po/Makefile.in: Regenerate.
199         * python/Makefile.in: Regenerate.
200         * src/Makefile.am: Add compatibility-ldbl-alt128.cc and
201         compatibility-ldbl-alt128-cxx11.cc sources and recipes for objects.
202         * src/Makefile.in: Regenerate.
203         * src/c++11/Makefile.in: Regenerate.
204         * src/c++11/compatibility-ldbl-alt128-cxx11.cc: New file defining
205         symbols using the old 128-bit long double format, for the cxx11 ABI.
206         * src/c++11/compatibility-ldbl-alt128.cc: Likewise, for the
207         gcc4-compatible ABI.
208         * src/c++11/compatibility-ldbl-facets-aliases.h: New header for long
209         double compat aliases.
210         * src/c++11/cow-locale_init.cc: Add comment.
211         * src/c++11/cxx11-locale-inst.cc: Define C and C_is_char
212         unconditionally.
213         * src/c++11/cxx11-wlocale-inst.cc: Add sanity check. Include
214         locale-inst.cc directly, not via cxx11-locale-inst.cc.
215         * src/c++11/locale-inst-monetary.h: New header for monetary
216         category instantiations.
217         * src/c++11/locale-inst-numeric.h: New header for numeric category
218         instantiations.
219         * src/c++11/locale-inst.cc: Include new headers for monetary,
220         numeric, and long double definitions.
221         * src/c++11/wlocale-inst.cc: Remove long double compat aliases that
222         are defined in new header now.
223         * src/c++17/Makefile.am: Use -mabi=ibmlongdouble for
224         floating_from_chars.cc.
225         * src/c++17/Makefile.in: Regenerate.
226         * src/c++17/floating_from_chars.cc (from_chars_impl): Add
227         if-constexpr branch for __ieee128.
228         (from_chars): Overload for __ieee128.
229         * src/c++20/Makefile.in: Regenerate.
230         * src/c++98/Makefile.in: Regenerate.
231         * src/c++98/locale_init.cc (num_facets): Adjust calculation.
232         (locale::_Impl::_Impl(size_t)): Call _M_init_extra_ldbl128.
233         * src/c++98/localename.cc (num_facets): Adjust calculation.
234         (locale::_Impl::_Impl(const char*, size_t)): Call
235         _M_init_extra_ldbl128.
236         * src/filesystem/Makefile.in: Regenerate.
237         * testsuite/Makefile.in: Regenerate.
238         * testsuite/util/testsuite_abi.cc: Add new symbol versions.
239         Allow new symbols to be added to GLIBCXX_IEEE128_3.4.29 and
240         CXXABI_IEEE128_1.3.13 too.
241         * testsuite/26_numerics/complex/abi_tag.cc: Add u9__ieee128 to
242         regex matching expected symbols.
244 2020-12-16  Jonathan Wakely  <jwakely@redhat.com>
246         * include/std/utility: Use __has_builtin without checking if
247         it's defined.
249 2020-12-16  Jonathan Wakely  <jwakely@redhat.com>
251         * include/bits/c++config: Warn if __STRICT_ANSI__ state is
252         inconsistent with __GLIBCXX_TYPE_INT_N_0.
254 2020-12-16  Jonathan Wakely  <jwakely@redhat.com>
256         PR libstdc++/96083
257         * include/ext/throw_allocator.h: Use __has_builtin to check for
258         __builtin_sprintf support, and use std::sprintf if necessary.
260 2020-12-16  Jonathan Wakely  <jwakely@redhat.com>
262         PR libstdc++/98319
263         * include/experimental/random: Only define contents for C++14
264         and later.
265         * include/experimental/source_location: Likewise.
266         * include/experimental/utility: Likewise.
267         * testsuite/experimental/feat-lib-fund.cc: Include all LFTS
268         headers that are present. Allow test to run for all modes.
270 2020-12-16  Jonathan Wakely  <jwakely@redhat.com>
272         PR libstdc++/46447
273         * testsuite/performance/29_atomics/atomic_flag.cc: New test.
275 2020-12-16  Jonathan Wakely  <jwakely@redhat.com>
277         PR libstdc++/93151
278         * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR): Remove.
279         * configure.ac: Regenerate.
280         * config/os/generic/error_constants.h: Test POSIX errno macros
281         directly, instead of corresponding _GLIBCXX_HAVE_EXXX macros.
282         * testsuite/19_diagnostics/headers/system_error/errc_std_c++0x.cc:
283         Likewise.
284         * testsuite/19_diagnostics/headers/system_error/93151.cc: New
285         test.
287 2020-12-15  Jonathan Wakely  <jwakely@redhat.com>
289         Revert:
290         2020-12-15  Jonathan Wakely  <jwakely@redhat.com>
292         PR libstdc++/98108
293         * include/std/iostream (__ioinit): Add init_priority attribute.
295 2020-12-15  Keith Packard  <keithp@keithp.com>
297         * acinclude.m4 (GLIBCXX_ENABLE_CSTDIO): Allow "stdio_pure"
298         option and define _GLIBCXX_USE_PURE_STDIO when it is used. Also
299         add "stdio_posix" option as an alias for "stdio".
300         * config/io/basic_file_stdio.cc [_GLIBCXX_USE_PURE_STDIO]: Only
301         use defined stdio entry points for all I/O operations, without
302         direct calls to underlying POSIX functions.
303         * config.h.in: Regenerate.
304         * configure: Regenerate.
306 2020-12-15  Ville Voutilainen  <ville.voutilainen@gmail.com>
308         * testsuite/27_io/rvalue_streams.cc: Run the extraction to a char*
309         for C++17 and lower only.
311 2020-12-15  Jonathan Wakely  <jwakely@redhat.com>
313         * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
314         Add dg-timeout-factor directive.
315         * testsuite/ext/pb_ds/regression/tree_map_rand_debug.cc:
316         Increase timeout factor from 2.0 to 3.0.
317         * testsuite/ext/pb_ds/regression/tree_set_rand_debug.cc:
318         Likewise.
319         * testsuite/lib/libstdc++.exp (check_effective_target_debug-mode):
320         Define "debug-mode" as an effective-target keyword.
322 2020-12-15  Jonathan Wakely  <jwakely@redhat.com>
324         * include/bits/c++config (__glibcxx_assert_1): Define as empty
325         for C++11.
327 2020-12-15  Marius Hillenbrand  <mhillen@linux.ibm.com>
329         * testsuite/22_locale/locale/cons/5.cc: Add missing directives
330         for required locales.
332 2020-12-15  Jonathan Wakely  <jwakely@redhat.com>
334         * include/bits/iterator_concepts.h (incrementable_traits<Tp>):
335         Remove workaround for PR c++/78173.
337 2020-12-15  Vladimir Vishnevsky  <vv.os.swe@gmail.com>
339         * configure.ac: Skip AC_LIBTOOL_DLOPEN check if avr-libc is used.
340         * configure: Regenerate.
342 2020-12-15  Jonathan Wakely  <jwakely@redhat.com>
344         PR libstdc++/98108
345         * include/std/iostream (__ioinit): Add init_priority attribute.
347 2020-12-15  Gerald Pfeifer  <gerald@pfeifer.com>
349         * doc/xml/manual/codecvt.xml: Update link to Unicode-HOWTO.
350         * doc/html/manual/facets.html: Regenerate.
352 2020-12-14  François Dumont  <fdumont@gcc.gnu.org>
354         * testsuite/23_containers/array/debug/back1_neg.cc: Target c++14 because assertion
355         is disabled in C++11.
356         * testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
357         * testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc: Likewise.
359 2020-12-14  Martin Sebor  <msebor@redhat.com>
361         * testsuite/ext/vstring/requirements/exception/basic.cc: Suppress
362         a false positive warning.
363         * testsuite/ext/vstring/requirements/exception/propagation_consistent.cc:
364           Same.
366 2020-12-14  François Dumont  <fdumont@gcc.gnu.org>
368         * testsuite/23_containers/array/debug/back2_neg.cc: target c++14 because assertion
369         for constexpr is disabled in C++11.
370         * testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
371         * testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc: Likewise.
372         * testsuite/23_containers/vector/debug/multithreaded_swap.cc: Include <memory>
373         for shared_ptr.
375 2020-12-12  François Dumont  <fdumont@gcc.gnu.org>
377         * include/debug/macros.h (__glibcxx_check_can_increment_range): Replace
378         _GLIBCXX_DEBUG_VERIFY_COND_AT usage with _GLIBCXX_DEBUG_VERIFY_AT_F.
379         (__glibcxx_check_can_decrement_range): Likewise.
380         * testsuite/25_algorithms/copy_backward/constexpr.cc (test03): New.
381         * testsuite/25_algorithms/copy/debug/constexpr_neg.cc: New test.
382         * testsuite/25_algorithms/copy_backward/debug/constexpr_neg.cc: New test.
383         * testsuite/25_algorithms/equal/constexpr_neg.cc: New test.
384         * testsuite/25_algorithms/equal/debug/constexpr_neg.cc: New test.
386 2020-12-10  Jonathan Wakely  <jwakely@redhat.com>
388         PR libstdc++/98226
389         * include/std/bit (__countl_one, __countr_one): Remove redundant
390         branches.
392 2020-12-09  Jonathan Wakely  <jwakely@redhat.com>
394         * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Define NO_SLEEP
395         if none of nanosleep, sleep and Sleep is available.
396         * config.h.in: Regenerate.
397         * configure: Regenerate.
398         * include/std/thread [_GLIBCXX_NO_SLEEP] (__sleep_for): Do
399         not declare.
400         [_GLIBCXX_NO_SLEEP] (sleep_for, sleep_until): Do not
401         define.
402         * src/c++11/thread.cc [_GLIBCXX_NO_SLEEP] (__sleep_for): Do
403         not define.
405 2020-12-08  Jason Merrill  <jason@redhat.com>
407         PR c++/96299
408         * testsuite/18_support/comparisons/algorithms/partial_order.cc:
409         One more line needs to use VERIFY instead of static_assert.
411 2020-12-08  Jonathan Wakely  <jwakely@redhat.com>
413         * doc/xml/manual/appendix_contributing.xml: Use consistent
414         indentation.
415         * doc/html/manual/source_code_style.html: Regenerate.
417 2020-12-05  Iain Sandoe  <iain@sandoe.co.uk>
419         PR target/97865
420         * configure: Regenerate.
422 2020-12-04  Jakub Jelinek  <jakub@redhat.com>
424         PR c++/80780
425         * testsuite/18_support/source_location/1.cc (main): Adjust for
426         __builtin_source_location using __PRETTY_FUNCTION__-like names instead
427         __FUNCTION__-like.
428         * testsuite/18_support/source_location/consteval.cc (main): Likewise.
430 2020-12-03  Martin Sebor  <msebor@redhat.com>
432         * testsuite/ext/vstring/modifiers/clear/56166.cc: Suppress a false
433         positive warning.
435 2020-12-03  Jonathan Wakely  <jwakely@redhat.com>
437         * testsuite/26_numerics/bit/bit.cast/bit_cast.cc: Remove stray
438         word from copy&paste.
439         * testsuite/26_numerics/bit/bit.cast/version.cc: Likewise.
441 2020-12-03  Jonathan Wakely  <jwakely@redhat.com>
443         * doc/xml/manual/status_cxx2020.xml: Update C++20 status.
444         * doc/html/*: Regenerate.
446 2020-12-03  JeanHeyd Meneide  <phdofthehouse@gmail.com>
448         * doc/doxygen/user.cfg.in (INPUT): Add <source_location>.
449         * include/Makefile.am: Add <source_location>.
450         * include/Makefile.in: Regenerate.
451         * include/std/version (__cpp_lib_source_location): Define.
452         * include/std/source_location: New file.
453         * testsuite/18_support/source_location/1.cc: New test.
454         * testsuite/18_support/source_location/consteval.cc: New test.
455         * testsuite/18_support/source_location/srcloc.h: New test.
456         * testsuite/18_support/source_location/version.cc: New test.
458 2020-12-03  Jonathan Wakely  <jwakely@redhat.com>
460         PR libstdc++/93121
461         * include/std/bit (__cpp_lib_bit_cast, bit_cast): Define.
462         * include/std/version (__cpp_lib_bit_cast): Define.
463         * testsuite/26_numerics/bit/bit.cast/bit_cast.cc: New test.
464         * testsuite/26_numerics/bit/bit.cast/version.cc: New test.
466 2020-12-03  Jonathan Wakely  <jwakely@redhat.com>
468         * config/abi/post/powerpc-linux-gnu/baseline_symbols.txt:
469         Update.
470         * config/abi/post/powerpc64-linux-gnu/32/baseline_symbols.txt:
471         Update.
473 2020-12-03  Jonathan Wakely  <jwakely@redhat.com>
475         * include/std/array (array::operator[](size_t) const, array::front() const)
476         (array::back() const) [__cplusplus == 201103]: Disable
477         assertions.
478         * testsuite/23_containers/array/element_access/constexpr_element_access.cc:
479         Check for correct values.
480         * testsuite/23_containers/array/tuple_interface/get_neg.cc:
481         Adjust dg-error line numbers.
482         * testsuite/23_containers/array/debug/constexpr_c++11.cc: New test.
484 2020-12-02  Jonathan Wakely  <jwakely@redhat.com>
486         PR libstdc++/65480
487         PR libstdc++/68735
488         * python/libstdcxx/v6/printers.py (function_pointer_to_name):
489         New helper function to get the name of a function from its
490         address.
491         (StdExpAnyPrinter.__init__): Use it.
493 2020-12-02  Jonathan Wakely  <jwakely@redhat.com>
495         * testsuite/lib/dg-options.exp (add_options_for_libatomic):
496         Replace powerpc-ibm-aix* and powerpc*-*-darwin* with check for
497         powerpc && ilp32.
499 2020-12-02  Jonathan Wakely  <jwakely@redhat.com>
501         * testsuite/27_io/basic_istream/ignore/char/94749.cc: Add
502         dg-timeout-factor for ilp32 targets.
503         * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
504         Likewise.
506 2020-12-02  Jonathan Wakely  <jwakely@redhat.com>
508         * include/ext/rope (rope::_S_concat_char_iter)
509         (rope::_S_destr_concat_char_iter): Add allocator parameter.
510         (rope::push_back, rope::append, rope::insert, operator+):
511         Pass allocator.
512         * include/ext/ropeimpl.h (rope::_S_concat_char_iter)
513         (rope::_S_destr_concat_char_iter): Add allocator parameter
514         and use it.
515         (_Rope_char_ref_proxy::operator=(_CharT)): Pass allocator.
517 2020-12-02  Jonathan Wakely  <jwakely@redhat.com>
519         * include/ext/rope: Fix indentation of access specifiers.
521 2020-12-02  Jonathan Wakely  <jwakely@redhat.com>
523         * include/bits/atomic_timed_wait.h: Use #if instead of #ifdef.
524         * include/bits/semaphore_base.h: Likewise.
525         * include/std/version: Remove trailing whitespace.
527 2020-12-02  Jonathan Wakely  <jwakely@redhat.com>
529         * python/libstdcxx/v6/printers.py (StdExpPathPrinter): Store the
530         name of the type and pass it to the iterator.
531         (StdPathPrinter): Likewise.
532         * testsuite/libstdc++-prettyprinters/filesystem-ts.cc: New test.
534 2020-12-01  Thomas Rodgers  <trodgers@redhat.com>
536         * include/bits/atomic_base.h: Replace usage of
537         _GLIBCXX_HAVE_ATOMIC_WAIT with __cpp_lib_atomic_wait.
538         * include/bits/atomic_timed_wait.h: Likewise.
539         * include/bits/atomic_wait.h: Define __cpp_lib_atomic_wait
540         feature test macro.
541         * include/bits/semaphore_base.h: Replace usage of
542         _GLIBCXX_HAVE_ATOMIC_WAIT with __cpp_lib_atomic_wait.
543         * include/std/atomic: Likewise.
544         * include/std/latch: Likewise.
545         * include/std/semaphore: Likewise.
546         * include/std/version: Define __cpp_lib_atomic wait
547         feature test macro and replace usage of
548         _GLIBCXX_HAVE_ATOMIC_WAIT.
549         * testsuite/29_atomics/atomic/wait_notify/1.cc: New test.
550         * testsuite/29_atomics/atomic/wait_notify/2.cc: Likewise.
552 2020-12-01  Michael Weghorn  <m.weghorn@posteo.de>
554         * python/libstdcxx/v6/printers.py (StdBitIteratorPrinter)
555         (StdBitReferencePrinter): Add pretty-printers for
556         _Bit_reference, _Bit_iterator and _Bit_const_iterator.
557         * testsuite/libstdc++-prettyprinters/simple.cc: Test
558         std::_Bit_reference, std::_Bit_iterator and
559         std::_Bit_const_iterator.
560         * testsuite/libstdc++-prettyprinters/simple11.cc: Likewise.
562 2020-12-01  Jonathan Wakely  <jwakely@redhat.com>
564         * include/bits/c++config (_GLIBCXX_HAS_BUILTIN): Define macro to
565         work around different implementations of __has_builtin.
566         (_GLIBCXX_HAVE_BUILTIN_HAS_UNIQ_OBJ_REP)
567         (_GLIBCXX_HAVE_BUILTIN_IS_AGGREGATE)
568         (_GLIBCXX_HAVE_BUILTIN_IS_CONSTANT_EVALUATED)
569         (_GLIBCXX_HAVE_BUILTIN_IS_SAME, _GLIBCXX_HAVE_BUILTIN_LAUNDER):
570         Define using _GLIBCXX_HAS_BUILTIN.
572 2020-12-01  Jonathan Wakely  <jwakely@redhat.com>
574         * testsuite/27_io/basic_istream/get/char/lwg3464.cc: Add
575         dg-timeout-factor directive.
576         * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc:
577         Likewise.
579 2020-12-01  Jonathan Wakely  <jwakely@redhat.com>
581         PR libstdc++/98003
582         * testsuite/27_io/basic_syncbuf/sync_ops/1.cc: Add options for
583         libatomic.
585 2020-11-30  Jonathan Wakely  <jwakely@redhat.com>
587         * doc/doxygen/user.cfg.in (INPUT): Add <latch> and <semaphore>.
589 2020-11-30  Jonathan Wakely  <jwakely@redhat.com>
591         * testsuite/lib/libstdc++.exp (libstdc++_init): Reduce
592         default tool_timeout to 360.
594 2020-11-30  Jonathan Wakely  <jwakely@redhat.com>
596         * testsuite/20_util/specialized_algorithms/pstl/*: Add
597         dg-timeout-factor.
598         * testsuite/25_algorithms/pstl/*: Likewise.
599         * testsuite/26_numerics/pstl/*: Likewise.
600         * testsuite/28_regex/*: Likewise.
602 2020-11-29  John David Anglin  <danglin@gcc.gnu.org>
604         * configure: Regenerate.
606 2020-11-27  Jonathan Wakely  <jwakely@redhat.com>
608         * testsuite/lib/libstdc++.exp (v3_try_preprocess): Define
609         new proc to preprocess a chunk of code.
610         (v3_check_preprocessor_condition): Define new proc to test
611         a preprocessor condition depending on GCC or libstdc++ macros.
612         (check_v3_target_debug_mode, check_v3_target_normal_mode):
613         Use v3_try_preprocess.
614         (check_v3_target_normal_namespace)
615         (check_v3_target_parallel_mode, check_v3_target_cstdint)
616         (check_v3_target_cmath, check_v3_target_atomic_builtins)
617         (check_v3_target_gthreads, check_v3_target_gthreads_timed)
618         (check_v3_target_sleep, check_v3_target_sched_yield)
619         (check_v3_target_string_conversions, check_v3_target_swprintf)
620         (check_v3_target_binary_io, check_v3_target_nprocs): Use
621         v3_check_preprocessor_condition.
622         (check_effective_target_cxx11): Likewise.
623         (check_effective_target_random_device): Likewise.
624         (check_effective_target_tbb-backend): Likewise.
625         (check_effective_target_futex): Likewise.
626         (check_v3_target_little_endian) Call check_effective_target_le.
627         (check_effective_target_atomic-builtins): New proc to define
628         new effective-target keyword.
629         (check_effective_target_gthreads-timed): Likewise.
631 2020-11-27  Jonathan Wakely  <jwakely@redhat.com>
633         * testsuite/27_io/filesystem/operations/absolute.cc: Avoid
634         -Wrange-loop-construct warning.
635         * testsuite/27_io/filesystem/path/append/source.cc: Likewise.
636         * testsuite/27_io/filesystem/path/assign/copy.cc: Likewise.
637         * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
638         * testsuite/27_io/filesystem/path/construct/copy.cc: Likewise.
639         * testsuite/27_io/filesystem/path/decompose/extension.cc:
640         Likewise.
641         * testsuite/27_io/filesystem/path/decompose/filename.cc:
642         Likewise.
643         * testsuite/27_io/filesystem/path/decompose/parent_path.cc:
644         Likewise.
645         * testsuite/27_io/filesystem/path/decompose/relative_path.cc:
646         Likewise.
647         * testsuite/27_io/filesystem/path/decompose/root_directory.cc:
648         Likewise.
649         * testsuite/27_io/filesystem/path/decompose/root_path.cc:
650         Likewise.
651         * testsuite/27_io/filesystem/path/itr/traversal.cc: Likewise.
652         * testsuite/27_io/filesystem/path/modifiers/remove_filename.cc:
653         Likewise.
654         * testsuite/27_io/filesystem/path/modifiers/replace_extension.cc:
655         Likewise.
656         * testsuite/27_io/filesystem/path/modifiers/replace_filename.cc:
657         Likewise.
658         * testsuite/27_io/filesystem/path/nonmember/append.cc: Likewise.
659         * testsuite/27_io/filesystem/path/nonmember/cmp.cc: Likewise.
660         * testsuite/27_io/filesystem/path/nonmember/cmp_c++20.cc:
661         Likewise.
662         * testsuite/27_io/filesystem/path/nonmember/hash_value.cc:
663         Likewise.
664         * testsuite/27_io/filesystem/path/query/has_extension.cc:
665         Likewise.
666         * testsuite/27_io/filesystem/path/query/has_filename.cc:
667         Likewise.
668         * testsuite/27_io/filesystem/path/query/has_parent_path.cc:
669         Likewise.
670         * testsuite/27_io/filesystem/path/query/has_relative_path.cc:
671         Likewise.
672         * testsuite/27_io/filesystem/path/query/has_root_directory.cc:
673         Likewise.
674         * testsuite/27_io/filesystem/path/query/has_root_name.cc:
675         Likewise.
676         * testsuite/27_io/filesystem/path/query/has_root_path.cc:
677         Likewise.
678         * testsuite/27_io/filesystem/path/query/has_stem.cc: Likewise.
679         * testsuite/27_io/filesystem/path/query/is_relative.cc: Likewise.
680         * testsuite/experimental/filesystem/operations/absolute.cc:
681         Likewise.
682         * testsuite/experimental/filesystem/path/assign/copy.cc: Likewise.
683         * testsuite/experimental/filesystem/path/compare/path.cc:
684         Likewise.
685         * testsuite/experimental/filesystem/path/construct/copy.cc:
686         Likewise.
687         * testsuite/experimental/filesystem/path/decompose/extension.cc:
688         Likewise.
689         * testsuite/experimental/filesystem/path/decompose/filename.cc:
690         Likewise.
691         * testsuite/experimental/filesystem/path/decompose/parent_path.cc:
692         Likewise.
693         * testsuite/experimental/filesystem/path/decompose/relative_path.cc:
694         Likewise.
695         * testsuite/experimental/filesystem/path/decompose/root_directory.cc:
696         Likewise.
697         * testsuite/experimental/filesystem/path/decompose/root_path.cc:
698         Likewise.
699         * testsuite/experimental/filesystem/path/itr/traversal.cc:
700         Likewise.
701         * testsuite/experimental/filesystem/path/modifiers/remove_filename.cc:
702         Likewise.
703         * testsuite/experimental/filesystem/path/modifiers/replace_extension.cc:
704         Likewise.
705         * testsuite/experimental/filesystem/path/modifiers/replace_filename.cc:
706         Likewise.
707         * testsuite/experimental/filesystem/path/nonmember/hash_value.cc:
708         Likewise.
709         * testsuite/experimental/filesystem/path/query/has_extension.cc:
710         Likewise.
711         * testsuite/experimental/filesystem/path/query/has_filename.cc:
712         Likewise.
713         * testsuite/experimental/filesystem/path/query/has_parent_path.cc:
714         Likewise.
715         * testsuite/experimental/filesystem/path/query/has_relative_path.cc:
716         Likewise.
717         * testsuite/experimental/filesystem/path/query/has_root_directory.cc:
718         Likewise.
719         * testsuite/experimental/filesystem/path/query/has_root_name.cc:
720         Likewise.
721         * testsuite/experimental/filesystem/path/query/has_root_path.cc:
722         Likewise.
723         * testsuite/experimental/filesystem/path/query/has_stem.cc:
724         Likewise.
725         * testsuite/experimental/filesystem/path/query/is_relative.cc:
726         Likewise.
728 2020-11-27  Jonathan Wakely  <jwakely@redhat.com>
730         * src/c++98/locale.cc (locale::facet::_S_get_c_locale()):
731         Revert change to use __is_single_threaded.
732         * src/c++98/locale_init.cc (locale::_S_initialize()):
733         Likewise.
735 2020-11-26  Jonathan Wakely  <jwakely@redhat.com>
737         * include/bits/atomic_wait.h (_GLIBCXX_HAVE_ATOMIC_WAIT):
738         Define.
739         * include/bits/atomic_base.h: Check _GLIBCXX_HAVE_ATOMIC_WAIT.
740         * include/bits/atomic_timed_wait.h: Likewise.
741         * include/bits/semaphore_base.h: Likewise.
742         * include/std/atomic: Likewise.
743         * include/std/latch: Likewise.
744         * include/std/semaphore: Likewise.
746 2020-11-26  Jonathan Wakely  <jwakely@redhat.com>
748         * include/std/latch: Depend on _GLIBCXX_HAS_GTHREADS and
749         _GLIBCXX_HAVE_LINUX_FUTEX.
750         * include/std/version (__cpp_lib_latch): Define conditionally.
752 2020-11-26  Jonathan Wakely  <jwakely@redhat.com>
754         * testsuite/lib/libstdc++.exp (check_effective_target_gthreads):
755         Call check_v3_target_gthreads not check_v3_target_gthreads_timed.
757 2020-11-26  Jonathan Wakely  <jwakely@redhat.com>
759         * testsuite/28_regex/algorithms/regex_match/basic/string_range_01_03.cc:
760         Add dg-timeout-factor directive.
761         * testsuite/28_regex/algorithms/regex_match/cstring_bracket_01.cc:
762         Likewise.
763         * testsuite/28_regex/algorithms/regex_match/ecma/char/backref.cc:
764         Likewise.
765         * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/63199.cc:
766         Likewise.
767         * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/anymatcher.cc:
768         Likewise.
769         * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/cjk_match.cc:
770         Likewise.
771         * testsuite/28_regex/algorithms/regex_match/ecma/wchar_t/hex.cc:
772         Likewise.
773         * testsuite/28_regex/algorithms/regex_match/extended/wstring_locale.cc:
774         Likewise.
775         * testsuite/28_regex/algorithms/regex_search/61720.cc: Likewise.
776         * testsuite/28_regex/algorithms/regex_search/ecma/assertion.cc:
777         Likewise.
778         * testsuite/28_regex/algorithms/regex_search/ecma/string_01.cc:
779         Likewise.
780         * testsuite/28_regex/basic_regex/ctors/deduction.cc: Likewise.
782 2020-11-26  Jonathan Wakely  <jwakely@redhat.com>
784         * testsuite/lib/libstdc++.exp (libstdc++_init): Only set
785         tool_timeout if it hasn't been set by the user already.
787 2020-11-26  Jonathan Wakely  <jwakely@redhat.com>
789         PR libstdc++/97936
790         * testsuite/29_atomics/atomic/wait_notify/bool.cc: Fix missed
791         notifications by making the new thread wait until the parent
792         thread is waiting on the condition variable.
793         * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
794         * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
795         * testsuite/29_atomics/atomic_ref/wait_notify.cc: Likewise.
797 2020-11-26  Jonathan Wakely  <jwakely@redhat.com>
799         * testsuite/18_support/96817.cc: Use new effective-target
800         keywords to select supported targets more effectively.
801         * testsuite/30_threads/call_once/66146.cc: Likewise.
802         * testsuite/lib/libstdc++.exp (check_effective_target_futex):
803         Define new proc.
804         (check_effective_target_gthreads): Define new proc to replace
805         dg-require-gthreads.
807 2020-11-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
809         * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Remove libposix4
810         references.
811         <solaris*>: Don't use -lrt any longer.
812         * configure: Regenerate.
813         * doc/xml/manual/configure.xml (--enable-libstdcxx-time=OPTION):
814         Remove libposix4 reference.
816 2020-11-26  Jonathan Wakely  <jwakely@redhat.com>
818         PR libstdc++/98001
819         * testsuite/ext/stdio_filebuf/char/79820.cc: Do not pass invalid
820         FILE* to constructor.
822 2020-11-26  Jonathan Wakely  <jwakely@redhat.com>
824         * include/precompiled/stdc++.h: Add new headers.
825         * include/std/stop_token: Include <semaphore> unconditionally.
827 2020-11-25  Jonathan Wakely  <jwakely@redhat.com>
829         * include/bits/atomic_timed_wait.h (__cond_wait_until): Do not
830         perform redundant conversions to the same clock.
832 2020-11-25  Jonathan Wakely  <jwakely@redhat.com>
834         * include/bits/atomic_timed_wait.h (__cond_wait_until_impl):
835         Do not define when _GLIBCXX_HAVE_LINUX_FUTEX is defined. Use
836         __condvar and mutex instead of __gthread_cond_t and
837         unique_lock<mutex>.
838         (__cond_wait_until): Likewise. Fix test for return value of
839         __cond_wait_until_impl.
840         (__timed_waiters::_M_do_wait_until): Use __condvar instead
841         of __gthread_cond_t.
842         * include/bits/atomic_wait.h: Remove <bits/unique_lock.h>
843         include. Only include <bits/std_mutex.h> if not using futexes.
844         (__platform_wait_max_value): Remove unused variable.
845         (__waiters::lock_t): Use lock_guard instead of unique_lock.
846         (__waiters::_M_cv): Use __condvar instead of __gthread_cond_t.
847         (__waiters::_M_do_wait(__platform_wait_t)): Likewise.
848         (__waiters::_M_notify()): Likewise. Use notify_one() if not
849         asked to notify all.
850         * include/bits/std_mutex.h (__condvar): New type.
851         * include/std/condition_variable (condition_variable::_M_cond)
852         (condition_variable::wait_until): Use __condvar instead of
853         __gthread_cond_t.
854         * src/c++11/condition_variable.cc (condition_variable): Define
855         default constructor and destructor as defaulted.
856         (condition_variable::wait, condition_variable::notify_one)
857         (condition_variable::notify_all): Forward to corresponding
858         member function of __condvar.
860 2020-11-25  Jonathan Wakely  <jwakely@redhat.com>
862         PR libstdc++/97936
863         * testsuite/29_atomics/atomic/wait_notify/bool.cc: Re-eneable
864         test.
865         * testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
866         * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
867         * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
868         * testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
869         * testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
870         * testsuite/util/atomic/wait_notify_util.h: Fix missed
871         notifications by making the new thread wait until the parent
872         thread is waiting on the condition variable.
874 2020-11-25  Jonathan Wakely  <jwakely@redhat.com>
876         PR libstdc++/97935
877         * include/bits/iterator_concepts.h (__detail::__iter_without_category):
878         New helper concept.
879         (__iterator_traits::__cat): Use __detail::__iter_without_category.
880         * testsuite/24_iterators/associated_types/iterator.traits.cc: New test.
882 2020-11-25  Jonathan Wakely  <jwakely@redhat.com>
884         * testsuite/17_intro/names.cc: Do not test 'v' on AIX.
886 2020-11-25  Jonathan Wakely  <jwakely@redhat.com>
888         PR libstdc++/97936
889         * include/bits/atomic_wait.h (__platform_wait): Check errno,
890         not just the value of EAGAIN.
891         (__waiters::__waiters()): Fix name of data member.
893 2020-11-25  Jonathan Wakely  <jwakely@redhat.com>
895         PR libstdc++/97936
896         * include/bits/atomic_wait.h (__platform_wait): Return if futex
897         sets EAGAIN.
898         * testsuite/30_threads/latch/3.cc: Re-enable test.
899         * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
901 2020-11-24  Jonathan Wakely  <jwakely@redhat.com>
903         PR libstdc++/97936
904         PR libstdc++/97944
905         * testsuite/29_atomics/atomic_integral/wait_notify.cc: Disable.
906         Do not require pthreads, but add -pthread when appropriate.
907         * testsuite/30_threads/jthread/95989.cc: Likewise.
908         * testsuite/30_threads/latch/3.cc: Likewise.
909         * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
911 2020-11-24  Jonathan Wakely  <jwakely@redhat.com>
913         * testsuite/30_threads/jthread/95989.cc: Run all three test
914         functions, not just the first one twice.
916 2020-11-24  Jonathan Wakely  <jwakely@redhat.com>
918         PR libstdc++/67791
919         * src/c++11/thread.cc (thread::_M_start_thread(_State_ptr, void (*)())):
920         Check that gthreads is available before calling __gthread_create.
922 2020-11-24  Jonathan Wakely  <jwakely@redhat.com>
924         * src/c++98/locale.cc (locale::facet::_S_get_c_locale())
925         (locale::id::_M_id() const): Use __is_single_threaded.
926         * src/c++98/locale_init.cc (locale::_S_initialize()):
927         Likewise.
929 2020-11-23  Jonathan Wakely  <jwakely@redhat.com>
931         * include/bits/semaphore_base.h
932         (__platform_semaphore::_M_try_acquire_until): Fix type of
933         variable.
935 2020-11-23  Stephan Bergmann  <sbergman@redhat.com>
937         * include/bits/atomic_wait.h (__thread_relax, __thread_yield):
938         Add 'inline'.
940 2020-11-23  Jonathan Wakely  <jwakely@redhat.com>
942         * acinclude.m4 (GLIBCXX_CHECK_GTHREADS): Check for
943         * config.h.in: Regenerate.
944         * configure: Regenerate.
945         * include/bits/semaphore_base.h (_GLIBCXX_HAVE_POSIX_SEMAPHORE):
946         Check autoconf macro instead of defining it here.
948 2020-11-23  Jonathan Wakely  <jwakely@redhat.com>
950         * include/bits/atomic_wait.h: Do not define anything unless
951         gthreads or futexes are available.
952         * include/bits/atomic_timed_wait.h: Likewise.
953         * include/bits/semaphore_base.h: Likewise.
954         * include/std/semaphore: Likewise.
955         * include/bits/atomic_base.h (atomic_flag::wait)
956         (atomic_flag::notify_one, atomic_flag::notify_all)
957         (__atomic_base<I>::wait, __atomic_base<I>::notify_one)
958         (__atomic_base<I>::notify_all, __atomic_base<P*>::wait)
959         (__atomic_base<P*>::notify_one, __atomic_base<P*>::notify_all)
960         (__atomic_impl::wait, __atomic_impl::notify_one)
961         (__atomic_impl::notify_all, __atomic_float::wait)
962         (__atomic_float::notify_one, __atomic_float::notify_all)
963         (__atomic_ref::wait, __atomic_ref::notify_one)
964         (__atomic_ref::notify_all): Only define if gthreads or futexes
965         are available.
966         * include/std/atomic (atomic::wait, atomic::notify_one)
967         (atomic::notify_all): Likewise.
968         * include/std/version (__cpp_lib_semaphore): Define
969         conditionally.
971 2020-11-23  Jonathan Wakely  <jwakely@redhat.com>
973         PR libstdc++/97948
974         * testsuite/29_atomics/atomic_float/wait_notify.cc: Add options
975         for libatomic.
976         * testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
977         * testsuite/29_atomics/atomic_ref/wait_notify.cc: Likewise.
979 2020-11-21  Jonathan Wakely  <jwakely@redhat.com>
981         * include/bits/atomic_base.h (atomic_flag::wait): Use correct
982         type for __atomic_wait call.
983         * include/bits/atomic_timed_wait.h (__atomic_wait_until): Check
984         _GLIBCXX_HAVE_LINUX_FUTEX.
985         * include/bits/atomic_wait.h (__atomic_notify): Likewise.
986         * include/bits/semaphore_base.h (_GLIBCXX_HAVE_POSIX_SEMAPHORE):
987         Only define if SEM_VALUE_MAX or _POSIX_SEM_VALUE_MAX is defined.
988         * testsuite/29_atomics/atomic/wait_notify/bool.cc: Disable on
989         non-linux targes.
990         * testsuite/29_atomics/atomic/wait_notify/generic.cc: Likewise.
991         * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
992         * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
993         * testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
995 2020-11-20  Thomas Rodgers  <trodgers@redhat.com>
997         * include/Makefile.am (bits_headers): Add new header.
998         * include/Makefile.in: Regenerate.
999         * include/bits/atomic_base.h (__atomic_flag::wait): Define.
1000         (__atomic_flag::notify_one): Likewise.
1001         (__atomic_flag::notify_all): Likewise.
1002         (__atomic_base<_Itp>::wait): Likewise.
1003         (__atomic_base<_Itp>::notify_one): Likewise.
1004         (__atomic_base<_Itp>::notify_all): Likewise.
1005         (__atomic_base<_Ptp*>::wait): Likewise.
1006         (__atomic_base<_Ptp*>::notify_one): Likewise.
1007         (__atomic_base<_Ptp*>::notify_all): Likewise.
1008         (__atomic_impl::wait): Likewise.
1009         (__atomic_impl::notify_one): Likewise.
1010         (__atomic_impl::notify_all): Likewise.
1011         (__atomic_float<_Fp>::wait): Likewise.
1012         (__atomic_float<_Fp>::notify_one): Likewise.
1013         (__atomic_float<_Fp>::notify_all): Likewise.
1014         (__atomic_ref<_Tp>::wait): Likewise.
1015         (__atomic_ref<_Tp>::notify_one): Likewise.
1016         (__atomic_ref<_Tp>::notify_all): Likewise.
1017         (atomic_wait<_Tp>): Likewise.
1018         (atomic_wait_explicit<_Tp>): Likewise.
1019         (atomic_notify_one<_Tp>): Likewise.
1020         (atomic_notify_all<_Tp>): Likewise.
1021         * include/bits/atomic_wait.h: New file.
1022         * include/bits/atomic_timed_wait.h: New file.
1023         * include/bits/semaphore_base.h: New file.
1024         * include/std/atomic (atomic<bool>::wait): Define.
1025         (atomic<bool>::wait_one): Likewise.
1026         (atomic<bool>::wait_all): Likewise.
1027         (atomic<_Tp>::wait): Likewise.
1028         (atomic<_Tp>::wait_one): Likewise.
1029         (atomic<_Tp>::wait_all): Likewise.
1030         (atomic<_Tp*>::wait): Likewise.
1031         (atomic<_Tp*>::wait_one): Likewise.
1032         (atomic<_Tp*>::wait_all): Likewise.
1033         * include/std/latch: New file.
1034         * include/std/semaphore: New file.
1035         * include/std/version: Add __cpp_lib_semaphore and
1036         __cpp_lib_latch defines.
1037         * testsuite/29_atomics/atomic/wait_notify/bool.cc: New test.
1038         * testsuite/29_atomics/atomic/wait_notify/pointers.cc: Likewise.
1039         * testsuite/29_atomics/atomic/wait_notify/generic.cc: Liekwise.
1040         * testsuite/29_atomics/atomic_flag/wait_notify/1.cc: Likewise.
1041         * testsuite/29_atomics/atomic_float/wait_notify.cc: Likewise.
1042         * testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
1043         * testsuite/29_atomics/atomic_ref/wait_notify.cc: Likewise.
1044         * testsuite/30_threads/semaphore/1.cc: New test.
1045         * testsuite/30_threads/semaphore/2.cc: Likewise.
1046         * testsuite/30_threads/semaphore/least_max_value_neg.cc: Likewise.
1047         * testsuite/30_threads/semaphore/try_acquire.cc: Likewise.
1048         * testsuite/30_threads/semaphore/try_acquire_for.cc: Likewise.
1049         * testsuite/30_threads/semaphore/try_acquire_posix.cc: Likewise.
1050         * testsuite/30_threads/semaphore/try_acquire_until.cc: Likewise.
1051         * testsuite/30_threads/latch/1.cc: New test.
1052         * testsuite/30_threads/latch/2.cc: New test.
1053         * testsuite/30_threads/latch/3.cc: New test.
1054         * testsuite/util/atomic/wait_notify_util.h: New File.
1056 2020-11-20  François Dumont  <fdumont@gcc.gnu.org>
1058         PR libstdc++/83938
1059         * include/bits/stl_tempbuf.h (get_temporary_buffer): Change __len
1060         computation in the loop to avoid truncation.
1061         * include/bits/stl_algo.h:
1062         (__inplace_merge): Take temporary buffer length from smallest range.
1063         (__stable_sort): Limit temporary buffer length.
1064         * testsuite/25_algorithms/inplace_merge/1.cc (test4): New.
1065         * testsuite/performance/25_algorithms/stable_sort.cc: Test stable_sort
1066         under different heap memory conditions.
1067         * testsuite/performance/25_algorithms/inplace_merge.cc: New test.
1069 2020-11-20  François Dumont  <fdumont@gcc.gnu.org>
1071         * include/bits/move.h (_GLIBCXX_FWDREF): New.
1072         * include/bits/stl_tree.h: Adapt to use latter.
1073         (_Rb_tree<>::_M_clone_node): Add _MoveValue template parameter.
1074         (_Rb_tree<>::_M_mbegin): New.
1075         (_Rb_tree<>::_M_begin): Use latter.
1076         (_Rb_tree<>::_M_copy): Add _MoveValues template parameter.
1077         * testsuite/23_containers/map/allocator/move_cons.cc: New test.
1078         * testsuite/23_containers/multimap/allocator/move_cons.cc: New test.
1079         * testsuite/23_containers/multiset/allocator/move_cons.cc: New test.
1080         * testsuite/23_containers/set/allocator/move_cons.cc: New test.
1082 2020-11-20  Jonathan Wakely  <jwakely@redhat.com>
1084         PR libstdc++/92546
1085         * include/std/regex (pmr::smatch, pmr::wsmatch): Declare using
1086         underlying __normal_iterator type, not nested typedef
1087         basic_string::const_iterator.
1089 2020-11-19  Jonathan Wakely  <jwakely@redhat.com>
1091         PR libstdc++/95989
1092         * config/os/gnu-linux/os_defines.h (_GLIBCXX_NATIVE_THREAD_ID):
1093         Define new macro to get reliable thread ID.
1094         * include/bits/std_thread.h: (this_thread::get_id): Use new
1095         macro if it's defined.
1096         * testsuite/30_threads/jthread/95989.cc: New test.
1097         * testsuite/30_threads/this_thread/95989.cc: New test.
1099 2020-11-19  Jonathan Wakely  <jwakely@redhat.com>
1101         * testsuite/30_threads/async/async.cc: Include <thread>.
1102         * testsuite/30_threads/future/members/93456.cc: Likewise.
1104 2020-11-19  Jonathan Wakely  <jwakely@redhat.com>
1106         PR libstdc++/92546
1107         * include/Makefile.am: Add new <bits/std_thread.h> header.
1108         * include/Makefile.in: Regenerate.
1109         * include/std/future: Include new header instead of <thread>.
1110         * include/std/stop_token: Include new header instead of
1111         <bits/gthr.h>.
1112         (stop_token::_S_yield()): Use this_thread::yield().
1113         (_Stop_state_t::_M_requester): Change type to std::thread::id.
1114         (_Stop_state_t::_M_request_stop()): Use this_thread::get_id().
1115         (_Stop_state_t::_M_remove_callback(_Stop_cb*)): Likewise.
1116         Use __is_single_threaded() to decide whether to synchronize.
1117         * include/std/thread (thread, operator==, this_thread::get_id)
1118         (this_thread::yield): Move to new header.
1119         (operator<=>, operator!=, operator<, operator<=, operator>)
1120         (operator>=, hash<thread::id>, operator<<): Define even when
1121         gthreads not available.
1122         * src/c++11/thread.cc: Include <memory>.
1123         * include/bits/std_thread.h: New file.
1124         (thread, operator==, this_thread::get_id, this_thread::yield):
1125         Define even when gthreads not available.
1126         [!_GLIBCXX_HAS_GTHREADS] (thread::join, thread::detach)
1127         (thread::hardware_concurrency): Define inline.
1129 2020-11-19  Jonathan Wakely  <jwakely@redhat.com>
1131         PR libstdc++/93421
1132         PR libstdc++/93456
1133         * src/c++11/futex.cc (syscall_time_t): New typedef for
1134         the type of the syscall_timespec::tv_sec member.
1135         (relative_timespec, _M_futex_wait_until)
1136         (_M_futex_wait_until_steady): Use syscall_time_t in overflow
1137         checks, not time_t.
1139 2020-11-18  Patrick Palka  <ppalka@redhat.com>
1141         * include/std/ranges (join_view::_Iterator::_M_satisfy): Uglify
1142         local variable inner.
1143         (join_view::_Iterator::operator->): Use _Inner_iter instead of
1144         _Outer_iter in the function signature as per LWG 3500.
1145         * testsuite/std/ranges/adaptors/join.cc (test08): Test it.
1147 2020-11-17  Jonathan Wakely  <jwakely@redhat.com>
1149         PR libstdc++/93421
1150         * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Fail if struct
1151         timespec isn't compatible with SYS_clock_gettime.
1152         * configure: Regenerate.
1153         * src/c++11/chrono.cc: Revert changes for time64 compatibility.
1154         Add static_assert instead.
1155         * src/c++11/futex.cc (_M_futex_wait_until_steady): Assume
1156         SYS_clock_gettime can use struct timespec.
1158 2020-11-17  Jonathan Wakely  <jwakely@redhat.com>
1160         PR libstdc++/97869
1161         * include/precompiled/stdc++.h: Include <coroutine>.
1162         * include/std/version (__cpp_lib_span): Check __cpp_lib_concepts
1163         before defining.
1165 2020-11-17  Patrick Palka  <ppalka@redhat.com>
1167         PR libstdc++/97828
1168         * include/bits/ranges_algo.h (__search_n_fn::operator()): Check
1169         random_access_iterator before using the backtracking
1170         implementation.  When the backwards scan fails prematurely,
1171         reset __remainder appropriately.
1172         * testsuite/25_algorithms/search_n/97828.cc: New test.
1174 2020-11-16  Jonathan Wakely  <jwakely@redhat.com>
1176         * src/Makefile.am (libstdc++-symbols.ver-sun): Remove -lrt from
1177         arguments passed to make_sunver.pl script.
1178         * src/Makefile.in: Regenerate.
1180 2020-11-15  Jason Merrill  <jason@redhat.com>
1182         * testsuite/20_util/result_of/sfinae_friendly_1.cc: Adjust.
1184 2020-11-13  Jonathan Wakely  <jwakely@redhat.com>
1186         PR libstdc++/93421
1187         * src/c++11/chrono.cc [_GLIBCXX_USE_CLOCK_GETTIME_SYSCALL]
1188         (syscall_timespec): Define a type suitable for SYS_clock_gettime
1189         calls.
1190         (system_clock::now(), steady_clock::now()): Use syscall_timespec
1191         instead of timespec.
1192         * src/c++11/futex.cc (syscall_timespec): Define a type suitable
1193         for SYS_futex and SYS_clock_gettime calls.
1194         (relative_timespec): Use syscall_timespec instead of timespec.
1195         (__atomic_futex_unsigned_base::_M_futex_wait_until): Likewise.
1196         (__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
1197         Likewise.
1199 2020-11-13  Jonathan Wakely  <jwakely@redhat.com>
1201         PR libstdc++/93456
1202         * src/c++11/futex.cc (relative_timespec): Remove redundant check
1203         negative values.
1204         * testsuite/30_threads/future/members/wait_until_overflow.cc: Moved to...
1205         * testsuite/30_threads/future/members/93456.cc: ...here.
1207 2020-11-13  Jonathan Wakely  <jwakely@redhat.com>
1209         * src/c++11/futex.cc (relative_timespec): Add [[unlikely]]
1210         attributes.
1211         (__atomic_futex_unsigned_base::_M_futex_wait_until)
1212         (__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
1213         Check for overflow.
1214         * testsuite/30_threads/future/members/wait_until_overflow.cc:
1215         New test.
1217 2020-11-13  Jonathan Wakely  <jwakely@redhat.com>
1219         * src/c++11/futex.cc (relative_timespec): New function to
1220         create relative time from two absolute times.
1221         (__atomic_futex_unsigned_base::_M_futex_wait_until)
1222         (__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
1223         Use relative_timespec.
1225 2020-11-13  Jonathan Wakely  <jwakely@redhat.com>
1227         * testsuite/30_threads/future/members/poll.cc: Require gthreads
1228         and add -pthread for targets that require it. Relax required
1229         ratio of wait_for calls before/after the future is ready.
1231 2020-11-12  Jonathan Wakely  <jwakely@redhat.com>
1233         * include/std/future (future::wait_for): Do not wait for
1234         durations less than or equal to zero.
1235         * src/c++11/futex.cc (_M_futex_wait_until)
1236         (_M_futex_wait_until_steady): Do not wait for timeouts before
1237         the epoch.
1238         * testsuite/30_threads/future/members/poll.cc: New test.
1240 2020-11-12  Jonathan Wakely  <jwakely@redhat.com>
1242         * include/ext/numeric_traits.h (__numeric_traits): Change
1243         primary template to always derive from __numeric_traits_integer.
1244         (__numeric_traits<float>, __numeric_traits<double>)
1245         (__numeric_traits<long double>): Add explicit specializations.
1247 2020-11-12  Jonathan Wakely  <jwakely@redhat.com>
1249         PR libstdc++/97798
1250         * include/ext/numeric_traits.h (__glibcxx_signed)
1251         (__glibcxx_digits, __glibcxx_min, __glibcxx_max): Remove
1252         macros.
1253         (__is_integer_nonstrict::__width): Define new constant.
1254         (__numeric_traits_integer): Define constants in terms of each
1255         other and __is_integer_nonstrict::__width, rather than the
1256         removed macros.
1257         (_GLIBCXX_INT_N_TRAITS): Macro to define explicit
1258         specializations for non-standard integer types.
1260 2020-11-11  Jonathan Yong  <10walls@gmail.com>
1262         * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Exclude
1263         cygwin and mingw from relro linker test.
1264         * configure: Regenerate.
1266 2020-11-11  Paul Scharnofske  <asynts@gmail.com>
1268         * include/std/thread (jthread::operator=(jthread&&)): Transfer
1269         any existing state to a temporary that will request a stop and
1270         then join.
1271         * testsuite/30_threads/jthread/jthread.cc: Test move assignment.
1273 2020-11-11  Jonathan Wakely  <jwakely@redhat.com>
1275         * include/std/stop_token (_Stop_state_t::_M_requester): Define
1276         new struct with members to store and check the thread ID.
1277         (_Stop_state_t::_M_request_stop()): Use _M_requester._M_set().
1278         (_Stop_state_t::_M_remove_callback(_Stop_cb*)): Use
1279         _M_requester._M_is_current_thread().
1281 2020-11-11  Jonathan Wakely  <jwakely@redhat.com>
1283         * include/std/ostream (__syncbuf_base): New class template.
1284         (emit_on_flush, noemit_on_flush, flush_emit): New manipulators.
1285         * include/std/syncstream (basic_syncbuf): Derive from
1286         __syncbuf_base instead of basic_streambuf.
1287         (basic_syncbuf::operator=): Remove self-assignment check.
1288         (basic_syncbuf::swap): Remove self-swap check.
1289         (basic_syncbuf::emit): Do not skip pubsync() call if sequence
1290         is empty.
1291         (basic_syncbuf::sync): Remove no-op pubsync on stringbuf.
1292         (basic_syncbuf::overflow): Define override.
1293         * testsuite/27_io/basic_syncstream/basic_ops/1.cc: Test
1294         basic_osyncstream::put(char_type).
1295         * testsuite/27_io/basic_ostream/emit/1.cc: New test.
1297 2020-11-10  Jonathan Wakely  <jwakely@redhat.com>
1299         * config/locale/generic/c_locale.cc (__set_C_locale()): New function
1300         to set the "C" locale and return the name of the previous locale.
1301         (__convert_to_v<float>, __convert_to_v<double>)
1302         (__convert_to_v<long double>): Use __set_C_locale and set failbit on
1303         error.
1305 2020-11-10  Jonathan Wakely  <jwakely@redhat.com>
1307         * include/std/sstream (basic_stringbug, basic_istringstream)
1308         (basic_ostringstream, basic_stringstream): Reorder C++20
1309         constructors to be declared next to other constructors.
1311 2020-11-10  Jonathan Wakely  <jwakely@redhat.com>
1313         * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten patterns.
1314         (GLIBCXX_3.4.29): Export new symbols.
1315         * include/bits/alloc_traits.h (__allocator_like): New concept.
1316         * include/std/sstream (basic_stringbuf::swap): Add exception
1317         specification.
1318         (basic_stringbuf::str() const): Add ref-qualifier. Use new
1319         _M_high_mark function.
1320         (basic_stringbuf::str(const SAlloc&) const): Define new function.
1321         (basic_stringbuf::str() &&): Likewise.
1322         (basic_stringbuf::str(const basic_string<C,T,SAlloc>&)):
1323         Likewise.
1324         (basic_stringbuf::str(basic_string<C,T,Alloc>&&)): Likewise.
1325         (basic_stringbuf::view() const): Use _M_high_mark.
1326         (basic_istringstream::str, basic_ostringstream::str)
1327         (basic_stringstream::str): Define new overloads.
1328         * src/c++20/sstream-inst.cc (basic_stringbuf::str)
1329         (basic_istringstream::str, basic_ostringstream::str)
1330         (basic_stringstream::str): Explicit instantiation definitions
1331         for new overloads.
1332         * testsuite/27_io/basic_istringstream/view/char/1.cc: Add more
1333         checks.
1334         * testsuite/27_io/basic_istringstream/view/wchar_t/1.cc:
1335         Likewise.
1336         * testsuite/27_io/basic_ostringstream/view/char/1.cc:
1337         Likewise.
1338         * testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc:
1339         Likewise.
1340         * testsuite/27_io/basic_stringstream/view/char/1.cc:
1341         Likewise.
1342         * testsuite/27_io/basic_stringstream/view/wchar_t/1.cc:
1343         Likewise.
1344         * testsuite/27_io/basic_istringstream/str/char/2.cc: New test.
1345         * testsuite/27_io/basic_istringstream/str/wchar_t/2.cc: New test.
1346         * testsuite/27_io/basic_ostringstream/str/char/3.cc: New test.
1347         * testsuite/27_io/basic_ostringstream/str/wchar_t/3.cc: New test.
1348         * testsuite/27_io/basic_stringbuf/str/char/4.cc: New test.
1349         * testsuite/27_io/basic_stringbuf/str/wchar_t/4.cc: New test.
1350         * testsuite/27_io/basic_stringstream/str/char/5.cc: New test.
1351         * testsuite/27_io/basic_stringstream/str/wchar_t/5.cc.cc: New test.
1353 2020-11-10  Jonathan Wakely  <jwakely@redhat.com>
1355         PR libstdc++/97415
1356         * include/std/sstream (basic_stringbuf::_M_update_egptr)
1357         (basic_stringbuf::__xfer_bufptrs::__xfer_bufptrs): Check for
1358         null before comparing pointers.
1360 2020-11-09  François Dumont  <fdumont@gcc.gnu.org>
1362         * include/debug/array: Remove.
1363         * include/Makefile.am: Remove <debug/array>.
1364         * include/Makefile.in: Regenerate.
1365         * include/experimental/functional: Adapt.
1366         * include/std/array: Move to _GLIBCXX_INLINE_VERSION namespace.
1367         * include/std/functional: Adapt.
1368         * include/std/span: Adapt.
1369         * testsuite/23_containers/array/debug/back1_neg.cc:
1370         Remove dg-require-debug-mode. Add -D_GLIBCXX_ASSERTIONS option.
1371         * testsuite/23_containers/array/debug/back2_neg.cc: Likewise.
1372         * testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
1373         * testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
1374         * testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc:
1375         Likewise.
1376         * testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc:
1377         Likewise.
1378         * testsuite/23_containers/array/element_access/60497.cc
1379         * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
1380         Remove.
1381         * testsuite/23_containers/array/tuple_interface/get_neg.cc
1382         * testsuite/23_containers/array/tuple_interface/tuple_element_debug_neg.cc
1383         * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
1385 2020-11-09  François Dumont  <fdumont@gcc.gnu.org>
1387         * include/debug/assertions.h (__glibcxx_requires_non_empty_range):
1388         Remove __builtin_expect.
1389         (__glibcxx_requires_subscript): Likewise.
1390         (__glibcxx_requires_nonempty): Likewise.
1391         * include/debug/formatter.h (__check_singular): Add C++11 constexpr
1392         qualification.
1393         * include/debug/helper_functions.h (__check_singular): Likewise. Skip
1394         check if constant evaluated.
1395         (__valid_range): Do not skip check if constant evaluated.
1396         * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_COND_AT): Add
1397         __builtin_expect.
1398         (_GLIBCXX_DEBUG_VERIFY_AT_F): Use __glibcxx_assert_1.
1399         * testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
1400         New test.
1401         * testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc: New test.
1402         * testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc: New test.
1403         * testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc:
1404         New test.
1405         * testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
1406         New test.
1407         * testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
1408         New test.
1409         * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc: New test.
1410         * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc: New test.
1411         * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
1412         New test.
1413         * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc: New test.
1414         * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc: New test.
1415         * testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc: New test.
1416         * testsuite/25_algorithms/lower_bound/debug/partitioned_neg.cc: New test.
1417         * testsuite/25_algorithms/lower_bound/debug/partitioned_pred_neg.cc: New test.
1418         * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc: New test.
1419         * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc: New test.
1420         * testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc: New test.
1421         * testsuite/25_algorithms/upper_bound/debug/partitioned_neg.cc: New test.
1422         * testsuite/25_algorithms/upper_bound/debug/partitioned_pred_neg.cc: New test.
1424 2020-11-09  Jonathan Wakely  <jwakely@redhat.com>
1426         * include/bits/uniform_int_dist.h (__detail::_Power_of_2):
1427         Document that true result for zero is intentional.
1429 2020-11-09  Jonathan Wakely  <jwakely@redhat.com>
1431         * include/std/bit (__popcount): Remove redundant check for zero.
1433 2020-11-09  Jonathan Wakely  <jwakely@redhat.com>
1435         PR libstdc++/97729
1436         * libsupc++/exception_ptr.h (exception_ptr::exception_ptr())
1437         (exception_ptr::exception_ptr(const exception_ptr&))
1438         (exception_ptr::~exception_ptr()): Remove 'always_inline'
1439         attributes. Use 'inline' unconditionally.
1441 2020-11-09  Jonathan Wakely  <jwakely@redhat.com>
1443         PR libstdc++/97758
1444         * include/bits/std_function.h [!__cpp_rtti]: Include <typeinfo>.
1446 2020-11-07  Liu Hao  <lh_mouse@126.com>
1448         * libsupc++/cxxabi.h: (__cxa_atexit): mark with _GLIBCXX_CDTOR_CALLABI
1449         (__cxa_thread_atexit): ditto
1450         * libsupc++/atexit_thread.cc: (__cxa_atexit): mark with
1451         _GLIBCXX_CDTOR_CALLABI
1452         (__cxa_thread_atexit): ditto
1453         (elt): ditto
1455 2020-11-06  Jonathan Wakely  <jwakely@redhat.com>
1457         * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten up patterns
1458         for basic_stringbuf that refer to __xfer_bufptrs.
1460 2020-11-05  Marek Polacek  <polacek@redhat.com>
1462         PR c++/25814
1463         * testsuite/20_util/reference_wrapper/lwg2993.cc: Add a dg-warning.
1464         * testsuite/25_algorithms/generate_n/87982_neg.cc: Likewise.
1466 2020-11-05  Jonathan Wakely  <jwakely@redhat.com>
1468         PR libstdc++/96269
1469         * include/std/optional (operator==, operator!=, operator<)
1470         (operator>, operator<=, operator>=): Fix types used in
1471         SFINAE constraints.
1472         * testsuite/20_util/optional/relops/96269.cc: New test.
1474 2020-11-05  Jonathan Wakely  <jwakely@redhat.com>
1476         PR libstdc++/97731
1477         * src/filesystem/dir.cc (recursive_directory_iterator): Call the
1478         right overload of _Dir::advance.
1479         * testsuite/experimental/filesystem/iterators/97731.cc: New test.
1481 2020-11-05  Jonathan Wakely  <jwakely@redhat.com>
1483         PR libstdc++/97729
1484         * include/std/future (__basic_future::_M_get_result): Use
1485         nullptr for null pointer constant.
1486         * libsupc++/eh_ptr.cc (operator==, operator!=): Remove
1487         definitions.
1488         * libsupc++/exception_ptr.h (_GLIBCXX_EH_PTR_USED): Define
1489         macro to conditionally add __attribute__((__used__)).
1490         (operator==, operator!=, exception_ptr::exception_ptr())
1491         (exception_ptr::exception_ptr(const exception_ptr&))
1492         (exception_ptr::~exception_ptr())
1493         (exception_ptr::operator=(const exception_ptr&))
1494         (exception_ptr::swap(exception_ptr&)): Always define as
1495         inline. Add macro to be conditionally "used".
1497 2020-11-05  Jonathan Wakely  <jwakely@redhat.com>
1499         PR libstdc++/97729
1500         * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Add exports.
1501         * src/c++20/sstream-inst.cc (basic_stringbuf): Instantiate
1502         private constructor taking __xfer_bufptrs.
1504 2020-11-05  Jonathan Wakely  <jwakely@redhat.com>
1506         * include/std/sstream (basic_stringbuf(const allocator_type&):
1507         Add explicit.
1508         (basic_stringbuf(const basic_string<C,T,SA>&, openmode, const A&)):
1509         Call _M_stringbuf_init. Construct _M_string from pointer and length
1510         to avoid constraint checks for string view.
1511         (basic_stringbuf::view()): Make __sv_type alias local to the
1512         function.
1513         (basic_istringstream(const basic_string<C,T,SA>&, openmode, const A&)):
1514         Pass string to _M_streambuf instead of constructing a temporary
1515         with the wrong allocator.
1516         (basic_ostringstream(const basic_string<C,T,SA>&, openmode, const A&)):
1517         Likewise.
1518         (basic_stringstream(const basic_string<C,T,SA>&, openmode, const A&)):
1519         Likewise.
1520         * src/c++20/sstream-inst.cc: Use string_view and wstring_view
1521         typedefs in explicit instantiations.
1522         * testsuite/27_io/basic_istringstream/cons/char/1.cc: Add more
1523         tests for constructors.
1524         * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
1525         * testsuite/27_io/basic_stringbuf/cons/char/1.cc: Likewise.
1526         * testsuite/27_io/basic_stringbuf/cons/char/2.cc: Likewise.
1527         * testsuite/27_io/basic_stringbuf/cons/wchar_t/1.cc: Likewise.
1528         * testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
1529         * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
1531 2020-11-05  Jonathan Wakely  <jwakely@redhat.com>
1533         * include/std/sstream: Adjust whitespace.
1535 2020-11-04  Jonathan Wakely  <jwakely@redhat.com>
1537         PR libstdc++/97719
1538         * include/std/sstream (basic_stringstream(string_type&&, openmode)):
1539         Fix default argument.
1540         * testsuite/27_io/basic_stringstream/cons/char/97719.cc: New test.
1542 2020-11-04  Jonathan Wakely  <jwakely@redhat.com>
1544         * testsuite/18_support/96817.cc: Fail fast if the library is
1545         configured to not use futexes.
1547 2020-11-04  Jonathan Wakely  <jwakely@redhat.com>
1549         PR libstdc++/94971
1550         * include/bits/stl_algo.h (search(FIter, FIter, const Searcher):
1551         Adjust #if condition.
1552         * include/parallel/algo.h (search(FIter, FIter, const Searcher&):
1553         Define new overload for C++17.
1555 2020-11-04  Jonathan Wakely  <jwakely@redhat.com>
1557         PR libstdc++/92285
1558         * doc/xml/manual/evolution.xml: Document change to base class.
1559         * doc/html/manual/api.html: Regenerate.
1561 2020-11-04  Jonathan Wakely  <jwakely@redhat.com>
1563         * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
1564         Use qualified-id to refer to static member functions.
1566 2020-11-03  Jonathan Wakely  <jwakely@redhat.com>
1568         * include/std/syncstream: Include <bits/std_mutex.h>
1569         unconditionally.
1571 2020-11-03  François Dumont  <fdumont@gcc.gnu.org>
1573         * config/abi/pre/gnu-versioned-namespace.ver:
1574         Add __istream_extract and _Safe_local_iterator_base::_M_attach_single
1575         symbols.
1577 2020-11-03  Jonathan Wakely  <jwakely@redhat.com>
1579         * src/c++11/mutex.cc [_GLIBCXX_HAVE_TLS] (__once_proxy): Define
1580         separately for TLS targets.
1581         [!_GLIBCXX_HAVE_TLS] (__get_once_functor_lock_ptr): Replace with ...
1582         (set_lock_ptr): ... this. Set new value and return previous
1583         value.
1584         [!_GLIBCXX_HAVE_TLS] (__set_once_functor_lock_ptr): Adjust to
1585         use set_lock_ptr.
1586         [!_GLIBCXX_HAVE_TLS] (__once_proxy): Likewise.
1588 2020-11-03  Jonathan Wakely  <jwakely@redhat.com>
1590         PR libstdc++/55394
1591         PR libstdc++/66146
1592         PR libstdc++/84323
1593         * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Add new symbols.
1594         * include/std/mutex [!_GLIBCXX_HAS_GTHREADS] (once_flag): Define
1595         even when gthreads is not supported.
1596         (once_flag::_M_once) [_GLIBCXX_HAVE_LINUX_FUTEX]: Change type
1597         from __gthread_once_t to int.
1598         (once_flag::_M_passive(), once_flag::_M_activate())
1599         (once_flag::_M_finish(bool), once_flag::_Active_execution):
1600         Define new members for futex and non-threaded implementation.
1601         [_GLIBCXX_HAS_GTHREADS] (once_flag::_Prepare_execution): New
1602         RAII helper type.
1603         (call_once): Use new members of once_flag.
1604         * src/c++11/mutex.cc (std::once_flag::_M_activate): Define.
1605         (std::once_flag::_M_finish): Define.
1606         * testsuite/30_threads/call_once/39909.cc: Do not require
1607         gthreads.
1608         * testsuite/30_threads/call_once/49668.cc: Likewise.
1609         * testsuite/30_threads/call_once/60497.cc: Likewise.
1610         * testsuite/30_threads/call_once/call_once1.cc: Likewise.
1611         * testsuite/30_threads/call_once/dr2442.cc: Likewise.
1612         * testsuite/30_threads/call_once/once_flag.cc: Add test for
1613         constexpr constructor.
1614         * testsuite/30_threads/call_once/66146.cc: New test.
1615         * testsuite/30_threads/call_once/constexpr.cc: Removed.
1616         * testsuite/30_threads/once_flag/cons/constexpr.cc: Removed.
1618 2020-11-03  Jonathan Yong  <10walls@gmail.com>
1620         * src/Makefile.am (libstdc___la_LINK): Add lt_host_flags.
1621         * src/Makefile.in: Regenerate.
1623 2020-11-02  Thomas Rodgers  <trodgers@redhat.com>
1625         * doc/doxygen/user.cfg.in (INPUT): Add new header.
1626         * include/Makefile.am (std_headers): Add new header.
1627         * include/Makefile.in: Regenerate.
1628         * include/precompiled/stdc++.h: Include new header.
1629         * include/std/syncstream: New header.
1630         * include/std/version: Add __cpp_lib_syncbuf.
1631         * testsuite/27_io/basic_syncbuf/1.cc: New test.
1632         * testsuite/27_io/basic_syncbuf/2.cc: Likewise.
1633         * testsuite/27_io/basic_syncbuf/basic_ops/1.cc:
1634         Likewise.
1635         * testsuite/27_io/basic_syncbuf/requirements/types.cc:
1636         Likewise.
1637         * testsuite/27_io/basic_syncbuf/sync_ops/1.cc:
1638         Likewise.
1639         * testsuite/27_io/basic_syncstream/1.cc: Likewise.
1640         * testsuite/27_io/basic_syncstream/2.cc: Likewise.
1641         * testsuite/27_io/basic_syncstream/basic_ops/1.cc:
1642         Likewise.
1643         * testsuite/27_io/basic_syncstream/requirements/types.cc:
1644         Likewise.
1646 2020-11-01  Jonathan Wakely  <jwakely@redhat.com>
1648         * include/std/type_traits (is_integral<wchar_t>)
1649         (make_unsigned<wchar_t>, make_signed<wchar_t>): Define based
1650         on #ifdef __WCHAR_TYPE__ instead of _GLIBCXX_USE_WCHAR_T.
1651         * include/bits/cpp_type_traits.h (__is_integer<wchar_t>)
1652         (__is_char<wchar_t>): Likewise.
1654 2020-10-31  François Dumont  <fdumont@gcc.gnu.org>
1656         * src/c++17/floating_from_chars.cc (_GLIBCXX_USE_CX11_ABI): Add define.
1657         (buffering_string): New.
1658         [!_GLIBCXX_USE_CXX11_ABI](reserve_string): New.
1659         (from_chars): Adapt.
1660         * src/c++20/sstream-inst.cc: Limit instantiations to
1661         _GLIBCXX_USE_CXX11_ABI.
1663 2020-10-31  Jonathan Wakely  <jwakely@redhat.com>
1665         * include/bits/random.h (independent_bit_engine): Fix typo
1666         in comment.
1667         (shuffle_order_engine): Fix incorrect description in comment.
1668         * include/bits/random.tcc (__representable_as_double
1669         (__p1_representable_as_double): New helper functions.
1670         (shuffle_order_engine::operator()): Use double for calculation
1671         if (max() - min() + 1) is representable as double.
1672         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
1673         line number.
1675 2020-10-31  Jonathan Wakely  <jwakely@redhat.com>
1677         PR libstdc++/96958
1678         * include/bits/hashtable_policy.h (_Prime_rehash_policy)
1679         (_Power2_rehash_policy): Use ceil and floor instead of ceill and
1680         floorl.
1681         * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy): Likewise.
1682         Use double instead of long double.
1684 2020-10-31  Patrick Palka  <ppalka@redhat.com>
1686         PR libstdc++/97600
1687         * include/std/ranges (basic_istream_view::begin): Initialize
1688         _Iterator from 'this' instead of '*this'.
1689         (basic_istream_view::_Iterator::_Iterator): Adjust constructor
1690         accordingly.
1691         (filter_view::_Iterator::_Iterator): Take a filter_view*
1692         argument instead of a filter_view& argument.
1693         (filter_view::_Sentinel::_Sentinel): Likewise.
1694         (filter_view::begin): Initialize _Iterator from 'this' instead
1695         of '*this'.
1696         (filter_view::end): Likewise.
1697         (transform_view::_Iterator::_Iterator): Take a _Parent* instead
1698         of a _Parent&.
1699         (filter_view::_Iterator::operator+): Adjust accordingly.
1700         (filter_view::_Iterator::operator-): Likewise.
1701         (filter_view::begin): Initialize _Iterator from 'this' instead
1702         of '*this'.
1703         (filter_view::end): Likewise.
1704         (join_view::_Iterator): Take a _Parent* instead of a _Parent&.
1705         (join_view::_Sentinel): Likewise.
1706         (join_view::begin): Initialize _Iterator from 'this' instead of
1707         '*this'.
1708         (join_view::end): Initialize _Sentinel from 'this' instead of
1709         '*this'.
1710         (split_view::_OuterIter): Take a _Parent& instead of a _Parent*.
1711         (split_view::begin): Initialize _OuterIter from 'this' instead
1712         of '*this'.
1713         (split_view::end): Likewise.
1714         * testsuite/std/ranges/97600.cc: New test.
1716 2020-10-30  Jonathan Wakely  <jwakely@redhat.com>
1718         * include/std/ranges (enable_borrowed_view<take_view<T>>)
1719         (enable_borrowed_view<drop_view<T>>)
1720         (enable_borrowed_view<drop_while_view<T>>)
1721         (enable_borrowed_view<reverse_view<T>>)
1722         (enable_borrowed_view<common_view<T>>)
1723         (enable_borrowed_view<elements_view<T>>): Add partial
1724         specializations as per P2017R1.
1725         * testsuite/std/ranges/adaptors/conditionally_borrowed.cc:
1726         New test.
1728 2020-10-30  Jonathan Wakely  <jwakely@redhat.com>
1730         PR libstdc++/96958
1731         * include/bits/hashtable_policy.h (_Prime_rehash_policy)
1732         (_Power2_rehash_policy): Use double instead of long double.
1734 2020-10-30  Jonathan Wakely  <jwakely@redhat.com>
1736         * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
1737         Avoid -Wcatch-value warnings.
1739 2020-10-30  Patrick Palka  <ppalka@redhat.com>
1741         * include/std/ranges (__detail::__box): For the partial
1742         specialization used by types that are already semiregular,
1743         make the default constructor value-initialize the underlying
1744         object instead of default-initializing it.  Make its in place
1745         constructor explicit.
1746         * testsuite/std/ranges/adaptors/detail/semiregular_box.cc:
1747         Augment test.
1749 2020-10-30  David Edelsohn  <dje.gcc@gmail.com>
1751         * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: XFAIL on AIX.
1753 2020-10-29  Jonathan Wakely  <jwakely@redhat.com>
1755         * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten patterns
1756         for old <sstream> symbols some more.
1758 2020-10-29  Jonathan Wakely  <jwakely@redhat.com>
1760         * include/bits/ranges_util.h (subrange::subrange(R&&)): Use
1761         direct-initialization instead of list-initialization, so a
1762         potential narrowing conversion from ranges::size(r) to the
1763         stored size isn't ill-formed.
1765 2020-10-29  Jonathan Wakely  <jwakely@redhat.com>
1767         * include/bits/parse_numbers.h (_Select_int_base): Avoid
1768         narrowing conversion in constant expression.
1769         * include/experimental/buffer (buffer_copy): Avoid narrowing
1770         conversion.
1771         * include/experimental/internet (hash<>::operator()): Do not
1772         use deprecated 'argument_type' member.
1773         * include/std/variant (variant::emplace): Use cast instead
1774         of implicit conversion from size_t to narrower unsigned type.
1776 2020-10-29  Jonathan Wakely  <jwakely@redhat.com>
1778         * include/tr1/shared_ptr.h (__shared_count, __shared_ptr)
1779         (shared_ptr): Add diagnostic pragmas around uses of auto_ptr.
1780         * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
1781         Adust dg-error line numbers.
1783 2020-10-29  Jonathan Wakely  <jwakely@redhat.com>
1785         * testsuite/18_support/96817.cc: Avoid -Wunused warnings.
1786         * testsuite/20_util/any/assign/2.cc: Likewise.
1787         * testsuite/20_util/any/cons/2.cc: Likewise.
1788         * testsuite/20_util/align/1.cc: Avoid -Wsign-compare warning.
1789         * testsuite/20_util/function/65760.cc: Avoid -Wunused warning.
1790         * testsuite/20_util/function/1.cc: Avoid -Wcatch-value warning.
1791         * testsuite/20_util/function/cons/move_target.cc: Avoid -Wunused
1792         warning.
1793         * testsuite/20_util/headers/memory/synopsis.cc: Add exception
1794         specification.
1795         * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Avoid
1796         -Wsign-compare warning.
1797         * testsuite/20_util/tuple/cons/deduction.cc: Avoid -Wunused
1798         warning.
1799         * testsuite/20_util/specialized_algorithms/uninitialized_copy/808590-cxx11.cc:
1800         Avoid -Wdeprecated-copy warning.
1801         * testsuite/21_strings/basic_string/56166.cc: Avoid
1802         -Wcatch-value warning.
1803         * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
1804         Avoid -Wcatch-value warnings.
1805         * testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc:
1806         Likewise.
1807         * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
1808         Likewise.
1809         * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
1810         Likewise.
1811         * testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc:
1812         Likewise.
1813         * testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
1814         Likewise.
1815         * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
1816         Likewise.
1817         * testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc:
1818         Likewise.
1819         * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc:
1820         Likewise.
1821         * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc:
1822         Likewise.
1823         * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc:
1824         Likewise.
1825         * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc:
1826         Likewise.
1827         * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc:
1828         Likewise.
1829         * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc:
1830         Likewise.
1831         * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc:
1832         Likewise.
1833         * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc:
1834         Likewise.
1835         * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc:
1836         Prune additional diagnostics.
1837         * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc:
1838         Likewise.
1839         * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc:
1840         Likewise.
1841         * testsuite/21_strings/headers/string/synopsis.cc: Add exception
1842         specifications.
1843         * testsuite/22_locale/locale/cons/12352.cc: Define sized
1844         delete operators to avoid warnings.
1845         * testsuite/23_containers/deque/modifiers/swap/1.cc: Add
1846         exception specification.
1847         * testsuite/23_containers/forward_list/cons/11.cc: Avoid
1848         -Wdeprecated-copy warning.
1849         * testsuite/23_containers/headers/bitset/synopsis.cc: Add
1850         exception specification.
1851         * testsuite/23_containers/headers/deque/synopsis.cc: Likewise.
1852         * testsuite/23_containers/headers/forward_list/synopsis.cc:
1853         Likewise.
1854         * testsuite/23_containers/headers/list/synopsis.cc: Likewise.
1855         * testsuite/23_containers/headers/map/synopsis.cc: Likewise.
1856         * testsuite/23_containers/headers/queue/synopsis.cc: Likewise.
1857         * testsuite/23_containers/headers/set/synopsis.cc: Likewise.
1858         * testsuite/23_containers/headers/vector/synopsis.cc: Likewise.
1859         * testsuite/23_containers/list/modifiers/swap/1.cc: Likewise.
1860         * testsuite/23_containers/map/modifiers/swap/1.cc: Likewise.
1861         * testsuite/23_containers/multimap/modifiers/swap/1.cc:
1862         Likewise.
1863         * testsuite/23_containers/multiset/modifiers/swap/1.cc:
1864         Likewise.
1865         * testsuite/23_containers/set/modifiers/swap/1.cc: Likewise.
1866         * testsuite/23_containers/unordered_set/56267-2.cc: Avoid
1867         -Wdeprecated-copy warning.
1868         * testsuite/23_containers/vector/bool/23632.cc: Avoid
1869         -Wempty-body warning.
1870         * testsuite/23_containers/vector/modifiers/swap/1.cc: Add
1871         exception specification.
1872         * testsuite/25_algorithms/heap/moveable2.cc: Fix misplaced
1873         parentheses around arguments.
1874         * testsuite/25_algorithms/sample/1.cc: Use return value.
1875         * testsuite/25_algorithms/search/searcher.cc: Avoid -Wunused
1876         warnings.
1877         * testsuite/27_io/basic_ostream/exceptions/char/9561.cc:
1878         Likewise.
1879         * testsuite/27_io/basic_ostream/exceptions/wchar_t/9561.cc:
1880         Likewise.
1881         * testsuite/27_io/filesystem/operations/remove_all.cc: Avoid
1882         -Wsign-compare warning.
1883         * testsuite/experimental/any/assign/2.cc: Avoid -Wunused warnings.
1884         * testsuite/experimental/any/cons/2.cc: Likewise.
1885         * testsuite/experimental/filesystem/operations/remove_all.cc:
1886         Avoid -Wign-compare warning.
1887         * testsuite/experimental/memory/observer_ptr/cons/cons.cc:
1888         Likewise.
1889         * testsuite/experimental/memory_resource/null_memory_resource.cc:
1890         Likewise.
1891         * testsuite/experimental/source_location/1.cc: Avoid -Waddress
1892         warning.
1893         * testsuite/ext/pod_char_traits.cc: Avoid -Wunused warning.
1894         * testsuite/ext/vstring/modifiers/clear/56166.cc: Avoid
1895         -Wcatch-value.
1896         * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
1897         Avoid -Wunused warning.
1898         * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc:
1899         Likewise.
1900         * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
1901         Prune additional warnings.
1902         * testsuite/tr1/3_function_objects/function/1.cc: Avoid
1903         -Wcatch-value warning.
1904         * testsuite/util/replacement_memory_operators.h: Define sized
1905         delete to avoid warnings.
1906         * testsuite/util/testsuite_api.h (_NonDefaultConstructible): Add
1907         user-declared assignment operator to stop -Wdeprecated-copy
1908         warnings.
1909         * testsuite/util/testsuite_containers.h: Avoid -Wunused warning.
1910         * testsuite/util/testsuite_iterators.h: Avoid -Wsign-compare
1911         warnings.
1912         * testsuite/util/testsuite_new_operators.h: Define sized deleted.
1914 2020-10-29  Jonathan Wakely  <jwakely@redhat.com>
1916         * testsuite/25_algorithms/all_of/constexpr.cc: Check result of
1917         the algorithm.
1918         * testsuite/25_algorithms/any_of/constexpr.cc: Likewise.
1919         * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
1920         * testsuite/25_algorithms/copy_backward/constexpr.cc: Likewise.
1921         * testsuite/25_algorithms/count/constexpr.cc: Likewise.
1922         * testsuite/25_algorithms/equal/constexpr.cc: Likewise.
1923         * testsuite/25_algorithms/equal_range/constexpr.cc: Likewise.
1924         * testsuite/25_algorithms/fill/constexpr.cc: Likewise.
1925         * testsuite/25_algorithms/find_end/constexpr.cc: Likewise.
1926         * testsuite/25_algorithms/find_if/constexpr.cc: Likewise.
1927         * testsuite/25_algorithms/is_partitioned/constexpr.cc: Likewise.
1928         * testsuite/25_algorithms/is_permutation/constexpr.cc: Likewise.
1929         * testsuite/25_algorithms/is_sorted_until/constexpr.cc:
1930         Likewise.
1931         * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
1932         Likewise.
1933         * testsuite/25_algorithms/lower_bound/constexpr.cc: Likewise.
1934         * testsuite/25_algorithms/merge/constexpr.cc: Likewise.
1935         * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
1936         * testsuite/25_algorithms/none_of/constexpr.cc: Likewise.
1937         * testsuite/25_algorithms/partition_copy/constexpr.cc: Likewise.
1938         * testsuite/25_algorithms/remove_copy/constexpr.cc: Likewise.
1939         * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Likewise.
1940         * testsuite/25_algorithms/remove_if/constexpr.cc: Likewise.
1941         * testsuite/25_algorithms/replace_if/constexpr.cc: Likewise.
1942         * testsuite/25_algorithms/reverse/constexpr.cc: Likewise.
1943         * testsuite/25_algorithms/reverse_copy/constexpr.cc: Likewise.
1944         * testsuite/25_algorithms/rotate_copy/constexpr.cc: Likewise.
1945         * testsuite/25_algorithms/search/constexpr.cc: Likewise.
1946         * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
1947         * testsuite/25_algorithms/set_intersection/constexpr.cc:
1948         Likewise.
1949         * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
1950         Likewise.
1951         * testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
1952         * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
1953         * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
1955 2020-10-29  Jonathan Wakely  <jwakely@redhat.com>
1957         * include/bits/uniform_int_dist.h (_Power_of_two): Add
1958         constexpr.
1959         (uniform_int_distribution::_S_nd): Add static_assert to ensure
1960         the wider type is twice as wide as the result type.
1961         (uniform_int_distribution::__generate_impl): Add static_assert
1962         and declare variables as constexpr where appropriate.
1963         (uniform_int_distribution:operator()): Likewise. Only consider
1964         the uniform random bit generator's range of possible results
1965         when deciding whether _S_nd can be used, not the __uctype type.
1967 2020-10-29  Jonathan Wakely  <jwakely@redhat.com>
1969         * include/ext/rope (_Refcount_Base::_M_ref_count): Remove
1970         volatile qualifier.
1971         (_Refcount_Base::_M_decr()): Likewise.
1973 2020-10-29  Jonathan Wakely  <jwakely@redhat.com>
1975         * include/bits/std_function.h (_Function_handler<void, void>):
1976         Define explicit specialization used for invalid target types.
1977         (_Base_manager::_M_manager) [!__cpp_rtti]: Return null.
1978         (function::target_type()): Check for null pointer.
1979         (function::target()): Define unconditionall. Fix bug with
1980         const_cast of function pointer type.
1981         (function::target() const): Define unconditionally, but
1982         only use RTTI if enabled.
1983         * testsuite/20_util/function/target_no_rtti.cc: New test.
1985 2020-10-29  Patrick Palka  <ppalka@redhat.com>
1987         * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
1988         (test03): Fix initializing the vector vy with the array y of size 4.
1990 2020-10-29  Jonathan Wakely  <jwakely@redhat.com>
1992         * include/bits/hashtable_policy.h (_Local_iterator_base): Cast
1993         value to avoid -Wsign-compare warnings.
1994         * include/bits/regex.h (sub_match::_M_str): Avoid narrowing
1995         conversion.
1996         * include/bits/regex_compiler.tcc (_Compiler::_M_quantifier):
1997         Initialize variable to avoid -Wmaybe-uninitialized warning.
1998         * include/bits/shared_ptr_base.h (_Sp_counted_deleter::_Impl):
1999         Reorder mem-initializer-list to avoid -Wreorder warning.
2000         * include/bits/stl_tree.h (_Rb_tree_impl): Explicitly
2001         initialize base class in copy constructor.
2002         * include/debug/safe_iterator.h (_Safe_iterator): Likewise.
2003         * include/ext/debug_allocator.h: Reorder mem-initializer-list
2004         to avoid -Wreorder warning.
2005         * include/ext/throw_allocator.h (throw_allocator_limit)
2006         (throw_allocator_random): Add user-declared assignment operators
2007         to avoid -Wdeprecated-copy warnings.
2009 2020-10-29  Jonathan Wakely  <jwakely@redhat.com>
2011         * include/bits/uniform_int_dist.h (uniform_int_distribution):
2012         Rename _UniformRandomNumberGenerator template parameters to
2013         _UniformRandomBitGenerator, as per P0346R1.
2015 2020-10-29  Jonathan Wakely  <jwakely@redhat.com>
2017         * include/std/sstream (basic_stringbuf(__string_type&&, openmode)):
2018         Call _M_init_syncbuf to set up get/put areas. Also qualify
2019         std::move.
2021 2020-10-28  Jonathan Wakely  <jwakely@redhat.com>
2023         * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Remove duplicate
2024         patterns.
2025         (CXXABI_1.3.13): Restore missing piece.
2027 2020-10-28  Thomas Rodgers  <trodgers@redhat.com>
2029         * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++20.
2030         * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): New symbols.
2031         * configure: Regenerate.
2032         * include/std/sstream:
2033         (basic_stringbuf::basic_stringbuf(allocator const&)): New constructor.
2034         (basic_stringbuf::basic_stringbuf(openmode, allocator const&)): Likewise.
2035         (basic_stringbuf::basic_stringbuf(basic_string&&, openmode)): Likewise.
2036         (basic_stringbuf::basic_stringbuf(basic_stringbuf&&, allocator const&)):
2037         Likewise.
2038         (basic_stringbuf::get_allocator()): New method.
2039         (basic_stringbuf::view()): Likewise.
2040         (basic_istringstream::basic_istringstream(basic_string&&, openmode)):
2041         New constructor.
2042         (basic_istringstream::basic_istringstream(openmode, allocator const&)):
2043         Likewise
2044         (basic_istringstream::view()): New method.
2045         (basic_ostringstream::basic_ostringstream(basic_string&&, openmode)):
2046         New constructor.
2047         (basic_ostringstream::basic_ostringstream(openmode, allocator const&)):
2048         Likewise
2049         (basic_ostringstream::view()): New method.
2050         (basic_stringstream::basic_stringstream(basic_string&&, openmode)):
2051         New constructor.
2052         (basic_stringstream::basic_stringstream(openmode, allocator const&)):
2053         Likewise
2054         (basic_stringstream::view()): New method.
2055         * src/Makefile.in: Add c++20 directory.
2056         * src/Makefile.am: Regenerate.
2057         * src/c++20/Makefile.am: Add makefile for new sub-directory.
2058         * src/c++20/Makefile.in: Generate.
2059         * src/c++20/sstream-inst.cc: New file defining explicit
2060         instantiations for basic_stringbuf, basic_istringstream,
2061         basic_ostringstream, and basic_stringstream member functions
2062         added in C++20.
2063         * testsuite/27_io/basic_stringbuf/cons/char/2.cc: New test.
2064         * testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
2065         * testsuite/27_io/basic_stringbuf/view/char/1.cc: Likewise.
2066         * testsuite/27_io/basic_stringbuf/view/wchar_t/1.cc: Likewise.
2067         * testsuite/27_io/basic_istringstream/cons/char/1.cc: Likewise.
2068         * testsuite/27_io/basic_istringstream/cons/wchar_t/1.cc: Likewise.
2069         * testsuite/27_io/basic_istringstream/view/char/1.cc: Likewise.
2070         * testsuite/27_io/basic_istringstream/view/wchar_t/1.cc: Likewise.
2071         * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
2072         * testsuite/27_io/basic_ostringstream/cons/wchar_t/1.cc: Likewise.
2073         * testsuite/27_io/basic_ostringstream/view/char/1.cc: Likewise.
2074         * testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc: Likewise.
2075         * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
2076         * testsuite/27_io/basic_stringstream/cons/wchar_t/1.cc: Likewise.
2077         * testsuite/27_io/basic_stringstream/view/char/1.cc: Likewise.
2078         * testsuite/27_io/basic_stringstream/view/wchar_t/1.cc: Likewise.
2080 2020-10-28  Patrick Palka  <ppalka@redhat.com>
2082         PR libstdc++/97613
2083         * include/std/chrono (year_month_weekday::operator sys_days):
2084         Cast the result of index() to int so that the initializer for
2085         days{} is sign-extended when it's converted to the underlying
2086         type.
2087         * testsuite/std/time/year_month_weekday/3.cc: New test.
2089 2020-10-28  Jonathan Wakely  <jwakely@redhat.com>
2091         * libsupc++/new_opnt.cc (new): Add comment about forced unwind
2092         exceptions.
2094 2020-10-28  Jonathan Wakely  <jwakely@redhat.com>
2096         PR libstdc++/94268
2097         * config/os/mingw32-w64/os_defines.h (_GLIBCXX_BUFSIZ):
2098         Define.
2099         * config/os/mingw32/os_defines.h (_GLIBCXX_BUFSIZ):
2100         Define.
2101         * include/bits/fstream.tcc: Use _GLIBCXX_BUFSIZ instead
2102         of BUFSIZ.
2103         * include/ext/stdio_filebuf.h: Likewise.
2104         * include/std/fstream (_GLIBCXX_BUFSIZ): Define.
2106 2020-10-28  Jonathan Wakely  <jwakely@redhat.com>
2108         PR libstdc++/95592
2109         * include/bits/valarray_after.h (_DEFINE_EXPR_UNARY_OPERATOR)
2110         (_DEFINE_EXPR_BINARY_OPERATOR, _DEFINE_EXPR_BINARY_FUNCTION):
2111         Use elaborated-type-specifier and qualified-id to avoid
2112         ambiguities with QNX system headers.
2113         * testsuite/26_numerics/valarray/95592.cc: New test.
2115 2020-10-28  Jonathan Wakely  <jwakely@redhat.com>
2117         PR libstdc++/95609
2118         * include/std/span (span): Reorder data members to match common
2119         implementations of struct iovec.
2120         * testsuite/23_containers/span/layout_compat.cc: New test.
2122 2020-10-27  Jonathan Wakely  <jwakely@redhat.com>
2124         * include/std/functional (std::_Placeholder): Define for C++98
2125         as well as later standards.
2126         * include/tr1/functional (std::placeholders::_1 etc): Declare
2127         for C++98.
2128         (tr1::_Placeholder): Replace with using-declaration for
2129         std::_Placeholder.
2130         (tr1::placeholders::_1 etc.): Replace with using-directive for
2131         std::placeholders.
2133 2020-10-27  Jonathan Wakely  <jwakely@redhat.com>
2135         * include/tr1/ell_integral.tcc (__ellint_rf, __ellint_rd)
2136         (__ellint_rc, __ellint_rj): Remove unused variables.
2137         * include/tr1/modified_bessel_func.tcc (__airy): Likewise.
2139 2020-10-27  Jonathan Wakely  <jwakely@redhat.com>
2141         * include/bits/locale_conv.h (__str_codecvt_out_all):
2142         Add cast to compare operands of the same signedness.
2143         * include/bits/locale_facets_nonio.tcc
2144         (time_get::_M_extract_wday_or_month): Likewise.
2145         * include/bits/sstream.tcc (basic_stringbuf::overflow):
2146         Likewise.
2147         * include/tr1/legendre_function.tcc (__sph_legendre): Use
2148         unsigned for loop variable.
2150 2020-10-27  Jonathan Wakely  <jwakely@redhat.com>
2152         * include/std/charconv (from_chars): Add noexcept to match
2153         definitions in src/c++17/floating_from_chars.cc
2155 2020-10-27  Jonathan Wakely  <jwakely@redhat.com>
2157         * src/c++17/fs_dir.cc (fs::directory_iterator::operator*):
2158         Add noexcept. Do not throw on precondition violation.
2160 2020-10-27  Jonathan Wakely  <jwakely@redhat.com>
2162         * include/bits/fs_path.h (path::_List::begin, path::_List::end):
2163         Add noexcept to match definitions in src/c++17/fs_path.cc.
2165 2020-10-27  Jonathan Wakely  <jwakely@redhat.com>
2167         * testsuite/experimental/memory_resource/new_delete_resource.cc:
2168         Add missing <cstdint> header.
2169         * testsuite/experimental/memory_resource/resource_adaptor.cc:
2170         Likewise.
2172 2020-10-26  Jonathan Wakely  <jwakely@redhat.com>
2174         * include/experimental/executor (strand::_State): Fix thinko.
2176 2020-10-26  Ville Voutilainen  <ville.voutilainen@gmail.com>
2178         * include/std/type_traits (__is_nt_constructible_impl): Remove.
2179         (__is_nothrow_constructible_impl): Adjust.
2180         (is_nothrow_default_constructible): Likewise.
2181         (__is_nt_assignable_impl): Remove.
2182         (__is_nothrow_assignable_impl): Adjust.
2184 2020-10-26  Jonathan Wakely  <jwakely@redhat.com>
2186         PR libstdc++/97570
2187         * libsupc++/new_opa.cc: Declare size_t in global namespace.
2188         Remove unused header.
2190 2020-10-26  Stephan Bergmann  <sbergman@redhat.com>
2192         * include/bits/shared_ptr_base.h
2193         (_Sp_counted_base::_M_add_ref_lock_nothrow(): Add noexcept to
2194         definitions to match declaration.
2195         (__shared_count(const __weak_count&, nothrow_t)): Add noexcept
2196         to declaration to match definition.
2198 2020-10-23  Patrick Palka  <ppalka@redhat.com>
2200         * include/std/ranges (single_view::single_view): Mark the
2201         in place constructor explicit as per LWG 3428.
2202         (take_view): Remove the constraint on the deduction guide's
2203         template parameter as per LWG 3447.
2205 2020-10-23  Jonathan Wakely  <jwakely@redhat.com>
2207         * include/experimental/memory_resource: Include <tuple>.
2208         (polymorphic_allocator::construct): Qualify forward_as_tuple.
2209         * include/std/memory_resource: Likewise.
2211 2020-10-22  Jonathan Wakely  <jwakely@redhat.com>
2213         * testsuite/30_threads/condition_variable/members/68519.cc:
2214         Define recent_epoch_float_clock::duration to meet the Cpp17Clock
2215         requirements.
2217 2020-10-22  Jonathan Wakely  <jwakely@redhat.com>
2219         * include/std/shared_mutex: Only include <condition_variable>
2220         when pthread_rwlock_t and POSIX timers are not available.
2221         (__cpp_lib_shared_mutex, __cpp_lib_shared_timed_mutex): Change
2222         value to be type 'long'.
2223         * include/std/version (__cpp_lib_shared_mutex)
2224         (__cpp_lib_shared_timed_mutex): Likewise.
2226 2020-10-22  Jonathan Wakely  <jwakely@redhat.com>
2228         * include/Makefile.am: Add new header.
2229         * include/Makefile.in: Regenerate.
2230         * include/bits/shared_ptr.h: Include <iosfwd>.
2231         * include/bits/shared_ptr_base.h: Include required headers here
2232         directly, instead of in <memory>.
2233         * include/bits/uses_allocator_args.h: New file. Move utility
2234         functions for uses-allocator construction from <memory> to here.
2235         Only define the utility functions when concepts are available.
2236         (__cpp_lib_make_obj_using_allocator): Define non-standard
2237         feature test macro.
2238         * include/std/condition_variable: Remove unused headers.
2239         * include/std/future: Likewise.
2240         * include/std/memory: Remove headers that are not needed
2241         directly, and are now inclkuded where they're needed. Include
2242         new <bits/uses_allocator_args.h> header.
2243         * include/std/memory_resource: Include only the necessary
2244         headers. Use new feature test macro to detect support for the
2245         utility functions.
2246         * include/std/scoped_allocator: Likewise.
2247         * include/std/version (__cpp_lib_make_obj_using_allocator):
2248         Define.
2250 2020-10-22  Olivier Hainque  <hainque@adacore.com>
2252         * crossconfig.m4: Turn vxworks matcher into vxworks*.
2253         * configure.host: Likewise.
2254         * configure: Regenerate.
2256 2020-10-21  Jonathan Wakely  <jwakely@redhat.com>
2258         * include/bits/shared_ptr.h (shared_ptr(const weak_ptr&, nothrow_t)):
2259         Add noexcept.
2260         * include/bits/shared_ptr_base.h (_Sp_counted_base::_M_add_ref_lock):
2261         Remove specializations and just call _M_add_ref_lock_nothrow.
2262         (__shared_count, __shared_ptr): Use nullptr for null pointer
2263         constants.
2264         (__shared_count(const __weak_count&)): Use _M_add_ref_lock_nothrow
2265         instead of _M_add_ref_lock.
2266         (__shared_count(const __weak_count&, nothrow_t)): Add noexcept.
2267         (__shared_ptr::operator bool()): Add noexcept.
2268         (__shared_ptr(const __weak_ptr&, nothrow_t)): Add noexcept.
2270 2020-10-21  Jonathan Wakely  <jwakely@redhat.com>
2272         PR libstdc++/97512
2273         * include/bits/ranges_util.h (tuple_size<subrange>)
2274         (tuple_element<I, cv subrange>): Move here from ...
2275         * include/std/ranges: ... here.
2276         * testsuite/std/ranges/subrange/97512.cc: New test.
2278 2020-10-21  Thomas Rodgers  <trodgers@redhat.com>
2280         * include/pstl/algorithm_impl.h: Update file.
2281         * include/pstl/execution_impl.h: Likewise.
2282         * include/pstl/glue_algorithm_impl.h: Likewise.
2283         * include/pstl/glue_memory_impl.h: Likewise.
2284         * include/pstl/glue_numeric_impl.h: Likewise.
2285         * include/pstl/memory_impl.h: Likewise.
2286         * include/pstl/numeric_impl.h: Likewise.
2287         * include/pstl/parallel_backend.h: Likewise.
2288         * include/pstl/parallel_backend_serial.h: Likewise.
2289         * include/pstl/parallel_backend_tbb.h: Likewise.
2290         * include/pstl/parallel_backend_utils.h: Likewise.
2291         * include/pstl/pstl_config.h: Likewise.
2292         * include/pstl/unseq_backend_simd.h: Likewise.
2294 2020-10-20  François Dumont  <fdumont@gcc.gnu.org>
2296         * include/bits/hashtable_policy.h
2297         (_Hash_node_value_base<>): Remove _Hash_node_base inheritance.
2298         (_Hash_node_code_cache<bool _Cache_hash_code>): New.
2299         (_Hash_node_value<typename _Value, bool _Cache_hash_code>): New.
2300         (_Hash_node<>): Inherits _Hash_node_base<> and _Hash_node_value<>.
2301         (_Map_base<>::__node_type): Remove.
2302         (_Map_base<>::iterator): Remove.
2303         (_Insert_base<>::__hash_cached): New.
2304         (_Insert_base<>::__constant_iterators): New.
2305         (_Insert_base<>::__hashtable_alloc): New.
2306         (_Insert_base<>::__node_type): Remove.
2307         (_Insert_base<>::__node_ptr): New.
2308         (_Hash_code_base<>): Remove specializations.
2309         (_Hash_code_base<>::__node_type): Remove.
2310         (_Hash_code_base<>::_M_bucket_index(const __node_type*, size_t)):
2311         Replace by...
2312         (_Hash_code_base<>::_M_bucket_index(const _Hash_node_value<>&, size_t)):
2313         ...this.
2314         (_Hash_code_base<>::_M_store_code(__node_type*, __hash_code)):
2315         Replace by...
2316         (_Hash_code_base<>::_M_store_code(_Hash_node_code_cache<>&, __hash_code)):
2317         ...this.
2318         (_Hash_code_base<>::_M_copy_code(__node_type*, const __node_type*)):
2319         Replace by...
2320         (_Hash_code_base<>::_M_copy_code(_Hash_node_code_cache<>&,
2321         const _Hash_node_code_base<>&)): ...this.
2322         (_Hashtable_base<>::__constant_iterators): Remove.
2323         (_Hashtable_base<>::__unique_keys): Remove.
2324         (_Hashtable_base<>::__node_type): Remove.
2325         (_Hashtable_base<>::iterator): Remove.
2326         (_Hashtable_base<>::const_iterator): Remove.
2327         (_Hashtable_base<>::local_iterator): Remove.
2328         (_Hashtable_base<>::const_local_iterator): Remove.
2329         (_Hashtable_base<>::__ireturn_type): Remove.
2330         (_Hashtable_base<>::_Equal_hash_code<>::_S_equals): Replace by...
2331         (_Hashtable_base<>::_S_equals(__hash_code, const _Hash_node_code_hash<>&)):
2332         ...this.
2333         (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals): Replace by...
2334         (_Hashtable_base<>::_S_node_equals(__hash_code,
2335         const _Hash_node_code_hash<>&)): ...this.
2336         (_Hashtable_base<>::_Equal_hash_code<>): Remove.
2337         (_Hashtable_base<>::_M_equals): Adapt.
2338         (_Hashtable_baxe<>::_M_node_equals): Adapt.
2339         (_Equality<>::_M_equal): Adapt.
2340         (_Hashtable_alloc<>::__node_ptr): New.
2341         (_Hashtable_alloc<>::__bucket_type): Rename into...
2342         (_Hashtable_alloc<>::__node_base_ptr): ...this.
2343         (_Hashtable_alloc<>::__bucket_alloc_type): Rename into...
2344         (_Hashtable_alloc<>::__buckets_alloc_type): ...this.
2345         (_Hashtable_alloc<>::__bucket_alloc_traits): Rename into...
2346         (_Hashtable_alloc<>::__buckets_alloc_traits): ...this.
2347         (_Hashtable_alloc<>::__buckets_ptr): New.
2348         (_Hashtable_alloc<>::_M_allocate_node): Adapt.
2349         (_Hashtable_alloc<>::_M_deallocate_node): Adapt.
2350         (_Hashtable_alloc<>::_M_deallocate_node_ptr): Adapt.
2351         (_Hashtable_alloc<>::_M_deallocate_nodes): Adapt.
2352         (_Hashtable_alloc<>::_M_allocate_buckets): Adapt.
2353         (_Hashtable_alloc<>::_M_deallocate_buckets): Adapt.
2354         * include/bits/hashtable.h (_Hashtable<>): Adapt.
2356 2020-10-20  Aldy Hernandez  <aldyh@redhat.com>
2358         * testsuite/21_strings/basic_string/capacity/1.cc: Pass
2359         -Wno-stringop-overflow to test.
2361 2020-10-20  Jonathan Wakely  <jwakely@redhat.com>
2363         PR libstdc++/95917
2364         * include/std/coroutine (__noop_coro_frame): Replace with
2365         noop_coroutine_handle::__frame.
2366         (__dummy_resume_destroy): Define inline in __frame.
2367         (__noop_coro_fr): Replace with noop_coroutine_handle::_S_fr
2368         and define as inline.
2369         * testsuite/18_support/coroutines/95917.cc: New test.
2371 2020-10-20  Jonathan Wakely  <jwakely@redhat.com>
2373         * include/std/coroutine (coroutine_handle<_Promise>): Remove
2374         base class. Add constructors, conversions, accessors etc. as
2375         proposed for LWG 3460.
2376         (coroutine_handle<noop_coroutine_promise>): Likewise.
2377         * testsuite/18_support/coroutines/lwg3460.cc: New test.
2379 2020-10-19  Jonathan Wakely  <jwakely@redhat.com>
2381         * include/bits/unique_ptr.h (make_unique_for_overwrite): Define
2382         for C++20.
2383         * testsuite/20_util/unique_ptr/creation/array_neg.cc: Remove
2384         unused header. Adjust standard reference.
2385         * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: New test.
2386         * testsuite/20_util/unique_ptr/creation/for_overwrite__neg.cc: New test.
2388 2020-10-19  Jonathan Wakely  <jwakely@redhat.com>
2390         * include/std/tuple (_Head_base<Idx, Head, true>): Use reserved
2391         form of __no_unique_address__ attribute because
2392         no_unique_address is not reserved prior to C++20.
2394 2020-10-19  Jonathan Wakely  <jwakely@redhat.com>
2396         * include/bits/node_handle.h (_Node_handle_common): Replace
2397         std::optional with custom type.
2398         * testsuite/20_util/variant/exception_safety.cc: Add missing
2399         header include.
2401 2020-10-19  Jonathan Wakely  <jwakely@redhat.com>
2403         * include/precompiled/expc++.h: Removed.
2405 2020-10-17  Ville Voutilainen  <ville.voutilainen@gmail.com>
2407         PR libstdc++/97449
2408         * include/std/variant
2409         (__gen_vtable_impl<>::_S_apply_single_alt):
2410         Diagnose visitor return type mismatches here..
2411         (__gen_vtable_impl</*base case*/>::_S_apply):
2412         ..not here.
2414 2020-10-15  Jonathan Wakely  <jwakely@redhat.com>
2416         * include/std/concepts: Fix typos in copyright notice.
2417         * include/std/ranges: Likewise.
2419 2020-10-14  Jonathan Wakely  <jwakely@redhat.com>
2421         PR libstdc++/97415
2422         * include/std/sstream (basic_stringbuf::str()): Check for
2423         null egptr() before comparing to non-null pptr().
2425 2020-10-14  Jonathan Wakely  <jwakely@redhat.com>
2427         * testsuite/21_strings/basic_string/modifiers/assign/char/move_assign_optim.cc:
2428         Do not generate debug info.
2429         * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/move_assign_optim.cc:
2430         Likewise.
2432 2020-10-14  Jonathan Wakely  <jwakely@redhat.com>
2434         * include/bits/basic_string.h (basic_string(const Alloc&))
2435         (basic_string(const basic_string&)
2436         (basic_string(const CharT*, size_type, const Alloc&))
2437         (basic_string(const CharT*, const Alloc&))
2438         (basic_string(size_type, CharT, const Alloc&))
2439         (basic_string(initializer_list<CharT>, const Alloc&))
2440         (basic_string(InputIterator, InputIterator, const Alloc&)):
2441         Define inline in class body.
2442         * include/bits/basic_string.tcc (basic_string(const Alloc&))
2443         (basic_string(const basic_string&)
2444         (basic_string(const CharT*, size_type, const Alloc&))
2445         (basic_string(const CharT*, const Alloc&))
2446         (basic_string(size_type, CharT, const Alloc&))
2447         (basic_string(initializer_list<CharT>, const Alloc&))
2448         (basic_string(InputIterator, InputIterator, const Alloc&)):
2449         Move definitions into class body.
2451 2020-10-14  Jonathan Wakely  <jwakely@redhat.com>
2453         * testsuite/lib/libstdc++.exp (check_effective_target_cxx11-abi):
2454         Add comments about which test flags get used by the check.
2456 2020-10-14  Jonathan Wakely  <jwakely@redhat.com>
2458         * testsuite/21_strings/basic_string/allocator/char/copy.cc: Make
2459         comment more precise about what isn't supported by COW strings.
2460         * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
2461         Likewise.
2462         * testsuite/21_strings/basic_string/allocator/char/move.cc:
2463         Likewise.
2464         * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
2465         Likewise.
2466         * testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
2467         Likewise.
2468         * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
2469         Likewise.
2470         * testsuite/21_strings/basic_string/allocator/char/swap.cc:
2471         Likewise.
2472         * testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
2473         Likewise.
2474         * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
2475         Likewise.
2476         * testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
2477         Likewise.
2478         * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
2479         Likewise.
2480         * testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
2481         Likewise.
2482         * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
2483         Likewise.
2484         * testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
2485         Likewise.
2487 2020-10-14  Jonathan Wakely  <jwakely@redhat.com>
2489         * testsuite/21_strings/basic_string/allocator/char/minimal.cc:
2490         Do not require cxx11-abi effective target.
2491         * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
2492         Likewise.
2493         * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
2495 2020-10-14  Jonathan Wakely  <jwakely@redhat.com>
2497         * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
2498         (basic_string(const _CharT*, const _Alloc&)): Constrain to
2499         require an allocator-like type to fix CTAD ambiguity (LWG 3706).
2500         * testsuite/21_strings/basic_string/cons/char/deduction.cc:
2501         Remove dg-skip-if.
2502         * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
2503         Likewise.
2505 2020-10-13  Nuno Lopes  <nuno.lopes@ist.utl.pt>
2507         * include/bits/stl_algo.h (any_of): Fix incorrect description
2508         in comment.
2510 2020-10-13  Jonathan Wakely  <jwakely@redhat.com>
2512         * doc/xml/manual/evolution.xml: Document some API changes
2513         and deprecations.
2514         * doc/xml/manual/intro.xml: Document LWG 2499.
2515         * doc/xml/manual/status_cxx2020.xml: Update status.
2516         * doc/html/*: Regenerate.
2518 2020-10-13  Jonathan Wakely  <jwakely@redhat.com>
2520         * doc/xml/book.txml: Remove trailing whitespace.
2521         * doc/xml/chapter.txml: Likewise.
2522         * doc/xml/class.txml: Likewise.
2523         * doc/xml/gnu/fdl-1.3.xml: Likewise.
2524         * doc/xml/gnu/gpl-3.0.xml: Likewise.
2525         * doc/xml/manual/abi.xml: Likewise.
2526         * doc/xml/manual/algorithms.xml: Likewise.
2527         * doc/xml/manual/allocator.xml: Likewise.
2528         * doc/xml/manual/appendix_contributing.xml: Likewise.
2529         * doc/xml/manual/appendix_free.xml: Likewise.
2530         * doc/xml/manual/appendix_porting.xml: Likewise.
2531         * doc/xml/manual/atomics.xml: Likewise.
2532         * doc/xml/manual/auto_ptr.xml: Likewise.
2533         * doc/xml/manual/backwards_compatibility.xml: Likewise.
2534         * doc/xml/manual/bitmap_allocator.xml: Likewise.
2535         * doc/xml/manual/build_hacking.xml: Likewise.
2536         * doc/xml/manual/codecvt.xml: Likewise.
2537         * doc/xml/manual/concurrency.xml: Likewise.
2538         * doc/xml/manual/concurrency_extensions.xml: Likewise.
2539         * doc/xml/manual/configure.xml: Likewise.
2540         * doc/xml/manual/containers.xml: Likewise.
2541         * doc/xml/manual/ctype.xml: Likewise.
2542         * doc/xml/manual/debug.xml: Likewise.
2543         * doc/xml/manual/debug_mode.xml: Likewise.
2544         * doc/xml/manual/diagnostics.xml: Likewise.
2545         * doc/xml/manual/documentation_hacking.xml: Likewise.
2546         * doc/xml/manual/evolution.xml: Likewise.
2547         * doc/xml/manual/internals.xml: Likewise.
2548         * doc/xml/manual/intro.xml: Likewise.
2549         * doc/xml/manual/io.xml: Likewise.
2550         * doc/xml/manual/iterators.xml: Likewise.
2551         * doc/xml/manual/locale.xml: Likewise.
2552         * doc/xml/manual/localization.xml: Likewise.
2553         * doc/xml/manual/messages.xml: Likewise.
2554         * doc/xml/manual/mt_allocator.xml: Likewise.
2555         * doc/xml/manual/numerics.xml: Likewise.
2556         * doc/xml/manual/parallel_mode.xml: Likewise.
2557         * doc/xml/manual/policy_data_structures.xml: Likewise.
2558         * doc/xml/manual/prerequisites.xml: Likewise.
2559         * doc/xml/manual/shared_ptr.xml: Likewise.
2560         * doc/xml/manual/spine.xml: Likewise.
2561         * doc/xml/manual/status_cxxtr1.xml: Likewise.
2562         * doc/xml/manual/status_cxxtr24733.xml: Likewise.
2563         * doc/xml/manual/strings.xml: Likewise.
2564         * doc/xml/manual/support.xml: Likewise.
2565         * doc/xml/manual/test.xml: Likewise.
2566         * doc/xml/manual/test_policy_data_structures.xml: Likewise.
2567         * doc/xml/manual/using.xml: Likewise.
2568         * doc/xml/manual/using_exceptions.xml: Likewise.
2569         * doc/xml/manual/utilities.xml: Likewise.
2570         * doc/html/*: Regenerate.
2572 2020-10-12  Patrick Palka  <ppalka@redhat.com>
2574         * include/std/ranges (take_while_view::begin): Constrain the
2575         const overload further as per LWG 3450.
2576         (take_while_view::end): Likewise.
2577         * testsuite/std/ranges/adaptors/take_while.cc: Add test for LWG
2578         3450.
2580 2020-10-12  Patrick Palka  <ppalka@redhat.com>
2582         PR libstdc++/95322
2583         * include/std/ranges (take_view::_CI): Define this alias
2584         template as per LWG 3449 and remove ...
2585         (take_view::_Sentinel::_CI): ... this type alias.
2586         (take_view::_Sentinel::operator==): Adjust use of _CI
2587         accordingly.  Define a second overload that accepts an iterator
2588         of the opposite constness as per LWG 3449.
2589         (take_while_view::_Sentinel::operator==): Likewise.
2590         * testsuite/std/ranges/adaptors/95322.cc: Add tests for LWG 3449.
2592 2020-10-12  Jonathan Wakely  <jwakely@redhat.com>
2594         * doc/doxygen/user.cfg.in: Update to Doxygen 1.8.20 format.
2596 2020-10-12  Jonathan Wakely  <jwakely@redhat.com>
2598         * doc/doxygen/user.cfg.in (PREDEFINED): Use __cplusplus=201703L
2599         so that C++17 features are documented.
2601 2020-10-12  Jonathan Wakely  <jwakely@redhat.com>
2603         * include/bits/stl_algobase.h (copy, move, copy_backward)
2604         (move_backward): Fix documentation for returned iterator.
2606 2020-10-12  Martin Sebor  <msebor@redhat.com>
2608         PR c++/97201
2609         * libsupc++/new (operator new): Add attribute alloc_size and malloc.
2611 2020-10-11  Clement Chigot  <clement.chigot@atos.net>
2613         * config/os/aix/t-aix: Add complementary mode object file to
2614         libstdc++fs.a
2616 2020-10-10  Jonathan Wakely  <jwakely@redhat.com>
2618         PR libstdc++/97362
2619         * doc/html/manual/source_code_style.html: Regenerate.
2620         * doc/xml/manual/appendix_contributing.xml: Add __deref to
2621         BADNAMES.
2622         * include/debug/functions.h (_Irreflexive_checker::__deref):
2623         Rename to __ref.
2624         * testsuite/17_intro/badnames.cc: Check __deref.
2626 2020-10-10  Ville Voutilainen  <ville.voutilainen@gmail.com>
2628         * include/std/variant (__check_visitor_result):
2629         Use size_t for indexes.
2630         (__check_visitor_results): Likewise.
2632 2020-10-09  Ville Voutilainen  <ville.voutilainen@gmail.com>
2634         PR libstdc++/95904
2635         * include/std/variant (__deduce_visit_result): Add a nested ::type.
2636         (__gen_vtable_impl</*base case*/>::_S_apply):
2637         Check the visitor return type.
2638         (__same_types): New.
2639         (__check_visitor_result): Likewise.
2640         (__check_visitor_results): Likewise.
2641         (visit(_Visitor&&, _Variants&&...)): Use __check_visitor_results
2642         in case we're visiting just one variant.
2643         * testsuite/20_util/variant/visit_neg.cc: Adjust.
2645 2020-10-09  Jonathan Wakely  <jwakely@redhat.com>
2647         PR libstdc++/97311
2648         * include/bits/random.tcc (seed_seq::generate): Use uint32_t for
2649         calculations. Also split the first loop into three loops to
2650         avoid branching on k on every iteration, resolving PR 94823.
2651         * testsuite/26_numerics/random/seed_seq/97311.cc: New test.
2652         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-erro
2653         line number.
2655 2020-10-09  Daniel Lemire  <lemire@gmail.com>
2657         * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
2658         New member function implementing Lemire's "nearly divisionless"
2659         algorithm.
2660         (uniform_int_distribution::operator()): Use _S_nd when the range
2661         of the URBG is the full width of the result type.
2663 2020-10-09  Jonathan Wakely  <jwakely@redhat.com>
2665         * testsuite/Makefile.am: Set and export variable separately.
2666         * testsuite/Makefile.in: Regenerate.
2668 2020-10-09  Jonathan Wakely  <jwakely@redhat.com>
2670         * scripts/check_performance: Use gnu++11 instead of gnu++0x.
2671         * testsuite/Makefile.am (check-performance): Export CXXFLAGS to
2672         child process.
2673         * testsuite/Makefile.in: Regenerate.
2675 2020-10-09  Jonathan Wakely  <jwakely@redhat.com>
2677         * testsuite/performance/26_numerics/random_dist.cc: New test.
2679 2020-10-09  Jonathan Wakely  <jwakely@redhat.com>
2681         * testsuite/util/testsuite_performance.h (report_header): Remove
2682         unused variable.
2684 2020-10-08  Patrick Palka  <ppalka@redhat.com>
2686         PR libstdc++/95788
2687         * include/bits/ranges_uninitialized.h:
2688         (__construct_at_fn::operator()): Rewrite in terms of
2689         std::construct_at.  Declare it conditionally noexcept.  Qualify
2690         calls to declval in its requires-clause.
2691         * testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
2692         New test.
2694 2020-10-08  Jonathan Wakely  <jwakely@redhat.com>
2696         PR libstdc++/82584
2697         * include/bits/random.tcc
2698         (discrete_distribution::param_type::_M_initialize)
2699         (piecewise_constant_distribution::param_type::_M_initialize)
2700         (piecewise_linear_distribution::param_type::_M_initialize):
2701         Add assertions for positive sums..
2702         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
2703         line.
2705 2020-10-08  Jonathan Wakely  <jwakely@redhat.com>
2707         * include/bits/ios_base.h (ios_base::failure): Add constructors
2708         takeing error_code argument. Add code() member function.
2709         * testsuite/27_io/ios_base/failure/cxx11.cc: Allow test to
2710         run for the old ABI but do not check for derivation from
2711         std::system_error.
2712         * testsuite/27_io/ios_base/failure/error_code.cc: New test.
2714 2020-10-08  Jonathan Wakely  <jwakely@redhat.com>
2716         * include/bits/random.h (__detail::_Mod): Revert last change.
2717         (__detail::__mod): Do not use _Mod for a==0 case.
2718         * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
2719         Check other cases with a==0. Also check runtime results.
2720         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
2721         line.
2723 2020-10-07  Jonathan Wakely  <jwakely@redhat.com>
2725         * include/bits/random.h (__detail::_Mod): Avoid divide by zero.
2726         * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
2727         New test.
2729 2020-10-07  Jonathan Wakely  <jwakely@redhat.com>
2731         * include/bits/random.h (seed_seq(initializer_list<T>)): Rename
2732         parameter to use reserved name.
2733         * include/bits/ranges_algo.h (shift_left, shift_right): Rename
2734         template parameters to use reserved name.
2735         * libsupc++/exception_ptr.h (exception_ptr): Likewise for
2736         parameters and local variables.
2737         * testsuite/17_intro/names.cc: Check "il". Do not check "d" and
2738         "y" in C++20 mode.
2740 2020-10-06  Jonathan Wakely  <jwakely@redhat.com>
2742         PR libstdc++/90295
2743         * config/abi/pre/gnu.ver (CXXABI_1.3.13): New symbol version.
2744         (exception_ptr::_M_addref(), exception_ptr::_M_release()):
2745         Export symbols.
2746         * libsupc++/eh_ptr.cc (exception_ptr::exception_ptr()):
2747         Remove out-of-line definition.
2748         (exception_ptr::exception_ptr(const exception_ptr&)):
2749         Likewise.
2750         (exception_ptr::~exception_ptr()): Likewise.
2751         (exception_ptr::operator=(const exception_ptr&)):
2752         Likewise.
2753         (exception_ptr::swap(exception_ptr&)): Likewise.
2754         (exception_ptr::_M_addref()): Add branch prediction.
2755         * libsupc++/exception_ptr.h (exception_ptr::operator bool):
2756         Add noexcept.
2757         [!_GLIBCXX_EH_PTR_COMPAT] (operator==, operator!=): Define
2758         inline as hidden friends. Remove declarations at namespace
2759         scope.
2760         (exception_ptr::exception_ptr()): Define inline.
2761         (exception_ptr::exception_ptr(const exception_ptr&)):
2762         Likewise.
2763         (exception_ptr::~exception_ptr()): Likewise.
2764         (exception_ptr::operator=(const exception_ptr&)):
2765         Likewise.
2766         (exception_ptr::swap(exception_ptr&)): Likewise.
2767         * testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.13.
2768         * testsuite/18_support/exception_ptr/90295.cc: New test.
2770 2020-10-06  Jonathan Wakely  <jwakely@redhat.com>
2772         * include/std/ranges (join_view): Remove deduction guide.
2773         (views::join): Add explicit template argument list to prevent
2774         deducing the wrong type.
2775         * testsuite/std/ranges/adaptors/join.cc: Move test for LWG 3474
2776         here, from ...
2777         * testsuite/std/ranges/adaptors/join_lwg3474.cc: Removed.
2779 2020-10-05  Jonathan Wakely  <jwakely@redhat.com>
2781         * include/bits/regex.h: Use __int_traits<int> instead of
2782         std::numeric_limits<int>.
2783         * include/bits/uniform_int_dist.h: Use __int_traits<T>::__max
2784         instead of std::numeric_limits<T>::max().
2785         * include/bits/hashtable_policy.h: Use size_t(-1) instead of
2786         std::numeric_limits<size_t>::max().
2787         * include/std/regex: Include <ext/numeric_traits.h>.
2788         * include/std/string_view: Use typedef for __int_traits<int>.
2789         * src/c++11/hashtable_c++0x.cc: Use size_t(-1) instead of
2790         std::numeric_limits<size_t>::max().
2791         * testsuite/std/ranges/iota/96042.cc: Include <limits>.
2792         * testsuite/std/ranges/iota/difference_type.cc: Likewise.
2793         * testsuite/std/ranges/subrange/96042.cc: Likewise.
2795 2020-10-05  Jonathan Wakely  <jwakely@redhat.com>
2797         * include/std/numeric: Move all #include directives to the top
2798         of the header.
2799         * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line
2800         numbers.
2801         * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
2803 2020-10-05  Jonathan Wakely  <jwakely@redhat.com>
2805         * config/abi/pre/gnu.ver: Add new symbol.
2806         * include/bits/functexcept.h (__throw_bad_array_new_length):
2807         Declare new function.
2808         * include/ext/malloc_allocator.h (malloc_allocator::allocate):
2809         Throw bad_array_new_length for impossible sizes (LWG 3190).
2810         * include/ext/new_allocator.h (new_allocator::allocate):
2811         Likewise.
2812         * include/std/memory_resource (polymorphic_allocator::allocate)
2813         (polymorphic_allocator::allocate_object): Use new function,
2814         __throw_bad_array_new_length.
2815         * src/c++11/functexcept.cc (__throw_bad_array_new_length):
2816         Define.
2817         * testsuite/20_util/allocator/lwg3190.cc: New test.
2819 2020-10-05  Mike Crowe  <mac@mcrowe.com>
2821         PR libstdc++/91486
2822         * include/bits/atomic_futex.h:
2823         (__atomic_futex_unsigned::_M_load_when_equal_until): Use target
2824         clock duration type when rounding.
2825         * testsuite/30_threads/async/async.cc (test_pr91486_wait_for):
2826         Rename from test_pr91486.
2827         (float_steady_clock): New class for test.
2828         (test_pr91486_wait_until): New test.
2830 2020-10-05  Mike Crowe  <mac@mcrowe.com>
2832         * testsuite/20_util/duration_cast/rounding_c++11.cc: Copy
2833         rounding.cc and alter to support compilation for C++11 and to
2834         test std::chrono::__detail::ceil.
2836 2020-10-02  Jonathan Wakely  <jwakely@redhat.com>
2838         * testsuite/29_atomics/atomic_float/value_init.cc: Use float
2839         instead of double so that __atomic_load_8 isn't needed.
2841 2020-10-02  Jonathan Wakely  <jwakely@redhat.com>
2843         * testsuite/18_support/96817.cc: Use terminate handler that
2844         calls _Exit(0).
2846 2020-10-02  Patrick Palka  <ppalka@redhat.com>
2848         * include/bits/stl_iterator.h (reverse_iterator::iter_move):
2849         Define for C++20 as per P0896.
2850         (reverse_iterator::iter_swap): Likewise.
2851         (move_iterator::operator*): Apply P0896 changes for C++20.
2852         (move_iterator::operator[]): Likewise.
2853         * testsuite/24_iterators/reverse_iterator/cust.cc: New test.
2855 2020-10-01  Jonathan Wakely  <jwakely@redhat.com>
2857         * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
2858         Do not try to dereference return value of __atomic_load_n.
2860 2020-09-30  Jonathan Wakely  <jwakely@redhat.com>
2862         * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
2863         (_GLIBCXX_GUARD_SET_AND_RELEASE): Define for EABI.
2865 2020-09-30  Jonathan Wakely  <jwakely@redhat.com>
2867         * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_IS_SAME):
2868         Define for GCC 11 or when !__is_identifier(__is_same).
2869         (_GLIBCXX_BUILTIN_IS_SAME_AS): Remove.
2870         * include/std/type_traits (is_same, is_same_v): Replace uses
2871         of _GLIBCXX_BUILTIN_IS_SAME_AS.
2873 2020-09-28  Patrick Palka  <ppalka@redhat.com>
2875         * include/std/ranges (filter_view): Declare the data member
2876         _M_base last instead of first, and adjust constructors' member
2877         initializer lists accordingly.
2878         (transform_view): Likewise.
2879         (take_view): Likewise.
2880         (take_while_view): Likewise.
2881         (drop_view): Likewise.
2882         (drop_while_view): Likewise.
2883         (join_view): Likewise.
2884         (split_view): Likewise (and tweak nearby formatting).
2885         (reverse_view): Likewise.
2886         * testsuite/std/ranges/adaptors/sizeof.cc: Update expected
2887         sizes.
2889 2020-09-28  Patrick Palka  <ppalka@redhat.com>
2891         * testsuite/std/ranges/adaptors/sizeof.cc: New test.
2893 2020-09-28  Patrick Palka  <ppalka@redhat.com>
2895         * include/bits/ranges_util.h (subrange::_M_end): Give it
2896         [[no_unique_address]].
2897         * testsuite/std/ranges/subrange/sizeof.cc: New test.
2899 2020-09-28  Patrick Palka  <ppalka@redhat.com>
2901         * include/std/ranges (iota_view::_M_bound): Give it
2902         [[no_unique_address]].
2903         * testsuite/std/ranges/iota/iota_view.cc: Check that an
2904         unbounded iota_view has minimal size.
2906 2020-09-27  Clement Chigot  <clement.chigot@atos.net>
2908         * config/os/aix/t-aix: Use $(AR) without -X32_64.
2910 2020-09-26  Jonathan Wakely  <jwakely@redhat.com>
2912         PR libstdc++/96817
2913         * include/ext/atomicity.h (__gnu_cxx::__is_single_threaded()):
2914         New function wrapping __libc_single_threaded if available.
2915         (__exchange_and_add_dispatch, __atomic_add_dispatch): Use it.
2916         * libsupc++/guard.cc (__cxa_guard_acquire, __cxa_guard_abort)
2917         (__cxa_guard_release): Likewise.
2918         * testsuite/18_support/96817.cc: New test.
2920 2020-09-25  Jonathan Wakely  <jwakely@redhat.com>
2922         * libsupc++/Makefile.am: Remove redundant -std=gnu++1z flags.
2923         * libsupc++/Makefile.in: Regenerate.
2925 2020-09-24  Antony Polukhin  <antoshkka@gmail.com>
2927         PR libstdc++/71579
2928         * include/std/type_traits (invoke_result, is_invocable)
2929         (is_invocable_r, is_nothrow_invocable, is_nothrow_invocable_r):
2930         Add static_asserts to make sure that the arguments of the type
2931         traits are not misused with incomplete types.
2932         * testsuite/20_util/invoke_result/incomplete_args_neg.cc: New test.
2933         * testsuite/20_util/is_invocable/incomplete_args_neg.cc: New test.
2934         * testsuite/20_util/is_invocable/incomplete_neg.cc: New test.
2935         * testsuite/20_util/is_nothrow_invocable/incomplete_args_neg.cc:
2936         New test.
2937         * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: Check
2938         for error on incomplete type usage in trait.
2940 2020-09-24  Patrick Palka  <ppalka@redhat.com>
2942         * include/std/ranges (__detail::__boxable): Split out the
2943         associated constraints of __box into here.
2944         (__detail::__box): Use the __boxable concept.  Define a leaner
2945         partial specialization for semiregular types.
2946         (single_view::_M_value): Give it [[no_unique_address]].
2947         (filter_view::_M_pred): Likewise.
2948         (transform_view::_M_fun): Likewise.
2949         (take_while_view::_M_pred): Likewise.
2950         (drop_while_view::_M_pred):: Likewise.
2951         * testsuite/std/ranges/adaptors/detail/semiregular_box.cc: New
2952         test.
2954 2020-09-24  Jonathan Wakely  <jwakely@redhat.com>
2956         * doc/xml/manual/configure.xml: Correct name of option.
2957         * doc/html/*: Regenerate.
2959 2020-09-22  Jonathan Wakely  <jwakely@redhat.com>
2961         PR libstdc++/97167
2962         * src/c++17/fs_path.cc (path::_Parser::root_path()): Check
2963         for empty string before inspecting the first character.
2964         * testsuite/27_io/filesystem/path/append/source.cc: Append
2965         empty string_view to path.
2967 2020-09-22  Glen Joseph Fernandes  <glenjofe@gmail.com>
2969         * include/bits/align.h (align): Fix overflow handling.
2970         * testsuite/20_util/align/3.cc: New test.
2972 2020-09-22  Jonathan Wakely  <jwakely@redhat.com>
2974         * include/Makefile.am: Add new headers and adjust for renamed
2975         header.
2976         * include/Makefile.in: Regenerate.
2977         * include/bits/iterator_concepts.h: Adjust for renamed header.
2978         * include/bits/range_access.h (ranges::*): Move to new
2979         <bits/ranges_base.h> header.
2980         * include/bits/ranges_algobase.h: Include new <bits/ranges_base.h>
2981         header instead of <ranges>.
2982         * include/bits/ranges_algo.h: Include new <bits/ranges_util.h>
2983         header.
2984         * include/bits/range_cmp.h: Moved to...
2985         * include/bits/ranges_cmp.h: ...here.
2986         * include/bits/ranges_base.h: New header.
2987         * include/bits/ranges_util.h: New header.
2988         * include/experimental/string_view: Include new
2989         <bits/ranges_base.h> header.
2990         * include/std/functional: Adjust for renamed header.
2991         * include/std/ranges (ranges::view_base, ranges::enable_view)
2992         (ranges::dangling, ranges::borrowed_iterator_t): Move to new
2993         <bits/ranges_base.h> header.
2994         (ranges::view_interface, ranges::subrange)
2995         (ranges::borrowed_subrange_t): Move to new <bits/ranges_util.h>
2996         header.
2997         * include/std/span: Include new <bits/ranges_base.h> header.
2998         * include/std/string_view: Likewise.
2999         * testsuite/24_iterators/back_insert_iterator/pr93884.cc: Add
3000         missing <ranges> header.
3001         * testsuite/24_iterators/front_insert_iterator/pr93884.cc:
3002         Likewise.
3004 2020-09-22  Jonathan Wakely  <jwakely@redhat.com>
3006         PR libstdc++/96803
3007         * include/std/tuple
3008         (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
3009         Use correct value category in __use_alloc call.
3010         * testsuite/20_util/tuple/cons/96803.cc: Check with constructors
3011         that require correct value category to be used.
3013 2020-09-22  Patrick Palka  <ppalka@redhat.com>
3015         * include/std/span (span::front): Remove static_assert.
3016         (span::back): Likewise.
3017         (span::operator[]): Likewise.
3018         * testsuite/23_containers/span/back_neg.cc: Rewrite to verify
3019         that we check the preconditions of back() only when it's called.
3020         * testsuite/23_containers/span/front_neg.cc: Likewise for
3021         front().
3022         * testsuite/23_containers/span/index_op_neg.cc: Likewise for
3023         operator[].
3025 2020-09-22  Patrick Palka  <ppalka@redhat.com>
3027         * include/bits/stl_algo.h (__sample): Exit early when the
3028         input range is empty.
3029         * testsuite/25_algorithms/sample/3.cc: New test.
3031 2020-09-22  Patrick Palka  <ppalka@redhat.com>
3033         * include/bits/stl_algo.h (for_each_n): Mark constexpr for C++20.
3034         (search): Likewise for the overload that takes a searcher.
3035         * testsuite/25_algorithms/for_each/constexpr.cc: Test constexpr
3036         std::for_each_n.
3037         * testsuite/25_algorithms/search/constexpr.cc: Test constexpr
3038         std::search overload that takes a searcher.
3040 2020-09-21  Jonathan Wakely  <jwakely@redhat.com>
3042         * include/bits/c++config (__replacement_assert): Add noreturn
3043         attribute.
3044         (__glibcxx_assert_impl): Use __builtin_expect to hint that the
3045         assertion is expected to pass.
3047 2020-09-21  Jonathan Wakely  <jwakely@redhat.com>
3049         * include/std/ranges (drop_view::begin()): Adjust constraints
3050         to match the correct condition for O(1) ranges::next (LWG 3482).
3051         * testsuite/std/ranges/adaptors/drop.cc: Check that iterator is
3052         cached for non-sized_range.
3054 2020-09-21  Jonathan Wakely  <jwakely@redhat.com>
3056         * include/std/ranges (transform_view, elements_view): Relax
3057         constraints on operator- for iterators, as per LWG 3483.
3058         * testsuite/std/ranges/adaptors/elements.cc: Check that we
3059         can take the difference of two iterators from a non-random
3060         access range.
3061         * testsuite/std/ranges/adaptors/transform.cc: Likewise.
3063 2020-09-21  Jonathan Wakely  <jwakely@redhat.com>
3065         PR libstdc++/97132
3066         * include/bits/align.h (align) [!_GLIBCXX_USE_C99_STDINT_TR1]:
3067         Remove unused code.
3068         (assume_aligned): Do not use __builtin_assume_aligned during
3069         constant evaluation.
3070         * testsuite/20_util/assume_aligned/1.cc: Improve test.
3071         * testsuite/20_util/assume_aligned/97132.cc: New test.
3073 2020-09-20  Jonathan Wakely  <jwakely@redhat.com>
3075         PR libstdc++/97101
3076         * include/std/functional (bind_front): Fix order of parameters
3077         in is_nothrow_constructible_v specialization.
3078         * testsuite/20_util/function_objects/bind_front/97101.cc: New test.
3080 2020-09-11  Thomas Rodgers  <trodgers@redhat.com>
3082         * include/std/memory: Move #include <bits/align.h> inside C++11
3083         conditional includes.
3085 2020-09-11  Thomas Rodgers  <trodgers@redhat.com>
3087         * include/Makefile.am (bits_headers): Add new header.
3088         * include/Makefile.in: Regenerate.
3089         * include/bits/align.h: New file.
3090         * include/std/memory (align): Move definition to bits/align.h.
3091         (assume_aligned): Likewise.
3093 2020-09-11  Jonathan Wakely  <jwakely@redhat.com>
3095         * include/std/chrono [C++17] (chrono::__detail::ceil): Add
3096         using declaration to make chrono::ceil available for internal
3097         use with a consistent name.
3098         (chrono::__detail::__ceil_impl): New function template.
3099         (chrono::__detail::ceil): Use __ceil_impl to compare and
3100         increment the value. Remove SFINAE constraint.
3102 2020-09-11  Jonathan Wakely  <jwakely@redhat.com>
3104         * include/bits/regex_error.h (__throw_regex_error): Fix
3105         parameter declaration and use reserved attribute names.
3107 2020-09-11  Mike Crowe  <mac@mcrowe.com>
3109         * include/std/condition_variable (condition_variable::wait_until):
3110         Convert delta to steady_clock duration before adding to current
3111         steady_clock time to avoid rounding errors described in PR68519.
3112         (condition_variable::wait_for): Simplify calculation of absolute
3113         time by using chrono::__detail::ceil in both overloads.
3114         * testsuite/30_threads/condition_variable/members/68519.cc:
3115         (test_wait_for): Renamed from test01. Replace unassigned val
3116         variable with constant false. Reduce scope of mx and cv
3117         variables to just test_wait_for function.
3118         (test_wait_until): Add new test case.
3120 2020-09-11  Mike Crowe  <mac@mcrowe.com>
3122         PR libstdc++/91486
3123         * include/bits/atomic_futex.h
3124         (__atomic_futex_unsigned::_M_load_when_equal_for)
3125         (__atomic_futex_unsigned::_M_load_when_equal_until): Use
3126         __detail::ceil to convert delta to the reference clock
3127         duration type to avoid resolution problems.
3128         * include/std/chrono (__detail::ceil): Move implementation
3129         of std::chrono::ceil into private namespace so that it's
3130         available to pre-C++17 code.
3131         * testsuite/30_threads/async/async.cc (test_pr91486):
3132         Test __atomic_futex_unsigned::_M_load_when_equal_for.
3134 2020-09-11  Mike Crowe  <mac@mcrowe.com>
3136         * include/bits/atomic_futex.h
3137         (__atomic_futex_unsigned::_M_load_when_equal_until): Add
3138         loop on generic _Clock to check the timeout against _Clock
3139         again after _M_load_when_equal_until returns indicating a
3140         timeout.
3141         * testsuite/30_threads/async/async.cc: Invent slow_clock
3142         that runs at an eleventh of steady_clock's speed. Use it
3143         to test the user-supplied-clock variant of
3144         __atomic_futex_unsigned::_M_load_when_equal_until works
3145         generally with test03 and loops correctly when the timeout
3146         time hasn't been reached in test04.
3148 2020-09-11  Mike Crowe  <mac@mcrowe.com>
3150         PR libstdc++/93542
3151         * include/bits/atomic_futex.h (__atomic_futex_unsigned): Change
3152         __clock_t typedef to use steady_clock so that unknown clocks are
3153         synced to it rather than system_clock. Change existing __clock_t
3154         overloads of _M_load_and_text_until_impl and
3155         _M_load_when_equal_until to use system_clock explicitly. Remove
3156         comment about DR 887 since these changes address that problem as
3157         best as we currently able.
3159 2020-09-11  Mike Crowe  <mac@mcrowe.com>
3161         PR libstdc++/93542
3162         * config/abi/pre/gnu.ver: Update for addition of
3163         __atomic_futex_unsigned_base::_M_futex_wait_until_steady.
3164         * include/bits/atomic_futex.h (__atomic_futex_unsigned_base):
3165         Add comments to clarify that _M_futex_wait_until and
3166         _M_load_and_test_until use CLOCK_REALTIME.
3167         (__atomic_futex_unsigned_base::_M_futex_wait_until_steady)
3168         (__atomic_futex_unsigned_base::_M_load_and_text_until_steady):
3169         New member functions that use CLOCK_MONOTONIC.
3170         (__atomic_futex_unsigned_base::_M_load_and_test_until_impl)
3171         (__atomic_futex_unsigned_base::_M_load_when_equal_until): Add
3172         overloads that accept a steady_clock time_point and use the
3173         new member functions.
3174         * src/c++11/futex.cc: Include headers required for
3175         clock_gettime.
3176         (futex_clock_monotonic_flag): New constant to tell futex to
3177         use CLOCK_MONOTONIC to match existing futex_clock_realtime_flag.
3178         (futex_clock_monotonic_unavailable): New global to store the
3179         result of trying to use CLOCK_MONOTONIC.
3180         (__atomic_futex_unsigned_base::_M_futex_wait_until_steady): Add
3181         new variant of _M_futex_wait_until that uses CLOCK_MONOTONIC to
3182         support waiting using steady_clock.
3184 2020-09-11  Mike Crowe  <mac@mcrowe.com>
3186         * src/c++11/futex.cc: Add new constants for required futex
3187         flags.  Add futex_clock_realtime_unavailable flag to store
3188         result of trying to use FUTEX_CLOCK_REALTIME.
3189         (__atomic_futex_unsigned_base::_M_futex_wait_until): Try to
3190         use FUTEX_WAIT_BITSET with FUTEX_CLOCK_REALTIME and only
3191         fall back to using gettimeofday and FUTEX_WAIT if that's not
3192         supported.
3194 2020-09-11  Mike Crowe  <mac@mcrowe.com>
3196         * testsuite/30_threads/async/async.cc (test02): Test steady_clock
3197         with std::future::wait_until.
3198         (test03): Add new test templated on clock type waiting for future
3199         associated with async to resolve.
3200         (main): Call test03 to test both system_clock and steady_clock.
3202 2020-09-11  Torbjörn SVENSSON  <torbjorn.svensson@st.com>
3203             Christophe Lyon  <christophe.lyon@linaro.org>
3205         * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
3207 2020-09-11  Torbjörn SVENSSON  <torbjorn.svensson@st.com>
3208             Christophe Lyon  <christophe.lyon@linaro.org>
3210         * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
3212 2020-09-11  Christophe Lyon  <christophe.lyon@linaro.org>
3214         * include/bits/regex_error.h: Avoid warning with -fno-exceptions.
3216 2020-09-10  Jonathan Wakely  <jwakely@redhat.com>
3218         * include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in_all):
3219         Add casts to compare types of the same signedness.
3221 2020-09-10  Jonathan Wakely  <jwakely@redhat.com>
3223         * include/bits/ranges_algobase.h (__equal_fn): Remove unused
3224         typedef.
3226 2020-09-10  Jonathan Wakely  <jwakely@redhat.com>
3228         * include/std/version (__cpp_lib_array_constexpr):
3229         (__cpp_lib_constexpr_char_traits): Only define C++17 value when
3230         compiling C++17.
3232 2020-09-10  Jonathan Wakely  <jwakely@redhat.com>
3234         * include/experimental/bits/shared_ptr.h (shared_ptr(auto_ptr&&))
3235         (operator=(auto_ptr&&)): Add diagnostic pragmas to suppress
3236         warnings for uses of std::auto_ptr.
3237         * include/experimental/type_traits (is_literal_type_v):
3238         Likewise, for use of std::is_literal_type.
3239         * include/std/condition_variable (condition_variable_any::_Unlock):
3240         Likewise, for use of std::uncaught_exception.
3242 2020-09-10  Jonathan Wakely  <jwakely@redhat.com>
3244         * include/bits/fs_path.h (path::_List::type()): Avoid narrowing
3245         conversion.
3246         * include/std/chrono (operator+(const year&, const years&)):
3247         Likewise.
3249 2020-09-10  Jonathan Wakely  <jwakely@redhat.com>
3251         * include/bits/codecvt.h (codecvt_byname): Remove names of
3252         unused parameters.
3254 2020-09-10  Jonathan Wakely  <jwakely@redhat.com>
3256         * include/bits/locale_facets_nonio.tcc: Adjust whitespace.
3258 2020-09-10  Krystian Kuźniarek  <krystian.kuzniarek@gmail.com>
3260         * include/c_global/cmath (__lerp): Avoid -Wparentheses warnings.
3262 2020-09-10  Krystian Kuźniarek  <krystian.kuzniarek@gmail.com>
3264         * include/bits/atomic_base.h: Fix -Wunused-variable
3265         warnings.
3266         * include/ext/new_allocator.h: Fix -Wunused-parameter
3267         warnings.
3269 2020-09-10  Jonathan Wakely  <jwakely@redhat.com>
3271         * include/bits/stl_iterator.h (counted_iterator): Add assertions
3272         to check preconditions added by LWG 3472.
3274 2020-09-10  Jonathan Wakely  <jwakely@redhat.com>
3276         PR libstdc++/94160
3277         * src/c++17/memory_resource.cc (munge_options): Round
3278         max_blocks_per_chunk to a multiple of four.
3279         (__pool_resource::_M_alloc_pools()): Simplify slightly.
3280         * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
3281         Check that valid pointers are returned when small values are
3282         used for max_blocks_per_chunk.
3284 2020-09-10  Jonathan Wakely  <jwakely@redhat.com>
3286         PR libstdc++/96942
3287         * include/std/memory_resource (monotonic_buffer_resource::do_allocate):
3288         Use __builtin_expect when checking if a new buffer needs to be
3289         allocated from the upstream resource, and for checks for edge
3290         cases like zero sized buffers and allocations.
3291         * src/c++17/memory_resource.cc (aligned_size): New class template.
3292         (aligned_ceil): New helper function to round up to a given
3293         alignment.
3294         (monotonic_buffer_resource::chunk): Replace _M_size and _M_align
3295         with an aligned_size member. Remove _M_canary member. Change _M_next
3296         to pointer instead of unaligned buffer.
3297         (monotonic_buffer_resource::chunk::allocate): Round up to multiple
3298         of 64 instead of to power of two. Check for size overflow. Remove
3299         redundant check for minimum required alignment.
3300         (monotonic_buffer_resource::chunk::release): Adjust for changes
3301         to data members.
3302         (monotonic_buffer_resource::_M_new_buffer): Use aligned_ceil.
3303         (big_block): Replace _M_size and _M_align with aligned_size
3304         member.
3305         (big_block::big_block): Check for size overflow.
3306         (big_block::size, big_block::align): Adjust to use aligned_size.
3307         (big_block::alloc_size): Use aligned_ceil.
3308         (munge_options): Use aligned_ceil.
3309         (__pool_resource::allocate): Use big_block::align for alignment.
3310         * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Check
3311         upstream resource gets expected values for impossible sizes.
3312         * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
3313         Likewise. Adjust checks for expected alignment in existing test.
3315 2020-09-07  Jonathan Wakely  <jwakely@redhat.com>
3317         * include/std/chrono (duration::_S_gcd): Use invariant that
3318         neither value is zero initially.
3320 2020-09-07  Jonathan Wakely  <jwakely@redhat.com>
3322         * include/std/ranges (__box): Simplify constraints as per LWG 3477.
3324 2020-09-03  Jonathan Wakely  <jwakely@redhat.com>
3326         PR libstdc++/96592
3327         * include/std/tuple (_TupleConstraints<true, T...>): Use
3328         alternative is_constructible instead of std::is_constructible.
3329         * testsuite/20_util/tuple/cons/96592.cc: New test.
3331 2020-09-03  Jonathan Wakely  <jwakely@redhat.com>
3333         * include/std/chrono (duration::_S_gcd): Use iterative algorithm
3334         for C++14 and later.
3335         * include/std/numeric (__detail::__gcd): Replace recursive
3336         Euclidean algorithm with iterative version of binary GCD algorithm.
3337         * testsuite/26_numerics/gcd/1.cc: Test additional inputs.
3338         * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
3339         * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
3340         * testsuite/experimental/numeric/gcd.cc: Test additional inputs.
3341         * testsuite/26_numerics/gcd/2.cc: New test.
3343 2020-09-02  Jonathan Wakely  <jwakely@redhat.com>
3345         PR libstdc++/92978
3346         * testsuite/experimental/numeric/92978.cc: Use experimental::lcm
3347         not std::lcm.
3349 2020-09-02  Jonathan Wakely  <jwakely@redhat.com>
3351         PR libstdc++/96851
3352         * include/bits/cpp_type_traits.h (__is_memcmp_ordered):
3353         New trait that says if memcmp can be used for ordering.
3354         (__is_memcmp_ordered_with): Likewise, for two types.
3355         * include/bits/deque.tcc (__lex_cmp_dit): Use new traits
3356         instead of __is_byte and __numeric_traits.
3357         (__lexicographical_compare_aux1): Likewise.
3358         * include/bits/ranges_algo.h (__lexicographical_compare_fn):
3359         Likewise.
3360         * include/bits/stl_algobase.h (__lexicographical_compare_aux1)
3361         (__is_byte_iter): Likewise.
3362         * include/std/array (operator<=>): Likewise. Only use memcmp
3363         when std::is_constant_evaluated() is false.
3364         * testsuite/23_containers/array/comparison_operators/96851.cc:
3365         New test.
3366         * testsuite/23_containers/array/tuple_interface/get_neg.cc:
3367         Adjust dg-error line numbers.
3369 2020-09-02  Jonathan Wakely  <jwakely@redhat.com>
3371         * include/bits/stl_iterator.h: Include <bits/exception_defines.h>
3372         for definitions of __try, __catch and __throw_exception_again.
3373         (counted_iterator::operator++(int)): Use __throw_exception_again
3374         instead of throw.
3375         * libsupc++/new: Include <bits/exception.h> not <exception>.
3376         * libsupc++/new_opvnt.cc: Include <bits/exception_defines.h>.
3377         * testsuite/18_support/destroying_delete.cc: Include
3378         <type_traits> for std::is_same_v definition.
3379         * testsuite/20_util/variant/index_type.cc: Qualify size_t.
3381 2020-09-01  Jonathan Wakely  <jwakely@redhat.com>
3383         PR libstdc++/71960
3384         * include/bits/c++config (__glibcxx_assert_impl): Remove
3385         do-while so that uses of the macro need to add it.
3386         (__glibcxx_assert): Rename macro for runtime assertions
3387         to __glibcxx_assert_2.
3388         (__glibcxx_assert_1): Define macro for constexpr assertions.
3389         (__glibcxx_assert): Define macro for constexpr and runtime
3390         assertions.
3391         * include/bits/range_access.h (ranges::advance): Remove
3392         redundant precondition checks during constant evaluation.
3393         * include/parallel/base.h (_GLIBCXX_PARALLEL_ASSERT): Always
3394         use do-while in macro expansion.
3395         * include/std/ranges (iota_view::iota_view(W, B)): Remove
3396         redundant braces.
3398 2020-09-01  Jonathan Wakely  <jwakely@redhat.com>
3400         * include/std/chrono (duration::_S_gcd(intmax_t, intmax_t)):
3401         New helper function for finding GCD of two positive intmax_t
3402         values.
3403         (duration::__divide): New helper alias for dividing one period
3404         by another.
3405         (duration::__is_harmonic): Use __divide not ratio_divide.
3406         (duration(const duration<R2, P2>&)): Require the duration rep
3407         types to be convertible.
3408         * testsuite/20_util/duration/cons/dr2094.cc: New test.
3409         * testsuite/20_util/duration/requirements/reduced_period.cc:
3410         Fix definition of unused member functions in test type.
3411         * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
3412         Adjust expected errors.
3414 2020-08-29  Jonathan Wakely  <jwakely@redhat.com>
3416         * include/std/numeric (__detail::__absu(bool)): Make deleted
3417         function a function template, so it will be chosen for calls
3418         with an explicit template argument list.
3419         * testsuite/26_numerics/gcd/gcd_neg.cc: Add dg-prune-output.
3420         * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
3422 2020-08-28  Jonathan Wakely  <jwakely@redhat.com>
3424         * include/std/chrono (common_type): Fix partial specializations
3425         for a single duration type to use the common_type of the rep.
3426         (duration::operator+, duration::operator-): Fix return types
3427         to also use the common_type of the rep.
3428         * testsuite/20_util/duration/requirements/reduced_period.cc:
3429         Check duration using a rep that has common_type specialized.
3431 2020-08-28  Jonathan Wakely  <jwakely@redhat.com>
3433         PR libstdc++/92978
3434         * include/std/numeric (__abs_integral): Replace with ...
3435         (__detail::__absu): New function template that returns an
3436         unsigned type, guaranteeing it can represent the most
3437         negative signed value.
3438         (__detail::__gcd, __detail::__lcm): Require arguments to
3439         be unsigned and therefore already non-negative.
3440         (gcd, lcm): Convert arguments to absolute value as unsigned
3441         type before calling __detail::__gcd or __detail::__lcm.
3442         * include/experimental/numeric (gcd, lcm): Likewise.
3443         * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust expected
3444         errors.
3445         * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
3446         * testsuite/26_numerics/gcd/92978.cc: New test.
3447         * testsuite/26_numerics/lcm/92978.cc: New test.
3448         * testsuite/experimental/numeric/92978.cc: New test.
3450 2020-08-27  Jonathan Wakely  <jwakely@redhat.com>
3452         * include/std/chrono (__duration_common_type): Ensure the
3453         reduced ratio is used. Remove unused partial specialization
3454         using __failure_type.
3455         (common_type): Pass reduced ratios to __duration_common_type.
3456         Add partial specializations for simple cases involving a single
3457         duration or time_point type.
3458         (duration::period): Use reduced ratio.
3459         (duration::operator+(), duration::operator-()): Return duration
3460         type using the reduced ratio.
3461         * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
3462         Adjust expected errors.
3463         * testsuite/20_util/duration/requirements/reduced_period.cc: New test.
3465 2020-08-27  Patrick Palka  <ppalka@redhat.com>
3467         * include/std/chrono (year_month::operator+): Properly handle a
3468         month value of 0 by casting the month value to int before
3469         subtracting 1 from it so that the difference is sign-extended in
3470         the subsequent addition.
3471         * testsuite/std/time/year_month/1.cc: Test adding months to a
3472         year_month whose month component is below or above the
3473         normalized range of [1,12].
3475 2020-08-27  Patrick Palka  <ppalka@redhat.com>
3477         * include/std/chrono
3478         (__detail::__months_years_conversion_disambiguator): Define.
3479         (year_month::operator+=): Templatize the 'months'-based overload
3480         so that the 'years'-based overload is selected in case of
3481         equally-ranked implicit conversion sequences to both 'months'
3482         and 'years' from the supplied argument.
3483         (year_month::operator-=): Likewise.
3484         (year_month::operator+): Likewise.
3485         (year_month::operator-): Likewise.
3486         (year_month_day::operator+=): Likewise.
3487         (year_month_day::operator-=): Likewise.
3488         (year_month_day::operator+): Likewise.
3489         (year_month_day::operator-): Likewise.
3490         (year_month_day_last::operator+=): Likewise.
3491         (year_month_day_last::operator-=): Likewise.
3492         (year_month_day_last::operator+): Likewise
3493         (year_month_day_last::operator-): Likewise.
3494         (year_month_day_weekday::operator+=): Likewise
3495         (year_month_day_weekday::operator-=): Likewise.
3496         (year_month_day_weekday::operator+): Likewise.
3497         (year_month_day_weekday::operator-): Likewise.
3498         (year_month_day_weekday_last::operator+=): Likewise
3499         (year_month_day_weekday_last::operator-=): Likewise.
3500         (year_month_day_weekday_last::operator+): Likewise.
3501         (year_month_day_weekday_last::operator-): Likewise.
3502         (testsuite/std/time/year_month/2.cc): New test.
3503         (testsuite/std/time/year_month_day/2.cc): New test.
3504         (testsuite/std/time/year_month_day_last/2.cc): New test.
3505         (testsuite/std/time/year_month_weekday/2.cc): New test.
3506         (testsuite/std/time/year_month_weekday_last/2.cc): New test.
3507         * testsuite/std/time/year_month/2.cc: New file.
3508         * testsuite/std/time/year_month_day/2.cc: New file.
3509         * testsuite/std/time/year_month_day_last/2.cc: New file.
3510         * testsuite/std/time/year_month_weekday/2.cc: New file.
3511         * testsuite/std/time/year_month_weekday_last/2.cc: New file.
3513 2020-08-27  Patrick Palka  <ppalka@redhat.com>
3515         PR libstdc++/95322
3516         * include/std/ranges (transform_view::sentinel::__distance_from):
3517         Give this a deduced return type.
3518         (transform_view::sentinel::operator-): Adjust the return type so
3519         that it's based on the constness of the iterator rather than
3520         that of the sentinel.
3521         * testsuite/std/ranges/adaptors/95322.cc: Refer to LWG 3488.
3523 2020-08-27  Patrick Palka  <ppalka@redhat.com>
3525         * include/std/ranges (elements_view::begin): Adjust constraints.
3526         (elements_view::end): Likewise.
3527         (elements_view::_Sentinel::operator==): Templatize to take both
3528         _Iterator<true> and _Iterator<false>.
3529         (elements_view::_Sentinel::operator-): Likewise.
3530         * testsuite/std/ranges/adaptors/elements.cc: Add testcase for
3531         the example from P1994R1.
3532         * testsuite/std/ranges/adaptors/lwg3406.cc: New test.
3534 2020-08-27  Patrick Palka  <ppalka@redhat.com>
3536         * include/std/ranges (elements_view::end): Replace these two
3537         overloads with four new overloads.
3538         (elements_view::_Iterator::operator==): Remove.
3539         (elements_view::_Iterator::operator-): Likewise.
3540         (elements_view::_Sentinel): Define.
3542 2020-08-26  Jonathan Wakely  <jwakely@redhat.com>
3544         * include/std/tuple (_Tuple_impl): Whitespaces changes for
3545         consistent indentation. Also use __enable_if_t alias template.
3547 2020-08-26  Jonathan Wakely  <jwakely@redhat.com>
3549         PR libstdc++/96803
3550         * include/std/tuple
3551         (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
3552         Replace parameter pack with a type parameter and a pack and pass
3553         the first type to __use_alloc.
3554         * testsuite/20_util/tuple/cons/96803.cc: New test.
3556 2020-08-26  Patrick Palka  <ppalka@redhat.com>
3558         * include/std/chrono (year_month_weekday::operator==): Compare
3559         weekday_indexed instead of weekday.
3560         * testsuite/std/time/year_month_weekday/1.cc: Augment testcase.
3562 2020-08-26  Jonathan Wakely  <jwakely@redhat.com>
3564         * include/bits/hashtable_policy.h (_Hash_code_base): Change
3565         index of _Hashtable_ebo_helper base class.
3566         * testsuite/23_containers/unordered_map/dup_types.cc: New test.
3568 2020-08-26  Jonathan Wakely  <jwakely@redhat.com>
3570         PR libstdc++/71960
3571         * include/experimental/string_view (basic_string_view):
3572         Enable debug assertions.
3573         * include/std/string_view (basic_string_view):
3574         Likewise.
3576 2020-08-26  François Dumont  <fdumont@gcc.gnu.org>
3578         * include/bits/hashtable_policy.h (_Hashtable<>): Rename _H1 into _Hash
3579         _H2 into _RangeHash and _Hash into _Unused.
3580         (_Hastable_base<>): Likewise.
3581         (_Map_base<>): Likewise.
3582         (_Insert_base<>): Likewise.
3583         (_Insert<>): Likewise.
3584         (_Rehash_base<>): Likewise.
3585         (_Local_iterator_base<>): Likewise.
3586         (_Hash_code_base<>): Likewise.
3587         (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false>):
3588         Remove.
3589         (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>):
3590         Remove.
3591         (_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHas, _Unused,
3592         bool>): Remove _Hashtable_ebo_helper<2, _RangeHash> base type..
3593         (_Hash_code_base<>::_M_bucket_index(const _Key&, __hash_code, size_t)):
3594         Replace by...
3595         (_Hash_code_base<>::_M_bucket_index(__hash_code, size_t)): ...this.
3596         (_Local_iterator<>): Remove _H1 and _H2 template parameters.
3597         (_Local_const_iterator<>): Likewise.
3598         (_Equality<>): Likewise.
3599         (_Map_base<>::operator[](const key_type&): Adapt.
3600         (_Map_base<>::operator[](key_type&&): Adapt.
3601         (_Identity::operator()): Add noexcept.
3602         (_Select1st::operator()): Likewise.
3603         (_Hash_code_base<>): Remove _Hashtable_ebo_helper<0, _ExtractKey> base
3604         type.
3605         (_Hash_code_base::_M_extract): Remove.
3606         * include/bits/hashtable.h (_Hashtable<>): Remove _H1 and _H2 template
3607         parameters. Remove _ExtractKey from constructors.
3608         (_Hashtable<>::_M_insert_unique_node(const key_type&, size_t,
3609         __hash_code, __node_type*, size_t)): Replace by...
3610         (_Hashtable<>::_M_insert_unique_node(size_t, __hash_code,
3611          __node_type*, size_t)): ...this.
3612         (_Hashtable<>::_M_insert_muti_node(__node_type*, const key_type&,
3613         __hash_code, __node_type*)): Replace by...
3614         (_Hashtable<>::_M_insert_multi_node(__node_type*, __hash_code,
3615         __node_type*)): ...this.
3616         (_Hashtable<>::__key_extract): Remove.
3617         * include/bits/node_handle.h: Adapt.
3619 2020-08-25  Jonathan Wakely  <jwakely@redhat.com>
3621         * testsuite/21_strings/debug/iterator_self_move_assign_neg.cc: Removed.
3622         * testsuite/21_strings/debug/self_move_assign_neg.cc: Removed.
3623         * testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc: Removed.
3624         * testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Removed.
3625         * testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc: Removed.
3626         * testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc: Removed.
3627         * testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc: Removed.
3628         * testsuite/23_containers/list/debug/self_move_assign_neg.cc: Removed.
3629         * testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc: Removed.
3630         * testsuite/23_containers/map/debug/self_move_assign_neg.cc: Removed.
3631         * testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc: Removed.
3632         * testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: Removed.
3633         * testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc: Removed.
3634         * testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: Removed.
3635         * testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc: Removed.
3636         * testsuite/23_containers/set/debug/self_move_assign_neg.cc: Removed.
3637         * testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc: Removed.
3638         * testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc: Removed.
3639         * testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc:
3640         Removed.
3641         * testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc: Removed.
3642         * testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc:
3643         Removed.
3644         * testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc: Removed.
3645         * testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc: Removed.
3646         * testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc: Removed.
3647         * testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc: Removed.
3648         * testsuite/23_containers/vector/debug/self_move_assign_neg.cc: Removed.
3650 2020-08-25  Patrick Palka  <ppalka@redhat.com>
3652         * include/std/chrono (year_month_weekday::ok): Fix assert.
3654 2020-08-25  Jonathan Wakely  <jwakely@redhat.com>
3656         * include/std/future (future, shared_future. promise): Add
3657         is_destructible assertion (LWG 3466). Adjust string-literal for
3658         !is_array and !is_function assertions.
3659         * testsuite/30_threads/future/requirements/lwg3458.cc: Check
3660         types with no accessible destructor. Adjust expected errors.
3661         * testsuite/30_threads/promise/requirements/lwg3466.cc:
3662         Likewise.
3663         * testsuite/30_threads/shared_future/requirements/lwg3458.cc:
3664         Likewise.
3666 2020-08-25  Patrick Palka  <ppalka@redhat.com>
3667             Ed Smith-Rowland  <3dw4rd@verizon.net>
3668             Jonathan Wakely  <jwakely@redhat.com>
3670         * include/std/chrono (time_point::operator++)
3671         (time_point::operator--): Define.
3672         (utc_clock, tai_clock, gps_clock): Forward declare.
3673         (utc_time, utc_seconds, tai_time, tai_seconds, gps_time)
3674         (gps_seconds): Define.
3675         (is_clock<utc_clock>, is_clock<tai_clock>, is_clock<gps_clock>)
3676         (is_clock_v<utc_clock>, is_clock_v<tai_clock>)
3677         (is_clock_v<gps_clock>): Define these specializations.
3678         (leap_second_info): Define.
3679         (day, month, year, weekday, weekday_indexed)
3680         (weekday_last, month_day, month_day_last, month_weekday)
3681         (month_weekday_last, year_month, year_month_day)
3682         (year_month_day_last, year_month_weekday, year_month_weekday_last):
3683         Declare and later define.
3684         (last_spec, last, __detail::__days_per_month)
3685         (__detail::__days_per_month, __detail::__last_day): Define.
3686         (January, February, March, April, May, June, July, August)
3687         (September, October, November, December, Sunday, Monday, Tuesday)
3688         (Wednesday, Thursday, Friday, Saturday): Define.
3689         (weekday::operator[]): Define out-of-line.
3690         (year_month_day::_S_from_days, year_month_day::M_days_since_epoch):
3691         Likewise.
3692         (year_month_day::year_month_day, year_month_day::ok): Likewise.
3693         (__detail::__pow10, hh_mm_ss): Define.
3694         (literals::chrono_literals::operator""d)
3695         (literals::chrono_literals::operator""y): Define.
3696         (is_am, is_pm, make12, make24): Define.
3697         * testsuite/20_util/time_point/4.cc: New test.
3698         * testsuite/std/time/day/1.cc: New test.
3699         * testsuite/std/time/hh_mm_ss/1.cc: New test.
3700         * testsuite/std/time/is_am/1.cc: New test.
3701         * testsuite/std/time/is_pm/1.cc: New test.
3702         * testsuite/std/time/make12/1.cc: New test.
3703         * testsuite/std/time/make24/1.cc: New test.
3704         * testsuite/std/time/month/1.cc: New test.
3705         * testsuite/std/time/month_day/1.cc: New test.
3706         * testsuite/std/time/month_day_last/1.cc: New test.
3707         * testsuite/std/time/month_weekday/1.cc: New test.
3708         * testsuite/std/time/month_weekday_last/1.cc: New test.
3709         * testsuite/std/time/weekday/1.cc: New test.
3710         * testsuite/std/time/weekday_indexed/1.cc: New test.
3711         * testsuite/std/time/weekday_last/1.cc: New test.
3712         * testsuite/std/time/year/1.cc: New test.
3713         * testsuite/std/time/year_month/1.cc: New test.
3714         * testsuite/std/time/year_month_day/1.cc: New test.
3715         * testsuite/std/time/year_month_day_last/1.cc: New test.
3716         * testsuite/std/time/year_month_weekday/1.cc: New test.
3717         * testsuite/std/time/year_month_weekday_last/1.cc: New test.
3719 2020-08-24  Jonathan Wakely  <jwakely@redhat.com>
3721         * include/std/ranges (join_view): Add deduction guide (LWG 3474).
3722         * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test.
3724 2020-08-24  Jonathan Wakely  <jwakely@redhat.com>
3726         * include/bits/iterator_concepts.h (indirectly_readable): Add
3727         partial specializations to resolve ambiguities (LWG 3446).
3728         * testsuite/24_iterators/associated_types/readable.traits.cc:
3729         Check types with both value_type and element_type.
3731 2020-08-24  Jonathan Wakely  <jwakely@redhat.com>
3733         * include/std/ranges (ranges::iota_view::size()): Perform all
3734         calculations in the right unsigned types.
3735         * testsuite/std/ranges/iota/size.cc: New test.
3737 2020-08-24  Jonathan Wakely  <jwakely@redhat.com>
3739         PR libstdc++/96766
3740         * include/std/variant (_Variant_storage): Replace implicit
3741         conversions from size_t to __index_type with explicit casts.
3743 2020-08-24  Jonathan Wakely  <jwakely@redhat.com>
3745         * testsuite/30_threads/packaged_task/cons/alloc.cc: Run for
3746         C++11 and skip for C++17 or later.
3748 2020-08-24  Corentin Gay  <gay@adacore.com>
3750         * testsuite/20_util/shared_ptr/atomic/3.cc: Do not require POSIX
3751         threads and add -pthread only on targets supporting them.
3752         * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
3753         Likewise.
3754         * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
3755         Likewise.
3756         * testsuite/30_threads/async/42819.cc: Likewise.
3757         * testsuite/30_threads/async/49668.cc: Likewise.
3758         * testsuite/30_threads/async/54297.cc: Likewise.
3759         * testsuite/30_threads/async/any.cc: Likewise.
3760         * testsuite/30_threads/async/async.cc: Likewise.
3761         * testsuite/30_threads/async/except.cc: Likewise.
3762         * testsuite/30_threads/async/launch.cc: Likewise.
3763         * testsuite/30_threads/async/lwg2021.cc: Likewise.
3764         * testsuite/30_threads/async/sync.cc: Likewise. : Likewise.
3765         * testsuite/30_threads/call_once/39909.cc: Likewise.
3766         * testsuite/30_threads/call_once/49668.cc: Likewise.
3767         * testsuite/30_threads/call_once/60497.cc: Likewise.
3768         * testsuite/30_threads/call_once/call_once1.cc: Likewise.
3769         * testsuite/30_threads/call_once/dr2442.cc: Likewise.
3770         * testsuite/30_threads/condition_variable/54185.cc: Likewise.
3771         * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
3772         * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
3773         * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
3774         * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
3775         * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
3776         * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
3777         * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
3778         Likewise.
3779         * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
3780         * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
3781         * testsuite/30_threads/condition_variable_any/cond.cc: Likewise.
3782         * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
3783         * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
3784         * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
3785         * testsuite/30_threads/future/cons/move.cc: Likewise.
3786         * testsuite/30_threads/future/members/45133.cc: Likewise.
3787         * testsuite/30_threads/future/members/get.cc: Likewise.
3788         * testsuite/30_threads/future/members/get2.cc: Likewise.
3789         * testsuite/30_threads/future/members/share.cc: Likewise.
3790         * testsuite/30_threads/future/members/valid.cc: Likewise.
3791         * testsuite/30_threads/future/members/wait.cc: Likewise.
3792         * testsuite/30_threads/future/members/wait_for.cc: Likewise.
3793         * testsuite/30_threads/future/members/wait_until.cc: Likewise.
3794         * testsuite/30_threads/lock/1.cc: Likewise.
3795         * testsuite/30_threads/lock/2.cc: Likewise.
3796         * testsuite/30_threads/lock/3.cc: Likewise.
3797         * testsuite/30_threads/lock/4.cc: Likewise.
3798         * testsuite/30_threads/mutex/cons/1.cc: Likewise.
3799         * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
3800         * testsuite/30_threads/mutex/lock/1.cc: Likewise.
3801         * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
3802         * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
3803         * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
3804         * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
3805         * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
3806         * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
3807         * testsuite/30_threads/packaged_task/49668.cc: Likewise.
3808         * testsuite/30_threads/packaged_task/60564.cc: Likewise.
3809         * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
3810         * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
3811         * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
3812         * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
3813         * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
3814         * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
3815         * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
3816         * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
3817         Likewise.
3818         * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
3819         * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
3820         * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
3821         * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
3822         * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
3823         * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
3824         * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
3825         * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
3826         * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
3827         * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
3828         * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
3829         * testsuite/30_threads/promise/60966.cc: Likewise.
3830         * testsuite/30_threads/promise/cons/1.cc: Likewise.
3831         * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
3832         * testsuite/30_threads/promise/cons/move.cc: Likewise.
3833         * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
3834         * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
3835         * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
3836         * testsuite/30_threads/promise/members/get_future.cc: Likewise.
3837         * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
3838         * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
3839         * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
3840         * testsuite/30_threads/promise/members/set_value.cc: Likewise.
3841         * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
3842         * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
3843         * testsuite/30_threads/promise/members/swap.cc: Likewise.
3844         * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
3845         * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
3846         Likewise.
3847         * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
3848         * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
3849         * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
3850         Likewise.
3851         * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
3852         * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
3853         * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
3854         * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
3855         * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
3856         * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
3857         Likewise.
3858         * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
3859         * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
3860         * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
3861         Likewise.
3862         * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
3863         Likewise.
3864         * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
3865         * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
3866         * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
3867         Likewise.
3868         * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
3869         Likewise.
3870         * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
3871         Likewise.
3872         * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
3873         Likewise.
3874         * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
3875         Likewise.
3876         * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
3877         * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
3878         * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
3879         * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
3880         * testsuite/30_threads/shared_future/members/get.cc: Likewise.
3881         * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
3882         * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
3883         * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
3884         * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
3885         * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
3886         * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
3887         * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
3888         * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
3889         * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
3890         * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
3891         * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
3892         * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
3893         * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
3894         * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
3895         * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
3896         * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
3897         * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
3898         * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
3899         * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
3900         * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
3901         * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
3902         * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
3903         * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
3904         * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
3905         * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
3906         * testsuite/30_threads/this_thread/1.cc: Likewise.
3907         * testsuite/30_threads/this_thread/sleep_for-mt.cc: Likewise.
3908         * testsuite/30_threads/this_thread/sleep_until-mt.cc: Likewise.
3909         * testsuite/30_threads/thread/cons/1.cc: Likewise.
3910         * testsuite/30_threads/thread/cons/2.cc: Likewise.
3911         * testsuite/30_threads/thread/cons/3.cc: Likewise.
3912         * testsuite/30_threads/thread/cons/4.cc: Likewise.
3913         * testsuite/30_threads/thread/cons/49668.cc: Likewise.
3914         * testsuite/30_threads/thread/cons/5.cc: Likewise.
3915         * testsuite/30_threads/thread/cons/6.cc: Likewise.
3916         * testsuite/30_threads/thread/cons/7.cc: Likewise.
3917         * testsuite/30_threads/thread/cons/8.cc: Likewise.
3918         * testsuite/30_threads/thread/cons/9.cc: Likewise.
3919         * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
3920         * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
3921         * testsuite/30_threads/thread/members/1.cc: Likewise.
3922         * testsuite/30_threads/thread/members/2.cc: Likewise.
3923         * testsuite/30_threads/thread/members/3.cc: Likewise.
3924         * testsuite/30_threads/thread/members/4.cc: Likewise.
3925         * testsuite/30_threads/thread/members/5.cc: Likewise.
3926         * testsuite/30_threads/thread/members/hardware_concurrency.cc:
3927         Likewise.
3928         * testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise.
3929         * testsuite/30_threads/thread/swap/1.cc: Likewise.
3930         * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
3931         * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
3932         Likewise.
3933         * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
3934         * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
3935         * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
3936         Likewise.
3937         * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
3938         * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
3939         * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
3940         * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
3941         * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
3942         * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
3943         * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
3944         * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
3945         * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
3946         * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
3947         * testsuite/30_threads/try_lock/1.cc: Likewise.
3948         * testsuite/30_threads/try_lock/2.cc: Likewise.
3949         * testsuite/30_threads/try_lock/3.cc: Likewise.
3950         * testsuite/30_threads/try_lock/4.cc: Likewise.
3951         * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
3952         * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
3953         * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
3954         * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
3955         * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
3956         * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
3957         * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
3958         * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
3959         * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
3960         * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
3961         * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
3963 2020-08-21  Jonathan Wakely  <jwakely@redhat.com>
3965         PR libstdc++/96736
3966         * testsuite/17_intro/headers/c++1998/all_attributes.cc: Do not
3967         test "cold" on darwin.
3968         * testsuite/17_intro/headers/c++2011/all_attributes.cc:
3969         Likewise.
3970         * testsuite/17_intro/headers/c++2014/all_attributes.cc:
3971         Likewise.
3972         * testsuite/17_intro/headers/c++2017/all_attributes.cc:
3973         Likewise.
3974         * testsuite/17_intro/headers/c++2020/all_attributes.cc:
3975         Likewise.
3977 2020-08-21  Jonathan Wakely  <jwakely@redhat.com>
3979         PR libstdc++/96718
3980         * testsuite/25_algorithms/pstl/feature_test-2.cc: Require
3981         tbb-backend effective target.
3982         * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
3983         * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
3984         * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
3986 2020-08-20  Jonathan Wakely  <jwakely@redhat.com>
3988         * include/bits/iterator_concepts.h [__STRICT_ANSI__]
3989         (incrementable_traits<__int128>): Define specialization.
3990         (incrementable_traits<unsigned __int128>): Likewise.
3991         * testsuite/std/ranges/iota/96042.cc: Test iota_view with
3992         __int128.
3994 2020-08-19  Jonathan Wakely  <jwakely@redhat.com>
3995             Patrick Palka  <ppalka@redhat.com>
3997         PR libstdc++/96042
3998         * include/bits/range_access.h (__detail::__to_unsigned_like):
3999         Do not use make_unsigned_t<T> in the return type, as it can
4000         result in an error before the integral<T> constraint is checked.
4001         [__STRICT_ANSI__]: Add overloads for 128-bit integer types.
4002         (__detail::__make_unsigned_like_t): Define as the return type
4003         of __to_unsigned_like.
4004         * testsuite/std/ranges/subrange/96042.cc: New test.
4006 2020-08-19  Jonathan Wakely  <jwakely@redhat.com>
4008         * include/bits/stl_tree.h (operator!=, operator>, operator<=)
4009         (operator>=): Remove deprecated functions.
4011 2020-08-19  Jonathan Wakely  <jwakely@redhat.com>
4013         PR libstdc++/96042
4014         * include/ext/numeric_traits.h (__is_integer_nonstrict): New
4015         trait which is true for 128-bit integers even in strict modes.
4016         (__numeric_traits_integer, __numeric_traits): Use
4017         __is_integer_nonstrict instead of __is_integer.
4018         * include/std/limits [__STRICT_ANSI__ && __SIZEOF_INT128__]
4019         (numeric_limits<__int128>, (numeric_limits<unsigned __int128>):
4020         Define.
4021         * testsuite/std/ranges/iota/96042.cc: New test.
4023 2020-08-19  Jonathan Wakely  <jwakely@redhat.com>
4025         * include/bits/c++config (_GLIBCXX_DEPRECATED_SUGGEST)
4026         (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST)
4027         (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
4028         Add new macros to comment.
4030 2020-08-19  Patrick Palka  <ppalka@redhat.com>
4032         * include/Makefile.am (bits_headers): Add new header
4033         <bits/max_size_type.h>.
4034         * include/Makefile.in: Regenerate.
4035         * include/bits/iterator_concepts.h
4036         (ranges::__detail::__max_diff_type): Remove definition, replace
4037         with forward declaration of class __max_diff_type.
4038         (__detail::__max_size_type): Remove definition, replace with
4039         forward declaration of class __max_size_type.
4040         (__detail::__is_unsigned_int128, __is_signed_int128)
4041         (__is_int128): New concepts.
4042         (__detail::__is_integer_like): Accept __int128 and unsigned
4043         __int128.
4044         (__detail::__is_signed_integer_like): Accept __int128.
4045         * include/bits/max_size_type.h: New header.
4046         * include/bits/range_access.h: Include <bits/max_size_type.h>.
4047         (__detail::__to_unsigned_like): Two new overloads.
4048         * testsuite/std/ranges/iota/difference_type.cc: New test.
4049         * testsuite/std/ranges/iota/max_size_type.cc: New test.
4051 2020-08-19  Jonathan Wakely  <jwakely@redhat.com>
4053         * include/bits/c++config (_GLIBCXX_DEPRECATED): Define for all
4054         standard modes.
4055         (_GLIBCXX_DEPRECATED_SUGGEST): New macro for "use 'foo' instead"
4056         message in deprecated warnings.
4057         (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST): New
4058         macros for marking features deprecated in C++11.
4059         (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
4060         New macros.
4061         * include/backward/auto_ptr.h (auto_ptr_ref, auto_ptr<void>):
4062         Use _GLIBCXX11_DEPRECATED instead of _GLIBCXX_DEPRECATED.
4063         (auto_ptr): Use _GLIBCXX11_DEPRECATED_SUGGEST.
4064         * include/backward/binders.h (binder1st, binder2nd): Likewise.
4065         * include/bits/ios_base.h (io_state, open_mode, seek_dir)
4066         (streampos, streamoff): Use _GLIBCXX_DEPRECATED_SUGGEST.
4067         * include/std/streambuf (stossc): Replace C++11 attribute
4068         with _GLIBCXX_DEPRECATED_SUGGEST.
4069         * include/std/type_traits (__is_nullptr_t): Use
4070         _GLIBCXX_DEPRECATED_SUGGEST instead of _GLIBCXX_DEPRECATED.
4071         * testsuite/27_io/types/1.cc: Check for deprecated warnings.
4072         Also check for io_state, open_mode and seek_dir typedefs.
4074 2020-08-19  Antony Polukhin  <antoshkka@gmail.com>
4076         PR libstdc++/71579
4077         * include/std/type_traits (invoke_result, is_nothrow_invocable_r)
4078         Add static_asserts to make sure that the argument of the type
4079         trait is not misused with incomplete types.
4080         (is_swappable_with, is_nothrow_swappable_with): Add static_asserts
4081         to make sure that the first and second arguments of the type trait
4082         are not misused with incomplete types.
4083         * testsuite/20_util/invoke_result/incomplete_neg.cc: New test.
4084         * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: New test.
4085         * testsuite/20_util/is_nothrow_swappable/incomplete_neg.cc: New test.
4086         * testsuite/20_util/is_nothrow_swappable_with/incomplete_neg.cc: New
4087         test.
4088         * testsuite/20_util/is_swappable_with/incomplete_neg.cc: New test.
4090 2020-08-18  David Edelsohn  <dje.gcc@gmail.com>
4091             Clement Chigot  <clement.chigot@atos.net>
4093         * config/os/aix/t-aix: Add complementary mode object files to
4094         libsupc++.a
4096 2020-08-18  Jonathan Wakely  <jwakely@redhat.com>
4098         * testsuite/17_intro/headers/c++1998/all_attributes.cc: Check
4099         "cold" isn't used in the library. Also check <cxxabi.h>.
4100         * testsuite/17_intro/headers/c++2011/all_attributes.cc:
4101         Likewise.
4102         * testsuite/17_intro/headers/c++2014/all_attributes.cc:
4103         Likewise.
4104         * testsuite/17_intro/headers/c++2017/all_attributes.cc:
4105         Likewise.
4106         * testsuite/17_intro/headers/c++2020/all_attributes.cc:
4107         Likewise.
4109 2020-08-18  Jonathan Wakely  <jwakely@redhat.com>
4111         PR libstdc++/69724
4112         * include/std/future (__future_base::_S_make_deferred_state)
4113         (__future_base::_S_make_async_state): Remove.
4114         (__future_base::_Deferred_state): Change constructor to accept a
4115         parameter pack of arguments and forward them to the call
4116         wrapper.
4117         (__future_base::_Async_state_impl): Likewise. Replace lambda
4118         expression with a named member function.
4119         (async): Construct state object directly from the arguments,
4120         instead of using thread::__make_invoker, _S_make_deferred_state
4121         and _S_make_async_state. Move shared state into the returned
4122         future.
4123         * include/std/thread (thread::_Call_wrapper): New alias
4124         template for use by constructor and std::async.
4125         (thread::thread(Callable&&, Args&&...)): Create state object
4126         directly instead of using _S_make_state.
4127         (thread::__make_invoker, thread::__decayed_tuple)
4128         (thread::_S_make_state): Remove.
4129         * testsuite/30_threads/async/69724.cc: New test.
4131 2020-08-17  Jonathan Wakely  <jwakely@redhat.com>
4133         PR libstdc++/55713
4134         PR libstdc++/71096
4135         PR libstdc++/93147
4136         * include/std/tuple [__has_cpp_attribute(no_unique_address)]
4137         (_Head_base<Idx, Head, true>): New definition of the partial
4138         specialization, using [[no_unique_address]] instead of
4139         inheritance.
4140         * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
4141         output.
4142         * testsuite/20_util/tuple/comparison_operators/93147.cc: New test.
4143         * testsuite/20_util/tuple/creation_functions/55713.cc: New test.
4144         * testsuite/20_util/tuple/element_access/71096.cc: New test.
4146 2020-08-14  Lewis Hyatt  <lhyatt@gmail.com>
4148         * testsuite/lib/libstdc++.exp: Use the new option
4149         -fdiagnostics-plain-output.
4151 2020-08-13  Jonathan Wakely  <jwakely@redhat.com>
4153         * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Warn if the c_std
4154         option is used and fail unless --enable-cheaders-obsolete is
4155         also used.
4156         * configure: Regenerate.
4158 2020-08-12  Jonathan Wakely  <jwakely@redhat.com>
4160         PR libstdc++/85828
4161         * include/bits/basic_string.h (operator=(basic_string&&)): Check
4162         for self-move before copying with char_traits::copy.
4163         * include/bits/hashtable.h (operator=(_Hashtable&&)): Check for
4164         self-move.
4165         * include/bits/stl_deque.h (_M_move_assign1(deque&&, false_type)):
4166         Check for equal allocators.
4167         * include/bits/stl_list.h (_M_move_assign(list&&, true_type)):
4168         Call clear() instead of _M_clear().
4169         * include/debug/formatter.h (__msg_self_move_assign): Change
4170         comment.
4171         * include/debug/macros.h (__glibcxx_check_self_move_assign):
4172         (_GLIBCXX_DEBUG_VERIFY): Remove.
4173         * include/debug/safe_container.h (operator=(_Safe_container&&)):
4174         Remove assertion check for safe move and make it well-defined.
4175         * include/debug/safe_iterator.h (operator=(_Safe_iterator&&)):
4176         Remove assertion check for self-move.
4177         * include/debug/safe_local_iterator.h
4178         (operator=(_Safe_local_iterator&&)): Likewise.
4179         * testsuite/21_strings/basic_string/cons/char/self_move.cc: New test.
4180         * testsuite/23_containers/deque/cons/self_move.cc: New test.
4181         * testsuite/23_containers/forward_list/cons/self_move.cc: New test.
4182         * testsuite/23_containers/list/cons/self_move.cc: New test.
4183         * testsuite/23_containers/set/cons/self_move.cc: New test.
4184         * testsuite/23_containers/unordered_set/cons/self_move.cc: New test.
4185         * testsuite/23_containers/vector/cons/self_move.cc: New test.
4187 2020-08-11  François Dumont  <fdumont@gcc.gnu.org>
4189         PR libstdc++/91620
4190         * include/bits/forward_list.tcc (forward_list<>::remove): Collect nodes
4191         to destroy in an intermediate forward_list.
4192         (forward_list<>::remove_if, forward_list<>::unique): Likewise.
4193         * include/bits/list.tcc (list<>::remove, list<>::unique): Likewise.
4194         (list<>::remove_if): Likewise.
4195         * include/debug/forward_list (forward_list<>::_M_erase_after): Remove.
4196         (forward_list<>::erase_after): Adapt.
4197         (forward_list<>::remove, forward_list<>::remove_if): Collect nodes to
4198         destroy in an intermediate forward_list.
4199         (forward_list<>::unique): Likewise.
4200         * include/debug/list (list<>::remove, list<>::unique): Likewise.
4201         (list<>::remove_if): Likewise.
4202         * testsuite/23_containers/forward_list/operations/91620.cc: New test.
4203         * testsuite/23_containers/list/operations/91620.cc: New test.
4205 2020-08-11  Jonathan Wakely  <jwakely@redhat.com>
4207         * testsuite/30_threads/thread/cons/84535.cc: Use a custom
4208         namespace.
4209         * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
4211 2020-08-11  Jonathan Wakely  <jwakely@redhat.com>
4213         PR libstdc++/89760
4214         * include/experimental/executor [!_GLIBCXX_HAS_GTHREADS]:
4215         (execution_context::mutex_type): Define dummy mutex type.
4216         (system_context): Use execution_context::mutex_type.
4217         (system_context) [!_GLIBCXX_HAS_GTHREADS]: Define dummy
4218         thread and condition variable types.
4219         [!_GLIBCXX_HAS_GTHREADS] (system_context::_M_run()): Do not
4220         define.
4221         (system_context::_M_post) [!_GLIBCXX_HAS_GTHREADS]: Throw
4222         an exception when threads aren't available.
4223         (strand::running_in_this_thread()): Defer to _M_state.
4224         (strand::_State::running_in_this_thread()): New function.
4225         (use_future_t): Do not depend on _GLIBCXX_USE_C99_STDINT_TR1.
4226         * include/experimental/io_context (io_context): Use the
4227         execution_context::mutex_type alias. Replace stack of thread
4228         IDs with counter.
4229         * testsuite/experimental/net/execution_context/use_service.cc:
4230         Enable test for non-pthread targets.
4232 2020-08-11  Jonathan Wakely  <jwakely@redhat.com>
4234         * include/experimental/executor (system_context::a__tag): Make
4235         default constructor explicit.
4237 2020-08-11  Jonathan Wakely  <jwakely@redhat.com>
4239         * include/experimental/executor (system_context::_M_run()):
4240         Fix predicate.
4241         * testsuite/experimental/net/system_context/1.cc: New test.
4243 2020-08-11  Jonathan Wakely  <jwakely@redhat.com>
4245         * include/std/stop_token: Check _GLIBCXX_HAS_GTHREADS using
4246         #ifdef instead of #if.
4247         (stop_token::_S_yield()): Check _GLIBCXX_HAS_GTHREADS before
4248         using __gthread_yield.
4250 2020-08-11  Jonathan Wakely  <jwakely@redhat.com>
4252         * include/std/thread [!_GLIBCXX_HAS_GTHREADS] (this_thread::yield)
4253         (this_thread::sleep_until): Define.
4254         [!_GLIBCXX_HAS_GTHREADS] (this_thread::sleep_for): Define. Replace
4255         use of __gthread_time_t typedef with timespec.
4256         * src/c++11/thread.cc [!_GLIBCXX_HAS_GTHREADS] (__sleep_for):
4257         Likewise.
4258         * testsuite/30_threads/this_thread/2.cc: Moved to...
4259         * testsuite/30_threads/this_thread/yield.cc: ...here.
4260         * testsuite/30_threads/this_thread/3.cc: Moved to...
4261         * testsuite/30_threads/this_thread/sleep_for-mt.cc: ...here.
4262         * testsuite/30_threads/this_thread/4.cc: Moved to...
4263         * testsuite/30_threads/this_thread/sleep_until-mt.cc: ...here.
4264         * testsuite/30_threads/this_thread/58038.cc: Add
4265         dg-require-sleep.
4266         * testsuite/30_threads/this_thread/60421.cc: Likewise.
4267         * testsuite/30_threads/this_thread/sleep_for.cc: New test.
4268         * testsuite/30_threads/this_thread/sleep_until.cc: New test.
4270 2020-08-10  Jonathan Wakely  <jwakely@redhat.com>
4272         PR libstdc++/94681
4273         * src/c++17/fs_ops.cc (read_symlink): Use posix::lstat instead
4274         of calling ::lstat directly.
4275         * src/filesystem/ops.cc (read_symlink): Likewise.
4277 2020-08-10  Jonathan Wakely  <jwakely@redhat.com>
4279         * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
4280         Use gdb.Type.strip_typedefs().
4281         * testsuite/libstdc++-prettyprinters/compat.cc: Use a typedef in
4282         the emulated old type.
4284 2020-08-10  Jonathan Wakely  <jwakely@redhat.com>
4286         PR libstdc++/94681
4287         * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
4288         $enable_libstdcxx_filesystem_ts.
4289         * configure: Regenerate.
4291 2020-08-10  Jonathan Wakely  <jwakely@redhat.com>
4293         PR libstdc++/93904
4294         * include/bits/stl_iterator.h (inserter): Do not deduce
4295         iterator type (LWG 561).
4296         * testsuite/24_iterators/insert_iterator/dr561.cc: New test.
4298 2020-08-10  Jonathan Wakely  <jwakely@redhat.com>
4300         * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI=0]
4301         (basic_string::reserve()): Do nothing if exceptions are not
4302         enabled.
4304 2020-08-10  Jonathan Wakely  <jwakely@redhat.com>
4306         PR libstdc++/95749
4307         * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
4308         (stat_type): Change to __stat64.
4309         (stat): Use _wstat64.
4311 2020-08-07  Jonathan Wakely  <jwakely@redhat.com>
4313         PR libstdc++/96303
4314         * include/debug/bitset (bitset::operator==): Call _M_base() on
4315         right operand.
4316         (bitset::operator!=): Likewise, but don't define it at all when
4317         default comparisons are supported by the compiler.
4318         * testsuite/23_containers/bitset/operations/96303.cc: New test.
4320 2020-08-07  Jonathan Wakely  <jwakely@redhat.com>
4322         * testsuite/18_support/comparisons/algorithms/partial_order.cc:
4323         Replace VERIFY with static_assert where the compiler now
4324         allows it.
4325         * testsuite/18_support/comparisons/algorithms/weak_order.cc:
4326         Likewise.
4328 2020-08-07  Jonathan Wakely  <jwakely@redhat.com>
4330         * config/abi/pre/gnu.ver: Fix wildcards for wstring symbols.
4332 2020-08-06  Andrew Luo  <andrewluotechnologies@outlook.com>
4333             Jonathan Wakely  <jwakely@redhat.com>
4335         * config/abi/pre/gnu.ver (GLIBCXX_3.4): Use less greedy
4336         patterns for basic_string members.
4337         (GLIBCXX_3.4.29): Export new basic_string::reserve symbols.
4338         * doc/xml/manual/status_cxx2020.xml: Update P0966 status.
4339         * include/bits/basic_string.h (shrink_to_fit()): Call reserve().
4340         (reserve(size_type)): Remove default argument.
4341         (reserve()): Declare new overload.
4342         [!_GLIBCXX_USE_CXX11_ABI] (shrink_to_fit, reserve): Likewise.
4343         * include/bits/basic_string.tcc (reserve(size_type)): Remove
4344         support for shrinking capacity.
4345         (reserve()): Perform shrink-to-fit operation.
4346         [!_GLIBCXX_USE_CXX11_ABI] (reserve): Likewise.
4347         * testsuite/21_strings/basic_string/capacity/1.cc: Adjust to
4348         reflect new behavior.
4349         * testsuite/21_strings/basic_string/capacity/char/1.cc:
4350         Likewise.
4351         * testsuite/21_strings/basic_string/capacity/char/18654.cc:
4352         Likewise.
4353         * testsuite/21_strings/basic_string/capacity/char/2.cc:
4354         Likewise.
4355         * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
4356         Likewise.
4357         * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
4358         Likewise.
4359         * testsuite/21_strings/basic_string/capacity/wchar_t/2.cc:
4360         Likewise.
4362 2020-08-06  Jonathan Wakely  <jwakely@redhat.com>
4364         * include/bits/basic_string.tcc
4365         (operator>>(basic_istream&, basic_string&)): Do not set eofbit
4366         if extraction stopped after in.width() characters.
4367         * src/c++98/istream-string.cc (operator>>(istream&, string&)):
4368         Likewise.
4369         * include/bits/istream.tcc (__istream_extract): Do not set
4370         eofbit if extraction stopped after n-1 characters.
4371         * src/c++98/istream.cc (__istream_extract): Likewise.
4372         * testsuite/21_strings/basic_string/inserters_extractors/char/13.cc: New test.
4373         * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/13.cc: New test.
4374         * testsuite/27_io/basic_istream/extractors_character/char/5.cc: New test.
4375         * testsuite/27_io/basic_istream/extractors_character/wchar_t/5.cc: New test.
4377 2020-08-06  Jonathan Wakely  <jwakely@redhat.com>
4379         PR libstdc++/96484
4380         * src/c++17/fs_ops.cc (fs::read_symlink): Return an error
4381         immediately for non-symlinks.
4382         * src/filesystem/ops.cc (fs::read_symlink): Likewise.
4384 2020-08-06  Jonathan Wakely  <jwakely@redhat.com>
4386         * include/std/istream (operator>>(istream&, char*)): Add
4387         attributes to get warnings for pointers that are null or known
4388         to point to the end of a buffer. Request upper bound from
4389         __builtin_object_size check and handle zero-sized buffer case.
4390         (operator>>(istream&, signed char))
4391         (operator>>(istream&, unsigned char*)): Add attributes.
4392         * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
4393         Check extracting into the middle of a buffer.
4394         * testsuite/27_io/basic_istream/extractors_character/wchar_t/overflow.cc: New test.
4396 2020-08-05  Jonathan Wakely  <jwakely@redhat.com>
4398         * include/std/atomic (atomic<T>::store): Reformat.
4400 2020-08-05  Jonathan Wakely  <jwakely@redhat.com>
4402         * doc/xml/manual/status_cxx2017.xml: Replace oneAPI DPC++ link
4403         with LLVM repo for PSTL.
4404         * doc/html/manual/status.html: Regenerate.
4406 2020-08-05  Jonathan Wakely  <jwakely@redhat.com>
4408         * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Export new symbols.
4409         * include/bits/istream.tcc (__istream_extract): New function
4410         template implementing both of operator>>(istream&, char*) and
4411         operator>>(istream&, char(&)[N]). Add explicit instantiation
4412         declaration for it. Remove explicit instantiation declarations
4413         for old function templates.
4414         * include/std/istream (__istream_extract): Declare.
4415         (operator>>(basic_istream<C,T>&, C*)): Define inline and simply
4416         call __istream_extract.
4417         (operator>>(basic_istream<char,T>&, signed char*)): Likewise.
4418         (operator>>(basic_istream<char,T>&, unsigned char*)): Likewise.
4419         (operator>>(basic_istream<C,T>&, C(7)[N])): Define for LWG 2499.
4420         (operator>>(basic_istream<char,T>&, signed char(&)[N])):
4421         Likewise.
4422         (operator>>(basic_istream<char,T>&, unsigned char(&)[N])):
4423         Likewise.
4424         * include/std/streambuf (basic_streambuf): Declare char overload
4425         of __istream_extract as a friend.
4426         * src/c++11/istream-inst.cc: Add explicit instantiation
4427         definition for wchar_t overload of __istream_extract. Remove
4428         explicit instantiation definitions of old operator>> overloads
4429         for versioned-namespace build.
4430         * src/c++98/istream.cc (operator>>(istream&, char*)): Replace
4431         with __istream_extract(istream&, char*, streamsize).
4432         * testsuite/27_io/basic_istream/extractors_character/char/3.cc:
4433         Do not use variable-length array.
4434         * testsuite/27_io/basic_istream/extractors_character/char/4.cc:
4435         Do not run test for C++20.
4436         * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
4437         Do not test writing to pointers for C++20.
4438         * testsuite/27_io/basic_istream/extractors_character/char/9826.cc:
4439         Use array instead of pointer.
4440         * testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc:
4441         Do not use variable-length array.
4442         * testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
4443         Do not run test for C++20.
4444         * testsuite/27_io/basic_istream/extractors_character/wchar_t/9555-ic.cc:
4445         Do not test writing to pointers for C++20.
4446         * testsuite/27_io/basic_istream/extractors_character/char/lwg2499.cc:
4447         New test.
4448         * testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
4449         New test.
4450         * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
4451         New test.
4452         * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
4453         New test.
4454         * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
4455         New test.
4457 2020-08-01  Gerald Pfeifer  <gerald@pfeifer.com>
4459         * doc/xml/manual/using_exceptions.xml: Move www.stroustrup.com to
4460         https.
4461         * doc/html/manual/using_exceptions.html: Regenerate.
4463 2020-07-31  Gerald Pfeifer  <gerald@pfeifer.com>
4465         * doc/xml/manual/status_cxx2017.xml: ParallelSTL is now part
4466         of oneAPI DPC++ Library on Github.
4467         * doc/html/manual/status.html: Regenerate.
4469 2020-07-31  François Dumont  <fdumont@gcc.gnu.org>
4471         * include/bits/stl_bvector.h
4472         [_GLIBCXX_INLINE_VERSION](_Bvector_impl_data::_M_start): Define as
4473         _Bit_type*.
4474         (_Bvector_impl_data(const _Bvector_impl_data&)): Default.
4475         (_Bvector_impl_data(_Bvector_impl_data&&)): Delegate to latter.
4476         (_Bvector_impl_data::operator=(const _Bvector_impl_data&)): Default.
4477         (_Bvector_impl_data::_M_move_data(_Bvector_impl_data&&)): Use latter.
4478         (_Bvector_impl_data::_M_reset()): Likewise.
4479         (_Bvector_impl_data::_M_swap_data): New.
4480         (_Bvector_impl::_Bvector_impl(_Bvector_impl&&)): Implement explicitely.
4481         (_Bvector_impl::_Bvector_impl(_Bit_alloc_type&&, _Bvector_impl&&)): New.
4482         (_Bvector_base::_Bvector_base(_Bvector_base&&, const allocator_type&)):
4483         New, use latter.
4484         (vector::vector(vector&&, const allocator_type&, true_type)): New, use
4485         latter.
4486         (vector::vector(vector&&, const allocator_type&, false_type)): New.
4487         (vector::vector(vector&&, const allocator_type&)): Use latters.
4488         (vector::vector(const vector&, const allocator_type&)): Adapt.
4489         [__cplusplus >= 201103](vector::vector(_InputIt, _InputIt,
4490         const allocator_type&)): Use _M_initialize_range.
4491         (vector::operator[](size_type)): Use iterator operator[].
4492         (vector::operator[](size_type) const): Use const_iterator operator[].
4493         (vector::swap(vector&)): Add assertions on allocators. Use _M_swap_data.
4494         [__cplusplus >= 201103](vector::insert(const_iterator, _InputIt,
4495         _InputIt)): Use _M_insert_range.
4496         (vector::_M_initialize(size_type)): Adapt.
4497         [__cplusplus >= 201103](vector::_M_initialize_dispatch): Remove.
4498         [__cplusplus >= 201103](vector::_M_insert_dispatch): Remove.
4499         * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Stop
4500         using start _M_offset.
4501         (StdVectorPrinter.to_string): Likewise.
4502         * testsuite/23_containers/vector/bool/allocator/swap.cc: Adapt.
4503         * testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc:
4504         Add check.
4506 2020-07-31  Jonathan Wakely  <jwakely@redhat.com>
4508         * testsuite/27_io/basic_istream/ignore/char/94749.cc: Use 0
4509         instead of nullptr.
4510         * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
4511         Likewise.
4513 2020-07-31  Jonathan Wakely  <jwakely@redhat.com>
4515         * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
4516         Move struct to namespace scope.
4518 2020-07-31  Jonathan Wakely  <jwakely@redhat.com>
4520         * testsuite/26_numerics/numbers/float128.cc: Check
4521         __STRICT_ANSI__ before using __float128.
4522         * testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc:
4523         Likewise.
4525 2020-07-31  Jonathan Wakely  <jwakely@redhat.com>
4527         * testsuite/18_support/set_terminate.cc: Require C++11 or
4528         higher.
4529         * testsuite/28_regex/simple_c++11.cc: Likewise.
4530         * testsuite/tr1/headers/c++200x/complex.cc: Likewise.
4531         * testsuite/24_iterators/headers/iterator/synopsis.cc:
4532         Require C++14 or lower.
4534 2020-07-31  Jonathan Wakely  <jwakely@redhat.com>
4536         * testsuite/23_containers/span/back_assert_neg.cc: Split c++2a
4537         effective-target from xfail selector.
4538         * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
4539         * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
4540         * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
4541         * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
4542         * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
4543         * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
4544         * testsuite/23_containers/span/subspan_2_assert_neg.cc:
4545         Likewise.
4546         * testsuite/23_containers/span/subspan_3_assert_neg.cc:
4547         Likewise.
4548         * testsuite/23_containers/span/subspan_4_assert_neg.cc:
4549         Likewise.
4550         * testsuite/23_containers/span/subspan_5_assert_neg.cc:
4551         Likewise.
4552         * testsuite/23_containers/span/subspan_6_assert_neg.cc:
4553         Likewise.
4554         * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
4556 2020-07-31  Jonathan Wakely  <jwakely@redhat.com>
4558         * testsuite/20_util/reference_wrapper/83427.cc: Adjust
4559         effective-target to specific language mode only.
4560         * testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
4561         Likewise.
4562         * testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
4563         Likewise.
4564         * testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
4565         Likewise.
4566         * testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
4567         Likewise.
4568         * testsuite/26_numerics/valarray/69116.cc:
4569         Likewise.
4570         * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
4571         Remove whitespace at end of file.
4572         * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
4573         Likewise.
4575 2020-07-31  Jonathan Wakely  <jwakely@redhat.com>
4577         * testsuite/17_intro/headers/c++2017/all_attributes.cc: Add
4578         c++17 effective-target.
4579         * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
4580         Likewise.
4581         * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: Likewise.
4582         * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
4583         Likewise.
4584         * testsuite/17_intro/headers/c++2017/operator_names.cc:
4585         Likewise.
4586         * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
4587         * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
4588         Likewise.
4589         * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
4590         Likewise.
4591         * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
4592         Likewise.
4593         * testsuite/20_util/any/assign/1.cc: Likewise.
4594         * testsuite/20_util/any/assign/2.cc: Likewise.
4595         * testsuite/20_util/any/assign/emplace.cc: Likewise.
4596         * testsuite/20_util/any/assign/exception.cc: Likewise.
4597         * testsuite/20_util/any/assign/self.cc: Likewise.
4598         * testsuite/20_util/any/cons/1.cc: Likewise.
4599         * testsuite/20_util/any/cons/2.cc: Likewise.
4600         * testsuite/20_util/any/cons/aligned.cc: Likewise.
4601         * testsuite/20_util/any/cons/explicit.cc: Likewise.
4602         * testsuite/20_util/any/cons/in_place.cc: Likewise.
4603         * testsuite/20_util/any/cons/nontrivial.cc: Likewise.
4604         * testsuite/20_util/any/make_any.cc: Likewise.
4605         * testsuite/20_util/any/misc/any_cast.cc: Likewise.
4606         * testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
4607         * testsuite/20_util/any/misc/swap.cc: Likewise.
4608         * testsuite/20_util/any/modifiers/1.cc: Likewise.
4609         * testsuite/20_util/any/observers/type.cc: Likewise.
4610         * testsuite/20_util/any/requirements.cc: Likewise.
4611         * testsuite/20_util/any/typedefs.cc: Likewise.
4612         * testsuite/20_util/as_const/1.cc: Likewise.
4613         * testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
4614         * testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
4615         * testsuite/20_util/bool_constant/requirements.cc: Likewise.
4616         * testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
4617         Likewise.
4618         * testsuite/20_util/duration_cast/rounding.cc: Likewise.
4619         * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
4620         Likewise.
4621         * testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
4622         * testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
4623         * testsuite/20_util/function_objects/searchers.cc: Likewise.
4624         * testsuite/20_util/in_place/requirements.cc: Likewise.
4625         * testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
4626         Likewise.
4627         * testsuite/20_util/is_invocable/requirements/typedefs.cc:
4628         Likewise.
4629         * testsuite/20_util/is_invocable/value.cc: Likewise.
4630         * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
4631         Likewise.
4632         * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc:
4633         Likewise.
4634         * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
4635         Likewise.
4636         * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
4637         Likewise.
4638         * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
4639         * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
4640         Likewise.
4641         * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
4642         Likewise.
4643         * testsuite/20_util/is_nothrow_swappable_with/value.cc:
4644         Likewise.
4645         * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
4646         Likewise.
4647         * testsuite/20_util/is_swappable/requirements/typedefs.cc:
4648         Likewise.
4649         * testsuite/20_util/is_swappable/value.cc: Likewise.
4650         * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
4651         Likewise.
4652         * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
4653         Likewise.
4654         * testsuite/20_util/is_swappable_with/value.cc: Likewise.
4655         * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
4656         Likewise.
4657         * testsuite/20_util/logical_traits/requirements/typedefs.cc:
4658         Likewise.
4659         * testsuite/20_util/logical_traits/value.cc: Likewise.
4660         * testsuite/20_util/optional/constexpr/make_optional.cc: Likewise.
4661         * testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
4662         * testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
4663         * testsuite/20_util/optional/hash.cc: Likewise.
4664         * testsuite/20_util/pair/swap_cxx17.cc: Likewise.
4665         * testsuite/20_util/ratio/requirements/ratio_equal_v.cc: Likewise.
4666         * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
4667         Likewise.
4668         * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
4669         Likewise.
4670         * testsuite/20_util/tuple/apply/1.cc: Likewise.
4671         * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
4672         * testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
4673         * testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
4674         * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
4675         Likewise.
4676         * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
4677         Likewise.
4678         * testsuite/20_util/variant/any.cc: Likewise.
4679         * testsuite/20_util/variant/compile.cc: Likewise.
4680         * testsuite/20_util/variant/hash.cc: Likewise.
4681         * testsuite/20_util/variant/index_type.cc: Likewise.
4682         * testsuite/20_util/variant/run.cc: Likewise.
4683         * testsuite/20_util/void_t/1.cc: Likewise.
4684         * testsuite/21_strings/basic_string/79162.cc: Likewise.
4685         * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
4686         * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
4687         * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
4688         * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
4689         * testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
4690         Likewise.
4691         * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
4692         Likewise.
4693         * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
4694         Likewise.
4695         * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
4696         Likewise.
4697         * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
4698         Likewise.
4699         * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
4700         Likewise.
4701         * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
4702         Likewise.
4703         * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
4704         Likewise.
4705         * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
4706         Likewise.
4707         * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
4708         Likewise.
4709         * testsuite/21_strings/basic_string/operations/data/char/2.cc:
4710         Likewise.
4711         * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
4712         Likewise.
4713         * testsuite/21_strings/basic_string/operations/find/char/5.cc:
4714         Likewise.
4715         * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
4716         Likewise.
4717         * testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
4718         * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
4719         Likewise.
4720         * testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise.
4721         * testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise.
4722         * testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise.
4723         * testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise.
4724         * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
4725         Likewise.
4726         * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
4727         Likewise.
4728         * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
4729         Likewise.
4730         * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
4731         Likewise.
4732         * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
4733         Likewise.
4734         * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
4735         Likewise.
4736         * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
4737         Likewise.
4738         * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
4739         Likewise.
4740         * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
4741         Likewise.
4742         * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
4743         Likewise.
4744         * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
4745         Likewise.
4746         * testsuite/21_strings/basic_string_view/include.cc: Likewise.
4747         * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
4748         Likewise.
4749         * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
4750         Likewise.
4751         * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
4752         Likewise.
4753         * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
4754         Likewise.
4755         * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
4756         Likewise.
4757         * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
4758         Likewise.
4759         * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
4760         Likewise.
4761         * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
4762         Likewise.
4763         * testsuite/21_strings/basic_string_view/literals/types.cc:
4764         Likewise.
4765         * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
4766         Likewise.
4767         * testsuite/21_strings/basic_string_view/literals/values.cc:
4768         Likewise.
4769         * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
4770         Likewise.
4771         * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
4772         Likewise.
4773         * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
4774         Likewise.
4775         * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
4776         Likewise.
4777         * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
4778         Likewise.
4779         * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
4780         Likewise.
4781         * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
4782         Likewise.
4783         * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
4784         Likewise.
4785         * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
4786         Likewise.
4787         * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
4788         Likewise.
4789         * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
4790         Likewise.
4791         * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
4792         Likewise.
4793         * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
4794         Likewise.
4795         * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
4796         Likewise.
4797         * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
4798         Likewise.
4799         * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
4800         Likewise.
4801         * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
4802         Likewise.
4803         * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
4804         Likewise.
4805         * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
4806         Likewise.
4807         * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
4808         Likewise.
4809         * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
4810         Likewise.
4811         * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
4812         Likewise.
4813         * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
4814         Likewise.
4815         * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
4816         Likewise.
4817         * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
4818         Likewise.
4819         * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
4820         Likewise.
4821         * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
4822         Likewise.
4823         * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
4824         Likewise.
4825         * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
4826         Likewise.
4827         * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
4828         Likewise.
4829         * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
4830         Likewise.
4831         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
4832         Likewise.
4833         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
4834         Likewise.
4835         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
4836         Likewise.
4837         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
4838         Likewise.
4839         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
4840         Likewise.
4841         * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
4842         Likewise.
4843         * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
4844         Likewise.
4845         * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
4846         * testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
4847         * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
4848         Likewise.
4849         * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
4850         * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
4851         Likewise.
4852         * testsuite/23_containers/map/modifiers/merge.cc: Likewise.
4853         * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
4854         * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
4855         * testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
4856         * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
4857         * testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
4858         * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
4859         * testsuite/23_containers/set/modifiers/merge.cc: Likewise.
4860         * testsuite/23_containers/unordered_map/modifiers/extract.cc:
4861         Likewise.
4862         * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
4863         Likewise.
4864         * testsuite/23_containers/unordered_map/modifiers/merge.cc:
4865         Likewise.
4866         * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
4867         Likewise.
4868         * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
4869         Likewise.
4870         * testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
4871         Likewise.
4872         * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
4873         Likewise.
4874         * testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
4875         Likewise.
4876         * testsuite/23_containers/unordered_set/modifiers/extract.cc:
4877         Likewise.
4878         * testsuite/23_containers/unordered_set/modifiers/merge.cc:
4879         Likewise.
4880         * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
4881         Likewise.
4882         * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
4883         Likewise.
4884         * testsuite/25_algorithms/clamp/1.cc: Likewise.
4885         * testsuite/25_algorithms/clamp/2.cc: Likewise.
4886         * testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
4887         * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
4888         Likewise.
4889         * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
4890         Likewise.
4891         * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
4892         Likewise.
4893         * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
4894         Likewise.
4895         * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
4896         Likewise.
4897         * testsuite/29_atomics/atomic/is_always_lock_free.cc: Likewise.
4898         * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
4899         Likewise.
4900         * testsuite/30_threads/shared_lock/70766.cc: Likewise.
4901         * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
4902         * testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
4903         Likewise.
4904         * testsuite/30_threads/shared_mutex/cons/copy_neg.cc:
4905         Likewise.
4906         * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
4907         Likewise.
4908         * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
4909         * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
4910         * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
4912 2020-07-31  Jonathan Wakely  <jwakely@redhat.com>
4914         PR libstdc++/96382
4915         * include/bits/stl_iterator.h (reverse_iterator): Friend
4916         declaration should not depend on __cplusplus.
4918 2020-07-31  Jonathan Wakely  <jwakely@redhat.com>
4920         * testsuite/experimental/filesystem/filesystem_error/cons.cc:
4921         Remove -std=gnu++17 option.
4923 2020-07-31  Jonathan Wakely  <jwakely@redhat.com>
4925         * testsuite/20_util/is_aggregate/value.cc: Adjust for changes to
4926         definition of aggregates in C++20.
4927         * testsuite/20_util/optional/requirements.cc: Adjust for
4928         defaulted comparisons in C++20.
4930 2020-07-31  Jonathan Wakely  <jwakely@redhat.com>
4932         * testsuite/20_util/tuple/78939.cc: Suppress warnings about
4933         deprecation of volatile-qualified structured bindings in C++20.
4934         * testsuite/20_util/variable_templates_for_traits.cc: Likewise
4935         for deprecation of is_pod in C++20
4937 2020-07-31  Jonathan Wakely  <jwakely@redhat.com>
4939         * testsuite/20_util/time_point_cast/rounding.cc: Remove
4940         duplicate dg-do directive and add c++17 effective target.
4942 2020-07-31  Jonathan Wakely  <jwakely@redhat.com>
4944         * src/c++17/floating_from_chars.cc (from_chars_impl): Use
4945         LC_ALL_MASK not LC_ALL.
4947 2020-07-31  Richard Biener  <rguenther@suse.de>
4949         PR debug/96383
4950         * testsuite/20_util/assume_aligned/3.cc: Use -g0.
4952 2020-07-30  Jonathan Wakely  <jwakely@redhat.com>
4954         * include/bits/basic_string.h (size_type, difference_type):
4955         Use allocator_traits to obtain the allocator's size_type and
4956         difference_type.
4958 2020-07-30  Jonathan Wakely  <jwakely@redhat.com>
4960         PR libstdc++/96279
4961         * src/c++17/floating_from_chars.cc (from_chars_impl): Use
4962         isinf unqualified.
4963         [!_GLIBCXX_USE_C99_STDLIB]: Use strtod for float and long
4964         double.
4966 2020-07-30  Jonathan Wakely  <jwakely@redhat.com>
4968         * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
4969         Use allocator with the correct value type.
4970         * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
4971         Likewise.
4973 2020-07-30  Jonathan Wakely  <jwakely@redhat.com>
4975         * testsuite/20_util/from_chars/4.cc: Pass non-const iterator
4976         to string::insert.
4978 2020-07-30  Jonathan Wakely  <jwakely@redhat.com>
4980         * include/bits/iterator_concepts.h (__detail::__cv_bool): New
4981         helper concept.
4982         (__detail::__integral_nonbool): Likewise.
4983         (__detail::__is_integer_like): Use __integral_nonbool.
4984         * testsuite/std/ranges/access/lwg3467.cc: New test.
4986 2020-07-30  Jonathan Wakely  <jwakely@redhat.com>
4988         * testsuite/20_util/from_chars/4.cc: Use dg-add-options ieee.
4989         * testsuite/29_atomics/atomic_float/1.cc: Likewise.
4991 2020-07-30  Jonathan Wakely  <jwakely@redhat.com>
4993         * testsuite/23_containers/vector/bool/72847.cc: Use the
4994         exceptions_enabled effective-target keyword instead of
4995         checking for an explicit -fno-exceptions option.
4996         * testsuite/util/testsuite_abi.cc (examine_symbol): Remove
4997         redundant try-catch.
4998         * testsuite/util/testsuite_allocator.h [!__cpp_exceptions]:
4999         Do not define check_allocate_max_size and memory_resource.
5000         * testsuite/util/testsuite_containers.h: Replace comment with
5001         #error if wrong standard dialect used.
5002         * testsuite/util/testsuite_shared.cc: Likewise.
5004 2020-07-29  François Dumont  <fdumont@gcc.gnu.org>
5006         * include/bits/hashtable_policy.h (_Node_iterator_base()): New.
5007         (operator==(const _Node_iterator_base&, const _Node_iterator_base&)):
5008         Make hidden friend.
5009         (operator!=(const _Node_iterator_base&, const _Node_iterator_base&)):
5010         Make hidden friend.
5011         (_Local_iterator_base<>): Inherits _Node_iterator_base.
5012         (_Local_iterator_base<>::_M_cur): Remove.
5013         (_Local_iterator_base<>::_M_curr()): Remove.
5014         (operator==(const _Local_iterator_base&, const _Local_iterator_base&)):
5015         Remove.
5016         (operator!=(const _Local_iterator_base&, const _Local_iterator_base&)):
5017         Remove.
5018         * include/debug/unordered_map (unordered_map<>::_M_invalidate): Adapt.
5019         (unordered_multimap<>::_M_invalidate): Adapt.
5020         * include/debug/unordered_set (unordered_set<>::_M_invalidate): Adapt.
5021         (unordered_multiset<>::_M_invalidate): Adapt.
5023 2020-07-29  David Edelsohn  <dje.gcc@gmail.com>
5024             Jonathan Wakely  <jwakely@redhat.com>
5025             Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
5027         * testsuite/lib/dg-options.exp (add_options_for_libatomic): Add
5028         target powerpc-ibm-aix* and powerpc*-*-darwin*.
5029         * testsuite/29_atomics/atomic_float/value_init.cc: Add options
5030         for libatomic.
5032 2020-07-29  François Dumont  <fdumont@gcc.gnu.org>
5034         * include/bits/hashtable.h
5035         (_Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type)):
5036         Add noexcept qualification.
5037         (_Hashtable(_Hashtable&&)): Fix noexcept qualification.
5038         (_Hashtable(_Hashtable&&, const allocator_type&)): Add noexcept
5039         qualification.
5040         * include/bits/unordered_map.h
5041         (unordered_map(unordered_map&&, const allocator_type&)): Add noexcept
5042         qualification.
5043         (unordered_multimap(unordered_multimap&&, const allocator_type&)):
5044         Likewise.
5045         * include/bits/unordered_set.h
5046         (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
5047         (unordered_multiset(unordered_multiset&&, const allocator_type&)):
5048         Likewise.
5049         * include/debug/unordered_map
5050         (unordered_map(unordered_map&&, const allocator_type&)): Likewise.
5051         (unordered_multimap(unordered_multimap&&, const allocator_type&)):
5052         Likewise.
5053         * include/debug/unordered_set
5054         (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
5055         (unordered_multiset(unordered_multiset&&, const allocator_type&)):
5056         Likewise.
5057         * testsuite/23_containers/unordered_map/allocator/default_init.cc:
5058         New test.
5059         * testsuite/23_containers/unordered_map/cons/noexcept_default_construct.cc:
5060         New test.
5061         * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
5062         New test.
5063         * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
5064         New test.
5065         * testsuite/23_containers/unordered_multimap/cons/noexcept_default_construct.cc:
5066         New test.
5067         * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
5068         New test.
5069         * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
5070         New test.
5071         * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
5072         New test.
5073         * testsuite/23_containers/unordered_set/allocator/default_init.cc:
5074         New test.
5075         * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
5076         New test.
5077         * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
5078         New test.
5080 2020-07-28  François Dumont  <fdumont@gcc.gnu.org>
5082         * include/bits/hashtable.h
5083         (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
5084         const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
5085         const allocator_type&, true_type)): New.
5086         (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
5087         const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
5088         const allocator_type&, false_type)): New.
5089         (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
5090         const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
5091         const allocator_type&)): Delegate to latters.
5092         (operator=(initializer_list<value_type>)): Rehash if too small.
5093         (_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Remove
5094         size_t len parameter.
5095         * include/bits/hashtable_policy.h (_Insert_base<>::_M_insert_range):
5096         Do not try to get input range distance.
5097         * testsuite/23_containers/unordered_set/cons/bucket_hint.cc: New test.
5098         * testsuite/23_containers/unordered_set/modifiers/insert.cc: New test.
5100 2020-07-27  François Dumont  <fdumont@gcc.gnu.org>
5102         * include/bits/hashtable_policy.h (_Map_base<>::at): Use
5103         _Hashtable<>::find.
5104         (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals):New.
5105         (_Hashtable_base<>::_M_node_equals): New, use latter.
5106         (_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash,
5107         _RehashPolicy, false>::_M_equal): Adapt to use latter.
5108         * include/bits/hashtable.h (_Hashtable<>::_M_update_bbegin): New.
5109         (_Hashtable<>::_M_assign): Use latter.
5110         (_Hashtable<>::_M_move_assign): Likewise.
5111         (_Hashtable<>(_Hashtable<>&&)): Likewise.
5112         (_Hashtable<>(_Hashtable<>&&, const allocator_type&)): Likewise.
5113         (_Hashtable<>::swap): Likewise.
5114         (_Hashtable<>::find): Build iterator directly from _M_find_node result.
5115         (_Hashtable<>::count): Use _Hashtable<>::find.
5116         (_Hashtable<>::equal_range): Likewise.
5117         (_Hashtable<>::_M_erase(false_type, const key_type&)): Use
5118         _M_node_equals.
5120 2020-07-27  Jonathan Wakely  <jwakely@redhat.com>
5122         * src/c++17/floating_from_chars.cc (from_chars_impl): Ensure
5123         that FE_NEAREST is used.
5124         * testsuite/20_util/from_chars/4.cc: Do not use if constexpr in
5125         a { target c++14 } test.
5126         [!_GLIBCXX_HAVE_USELOCALE]: Disable all tests.
5127         * testsuite/20_util/from_chars/5.cc [!_GLIBCXX_HAVE_USELOCALE]:
5128         Likewise.
5129         * testsuite/20_util/from_chars/6.cc: New test.
5131 2020-07-22  Jonathan Wakely  <jwakely@redhat.com>
5133         * include/std/future (future, shared_future, promise): Add
5134         static assertions to the primary template to reject array and
5135         function types.
5136         * testsuite/30_threads/future/requirements/lwg3458.cc: New test.
5137         * testsuite/30_threads/promise/requirements/lwg3466.cc: New test.
5138         * testsuite/30_threads/shared_future/requirements/lwg3458.cc: New test.
5140 2020-07-22  Jonathan Wakely  <jwakely@redhat.com>
5142         * include/bits/stl_iterator.h (reverse_iterator): Constrain
5143         converting constructor and converting assignment operator.
5144         Access source iterator's data member directly instead of
5145         calling base().
5146         (move_iterator): Likewise.
5147         * testsuite/24_iterators/move_iterator/dr3435.cc: New test.
5148         * testsuite/24_iterators/reverse_iterator/dr3435.cc: New test.
5150 2020-07-20  Jonathan Wakely  <jwakely@redhat.com>
5152         * acinclude.m4 (libtool_VERSION): Bump version.
5153         * config.h.in: Regenerate.
5154         * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.29 version and new
5155         exports.
5156         * config/os/gnu-linux/ldbl-extra.ver: Add _GLIBCXX_LDBL_3.4.29
5157         version and new export.
5158         * configure: Regenerate.
5159         * configure.ac: Check for <xlocale.h> and uselocale.
5160         * crossconfig.m4: Add macro or checks for uselocale.
5161         * include/std/charconv (from_chars): Declare overloads for
5162         float, double, and long double.
5163         * src/c++17/Makefile.am: Add new file.
5164         * src/c++17/Makefile.in: Regenerate.
5165         * src/c++17/floating_from_chars.cc: New file.
5166         (from_chars): Define for float, double, and long double.
5167         * testsuite/20_util/from_chars/1_c++20_neg.cc: Prune extra
5168         diagnostics caused by new overloads.
5169         * testsuite/20_util/from_chars/1_neg.cc: Likewise.
5170         * testsuite/20_util/from_chars/2.cc: Check leading '+'.
5171         * testsuite/20_util/from_chars/4.cc: New test.
5172         * testsuite/20_util/from_chars/5.cc: New test.
5173         * testsuite/util/testsuite_abi.cc: Add new symbol versions.
5175 2020-07-20  Jonathan Wakely  <jwakely@redhat.com>
5177         * include/bits/istream.tcc
5178         (basic_istream::get(__streambuf_type&, char_type): Use unsigned
5179         long long for counter and check if it would overflow _M_gcount.
5180         * testsuite/27_io/basic_istream/get/char/lwg3464.cc: New test.
5181         * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: New test.
5183 2020-07-17  Iain Sandoe  <iain@sandoe.co.uk>
5185         * include/std/coroutine: Mark the methods of the
5186         trivial awaitables as constexpr.
5188 2020-07-14  David Edelsohn  <dje.gcc@gmail.com>
5190         * config/os/aix/t-aix: Set BITS from compiler cpp macro.
5192 2020-07-13  Jonathan Wakely  <jwakely@redhat.com>
5194         PR libstdc++/94749
5195         PR libstdc++/96161
5196         * include/bits/istream.tcc (basic_istream::ignore(streamsize))
5197         [n == max]: Check overflow conditions on _M_gcount. Rely on
5198         the fact that either EOF or the delimiter was reached.
5199         [n < max]: Check _M_gcount < n before checking for EOF or
5200         delimiter.
5201         (basic_istream::ignore(streamsize, char_type): Likewise.
5202         * src/c++98/compatibility.cc (istream::ignore(streamsize))
5203         (wistream::ignore(streamsize)): Likewise.
5204         * src/c++98/istream.cc (istream::ignore(streamsize, char_type))
5205         (wistream::ignore(streamsize, char_type)): Likewise.
5206         * testsuite/27_io/basic_istream/ignore/char/94749.cc: Check that
5207         delimiter is discarded if the number of characters ignored
5208         doesn't fit in streamsize.
5209         * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
5210         Likewise.
5211         * testsuite/27_io/basic_istream/ignore/char/96161.cc: New test.
5212         * testsuite/27_io/basic_istream/ignore/wchar_t/96161.cc: New test.
5214 2020-07-08  François Dumont  <fdumont@gcc.gnu.org>
5216         * include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&)): Add noexcept
5217         qualification based only on _Compare one.
5218         * testsuite/23_containers/map/cons/noexcept_move_construct.cc: Add
5219         static asserts.
5220         * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
5221         Likewise.
5222         * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
5223         Likewise.
5224         * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
5226 2020-07-07  Jonathan Wakely  <jwakely@redhat.com>
5228         * include/std/limits: Whitespace changes.
5230 2020-07-07  Jonathan Wakely  <jwakely@redhat.com>
5232         * include/Makefile.am: Remove bits/int_limits.h.
5233         * include/Makefile.in: Regenerate.
5234         * include/bits/int_limits.h: Removed.
5235         * include/bits/parse_numbers.h (_Select_int_base): Replace
5236         __int_limits with __int_traits.
5237         * include/bits/range_access.h (_SSize::operator()): Likewise.
5238         * include/ext/numeric_traits.h (__numeric_traits_integer): Add
5239         static assertion.
5240         (__int_traits): New alias template.
5241         * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
5242         (__countr_zero, __countr_one, __popcount, __bit_ceil)
5243         (__bit_floor, __bit_width) Replace __int_limits with
5244         __int_traits.
5245         * include/std/charconv (__to_chars_8, __from_chars_binary)
5246         (__from_chars_alpha_to_num, from_chars): Likewise.
5247         * include/std/memory_resource (polymorphic_allocator::allocate)
5248         (polymorphic_allocator::allocate_object): Likewise.
5249         * include/std/string_view (basic_string_view::_S_compare):
5250         Likewise.
5251         * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
5253 2020-07-07  Jonathan Wakely  <jwakely@redhat.com>
5255         * include/std/limits: Whitespace changes.
5257 2020-07-06  Jonathan Wakely  <jwakely@redhat.com>
5259         * include/std/optional (_Optional_payload_base, _Optional_base)
5260         (optional, __optional_hash_call_base): Adjust whitespace and
5261         other formatting. Remove redundant && tokens on template
5262         arguments to type traits.
5264 2020-07-06  Jonathan Wakely  <jwakely@redhat.com>
5266         * include/std/optional (make_optional): Add enable_if
5267         constraints and noexcept-specifier to each overload.
5268         * testsuite/20_util/optional/make_optional-2.cc: New test.
5270 2020-07-06  Jonathan Wakely  <jwakely@redhat.com>
5272         PR libstdc++/96036
5273         * include/std/optional (optional): Add noexcept-specifier to
5274         every constructor, assignment operator, emplace function and
5275         dereference operator.
5276         * testsuite/20_util/optional/assignment/noexcept.cc: New test.
5277         * testsuite/20_util/optional/cons/noexcept.cc: New test.
5279 2020-07-06  Jonathan Wakely  <jwakely@redhat.com>
5281         PR libstdc++/96063
5282         * include/bits/fs_dir.h: Use consistent tag in class-head.
5283         * include/bits/localefwd.h: Likewise.
5284         * include/bits/regex.h: Likewise.
5285         * include/bits/stl_map.h: Likewise.
5286         * include/bits/stl_multimap.h: Likewise.
5287         * include/bits/stl_multiset.h: Likewise.
5288         * include/bits/stl_set.h: Likewise.
5289         * include/std/complex: Likewise.
5290         * include/std/functional: Likewise.
5291         * include/std/future: Likewise.
5292         * include/std/system_error: Likewise.
5293         * include/std/thread: Likewise.
5294         * include/std/tuple: Likewise.
5295         * include/std/type_traits: Likewise.
5296         * include/std/valarray: Likewise.
5298 2020-07-02  Jonathan Wakely  <jwakely@redhat.com>
5300         * testsuite/27_io/basic_ios/conv/voidptr.cc: Add c++98_only
5301         target selector.
5303 2020-07-02  Jonathan Wakely  <jwakely@redhat.com>
5305         * testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: Add
5306         c++98_only target selector.
5307         * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc:
5308         Likewise.
5309         * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc:
5310         Likewise.
5311         * testsuite/18_support/headers/new/synopsis_cxx98.cc: Likewise.
5312         * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc:
5313         Likewise.
5314         * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc:
5315         Likewise.
5316         * testsuite/23_containers/headers/array/std_c++0x_neg.cc:
5317         Likewise.
5318         * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc:
5319         Likewise.
5320         * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
5321         Likewise.
5322         * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
5323         Likewise.
5324         * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc:
5325         Likewise.
5326         * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc:
5327         Likewise.
5328         * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++98.cc:
5329         Likewise.
5330         * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc:
5331         Likewise.
5332         * testsuite/26_numerics/headers/random/std_c++0x_neg.cc:
5333         Likewise.
5334         * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Likewise.
5335         * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Likewise.
5336         * testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc:
5337         Likewise.
5338         * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
5339         Likewise.
5340         * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
5341         Likewise.
5342         * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: Likewise.
5343         * testsuite/30_threads/headers/thread/std_c++0x_neg.cc:
5344         Likewise.
5346 2020-07-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
5348         PR libstdc++/91807
5349         * include/std/variant
5350         (_Copy_assign_base::operator=(const _Copy_assign_base&):
5351         Do the move-assignment from a temporary so that the temporary
5352         is constructed with an explicit index.
5353         * testsuite/20_util/variant/91807.cc: New.
5355 2020-07-02  Jonathan Wakely  <jwakely.gcc@gmail.com>
5357         PR libstdc++/91153
5358         PR target/93224
5359         * testsuite/29_atomics/atomic_float/1.cc: Use different values
5360         for tests.
5361         * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
5363 2020-07-01  Jonathan Wakely  <jwakely@redhat.com>
5365         PR libstdc++/94627
5366         * include/bits/regex.h (operator==, operator!=): Remove noexcept
5367         equality comparisons for match_results.
5368         * testsuite/28_regex/match_results/94627.cc: New test.
5370 2020-07-01  Martin Sebor  <msebor@redhat.com>
5372         * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Adjust
5373         text of expected warning.
5374         * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Same.
5375         * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc: Same.
5376         * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc: Same.
5377         * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc: Same.
5379 2020-06-29  Ville Voutilainen  <ville.voutilainen@gmail.com>
5381         Revert:
5382         2020-06-28  Ville Voutilainen  <ville.voutilainen@gmail.com>
5384         * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
5385         Add a __nonnull__ attribute.
5386         * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
5387         * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
5389 2020-06-28  Ville Voutilainen  <ville.voutilainen@gmail.com>
5391         * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
5392         Add a __nonnull__ attribute.
5393         * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
5394         * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
5396 2020-06-28  Ville Voutilainen  <ville.voutilainen@gmail.com>
5398         PR libstdc++/95915
5399         * include/std/type_traits (is_literal_type, is_literal_type_v):
5400         Deprecate in C++17.
5401         * include/std/variant (_Uninitialized):
5402         Adjust the condition and the comment.
5403         * testsuite/20_util/is_literal_type/deprecated-1z.cc: New.
5404         * testsuite/20_util/is_literal_type/requirements/explicit_instantiation.cc:
5405         Adjust.
5406         * testsuite/20_util/is_literal_type/requirements/typedefs.cc: Likewise.
5407         * testsuite/20_util/is_literal_type/value.cc: Likewise.
5408         * testsuite/20_util/optional/constexpr/nullopt.cc:
5409         Use __is_literal_type directly.
5410         * testsuite/20_util/optional/nullopt.cc: Likewise.
5411         * testsuite/20_util/variable_templates_for_traits.cc: Adjust.
5412         * testsuite/20_util/variant/95915.cc: New.
5413         * testsuite/20_util/variant/compile.cc: Add new test.
5414         * testsuite/experimental/optional/constexpr/nullopt.cc:
5415         Use __is_literal_type directly.
5416         * testsuite/experimental/optional/nullopt.cc: Likewise.
5417         * testsuite/experimental/type_traits/value.cc: Adjust.
5418         * testsuite/util/testsuite_common_types.h:
5419         Use __is_literal_type directly.
5421 2020-06-24  Jonathan Wakely  <jwakely@redhat.com>
5423         * include/std/charconv (__from_chars_binary): Ignore leading zeros.
5424         * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
5425         not just 10 and 16.
5426         * testsuite/20_util/from_chars/3.cc: New test.
5428 2020-06-24  Jonathan Wakely  <jwakely@redhat.com>
5430         * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
5431         * include/std/charconv (__detail::__to_chars): Avoid
5432         -Wsign-compare warning.
5434 2020-06-24  Jonathan Wakely  <jwakely@redhat.com>
5436         PR libstdc++/95851
5437         * include/std/charconv (__to_chars_i): Check for zero-sized
5438         buffer unconditionally.
5439         * testsuite/20_util/to_chars/95851.cc: New test.
5441 2020-06-23  Jonathan Wakely  <jwakely@redhat.com>
5443         * testsuite/20_util/from_chars/1_c++20_neg.cc: Check enumeration
5444         type.
5445         * testsuite/20_util/from_chars/1_neg.cc: Likewise. Move dg-error
5446         directives outside preprocessor condition.
5448 2020-06-23  Jonathan Wakely  <jwakely@redhat.com>
5450         PR libstdc++/95832
5451         * include/std/variant (__detail::__variant::_Build_FUN): Remove
5452         partial specialization to prevent narrowing conversions to bool.
5453         * testsuite/20_util/variant/compile.cc: Test non-narrowing
5454         conversions to bool.
5455         * testsuite/20_util/variant/run.cc: Likewise.
5457 2020-06-23  Jonathan Wakely  <jwakely@redhat.com>
5459         * doc/Makefile.in: Regenerate.
5460         * include/Makefile.in: Regenerate.
5461         * libsupc++/Makefile.in: Regenerate.
5462         * po/Makefile.in: Regenerate.
5463         * python/Makefile.in: Regenerate.
5464         * src/Makefile.in: Regenerate.
5465         * src/c++11/Makefile.in: Regenerate.
5466         * src/c++17/Makefile.in: Regenerate.
5467         * src/c++98/Makefile.in: Regenerate.
5468         * src/filesystem/Makefile.in: Regenerate.
5469         * testsuite/Makefile.in: Regenerate.
5471 2020-06-22  David Edelsohn  <dje.gcc@gmail.com>
5473         * Makefile.am: Use -include.
5474         * Makefile.in: Regenerate.
5476 2020-06-21  David Edelsohn  <dje.gcc@gmail.com>
5478         * Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
5479         * Makefile.in: Regenerate.
5480         * configure.ac (tmake_file): Substitute.
5481         * configure: Regenerate.
5482         * configure.host (aix*): Define tmake_file.
5483         * config/os/aix/t-aix: New file.
5485 2020-06-20  Jason Merrill  <jason@redhat.com>
5487         * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
5488         Remove greedy_ops tests.
5489         * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
5490         Remove greedy_ops tests.
5492 2020-06-19  Jonathan Wakely  <jwakely@redhat.com>
5494         PR libstdc++/95765
5495         * include/bits/stl_algobase.h (__size_to_integer(float))
5496         (__size_to_integer(double), __size_to_integer(long double))
5497         (__size_to_integer(__float128)): Cast return type explicitly.
5498         * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
5499         Remove unused typedef.
5501 2020-06-19  Jonathan Wakely  <jwakely@redhat.com>
5503         * include/bits/stl_pair.h (_Index_tuple): Remove redundant
5504         namespace qualification.
5505         (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
5506         Likewise.
5507         * include/std/tuple (_Head_base, _Tuple_impl, tuple_size)
5508         (tuple_element, __get_helper, get, __make_tuple_impl)
5509         (__make_1st_indices, __tuple_concater)
5510         (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
5511         Likewise.
5512         * include/std/utility (tuple_element, __is_tuple_like_impl)
5513         (tuple_size, __pair_get, get): Likewise.
5515 2020-06-19  Jonathan Wakely  <jwakely@redhat.com>
5517         * include/bits/std_function.h (function): Define all member
5518         functions inline.
5520 2020-06-19  Marc Glisse  <marc.glisse@inria.fr>
5522         * include/bits/stl_algo.h (__includes): Simplify the code.
5524 2020-06-19  Marc Glisse  <marc.glisse@inria.fr>
5526         * include/std/optional (optional()): Explicitly define it.
5528 2020-06-17  Jonathan Wakely  <jwakely@redhat.com>
5530         PR libstdc++/94540
5531         * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
5532         Construct the first value at *__first instead of on the stack.
5533         (__uninitialized_default_n_1<true>): Likewise.
5534         Improve comments on several of the non-standard algorithms.
5535         * testsuite/20_util/specialized_algorithms/uninitialized_default/94540.cc:
5536         New test.
5537         * testsuite/20_util/specialized_algorithms/uninitialized_default_n/94540.cc:
5538         New test.
5539         * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
5540         New test.
5541         * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
5542         New test.
5543         * testsuite/23_containers/vector/cons/94540.cc: New test.
5545 2020-06-17  Jonathan Wakely  <jwakely@redhat.com>
5547         * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
5548         Replace Value type with int so trivial code path is used.
5549         * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
5550         Likewise.
5552 2020-06-17  Jonathan Wakely  <jwakely@redhat.com>
5554         * include/bits/stl_uninitialized.h (uninitialized_fill_n): Only
5555         use std::fill_n when the size is an integral type.
5556         (__uninitialized_default_n): Likewise.
5557         * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
5558         New test.
5559         * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
5560         New test.
5561         * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
5562         New test.
5564 2020-06-16  Jonathan Wakely  <jwakely@redhat.com>
5566         PR libstdc++/95282
5567         * include/bits/atomic_base.h (__atomic_impl::load): Use the _Val
5568         alias instead of deducing _Tp as an unqualified type.
5569         (__atomic_impl::exchange): Use the _Val alias to remove volatile
5570         from the reinterpret_cast result type.
5572 2020-06-16  Jonathan Wakely  <jwakely@redhat.com>
5574         * include/std/atomic (atomic): Add static assertions.
5575         * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
5577 2020-06-16  Patrick Palka  <ppalka@redhat.com>
5579         PR libstdc++/94003
5580         * testsuite/20_util/is_constructible/94003.cc: New test.
5582 2020-06-15  Jonathan Wakely  <jwakely@redhat.com>
5584         * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
5585         Update value for C++20.
5586         * include/std/version (__cpp_lib_constexpr_char_traits): Likewise.
5587         * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
5588         Update expected value.
5589         * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
5590         Likewise.
5592 2020-06-15  Paul Keir  <paul.keir@uws.ac.uk>
5594         * include/bits/char_traits.h (char_traits::move): constexpr move with
5595         overlap was using copy_backward incorrectly.
5596         * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
5597         New test.
5599 2020-06-12  Jonathan Wakely  <jwakely@redhat.com>
5601         * testsuite/29_atomics/atomic_flag/clear/1.cc: Also test clear()
5602         when the value is currently set.
5603         * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc:
5604         Actually check the return value.
5605         * testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc:
5606         Likewise.
5608 2020-06-12  Jonathan Wakely  <jwakely@redhat.com>
5610         * include/bits/atomic_base.h (atomic_flag::test): Add missing
5611         const qualifiers.
5612         * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
5613         dg-options and verify results of test function.
5614         * testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
5616 2020-06-11  Jonathan Wakely  <jwakely@redhat.com>
5618         PR libstdc++/94749
5619         * include/bits/istream.tcc (basic_istream::ignore(streamsize, CharT)):
5620         Only discard an extra character if we didn't already reach the
5621         maximum number.
5622         * src/c++98/istream.cc (istream::ignore(streamsiz, char))
5623         (wistream::ignore(streamsize, wchar_t)): Likewise.
5624         * testsuite/27_io/basic_istream/ignore/char/94749.cc: New test.
5625         * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc: New test.
5627 2020-06-10  Patrick Palka  <ppalka@redhat.com>
5629         PR libstdc++/95578
5630         * include/bits/ranges_algo.h (__lexicographical_compare_fn):
5631         Also check that the iterator and sentinel have the same type before
5632         applying the unwrapping optimization for __normal_iterator.
5633         Split the check into two, one for the first iterator/sentinel
5634         pair and another for second iterator/sentinel pair.  Remove uses
5635         of __niter_base, and remove uses of std::move on a
5636         __normal_iterator.
5637         * include/bits/ranges_algobase.h (__equal_fn): Likewise.
5638         (__copy_or_move): Likewise.  Perform similar adjustments for
5639         the reverse_iterator and move_iterator optimizations.  Inline
5640         the checks into the if-constexprs, and use using-declarations to
5641         make them less visually noisy.  Remove uses of __niter_wrap.
5642         (__copy_or_move_backward): Likewise.
5643         * testsuite/25_algorithms/copy/95578.cc: New test.
5644         * testsuite/25_algorithms/copy_backward/95578.cc: New test.
5645         * testsuite/25_algorithms/equal/95578.cc: New test.
5646         * testsuite/25_algorithms/lexicographical_compare/95578.cc: New test.
5647         * testsuite/25_algorithms/move/95578.cc: New test.
5648         * testsuite/25_algorithms/move_backward/95578.cc: New test.
5650 2020-06-10  François Dumont  <fdumont@gcc.gnu.org>
5651             Jonathan Wakely  <jwakely@redhat.com>
5653         * include/bits/deque.tcc (__lex_cmp_dit): New.
5654         (__lexicographical_compare_aux1): Define overloads for deque
5655         iterators.
5656         * include/bits/stl_algobase.h (__lexicographical_compare::__3way):
5657         New static member function.
5658         (__lexicographical_compare<true>::__3way): Likewise.
5659         (__lexicographical_compare<true>::__lc): Use __3way.
5660         (__lexicographical_compare_aux): Rename to
5661         __lexicographical_compare_aux1 and declare overloads for deque
5662         iterators.
5663         (__lexicographical_compare_aux): Define new forwarding function
5664         that calls __lexicographical_compare_aux1 and declare new overloads
5665         for safe iterators.
5666         (lexicographical_compare): Do not use __niter_base on
5667         parameters.
5668         * include/debug/safe_iterator.tcc
5669         (__lexicographical_compare_aux): Define overloads for safe
5670         iterators.
5671         * testsuite/25_algorithms/lexicographical_compare/1.cc: Add
5672         checks with random access iterators.
5673         * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
5674         New test.
5676 2020-06-09  Jonathan Wakely  <jwakely@redhat.com>
5678         * include/bits/stl_iterator.h (move_iterator::operator=): Define.
5679         * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
5681 2020-06-09  Jonathan Wakely  <jwakely@redhat.com>
5683         * include/std/optional (bad_optional_access): Define default
5684         constructor and destructor as defaulted.
5685         * testsuite/20_util/optional/bad_access.cc: New test.
5687 2020-06-08  Jonathan Wakely  <jwakely@redhat.com>
5689         * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
5690         line number.
5691         * testsuite/20_util/default_delete/void_neg.cc: Likewise.
5693 2020-06-08  Jonathan Wakely  <jwakely@redhat.com>
5695         * include/bits/unique_ptr.h (operator<<): Define for C++20.
5696         * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
5698 2020-06-04  Jonathan Wakely  <jwakely@redhat.com>
5700         * include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
5701         (__detail::__cat, __detail::__diff): Move to class scope in the
5702         relevant __iterator_traits specializations.
5703         (__iterator_traits<>): Use nested class templates instead of ones from
5704         namespace __detail.
5705         * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
5706         class scope in iterator_traits<common_iterator<I, S>>.
5707         (iterator_traits<common_iterator<I, S>>): Use nested class template
5708         instead of __detail::__common_iter_ptr.
5710 2020-06-04  François Dumont  <fdumont@gcc.gnu.org>
5712         * include/bits/stl_algo.h (__copy_n_a): Move to ...
5713         * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict
5714         parameter.
5715         (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
5716         Declare.
5717         (__niter_base(const _Safe_iterator<_Ite, _Seq,
5718         random_access_iterator_tag>&)): Declare.
5719         (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
5720         _Deque_iterator<>)): Declare.
5721         * include/bits/deque.tcc
5722         (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
5723         _Deque_iterator<>)): New.
5724         (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
5725         New.
5726         * include/bits/streambuf_iterator.h
5727         (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*, bool)): Adapt.
5728         * include/debug/safe_iterator.tcc (__niter_base): New.
5729         * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
5730         (test03): New.
5731         * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc:
5732         New test.
5733         * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:
5734         New test.
5735         * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New test.
5736         * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc:
5737         New test.
5739 2020-06-04  Jonathan Wakely  <jwakely@redhat.com>
5741         * include/bits/ranges_algobase.h (__copy_n_fn): Only call
5742         ranges::copy for positive values.
5743         * include/bits/stl_algo.h (copy_n): Convert Size argument to an
5744         integral type and only call __copy_n for positive values.
5745         * testsuite/util/testsuite_iterators.h
5746         (random_access_iterator_wrapper::operator+=): Fix range check for
5747         negative values.
5748         (output_container, input_container, forward_container)
5749         (bidirectional_container, random_access_container): New alias
5750         templates.
5751         * testsuite/25_algorithms/copy_n/5.cc: New test.
5753 2020-06-02  Jonathan Wakely  <jwakely@redhat.com>
5755         PR libstdc++/90102
5756         * include/debug/deque (deque(const _Base&)): Replace parameter
5757         with a struct that wraps a const _Base&.
5758         * include/debug/forward_list (forward_list(_Base_ref)): New
5759         constructor.
5760         * include/debug/list (list(const _Base&)): Replace parameter
5761         with a struct that wraps a const _Base&.
5762         * include/debug/map.h (map(const _Base&)): Likewise.
5763         * include/debug/multimap.h (multimap(const _Base&)): Likewise.
5764         * include/debug/multiset.h (multiset(const _Base&)): Likewise.
5765         * include/debug/set.h (set(const _Base&)): Likewise.
5766         * include/debug/unordered_map (unordered_map(const _Base&))
5767         (unordered_multimap(const _Base&)): Likewise.
5768         * include/debug/unordered_set (unordered_set(const _Base&))
5769         (unordered_multiset(const _Base&)): Likewise.
5770         * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
5771         Adjust dg-error line number.
5772         * include/debug/vector (vector(const _Base&)): Likewise.
5773         * testsuite/23_containers/deque/debug/90102.cc: New test.
5774         * testsuite/23_containers/forward_list/debug/90102.cc: New test.
5775         * testsuite/23_containers/list/debug/90102.cc: New test.
5776         * testsuite/23_containers/map/debug/90102.cc: New test.
5777         * testsuite/23_containers/multimap/debug/90102.cc: New test.
5778         * testsuite/23_containers/multiset/debug/90102.cc: New test.
5779         * testsuite/23_containers/set/debug/90102.cc: New test.
5780         * testsuite/23_containers/unordered_map/debug/90102.cc: New test.
5781         * testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
5782         * testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
5783         * testsuite/23_containers/unordered_set/debug/90102.cc: New test.
5784         * testsuite/23_containers/vector/debug/90102.cc: New test.
5786 2020-06-01  Jonathan Wakely  <jwakely@redhat.com>
5788         PR libstdc++/95392
5789         * include/bits/fs_path.h (path::_S_to_string): Move to
5790         namespace-scope and rename to ...
5791         (__detail::__string_from_range): ... this.
5792         [WINDOWS] (__detail::__wstr_from_utf8): New function template to
5793         convert a char sequence containing UTF-8 to wstring.
5794         (path::_S_convert(Iter, Iter)): Adjust call to _S_to_string.
5795         (path::_S_convert_loc(Iter, Iter, const locale&)): Likewise.
5796         (u8path(InputIterator, InputIterator)) [WINDOWS]: Use
5797         __string_from_range to obtain a contiguous range and
5798         __wstr_from_utf8 to obtain a wide string.
5799         (u8path(const Source&)) [WINDOWS]: Use __effective_range to
5800         obtain a contiguous range and __wstr_from_utf8 to obtain a wide
5801         string.
5802         (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
5803         Use __wstr_from_utf8.
5805 2020-06-01  Jonathan Wakely  <jwakely@redhat.com>
5807         * testsuite/util/testsuite_iterators.h:
5808         (input_iterator_wrapper::operator++(int)): Return proxy object.
5810 2020-06-01  Jonathan Wakely  <jwakely@redhat.com>
5812         * doc/xml/manual/evolution.xml: Document deprecation of
5813         __is_nullptr_t and removal of std::allocator members.
5814         * doc/html/manual/api.html: Regenerate.
5816 2020-06-01  Jonathan Wakely  <jwakely@redhat.com>
5818         * doc/xml/manual/containers.xml: Replace <xref> with <link>.
5819         * doc/xml/manual/evolution.xml: Likewise.
5820         * doc/html/manual/api.html: Regenerate.
5821         * doc/html/manual/containers.html: Regenerate.
5823 2020-06-01  Gerald Pfeifer  <gerald@pfeifer.com>
5825         * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
5826         * doc/html/faq.html: Regenerate.
5828 2020-06-01  Gerald Pfeifer  <gerald@pfeifer.com>
5830         * doc/xml/manual/policy_data_structures_biblio.xml: Remove
5831         stray change.
5833 2020-06-01  Gerald Pfeifer  <gerald@pfeifer.com>
5835         * doc/xml/manual/policy_data_structures_biblio.xml: Switch
5836         www.cs.princeton.edu to https.
5837         * doc/html/manual/policy_data_structures.html: Regenerate.
5839 2020-05-31  Douglas B Rupp  <douglas.b.rupp@gmail.com>
5841         * crossconfig.m4 (<*-vxworks>): Check for more math decls.
5842         * configure: Rebuild.
5844 2020-05-29  H.J. Lu  <hjl.tools@gmail.com>
5846         PR bootstrap/95413
5847         * configure: Regenerated.
5849 2020-05-29  François Dumont  <fdumont@gcc.gnu.org>
5851         PR libstdc++/95079
5852         * include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
5853         * include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
5854         (unordered_map<>::insert_or_assign): Adapt.
5856 2020-05-27  Jonathan Wakely  <jwakely@redhat.com>
5858         PR libstdc++/95282
5859         * include/bits/atomic_base.h (__atomic_impl::load): Add
5860         cv-qualifiers to parameter so that _Tp is deduced as the
5861         unqualified type.
5862         * testsuite/29_atomics/atomic_float/95282.cc: New test.
5864 2020-05-27  Jonathan Wakely  <jwakely@redhat.com>
5866         PR libstdc++/95322
5867         * include/std/ranges (transform_view::_Sentinel): Allow hidden
5868         friends to work with _Iterator<true> and _Iterator<false>.
5869         (join_view::_Sentinel): Likewise.
5870         * testsuite/std/ranges/adaptors/95322.cc: New test.
5872 2020-05-27  Jonathan Wakely  <jwakely@redhat.com>
5874         PR libstdc++/94354
5875         * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
5876         operators to use the correct operations on the underlying
5877         iterators.
5878         * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
5880 2020-05-27  Jonathan Wakely  <jwakely@redhat.com>
5882         * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
5884 2020-05-26  Patrick Palka  <ppalka@redhat.com>
5886         PR libstdc++/95322
5887         * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
5888         Remove and instead define it ...
5889         (common_iterator::_Proxy): ... here.
5890         (common_iterator::operator->): Use it.
5891         * testsuite/24_iterators/common_iterator/2.cc: New test.
5892         * testsuite/std/ranges/adaptors/95322.cc: New test.
5894 2020-05-23  Patrick Palka  <ppalka@redhat.com>
5896         PR libstdc++/93978
5897         * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
5898         dg-additional-options.  Avoid unused-but-set-variable warning.
5900 2020-05-23  Jonathan Wakely  <jwakely@redhat.com>
5902         PR libstdc++/95289
5903         * include/debug/helper_functions.h (__get_distance): Only declare
5904         as a constexpr function for C++14 and up.
5905         * testsuite/25_algorithms/copy/debug/95289.cc: New test.
5907         * include/bits/fs_path.h (__detail::_S_range_begin)
5908         (__detail::_S_range_end, path::_S_string_from_iter): Replace with
5909         overloaded function template __detail::__effective_range.
5910         (__detail::__effective_range): New overloaded function template to
5911         create a basic_string or basic_string_view for an effective range.
5912         (__detail::__value_type_is_char): Use __detail::__effective_range.
5913         Do not use remove_const on value type.
5914         (__detail::__value_type_is_char_or_char8_t): Likewise.
5915         (path::path(const Source&, format))
5916         (path::path(const Source&, const locale&))
5917         (path::operator/=(const Source&), path::append(const Source&))
5918         (path::concat(const Source&)): Use __detail::__effective_range.
5919         (path::_S_to_string(InputIterator, InputIterator)): New function
5920         template to create a string view if possible, or string otherwise.
5921         (path::_S_convert): Add overloads that convert a string returned
5922         by __detail::__effective_range. Use if-constexpr to inline conversion
5923         logic from all overloads of _Cvt::_S_convert.
5924         (path::_S_convert_loc): Add overload that converts a string. Use
5925         _S_to_string to avoid allocation when possible.
5926         (path::_Cvt): Remove.
5927         (path::operator+=(CharT)): Remove indirection through path::concat.
5928         * include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
5929         overload for non-const pointers, to avoid constructing a std::string.
5930         * src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
5931         compilation with call to _S_convert.
5933         * include/bits/fs_path.h (__detail::_S_range_begin)
5934         (__detail::_S_range_end): Remove unintentional static specifiers.
5935         * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
5936         (__detail::_S_range_end): Likewise.
5938         * include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
5939         Replace alias template with variable template. Don't remove const.
5940         (filesystem::__detail::__is_path_src): Replace overloaded function
5941         template with variable template and specializations.
5942         (filesystem::__detail::__is_path_iter_src): Replace alias template
5943         with class template.
5944         (filesystem::__detail::_Path): Use __is_path_src. Remove support for
5945         iterator pairs.
5946         (filesystem::__detail::_Path2): New alias template for checking
5947         InputIterator requirements.
5948         (filesystem::__detail::__constructible_from): Remove.
5949         (filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
5950         * testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
5951         constructor arguments of void and void* types.
5953 2020-05-21  Matthias Kretz  <kretz@kde.org>
5955         * testsuite/Makefile.am: Remove dup target_triplet and set tool,
5956         allowing runtest to work without arguments.
5957         * testsuite/Makefile.in: Regenerate.
5959 2020-05-21  Jonathan Wakely  <jwakely@redhat.com>
5961         PR libstdc++/93983
5962         * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
5963         Reorder constraints to avoid recursion when constructors use
5964         iterator_traits (LWG 3420).
5965         * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
5967         * include/experimental/socket (basic_socket::is_open()
5968         (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
5970         * include/experimental/bits/net.h (__endpoint, __protocol)
5971         (__acceptable_protocol, __inet_protocol): New concepts.
5972         (__detail::__is_endpoint): Move trait from <experimental/socket>.
5973         (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
5974         traits.
5975         (__endpoint, __protocol, __acceptable_protocol): New variable
5976         templates.
5977         * include/experimental/socket (__is_endpoint): Move to net.h header.
5978         (basic_socket, basic_socket_acceptor): Check requirements.
5980         * include/experimental/executor (use_future_t::use_future_t()): Fix
5981         incorrect noexcept-specifier.
5982         * include/experimental/internet (basic_resolver_results): Adjust
5983         whitespace.
5984         * include/experimental/socket (__basic_socket_impl::release): Add
5985         member function.
5986         (basic_socket(io_context&, const endpoint_type&)): Fix argument to
5987         target constructor.
5988         (basic_socket::release(), basic_socket::release(error_code&)): Add
5989         missing member functions.
5990         (basic_socket::is_open()): Add nodiscard attribute.
5991         (basic_socket::close(error_code&)): Pass argument to base function.
5992         (basic_socket_acceptor::release())
5993         (basic_socket_acceptor::release(error_code&)): Add missing member
5994         functions.
5995         (basic_socket_acceptor::is_open()): Add nodiscard attribute.
5996         (basic_socket_streambuf::error()): Add noexcept.
5997         (basic_socket_iostream::error()): Likewise.
5998         * testsuite/experimental/net/socket/basic_socket.cc: New test.
6000         * include/experimental/buffer: Replace typedefs with
6001         alias-declarations.
6002         * include/experimental/executor: Likewise.
6003         * include/experimental/internet: Likewise.
6004         * include/experimental/socket: Likewise.
6005         * include/experimental/timer: Likewise.
6007 2020-05-19  Jonathan Wakely  <jwakely@redhat.com>
6009         PR libstdc++/94087
6010         * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
6011         passed in.
6012         (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
6013         fallback.
6014         (random_device::_M_init): Use __x86_rdseed_rdrand when both
6015         instructions are available.
6016         * testsuite/26_numerics/random/random_device/94087.cc: New test.
6018 2020-05-19  Patrick Palka  <ppalka@redhat.com>
6020         PR c++/66439
6021         * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
6022         mismatch" messages.
6023         * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
6025 2020-05-15  H.J. Lu  <hongjiu.lu@intel.com>
6027         PR bootstrap/95147
6028         * configure: Regenerated.
6030 2020-05-14  H.J. Lu  <hongjiu.lu@intel.com>
6032         * configure: Regenerated.
6034 2020-05-13  Alexandre Oliva <oliva@adacore.com>
6036         PR libstdc++/77691
6037         * include/experimental/memory_resource
6038         (__resource_adaptor_imp::do_allocate): Handle max_align_t on
6039         x86-vxworks as on x86-solaris.
6040         (__resource_adaptor_imp::do_deallocate): Likewise.
6041         * testsuite/experimental/memory_resource/new_delete_resource.cc:
6042         Drop xfail.
6043         (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
6044         (test03): Drop max-align test for char-aligned alloc.
6046 2020-05-08  Ulrich Drepper  <drepper@redhat.com>
6048         * include/bits/atomic_base.h (atomic_flag): Implement test member
6049         function.
6050         * include/std/version: Define __cpp_lib_atomic_flag_test.
6051         * testsuite/29_atomics/atomic_flag/test/explicit.cc: New file.
6052         * testsuite/29_atomics/atomic_flag/test/implicit.cc: New file.
6054 2020-05-07  Jonathan Wakely  <jwakely@redhat.com>
6056         PR libstdc++/94971 (partial)
6057         * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify
6058         std::sample using macro to work in parallel mode.
6059         (__sort_fn): Likewise for std::sort.
6060         (ranges::__nth_element_fn): Likewise for std::nth_element.
6061         * include/bits/stl_algobase.h (lexicographical_compare_three_way):
6062         Likewise for std::__min_cmp.
6063         * include/parallel/algobase.h (lexicographical_compare_three_way):
6064         Add to namespace std::__parallel.
6066         PR c/92472
6067         * include/parallel/multiway_merge.h (_GuardedIterator::operator*)
6068         (_GuardedIterator::operator _RAIter, _UnguardedIterator::operator*)
6069         (_UnguardedIterator::operator _RAIter): Add const qualifier.
6070         (operator<(_GuardedIterator&, _GuardedIterator&)
6071         (operator<=(_GuardedIterator&, _GuardedIterator&)
6072         (operator<(_UnguardedIterator&, _UnguardedIterator&)
6073         (operator<=(_UnguardedIterator&, _UnguardedIterator&): Change
6074         parameters to const references.
6076 2020-05-07  Eric Botcazou  <ebotcazou@adacore.com>
6078         * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
6079         * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
6081 2020-05-06  François Dumont  <fdumont@gcc.gnu.org>
6083         * include/bits/stl_algobase.h (struct _Bit_iterator): New declaration.
6084         (std::__fill_a1(_Bit_iterator, _Bit_iterator, const bool&)): Likewise.
6085         * include/bits/stl_bvector.h (__fill_bvector): Move outside
6086         _GLIBCXX_STD_C namespace.
6087         (fill(_Bit_iterator, _Bit_iterator, const bool&)): Likewise and rename
6088         into...
6089         (__fill_a1): ...this.
6090         * testsuite/25_algorithms/fill/bvector/1.cc: New.
6092 2020-05-06  H.J. Lu  <hongjiu.lu@intel.com>
6094         * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
6096 2020-05-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6098         * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
6099         * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
6100         Likewise.
6101         * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
6102         * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
6103         Likewise.
6105 2020-05-06  Martin Liska  <mliska@suse.cz>
6107         Revert:
6108         2020-05-05  Martin Liska  <mliska@suse.cz>
6109         PR c/92472
6110         * include/parallel/multiway_merge.h:
6111         Use const for _Compare template argument.
6113 2020-05-06  Jonathan Wakely  <jwakely@redhat.com>
6115         * doc/xml/manual/abi.xml (abi.versioning.history): Document library
6116         versions for GCC 9.[123] and 10.1 releases.
6117         * doc/html/*: Regenerate.
6119 2020-05-06  Jakub Jelinek  <jakub@redhat.com>
6121         * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
6122         * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
6123         * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
6124         * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
6125         * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
6126         * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
6127         * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
6129 2020-05-05  Martin Liska  <mliska@suse.cz>
6131         PR c/92472
6132         * include/parallel/multiway_merge.h:
6133         Use const for _Compare template argument.
6135 2020-05-04  Fangrui Song  <maskray@google.com>
6137         * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
6139 2020-05-04  Jonathan Wakely  <jwakely@redhat.com>
6141         * doc/xml/faq.xml: Use working link for SGI STL FAQ.
6142         * doc/html/*: Regenerate.
6144         PR libstdc++/94906
6145         * src/c++17/memory_resource.cc
6146         (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
6147         operands.
6149 2020-05-04  Nathan Sidwell  <nathan@acm.org>
6151         PR libstdc++/94747
6152         * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
6153         ptrdiff_t before negation, to show intent more clearly.
6155 2020-05-04  Jonathan Wakely  <jwakely@redhat.com>
6157         PR libstdc++/94936
6158         * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
6159         Add comment about single-threaded behaviour.
6160         (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
6161         class member access out of loop.
6162         (synchronized_pool_resource::synchronized_pool_resource())
6163         (synchronized_pool_resource::~synchronized_pool_resource())
6164         (synchronized_pool_resource::release()): Check __gthread_active_p
6165         before creating and/or deleting the thread-specific data key.
6166         (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
6167         assertions.
6168         (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
6169         path for single-threaded case.
6170         (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
6171         Likewise. Return if unable to find a pool that owns the allocation.
6172         * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
6173         New test.
6174         * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
6175         test.
6176         * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
6177         test.
6179 2020-05-03  Jonathan Wakely  <jwakely@redhat.com>
6181         PR libstdc++/94933
6182         * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
6183         usable in constant expressions.
6184         * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
6185         non-scalars.
6187 2020-05-01  Jonathan Wakely  <jwakely@redhat.com>
6189         PR libstdc++/94901
6190         * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
6192 2020-05-01  Jonathan Wakely  <jwakely@redhat.com>
6193             Patrick Palka  <ppalka@redhat.com>
6195         PR libstdc++/92894
6196         * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
6197         Add trait to determine return type and an alias for it.
6198         (ranges::__cust_imove::_IMove::operator()): Use __result instead of
6199         deduced return type.
6200         (iter_rvalue_reference_t): Use _IMove::__type instead of checking
6201         the result of ranges::iter_move.
6202         (__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
6203         instead of checking the result of ranges::iter_move.
6204         * testsuite/24_iterators/customization_points/92894.cc: New test.
6205         * testsuite/24_iterators/indirect_callable/92894.cc: New test.
6207 2020-05-01  Jonathan Wakely  <jwakely@redhat.com>
6209         PR libstdc++/94901
6210         * include/std/type_traits (__is_complete_or_unbounded): Replace
6211         BADNAME _T with _Tp.
6212         * testsuite/17_intro/badnames.cc: New test.
6214 2020-04-30  Jonathan Wakely  <jwakely@redhat.com>
6216         PR libstdc++/89510
6217         * include/bits/alloc_traits.h (allocator_traits::_S_construct)
6218         (allocator_traits::_S_destroy)
6219         (allocator_traits<allocator<T>>::construct): Use traits in
6220         noexcept-specifiers.
6221         * include/bits/allocator.h (allocator<void>::construct)
6222         (allocator<void>::destroy): Likewise.
6223         * include/ext/malloc_allocator.h (malloc_allocator::construct)
6224         (malloc_allocator::destroy): Likewise.
6225         * include/ext/new_allocator.h (new_allocator::construct)
6226         (new_allocator::destroy): Likewise.
6227         * testsuite/20_util/allocator/89510.cc: New test.
6228         * testsuite/ext/malloc_allocator/89510.cc: New test.
6229         * testsuite/ext/new_allocator/89510.cc: New test.
6231 2020-04-29  Jonathan Wakely  <jwakely@redhat.com>
6233         PR libstdc++/94854
6234         * include/bits/basic_string.tcc: Update comment about explicit
6235         instantiations.
6237 2020-04-28  Jonathan Wakely  <jwakely@redhat.com>
6239         PR libstdc++/91480
6240         * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
6241         Remove non-standard macro.
6242         * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
6243         to indicate P1032R1 support.
6244         * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
6245         * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
6246         * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
6247         * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
6248         (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
6249         (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
6250         * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
6251         feature test macro.
6252         * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
6253         * testsuite/21_strings/basic_string_view/operations/copy/char/
6254         constexpr.cc: Likewise.
6255         * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
6257         PR libstdc++/94831
6258         * include/bits/alloc_traits.h (_S_construct): Restore placement
6259         new-expression for C++11/14/17 and call std::construct_at directly
6260         for C++20.
6261         * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
6262         function returning void.
6263         * testsuite/20_util/specialized_algorithms/
6264         uninitialized_value_construct/94831.cc: New test.
6265         * testsuite/23_containers/vector/cons/94831.cc: New test.
6267 2020-04-28  Patrick Palka  <ppalka@redhat.com>
6269         LWG 3433 subrange::advance(n) has UB when n < 0
6270         * include/std/ranges (subrange::prev): Fix typo.
6271         (subrange::advance): Handle a negative argument as per the proposed
6272         resolution of LWG 3433.
6273         * testsuite/std/ranges/subrange/lwg3433.cc: New test.
6275 2020-04-28  Jonathan Wakely  <jwakely@redhat.com>
6276             Iain Sandoe  <iain@sandoe.co.uk>
6278         PR c++/94759
6279         * include/std/coroutine: Implement handing for non-
6280         class coroutine return types.
6282 2020-04-24  Jonathan Wakely  <jwakely@redhat.com>
6284         * include/experimental/executor (service_already_exists): Make default
6285         constructor public (LWG 3414).
6286         * testsuite/experimental/net/execution_context/make_service.cc: Check
6287         the service_already_exists can be default constructed.
6289 2020-04-24  Kamlesh Kumar  <kamleshbhalui@gmail.com>
6290             Jonathan Wakely  <jwakely@redhat.com>
6292         PR libstdc++/90415
6293         PR libstdc++/92156
6294         * include/std/any (any): Rename template parameters for consistency
6295         with the standard.
6296         (any::_Decay): Rename to _Decay_if_not_any.
6297         (any::any(T&&):: Remove is_constructible from constraints. Remove
6298         non-standard overload.
6299         (any::any(in_place_type_t<T>, Args&&...))
6300         (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
6301         (any::emplace(Args&&...))
6302         (any::emplace(initializer_list<U>, Args&&...)):
6303         Use decay_t instead of _Decay.
6304         * testsuite/20_util/any/cons/90415.cc: New test.
6305         * testsuite/20_util/any/cons/92156.cc: New Test.
6306         * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
6307         more robust.
6308         * testsuite/20_util/any/modifiers/92156.cc: New test.
6310 2020-04-23  Jonathan Wakely  <jwakely@redhat.com>
6312         * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
6313         * doc/html/*: Regenerate.
6315         * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
6316         value for C++17 to 201803L because P0858R0 is supported for C++17.
6317         * include/std/version (__cpp_lib_array_constexpr): Likewise.
6318         * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
6319         Check for value corresponding to P0031R0 features being tested.
6320         * testsuite/23_containers/array/requirements/constexpr_iter.cc:
6321         Check for value corresponding to P0858R0 features being tested.
6323         * include/std/version (__cpp_lib_three_way_comparison): Define for
6324         freestanding builds.
6326 2020-04-23  Thomas Rodgers  <rodgert@appliantology.com>
6328         * include/experimental/net/executor (system_context): Mark
6329         system_context::system_context() = delete.
6330         * testsuite/experimental/net/executor/1.cc: Add new
6331         test to check system_context is not default constructible.
6333 2020-04-23  Iain Sandoe  <iain@sandoe.co.uk>
6335         * include/std/coroutine: Update the inline namespace to __n4861.
6336         Add the __cpp_lib_coroutine define, set to 201902L.
6337         * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
6339 2020-04-22  Jonathan Wakely  <jwakely@redhat.com>
6341         * include/std/execution (__cpp_lib_execution): Define to indicate
6342         support for P0024R2 and P1001R2.
6343         * include/std/version (__cpp_lib_execution): Define.
6344         * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
6345         defined by <algorithm>, move other tests to new tests ...
6346         * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
6347         * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
6348         * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
6349         * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
6351         * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
6352         different values for C++17 and C++20, to indicate different feature
6353         sets. Update value for C++20 to indicate P1032R1 support.
6354         * include/std/version (__cpp_lib_array_constexpr): Likewise.
6355         * testsuite/23_containers/array/comparison_operators/constexpr.cc:
6356         Check feature test macro.
6357         * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
6358         New test.
6359         * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
6360         feature test macro.
6361         * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
6362         in C++17 mode and check feature test macro.
6364         * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
6365         here.
6366         * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
6367         defined by <utility>.
6369         * include/std/functional (__cpp_lib_concepts): Update macro value to
6370         indicate P1964R2 support.
6371         * include/std/version (__cpp_lib_concepts): Likewise.
6372         * testsuite/std/concepts/1.cc: Adjust expected value.
6373         * testsuite/std/concepts/2.cc: Likewise.
6375         * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
6376         __cpp_lib_constexpr_functional.
6377         * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
6378         * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
6380         * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
6381         indicate P1006R1 support.
6382         (__cpp_lib_to_address): Define to indicate P0653R2 support.
6383         * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
6384         P1227R2 support.
6385         * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
6386         P0769R2 support.
6387         * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
6388         P0020R6 support.
6389         * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
6390         P1007R3 support.
6391         * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
6392         Define to indicate P0339R6 support.
6393         * include/std/string_view (__cpp_lib_starts_ends_with): Define to
6394         indicate P0457R2 support.
6395         * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
6396         to indicate P0758R1 support.
6397         (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
6398         (__cpp_lib_type_identity): Define to indicate P0887R1 support.
6399         * include/std/version (__cpp_lib_atomic_float)
6400         (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
6401         (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
6402         (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
6403         (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
6404         (__cpp_lib_to_address): Define.
6405         * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
6407         * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
6408         macro.
6409         * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
6410         Likewise.
6411         * include/std/version (__cpp_lib_map_insertion)
6412         (__cpp_lib_unordered_map_insertion): Remove.
6414         * include/std/condition_variable (__cpp_lib_jthread): Remove
6415         redundant definition.
6416         * include/std/stop_token (__cpp_lib_jthread): Update macro value to
6417         indicate P1869R1 support.
6418         * include/std/version (__cpp_lib_jthread): Update value.
6419         * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
6420         for updated macro value.
6421         * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
6422         Likewise.
6423         * testsuite/30_threads/jthread/1.cc: Likewise.
6424         * testsuite/30_threads/jthread/2.cc: Likewise.
6425         * testsuite/30_threads/stop_token/1.cc: Likewise.
6426         * testsuite/30_threads/stop_token/2.cc: Likewise.
6428         * testsuite/21_strings/basic_string/erasure.cc: Check for
6429         __cpp_lib_erase_if macro.
6430         * testsuite/23_containers/deque/erasure.cc: Add header name to #error
6431         messages.
6432         * testsuite/23_containers/forward_list/erasure.cc: Likewise.
6433         * testsuite/23_containers/list/erasure.cc: Likewise.
6434         * testsuite/23_containers/map/erasure.cc: Likewise.
6435         * testsuite/23_containers/set/erasure.cc: Likewise.
6436         * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
6437         * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
6438         * testsuite/23_containers/vector/erasure.cc: Likewise.
6440 2020-04-21  Jonathan Wakely  <jwakely@redhat.com>
6442         * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
6443         to define operator<=>.
6444         * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
6446         * doc/Makefile.am (xml_sources_manual): Add missing XML files.
6447         * doc/Makefile.in: Regenerate.
6448         * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
6449         of "this page".
6450         * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
6451         to the C++11 status table.
6452         * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
6453         proposals with table matching contents of the C++14 standard.
6454         * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
6455         the C++17 standard.
6456         * doc/html/*: Regenerate.
6458         PR c++/94149
6459         * include/std/type_traits (__is_nt_constructible_impl): Add partial
6460         specializations for bounded arrays with non-empty initializers.
6461         * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
6463 2020-04-20  Thomas Rodgers  <trodgers@redhat.com>
6465         * testsuite/lib/libstdc++.exp: Add additional_flags=
6466         -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
6467         compiling with a newer Thread Building Blocks.
6469 2020-04-20  Jonathan Wakely  <jwakely@redhat.com>
6471         * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
6473         * testsuite/20_util/is_constructible/51185.cc: Make test class a
6474         non-aggregate so that the test verifies the same thing in all -std
6475         modes.
6476         * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
6477         results for some types when paren-init for aggregates is supported.
6479         * include/std/version (__cpp_lib_three_way_comparison): Update value.
6480         * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
6481         (__detail::__synth3way): Add noexcept-specifier.
6483         * include/bits/stl_map.h (map): Define operator<=> and remove
6484         operator< for C++20.
6485         * include/bits/stl_multimap.h (multimap): Likewise.
6486         * include/bits/stl_multiset.h (multiset): Likewise.
6487         * include/bits/stl_set.h (set): Likewise.
6488         * include/bits/stl_tree.h (_Rb_tree): Likewise.
6489         (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
6490         operator!= for C++20.
6491         * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
6492         * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
6493         * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
6494         * include/debug/set.h (__gnu_debug::set): Likewise.
6495         * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
6496         * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
6497         * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
6498         * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
6500 2020-04-20  Matthias Kretz  <kretz@kde.org>
6502         * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
6504 2020-04-19  Jonathan Wakely  <jwakely@redhat.com>
6506         * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
6507         * include/bits/stl_stack.h (stack): Likewise.
6508         * testsuite/23_containers/queue/cmp_c++20.cc: New test.
6509         * testsuite/23_containers/stack/cmp_c++20.cc: New test.
6511         * include/bits/unordered_map.h (unordered_map, unordered_multimap):
6512         Remove redundant operator!= for C++20.
6513         * include/bits/unordered_set.h (unordered_set, unordered_multiset):
6514         Likewise.
6515         * include/debug/unordered_map (unordered_map, unordered_multimap):
6516         Likewise.
6517         * include/debug/unordered_set (unordered_set, unordered_multiset):
6518         Likewise.
6520         PR other/94629
6521         * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
6522         redundant assignment in constructor.
6524 2020-04-18  Jonathan Wakely  <jwakely@redhat.com>
6526         * include/std/chrono (duration, time_point): Define operator<=> and
6527         remove redundant operator!= for C++20.
6528         * testsuite/20_util/duration/comparison_operators/three_way.cc: New
6529         test.
6530         * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
6531         test.
6533         * testsuite/util/native_type/native_priority_queue.hpp: Use
6534         allocator_traits to rebind allocator.
6536 2020-04-17  Jonathan Wakely  <jwakely@redhat.com>
6538         * include/bits/forward_list.h (forward_list): Define operator<=> and
6539         remove redundant comparison operators for C++20.
6540         * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
6541         * include/bits/stl_deque.h (deque): Likewise.
6542         * include/bits/stl_iterator.h (__normal_iterator): Likewise.
6543         * include/bits/stl_list.h (list): Likewise.
6544         * include/bits/stl_vector.h (vector): Likewise.
6545         * include/debug/deque (__gnu_debug::deque): Likewise.
6546         * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
6547         * include/debug/list (__gnu_debug::list): Likewise.
6548         * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
6549         Likewise.
6550         * include/debug/vector (__gnu_debug::vector): Likewise.
6551         * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
6552         operator<=> for C++20.
6553         * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
6554         * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
6555         * testsuite/23_containers/list/cmp_c++20.cc: New test.
6556         * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
6557         * testsuite/23_containers/vector/cmp_c++20.cc: New test.
6559         * include/bits/basic_string.h (basic_string): Define operator<=> and
6560         remove redundant comparison operators for C++20.
6561         * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
6562         Add comparison_category members.
6563         (__detail::__char_traits_cmp_cat): New helper to get comparison
6564         category from char traits class.
6565         * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
6566         define for C++20.
6567         (sub_match): Define operator<=> and remove redundant comparison
6568         operators for C++20.
6569         (match_results): Remove redundant operator!= for C++20.
6570         * include/std/string_view (basic_string_view): Define operator<=> and
6571         remove redundant comparison operators for C++20.
6572         * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
6573         test.
6574         * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
6575         New test.
6576         * testsuite/21_strings/basic_string_view/operations/copy/char/
6577         constexpr.cc: Initialize variable.
6578         * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
6579         constexpr.cc: Likewise.
6580         * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
6581         dg-do directive and remove comments showing incorrect signatures.
6582         * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
6583         Likewise.
6584         * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
6585         New test.
6586         * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
6587         New test.
6588         * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
6590 2020-04-16  Jonathan Wakely  <jwakely@redhat.com>
6592         * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
6593         name of unused parameter.
6595 2020-04-15  Jonathan Wakely  <jwakely@redhat.com>
6597         * include/bits/fs_dir.h (file_status): Define operator== for C++20.
6598         (directory_entry): Define operator<=> and remove redundant comparison
6599         operators for C++20.
6600         * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
6601         * include/bits/fs_path.h (path): Define operator<=> and remove
6602         redundant comparison operators for C++20.
6603         * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
6604         * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
6605         * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
6606         * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
6608         * include/bits/allocator.h (operator!=): Do not define for C++20.
6609         * include/bits/locale_classes.h (operator!=): Likewise.
6610         * include/bits/std_function.h (operator==(nullptr_t, const function&))
6611         (operator!=(const function&, nullptr_t))
6612         (operator!=(nullptr_t, const function&)): Likewise.
6613         * include/ext/bitmap_allocator.h (operator!=): Likewise.
6614         * include/ext/debug_allocator.h (operator!=): Likewise.
6615         * include/ext/extptr_allocator.h (operator!=): Likewise.
6616         * include/ext/malloc_allocator.h (operator!=): Likewise.
6617         * include/ext/mt_allocator.h (operator!=): Likewise.
6618         * include/ext/new_allocator.h (operator!=): Likewise.
6619         * include/ext/pool_allocator.h (operator!=): Likewise.
6620         * include/ext/throw_allocator.h (operator!=): Likewise.
6621         * include/std/bitset (bitset::operator!=): Likewise.
6622         * include/std/memory_resource (operator!=): Likewise.
6623         * include/std/scoped_allocator (operator!=): Likewise.
6625         * include/std/typeindex (operator<=>): Define for C++20.
6626         * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
6628 2020-04-14  Jonathan Wakely  <jwakely@redhat.com>
6630         * libsupc++/compare (compare_three_way): Fix constraint so that
6631         BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
6632         * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
6633         New test.
6635         PR libstdc++/94562
6636         * include/bits/shared_ptr.h (operator<=>): Define for C++20.
6637         * include/bits/shared_ptr_base.h (operator<=>): Likewise.
6638         * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
6639         * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
6640         * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
6641         std::less<A*> to be used when comparing std::shared_ptr<A> objects in
6642         C++20.
6644         PR libstdc++/94565
6645         * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
6646         * testsuite/18_support/comparisons/categories/94565.cc: New test.
6648 2020-04-13  Iain Sandoe  <iain@sandoe.co.uk>
6650         * include/std/coroutine: Update coroutines builtin define,
6651         per n4861.
6653 2020-04-09  Jonathan Wakely  <jwakely@redhat.com>
6655         * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
6656         (strong_order, weak_order, partial_order): Replace uses of <=> with
6657         compare_three_way function object (LWG 3324).
6658         * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
6659         equality operator so that X satisfies three_way_comparable.
6660         * testsuite/18_support/comparisons/algorithms/strong_order.cc:
6661         Likewise.
6662         * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
6664         * include/bits/unique_ptr.h (operator<=>): Define for C++20.
6665         * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
6666         * testsuite/20_util/default_delete/void_neg.cc: Likewise.
6667         * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
6668         * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
6670 2020-04-08  Jonathan Wakely  <jwakely@redhat.com>
6672         * include/bits/slice_array.h (operator==(const slice&, const slice&)):
6673         Define for C++20.
6674         * include/std/complex (operator==(const T&, const complex<T>&))
6675         (operator!=(const complex<T>&, const complex<T>&))
6676         (operator!=(const complex<T>&, const T&))
6677         (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
6678         * testsuite/26_numerics/slice/compare.cc: New test.
6680         * include/std/charconv (to_chars_result, from_chars_result): Add
6681         defaulted equality comparisons for C++20.
6682         * testsuite/20_util/from_chars/compare.cc: New test.
6683         * testsuite/20_util/to_chars/compare.cc: New test.
6685 2020-04-07  Jonathan Wakely  <jwakely@redhat.com>
6687         PR libstdc++/94520
6688         * include/std/charconv (__integer_to_chars_result_type)
6689         (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
6690         allow use in C++14.
6691         * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
6692         use of std::string_view with std::string.
6693         * testsuite/20_util/from_chars/2.cc: Likewise.
6694         * testsuite/20_util/to_chars/1.cc: Likewise.
6695         * testsuite/20_util/to_chars/2.cc: Likewise.
6697 2020-04-06  Jonathan Wakely  <jwakely@redhat.com>
6699         PR libstdc++/94498
6700         * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
6701         usable in constant expressions for C++20.
6702         (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
6703         _GLIBCXX20_CONSTEXPR.
6704         (std::char_traits<char>, std::char_traits<wchar_t>)
6705         (std::char_traits<char8_t>): Make move, copy and assign usable in
6706         constant expressions for C++20.
6707         (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
6708         and copy usable in constant expressions for C++20.
6709         * include/std/string_view (basic_string_view::copy): Add
6710         _GLIBCXX20_CONSTEXPR.
6711         * testsuite/21_strings/basic_string_view/operations/copy/char/
6712         constexpr.cc: New test.
6713         * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
6714         constexpr.cc: New test.
6716 2020-04-05  Gerald Pfeifer  <gerald@pfeifer.com>
6718         * doc/xml/manual/appendix_contributing.xml: Refer to Git
6719         documentation instead of Subversion.  Switch to https.
6720         * doc/html/manual/appendix_contributing.html: Regenerate.
6722 2020-04-03  Jonathan Wakely  <jwakely@redhat.com>
6724         PR libstdc++/93960
6725         * include/bits/ptr_traits.h (__to_address): Add special case for debug
6726         iterators, to avoid dereferenceable check.
6727         * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
6728         * testsuite/20_util/to_address/debug.cc: New test.
6730 2020-04-01  Andrea Corallo  <andrea.corallo@arm.com>
6732         * testsuite/experimental/net/execution_context/use_service.cc:
6733         Require pthread and gthreads.
6735 2020-04-01  Gerald Pfeifer  <gerald@pfeifer.com>
6737         * doc/xml/manual/appendix_free.xml: Move "free books" list from
6738         fsf.org to gnu.org.
6739         * doc/html/manual/appendix_free.html: Regenerate.
6741 2020-03-31  Ville Voutilainen  <ville.voutilainen@gmail.com>
6743         Library-side tests for parenthesized aggregate init
6745         PR c++/92878
6746         PR c++/92947
6748         * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
6749         * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
6750         * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
6751         * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
6752         * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
6753         * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
6754         * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
6755         * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
6756         * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
6757         Likewise.
6758         * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
6759         * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
6760         * testsuite/20_util/variant/92878_92947.cc: Likewise.
6761         * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
6762         Likewise.
6763         * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
6764         Likewise.
6765         * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
6766         Likewise.
6767         * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
6768         Likewise.
6769         * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
6770         Likewise.
6771         * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
6772         Likewise.
6773         * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
6774         * testsuite/23_containers/queue/92878_92947.cc: Likewise.
6775         * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
6776         Likewise.
6777         * testsuite/23_containers/stack/92878_92947.cc: Likewise.
6778         * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
6779         Likewise.
6780         * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
6781         Likewise.
6782         * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
6783         Likewise.
6784         * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
6785         Likewise.
6786         * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
6787         Likewise.
6789 2020-03-28  Jonathan Wakely  <jwakely@redhat.com>
6791         * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
6792         for changes due to parenthesized aggregate-initialization in C++20.
6793         * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
6794         with std::chrono::sys_time in C++20.
6796         * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
6797         to constrain C++20 versions of comparison operators. Fix backwards
6798         logic of relational operators.
6799         (move_iterator): Use requires-clause to constrain comparison operators
6800         in C++20. Do not declare non-standard same-type overloads for C++20.
6801         * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
6802         of comparisons and check using greedy_ops type.
6803         * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
6804         * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
6805         main function from compile-only test.
6806         * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
6808 2020-03-27  Jonathan Wakely  <jwakely@redhat.com>
6810         * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
6811         * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
6812         C++20 concepts are required.
6813         * include/bits/stl_iterator_base_types.h: Likewise.
6814         * include/std/concepts: Likewise.
6815         * include/std/version: Likewise.
6816         * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
6817         macro.
6819         * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
6820         (reverse_iterator::iterator_category): Define for C++20.
6821         (reverse_iterator): Define comparison operators correctly for C++20.
6822         (__normal_iterator): Add constraints to comparison operators for C++20.
6823         (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
6824         overload for input iterators.
6825         (move_iterator): Add constraints to comparison operators for C++20.
6826         Define operator<=> for C++20.
6827         * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
6828         * testsuite/24_iterators/move_iterator/move_only.cc: New test.
6829         * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
6830         * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
6832         * include/bits/iterator_concepts.h (__detail::__decay_copy)
6833         (__detail::__member_begin, __detail::__adl_begin): Move here from
6834         <bits/range_access.h>.
6835         (__detail::__ranges_begin, __detail::__range_iter_t): Define.
6836         * bits/range_access.h (__cust_access::__decay_copy)
6837         (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
6838         <bits/iterator_concepts.h>.
6839         (ranges::iterator_t): Use __detail::__range_iter_t.
6840         * include/bits/stl_iterator.h (back_insert_iterator): Simplify
6841         conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
6842         (front_insert_iterator): Likewise.
6843         (insert_iterator): Implement changes from P0896R4 for C++20.
6844         * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
6845         * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
6846         * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
6847         for inclusion in synopsis_c++20.cc which expects different signatures
6848         for some function templates.
6849         * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
6851         * include/std/type_traits (__is_array_convertible): Move definition
6852         to immediately after is_convertible.
6854 2020-03-26  Jonathan Wakely  <jwakely@redhat.com>
6856         * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
6857         (chrono::months, chrono::sys_days, chrono::local_t)
6858         (chrono::local_time, chrono::local_seconds, chrono::local_days):
6859         Define for C++20.
6860         (chrono::time_point): Add missing static assert.
6861         * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
6862         * testsuite/std/time/clock/file/overview.cc: New test.
6863         * testsuite/std/time/clock/file/members.cc: New test.
6864         * testsuite/std/time/syn_c++20.cc: New test.
6866 2020-03-25  Mike Crowe  <mac@mcrowe.com>
6868         * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
6869         test.
6870         * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
6871         test.
6873 2020-03-25  Jonathan Wakely  <jwakely@redhat.com>
6875         * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
6876         * include/std/chrono (filesystem::__file_clock): Here.
6877         (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
6878         Define public member functions for C++20.
6879         (is_clock, is_clock_v): Define traits for C++20.
6880         * include/std/condition_variable (condition_variable::wait_until): Add
6881         check for valid clock.
6882         * include/std/future (_State_baseV2::wait_until): Likewise.
6883         * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
6884         * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
6885         Likewise.
6886         * include/std/thread (this_thread::sleep_until): Likewise.
6887         * testsuite/30_threads/condition_variable/members/2.cc: Qualify
6888         slow_clock with new namespace.
6889         * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
6890         test.
6891         * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
6892         New test.
6893         * testsuite/30_threads/future/members/clock_neg.cc: New test.
6894         * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
6895         Qualify slow_clock with new namespace.
6896         * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
6897         clock_neg.cc: New test.
6898         * testsuite/30_threads/shared_future/members/clock_neg.cc: New
6899         test.
6900         * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
6901         * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
6902         New test.
6903         * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
6904         slow_clock with new namespace.
6905         * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
6906         * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
6907         test.
6908         * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
6909         * testsuite/std/time/traits/is_clock.cc: New test.
6910         * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
6911         namespace.
6913 2020-03-21  Jonathan Wakely  <jwakely@redhat.com>
6915         PR libstdc++/93245
6916         * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
6917         * testsuite/experimental/filesystem/path/generic/generic_string.cc:
6918         Improve test coverage.
6920         PR libstdc++/94242
6921         * include/bits/fs_path.h (path::_S_str_convert): Replace first
6922         parameter with basic_string_view so that strings with different
6923         allocators can be accepted.
6924         (path::generic_string<C,T,A>()): Use basic_string object that uses the
6925         right allocator type.
6926         * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
6927         * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
6928         test coverage.
6930 2020-03-18  Jonathan Wakely  <jwakely@redhat.com>
6932         PR libstdc++/94033
6933         * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
6934         (__is_nt_default_constructible_impl): Remove.
6935         (__is_nothrow_default_constructible_impl): Remove.
6936         (__is_nt_constructible_impl): Add bool template parameter. Adjust
6937         partial specializations.
6938         (__is_nothrow_constructible_impl): Replace class template with alias
6939         template.
6940         (is_nothrow_default_constructible): Derive from alias template
6941         __is_nothrow_constructible_impl instead of
6942         __is_nothrow_default_constructible_impl.
6943         * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
6945         * include/std/stop_token (stop_token::_Stop_state_ref): Define
6946         comparison operators explicitly if the compiler won't synthesize them.
6948         * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
6949         __cpp_lib_concepts before using iter_reference_t.
6950         * include/bits/stream_iterator.h (istream_iterator): Check
6951         __cpp_lib_concepts before using default_sentinel_t.
6952         * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
6954         PR libstdc++/94203
6955         * include/experimental/executor (executor::executor(Executor)): Call
6956         make_shared directly instead of _M_create. Create _Tgt1 object.
6957         (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
6958         Call allocate_shared directly instead of _M_create. Create _Tgt2
6959         object.
6960         (executor::target_type): Add cast needed for new _Tgt interface.
6961         (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
6962         (executor::_Tgt): Define the same interface whether RTTI is enabled or
6963         not.
6964         (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
6965         std::type_info in the interface.
6966         (executor::_Tgt::_M_func): Add data member.
6967         (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
6968         (executor::_Tgt1::_S_func): Define function to access target without
6969         depending on RTTI.
6970         (executor::_M_create): Remove.
6971         (operator==, operator!=): Simplify comparisons for executor.
6972         * include/experimental/socket (is_error_code_enum<socket_errc>):
6973         Define specialization before use.
6974         * testsuite/experimental/net/executor/1.cc: New test.
6976 2020-03-16  Jonathan Wakely  <jwakely@redhat.com>
6978         PR libstdc++/94199
6979         * include/experimental/executor (service_already_exists): Add default
6980         constructor. Declare make_service to be a friend.
6981         * testsuite/experimental/net/execution_context/make_service.cc: New
6982         test.
6984 2020-03-12  Jonathan Wakely  <jwakely@redhat.com>
6986         * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
6987         a null pointer to functions with nonnull(1) attribute.
6989 2020-03-11  Patrick Palka  <ppalka@redhat.com>
6991         * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
6992         'address' -> 'std::__addressof'.
6993         * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
6994         a non-forward input_range.
6995         * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
6996         default constructor protected instead of deleted, like with
6997         input_iterator_wrapper.
6998         (test_range::iterator): Add comment explaining that this type is used
6999         only when the underlying wrapper is input_iterator_wrapper or
7000         output_iterator_wrapper.  Remove delegating defaulted constructor so
7001         that the inherited default constructor is used instead.
7003         LWG 3286 ranges::size is not required to be valid after a call to
7004         ranges::begin on an input range
7005         * include/std/ranges (subrange::subrange): Split single-argument
7006         constructor into two, one constrained by _S_store_size and another by
7007         !_S_store_size.
7008         (take_view::begin): Call size() before calling ranges::begin(_M_base).
7009         * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
7010         * testsuite/std/ranges/subrange/lwg3286.cc: New test.
7012 2020-03-10  Jonathan Wakely  <jwakely@redhat.com>
7014         * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
7015         instead of _M_current.
7016         (split_view::_OuterIter::operator++): Likewise.
7018         * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
7019         (transform_view::_Iterator::operator*): Add noexcept-specifier.
7020         (transform_view::_Iterator::iter_move): Inline __iter_move body here.
7021         (split_view::_OuterIter::__current): Add noexcept.
7022         (split_view::_InnerIter::__iter_swap): Remove.
7023         (split_view::_InnerIter::__iter_move): Remove.
7024         (split_view::_InnerIter::_M_i_current): New accessors.
7025         (split_view::_InnerIter::__at_end): Use _M_i_current().
7026         (split_view::_InnerIter::operator*): Likewise.
7027         (split_view::_InnerIter::operator++): Likewise.
7028         (iter_move(const _InnerIter&)): Likewise.
7029         (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
7030         * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
7031         for iter_move and iter_swap on split_view's inner iterator.
7033         PR c++/94117
7034         * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
7035         Change expression in noexcept-specifier to match function body.
7037         * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
7038         comment explaining multiple dg-do directives.
7039         * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
7040         so test is run as well as compiled.
7042 2020-03-09  Jonathan Wakely  <jwakely@redhat.com>
7044         PR libstdc++/94063
7045         * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
7046         handle concatenations that change the type of the first component.
7047         (path::operator+=(basic_string_view<value_type>)): Likewise.
7048         * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
7050 2020-03-06  Patrick Palka  <ppalka@redhat.com>
7052         * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
7053         join_view::_Sentinel<!_Const>.
7054         * testsuite/std/ranges/adaptors/join.cc: Augment test.
7056         PR libstdc++/93978
7057         * include/bits/range_access.h (__cust_access::_Empty::operator()):
7058         Declare return type to be bool instead of auto.
7059         * testsuite/std/ranges/adaptors/93978.cc: New test.
7061 2020-03-06  Jonathan Wakely  <jwakely@redhat.com>
7063         PR libstdc++/94069
7064         * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
7065         (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
7066         second argument to __glibcxx_rwlock_init.
7067         * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
7069         PR libstdc++/93244
7070         * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
7071         test to not fail due to PR 94063.
7072         * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
7073         * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
7075 2020-03-06  Andreas Krebbel  <krebbel@linux.ibm.com>
7077         * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
7078         would match ENOSYS.
7080 2020-03-05  Jonathan Wakely  <jwakely@redhat.com>
7082         * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
7083         * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
7084         * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
7085         * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
7086         for return value, and in comparison.
7087         * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
7089         PR libstdc++/94051
7090         * include/std/string_view: Include <bits/ostream_insert.h>.
7091         * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
7093 2020-03-04  Jonathan Wakely  <jwakely@redhat.com>
7095         * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
7097 2020-03-04  Patrick Palka  <ppalka@redhat.com>
7099         PR libstdc++/94017
7100         * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
7101         condition for when to use memset, making sure to additionally check that
7102         the output pointer's value type is a non-volatile byte type.  Instead of
7103         requiring that the fill type is a byte type, just require that it's an
7104         integral type.
7105         * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
7106         New test.
7107         * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
7108         New test.
7109         * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
7110         blocked by PR 94017.
7111         * testsuite/25_algorithms/fill/94017.cc: New test.
7112         * testsuite/25_algorithms/fill_n/94017.cc: New test.
7114         LWG 3355 The memory algorithms should support move-only input iterators
7115         introduced by P1207
7116         * include/bits/ranges_uninitialized.h
7117         (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
7118         to copy __ifirst, which could be a move-only input iterator.  Use
7119         operator- instead of ranges::distance to compute distance from a sized
7120         sentinel.
7121         (__uninitialized_copy_n_fn::operator()): Likewise.
7122         (__uninitialized_move_fn::operator()): Likewise.
7123         (__uninitialized_move_n_fn::operator()): Likewise.
7124         (__uninitialized_destroy_fn::operator()): Use std::move to avoid
7125         attempting to copy __first.
7126         (__uninitialized_destroy_n_fn::operator()): Likewise.
7127         * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
7128         Augment test.
7129         * .../specialized_algorithms/uninitialized_copy/constrained.cc:
7130         Likewise.
7131         * .../specialized_algorithms/uninitialized_move/constrained.cc:
7132         Likewise.
7134         * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
7135         protected instead of private.
7136         (test_sized_range_sized_sent): New.
7138         * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
7139         New testsuite iterator.
7140         * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
7141         * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
7143         * include/bits/ranges_uninitialized.h
7144         (uninitialized_copy_fn::operator()): Pass a reference type as the first
7145         argument to is_nothrow_assignable_v.
7146         (uninitialized_copy_fn::operator()): Likewise.
7147         (uninitialized_move_fn::operator()): Likewise.  Return an in_out_result
7148         with the input iterator stripped of its move_iterator.
7149         (uninitialized_move_n_fn::operator()): Likewise.
7150         (uninitialized_fill_fn::operator()): Pass a reference type as the first
7151         argument to is_nothrow_assignable_v.
7152         (uninitialized_fill_n_fn::operator()): Likewise.
7154 2020-03-03  Jonathan Wakely  <jwakely@redhat.com>
7156         PR libstdc++/94013
7157         * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
7158         traits to control when to use memmove and memcmp optimizations.
7159         (__is_nonvolatile_trivially_copyable): New helper trait.
7160         * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
7161         use memcmp optimization with volatile data.
7162         * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
7163         (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
7164         * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
7165         (__copy_move_backward_a2): Likewise.
7166         (__equal_aux1): Use __memcmpable.
7167         (__lexicographical_compare_aux): Do not use memcmp optimization with
7168         volatile data.
7169         * testsuite/25_algorithms/copy/94013.cc: New test.
7170         * testsuite/25_algorithms/copy_backward/94013.cc: New test.
7171         * testsuite/25_algorithms/equal/94013.cc: New test.
7172         * testsuite/25_algorithms/fill/94013.cc: New test.
7173         * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
7174         * testsuite/25_algorithms/move/94013.cc: New test.
7175         * testsuite/25_algorithms/move_backward/94013.cc: New test.
7177         * include/bits/stl_algobase.h (lexicographical_compare_three_way):
7178         Avoid redundant iterator comparisons (LWG 3410).
7180 2020-03-02  Jonathan Wakely  <jwakely@redhat.com>
7182         PR libstdc++/93972
7183         * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
7184         differ.
7185         * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
7187         * include/std/ranges (__detail::__maybe_empty_t): Rename to
7188         __maybe_present_t.
7189         (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
7191         * include/bits/ranges_algo.h (shift_right): Add 'typename' to
7192         dependent type.
7194 2020-03-01  H.J. Lu  <hongjiu.lu@intel.com>
7196         * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
7198 2020-02-29  John David Anglin  <danglin@gcc.gnu.org>
7200         * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
7201         * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
7202         * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
7203         * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
7204         * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
7206         * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
7207         Add libatomic option.
7208         * testsuite/30_threads/jthread/jthread.cc: Likewise.
7210 2020-02-29  François Dumont  <fdumont@gcc.gnu.org>
7212         * include/bits/stl_algo.h
7213         (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
7214         * include/bits/stl_algobase.h: ...here.
7215         * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
7217 2020-02-29  John David Anglin  <danglin@gcc.gnu.org>
7219         * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
7220         option.
7221         * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
7222         Likewise.
7223         * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
7224         * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
7225         * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
7226         * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
7227         * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
7228         * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
7229         * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
7230         Likewise.
7232         PR libstdc++/92906
7233         * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
7235 2020-02-28  Patrick Palka  <ppalka@redhat.com>
7237         PR libstdc++/93972
7238         * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
7239         Fix condition for when to use memcmp, making it consistent with the
7240         corresponding condition used in std::lexicographical_compare.
7241         * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
7243         * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
7244         functions introduced in C++11, C++17 and C++2a.  Add 'constexpr' to
7245         existing signatures for C++2a.
7247 2020-02-28  Jonathan Wakely  <jwakely@redhat.com>
7249         * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
7250         test instead of just compiling it.
7252 2020-02-28  Patrick Palka  <ppalka@redhat.com>
7254         * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
7255         whenever the underlying range models common_range.
7257         * include/std/ranges (__detail::_CachedPosition): New struct.
7258         (views::filter_view::_S_needs_cached_begin): New member variable.
7259         (views::filter_view::_M_cached_begin): New member variable.
7260         (views::filter_view::begin): Use _M_cached_begin to cache its
7261         result.
7262         (views::drop_view::_S_needs_cached_begin): New static member variable.
7263         (views::drop_view::_M_cached_begin): New member variable.
7264         (views::drop_view::begin): Use _M_cached_begin to cache its result
7265         when _S_needs_cached_begin.
7266         (views::drop_while_view::_M_cached_begin): New member variable.
7267         (views::drop_while_view::begin): Use _M_cached_begin to cache its
7268         result.
7269         (views::reverse_view::_S_needs_cached_begin): New static member
7270         variable.
7271         (views::reverse_view::_M_cached_begin): New member variable.
7272         (views::reverse_view::begin): Use _M_cached_begin to cache its result
7273         when _S_needs_cached_begin.
7274         * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
7275         drop_view::begin caches its result.
7276         * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
7277         that drop_while_view::begin caches its result.
7278         * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
7279         filter_view::begin caches its result.
7280         * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
7281         reverse_view::begin caches its result.
7283 2020-02-28  Jonathan Wakely  <jwakely@redhat.com>
7285         * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
7286         filesystems that silently truncate timestamps.
7287         * testsuite/experimental/filesystem/operations/last_write_time.cc:
7288         Likewise.
7290         * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
7291         -Wstringop-overflow warnings.
7293 2020-02-27  Jonathan Wakely  <jwakely@redhat.com>
7295         * testsuite/lib/libstdc++.exp (v3_target_compile): Add
7296         -fdiagnostics-urls=never to options.
7298 2020-02-27  Patrick Palka  <ppalka@redhat.com>
7300         * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
7301         _Iterator<!_Const>.
7302         (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
7303         (take_view::_Sentinel<_Const>): Likewise.
7304         (take_while_view::_Sentinel<_Const>): Likewise.
7305         (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
7306         * testsuite/std/ranges/adaptors/split.cc: Augment test.
7307         * testsuite/std/ranges/adaptors/take.cc: Augment test.
7308         * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
7309         * testsuite/std/ranges/adaptors/transform.cc: Augment test.
7311         * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
7312         base() of a vector<>::iterator is a pointer.
7313         * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
7314         * testsuite/25_algorithms/move/constrained.cc: Likewise.
7315         * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
7316         * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
7317         instead of &foo[0].
7318         * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
7319         * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
7320         * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
7321         * testsuite/25_algorithms/sort/constrained.cc: Likewise.
7322         * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
7324 2020-02-27  Jonathan Wakely  <jwakely@redhat.com>
7326         * include/debug/array (operator<=>): Define for C++20.
7327         * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
7328         Adjust dg-error line numbers.
7329         * testsuite/23_containers/array/tuple_interface/
7330         tuple_element_debug_neg.cc: Likewise.
7332         * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
7333         defining _GLIBCXX_ASSERTIONS.
7334         * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
7335         * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
7336         * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
7337         * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
7338         * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
7339         * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
7340         * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
7341         * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
7342         * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
7343         * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
7344         * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
7345         * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
7347         * include/debug/string (__gnu_debug::basic_string::insert): Fix for
7348         C++98 where the member function of the base class returns void.
7350         * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
7351         equality comparisons that support value-initialized iterators.
7353         * include/bits/boost_concept_check.h (__function_requires): Add
7354         _GLIBCXX14_CONSTEXPR.
7355         * testsuite/25_algorithms/min/concept_checks.cc: New test.
7357 2020-02-26  Patrick Palka  <ppalka@redhat.com>
7359         PR libstdc++/93936
7360         * include/std/ranges (split_view::_InnerIter::operator==): Compare
7361         the operands' _M_i rather than their _M_i.current().
7362         * testsuite/std/ranges/adaptors/split.cc: Augment test.
7364         P1645R1 constexpr for <numeric> algorithms
7365         * include/bits/stl_numeric.h (iota, accumulate, inner_product,
7366         partial_sum, adjacent_difference): Make conditionally constexpr for
7367         C++20.
7368         * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
7369         test macro.
7370         (reduce, transform_reduce, exclusive_scan, inclusive_scan,
7371         transform_exclusive_scan, transform_inclusive_scan): Make conditionally
7372         constexpr for C++20.
7373         * include/std/version (__cpp_lib_constexpr_numeric): Define.
7374         * testsuite/26_numerics/accumulate/constexpr.cc: New test.
7375         * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
7376         * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
7377         * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
7378         * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
7379         * testsuite/26_numerics/iota/constexpr.cc: Likewise.
7380         * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
7381         * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
7382         * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
7383         * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
7384         * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
7386 2020-02-26  Jonathan Wakely  <jwakely@redhat.com>
7388         * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
7389         variables in smaller scope and avoid calling ranges::distance when we
7390         know they are pointers. Remove statically-unreachable use of
7391         __builtin_unreachable().
7392         * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
7393         Define inline.
7395         * include/std/ranges (__detail::__maybe_empty_t): Define new helper
7396         alias.
7397         (__detail::__maybe_const_t): Likewise.
7398         (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
7399         (transform_view, take_view, take_while_view, elements_view): Use
7400         __maybe_const_t.
7401         (join_view, split_view): Use both.
7403 2020-02-25  Patrick Palka  <ppalka@redhat.com>
7405         LWG 3397 basic_istream_view::iterator should not provide
7406         iterator_category
7407         * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
7408         Rename to ...
7409         (basic_istream_view:_Iterator::iterator_concept): ... this.
7410         * testsuite/std/ranges/istream_view.cc: Augment test.
7412         LWG 3325 Constrain return type of transformation function for
7413         transform_view
7414         * include/std/ranges (transform_view): Constrain the return type of the
7415         transformation function as per LWG 3325.
7416         * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
7418         LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
7419         * include/std/ranges (join_view::_Iterator::operator--): Require that
7420         range_reference_t<_Base> models common_range.
7421         * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
7423         LWG 3301 transform_view::_Iterator has incorrect iterator_category
7424         * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
7425         determination of iterator_category as per LWG 3301.
7426         * testsuite/std/ranges/adaptors/transform.cc: Augment test.
7428         LWG 3292 iota_view is under-constrained
7429         * include/std/ranges (iota_view): Require that _Winc models semiregular
7430           as per LWG 3292.
7431         * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
7433 2020-02-25  Jonathan Wakely  <jwakely@redhat.com>
7435         * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
7436         during constant evaluation. Call __builtin_memmove directly instead of
7437         __memmove.
7438         (__copy_or_move_backward): Likewise.
7439         * include/bits/stl_algobase.h (__memmove): Remove.
7440         (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
7441         (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
7442         Use __builtin_memmove directly instead of __memmove.
7443         (__copy_move_a2): Do not use memmove during constant evaluation.
7444         (__copy_move_backward_a2): Use _IsMove constant to select correct
7445         __copy_move_backward specialization.
7446         * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
7447         begin turned into moves during constant evaluation.
7449         * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
7450         previous commit.
7452         PR libstdc++/93872
7453         * include/bits/stl_algobase.h (__memmove): Cast away const before
7454         doing move assignment.
7455         * testsuite/25_algorithms/move/93872.cc: New test.
7456         * testsuite/25_algorithms/move_backward/93872.cc: New test.
7458 2020-02-24  Patrick Palka  <ppalka@redhat.com>
7460         PR libstdc++/93884
7461         * include/bits/ranges_algobase.h (__copy_or_move,
7462         __copy_or_move_backward): Don't inspect the iter_value_t of the output
7463         iterator, instead inspect its iterator_traits directly.
7464         * include/bits/stl_iterator.h (back_insert_iterator::container):
7465         Conditionally initialize.
7466         (back_insert_iterator::difference_type): Conditionally define.
7467         (back_insert_iterator::back_insert_iterator): Conditionally define this
7468         default constructor.
7469         (front_insert_iterator::container): Conditionally initialize.
7470         (front_insert_iterator::difference_type): Conditionally define.
7471         (front_insert_iterator::front_insert_iterator): Conditionally define
7472         this default constructor.
7473         * 24_iterators/back_insert_iterator/pr93884.cc: New test.
7474         * 24_iterators/front_insert_iterator/pr93884.cc: New test.
7476         P0769R2 Add shift to <algorithm>
7477         * include/bits/ranges_algo.h (shift_left, shift_right): New.
7478         * testsuite/25_algorithms/shift_left/1.cc: New test.
7479         * testsuite/25_algorithms/shift_right/1.cc: New test.
7481 2020-02-24  Jonathan Wakely  <jwakely@redhat.com>
7483         * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
7484         Make noexcept-specifier conditional.
7485         * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
7486         noexcept-specifier.
7488         * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
7489         Add constructor.
7490         (operator==(istream_iterator, default_sentinel_t)): Add operator.
7491         (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
7492         * include/bits/streambuf_iterator.h
7493         (istreambuf_iterator(default_sentinel_t)): Add constructor.
7494         (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
7495         * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
7496         New test.
7497         * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
7498         * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
7499         New test.
7500         * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
7502         * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
7503         (ranges::enable_view): Simplify (LWG 3326).
7504         * include/bits/range_access.h (ranges::enable_view): Declare.
7505         * include/bits/regex.h (__enable_view_impl): Remove partial
7506         specialization.
7507         * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
7508         * include/bits/stl_set.h (__enable_view_impl): Likewise.
7509         * include/bits/unordered_set.h (__enable_view_impl): Likewise.
7510         * include/debug/multiset.h (__enable_view_impl): Likewise.
7511         * include/debug/set.h (__enable_view_impl): Likewise.
7512         * include/debug/unordered_set (__enable_view_impl): Likewise.
7513         * include/experimental/string_view (ranges::enable_view): Define
7514         partial specialization.
7515         * include/std/span (ranges::enable_view): Likewise.
7516         * include/std/string_view (ranges::enable_view): Likewise.
7517         * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
7519 2020-02-21  Jonathan Wakely  <jwakely@redhat.com>
7521         * include/std/optional (operator<=>(optional<T>, optional<U>))
7522         (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
7523         Define for C++20.
7524         * include/std/tuple (__tuple_cmp): New helper function for <=>.
7525         (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
7526         * include/std/variant (operator<=>(variant<T...>, variant<T...>))
7527         (operator<=>(monostate, monostate)): Define for C++20.
7528         * testsuite/20_util/optional/relops/three_way.cc: New test.
7529         * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
7530         * testsuite/20_util/variant/89851.cc: Move to ...
7531         * testsuite/20_util/variant/relops/89851.cc: ... here.
7532         * testsuite/20_util/variant/90008.cc: Move to ...
7533         * testsuite/20_util/variant/relops/90008.cc: ... here.
7534         * testsuite/20_util/variant/relops/three_way.cc: New test.
7536 2020-02-20  Patrick Palka  <ppalka@redhat.com>
7538         * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
7539         function.
7540         (views::__adaptor::_RangeAdaptor::operator()): Add comments.  Use
7541         __maybe_refwrap to capture lvalue references by reference, and then use
7542         unwrap_reference_t to forward the by-reference captures as references.
7543         * testsuite/std/ranges/adaptors/split.cc: Augment test.
7544         * testsuite/std/ranges/adaptors/split_neg.cc: New test.
7546         * include/std/ranges (iota_view): Forward declare _Sentinel.
7547         (iota_view::_Iterator): Befriend _Sentinel.
7548         (iota_view::_Sentinel::_M_equal): New member function.
7549         (iota_view::_Sentinel::operator==): Use it.
7550         (views::_Iota::operator()): Forward __f using the correct type.
7551         * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
7552         with integers of different signedness, to appease iota_view's deduction
7553         guide.
7554         * testsuite/std/ranges/iota/iota_view.cc: Augment test.
7556 2020-02-20  Jonathan Wakely  <jwakely@redhat.com>
7558         * include/bits/range_access.h (ranges::begin): Reject array of
7559         incomplete type.
7560         (ranges::end, ranges::size): Require arrays to be bounded.
7561         (ranges::data): Require lvalue or borrowed_range.
7562         (ranges::iterator_t): Remove constraint.
7563         * testsuite/std/ranges/access/begin.cc: Do not check array of
7564         incomplete type.
7565         * testsuite/std/ranges/access/begin_neg.cc: New test.
7566         * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
7567         * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
7568         * testsuite/std/ranges/access/ssize.cc: Do not check array of
7569         incomplete type.
7571         * include/std/system_error (error_category::operator<=>)
7572         (operator<=>(const error_code&, const error_code&))
7573         (operator<=>(const error_condition&, const error_condition&)): Define
7574         for C++20.
7575         * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
7576         * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
7577         test.
7578         * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
7579         incorrect comment.
7580         * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
7581         * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
7582         incorrect comment.
7583         * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
7584         * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
7585         incorrect comment.
7586         * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
7587         * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
7588         Remove incorrect comment.
7589         * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
7590         test.
7592         * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
7594         * include/std/thread (thread::id::operator<=>): Define for C++20.
7595         * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
7596         functions in namespace std.
7597         * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
7599 2020-02-19  Patrick Palka  <ppalka@redhat.com>
7601         * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
7602         null terminator of the underlying string as part of the test_range.
7603         (main): Call test03.
7605 2020-02-19  Jonathan Wakely  <jwakely@redhat.com>
7607         * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
7608         requirement (LWG 3385).
7609         * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
7610         expected declaration.
7612         * include/std/ranges (take_while_view, drop_view, drop_while_view)
7613         (elements_view:_Iterator): Initialize data members (LWG 3364).
7615         * libsupc++/compare (three_way_comparable): Remove always-false check
7616         that should have been removed with weak_equality (P1959R0).
7617         (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
7619         * include/std/concepts (__detail::__partially_ordered_with): Move here
7620         from <compare>.
7621         (totally_ordered, totally_ordered_with): Use __partially_ordered_with
7622         to simplify definition (LWG 3331).
7623         * libsupc++/compare (__detail::__partially_ordered_with): Move to
7624         <concepts>.
7626         * include/std/concepts (totally_ordered_with): Remove redundant
7627         requirement (LWG 3329).
7629         * include/std/ranges (__detail::__convertible_to_non_slicing): New
7630         helper concept.
7631         (__detail::__pair_like_convertible_to): Remove.
7632         (__detail::__pair_like_convertible_from): Add requirements for
7633         non-slicing conversions.
7634         (subrange): Constrain constructors with __convertible_to_non_slicing.
7635         Remove constructors from pair-like types. Add new deduction guide.
7636         * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
7638         * include/bits/iterator_concepts.h (iter_move): Add declaration to
7639         prevent unqualified lookup finding a suitable declaration (LWG 3247).
7641         * include/std/memory_resource (polymorphic_allocator::allocate)
7642         (polymorphic_allocator::allocate_object): Change type of exception to
7643         bad_array_new_length (LWG 3237).
7644         * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
7646         * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
7647         * include/std/version (__cpp_lib_unwrap_ref): Likewise.
7648         * testsuite/20_util/unwrap_reference/1.cc: Check macro.
7649         * testsuite/20_util/unwrap_reference/3.cc: New test.
7651         * include/std/numeric (midpoint(T8, T*)): Do not check for complete
7652         type during overload resolution, use static assert instead (LWG 3200).
7653         * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
7654         incomplete type.
7655         * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
7657         * include/std/span (span(T (&)[N])): Use non-deduced context to
7658         prevent first parameter from interfering with class template argument
7659         deduction (LWG 3369).
7660         * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
7661         * testsuite/23_containers/span/lwg3255.cc: Check for construction from
7662         rvalues.
7664         * include/std/span (span::const_iterator, span::const_reverse_iterator)
7665         (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
7666         Remove (LWG 3320).
7667         * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
7668         and cend.
7669         * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
7670         Likewise.
7671         * testsuite/20_util/specialized_algorithms/uninitialized_copy/
7672         constrained.cc: Likewise.
7673         * testsuite/20_util/specialized_algorithms/
7674         uninitialized_default_construct/constrained.cc: Likewise.
7675         * testsuite/20_util/specialized_algorithms/uninitialized_fill/
7676         constrained.cc: Likewise.
7677         * testsuite/20_util/specialized_algorithms/uninitialized_move/
7678         constrained.cc: Likewise.
7679         * testsuite/20_util/specialized_algorithms/
7680         uninitialized_value_construct/constrained.cc: Likewise.
7682         * include/bits/range_access.h (range_size_t): Define alias template.
7683         * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
7684         * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
7686         * include/std/ranges (filter_view, transform_view, take_view)
7687         (join_view, split_view, reverse_view): Remove commented-out converting
7688         constructors (LWG 3280).
7690         * include/std/memory (uninitialized_construct_using_allocator): Use
7691         std::construct_at (LWG 3321).
7693         * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
7694         (polymorphic_allocator::allocate_object)
7695         (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
7697         LWG 3379. "safe" in several library names is misleading
7698         * include/bits/range_access.h (enable_safe_range): Rename to
7699         enable_borrowed_range.
7700         (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
7701         (safe_range): Rename to borrowed_range.
7702         * include/bits/ranges_algo.h: Adjust to use new names.
7703         * include/bits/ranges_algobase.h: Likewise.
7704         * include/bits/ranges_uninitialized.h: Likewise.
7705         * include/std/ranges: Likewise.
7706         (safe_iterator_t): Rename to borrowed_iterator_t.
7707         (safe_subrange_t): Rename to borrowed_subrange_t.
7708         * include/std/span: Adjust to use new names.
7709         * include/std/string_view: Likewise.
7710         * include/experimental/string_view: Likewise.
7711         * testsuite/std/ranges/access/begin.cc: Likewise.
7712         * testsuite/std/ranges/access/cbegin.cc: Likewise.
7713         * testsuite/std/ranges/access/cdata.cc: Likewise.
7714         * testsuite/std/ranges/access/cend.cc: Likewise.
7715         * testsuite/std/ranges/access/crbegin.cc: Likewise.
7716         * testsuite/std/ranges/access/crend.cc: Likewise.
7717         * testsuite/std/ranges/access/data.cc: Likewise.
7718         * testsuite/std/ranges/access/end.cc: Likewise.
7719         * testsuite/std/ranges/access/rbegin.cc: Likewise.
7720         * testsuite/std/ranges/access/rend.cc: Likewise.
7721         * testsuite/std/ranges/safe_range.cc: Likewise.
7722         * testsuite/std/ranges/safe_range_types.cc: Likewise.
7723         * testsuite/util/testsuite_iterators.h: Likewise.
7725         * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
7726         (tuple_element<1, const subrange<I, S, K>>): Add partial
7727         specializations (LWG 3398).
7728         * testsuite/std/ranges/subrange/tuple_like.cc: New test.
7730         * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
7731         (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
7732         (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
7734 2020-02-18  Patrick Palka  <ppalka@redhat.com>
7736         P1983R0 Wording for GB301, US296, US292, US291, and US283
7737         * include/std/ranges (filter_view::pred): New member function.
7738         (join_view::_Iterator::_Iterator): Remove now-redundant comment since
7739         P1983R0 fixes the highlighted issue in the same way.
7740         (join_view::_Iterator<_Const>): Add friend
7741         join_view::_Iterator<!_Const>.
7742         (join_view::_M_inner): Remove mutable specifier, effectively reverting
7743         the proposed wording changes of P3278.
7744         (join_view::begin): Refine the condition for when to return a const
7745         iterator.
7746         (split_view::_OuterIter::_OuterIter): Adjust constraints.
7747         * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
7748         exists and works.
7750 2020-02-18  Jonathan Wakely  <jwakely@redhat.com>
7752         PR libstdc++/93818
7753         * include/std/ranges (_RangeAdaptor): Add deduction guide.
7754         (filter_view::_Iterator): Add alias _Vp_iter and use in place of
7755         iterator_t<_Vp>.
7756         (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
7757         (transform_view::_Iterator): Add alias _Base_iter and use in place of
7758         iterator_t<_Base>.
7759         (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
7760         (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
7761         (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
7762         (split_view::_InnerIter::_S_iter_cat()): Likewise.
7764         * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
7765         assumption that long is wider than int.
7766         * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
7767         * testsuite/20_util/integer_comparisons/less.cc: Likewise.
7768         * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
7769         * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
7771         P1976R2 Fixed-size span construction from dynamic range
7772         * include/std/span (__cpp_lib_span): Update value.
7773         (span(It, size_type), span(It, End)): Make conditionally explicit. Add
7774         assertion.
7775         (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
7776         constraints.
7777         (span::first<Count>(), span::last<Count>()): Use explicit type in
7778         return statement.
7779         (as_bytes, as_writable_bytes): Likewise.
7780         * include/std/version (__cpp_lib_span): Update value.
7781         * testsuite/23_containers/span/1.cc: Check new value.
7782         * testsuite/23_containers/span/2.cc: Check new value.
7783         * testsuite/23_containers/span/explicit.cc: New test.
7785         * include/std/span (span::__is_compatible_array): Simplify alias
7786         template by using requires-clause.
7787         (span::__is_compatible_ref): New alias template for constraining
7788         constructors.
7789         (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
7790         (span(It, size_type), span(It, End)): Use __is_compatible_ref.
7791         (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
7792         redundant parentheses.
7793         (span(R&&)): Add missing constraints.
7795         * include/std/span (span): Reorder members and rename template
7796         parameters to match declarations in the C++2a working paper.
7798         P2116R0 Remove tuple-like protocol support from fixed-extent span
7799         * include/std/span (get, tuple_size, tuple_element): Remove.
7800         * testsuite/23_containers/span/everything.cc: Remove checks for
7801         tuple-like API.
7802         * testsuite/23_containers/span/get_neg.cc: Remove.
7803         * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
7804         * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
7805         * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
7807 2020-02-17  Patrick Palka  <ppalka@redhat.com>
7809         P2106R0 Alternative wording for GB315 and GB316
7810         * include/bits/ranges_algo.h (in_fun_result): New.
7811         (for_each_result, for_each_n_result): Change into an alias of
7812         in_fun_result.
7813         (in_in_result): New.
7814         (mismatch_result): Change into an alias of in_in_result.
7815         (copy_if_result): Change into an alias of in_out_result.
7816         (swap_ranges_result): Change into an alias of in_in_result.
7817         (unary_transform_result): Change into an alias of in_out_result.
7818         (in_in_out_result): New.
7819         (binary_transform_result): Change into an alias of in_in_out_result.
7820         (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
7821         remove_copy_result, unique_copy_result, reverse_copy_result,
7822         rotate_copy_result, partial_sort_copy_result): Change into an alias of
7823         in_out_result.
7824         (in_out_out_result): New.
7825         (partition_copy_result, merge_result): Change into an alias of
7826         in_out_out_result.
7827         (set_union_result, set_intersection_result): Change into an alias of
7828         in_in_out_result.
7829         (set_difference_result): Change into an alias of in_out_result.
7830         (set_symmetric_difference): Change into an alias of in_in_out_result.
7831         (min_max_result): New.
7832         (minmax_result, minmax_element_result): Change into an alias of
7833         min_max_result.
7834         (in_found_result): New.
7835         (next_permutation_result, prev_permutation_result): Change into an alias
7836         of in_found_result.
7837         (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
7838         Adjust following changes to next_permutation_result and
7839         prev_permutation_result.
7840         * include/bits/ranges_algobase.h (in_out_result): New.
7841         (copy_result, move_result, move_backward_result, copy_backward_result,
7842         copy_n_result): Change into an alias of in_out_result.
7843         * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
7844         uninitialized_copy_n_result, uninitialized_move_result,
7845         uninitialized_move_n_result): Likewise.
7846         * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
7847         structured bindings.
7848         * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
7850         P1243R4 Rangify new algorithms
7851         * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
7852         for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
7853         * testsuite/25_algorithms/clamp/constrained.cc: New test.
7854         * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
7855         * testsuite/25_algorithms/sample/constrained.cc: New test.
7857 2020-02-17  Jonathan Wakely  <jwakely@redhat.com>
7859         P1964R2 Wording for boolean-testable
7860         * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
7861         (__adjacent_find_fn): Cast result of predicate to bool.
7862         * include/std/concepts (__boolean): Remove.
7863         (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
7864         new helper concepts.
7865         (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
7866         (predicate): Use __boolean_testable instead of boolean.
7867         * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
7868         Likewise.
7870         P1970R2 Consistency for size() functions: Add ranges::ssize
7871         * include/bits/range_access.h (_SSize, ssize): Define for C++20.
7872         * testsuite/std/ranges/access/ssize.cc: New test.
7874         P1956R1 On the names of low-level bit manipulation functions
7875         * include/bits/hashtable_policy.h: Update comment.
7876         * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
7877         (ispow2, ceil2, floor2, log2p1): Likewise.
7878         (__cpp_lib_int_pow2): Add feature test macro.
7879         * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
7880         * include/std/memory (assume_aligned): Adjust use of ispow2.
7881         * include/std/version (__cpp_lib_int_pow2): Add.
7882         * libsupc++/new_opa.cc: Adjust use of __ispow2.
7883         * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
7884         * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
7885         * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
7886         * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
7887         * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
7888         * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
7889         * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
7890         * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
7891         * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
7892         * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
7893         * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
7894         * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
7896         * include/std/charconv: Add comment.
7898         PR libstdc++/92546 (partial)
7899         * include/bits/random.h (uniform_random_bit_generator): Move definition
7900         to <bits/uniform_int_dist.h>.
7901         * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
7902         of <bits/random.h>.
7903         * include/bits/ranges_algobase.h: Do not include <cmath>.
7904         * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
7905         Move here.
7906         * include/std/ranges: Do not include <limits>.
7907         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
7909         PR libstdc++/92546 (partial)
7910         * include/Makefile.am: Add new header.
7911         * include/Makefile.in: Regenerate.
7912         * include/bits/int_limits.h: New header.
7913         * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
7914         numeric_limits with __detail::__int_limits.
7915         * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
7916         (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
7917         Likewise.
7918         * include/std/charconv (__to_chars_8, __from_chars_binary)
7919         (__from_chars_alpha_to_num, from_chars): Likewise.
7920         * include/std/memory_resource (polymorphic_allocator::allocate)
7921         (polymorphic_allocator::allocate_object): Likewise.
7922         * include/std/string_view (basic_string_view::_S_compare): Likewise.
7923         * include/std/utility (in_range): Likewise.
7924         * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
7925         extra error about incomplete type __int_limits<bool>.
7926         * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
7927         * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
7928         * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
7929         * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
7930         * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
7931         * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
7932         * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
7933         * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
7934         * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
7935         * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
7936         * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
7937         * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
7939         * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
7940         value for partial_ordering::unordered.
7942         * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
7943         const-qualified expression variations.
7944         * include/std/concepts (copyable): Likewise.
7946         * include/std/type_traits (__is_standard_integer): New helper trait.
7947         * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
7948         (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
7949         * include/std/version (__cpp_lib_integer_comparison_functions): Define.
7950         * testsuite/20_util/integer_comparisons/1.cc: New test.
7951         * testsuite/20_util/integer_comparisons/2.cc: New test.
7952         * testsuite/20_util/integer_comparisons/equal.cc: New test.
7953         * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
7954         * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
7955         * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
7956         * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
7957         * testsuite/20_util/integer_comparisons/in_range.cc: New test.
7958         * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
7959         * testsuite/20_util/integer_comparisons/less.cc: New test.
7960         * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
7961         * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
7962         * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
7963         * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
7964         * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
7966 2020-02-16  Patrick Palka  <ppalka@redhat.com>
7968         * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
7969         Move code after an early exit constexpr if to under an else branch.
7970         * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
7972 2020-02-15  Patrick Palka  <ppalka@redhat.com>
7974         * include/bits/ranges_algo.h: Adjust whitespace and formatting.
7975         * include/bits/ranges_algobase.h: Likewise.
7976         * include/bits/ranges_uninitialized.h: Likewise.
7978         * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
7979         binary_search, copy_if, count, count_if, equal_range, find, find_end,
7980         find_first_of, find_if, find_if_not, for_each, generate, generate_n,
7981         includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
7982         is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
7983         lower_bound, make_heap, max, max_element, merge, min, min_element,
7984         minmax, minmax_element, mismatch, next_permutation, none_of,
7985         nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
7986         partition_point, pop_heap, prev_permutation, push_heap, remove,
7987         remove_copy, remove_copy_if, remove_if, replace, replace_copy,
7988         replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
7989         search, search_n, set_difference, set_intersection,
7990         set_symmetric_difference, set_union, shuffle, sort, sort_heap,
7991         stable_partition, stable_sort, swap_ranges, transform, unique,
7992         unique_copy, upper_bound): Convert into function objects.
7993         * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
7994         fill, move_backward, copy_backward): Likewise.
7995         * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
7996         uninitialized_default_construct_n, uninitialized_value_construct,
7997         uninitialized_value_construct_n, uninitialized_copy,
7998         uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
7999         uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
8000         destroy, destroy_n): Likewise.
8002         * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
8003         (ranges::find_end): ... here.
8004         (ranges::__lexicographical_compare): Fold into ...
8005         (ranges::lexicographical_compare): ... here.
8006         * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
8007         (ranges::equal): ... here.
8009 2020-02-15  Jonathan Wakely  <jwakely@redhat.com>
8011         * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
8012         * include/std/deque: Likewise.
8013         * include/std/forward_list: Likewise.
8014         * include/std/list: Likewise.
8015         * include/std/string: Likewise.
8016         * include/std/vector: Likewise.
8017         * include/std/version: Likewise.
8018         * testsuite/23_containers/deque/erasure.cc: Test for new value.
8019         * testsuite/23_containers/forward_list/erasure.cc: Likewise.
8020         * testsuite/23_containers/list/erasure.cc: Likewise.
8021         * testsuite/23_containers/map/erasure.cc: Likewise.
8022         * testsuite/23_containers/set/erasure.cc: Likewise.
8023         * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
8024         * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
8025         * testsuite/23_containers/vector/erasure.cc: Likewise.
8027 2020-02-15  Jonathan Wakely  <jwakely@redhat.com>
8029         * include/bits/random.h (uniform_random_bit_generator): Require min()
8030         and max() to be constant expressions and min() to be less than max().
8031         * testsuite/26_numerics/random/concept.cc: Check additional cases.
8032         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
8034 2020-02-13  Patrick Palka  <ppalka@redhat.com>
8036         * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
8037         * include/Makefile.in: Regenerate.
8038         * include/bits/ranges_uninitialized.h: New header.
8039         * include/std/memory: Include it.
8040         * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
8041         test.
8042         * .../uninitialized_copy/constrained.cc: New test.
8043         * .../uninitialized_default_construct/constrained.cc: New test.
8044         * .../uninitialized_fill/constrained.cc: New test.
8045         * .../uninitialized_move/constrained.cc: New test.
8046         * .../uninitialized_value_construct/constrained.cc: New test.
8048         * include/Makefile.am: Add bits/ranges_algobase.h
8049         * include/Makefile.in: Regenerate.
8050         * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
8051         existing #includes.
8052         (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
8053         __detail::__is_move_iterator, copy_result, move_result,
8054         __equal, equal, copy_result, move_result, move_backward_result,
8055         copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
8056         move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
8057         fill): Split out into ...
8058         * bits/range_algobase.h: ... this new header.
8060 2020-02-12  Patrick Palka  <ppalka@redhat.com>
8062         LWG 3389 and LWG 3390
8063         * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
8064         constructing the move_iterator with __i.
8065         (counted_iterator::counted_iterator): Use std::move when initializing
8066         M_current with __i.
8067         * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
8068         * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
8070 2020-02-12  Sandra Loosemore  <sandra@codesourcery.com>
8072         PR libstdc++/79193
8073         PR libstdc++/88999
8075         * configure: Regenerated.
8077 2020-02-12  François Dumont  <fdumont@gcc.gnu.org>
8079         * include/bits/hashtable.h
8080         (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
8081         missing std namespace qualification to forward call.
8083 2020-02-09  Jonathan Wakely  <jwakely@redhat.com>
8085         * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
8086         comment.
8087         * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
8089         * include/std/ranges: Fix non-ASCII characters in comment.
8091         * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
8092         equality comparison to be valid and return bool.
8093         (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
8094         * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
8095         type with ambiguous conversion to fundamental types.
8096         * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
8098 2020-02-07  Jonathan Wakely  <jwakely@redhat.com>
8100         * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
8101         Use remove_cvref_t.
8102         (readable_traits): Rename to indirectly_readable_traits.
8103         (readable): Rename to indirectly_readable.
8104         (writable): Rename to indirectly_writable.
8105         (__detail::__iter_exchange_move): Do not use remove_reference_t.
8106         (indirectly_swappable): Adjust requires expression parameter types.
8107         expression.
8108         * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
8109         (ranges::replace_if, ranges::generate_n, ranges::generate)
8110         (ranges::remove): Use new name for writable.
8111         * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
8112         Use new name for readable.
8113         * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
8114         new name for readable_traits.
8115         * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
8116         * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
8117         new definition of indirectly_readable.
8119         * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
8120         to take parameters of common_iterator, instead of the common_iterator
8121         type itself. Fix argument for __common_iter_has_arrow constraint.
8122         (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
8124 2020-02-07  Jonathan Wakely  <jwakely@redhat.com>
8126         * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
8127         warning.
8128         (basic_istream_view::_Iterator::operator++()): Add missing return.
8130 2020-02-07  Patrick Palka  <ppalka@redhat.com>
8132         * include/bits/ranges_algo.h: Remove extraneous &&.
8134         * include/std/ranges (ranges::__detail::__stream_extractable,
8135         ranges::basic_istream_view, ranges::istream_view): Define.
8136         * testsuite/std/ranges/istream_view: New test.
8138         Implement C++20 range adaptors
8139         * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
8140         (subrange::_S_store_size): Mark as const instead of constexpr to
8141         avoid what seems to be a bug in GCC.
8142         (__detail::__box): Give it defaulted copy and move constructors.
8143         (ranges::views::_Single::operator()): Mark constexpr.
8144         (ranges::views::_Iota::operator()): Mark constexpr.
8145         (__detail::Empty): Define.
8146         (ranges::views::__closure::_RangeAdaptor,
8147         ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
8148         ranges::views::all, ranges::__detail::find_if,
8149         ranges::__detail::find_if_not, ranges::__detail::mismatch,
8150         ranges::detail::min, filter_view, ranges::views::filter, transform_view,
8151         ranges::views::transform, take_view, ranges::views::take,
8152         take_while_view, ranges::views::take_while, drop_view,
8153         ranges::views::drop, join_view, ranges::views::join,
8154         __detail::require_constant, __detail::tiny_range, split_view,
8155         ranges::views::split, ranges::views::_Counted, ranges::views::counted,
8156         common_view, ranges::views::common, reverse_view,
8157         ranges::views::reverse,
8158         ranges::views::__detail::__is_reversible_subrange,
8159         ranges::views::__detail::__is_reverse_view, reverse_view,
8160         ranges::views::reverse, __detail::__has_tuple_element, elements_view,
8161         ranges::views::elements, ranges::views::keys, ranges::views::values):
8162         Define.
8163         (views): Alias for ranges::views.
8164         (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
8165         tuple_element<1, ranges::subrange>): New partial specializations.
8166         * testsuite/std/ranges/adaptors/all.cc: New test.
8167         * testsuite/std/ranges/adaptors/common.cc: Likewise.
8168         * testsuite/std/ranges/adaptors/counted.cc: Likewise.
8169         * testsuite/std/ranges/adaptors/drop.cc: Likewise.
8170         * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
8171         * testsuite/std/ranges/adaptors/elements.cc: Likewise.
8172         * testsuite/std/ranges/adaptors/filter.cc: Likewise.
8173         * testsuite/std/ranges/adaptors/join.cc: Likewise.
8174         * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
8175         * testsuite/std/ranges/adaptors/split.cc: Likewise.
8176         * testsuite/std/ranges/adaptors/take.cc: Likewise.
8177         * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
8178         * testsuite/std/ranges/adaptors/transform.cc: Likewise.
8180 2020-02-07  Jonathan Wakely  <jwakely@redhat.com>
8182         * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
8183         type of enumerations and comparison category types.
8184         (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
8185         (__cmp_cat::_Ncmp::unordered): Change value to 2.
8186         (partial_ordering::_M_value, weak_ordering::_M_value)
8187         (strong_ordering::_M_value): Change type to __cmp_cat::type.
8188         (partial_ordering::_M_is_ordered): Remove data member.
8189         (partial_ordering): Use second bit of _M_value for unordered. Adjust
8190         comparison operators.
8191         (weak_ordering::operator partial_ordering): Simplify to remove
8192         branches.
8193         (operator<=>(unspecified, weak_ordering)): Likewise.
8194         (strong_ordering::operator partial_ordering): Likewise.
8195         (strong_ordering::operator weak_ordering): Likewise.
8196         (operator<=>(unspecified, strong_ordering)): Likewise.
8197         * testsuite/18_support/comparisons/categories/partialord.cc: New test.
8198         * testsuite/18_support/comparisons/categories/strongord.cc: New test.
8199         * testsuite/18_support/comparisons/categories/weakord.cc: New test.
8201         * include/std/ranges (iota_view::_Iterator): Fix typo in name of
8202         __cpp_lib_three_way_comparison macro and use deduced return type for
8203         operator<=>.
8204         * testsuite/std/ranges/iota/iterator.cc: New test.
8206 2020-02-07  Patrick Palka  <ppalka@redhat.com>
8207             Jonathan Wakely  <jwakely@redhat.com>
8209         Implement C++20 constrained algorithms
8210         * include/Makefile.am: Add new header.
8211         * include/Makefile.in: Regenerate.
8212         * include/std/algorithm: Include <bits/ranges_algo.h>.
8213         * include/bits/ranges_algo.h: New file.
8214         * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
8215         * testsuite/25_algorithms/all_of/constrained.cc: New test.
8216         * testsuite/25_algorithms/any_of/constrained.cc: New test.
8217         * testsuite/25_algorithms/binary_search/constrained.cc: New test.
8218         * testsuite/25_algorithms/copy/constrained.cc: New test.
8219         * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
8220         * testsuite/25_algorithms/copy_if/constrained.cc: New test.
8221         * testsuite/25_algorithms/copy_n/constrained.cc: New test.
8222         * testsuite/25_algorithms/count/constrained.cc: New test.
8223         * testsuite/25_algorithms/count_if/constrained.cc: New test.
8224         * testsuite/25_algorithms/equal/constrained.cc: New test.
8225         * testsuite/25_algorithms/equal_range/constrained.cc: New test.
8226         * testsuite/25_algorithms/fill/constrained.cc: New test.
8227         * testsuite/25_algorithms/fill_n/constrained.cc: New test.
8228         * testsuite/25_algorithms/find/constrained.cc: New test.
8229         * testsuite/25_algorithms/find_end/constrained.cc: New test.
8230         * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
8231         * testsuite/25_algorithms/find_if/constrained.cc: New test.
8232         * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
8233         * testsuite/25_algorithms/for_each/constrained.cc: New test.
8234         * testsuite/25_algorithms/generate/constrained.cc: New test.
8235         * testsuite/25_algorithms/generate_n/constrained.cc: New test.
8236         * testsuite/25_algorithms/heap/constrained.cc: New test.
8237         * testsuite/25_algorithms/includes/constrained.cc: New test.
8238         * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
8239         * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
8240         * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
8241         * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
8242         * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
8243         * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
8244         test.
8245         * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
8246         * testsuite/25_algorithms/max/constrained.cc: New test.
8247         * testsuite/25_algorithms/max_element/constrained.cc: New test.
8248         * testsuite/25_algorithms/merge/constrained.cc: New test.
8249         * testsuite/25_algorithms/min/constrained.cc: New test.
8250         * testsuite/25_algorithms/min_element/constrained.cc: New test.
8251         * testsuite/25_algorithms/minmax/constrained.cc: New test.
8252         * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
8253         * testsuite/25_algorithms/mismatch/constrained.cc: New test.
8254         * testsuite/25_algorithms/move/constrained.cc: New test.
8255         * testsuite/25_algorithms/move_backward/constrained.cc: New test.
8256         * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
8257         * testsuite/25_algorithms/none_of/constrained.cc: New test.
8258         * testsuite/25_algorithms/nth_element/constrained.cc: New test.
8259         * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
8260         * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
8261         * testsuite/25_algorithms/partition/constrained.cc: New test.
8262         * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
8263         * testsuite/25_algorithms/partition_point/constrained.cc: New test.
8264         * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
8265         * testsuite/25_algorithms/remove/constrained.cc: New test.
8266         * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
8267         * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
8268         * testsuite/25_algorithms/remove_if/constrained.cc: New test.
8269         * testsuite/25_algorithms/replace/constrained.cc: New test.
8270         * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
8271         * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
8272         * testsuite/25_algorithms/replace_if/constrained.cc: New test.
8273         * testsuite/25_algorithms/reverse/constrained.cc: New test.
8274         * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
8275         * testsuite/25_algorithms/rotate/constrained.cc: New test.
8276         * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
8277         * testsuite/25_algorithms/search/constrained.cc: New test.
8278         * testsuite/25_algorithms/search_n/constrained.cc: New test.
8279         * testsuite/25_algorithms/set_difference/constrained.cc: New test.
8280         * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
8281         * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
8282         test.
8283         * testsuite/25_algorithms/set_union/constrained.cc: New test.
8284         * testsuite/25_algorithms/shuffle/constrained.cc: New test.
8285         * testsuite/25_algorithms/sort/constrained.cc: New test.
8286         * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
8287         * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
8288         * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
8289         * testsuite/25_algorithms/transform/constrained.cc: New test.
8290         * testsuite/25_algorithms/unique/constrained.cc: New test.
8291         * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
8292         * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
8294 2020-02-06  Jonathan Wakely  <jwakely@redhat.com>
8296         * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
8297         number in comment. Fix indentation.
8299         * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
8300         redundant _GLIBCXX20_CONSTEXPR.
8302         * include/std/ranges (viewable_range): Replace decay_t with
8303         remove_cvref_t (LWG 3375).
8305 2020-02-05  Jonathan Wakely  <jwakely@redhat.com>
8307         * include/bits/iterator_concepts.h (iter_reference_t)
8308         (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
8309         Remove workarounds for PR c++/67704.
8310         * testsuite/24_iterators/aliases.cc: New test.
8312 2020-02-05  Patrick Palka  <ppalka@redhat.com>
8314         * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
8315         when initializing _M_current.
8316         (move_iterator::base): Split into two overloads differing in
8317         ref-qualifiers as in P1207R4 for C++20.
8319 2020-02-04  Jonathan Wakely  <jwakely@redhat.com>
8321         * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
8322         use.
8324         PR libstdc++/93562
8325         * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
8326         (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
8327         * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
8329 2020-02-01  Andrew Burgess  <andrew.burgess@embecosm.com>
8331         * configure: Regenerate.
8333 2020-01-31  Patrick Palka  <ppalka@redhat.com>
8335         * testsuite/24_iterators/range_operations/distance.cc: Do not assume
8336         test_range::end() returns the same type as test_range::begin().
8337         * testsuite/24_iterators/range_operations/next.cc: Likewise.
8338         * testsuite/24_iterators/range_operations/prev.cc: Likewise.
8339         * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
8340         Always return a sentinel<I>.
8342 2020-01-29  Jonathan Wakely  <jwakely@redhat.com>
8344         PR libstdc++/92895
8345         * include/std/stop_token (stop_token::stop_possible()): Call new
8346         _M_stop_possible() function.
8347         (stop_token::stop_requested()): Do not use stop_possible().
8348         (stop_token::binary_semaphore): New class, as temporary stand-in for
8349         std::binary_semaphore.
8350         (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
8351         (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
8352         New data members for symchronization with stop_callback destruction.
8353         (stop_token::_Stop_cb::_Stop_cb): Make non-template.
8354         (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
8355         Remove.
8356         (stop_token::_Stop_cb::_M_run): New member function.
8357         (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
8358         Remove.
8359         (stop_token::_Stop_state::_M_owners): New data member to track
8360         reference count for ownership.
8361         (stop_token::_Stop_state::_M_value): New data member combining a
8362         spinlock, the stop requested flag, and the reference count for
8363         associated stop_source objects.
8364         (stop_token::_Stop_state::_M_requester): New data member for
8365         synchronization with stop_callback destruction.
8366         (stop_token::_Stop_state::_M_stop_possible()): New member function.
8367         (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
8368         of _M_value.
8369         (stop_token::_Stop_state::_M_add_owner)
8370         (stop_token::_Stop_state::_M_release_ownership)
8371         (stop_token::_Stop_state::_M_add_ssrc)
8372         (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
8373         updating reference counts.
8374         (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
8375         (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
8376         (stop_token::_Stop_state::_M_try_lock)
8377         (stop_token::_Stop_state::_M_try_lock_and_stop)
8378         (stop_token::_Stop_state::_M_do_try_lock): New member functions for
8379         managing spinlock.
8380         (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
8381         read and update state. Release lock while running callbacks. Use new
8382         data members to synchronize with callback destruction.
8383         (stop_token::_Stop_state::_M_remove_callback): Likewise.
8384         (stop_token::_Stop_state::_M_register_callback): Use atomic operations
8385         to read and update state.
8386         (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
8387         replacing shared_ptr.
8388         (stop_source::stop_source(const stop_source&)): Update reference count.
8389         (stop_source::operator=(const stop_source&)): Likewise.
8390         (stop_source::~stop_source()): Likewise.
8391         (stop_source::stop_source(stop_source&&)): Define as defaulted.
8392         (stop_source::operator=(stop_source&&)): Establish postcondition on
8393         parameter.
8394         (stop_callback): Enforce preconditions on template parameter. Replace
8395         base class with data member of new _Cb_impl type.
8396         (stop_callback::stop_callback(const stop_token&, Cb&&))
8397         (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
8398         (stop_callback::_Cb_impl): New type wrapping _Callback member and
8399         defining the _S_execute member function.
8400         * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
8401         test.
8402         * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
8403         * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
8404         * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
8405         New test.
8406         * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
8407         test.
8408         * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
8409         * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
8410         * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
8411         test.
8413         * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
8414         three_way_comparable_with.
8415         (__detail::__3way_cmp_with): Remove workaround for fixed bug.
8416         (compare_three_way::operator()): Remove redundant constraint from
8417         requires-clause.
8418         (__detail::_Synth3way::operator()): Use three_way_comparable_with
8419         instead of workaround.
8420         * testsuite/18_support/comparisons/object/93479.cc: Prune extra
8421         output due to simplified constraints on compare_three_way::operator().
8423         PR libstdc++/93479
8424         * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
8425         * testsuite/18_support/comparisons/object/93479.cc: New test.
8427         * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
8428         returns the same type as test_range::begin(). Add comments.
8429         * testsuite/std/ranges/access/rbegin.cc: Likewise.
8430         * testsuite/std/ranges/access/rend.cc: Likewise.
8431         * testsuite/std/ranges/range.cc: Do not assume the sentinel for
8432         test_range is the same as its iterator type.
8433         * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
8434         operator- overloads to satisfy sized_sentinel_for when the iterator
8435         satisfies random_access_iterator.
8437 2020-01-28  Jonathan Wakely  <jwakely@redhat.com>
8439         PR libstdc++/93470
8440         * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
8441         static assertion to object types.
8443         PR libstdc++/93325
8444         * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
8445         clock_gettime instead of explicit glibc version check.
8446         * configure: Regenerate.
8448 2020-01-28  Martin Liska  <mliska@suse.cz>
8450         PR libstdc++/93478
8451         * include/std/atomic: Fix typo.
8452         * include/std/optional: Likewise.
8454 2020-01-27  Andrew Burgess  <andrew.burgess@embecosm.com>
8456         * configure: Regenerate.
8458 2020-01-27  Jonathan Wakely  <jwakely@redhat.com>
8460         PR libstdc++/93426
8461         * include/std/span (span): Fix deduction guide.
8462         * testsuite/23_containers/span/deduction.cc: New test.
8464 2020-01-24  Jonathan Wakely  <jwakely@redhat.com>
8466         * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
8467         (__cmp_cat::_Ord::equivalent): Add enumerator.
8468         (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
8469         and greater.
8470         (partial_ordering, weak_ordering, strong_ordering): Remove
8471         constructors taking __cmp_cat::_Eq parameters. Use renamed
8472         enumerators.
8474 2020-01-24  Maciej W. Rozycki  <macro@wdc.com>
8476         * acinclude.m4: Handle `--with-toolexeclibdir='.
8477         * Makefile.in: Regenerate.
8478         * aclocal.m4: Regenerate.
8479         * configure: Regenerate.
8480         * doc/Makefile.in: Regenerate.
8481         * include/Makefile.in: Regenerate.
8482         * libsupc++/Makefile.in: Regenerate.
8483         * po/Makefile.in: Regenerate.
8484         * python/Makefile.in: Regenerate.
8485         * src/Makefile.in: Regenerate.
8486         * src/c++11/Makefile.in: Regenerate.
8487         * src/c++17/Makefile.in: Regenerate.
8488         * src/c++98/Makefile.in: Regenerate.
8489         * src/filesystem/Makefile.in: Regenerate.
8490         * testsuite/Makefile.in: Regenerate.
8492 2020-01-23  Alexandre Oliva <oliva@adacore.com>
8494         * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
8495         * configure: Rebuild.
8497         * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
8499 2020-01-23  Jonathan Wakely  <jwakely@redhat.com>
8501         PR libstdc++/91947
8502         * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
8503         rule.
8504         * include/Makefile.in: Regenerate.
8506 2020-01-20  Jonathan Wakely  <jwakely@redhat.com>
8508         * doc/xml/faq.xml: Fix grammar.
8509         * doc/xml/manual/appendix_contributing.xml: Improve instructions.
8510         * doc/xml/manual/spine.xml: Update copyright years.
8511         * doc/html/*: Regenerate.
8513 2020-01-19  Eric S. Raymond <esr@thyrsus.com>
8515         * doc/xml/faq.xml: Update for SVN -> Git transition.
8516         * doc/xml/manual/appendix_contributing.xml: Likewise.
8517         * doc/xml/manual/status_cxx1998.xml: Likewise.
8518         * doc/xml/manual/status_cxx2011.xml: Likewise.
8519         * doc/xml/manual/status_cxx2014.xml: Likewise.
8520         * doc/xml/manual/status_cxx2017.xml: Likewise.
8521         * doc/xml/manual/status_cxx2020.xml: Likewise.
8522         * doc/xml/manual/status_cxxtr1.xml: Likewise.
8523         * doc/xml/manual/status_cxxtr24733.xml: Likewise.
8525 2020-01-18  Iain Sandoe  <iain@sandoe.co.uk>
8527         * include/Makefile.am: Add coroutine to the std set.
8528         * include/Makefile.in: Regenerated.
8529         * include/std/coroutine: New file.
8531 2020-01-17  Jonathan Wakely  <jwakely@redhat.com>
8533         PR libstdc++/92376
8534         * include/bits/c++config: Only do PSTL config when the header is
8535         present, to fix freestanding.
8536         * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
8537         functions if they were detected by configure.
8539 2020-01-16  Kai-Uwe Eckhardt  <kuehro@gmx.de>
8540             Matthew Bauer  <mjbauer95@gmail.com>
8541             Jonathan Wakely  <jwakely@redhat.com>
8543         PR bootstrap/64271 (partial)
8544         * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
8545         to unsigned short.
8546         (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
8547         (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
8548         definitions with NetBSD upstream.
8549         (ctype_base::blank): Use _CTYPE_BL.
8550         * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
8551         Declaration.
8552         (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
8553         (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
8554         parameters to unsigned char.
8555         * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
8557 2020-01-16  François Dumont  <fdumont@gcc.gnu.org>
8559         PR libstdc++/91263
8560         * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
8561         * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
8562         (_Equality_base): Remove.
8563         (_Equality<>::_M_equal): Review implementation. Use
8564         std::is_permutation.
8565         * testsuite/23_containers/unordered_multiset/operators/1.cc
8566         (Hash, Equal, test02, test03): New.
8567         * testsuite/23_containers/unordered_set/operators/1.cc
8568         (Hash, Equal, test02, test03): New.
8570 2020-01-15  Jonathan Wakely  <jwakely@redhat.com>
8572         PR libstdc++/93267
8573         * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
8574         Move here from <bits/range_access.h> and define using __int128 when
8575         available.
8576         (__is_integer_like, __is_signed_integer_like): Move here from
8577         <bits/range_access.h>.
8578         (weakly_incrementable): Use __is_signed_integer_like.
8579         * include/bits/range_access.h (__max_diff_type, __max_size_type)
8580         (__is_integer_like, __is_signed_integer_like): Move to
8581         <bits/iterator_concepts.h>.
8582         (__make_unsigned_like_t): Move here from <ranges>.
8583         * include/std/ranges (__make_unsigned_like_t): Move to
8584         <bits/range_access.h>.
8585         (iota_view): Replace using-directive with using-declarations.
8586         * testsuite/std/ranges/iota/93267.cc: New test.
8587         * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
8589 2020-01-13  Jonathan Wakely  <jwakely@redhat.com>
8591         PR libstdc++/93244
8592         * include/bits/fs_path.h (path::generic_string<C,A>)
8593         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
8594         * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
8595         root-dir is converted to forward slash in generic pathname.
8596         * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
8597         * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
8599         PR libstdc++/58605
8600         * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
8601         Define.
8602         (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
8603         (__atomic_float): Add default member initializer for C++20.
8604         * include/std/atomic (atomic): Likewise.
8605         (atomic::atomic()): Remove noexcept-specifier on default constructor.
8606         * include/std/version (__cpp_lib_atomic_value_initialization): Define.
8607         * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
8608         number.
8609         * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
8610         * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
8611         * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
8612         * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
8613         expected result for is_trivially_default_constructible.
8614         * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
8615         * testsuite/29_atomics/atomic_float/value_init.cc: New test.
8616         * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
8617         * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
8618         * testsuite/29_atomics/atomic_integral/cons/value_init.cc
8619         * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
8620         expected results for is_trivially_default_constructible.
8621         * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
8622         new test generator.
8624 2020-01-10  Jonathan Wakely  <jwakely@redhat.com>
8626         * testsuite/util/testsuite_iterators.h: Improve comment.
8628         * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
8629         initialization syntax.
8631         PR libstdc++/92285
8632         * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
8633         of base class independent of __cplusplus value.
8634         [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
8635         type defined in the base class
8636         * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
8637         * testsuite/24_iterators/istreambuf_iterator/requirements/
8638         base_classes.cc: Adjust expected base class for C++98.
8640 2020-01-09  Olivier Hainque  <hainque@adacore.com>
8642         * doc/xml/manual/appendix_contributing.xml: Document _C2
8643         as a reserved identifier, by VxWorks.
8644         * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
8645         * include/bits/stl_multimap.h: Likewise.
8647 2020-01-09  Jonathan Wakely  <jwakely@redhat.com>
8649         * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
8650         (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
8651         * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
8652         partial specialization to disambiguate the two constrained
8653         specializations.
8655         * include/experimental/type_traits (experimental::is_pod_v): Disable
8656         -Wdeprecated-declarations warnings around reference to std::is_pod.
8657         * include/std/type_traits (is_pod_v): Likewise.
8658         * testsuite/18_support/max_align_t/requirements/2.cc: Also check
8659         is_standard_layout and is_trivial. Do not check is_pod for C++20.
8660         * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
8661         Add -Wno-deprecated for C++20.
8662         * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
8663         * testsuite/20_util/is_pod/value.cc: Likewise.
8664         * testsuite/experimental/type_traits/value.cc: Likewise.
8666 2020-01-09  JeanHeyd "ThePhD" Meneide  <phdofthehouse@gmail.com>
8668         * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
8669         * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
8670         * testuite/20_util/is_pod/deprecated-2a.cc: New test.
8672 2020-01-09  Jonathan Wakely  <jwakely@redhat.com>
8674         PR libstdc++/93205
8675         * include/bits/random.h (operator>>): Check stream operation succeeds.
8676         * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
8677         typedefs.
8678         (operator>>): Remove redundant __istream_type typedefs. Check stream
8679         operations succeed.
8680         (__extract_params): New function to fill a vector from a stream.
8681         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
8683         PR libstdc++/93208
8684         * config/abi/pre/gnu.ver: Add new exports.
8685         * include/std/memory_resource (memory_resource::~memory_resource()):
8686         Do not define inline.
8687         (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
8688         * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
8689         Define.
8690         (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
8691         * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
8693 2020-01-09  François Dumont  <fdumont@gcc.gnu.org>
8695         PR libstdc++/92124
8696         * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
8697         template alias.
8698         (_Hashtable<>::__fwd_value_for): New.
8699         (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
8700         parameter.
8701         (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
8702         (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
8703         (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
8704         with std::move.
8705         (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
8706         (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
8707         Adapt.
8708         (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
8709         Adapt.
8710         * testsuite/23_containers/unordered_set/92124.cc: New.
8712 2020-01-08  Jonathan Wakely  <jwakely@redhat.com>
8714         PR libstdc++/93201
8715         * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
8716         detailed error reporting for remove_all. Check result of recursive
8717         call before incrementing iterator.
8718         (remove_all(const path&), remove_all(const path&, error_code&)): Use
8719         do_remove_all.
8720         * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
8721         result of recursive call before incrementing iterator.
8722         * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
8723         are reported correctly.
8724         * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
8726 2020-01-07  Thomas Rodgers  <trodgers@redhat.com>
8728         * include/std/condition_variable
8729         (condition_variable_any::wait_on): Rename to match current draft
8730         standard.
8731         (condition_variable_any::wait_on_until): Likewise.
8732         (condition_variable_any::wait_on_for): Likewise.
8733         * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
8734         Adjust tests to account for renamed methods.
8736 2020-01-07  François Dumont  <fdumont@gcc.gnu.org>
8738         PR libstdc++/92124
8739         * include/bits/stl_tree.h
8740         (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
8741         std::move_if_noexcept by std::move.
8742         * testsuite/23_containers/map/92124.cc: New.
8743         * testsuite/23_containers/set/92124.cc: New.
8745 2020-01-06  Jonathan Wakely  <jwakely@redhat.com>
8747         * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
8748         (stop_source): Likewise (LWG 3362).
8749         * testsuite/30_threads/stop_token/stop_source.cc: Test equality
8750         comparisons.
8752         * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
8753         (lexicographical_compare_three_way): Do not depend on
8754         __cpp_lib_concepts.
8755         * include/std/version (__cpp_lib_three_way_comparison): Only define
8756         when __cpp_lib_concepts is defined.
8757         * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
8759 2020-01-03  Jonathan Wakely  <jwakely@redhat.com>
8761         * include/bits/stl_algobase.h (lexicographical_compare_three_way):
8762         Only define four-argument overload when __cpp_lib_concepts is defined.
8764 2020-01-01  John David Anglin  <danglin@gcc.gnu.org>
8766         * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
8768 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
8770         Update copyright years.
8772 Copyright (C) 2020 Free Software Foundation, Inc.
8774 Copying and distribution of this file, with or without modification,
8775 are permitted in any medium without royalty provided the copyright
8776 notice and this notice are preserved.