aix: only create named section for VAR_DECL or FUNCTION_DECL
[official-gcc.git] / libstdc++-v3 / ChangeLog
blob3adcd817edeb5e35d56a6f9f19c5d8f3c46895f2
1 2020-07-08  François Dumont  <fdumont@gcc.gnu.org>
3         * include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&)): Add noexcept
4         qualification based only on _Compare one.
5         * testsuite/23_containers/map/cons/noexcept_move_construct.cc: Add
6         static asserts.
7         * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
8         Likewise.
9         * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
10         Likewise.
11         * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
13 2020-07-07  Jonathan Wakely  <jwakely@redhat.com>
15         * include/std/limits: Whitespace changes.
17 2020-07-07  Jonathan Wakely  <jwakely@redhat.com>
19         * include/Makefile.am: Remove bits/int_limits.h.
20         * include/Makefile.in: Regenerate.
21         * include/bits/int_limits.h: Removed.
22         * include/bits/parse_numbers.h (_Select_int_base): Replace
23         __int_limits with __int_traits.
24         * include/bits/range_access.h (_SSize::operator()): Likewise.
25         * include/ext/numeric_traits.h (__numeric_traits_integer): Add
26         static assertion.
27         (__int_traits): New alias template.
28         * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
29         (__countr_zero, __countr_one, __popcount, __bit_ceil)
30         (__bit_floor, __bit_width) Replace __int_limits with
31         __int_traits.
32         * include/std/charconv (__to_chars_8, __from_chars_binary)
33         (__from_chars_alpha_to_num, from_chars): Likewise.
34         * include/std/memory_resource (polymorphic_allocator::allocate)
35         (polymorphic_allocator::allocate_object): Likewise.
36         * include/std/string_view (basic_string_view::_S_compare):
37         Likewise.
38         * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
40 2020-07-07  Jonathan Wakely  <jwakely@redhat.com>
42         * include/std/limits: Whitespace changes.
44 2020-07-06  Jonathan Wakely  <jwakely@redhat.com>
46         * include/std/optional (_Optional_payload_base, _Optional_base)
47         (optional, __optional_hash_call_base): Adjust whitespace and
48         other formatting. Remove redundant && tokens on template
49         arguments to type traits.
51 2020-07-06  Jonathan Wakely  <jwakely@redhat.com>
53         * include/std/optional (make_optional): Add enable_if
54         constraints and noexcept-specifier to each overload.
55         * testsuite/20_util/optional/make_optional-2.cc: New test.
57 2020-07-06  Jonathan Wakely  <jwakely@redhat.com>
59         PR libstdc++/96036
60         * include/std/optional (optional): Add noexcept-specifier to
61         every constructor, assignment operator, emplace function and
62         dereference operator.
63         * testsuite/20_util/optional/assignment/noexcept.cc: New test.
64         * testsuite/20_util/optional/cons/noexcept.cc: New test.
66 2020-07-06  Jonathan Wakely  <jwakely@redhat.com>
68         PR libstdc++/96063
69         * include/bits/fs_dir.h: Use consistent tag in class-head.
70         * include/bits/localefwd.h: Likewise.
71         * include/bits/regex.h: Likewise.
72         * include/bits/stl_map.h: Likewise.
73         * include/bits/stl_multimap.h: Likewise.
74         * include/bits/stl_multiset.h: Likewise.
75         * include/bits/stl_set.h: Likewise.
76         * include/std/complex: Likewise.
77         * include/std/functional: Likewise.
78         * include/std/future: Likewise.
79         * include/std/system_error: Likewise.
80         * include/std/thread: Likewise.
81         * include/std/tuple: Likewise.
82         * include/std/type_traits: Likewise.
83         * include/std/valarray: Likewise.
85 2020-07-02  Jonathan Wakely  <jwakely@redhat.com>
87         * testsuite/27_io/basic_ios/conv/voidptr.cc: Add c++98_only
88         target selector.
90 2020-07-02  Jonathan Wakely  <jwakely@redhat.com>
92         * testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: Add
93         c++98_only target selector.
94         * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc:
95         Likewise.
96         * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc:
97         Likewise.
98         * testsuite/18_support/headers/new/synopsis_cxx98.cc: Likewise.
99         * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc:
100         Likewise.
101         * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc:
102         Likewise.
103         * testsuite/23_containers/headers/array/std_c++0x_neg.cc:
104         Likewise.
105         * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc:
106         Likewise.
107         * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
108         Likewise.
109         * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
110         Likewise.
111         * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc:
112         Likewise.
113         * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc:
114         Likewise.
115         * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++98.cc:
116         Likewise.
117         * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc:
118         Likewise.
119         * testsuite/26_numerics/headers/random/std_c++0x_neg.cc:
120         Likewise.
121         * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Likewise.
122         * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Likewise.
123         * testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc:
124         Likewise.
125         * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
126         Likewise.
127         * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
128         Likewise.
129         * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: Likewise.
130         * testsuite/30_threads/headers/thread/std_c++0x_neg.cc:
131         Likewise.
133 2020-07-02  Ville Voutilainen  <ville.voutilainen@gmail.com>
135         PR libstdc++/91807
136         * include/std/variant
137         (_Copy_assign_base::operator=(const _Copy_assign_base&):
138         Do the move-assignment from a temporary so that the temporary
139         is constructed with an explicit index.
140         * testsuite/20_util/variant/91807.cc: New.
142 2020-07-02  Jonathan Wakely  <jwakely.gcc@gmail.com>
144         PR libstdc++/91153
145         PR target/93224
146         * testsuite/29_atomics/atomic_float/1.cc: Use different values
147         for tests.
148         * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
150 2020-07-01  Jonathan Wakely  <jwakely@redhat.com>
152         PR libstdc++/94627
153         * include/bits/regex.h (operator==, operator!=): Remove noexcept
154         equality comparisons for match_results.
155         * testsuite/28_regex/match_results/94627.cc: New test.
157 2020-07-01  Martin Sebor  <msebor@redhat.com>
159         * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Adjust
160         text of expected warning.
161         * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Same.
162         * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc: Same.
163         * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc: Same.
164         * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc: Same.
166 2020-06-29  Ville Voutilainen  <ville.voutilainen@gmail.com>
168         Revert:
169         2020-06-28  Ville Voutilainen  <ville.voutilainen@gmail.com>
171         * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
172         Add a __nonnull__ attribute.
173         * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
174         * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
176 2020-06-28  Ville Voutilainen  <ville.voutilainen@gmail.com>
178         * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
179         Add a __nonnull__ attribute.
180         * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
181         * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
183 2020-06-28  Ville Voutilainen  <ville.voutilainen@gmail.com>
185         PR libstdc++/95915
186         * include/std/type_traits (is_literal_type, is_literal_type_v):
187         Deprecate in C++17.
188         * include/std/variant (_Uninitialized):
189         Adjust the condition and the comment.
190         * testsuite/20_util/is_literal_type/deprecated-1z.cc: New.
191         * testsuite/20_util/is_literal_type/requirements/explicit_instantiation.cc:
192         Adjust.
193         * testsuite/20_util/is_literal_type/requirements/typedefs.cc: Likewise.
194         * testsuite/20_util/is_literal_type/value.cc: Likewise.
195         * testsuite/20_util/optional/constexpr/nullopt.cc:
196         Use __is_literal_type directly.
197         * testsuite/20_util/optional/nullopt.cc: Likewise.
198         * testsuite/20_util/variable_templates_for_traits.cc: Adjust.
199         * testsuite/20_util/variant/95915.cc: New.
200         * testsuite/20_util/variant/compile.cc: Add new test.
201         * testsuite/experimental/optional/constexpr/nullopt.cc:
202         Use __is_literal_type directly.
203         * testsuite/experimental/optional/nullopt.cc: Likewise.
204         * testsuite/experimental/type_traits/value.cc: Adjust.
205         * testsuite/util/testsuite_common_types.h:
206         Use __is_literal_type directly.
208 2020-06-24  Jonathan Wakely  <jwakely@redhat.com>
210         * include/std/charconv (__from_chars_binary): Ignore leading zeros.
211         * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
212         not just 10 and 16.
213         * testsuite/20_util/from_chars/3.cc: New test.
215 2020-06-24  Jonathan Wakely  <jwakely@redhat.com>
217         * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
218         * include/std/charconv (__detail::__to_chars): Avoid
219         -Wsign-compare warning.
221 2020-06-24  Jonathan Wakely  <jwakely@redhat.com>
223         PR libstdc++/95851
224         * include/std/charconv (__to_chars_i): Check for zero-sized
225         buffer unconditionally.
226         * testsuite/20_util/to_chars/95851.cc: New test.
228 2020-06-23  Jonathan Wakely  <jwakely@redhat.com>
230         * testsuite/20_util/from_chars/1_c++20_neg.cc: Check enumeration
231         type.
232         * testsuite/20_util/from_chars/1_neg.cc: Likewise. Move dg-error
233         directives outside preprocessor condition.
235 2020-06-23  Jonathan Wakely  <jwakely@redhat.com>
237         PR libstdc++/95832
238         * include/std/variant (__detail::__variant::_Build_FUN): Remove
239         partial specialization to prevent narrowing conversions to bool.
240         * testsuite/20_util/variant/compile.cc: Test non-narrowing
241         conversions to bool.
242         * testsuite/20_util/variant/run.cc: Likewise.
244 2020-06-23  Jonathan Wakely  <jwakely@redhat.com>
246         * doc/Makefile.in: Regenerate.
247         * include/Makefile.in: Regenerate.
248         * libsupc++/Makefile.in: Regenerate.
249         * po/Makefile.in: Regenerate.
250         * python/Makefile.in: Regenerate.
251         * src/Makefile.in: Regenerate.
252         * src/c++11/Makefile.in: Regenerate.
253         * src/c++17/Makefile.in: Regenerate.
254         * src/c++98/Makefile.in: Regenerate.
255         * src/filesystem/Makefile.in: Regenerate.
256         * testsuite/Makefile.in: Regenerate.
258 2020-06-22  David Edelsohn  <dje.gcc@gmail.com>
260         * Makefile.am: Use -include.
261         * Makefile.in: Regenerate.
263 2020-06-21  David Edelsohn  <dje.gcc@gmail.com>
265         * Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
266         * Makefile.in: Regenerate.
267         * configure.ac (tmake_file): Substitute.
268         * configure: Regenerate.
269         * configure.host (aix*): Define tmake_file.
270         * config/os/aix/t-aix: New file.
272 2020-06-20  Jason Merrill  <jason@redhat.com>
274         * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
275         Remove greedy_ops tests.
276         * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
277         Remove greedy_ops tests.
279 2020-06-19  Jonathan Wakely  <jwakely@redhat.com>
281         PR libstdc++/95765
282         * include/bits/stl_algobase.h (__size_to_integer(float))
283         (__size_to_integer(double), __size_to_integer(long double))
284         (__size_to_integer(__float128)): Cast return type explicitly.
285         * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
286         Remove unused typedef.
288 2020-06-19  Jonathan Wakely  <jwakely@redhat.com>
290         * include/bits/stl_pair.h (_Index_tuple): Remove redundant
291         namespace qualification.
292         (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
293         Likewise.
294         * include/std/tuple (_Head_base, _Tuple_impl, tuple_size)
295         (tuple_element, __get_helper, get, __make_tuple_impl)
296         (__make_1st_indices, __tuple_concater)
297         (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
298         Likewise.
299         * include/std/utility (tuple_element, __is_tuple_like_impl)
300         (tuple_size, __pair_get, get): Likewise.
302 2020-06-19  Jonathan Wakely  <jwakely@redhat.com>
304         * include/bits/std_function.h (function): Define all member
305         functions inline.
307 2020-06-19  Marc Glisse  <marc.glisse@inria.fr>
309         * include/bits/stl_algo.h (__includes): Simplify the code.
311 2020-06-19  Marc Glisse  <marc.glisse@inria.fr>
313         * include/std/optional (optional()): Explicitly define it.
315 2020-06-17  Jonathan Wakely  <jwakely@redhat.com>
317         PR libstdc++/94540
318         * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
319         Construct the first value at *__first instead of on the stack.
320         (__uninitialized_default_n_1<true>): Likewise.
321         Improve comments on several of the non-standard algorithms.
322         * testsuite/20_util/specialized_algorithms/uninitialized_default/94540.cc:
323         New test.
324         * testsuite/20_util/specialized_algorithms/uninitialized_default_n/94540.cc:
325         New test.
326         * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
327         New test.
328         * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
329         New test.
330         * testsuite/23_containers/vector/cons/94540.cc: New test.
332 2020-06-17  Jonathan Wakely  <jwakely@redhat.com>
334         * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
335         Replace Value type with int so trivial code path is used.
336         * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
337         Likewise.
339 2020-06-17  Jonathan Wakely  <jwakely@redhat.com>
341         * include/bits/stl_uninitialized.h (uninitialized_fill_n): Only
342         use std::fill_n when the size is an integral type.
343         (__uninitialized_default_n): Likewise.
344         * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
345         New test.
346         * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
347         New test.
348         * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
349         New test.
351 2020-06-16  Jonathan Wakely  <jwakely@redhat.com>
353         PR libstdc++/95282
354         * include/bits/atomic_base.h (__atomic_impl::load): Use the _Val
355         alias instead of deducing _Tp as an unqualified type.
356         (__atomic_impl::exchange): Use the _Val alias to remove volatile
357         from the reinterpret_cast result type.
359 2020-06-16  Jonathan Wakely  <jwakely@redhat.com>
361         * include/std/atomic (atomic): Add static assertions.
362         * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
364 2020-06-16  Patrick Palka  <ppalka@redhat.com>
366         PR libstdc++/94003
367         * testsuite/20_util/is_constructible/94003.cc: New test.
369 2020-06-15  Jonathan Wakely  <jwakely@redhat.com>
371         * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
372         Update value for C++20.
373         * include/std/version (__cpp_lib_constexpr_char_traits): Likewise.
374         * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
375         Update expected value.
376         * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
377         Likewise.
379 2020-06-15  Paul Keir  <paul.keir@uws.ac.uk>
381         * include/bits/char_traits.h (char_traits::move): constexpr move with
382         overlap was using copy_backward incorrectly.
383         * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
384         New test.
386 2020-06-12  Jonathan Wakely  <jwakely@redhat.com>
388         * testsuite/29_atomics/atomic_flag/clear/1.cc: Also test clear()
389         when the value is currently set.
390         * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc:
391         Actually check the return value.
392         * testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc:
393         Likewise.
395 2020-06-12  Jonathan Wakely  <jwakely@redhat.com>
397         * include/bits/atomic_base.h (atomic_flag::test): Add missing
398         const qualifiers.
399         * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
400         dg-options and verify results of test function.
401         * testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
403 2020-06-11  Jonathan Wakely  <jwakely@redhat.com>
405         PR libstdc++/94749
406         * include/bits/istream.tcc (basic_istream::ignore(streamsize, CharT)):
407         Only discard an extra character if we didn't already reach the
408         maximum number.
409         * src/c++98/istream.cc (istream::ignore(streamsiz, char))
410         (wistream::ignore(streamsize, wchar_t)): Likewise.
411         * testsuite/27_io/basic_istream/ignore/char/94749.cc: New test.
412         * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc: New test.
414 2020-06-10  Patrick Palka  <ppalka@redhat.com>
416         PR libstdc++/95578
417         * include/bits/ranges_algo.h (__lexicographical_compare_fn):
418         Also check that the iterator and sentinel have the same type before
419         applying the unwrapping optimization for __normal_iterator.
420         Split the check into two, one for the first iterator/sentinel
421         pair and another for second iterator/sentinel pair.  Remove uses
422         of __niter_base, and remove uses of std::move on a
423         __normal_iterator.
424         * include/bits/ranges_algobase.h (__equal_fn): Likewise.
425         (__copy_or_move): Likewise.  Perform similar adjustments for
426         the reverse_iterator and move_iterator optimizations.  Inline
427         the checks into the if-constexprs, and use using-declarations to
428         make them less visually noisy.  Remove uses of __niter_wrap.
429         (__copy_or_move_backward): Likewise.
430         * testsuite/25_algorithms/copy/95578.cc: New test.
431         * testsuite/25_algorithms/copy_backward/95578.cc: New test.
432         * testsuite/25_algorithms/equal/95578.cc: New test.
433         * testsuite/25_algorithms/lexicographical_compare/95578.cc: New test.
434         * testsuite/25_algorithms/move/95578.cc: New test.
435         * testsuite/25_algorithms/move_backward/95578.cc: New test.
437 2020-06-10  François Dumont  <fdumont@gcc.gnu.org>
438             Jonathan Wakely  <jwakely@redhat.com>
440         * include/bits/deque.tcc (__lex_cmp_dit): New.
441         (__lexicographical_compare_aux1): Define overloads for deque
442         iterators.
443         * include/bits/stl_algobase.h (__lexicographical_compare::__3way):
444         New static member function.
445         (__lexicographical_compare<true>::__3way): Likewise.
446         (__lexicographical_compare<true>::__lc): Use __3way.
447         (__lexicographical_compare_aux): Rename to
448         __lexicographical_compare_aux1 and declare overloads for deque
449         iterators.
450         (__lexicographical_compare_aux): Define new forwarding function
451         that calls __lexicographical_compare_aux1 and declare new overloads
452         for safe iterators.
453         (lexicographical_compare): Do not use __niter_base on
454         parameters.
455         * include/debug/safe_iterator.tcc
456         (__lexicographical_compare_aux): Define overloads for safe
457         iterators.
458         * testsuite/25_algorithms/lexicographical_compare/1.cc: Add
459         checks with random access iterators.
460         * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
461         New test.
463 2020-06-09  Jonathan Wakely  <jwakely@redhat.com>
465         * include/bits/stl_iterator.h (move_iterator::operator=): Define.
466         * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
468 2020-06-09  Jonathan Wakely  <jwakely@redhat.com>
470         * include/std/optional (bad_optional_access): Define default
471         constructor and destructor as defaulted.
472         * testsuite/20_util/optional/bad_access.cc: New test.
474 2020-06-08  Jonathan Wakely  <jwakely@redhat.com>
476         * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
477         line number.
478         * testsuite/20_util/default_delete/void_neg.cc: Likewise.
480 2020-06-08  Jonathan Wakely  <jwakely@redhat.com>
482         * include/bits/unique_ptr.h (operator<<): Define for C++20.
483         * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
485 2020-06-04  Jonathan Wakely  <jwakely@redhat.com>
487         * include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
488         (__detail::__cat, __detail::__diff): Move to class scope in the
489         relevant __iterator_traits specializations.
490         (__iterator_traits<>): Use nested class templates instead of ones from
491         namespace __detail.
492         * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
493         class scope in iterator_traits<common_iterator<I, S>>.
494         (iterator_traits<common_iterator<I, S>>): Use nested class template
495         instead of __detail::__common_iter_ptr.
497 2020-06-04  François Dumont  <fdumont@gcc.gnu.org>
499         * include/bits/stl_algo.h (__copy_n_a): Move to ...
500         * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict
501         parameter.
502         (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
503         Declare.
504         (__niter_base(const _Safe_iterator<_Ite, _Seq,
505         random_access_iterator_tag>&)): Declare.
506         (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
507         _Deque_iterator<>)): Declare.
508         * include/bits/deque.tcc
509         (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
510         _Deque_iterator<>)): New.
511         (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
512         New.
513         * include/bits/streambuf_iterator.h
514         (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*, bool)): Adapt.
515         * include/debug/safe_iterator.tcc (__niter_base): New.
516         * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
517         (test03): New.
518         * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc:
519         New test.
520         * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:
521         New test.
522         * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New test.
523         * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc:
524         New test.
526 2020-06-04  Jonathan Wakely  <jwakely@redhat.com>
528         * include/bits/ranges_algobase.h (__copy_n_fn): Only call
529         ranges::copy for positive values.
530         * include/bits/stl_algo.h (copy_n): Convert Size argument to an
531         integral type and only call __copy_n for positive values.
532         * testsuite/util/testsuite_iterators.h
533         (random_access_iterator_wrapper::operator+=): Fix range check for
534         negative values.
535         (output_container, input_container, forward_container)
536         (bidirectional_container, random_access_container): New alias
537         templates.
538         * testsuite/25_algorithms/copy_n/5.cc: New test.
540 2020-06-02  Jonathan Wakely  <jwakely@redhat.com>
542         PR libstdc++/90102
543         * include/debug/deque (deque(const _Base&)): Replace parameter
544         with a struct that wraps a const _Base&.
545         * include/debug/forward_list (forward_list(_Base_ref)): New
546         constructor.
547         * include/debug/list (list(const _Base&)): Replace parameter
548         with a struct that wraps a const _Base&.
549         * include/debug/map.h (map(const _Base&)): Likewise.
550         * include/debug/multimap.h (multimap(const _Base&)): Likewise.
551         * include/debug/multiset.h (multiset(const _Base&)): Likewise.
552         * include/debug/set.h (set(const _Base&)): Likewise.
553         * include/debug/unordered_map (unordered_map(const _Base&))
554         (unordered_multimap(const _Base&)): Likewise.
555         * include/debug/unordered_set (unordered_set(const _Base&))
556         (unordered_multiset(const _Base&)): Likewise.
557         * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
558         Adjust dg-error line number.
559         * include/debug/vector (vector(const _Base&)): Likewise.
560         * testsuite/23_containers/deque/debug/90102.cc: New test.
561         * testsuite/23_containers/forward_list/debug/90102.cc: New test.
562         * testsuite/23_containers/list/debug/90102.cc: New test.
563         * testsuite/23_containers/map/debug/90102.cc: New test.
564         * testsuite/23_containers/multimap/debug/90102.cc: New test.
565         * testsuite/23_containers/multiset/debug/90102.cc: New test.
566         * testsuite/23_containers/set/debug/90102.cc: New test.
567         * testsuite/23_containers/unordered_map/debug/90102.cc: New test.
568         * testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
569         * testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
570         * testsuite/23_containers/unordered_set/debug/90102.cc: New test.
571         * testsuite/23_containers/vector/debug/90102.cc: New test.
573 2020-06-01  Jonathan Wakely  <jwakely@redhat.com>
575         PR libstdc++/95392
576         * include/bits/fs_path.h (path::_S_to_string): Move to
577         namespace-scope and rename to ...
578         (__detail::__string_from_range): ... this.
579         [WINDOWS] (__detail::__wstr_from_utf8): New function template to
580         convert a char sequence containing UTF-8 to wstring.
581         (path::_S_convert(Iter, Iter)): Adjust call to _S_to_string.
582         (path::_S_convert_loc(Iter, Iter, const locale&)): Likewise.
583         (u8path(InputIterator, InputIterator)) [WINDOWS]: Use
584         __string_from_range to obtain a contiguous range and
585         __wstr_from_utf8 to obtain a wide string.
586         (u8path(const Source&)) [WINDOWS]: Use __effective_range to
587         obtain a contiguous range and __wstr_from_utf8 to obtain a wide
588         string.
589         (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
590         Use __wstr_from_utf8.
592 2020-06-01  Jonathan Wakely  <jwakely@redhat.com>
594         * testsuite/util/testsuite_iterators.h:
595         (input_iterator_wrapper::operator++(int)): Return proxy object.
597 2020-06-01  Jonathan Wakely  <jwakely@redhat.com>
599         * doc/xml/manual/evolution.xml: Document deprecation of
600         __is_nullptr_t and removal of std::allocator members.
601         * doc/html/manual/api.html: Regenerate.
603 2020-06-01  Jonathan Wakely  <jwakely@redhat.com>
605         * doc/xml/manual/containers.xml: Replace <xref> with <link>.
606         * doc/xml/manual/evolution.xml: Likewise.
607         * doc/html/manual/api.html: Regenerate.
608         * doc/html/manual/containers.html: Regenerate.
610 2020-06-01  Gerald Pfeifer  <gerald@pfeifer.com>
612         * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
613         * doc/html/faq.html: Regenerate.
615 2020-06-01  Gerald Pfeifer  <gerald@pfeifer.com>
617         * doc/xml/manual/policy_data_structures_biblio.xml: Remove
618         stray change.
620 2020-06-01  Gerald Pfeifer  <gerald@pfeifer.com>
622         * doc/xml/manual/policy_data_structures_biblio.xml: Switch
623         www.cs.princeton.edu to https.
624         * doc/html/manual/policy_data_structures.html: Regenerate.
626 2020-05-31  Douglas B Rupp  <douglas.b.rupp@gmail.com>
628         * crossconfig.m4 (<*-vxworks>): Check for more math decls.
629         * configure: Rebuild.
631 2020-05-29  H.J. Lu  <hjl.tools@gmail.com>
633         PR bootstrap/95413
634         * configure: Regenerated.
636 2020-05-29  François Dumont  <fdumont@gcc.gnu.org>
638         PR libstdc++/95079
639         * include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
640         * include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
641         (unordered_map<>::insert_or_assign): Adapt.
643 2020-05-27  Jonathan Wakely  <jwakely@redhat.com>
645         PR libstdc++/95282
646         * include/bits/atomic_base.h (__atomic_impl::load): Add
647         cv-qualifiers to parameter so that _Tp is deduced as the
648         unqualified type.
649         * testsuite/29_atomics/atomic_float/95282.cc: New test.
651 2020-05-27  Jonathan Wakely  <jwakely@redhat.com>
653         PR libstdc++/95322
654         * include/std/ranges (transform_view::_Sentinel): Allow hidden
655         friends to work with _Iterator<true> and _Iterator<false>.
656         (join_view::_Sentinel): Likewise.
657         * testsuite/std/ranges/adaptors/95322.cc: New test.
659 2020-05-27  Jonathan Wakely  <jwakely@redhat.com>
661         PR libstdc++/94354
662         * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
663         operators to use the correct operations on the underlying
664         iterators.
665         * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
667 2020-05-27  Jonathan Wakely  <jwakely@redhat.com>
669         * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
671 2020-05-26  Patrick Palka  <ppalka@redhat.com>
673         PR libstdc++/95322
674         * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
675         Remove and instead define it ...
676         (common_iterator::_Proxy): ... here.
677         (common_iterator::operator->): Use it.
678         * testsuite/24_iterators/common_iterator/2.cc: New test.
679         * testsuite/std/ranges/adaptors/95322.cc: New test.
681 2020-05-23  Patrick Palka  <ppalka@redhat.com>
683         PR libstdc++/93978
684         * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
685         dg-additional-options.  Avoid unused-but-set-variable warning.
687 2020-05-23  Jonathan Wakely  <jwakely@redhat.com>
689         PR libstdc++/95289
690         * include/debug/helper_functions.h (__get_distance): Only declare
691         as a constexpr function for C++14 and up.
692         * testsuite/25_algorithms/copy/debug/95289.cc: New test.
694         * include/bits/fs_path.h (__detail::_S_range_begin)
695         (__detail::_S_range_end, path::_S_string_from_iter): Replace with
696         overloaded function template __detail::__effective_range.
697         (__detail::__effective_range): New overloaded function template to
698         create a basic_string or basic_string_view for an effective range.
699         (__detail::__value_type_is_char): Use __detail::__effective_range.
700         Do not use remove_const on value type.
701         (__detail::__value_type_is_char_or_char8_t): Likewise.
702         (path::path(const Source&, format))
703         (path::path(const Source&, const locale&))
704         (path::operator/=(const Source&), path::append(const Source&))
705         (path::concat(const Source&)): Use __detail::__effective_range.
706         (path::_S_to_string(InputIterator, InputIterator)): New function
707         template to create a string view if possible, or string otherwise.
708         (path::_S_convert): Add overloads that convert a string returned
709         by __detail::__effective_range. Use if-constexpr to inline conversion
710         logic from all overloads of _Cvt::_S_convert.
711         (path::_S_convert_loc): Add overload that converts a string. Use
712         _S_to_string to avoid allocation when possible.
713         (path::_Cvt): Remove.
714         (path::operator+=(CharT)): Remove indirection through path::concat.
715         * include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
716         overload for non-const pointers, to avoid constructing a std::string.
717         * src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
718         compilation with call to _S_convert.
720         * include/bits/fs_path.h (__detail::_S_range_begin)
721         (__detail::_S_range_end): Remove unintentional static specifiers.
722         * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
723         (__detail::_S_range_end): Likewise.
725         * include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
726         Replace alias template with variable template. Don't remove const.
727         (filesystem::__detail::__is_path_src): Replace overloaded function
728         template with variable template and specializations.
729         (filesystem::__detail::__is_path_iter_src): Replace alias template
730         with class template.
731         (filesystem::__detail::_Path): Use __is_path_src. Remove support for
732         iterator pairs.
733         (filesystem::__detail::_Path2): New alias template for checking
734         InputIterator requirements.
735         (filesystem::__detail::__constructible_from): Remove.
736         (filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
737         * testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
738         constructor arguments of void and void* types.
740 2020-05-21  Matthias Kretz  <kretz@kde.org>
742         * testsuite/Makefile.am: Remove dup target_triplet and set tool,
743         allowing runtest to work without arguments.
744         * testsuite/Makefile.in: Regenerate.
746 2020-05-21  Jonathan Wakely  <jwakely@redhat.com>
748         PR libstdc++/93983
749         * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
750         Reorder constraints to avoid recursion when constructors use
751         iterator_traits (LWG 3420).
752         * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
754         * include/experimental/socket (basic_socket::is_open()
755         (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
757         * include/experimental/bits/net.h (__endpoint, __protocol)
758         (__acceptable_protocol, __inet_protocol): New concepts.
759         (__detail::__is_endpoint): Move trait from <experimental/socket>.
760         (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
761         traits.
762         (__endpoint, __protocol, __acceptable_protocol): New variable
763         templates.
764         * include/experimental/socket (__is_endpoint): Move to net.h header.
765         (basic_socket, basic_socket_acceptor): Check requirements.
767         * include/experimental/executor (use_future_t::use_future_t()): Fix
768         incorrect noexcept-specifier.
769         * include/experimental/internet (basic_resolver_results): Adjust
770         whitespace.
771         * include/experimental/socket (__basic_socket_impl::release): Add
772         member function.
773         (basic_socket(io_context&, const endpoint_type&)): Fix argument to
774         target constructor.
775         (basic_socket::release(), basic_socket::release(error_code&)): Add
776         missing member functions.
777         (basic_socket::is_open()): Add nodiscard attribute.
778         (basic_socket::close(error_code&)): Pass argument to base function.
779         (basic_socket_acceptor::release())
780         (basic_socket_acceptor::release(error_code&)): Add missing member
781         functions.
782         (basic_socket_acceptor::is_open()): Add nodiscard attribute.
783         (basic_socket_streambuf::error()): Add noexcept.
784         (basic_socket_iostream::error()): Likewise.
785         * testsuite/experimental/net/socket/basic_socket.cc: New test.
787         * include/experimental/buffer: Replace typedefs with
788         alias-declarations.
789         * include/experimental/executor: Likewise.
790         * include/experimental/internet: Likewise.
791         * include/experimental/socket: Likewise.
792         * include/experimental/timer: Likewise.
794 2020-05-19  Jonathan Wakely  <jwakely@redhat.com>
796         PR libstdc++/94087
797         * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
798         passed in.
799         (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
800         fallback.
801         (random_device::_M_init): Use __x86_rdseed_rdrand when both
802         instructions are available.
803         * testsuite/26_numerics/random/random_device/94087.cc: New test.
805 2020-05-19  Patrick Palka  <ppalka@redhat.com>
807         PR c++/66439
808         * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
809         mismatch" messages.
810         * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
812 2020-05-15  H.J. Lu  <hongjiu.lu@intel.com>
814         PR bootstrap/95147
815         * configure: Regenerated.
817 2020-05-14  H.J. Lu  <hongjiu.lu@intel.com>
819         * configure: Regenerated.
821 2020-05-13  Alexandre Oliva <oliva@adacore.com>
823         PR libstdc++/77691
824         * include/experimental/memory_resource
825         (__resource_adaptor_imp::do_allocate): Handle max_align_t on
826         x86-vxworks as on x86-solaris.
827         (__resource_adaptor_imp::do_deallocate): Likewise.
828         * testsuite/experimental/memory_resource/new_delete_resource.cc:
829         Drop xfail.
830         (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
831         (test03): Drop max-align test for char-aligned alloc.
833 2020-05-08  Ulrich Drepper  <drepper@redhat.com>
835         * include/bits/atomic_base.h (atomic_flag): Implement test member
836         function.
837         * include/std/version: Define __cpp_lib_atomic_flag_test.
838         * testsuite/29_atomics/atomic_flag/test/explicit.cc: New file.
839         * testsuite/29_atomics/atomic_flag/test/implicit.cc: New file.
841 2020-05-07  Jonathan Wakely  <jwakely@redhat.com>
843         PR libstdc++/94971 (partial)
844         * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify
845         std::sample using macro to work in parallel mode.
846         (__sort_fn): Likewise for std::sort.
847         (ranges::__nth_element_fn): Likewise for std::nth_element.
848         * include/bits/stl_algobase.h (lexicographical_compare_three_way):
849         Likewise for std::__min_cmp.
850         * include/parallel/algobase.h (lexicographical_compare_three_way):
851         Add to namespace std::__parallel.
853         PR c/92472
854         * include/parallel/multiway_merge.h (_GuardedIterator::operator*)
855         (_GuardedIterator::operator _RAIter, _UnguardedIterator::operator*)
856         (_UnguardedIterator::operator _RAIter): Add const qualifier.
857         (operator<(_GuardedIterator&, _GuardedIterator&)
858         (operator<=(_GuardedIterator&, _GuardedIterator&)
859         (operator<(_UnguardedIterator&, _UnguardedIterator&)
860         (operator<=(_UnguardedIterator&, _UnguardedIterator&): Change
861         parameters to const references.
863 2020-05-07  Eric Botcazou  <ebotcazou@adacore.com>
865         * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
866         * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
868 2020-05-06  François Dumont  <fdumont@gcc.gnu.org>
870         * include/bits/stl_algobase.h (struct _Bit_iterator): New declaration.
871         (std::__fill_a1(_Bit_iterator, _Bit_iterator, const bool&)): Likewise.
872         * include/bits/stl_bvector.h (__fill_bvector): Move outside
873         _GLIBCXX_STD_C namespace.
874         (fill(_Bit_iterator, _Bit_iterator, const bool&)): Likewise and rename
875         into...
876         (__fill_a1): ...this.
877         * testsuite/25_algorithms/fill/bvector/1.cc: New.
879 2020-05-06  H.J. Lu  <hongjiu.lu@intel.com>
881         * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
883 2020-05-06  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
885         * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
886         * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
887         Likewise.
888         * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
889         * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
890         Likewise.
892 2020-05-06  Martin Liska  <mliska@suse.cz>
894         Revert:
895         2020-05-05  Martin Liska  <mliska@suse.cz>
896         PR c/92472
897         * include/parallel/multiway_merge.h:
898         Use const for _Compare template argument.
900 2020-05-06  Jonathan Wakely  <jwakely@redhat.com>
902         * doc/xml/manual/abi.xml (abi.versioning.history): Document library
903         versions for GCC 9.[123] and 10.1 releases.
904         * doc/html/*: Regenerate.
906 2020-05-06  Jakub Jelinek  <jakub@redhat.com>
908         * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
909         * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
910         * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
911         * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
912         * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
913         * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
914         * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
916 2020-05-05  Martin Liska  <mliska@suse.cz>
918         PR c/92472
919         * include/parallel/multiway_merge.h:
920         Use const for _Compare template argument.
922 2020-05-04  Fangrui Song  <maskray@google.com>
924         * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
926 2020-05-04  Jonathan Wakely  <jwakely@redhat.com>
928         * doc/xml/faq.xml: Use working link for SGI STL FAQ.
929         * doc/html/*: Regenerate.
931         PR libstdc++/94906
932         * src/c++17/memory_resource.cc
933         (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
934         operands.
936 2020-05-04  Nathan Sidwell  <nathan@acm.org>
938         PR libstdc++/94747
939         * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
940         ptrdiff_t before negation, to show intent more clearly.
942 2020-05-04  Jonathan Wakely  <jwakely@redhat.com>
944         PR libstdc++/94936
945         * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
946         Add comment about single-threaded behaviour.
947         (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
948         class member access out of loop.
949         (synchronized_pool_resource::synchronized_pool_resource())
950         (synchronized_pool_resource::~synchronized_pool_resource())
951         (synchronized_pool_resource::release()): Check __gthread_active_p
952         before creating and/or deleting the thread-specific data key.
953         (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
954         assertions.
955         (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
956         path for single-threaded case.
957         (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
958         Likewise. Return if unable to find a pool that owns the allocation.
959         * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
960         New test.
961         * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
962         test.
963         * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
964         test.
966 2020-05-03  Jonathan Wakely  <jwakely@redhat.com>
968         PR libstdc++/94933
969         * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
970         usable in constant expressions.
971         * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
972         non-scalars.
974 2020-05-01  Jonathan Wakely  <jwakely@redhat.com>
976         PR libstdc++/94901
977         * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
979 2020-05-01  Jonathan Wakely  <jwakely@redhat.com>
980             Patrick Palka  <ppalka@redhat.com>
982         PR libstdc++/92894
983         * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
984         Add trait to determine return type and an alias for it.
985         (ranges::__cust_imove::_IMove::operator()): Use __result instead of
986         deduced return type.
987         (iter_rvalue_reference_t): Use _IMove::__type instead of checking
988         the result of ranges::iter_move.
989         (__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
990         instead of checking the result of ranges::iter_move.
991         * testsuite/24_iterators/customization_points/92894.cc: New test.
992         * testsuite/24_iterators/indirect_callable/92894.cc: New test.
994 2020-05-01  Jonathan Wakely  <jwakely@redhat.com>
996         PR libstdc++/94901
997         * include/std/type_traits (__is_complete_or_unbounded): Replace
998         BADNAME _T with _Tp.
999         * testsuite/17_intro/badnames.cc: New test.
1001 2020-04-30  Jonathan Wakely  <jwakely@redhat.com>
1003         PR libstdc++/89510
1004         * include/bits/alloc_traits.h (allocator_traits::_S_construct)
1005         (allocator_traits::_S_destroy)
1006         (allocator_traits<allocator<T>>::construct): Use traits in
1007         noexcept-specifiers.
1008         * include/bits/allocator.h (allocator<void>::construct)
1009         (allocator<void>::destroy): Likewise.
1010         * include/ext/malloc_allocator.h (malloc_allocator::construct)
1011         (malloc_allocator::destroy): Likewise.
1012         * include/ext/new_allocator.h (new_allocator::construct)
1013         (new_allocator::destroy): Likewise.
1014         * testsuite/20_util/allocator/89510.cc: New test.
1015         * testsuite/ext/malloc_allocator/89510.cc: New test.
1016         * testsuite/ext/new_allocator/89510.cc: New test.
1018 2020-04-29  Jonathan Wakely  <jwakely@redhat.com>
1020         PR libstdc++/94854
1021         * include/bits/basic_string.tcc: Update comment about explicit
1022         instantiations.
1024 2020-04-28  Jonathan Wakely  <jwakely@redhat.com>
1026         PR libstdc++/91480
1027         * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
1028         Remove non-standard macro.
1029         * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
1030         to indicate P1032R1 support.
1031         * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
1032         * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
1033         * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
1034         * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
1035         (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
1036         (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
1037         * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
1038         feature test macro.
1039         * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
1040         * testsuite/21_strings/basic_string_view/operations/copy/char/
1041         constexpr.cc: Likewise.
1042         * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
1044         PR libstdc++/94831
1045         * include/bits/alloc_traits.h (_S_construct): Restore placement
1046         new-expression for C++11/14/17 and call std::construct_at directly
1047         for C++20.
1048         * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
1049         function returning void.
1050         * testsuite/20_util/specialized_algorithms/
1051         uninitialized_value_construct/94831.cc: New test.
1052         * testsuite/23_containers/vector/cons/94831.cc: New test.
1054 2020-04-28  Patrick Palka  <ppalka@redhat.com>
1056         LWG 3433 subrange::advance(n) has UB when n < 0
1057         * include/std/ranges (subrange::prev): Fix typo.
1058         (subrange::advance): Handle a negative argument as per the proposed
1059         resolution of LWG 3433.
1060         * testsuite/std/ranges/subrange/lwg3433.cc: New test.
1062 2020-04-28  Jonathan Wakely  <jwakely@redhat.com>
1063             Iain Sandoe  <iain@sandoe.co.uk>
1065         PR c++/94759
1066         * include/std/coroutine: Implement handing for non-
1067         class coroutine return types.
1069 2020-04-24  Jonathan Wakely  <jwakely@redhat.com>
1071         * include/experimental/executor (service_already_exists): Make default
1072         constructor public (LWG 3414).
1073         * testsuite/experimental/net/execution_context/make_service.cc: Check
1074         the service_already_exists can be default constructed.
1076 2020-04-24  Kamlesh Kumar  <kamleshbhalui@gmail.com>
1077             Jonathan Wakely  <jwakely@redhat.com>
1079         PR libstdc++/90415
1080         PR libstdc++/92156
1081         * include/std/any (any): Rename template parameters for consistency
1082         with the standard.
1083         (any::_Decay): Rename to _Decay_if_not_any.
1084         (any::any(T&&):: Remove is_constructible from constraints. Remove
1085         non-standard overload.
1086         (any::any(in_place_type_t<T>, Args&&...))
1087         (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
1088         (any::emplace(Args&&...))
1089         (any::emplace(initializer_list<U>, Args&&...)):
1090         Use decay_t instead of _Decay.
1091         * testsuite/20_util/any/cons/90415.cc: New test.
1092         * testsuite/20_util/any/cons/92156.cc: New Test.
1093         * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
1094         more robust.
1095         * testsuite/20_util/any/modifiers/92156.cc: New test.
1097 2020-04-23  Jonathan Wakely  <jwakely@redhat.com>
1099         * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
1100         * doc/html/*: Regenerate.
1102         * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
1103         value for C++17 to 201803L because P0858R0 is supported for C++17.
1104         * include/std/version (__cpp_lib_array_constexpr): Likewise.
1105         * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
1106         Check for value corresponding to P0031R0 features being tested.
1107         * testsuite/23_containers/array/requirements/constexpr_iter.cc:
1108         Check for value corresponding to P0858R0 features being tested.
1110         * include/std/version (__cpp_lib_three_way_comparison): Define for
1111         freestanding builds.
1113 2020-04-23  Thomas Rodgers  <rodgert@appliantology.com>
1115         * include/experimental/net/executor (system_context): Mark
1116         system_context::system_context() = delete.
1117         * testsuite/experimental/net/executor/1.cc: Add new
1118         test to check system_context is not default constructible.
1120 2020-04-23  Iain Sandoe  <iain@sandoe.co.uk>
1122         * include/std/coroutine: Update the inline namespace to __n4861.
1123         Add the __cpp_lib_coroutine define, set to 201902L.
1124         * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
1126 2020-04-22  Jonathan Wakely  <jwakely@redhat.com>
1128         * include/std/execution (__cpp_lib_execution): Define to indicate
1129         support for P0024R2 and P1001R2.
1130         * include/std/version (__cpp_lib_execution): Define.
1131         * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
1132         defined by <algorithm>, move other tests to new tests ...
1133         * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
1134         * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
1135         * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
1136         * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
1138         * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
1139         different values for C++17 and C++20, to indicate different feature
1140         sets. Update value for C++20 to indicate P1032R1 support.
1141         * include/std/version (__cpp_lib_array_constexpr): Likewise.
1142         * testsuite/23_containers/array/comparison_operators/constexpr.cc:
1143         Check feature test macro.
1144         * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
1145         New test.
1146         * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
1147         feature test macro.
1148         * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
1149         in C++17 mode and check feature test macro.
1151         * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
1152         here.
1153         * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
1154         defined by <utility>.
1156         * include/std/functional (__cpp_lib_concepts): Update macro value to
1157         indicate P1964R2 support.
1158         * include/std/version (__cpp_lib_concepts): Likewise.
1159         * testsuite/std/concepts/1.cc: Adjust expected value.
1160         * testsuite/std/concepts/2.cc: Likewise.
1162         * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
1163         __cpp_lib_constexpr_functional.
1164         * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
1165         * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
1167         * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
1168         indicate P1006R1 support.
1169         (__cpp_lib_to_address): Define to indicate P0653R2 support.
1170         * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
1171         P1227R2 support.
1172         * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
1173         P0769R2 support.
1174         * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
1175         P0020R6 support.
1176         * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
1177         P1007R3 support.
1178         * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
1179         Define to indicate P0339R6 support.
1180         * include/std/string_view (__cpp_lib_starts_ends_with): Define to
1181         indicate P0457R2 support.
1182         * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
1183         to indicate P0758R1 support.
1184         (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
1185         (__cpp_lib_type_identity): Define to indicate P0887R1 support.
1186         * include/std/version (__cpp_lib_atomic_float)
1187         (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
1188         (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
1189         (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
1190         (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
1191         (__cpp_lib_to_address): Define.
1192         * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
1194         * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
1195         macro.
1196         * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
1197         Likewise.
1198         * include/std/version (__cpp_lib_map_insertion)
1199         (__cpp_lib_unordered_map_insertion): Remove.
1201         * include/std/condition_variable (__cpp_lib_jthread): Remove
1202         redundant definition.
1203         * include/std/stop_token (__cpp_lib_jthread): Update macro value to
1204         indicate P1869R1 support.
1205         * include/std/version (__cpp_lib_jthread): Update value.
1206         * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
1207         for updated macro value.
1208         * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
1209         Likewise.
1210         * testsuite/30_threads/jthread/1.cc: Likewise.
1211         * testsuite/30_threads/jthread/2.cc: Likewise.
1212         * testsuite/30_threads/stop_token/1.cc: Likewise.
1213         * testsuite/30_threads/stop_token/2.cc: Likewise.
1215         * testsuite/21_strings/basic_string/erasure.cc: Check for
1216         __cpp_lib_erase_if macro.
1217         * testsuite/23_containers/deque/erasure.cc: Add header name to #error
1218         messages.
1219         * testsuite/23_containers/forward_list/erasure.cc: Likewise.
1220         * testsuite/23_containers/list/erasure.cc: Likewise.
1221         * testsuite/23_containers/map/erasure.cc: Likewise.
1222         * testsuite/23_containers/set/erasure.cc: Likewise.
1223         * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
1224         * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
1225         * testsuite/23_containers/vector/erasure.cc: Likewise.
1227 2020-04-21  Jonathan Wakely  <jwakely@redhat.com>
1229         * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
1230         to define operator<=>.
1231         * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
1233         * doc/Makefile.am (xml_sources_manual): Add missing XML files.
1234         * doc/Makefile.in: Regenerate.
1235         * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
1236         of "this page".
1237         * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
1238         to the C++11 status table.
1239         * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
1240         proposals with table matching contents of the C++14 standard.
1241         * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
1242         the C++17 standard.
1243         * doc/html/*: Regenerate.
1245         PR c++/94149
1246         * include/std/type_traits (__is_nt_constructible_impl): Add partial
1247         specializations for bounded arrays with non-empty initializers.
1248         * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
1250 2020-04-20  Thomas Rodgers  <trodgers@redhat.com>
1252         * testsuite/lib/libstdc++.exp: Add additional_flags=
1253         -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
1254         compiling with a newer Thread Building Blocks.
1256 2020-04-20  Jonathan Wakely  <jwakely@redhat.com>
1258         * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
1260         * testsuite/20_util/is_constructible/51185.cc: Make test class a
1261         non-aggregate so that the test verifies the same thing in all -std
1262         modes.
1263         * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
1264         results for some types when paren-init for aggregates is supported.
1266         * include/std/version (__cpp_lib_three_way_comparison): Update value.
1267         * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
1268         (__detail::__synth3way): Add noexcept-specifier.
1270         * include/bits/stl_map.h (map): Define operator<=> and remove
1271         operator< for C++20.
1272         * include/bits/stl_multimap.h (multimap): Likewise.
1273         * include/bits/stl_multiset.h (multiset): Likewise.
1274         * include/bits/stl_set.h (set): Likewise.
1275         * include/bits/stl_tree.h (_Rb_tree): Likewise.
1276         (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
1277         operator!= for C++20.
1278         * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
1279         * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
1280         * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
1281         * include/debug/set.h (__gnu_debug::set): Likewise.
1282         * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
1283         * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
1284         * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
1285         * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
1287 2020-04-20  Matthias Kretz  <kretz@kde.org>
1289         * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
1291 2020-04-19  Jonathan Wakely  <jwakely@redhat.com>
1293         * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
1294         * include/bits/stl_stack.h (stack): Likewise.
1295         * testsuite/23_containers/queue/cmp_c++20.cc: New test.
1296         * testsuite/23_containers/stack/cmp_c++20.cc: New test.
1298         * include/bits/unordered_map.h (unordered_map, unordered_multimap):
1299         Remove redundant operator!= for C++20.
1300         * include/bits/unordered_set.h (unordered_set, unordered_multiset):
1301         Likewise.
1302         * include/debug/unordered_map (unordered_map, unordered_multimap):
1303         Likewise.
1304         * include/debug/unordered_set (unordered_set, unordered_multiset):
1305         Likewise.
1307         PR other/94629
1308         * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
1309         redundant assignment in constructor.
1311 2020-04-18  Jonathan Wakely  <jwakely@redhat.com>
1313         * include/std/chrono (duration, time_point): Define operator<=> and
1314         remove redundant operator!= for C++20.
1315         * testsuite/20_util/duration/comparison_operators/three_way.cc: New
1316         test.
1317         * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
1318         test.
1320         * testsuite/util/native_type/native_priority_queue.hpp: Use
1321         allocator_traits to rebind allocator.
1323 2020-04-17  Jonathan Wakely  <jwakely@redhat.com>
1325         * include/bits/forward_list.h (forward_list): Define operator<=> and
1326         remove redundant comparison operators for C++20.
1327         * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
1328         * include/bits/stl_deque.h (deque): Likewise.
1329         * include/bits/stl_iterator.h (__normal_iterator): Likewise.
1330         * include/bits/stl_list.h (list): Likewise.
1331         * include/bits/stl_vector.h (vector): Likewise.
1332         * include/debug/deque (__gnu_debug::deque): Likewise.
1333         * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
1334         * include/debug/list (__gnu_debug::list): Likewise.
1335         * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
1336         Likewise.
1337         * include/debug/vector (__gnu_debug::vector): Likewise.
1338         * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
1339         operator<=> for C++20.
1340         * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
1341         * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
1342         * testsuite/23_containers/list/cmp_c++20.cc: New test.
1343         * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
1344         * testsuite/23_containers/vector/cmp_c++20.cc: New test.
1346         * include/bits/basic_string.h (basic_string): Define operator<=> and
1347         remove redundant comparison operators for C++20.
1348         * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
1349         Add comparison_category members.
1350         (__detail::__char_traits_cmp_cat): New helper to get comparison
1351         category from char traits class.
1352         * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
1353         define for C++20.
1354         (sub_match): Define operator<=> and remove redundant comparison
1355         operators for C++20.
1356         (match_results): Remove redundant operator!= for C++20.
1357         * include/std/string_view (basic_string_view): Define operator<=> and
1358         remove redundant comparison operators for C++20.
1359         * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
1360         test.
1361         * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
1362         New test.
1363         * testsuite/21_strings/basic_string_view/operations/copy/char/
1364         constexpr.cc: Initialize variable.
1365         * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
1366         constexpr.cc: Likewise.
1367         * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
1368         dg-do directive and remove comments showing incorrect signatures.
1369         * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
1370         Likewise.
1371         * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
1372         New test.
1373         * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
1374         New test.
1375         * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
1377 2020-04-16  Jonathan Wakely  <jwakely@redhat.com>
1379         * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
1380         name of unused parameter.
1382 2020-04-15  Jonathan Wakely  <jwakely@redhat.com>
1384         * include/bits/fs_dir.h (file_status): Define operator== for C++20.
1385         (directory_entry): Define operator<=> and remove redundant comparison
1386         operators for C++20.
1387         * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
1388         * include/bits/fs_path.h (path): Define operator<=> and remove
1389         redundant comparison operators for C++20.
1390         * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
1391         * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
1392         * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
1393         * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
1395         * include/bits/allocator.h (operator!=): Do not define for C++20.
1396         * include/bits/locale_classes.h (operator!=): Likewise.
1397         * include/bits/std_function.h (operator==(nullptr_t, const function&))
1398         (operator!=(const function&, nullptr_t))
1399         (operator!=(nullptr_t, const function&)): Likewise.
1400         * include/ext/bitmap_allocator.h (operator!=): Likewise.
1401         * include/ext/debug_allocator.h (operator!=): Likewise.
1402         * include/ext/extptr_allocator.h (operator!=): Likewise.
1403         * include/ext/malloc_allocator.h (operator!=): Likewise.
1404         * include/ext/mt_allocator.h (operator!=): Likewise.
1405         * include/ext/new_allocator.h (operator!=): Likewise.
1406         * include/ext/pool_allocator.h (operator!=): Likewise.
1407         * include/ext/throw_allocator.h (operator!=): Likewise.
1408         * include/std/bitset (bitset::operator!=): Likewise.
1409         * include/std/memory_resource (operator!=): Likewise.
1410         * include/std/scoped_allocator (operator!=): Likewise.
1412         * include/std/typeindex (operator<=>): Define for C++20.
1413         * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
1415 2020-04-14  Jonathan Wakely  <jwakely@redhat.com>
1417         * libsupc++/compare (compare_three_way): Fix constraint so that
1418         BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
1419         * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
1420         New test.
1422         PR libstdc++/94562
1423         * include/bits/shared_ptr.h (operator<=>): Define for C++20.
1424         * include/bits/shared_ptr_base.h (operator<=>): Likewise.
1425         * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
1426         * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
1427         * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
1428         std::less<A*> to be used when comparing std::shared_ptr<A> objects in
1429         C++20.
1431         PR libstdc++/94565
1432         * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
1433         * testsuite/18_support/comparisons/categories/94565.cc: New test.
1435 2020-04-13  Iain Sandoe  <iain@sandoe.co.uk>
1437         * include/std/coroutine: Update coroutines builtin define,
1438         per n4861.
1440 2020-04-09  Jonathan Wakely  <jwakely@redhat.com>
1442         * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
1443         (strong_order, weak_order, partial_order): Replace uses of <=> with
1444         compare_three_way function object (LWG 3324).
1445         * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
1446         equality operator so that X satisfies three_way_comparable.
1447         * testsuite/18_support/comparisons/algorithms/strong_order.cc:
1448         Likewise.
1449         * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
1451         * include/bits/unique_ptr.h (operator<=>): Define for C++20.
1452         * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1453         * testsuite/20_util/default_delete/void_neg.cc: Likewise.
1454         * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
1455         * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
1457 2020-04-08  Jonathan Wakely  <jwakely@redhat.com>
1459         * include/bits/slice_array.h (operator==(const slice&, const slice&)):
1460         Define for C++20.
1461         * include/std/complex (operator==(const T&, const complex<T>&))
1462         (operator!=(const complex<T>&, const complex<T>&))
1463         (operator!=(const complex<T>&, const T&))
1464         (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
1465         * testsuite/26_numerics/slice/compare.cc: New test.
1467         * include/std/charconv (to_chars_result, from_chars_result): Add
1468         defaulted equality comparisons for C++20.
1469         * testsuite/20_util/from_chars/compare.cc: New test.
1470         * testsuite/20_util/to_chars/compare.cc: New test.
1472 2020-04-07  Jonathan Wakely  <jwakely@redhat.com>
1474         PR libstdc++/94520
1475         * include/std/charconv (__integer_to_chars_result_type)
1476         (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
1477         allow use in C++14.
1478         * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
1479         use of std::string_view with std::string.
1480         * testsuite/20_util/from_chars/2.cc: Likewise.
1481         * testsuite/20_util/to_chars/1.cc: Likewise.
1482         * testsuite/20_util/to_chars/2.cc: Likewise.
1484 2020-04-06  Jonathan Wakely  <jwakely@redhat.com>
1486         PR libstdc++/94498
1487         * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
1488         usable in constant expressions for C++20.
1489         (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
1490         _GLIBCXX20_CONSTEXPR.
1491         (std::char_traits<char>, std::char_traits<wchar_t>)
1492         (std::char_traits<char8_t>): Make move, copy and assign usable in
1493         constant expressions for C++20.
1494         (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
1495         and copy usable in constant expressions for C++20.
1496         * include/std/string_view (basic_string_view::copy): Add
1497         _GLIBCXX20_CONSTEXPR.
1498         * testsuite/21_strings/basic_string_view/operations/copy/char/
1499         constexpr.cc: New test.
1500         * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
1501         constexpr.cc: New test.
1503 2020-04-05  Gerald Pfeifer  <gerald@pfeifer.com>
1505         * doc/xml/manual/appendix_contributing.xml: Refer to Git
1506         documentation instead of Subversion.  Switch to https.
1507         * doc/html/manual/appendix_contributing.html: Regenerate.
1509 2020-04-03  Jonathan Wakely  <jwakely@redhat.com>
1511         PR libstdc++/93960
1512         * include/bits/ptr_traits.h (__to_address): Add special case for debug
1513         iterators, to avoid dereferenceable check.
1514         * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
1515         * testsuite/20_util/to_address/debug.cc: New test.
1517 2020-04-01  Andrea Corallo  <andrea.corallo@arm.com>
1519         * testsuite/experimental/net/execution_context/use_service.cc:
1520         Require pthread and gthreads.
1522 2020-04-01  Gerald Pfeifer  <gerald@pfeifer.com>
1524         * doc/xml/manual/appendix_free.xml: Move "free books" list from
1525         fsf.org to gnu.org.
1526         * doc/html/manual/appendix_free.html: Regenerate.
1528 2020-03-31  Ville Voutilainen  <ville.voutilainen@gmail.com>
1530         Library-side tests for parenthesized aggregate init
1532         PR c++/92878
1533         PR c++/92947
1535         * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
1536         * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
1537         * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
1538         * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
1539         * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
1540         * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
1541         * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
1542         * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
1543         * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
1544         Likewise.
1545         * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
1546         * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
1547         * testsuite/20_util/variant/92878_92947.cc: Likewise.
1548         * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
1549         Likewise.
1550         * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
1551         Likewise.
1552         * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
1553         Likewise.
1554         * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
1555         Likewise.
1556         * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
1557         Likewise.
1558         * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
1559         Likewise.
1560         * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
1561         * testsuite/23_containers/queue/92878_92947.cc: Likewise.
1562         * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
1563         Likewise.
1564         * testsuite/23_containers/stack/92878_92947.cc: Likewise.
1565         * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
1566         Likewise.
1567         * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
1568         Likewise.
1569         * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
1570         Likewise.
1571         * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
1572         Likewise.
1573         * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
1574         Likewise.
1576 2020-03-28  Jonathan Wakely  <jwakely@redhat.com>
1578         * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
1579         for changes due to parenthesized aggregate-initialization in C++20.
1580         * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
1581         with std::chrono::sys_time in C++20.
1583         * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
1584         to constrain C++20 versions of comparison operators. Fix backwards
1585         logic of relational operators.
1586         (move_iterator): Use requires-clause to constrain comparison operators
1587         in C++20. Do not declare non-standard same-type overloads for C++20.
1588         * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
1589         of comparisons and check using greedy_ops type.
1590         * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
1591         * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
1592         main function from compile-only test.
1593         * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
1595 2020-03-27  Jonathan Wakely  <jwakely@redhat.com>
1597         * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
1598         * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
1599         C++20 concepts are required.
1600         * include/bits/stl_iterator_base_types.h: Likewise.
1601         * include/std/concepts: Likewise.
1602         * include/std/version: Likewise.
1603         * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
1604         macro.
1606         * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
1607         (reverse_iterator::iterator_category): Define for C++20.
1608         (reverse_iterator): Define comparison operators correctly for C++20.
1609         (__normal_iterator): Add constraints to comparison operators for C++20.
1610         (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
1611         overload for input iterators.
1612         (move_iterator): Add constraints to comparison operators for C++20.
1613         Define operator<=> for C++20.
1614         * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
1615         * testsuite/24_iterators/move_iterator/move_only.cc: New test.
1616         * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
1617         * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
1619         * include/bits/iterator_concepts.h (__detail::__decay_copy)
1620         (__detail::__member_begin, __detail::__adl_begin): Move here from
1621         <bits/range_access.h>.
1622         (__detail::__ranges_begin, __detail::__range_iter_t): Define.
1623         * bits/range_access.h (__cust_access::__decay_copy)
1624         (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
1625         <bits/iterator_concepts.h>.
1626         (ranges::iterator_t): Use __detail::__range_iter_t.
1627         * include/bits/stl_iterator.h (back_insert_iterator): Simplify
1628         conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
1629         (front_insert_iterator): Likewise.
1630         (insert_iterator): Implement changes from P0896R4 for C++20.
1631         * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
1632         * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
1633         * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
1634         for inclusion in synopsis_c++20.cc which expects different signatures
1635         for some function templates.
1636         * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
1638         * include/std/type_traits (__is_array_convertible): Move definition
1639         to immediately after is_convertible.
1641 2020-03-26  Jonathan Wakely  <jwakely@redhat.com>
1643         * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
1644         (chrono::months, chrono::sys_days, chrono::local_t)
1645         (chrono::local_time, chrono::local_seconds, chrono::local_days):
1646         Define for C++20.
1647         (chrono::time_point): Add missing static assert.
1648         * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
1649         * testsuite/std/time/clock/file/overview.cc: New test.
1650         * testsuite/std/time/clock/file/members.cc: New test.
1651         * testsuite/std/time/syn_c++20.cc: New test.
1653 2020-03-25  Mike Crowe  <mac@mcrowe.com>
1655         * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
1656         test.
1657         * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
1658         test.
1660 2020-03-25  Jonathan Wakely  <jwakely@redhat.com>
1662         * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
1663         * include/std/chrono (filesystem::__file_clock): Here.
1664         (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
1665         Define public member functions for C++20.
1666         (is_clock, is_clock_v): Define traits for C++20.
1667         * include/std/condition_variable (condition_variable::wait_until): Add
1668         check for valid clock.
1669         * include/std/future (_State_baseV2::wait_until): Likewise.
1670         * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
1671         * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
1672         Likewise.
1673         * include/std/thread (this_thread::sleep_until): Likewise.
1674         * testsuite/30_threads/condition_variable/members/2.cc: Qualify
1675         slow_clock with new namespace.
1676         * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
1677         test.
1678         * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
1679         New test.
1680         * testsuite/30_threads/future/members/clock_neg.cc: New test.
1681         * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
1682         Qualify slow_clock with new namespace.
1683         * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
1684         clock_neg.cc: New test.
1685         * testsuite/30_threads/shared_future/members/clock_neg.cc: New
1686         test.
1687         * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
1688         * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
1689         New test.
1690         * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
1691         slow_clock with new namespace.
1692         * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
1693         * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
1694         test.
1695         * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
1696         * testsuite/std/time/traits/is_clock.cc: New test.
1697         * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
1698         namespace.
1700 2020-03-21  Jonathan Wakely  <jwakely@redhat.com>
1702         PR libstdc++/93245
1703         * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
1704         * testsuite/experimental/filesystem/path/generic/generic_string.cc:
1705         Improve test coverage.
1707         PR libstdc++/94242
1708         * include/bits/fs_path.h (path::_S_str_convert): Replace first
1709         parameter with basic_string_view so that strings with different
1710         allocators can be accepted.
1711         (path::generic_string<C,T,A>()): Use basic_string object that uses the
1712         right allocator type.
1713         * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
1714         * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
1715         test coverage.
1717 2020-03-18  Jonathan Wakely  <jwakely@redhat.com>
1719         PR libstdc++/94033
1720         * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
1721         (__is_nt_default_constructible_impl): Remove.
1722         (__is_nothrow_default_constructible_impl): Remove.
1723         (__is_nt_constructible_impl): Add bool template parameter. Adjust
1724         partial specializations.
1725         (__is_nothrow_constructible_impl): Replace class template with alias
1726         template.
1727         (is_nothrow_default_constructible): Derive from alias template
1728         __is_nothrow_constructible_impl instead of
1729         __is_nothrow_default_constructible_impl.
1730         * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
1732         * include/std/stop_token (stop_token::_Stop_state_ref): Define
1733         comparison operators explicitly if the compiler won't synthesize them.
1735         * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
1736         __cpp_lib_concepts before using iter_reference_t.
1737         * include/bits/stream_iterator.h (istream_iterator): Check
1738         __cpp_lib_concepts before using default_sentinel_t.
1739         * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
1741         PR libstdc++/94203
1742         * include/experimental/executor (executor::executor(Executor)): Call
1743         make_shared directly instead of _M_create. Create _Tgt1 object.
1744         (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
1745         Call allocate_shared directly instead of _M_create. Create _Tgt2
1746         object.
1747         (executor::target_type): Add cast needed for new _Tgt interface.
1748         (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
1749         (executor::_Tgt): Define the same interface whether RTTI is enabled or
1750         not.
1751         (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
1752         std::type_info in the interface.
1753         (executor::_Tgt::_M_func): Add data member.
1754         (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
1755         (executor::_Tgt1::_S_func): Define function to access target without
1756         depending on RTTI.
1757         (executor::_M_create): Remove.
1758         (operator==, operator!=): Simplify comparisons for executor.
1759         * include/experimental/socket (is_error_code_enum<socket_errc>):
1760         Define specialization before use.
1761         * testsuite/experimental/net/executor/1.cc: New test.
1763 2020-03-16  Jonathan Wakely  <jwakely@redhat.com>
1765         PR libstdc++/94199
1766         * include/experimental/executor (service_already_exists): Add default
1767         constructor. Declare make_service to be a friend.
1768         * testsuite/experimental/net/execution_context/make_service.cc: New
1769         test.
1771 2020-03-12  Jonathan Wakely  <jwakely@redhat.com>
1773         * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
1774         a null pointer to functions with nonnull(1) attribute.
1776 2020-03-11  Patrick Palka  <ppalka@redhat.com>
1778         * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
1779         'address' -> 'std::__addressof'.
1780         * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
1781         a non-forward input_range.
1782         * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
1783         default constructor protected instead of deleted, like with
1784         input_iterator_wrapper.
1785         (test_range::iterator): Add comment explaining that this type is used
1786         only when the underlying wrapper is input_iterator_wrapper or
1787         output_iterator_wrapper.  Remove delegating defaulted constructor so
1788         that the inherited default constructor is used instead.
1790         LWG 3286 ranges::size is not required to be valid after a call to
1791         ranges::begin on an input range
1792         * include/std/ranges (subrange::subrange): Split single-argument
1793         constructor into two, one constrained by _S_store_size and another by
1794         !_S_store_size.
1795         (take_view::begin): Call size() before calling ranges::begin(_M_base).
1796         * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
1797         * testsuite/std/ranges/subrange/lwg3286.cc: New test.
1799 2020-03-10  Jonathan Wakely  <jwakely@redhat.com>
1801         * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
1802         instead of _M_current.
1803         (split_view::_OuterIter::operator++): Likewise.
1805         * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
1806         (transform_view::_Iterator::operator*): Add noexcept-specifier.
1807         (transform_view::_Iterator::iter_move): Inline __iter_move body here.
1808         (split_view::_OuterIter::__current): Add noexcept.
1809         (split_view::_InnerIter::__iter_swap): Remove.
1810         (split_view::_InnerIter::__iter_move): Remove.
1811         (split_view::_InnerIter::_M_i_current): New accessors.
1812         (split_view::_InnerIter::__at_end): Use _M_i_current().
1813         (split_view::_InnerIter::operator*): Likewise.
1814         (split_view::_InnerIter::operator++): Likewise.
1815         (iter_move(const _InnerIter&)): Likewise.
1816         (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
1817         * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
1818         for iter_move and iter_swap on split_view's inner iterator.
1820         PR c++/94117
1821         * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
1822         Change expression in noexcept-specifier to match function body.
1824         * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
1825         comment explaining multiple dg-do directives.
1826         * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
1827         so test is run as well as compiled.
1829 2020-03-09  Jonathan Wakely  <jwakely@redhat.com>
1831         PR libstdc++/94063
1832         * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
1833         handle concatenations that change the type of the first component.
1834         (path::operator+=(basic_string_view<value_type>)): Likewise.
1835         * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
1837 2020-03-06  Patrick Palka  <ppalka@redhat.com>
1839         * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
1840         join_view::_Sentinel<!_Const>.
1841         * testsuite/std/ranges/adaptors/join.cc: Augment test.
1843         PR libstdc++/93978
1844         * include/bits/range_access.h (__cust_access::_Empty::operator()):
1845         Declare return type to be bool instead of auto.
1846         * testsuite/std/ranges/adaptors/93978.cc: New test.
1848 2020-03-06  Jonathan Wakely  <jwakely@redhat.com>
1850         PR libstdc++/94069
1851         * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
1852         (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
1853         second argument to __glibcxx_rwlock_init.
1854         * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
1856         PR libstdc++/93244
1857         * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
1858         test to not fail due to PR 94063.
1859         * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
1860         * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
1862 2020-03-06  Andreas Krebbel  <krebbel@linux.ibm.com>
1864         * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
1865         would match ENOSYS.
1867 2020-03-05  Jonathan Wakely  <jwakely@redhat.com>
1869         * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
1870         * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
1871         * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1872         * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
1873         for return value, and in comparison.
1874         * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
1876         PR libstdc++/94051
1877         * include/std/string_view: Include <bits/ostream_insert.h>.
1878         * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
1880 2020-03-04  Jonathan Wakely  <jwakely@redhat.com>
1882         * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
1884 2020-03-04  Patrick Palka  <ppalka@redhat.com>
1886         PR libstdc++/94017
1887         * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
1888         condition for when to use memset, making sure to additionally check that
1889         the output pointer's value type is a non-volatile byte type.  Instead of
1890         requiring that the fill type is a byte type, just require that it's an
1891         integral type.
1892         * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
1893         New test.
1894         * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
1895         New test.
1896         * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
1897         blocked by PR 94017.
1898         * testsuite/25_algorithms/fill/94017.cc: New test.
1899         * testsuite/25_algorithms/fill_n/94017.cc: New test.
1901         LWG 3355 The memory algorithms should support move-only input iterators
1902         introduced by P1207
1903         * include/bits/ranges_uninitialized.h
1904         (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
1905         to copy __ifirst, which could be a move-only input iterator.  Use
1906         operator- instead of ranges::distance to compute distance from a sized
1907         sentinel.
1908         (__uninitialized_copy_n_fn::operator()): Likewise.
1909         (__uninitialized_move_fn::operator()): Likewise.
1910         (__uninitialized_move_n_fn::operator()): Likewise.
1911         (__uninitialized_destroy_fn::operator()): Use std::move to avoid
1912         attempting to copy __first.
1913         (__uninitialized_destroy_n_fn::operator()): Likewise.
1914         * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
1915         Augment test.
1916         * .../specialized_algorithms/uninitialized_copy/constrained.cc:
1917         Likewise.
1918         * .../specialized_algorithms/uninitialized_move/constrained.cc:
1919         Likewise.
1921         * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
1922         protected instead of private.
1923         (test_sized_range_sized_sent): New.
1925         * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
1926         New testsuite iterator.
1927         * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
1928         * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
1930         * include/bits/ranges_uninitialized.h
1931         (uninitialized_copy_fn::operator()): Pass a reference type as the first
1932         argument to is_nothrow_assignable_v.
1933         (uninitialized_copy_fn::operator()): Likewise.
1934         (uninitialized_move_fn::operator()): Likewise.  Return an in_out_result
1935         with the input iterator stripped of its move_iterator.
1936         (uninitialized_move_n_fn::operator()): Likewise.
1937         (uninitialized_fill_fn::operator()): Pass a reference type as the first
1938         argument to is_nothrow_assignable_v.
1939         (uninitialized_fill_n_fn::operator()): Likewise.
1941 2020-03-03  Jonathan Wakely  <jwakely@redhat.com>
1943         PR libstdc++/94013
1944         * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
1945         traits to control when to use memmove and memcmp optimizations.
1946         (__is_nonvolatile_trivially_copyable): New helper trait.
1947         * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
1948         use memcmp optimization with volatile data.
1949         * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
1950         (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
1951         * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
1952         (__copy_move_backward_a2): Likewise.
1953         (__equal_aux1): Use __memcmpable.
1954         (__lexicographical_compare_aux): Do not use memcmp optimization with
1955         volatile data.
1956         * testsuite/25_algorithms/copy/94013.cc: New test.
1957         * testsuite/25_algorithms/copy_backward/94013.cc: New test.
1958         * testsuite/25_algorithms/equal/94013.cc: New test.
1959         * testsuite/25_algorithms/fill/94013.cc: New test.
1960         * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
1961         * testsuite/25_algorithms/move/94013.cc: New test.
1962         * testsuite/25_algorithms/move_backward/94013.cc: New test.
1964         * include/bits/stl_algobase.h (lexicographical_compare_three_way):
1965         Avoid redundant iterator comparisons (LWG 3410).
1967 2020-03-02  Jonathan Wakely  <jwakely@redhat.com>
1969         PR libstdc++/93972
1970         * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
1971         differ.
1972         * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
1974         * include/std/ranges (__detail::__maybe_empty_t): Rename to
1975         __maybe_present_t.
1976         (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
1978         * include/bits/ranges_algo.h (shift_right): Add 'typename' to
1979         dependent type.
1981 2020-03-01  H.J. Lu  <hongjiu.lu@intel.com>
1983         * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1985 2020-02-29  John David Anglin  <danglin@gcc.gnu.org>
1987         * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
1988         * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
1989         * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
1990         * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
1991         * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
1993         * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
1994         Add libatomic option.
1995         * testsuite/30_threads/jthread/jthread.cc: Likewise.
1997 2020-02-29  François Dumont  <fdumont@gcc.gnu.org>
1999         * include/bits/stl_algo.h
2000         (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
2001         * include/bits/stl_algobase.h: ...here.
2002         * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
2004 2020-02-29  John David Anglin  <danglin@gcc.gnu.org>
2006         * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
2007         option.
2008         * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
2009         Likewise.
2010         * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
2011         * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
2012         * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
2013         * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
2014         * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
2015         * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
2016         * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
2017         Likewise.
2019         PR libstdc++/92906
2020         * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
2022 2020-02-28  Patrick Palka  <ppalka@redhat.com>
2024         PR libstdc++/93972
2025         * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
2026         Fix condition for when to use memcmp, making it consistent with the
2027         corresponding condition used in std::lexicographical_compare.
2028         * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
2030         * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
2031         functions introduced in C++11, C++17 and C++2a.  Add 'constexpr' to
2032         existing signatures for C++2a.
2034 2020-02-28  Jonathan Wakely  <jwakely@redhat.com>
2036         * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
2037         test instead of just compiling it.
2039 2020-02-28  Patrick Palka  <ppalka@redhat.com>
2041         * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
2042         whenever the underlying range models common_range.
2044         * include/std/ranges (__detail::_CachedPosition): New struct.
2045         (views::filter_view::_S_needs_cached_begin): New member variable.
2046         (views::filter_view::_M_cached_begin): New member variable.
2047         (views::filter_view::begin): Use _M_cached_begin to cache its
2048         result.
2049         (views::drop_view::_S_needs_cached_begin): New static member variable.
2050         (views::drop_view::_M_cached_begin): New member variable.
2051         (views::drop_view::begin): Use _M_cached_begin to cache its result
2052         when _S_needs_cached_begin.
2053         (views::drop_while_view::_M_cached_begin): New member variable.
2054         (views::drop_while_view::begin): Use _M_cached_begin to cache its
2055         result.
2056         (views::reverse_view::_S_needs_cached_begin): New static member
2057         variable.
2058         (views::reverse_view::_M_cached_begin): New member variable.
2059         (views::reverse_view::begin): Use _M_cached_begin to cache its result
2060         when _S_needs_cached_begin.
2061         * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
2062         drop_view::begin caches its result.
2063         * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
2064         that drop_while_view::begin caches its result.
2065         * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
2066         filter_view::begin caches its result.
2067         * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
2068         reverse_view::begin caches its result.
2070 2020-02-28  Jonathan Wakely  <jwakely@redhat.com>
2072         * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
2073         filesystems that silently truncate timestamps.
2074         * testsuite/experimental/filesystem/operations/last_write_time.cc:
2075         Likewise.
2077         * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
2078         -Wstringop-overflow warnings.
2080 2020-02-27  Jonathan Wakely  <jwakely@redhat.com>
2082         * testsuite/lib/libstdc++.exp (v3_target_compile): Add
2083         -fdiagnostics-urls=never to options.
2085 2020-02-27  Patrick Palka  <ppalka@redhat.com>
2087         * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
2088         _Iterator<!_Const>.
2089         (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
2090         (take_view::_Sentinel<_Const>): Likewise.
2091         (take_while_view::_Sentinel<_Const>): Likewise.
2092         (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
2093         * testsuite/std/ranges/adaptors/split.cc: Augment test.
2094         * testsuite/std/ranges/adaptors/take.cc: Augment test.
2095         * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
2096         * testsuite/std/ranges/adaptors/transform.cc: Augment test.
2098         * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
2099         base() of a vector<>::iterator is a pointer.
2100         * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
2101         * testsuite/25_algorithms/move/constrained.cc: Likewise.
2102         * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
2103         * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
2104         instead of &foo[0].
2105         * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
2106         * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
2107         * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
2108         * testsuite/25_algorithms/sort/constrained.cc: Likewise.
2109         * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
2111 2020-02-27  Jonathan Wakely  <jwakely@redhat.com>
2113         * include/debug/array (operator<=>): Define for C++20.
2114         * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
2115         Adjust dg-error line numbers.
2116         * testsuite/23_containers/array/tuple_interface/
2117         tuple_element_debug_neg.cc: Likewise.
2119         * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
2120         defining _GLIBCXX_ASSERTIONS.
2121         * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
2122         * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
2123         * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
2124         * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
2125         * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
2126         * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
2127         * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
2128         * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
2129         * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
2130         * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
2131         * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
2132         * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
2134         * include/debug/string (__gnu_debug::basic_string::insert): Fix for
2135         C++98 where the member function of the base class returns void.
2137         * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
2138         equality comparisons that support value-initialized iterators.
2140         * include/bits/boost_concept_check.h (__function_requires): Add
2141         _GLIBCXX14_CONSTEXPR.
2142         * testsuite/25_algorithms/min/concept_checks.cc: New test.
2144 2020-02-26  Patrick Palka  <ppalka@redhat.com>
2146         PR libstdc++/93936
2147         * include/std/ranges (split_view::_InnerIter::operator==): Compare
2148         the operands' _M_i rather than their _M_i.current().
2149         * testsuite/std/ranges/adaptors/split.cc: Augment test.
2151         P1645R1 constexpr for <numeric> algorithms
2152         * include/bits/stl_numeric.h (iota, accumulate, inner_product,
2153         partial_sum, adjacent_difference): Make conditionally constexpr for
2154         C++20.
2155         * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
2156         test macro.
2157         (reduce, transform_reduce, exclusive_scan, inclusive_scan,
2158         transform_exclusive_scan, transform_inclusive_scan): Make conditionally
2159         constexpr for C++20.
2160         * include/std/version (__cpp_lib_constexpr_numeric): Define.
2161         * testsuite/26_numerics/accumulate/constexpr.cc: New test.
2162         * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
2163         * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
2164         * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
2165         * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
2166         * testsuite/26_numerics/iota/constexpr.cc: Likewise.
2167         * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
2168         * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
2169         * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
2170         * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
2171         * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
2173 2020-02-26  Jonathan Wakely  <jwakely@redhat.com>
2175         * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
2176         variables in smaller scope and avoid calling ranges::distance when we
2177         know they are pointers. Remove statically-unreachable use of
2178         __builtin_unreachable().
2179         * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
2180         Define inline.
2182         * include/std/ranges (__detail::__maybe_empty_t): Define new helper
2183         alias.
2184         (__detail::__maybe_const_t): Likewise.
2185         (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
2186         (transform_view, take_view, take_while_view, elements_view): Use
2187         __maybe_const_t.
2188         (join_view, split_view): Use both.
2190 2020-02-25  Patrick Palka  <ppalka@redhat.com>
2192         LWG 3397 basic_istream_view::iterator should not provide
2193         iterator_category
2194         * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
2195         Rename to ...
2196         (basic_istream_view:_Iterator::iterator_concept): ... this.
2197         * testsuite/std/ranges/istream_view.cc: Augment test.
2199         LWG 3325 Constrain return type of transformation function for
2200         transform_view
2201         * include/std/ranges (transform_view): Constrain the return type of the
2202         transformation function as per LWG 3325.
2203         * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
2205         LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
2206         * include/std/ranges (join_view::_Iterator::operator--): Require that
2207         range_reference_t<_Base> models common_range.
2208         * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
2210         LWG 3301 transform_view::_Iterator has incorrect iterator_category
2211         * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
2212         determination of iterator_category as per LWG 3301.
2213         * testsuite/std/ranges/adaptors/transform.cc: Augment test.
2215         LWG 3292 iota_view is under-constrained
2216         * include/std/ranges (iota_view): Require that _Winc models semiregular
2217           as per LWG 3292.
2218         * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
2220 2020-02-25  Jonathan Wakely  <jwakely@redhat.com>
2222         * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
2223         during constant evaluation. Call __builtin_memmove directly instead of
2224         __memmove.
2225         (__copy_or_move_backward): Likewise.
2226         * include/bits/stl_algobase.h (__memmove): Remove.
2227         (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
2228         (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
2229         Use __builtin_memmove directly instead of __memmove.
2230         (__copy_move_a2): Do not use memmove during constant evaluation.
2231         (__copy_move_backward_a2): Use _IsMove constant to select correct
2232         __copy_move_backward specialization.
2233         * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
2234         begin turned into moves during constant evaluation.
2236         * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
2237         previous commit.
2239         PR libstdc++/93872
2240         * include/bits/stl_algobase.h (__memmove): Cast away const before
2241         doing move assignment.
2242         * testsuite/25_algorithms/move/93872.cc: New test.
2243         * testsuite/25_algorithms/move_backward/93872.cc: New test.
2245 2020-02-24  Patrick Palka  <ppalka@redhat.com>
2247         PR libstdc++/93884
2248         * include/bits/ranges_algobase.h (__copy_or_move,
2249         __copy_or_move_backward): Don't inspect the iter_value_t of the output
2250         iterator, instead inspect its iterator_traits directly.
2251         * include/bits/stl_iterator.h (back_insert_iterator::container):
2252         Conditionally initialize.
2253         (back_insert_iterator::difference_type): Conditionally define.
2254         (back_insert_iterator::back_insert_iterator): Conditionally define this
2255         default constructor.
2256         (front_insert_iterator::container): Conditionally initialize.
2257         (front_insert_iterator::difference_type): Conditionally define.
2258         (front_insert_iterator::front_insert_iterator): Conditionally define
2259         this default constructor.
2260         * 24_iterators/back_insert_iterator/pr93884.cc: New test.
2261         * 24_iterators/front_insert_iterator/pr93884.cc: New test.
2263         P0769R2 Add shift to <algorithm>
2264         * include/bits/ranges_algo.h (shift_left, shift_right): New.
2265         * testsuite/25_algorithms/shift_left/1.cc: New test.
2266         * testsuite/25_algorithms/shift_right/1.cc: New test.
2268 2020-02-24  Jonathan Wakely  <jwakely@redhat.com>
2270         * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
2271         Make noexcept-specifier conditional.
2272         * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
2273         noexcept-specifier.
2275         * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
2276         Add constructor.
2277         (operator==(istream_iterator, default_sentinel_t)): Add operator.
2278         (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
2279         * include/bits/streambuf_iterator.h
2280         (istreambuf_iterator(default_sentinel_t)): Add constructor.
2281         (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
2282         * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
2283         New test.
2284         * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
2285         * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
2286         New test.
2287         * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
2289         * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
2290         (ranges::enable_view): Simplify (LWG 3326).
2291         * include/bits/range_access.h (ranges::enable_view): Declare.
2292         * include/bits/regex.h (__enable_view_impl): Remove partial
2293         specialization.
2294         * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
2295         * include/bits/stl_set.h (__enable_view_impl): Likewise.
2296         * include/bits/unordered_set.h (__enable_view_impl): Likewise.
2297         * include/debug/multiset.h (__enable_view_impl): Likewise.
2298         * include/debug/set.h (__enable_view_impl): Likewise.
2299         * include/debug/unordered_set (__enable_view_impl): Likewise.
2300         * include/experimental/string_view (ranges::enable_view): Define
2301         partial specialization.
2302         * include/std/span (ranges::enable_view): Likewise.
2303         * include/std/string_view (ranges::enable_view): Likewise.
2304         * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
2306 2020-02-21  Jonathan Wakely  <jwakely@redhat.com>
2308         * include/std/optional (operator<=>(optional<T>, optional<U>))
2309         (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
2310         Define for C++20.
2311         * include/std/tuple (__tuple_cmp): New helper function for <=>.
2312         (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
2313         * include/std/variant (operator<=>(variant<T...>, variant<T...>))
2314         (operator<=>(monostate, monostate)): Define for C++20.
2315         * testsuite/20_util/optional/relops/three_way.cc: New test.
2316         * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
2317         * testsuite/20_util/variant/89851.cc: Move to ...
2318         * testsuite/20_util/variant/relops/89851.cc: ... here.
2319         * testsuite/20_util/variant/90008.cc: Move to ...
2320         * testsuite/20_util/variant/relops/90008.cc: ... here.
2321         * testsuite/20_util/variant/relops/three_way.cc: New test.
2323 2020-02-20  Patrick Palka  <ppalka@redhat.com>
2325         * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
2326         function.
2327         (views::__adaptor::_RangeAdaptor::operator()): Add comments.  Use
2328         __maybe_refwrap to capture lvalue references by reference, and then use
2329         unwrap_reference_t to forward the by-reference captures as references.
2330         * testsuite/std/ranges/adaptors/split.cc: Augment test.
2331         * testsuite/std/ranges/adaptors/split_neg.cc: New test.
2333         * include/std/ranges (iota_view): Forward declare _Sentinel.
2334         (iota_view::_Iterator): Befriend _Sentinel.
2335         (iota_view::_Sentinel::_M_equal): New member function.
2336         (iota_view::_Sentinel::operator==): Use it.
2337         (views::_Iota::operator()): Forward __f using the correct type.
2338         * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
2339         with integers of different signedness, to appease iota_view's deduction
2340         guide.
2341         * testsuite/std/ranges/iota/iota_view.cc: Augment test.
2343 2020-02-20  Jonathan Wakely  <jwakely@redhat.com>
2345         * include/bits/range_access.h (ranges::begin): Reject array of
2346         incomplete type.
2347         (ranges::end, ranges::size): Require arrays to be bounded.
2348         (ranges::data): Require lvalue or borrowed_range.
2349         (ranges::iterator_t): Remove constraint.
2350         * testsuite/std/ranges/access/begin.cc: Do not check array of
2351         incomplete type.
2352         * testsuite/std/ranges/access/begin_neg.cc: New test.
2353         * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
2354         * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
2355         * testsuite/std/ranges/access/ssize.cc: Do not check array of
2356         incomplete type.
2358         * include/std/system_error (error_category::operator<=>)
2359         (operator<=>(const error_code&, const error_code&))
2360         (operator<=>(const error_condition&, const error_condition&)): Define
2361         for C++20.
2362         * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
2363         * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
2364         test.
2365         * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
2366         incorrect comment.
2367         * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
2368         * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
2369         incorrect comment.
2370         * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
2371         * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
2372         incorrect comment.
2373         * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
2374         * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
2375         Remove incorrect comment.
2376         * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
2377         test.
2379         * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
2381         * include/std/thread (thread::id::operator<=>): Define for C++20.
2382         * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
2383         functions in namespace std.
2384         * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
2386 2020-02-19  Patrick Palka  <ppalka@redhat.com>
2388         * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
2389         null terminator of the underlying string as part of the test_range.
2390         (main): Call test03.
2392 2020-02-19  Jonathan Wakely  <jwakely@redhat.com>
2394         * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
2395         requirement (LWG 3385).
2396         * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
2397         expected declaration.
2399         * include/std/ranges (take_while_view, drop_view, drop_while_view)
2400         (elements_view:_Iterator): Initialize data members (LWG 3364).
2402         * libsupc++/compare (three_way_comparable): Remove always-false check
2403         that should have been removed with weak_equality (P1959R0).
2404         (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
2406         * include/std/concepts (__detail::__partially_ordered_with): Move here
2407         from <compare>.
2408         (totally_ordered, totally_ordered_with): Use __partially_ordered_with
2409         to simplify definition (LWG 3331).
2410         * libsupc++/compare (__detail::__partially_ordered_with): Move to
2411         <concepts>.
2413         * include/std/concepts (totally_ordered_with): Remove redundant
2414         requirement (LWG 3329).
2416         * include/std/ranges (__detail::__convertible_to_non_slicing): New
2417         helper concept.
2418         (__detail::__pair_like_convertible_to): Remove.
2419         (__detail::__pair_like_convertible_from): Add requirements for
2420         non-slicing conversions.
2421         (subrange): Constrain constructors with __convertible_to_non_slicing.
2422         Remove constructors from pair-like types. Add new deduction guide.
2423         * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
2425         * include/bits/iterator_concepts.h (iter_move): Add declaration to
2426         prevent unqualified lookup finding a suitable declaration (LWG 3247).
2428         * include/std/memory_resource (polymorphic_allocator::allocate)
2429         (polymorphic_allocator::allocate_object): Change type of exception to
2430         bad_array_new_length (LWG 3237).
2431         * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
2433         * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
2434         * include/std/version (__cpp_lib_unwrap_ref): Likewise.
2435         * testsuite/20_util/unwrap_reference/1.cc: Check macro.
2436         * testsuite/20_util/unwrap_reference/3.cc: New test.
2438         * include/std/numeric (midpoint(T8, T*)): Do not check for complete
2439         type during overload resolution, use static assert instead (LWG 3200).
2440         * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
2441         incomplete type.
2442         * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
2444         * include/std/span (span(T (&)[N])): Use non-deduced context to
2445         prevent first parameter from interfering with class template argument
2446         deduction (LWG 3369).
2447         * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
2448         * testsuite/23_containers/span/lwg3255.cc: Check for construction from
2449         rvalues.
2451         * include/std/span (span::const_iterator, span::const_reverse_iterator)
2452         (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
2453         Remove (LWG 3320).
2454         * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
2455         and cend.
2456         * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
2457         Likewise.
2458         * testsuite/20_util/specialized_algorithms/uninitialized_copy/
2459         constrained.cc: Likewise.
2460         * testsuite/20_util/specialized_algorithms/
2461         uninitialized_default_construct/constrained.cc: Likewise.
2462         * testsuite/20_util/specialized_algorithms/uninitialized_fill/
2463         constrained.cc: Likewise.
2464         * testsuite/20_util/specialized_algorithms/uninitialized_move/
2465         constrained.cc: Likewise.
2466         * testsuite/20_util/specialized_algorithms/
2467         uninitialized_value_construct/constrained.cc: Likewise.
2469         * include/bits/range_access.h (range_size_t): Define alias template.
2470         * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
2471         * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
2473         * include/std/ranges (filter_view, transform_view, take_view)
2474         (join_view, split_view, reverse_view): Remove commented-out converting
2475         constructors (LWG 3280).
2477         * include/std/memory (uninitialized_construct_using_allocator): Use
2478         std::construct_at (LWG 3321).
2480         * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
2481         (polymorphic_allocator::allocate_object)
2482         (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
2484         LWG 3379. "safe" in several library names is misleading
2485         * include/bits/range_access.h (enable_safe_range): Rename to
2486         enable_borrowed_range.
2487         (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
2488         (safe_range): Rename to borrowed_range.
2489         * include/bits/ranges_algo.h: Adjust to use new names.
2490         * include/bits/ranges_algobase.h: Likewise.
2491         * include/bits/ranges_uninitialized.h: Likewise.
2492         * include/std/ranges: Likewise.
2493         (safe_iterator_t): Rename to borrowed_iterator_t.
2494         (safe_subrange_t): Rename to borrowed_subrange_t.
2495         * include/std/span: Adjust to use new names.
2496         * include/std/string_view: Likewise.
2497         * include/experimental/string_view: Likewise.
2498         * testsuite/std/ranges/access/begin.cc: Likewise.
2499         * testsuite/std/ranges/access/cbegin.cc: Likewise.
2500         * testsuite/std/ranges/access/cdata.cc: Likewise.
2501         * testsuite/std/ranges/access/cend.cc: Likewise.
2502         * testsuite/std/ranges/access/crbegin.cc: Likewise.
2503         * testsuite/std/ranges/access/crend.cc: Likewise.
2504         * testsuite/std/ranges/access/data.cc: Likewise.
2505         * testsuite/std/ranges/access/end.cc: Likewise.
2506         * testsuite/std/ranges/access/rbegin.cc: Likewise.
2507         * testsuite/std/ranges/access/rend.cc: Likewise.
2508         * testsuite/std/ranges/safe_range.cc: Likewise.
2509         * testsuite/std/ranges/safe_range_types.cc: Likewise.
2510         * testsuite/util/testsuite_iterators.h: Likewise.
2512         * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
2513         (tuple_element<1, const subrange<I, S, K>>): Add partial
2514         specializations (LWG 3398).
2515         * testsuite/std/ranges/subrange/tuple_like.cc: New test.
2517         * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
2518         (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
2519         (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
2521 2020-02-18  Patrick Palka  <ppalka@redhat.com>
2523         P1983R0 Wording for GB301, US296, US292, US291, and US283
2524         * include/std/ranges (filter_view::pred): New member function.
2525         (join_view::_Iterator::_Iterator): Remove now-redundant comment since
2526         P1983R0 fixes the highlighted issue in the same way.
2527         (join_view::_Iterator<_Const>): Add friend
2528         join_view::_Iterator<!_Const>.
2529         (join_view::_M_inner): Remove mutable specifier, effectively reverting
2530         the proposed wording changes of P3278.
2531         (join_view::begin): Refine the condition for when to return a const
2532         iterator.
2533         (split_view::_OuterIter::_OuterIter): Adjust constraints.
2534         * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
2535         exists and works.
2537 2020-02-18  Jonathan Wakely  <jwakely@redhat.com>
2539         PR libstdc++/93818
2540         * include/std/ranges (_RangeAdaptor): Add deduction guide.
2541         (filter_view::_Iterator): Add alias _Vp_iter and use in place of
2542         iterator_t<_Vp>.
2543         (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
2544         (transform_view::_Iterator): Add alias _Base_iter and use in place of
2545         iterator_t<_Base>.
2546         (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
2547         (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
2548         (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
2549         (split_view::_InnerIter::_S_iter_cat()): Likewise.
2551         * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
2552         assumption that long is wider than int.
2553         * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
2554         * testsuite/20_util/integer_comparisons/less.cc: Likewise.
2555         * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
2556         * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
2558         P1976R2 Fixed-size span construction from dynamic range
2559         * include/std/span (__cpp_lib_span): Update value.
2560         (span(It, size_type), span(It, End)): Make conditionally explicit. Add
2561         assertion.
2562         (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
2563         constraints.
2564         (span::first<Count>(), span::last<Count>()): Use explicit type in
2565         return statement.
2566         (as_bytes, as_writable_bytes): Likewise.
2567         * include/std/version (__cpp_lib_span): Update value.
2568         * testsuite/23_containers/span/1.cc: Check new value.
2569         * testsuite/23_containers/span/2.cc: Check new value.
2570         * testsuite/23_containers/span/explicit.cc: New test.
2572         * include/std/span (span::__is_compatible_array): Simplify alias
2573         template by using requires-clause.
2574         (span::__is_compatible_ref): New alias template for constraining
2575         constructors.
2576         (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
2577         (span(It, size_type), span(It, End)): Use __is_compatible_ref.
2578         (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
2579         redundant parentheses.
2580         (span(R&&)): Add missing constraints.
2582         * include/std/span (span): Reorder members and rename template
2583         parameters to match declarations in the C++2a working paper.
2585         P2116R0 Remove tuple-like protocol support from fixed-extent span
2586         * include/std/span (get, tuple_size, tuple_element): Remove.
2587         * testsuite/23_containers/span/everything.cc: Remove checks for
2588         tuple-like API.
2589         * testsuite/23_containers/span/get_neg.cc: Remove.
2590         * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
2591         * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
2592         * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
2594 2020-02-17  Patrick Palka  <ppalka@redhat.com>
2596         P2106R0 Alternative wording for GB315 and GB316
2597         * include/bits/ranges_algo.h (in_fun_result): New.
2598         (for_each_result, for_each_n_result): Change into an alias of
2599         in_fun_result.
2600         (in_in_result): New.
2601         (mismatch_result): Change into an alias of in_in_result.
2602         (copy_if_result): Change into an alias of in_out_result.
2603         (swap_ranges_result): Change into an alias of in_in_result.
2604         (unary_transform_result): Change into an alias of in_out_result.
2605         (in_in_out_result): New.
2606         (binary_transform_result): Change into an alias of in_in_out_result.
2607         (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
2608         remove_copy_result, unique_copy_result, reverse_copy_result,
2609         rotate_copy_result, partial_sort_copy_result): Change into an alias of
2610         in_out_result.
2611         (in_out_out_result): New.
2612         (partition_copy_result, merge_result): Change into an alias of
2613         in_out_out_result.
2614         (set_union_result, set_intersection_result): Change into an alias of
2615         in_in_out_result.
2616         (set_difference_result): Change into an alias of in_out_result.
2617         (set_symmetric_difference): Change into an alias of in_in_out_result.
2618         (min_max_result): New.
2619         (minmax_result, minmax_element_result): Change into an alias of
2620         min_max_result.
2621         (in_found_result): New.
2622         (next_permutation_result, prev_permutation_result): Change into an alias
2623         of in_found_result.
2624         (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
2625         Adjust following changes to next_permutation_result and
2626         prev_permutation_result.
2627         * include/bits/ranges_algobase.h (in_out_result): New.
2628         (copy_result, move_result, move_backward_result, copy_backward_result,
2629         copy_n_result): Change into an alias of in_out_result.
2630         * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
2631         uninitialized_copy_n_result, uninitialized_move_result,
2632         uninitialized_move_n_result): Likewise.
2633         * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
2634         structured bindings.
2635         * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
2637         P1243R4 Rangify new algorithms
2638         * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
2639         for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
2640         * testsuite/25_algorithms/clamp/constrained.cc: New test.
2641         * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
2642         * testsuite/25_algorithms/sample/constrained.cc: New test.
2644 2020-02-17  Jonathan Wakely  <jwakely@redhat.com>
2646         P1964R2 Wording for boolean-testable
2647         * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
2648         (__adjacent_find_fn): Cast result of predicate to bool.
2649         * include/std/concepts (__boolean): Remove.
2650         (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
2651         new helper concepts.
2652         (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
2653         (predicate): Use __boolean_testable instead of boolean.
2654         * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
2655         Likewise.
2657         P1970R2 Consistency for size() functions: Add ranges::ssize
2658         * include/bits/range_access.h (_SSize, ssize): Define for C++20.
2659         * testsuite/std/ranges/access/ssize.cc: New test.
2661         P1956R1 On the names of low-level bit manipulation functions
2662         * include/bits/hashtable_policy.h: Update comment.
2663         * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
2664         (ispow2, ceil2, floor2, log2p1): Likewise.
2665         (__cpp_lib_int_pow2): Add feature test macro.
2666         * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
2667         * include/std/memory (assume_aligned): Adjust use of ispow2.
2668         * include/std/version (__cpp_lib_int_pow2): Add.
2669         * libsupc++/new_opa.cc: Adjust use of __ispow2.
2670         * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
2671         * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
2672         * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
2673         * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
2674         * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
2675         * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
2676         * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
2677         * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
2678         * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
2679         * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
2680         * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
2681         * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
2683         * include/std/charconv: Add comment.
2685         PR libstdc++/92546 (partial)
2686         * include/bits/random.h (uniform_random_bit_generator): Move definition
2687         to <bits/uniform_int_dist.h>.
2688         * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
2689         of <bits/random.h>.
2690         * include/bits/ranges_algobase.h: Do not include <cmath>.
2691         * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
2692         Move here.
2693         * include/std/ranges: Do not include <limits>.
2694         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
2696         PR libstdc++/92546 (partial)
2697         * include/Makefile.am: Add new header.
2698         * include/Makefile.in: Regenerate.
2699         * include/bits/int_limits.h: New header.
2700         * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
2701         numeric_limits with __detail::__int_limits.
2702         * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
2703         (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
2704         Likewise.
2705         * include/std/charconv (__to_chars_8, __from_chars_binary)
2706         (__from_chars_alpha_to_num, from_chars): Likewise.
2707         * include/std/memory_resource (polymorphic_allocator::allocate)
2708         (polymorphic_allocator::allocate_object): Likewise.
2709         * include/std/string_view (basic_string_view::_S_compare): Likewise.
2710         * include/std/utility (in_range): Likewise.
2711         * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
2712         extra error about incomplete type __int_limits<bool>.
2713         * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
2714         * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
2715         * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
2716         * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
2717         * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
2718         * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
2719         * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
2720         * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
2721         * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
2722         * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
2723         * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
2724         * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
2726         * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
2727         value for partial_ordering::unordered.
2729         * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
2730         const-qualified expression variations.
2731         * include/std/concepts (copyable): Likewise.
2733         * include/std/type_traits (__is_standard_integer): New helper trait.
2734         * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
2735         (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
2736         * include/std/version (__cpp_lib_integer_comparison_functions): Define.
2737         * testsuite/20_util/integer_comparisons/1.cc: New test.
2738         * testsuite/20_util/integer_comparisons/2.cc: New test.
2739         * testsuite/20_util/integer_comparisons/equal.cc: New test.
2740         * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
2741         * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
2742         * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
2743         * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
2744         * testsuite/20_util/integer_comparisons/in_range.cc: New test.
2745         * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
2746         * testsuite/20_util/integer_comparisons/less.cc: New test.
2747         * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
2748         * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
2749         * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
2750         * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
2751         * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
2753 2020-02-16  Patrick Palka  <ppalka@redhat.com>
2755         * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
2756         Move code after an early exit constexpr if to under an else branch.
2757         * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
2759 2020-02-15  Patrick Palka  <ppalka@redhat.com>
2761         * include/bits/ranges_algo.h: Adjust whitespace and formatting.
2762         * include/bits/ranges_algobase.h: Likewise.
2763         * include/bits/ranges_uninitialized.h: Likewise.
2765         * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
2766         binary_search, copy_if, count, count_if, equal_range, find, find_end,
2767         find_first_of, find_if, find_if_not, for_each, generate, generate_n,
2768         includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
2769         is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
2770         lower_bound, make_heap, max, max_element, merge, min, min_element,
2771         minmax, minmax_element, mismatch, next_permutation, none_of,
2772         nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
2773         partition_point, pop_heap, prev_permutation, push_heap, remove,
2774         remove_copy, remove_copy_if, remove_if, replace, replace_copy,
2775         replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
2776         search, search_n, set_difference, set_intersection,
2777         set_symmetric_difference, set_union, shuffle, sort, sort_heap,
2778         stable_partition, stable_sort, swap_ranges, transform, unique,
2779         unique_copy, upper_bound): Convert into function objects.
2780         * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
2781         fill, move_backward, copy_backward): Likewise.
2782         * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
2783         uninitialized_default_construct_n, uninitialized_value_construct,
2784         uninitialized_value_construct_n, uninitialized_copy,
2785         uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
2786         uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
2787         destroy, destroy_n): Likewise.
2789         * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
2790         (ranges::find_end): ... here.
2791         (ranges::__lexicographical_compare): Fold into ...
2792         (ranges::lexicographical_compare): ... here.
2793         * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
2794         (ranges::equal): ... here.
2796 2020-02-15  Jonathan Wakely  <jwakely@redhat.com>
2798         * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
2799         * include/std/deque: Likewise.
2800         * include/std/forward_list: Likewise.
2801         * include/std/list: Likewise.
2802         * include/std/string: Likewise.
2803         * include/std/vector: Likewise.
2804         * include/std/version: Likewise.
2805         * testsuite/23_containers/deque/erasure.cc: Test for new value.
2806         * testsuite/23_containers/forward_list/erasure.cc: Likewise.
2807         * testsuite/23_containers/list/erasure.cc: Likewise.
2808         * testsuite/23_containers/map/erasure.cc: Likewise.
2809         * testsuite/23_containers/set/erasure.cc: Likewise.
2810         * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2811         * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
2812         * testsuite/23_containers/vector/erasure.cc: Likewise.
2814 2020-02-15  Jonathan Wakely  <jwakely@redhat.com>
2816         * include/bits/random.h (uniform_random_bit_generator): Require min()
2817         and max() to be constant expressions and min() to be less than max().
2818         * testsuite/26_numerics/random/concept.cc: Check additional cases.
2819         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
2821 2020-02-13  Patrick Palka  <ppalka@redhat.com>
2823         * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
2824         * include/Makefile.in: Regenerate.
2825         * include/bits/ranges_uninitialized.h: New header.
2826         * include/std/memory: Include it.
2827         * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
2828         test.
2829         * .../uninitialized_copy/constrained.cc: New test.
2830         * .../uninitialized_default_construct/constrained.cc: New test.
2831         * .../uninitialized_fill/constrained.cc: New test.
2832         * .../uninitialized_move/constrained.cc: New test.
2833         * .../uninitialized_value_construct/constrained.cc: New test.
2835         * include/Makefile.am: Add bits/ranges_algobase.h
2836         * include/Makefile.in: Regenerate.
2837         * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
2838         existing #includes.
2839         (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
2840         __detail::__is_move_iterator, copy_result, move_result,
2841         __equal, equal, copy_result, move_result, move_backward_result,
2842         copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
2843         move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
2844         fill): Split out into ...
2845         * bits/range_algobase.h: ... this new header.
2847 2020-02-12  Patrick Palka  <ppalka@redhat.com>
2849         LWG 3389 and LWG 3390
2850         * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
2851         constructing the move_iterator with __i.
2852         (counted_iterator::counted_iterator): Use std::move when initializing
2853         M_current with __i.
2854         * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
2855         * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
2857 2020-02-12  Sandra Loosemore  <sandra@codesourcery.com>
2859         PR libstdc++/79193
2860         PR libstdc++/88999
2862         * configure: Regenerated.
2864 2020-02-12  François Dumont  <fdumont@gcc.gnu.org>
2866         * include/bits/hashtable.h
2867         (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
2868         missing std namespace qualification to forward call.
2870 2020-02-09  Jonathan Wakely  <jwakely@redhat.com>
2872         * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
2873         comment.
2874         * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
2876         * include/std/ranges: Fix non-ASCII characters in comment.
2878         * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
2879         equality comparison to be valid and return bool.
2880         (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
2881         * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
2882         type with ambiguous conversion to fundamental types.
2883         * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
2885 2020-02-07  Jonathan Wakely  <jwakely@redhat.com>
2887         * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
2888         Use remove_cvref_t.
2889         (readable_traits): Rename to indirectly_readable_traits.
2890         (readable): Rename to indirectly_readable.
2891         (writable): Rename to indirectly_writable.
2892         (__detail::__iter_exchange_move): Do not use remove_reference_t.
2893         (indirectly_swappable): Adjust requires expression parameter types.
2894         expression.
2895         * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
2896         (ranges::replace_if, ranges::generate_n, ranges::generate)
2897         (ranges::remove): Use new name for writable.
2898         * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
2899         Use new name for readable.
2900         * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
2901         new name for readable_traits.
2902         * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
2903         * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
2904         new definition of indirectly_readable.
2906         * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
2907         to take parameters of common_iterator, instead of the common_iterator
2908         type itself. Fix argument for __common_iter_has_arrow constraint.
2909         (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
2911 2020-02-07  Jonathan Wakely  <jwakely@redhat.com>
2913         * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
2914         warning.
2915         (basic_istream_view::_Iterator::operator++()): Add missing return.
2917 2020-02-07  Patrick Palka  <ppalka@redhat.com>
2919         * include/bits/ranges_algo.h: Remove extraneous &&.
2921         * include/std/ranges (ranges::__detail::__stream_extractable,
2922         ranges::basic_istream_view, ranges::istream_view): Define.
2923         * testsuite/std/ranges/istream_view: New test.
2925         Implement C++20 range adaptors
2926         * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
2927         (subrange::_S_store_size): Mark as const instead of constexpr to
2928         avoid what seems to be a bug in GCC.
2929         (__detail::__box): Give it defaulted copy and move constructors.
2930         (ranges::views::_Single::operator()): Mark constexpr.
2931         (ranges::views::_Iota::operator()): Mark constexpr.
2932         (__detail::Empty): Define.
2933         (ranges::views::__closure::_RangeAdaptor,
2934         ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
2935         ranges::views::all, ranges::__detail::find_if,
2936         ranges::__detail::find_if_not, ranges::__detail::mismatch,
2937         ranges::detail::min, filter_view, ranges::views::filter, transform_view,
2938         ranges::views::transform, take_view, ranges::views::take,
2939         take_while_view, ranges::views::take_while, drop_view,
2940         ranges::views::drop, join_view, ranges::views::join,
2941         __detail::require_constant, __detail::tiny_range, split_view,
2942         ranges::views::split, ranges::views::_Counted, ranges::views::counted,
2943         common_view, ranges::views::common, reverse_view,
2944         ranges::views::reverse,
2945         ranges::views::__detail::__is_reversible_subrange,
2946         ranges::views::__detail::__is_reverse_view, reverse_view,
2947         ranges::views::reverse, __detail::__has_tuple_element, elements_view,
2948         ranges::views::elements, ranges::views::keys, ranges::views::values):
2949         Define.
2950         (views): Alias for ranges::views.
2951         (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
2952         tuple_element<1, ranges::subrange>): New partial specializations.
2953         * testsuite/std/ranges/adaptors/all.cc: New test.
2954         * testsuite/std/ranges/adaptors/common.cc: Likewise.
2955         * testsuite/std/ranges/adaptors/counted.cc: Likewise.
2956         * testsuite/std/ranges/adaptors/drop.cc: Likewise.
2957         * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
2958         * testsuite/std/ranges/adaptors/elements.cc: Likewise.
2959         * testsuite/std/ranges/adaptors/filter.cc: Likewise.
2960         * testsuite/std/ranges/adaptors/join.cc: Likewise.
2961         * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
2962         * testsuite/std/ranges/adaptors/split.cc: Likewise.
2963         * testsuite/std/ranges/adaptors/take.cc: Likewise.
2964         * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
2965         * testsuite/std/ranges/adaptors/transform.cc: Likewise.
2967 2020-02-07  Jonathan Wakely  <jwakely@redhat.com>
2969         * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
2970         type of enumerations and comparison category types.
2971         (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
2972         (__cmp_cat::_Ncmp::unordered): Change value to 2.
2973         (partial_ordering::_M_value, weak_ordering::_M_value)
2974         (strong_ordering::_M_value): Change type to __cmp_cat::type.
2975         (partial_ordering::_M_is_ordered): Remove data member.
2976         (partial_ordering): Use second bit of _M_value for unordered. Adjust
2977         comparison operators.
2978         (weak_ordering::operator partial_ordering): Simplify to remove
2979         branches.
2980         (operator<=>(unspecified, weak_ordering)): Likewise.
2981         (strong_ordering::operator partial_ordering): Likewise.
2982         (strong_ordering::operator weak_ordering): Likewise.
2983         (operator<=>(unspecified, strong_ordering)): Likewise.
2984         * testsuite/18_support/comparisons/categories/partialord.cc: New test.
2985         * testsuite/18_support/comparisons/categories/strongord.cc: New test.
2986         * testsuite/18_support/comparisons/categories/weakord.cc: New test.
2988         * include/std/ranges (iota_view::_Iterator): Fix typo in name of
2989         __cpp_lib_three_way_comparison macro and use deduced return type for
2990         operator<=>.
2991         * testsuite/std/ranges/iota/iterator.cc: New test.
2993 2020-02-07  Patrick Palka  <ppalka@redhat.com>
2994             Jonathan Wakely  <jwakely@redhat.com>
2996         Implement C++20 constrained algorithms
2997         * include/Makefile.am: Add new header.
2998         * include/Makefile.in: Regenerate.
2999         * include/std/algorithm: Include <bits/ranges_algo.h>.
3000         * include/bits/ranges_algo.h: New file.
3001         * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
3002         * testsuite/25_algorithms/all_of/constrained.cc: New test.
3003         * testsuite/25_algorithms/any_of/constrained.cc: New test.
3004         * testsuite/25_algorithms/binary_search/constrained.cc: New test.
3005         * testsuite/25_algorithms/copy/constrained.cc: New test.
3006         * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
3007         * testsuite/25_algorithms/copy_if/constrained.cc: New test.
3008         * testsuite/25_algorithms/copy_n/constrained.cc: New test.
3009         * testsuite/25_algorithms/count/constrained.cc: New test.
3010         * testsuite/25_algorithms/count_if/constrained.cc: New test.
3011         * testsuite/25_algorithms/equal/constrained.cc: New test.
3012         * testsuite/25_algorithms/equal_range/constrained.cc: New test.
3013         * testsuite/25_algorithms/fill/constrained.cc: New test.
3014         * testsuite/25_algorithms/fill_n/constrained.cc: New test.
3015         * testsuite/25_algorithms/find/constrained.cc: New test.
3016         * testsuite/25_algorithms/find_end/constrained.cc: New test.
3017         * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
3018         * testsuite/25_algorithms/find_if/constrained.cc: New test.
3019         * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
3020         * testsuite/25_algorithms/for_each/constrained.cc: New test.
3021         * testsuite/25_algorithms/generate/constrained.cc: New test.
3022         * testsuite/25_algorithms/generate_n/constrained.cc: New test.
3023         * testsuite/25_algorithms/heap/constrained.cc: New test.
3024         * testsuite/25_algorithms/includes/constrained.cc: New test.
3025         * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
3026         * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
3027         * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
3028         * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
3029         * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
3030         * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
3031         test.
3032         * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
3033         * testsuite/25_algorithms/max/constrained.cc: New test.
3034         * testsuite/25_algorithms/max_element/constrained.cc: New test.
3035         * testsuite/25_algorithms/merge/constrained.cc: New test.
3036         * testsuite/25_algorithms/min/constrained.cc: New test.
3037         * testsuite/25_algorithms/min_element/constrained.cc: New test.
3038         * testsuite/25_algorithms/minmax/constrained.cc: New test.
3039         * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
3040         * testsuite/25_algorithms/mismatch/constrained.cc: New test.
3041         * testsuite/25_algorithms/move/constrained.cc: New test.
3042         * testsuite/25_algorithms/move_backward/constrained.cc: New test.
3043         * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
3044         * testsuite/25_algorithms/none_of/constrained.cc: New test.
3045         * testsuite/25_algorithms/nth_element/constrained.cc: New test.
3046         * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
3047         * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
3048         * testsuite/25_algorithms/partition/constrained.cc: New test.
3049         * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
3050         * testsuite/25_algorithms/partition_point/constrained.cc: New test.
3051         * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
3052         * testsuite/25_algorithms/remove/constrained.cc: New test.
3053         * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
3054         * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
3055         * testsuite/25_algorithms/remove_if/constrained.cc: New test.
3056         * testsuite/25_algorithms/replace/constrained.cc: New test.
3057         * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
3058         * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
3059         * testsuite/25_algorithms/replace_if/constrained.cc: New test.
3060         * testsuite/25_algorithms/reverse/constrained.cc: New test.
3061         * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
3062         * testsuite/25_algorithms/rotate/constrained.cc: New test.
3063         * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
3064         * testsuite/25_algorithms/search/constrained.cc: New test.
3065         * testsuite/25_algorithms/search_n/constrained.cc: New test.
3066         * testsuite/25_algorithms/set_difference/constrained.cc: New test.
3067         * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
3068         * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
3069         test.
3070         * testsuite/25_algorithms/set_union/constrained.cc: New test.
3071         * testsuite/25_algorithms/shuffle/constrained.cc: New test.
3072         * testsuite/25_algorithms/sort/constrained.cc: New test.
3073         * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
3074         * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
3075         * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
3076         * testsuite/25_algorithms/transform/constrained.cc: New test.
3077         * testsuite/25_algorithms/unique/constrained.cc: New test.
3078         * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
3079         * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
3081 2020-02-06  Jonathan Wakely  <jwakely@redhat.com>
3083         * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
3084         number in comment. Fix indentation.
3086         * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
3087         redundant _GLIBCXX20_CONSTEXPR.
3089         * include/std/ranges (viewable_range): Replace decay_t with
3090         remove_cvref_t (LWG 3375).
3092 2020-02-05  Jonathan Wakely  <jwakely@redhat.com>
3094         * include/bits/iterator_concepts.h (iter_reference_t)
3095         (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
3096         Remove workarounds for PR c++/67704.
3097         * testsuite/24_iterators/aliases.cc: New test.
3099 2020-02-05  Patrick Palka  <ppalka@redhat.com>
3101         * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
3102         when initializing _M_current.
3103         (move_iterator::base): Split into two overloads differing in
3104         ref-qualifiers as in P1207R4 for C++20.
3106 2020-02-04  Jonathan Wakely  <jwakely@redhat.com>
3108         * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
3109         use.
3111         PR libstdc++/93562
3112         * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
3113         (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
3114         * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
3116 2020-02-01  Andrew Burgess  <andrew.burgess@embecosm.com>
3118         * configure: Regenerate.
3120 2020-01-31  Patrick Palka  <ppalka@redhat.com>
3122         * testsuite/24_iterators/range_operations/distance.cc: Do not assume
3123         test_range::end() returns the same type as test_range::begin().
3124         * testsuite/24_iterators/range_operations/next.cc: Likewise.
3125         * testsuite/24_iterators/range_operations/prev.cc: Likewise.
3126         * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
3127         Always return a sentinel<I>.
3129 2020-01-29  Jonathan Wakely  <jwakely@redhat.com>
3131         PR libstdc++/92895
3132         * include/std/stop_token (stop_token::stop_possible()): Call new
3133         _M_stop_possible() function.
3134         (stop_token::stop_requested()): Do not use stop_possible().
3135         (stop_token::binary_semaphore): New class, as temporary stand-in for
3136         std::binary_semaphore.
3137         (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
3138         (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
3139         New data members for symchronization with stop_callback destruction.
3140         (stop_token::_Stop_cb::_Stop_cb): Make non-template.
3141         (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
3142         Remove.
3143         (stop_token::_Stop_cb::_M_run): New member function.
3144         (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
3145         Remove.
3146         (stop_token::_Stop_state::_M_owners): New data member to track
3147         reference count for ownership.
3148         (stop_token::_Stop_state::_M_value): New data member combining a
3149         spinlock, the stop requested flag, and the reference count for
3150         associated stop_source objects.
3151         (stop_token::_Stop_state::_M_requester): New data member for
3152         synchronization with stop_callback destruction.
3153         (stop_token::_Stop_state::_M_stop_possible()): New member function.
3154         (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
3155         of _M_value.
3156         (stop_token::_Stop_state::_M_add_owner)
3157         (stop_token::_Stop_state::_M_release_ownership)
3158         (stop_token::_Stop_state::_M_add_ssrc)
3159         (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
3160         updating reference counts.
3161         (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
3162         (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
3163         (stop_token::_Stop_state::_M_try_lock)
3164         (stop_token::_Stop_state::_M_try_lock_and_stop)
3165         (stop_token::_Stop_state::_M_do_try_lock): New member functions for
3166         managing spinlock.
3167         (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
3168         read and update state. Release lock while running callbacks. Use new
3169         data members to synchronize with callback destruction.
3170         (stop_token::_Stop_state::_M_remove_callback): Likewise.
3171         (stop_token::_Stop_state::_M_register_callback): Use atomic operations
3172         to read and update state.
3173         (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
3174         replacing shared_ptr.
3175         (stop_source::stop_source(const stop_source&)): Update reference count.
3176         (stop_source::operator=(const stop_source&)): Likewise.
3177         (stop_source::~stop_source()): Likewise.
3178         (stop_source::stop_source(stop_source&&)): Define as defaulted.
3179         (stop_source::operator=(stop_source&&)): Establish postcondition on
3180         parameter.
3181         (stop_callback): Enforce preconditions on template parameter. Replace
3182         base class with data member of new _Cb_impl type.
3183         (stop_callback::stop_callback(const stop_token&, Cb&&))
3184         (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
3185         (stop_callback::_Cb_impl): New type wrapping _Callback member and
3186         defining the _S_execute member function.
3187         * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
3188         test.
3189         * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
3190         * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
3191         * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
3192         New test.
3193         * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
3194         test.
3195         * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
3196         * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
3197         * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
3198         test.
3200         * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
3201         three_way_comparable_with.
3202         (__detail::__3way_cmp_with): Remove workaround for fixed bug.
3203         (compare_three_way::operator()): Remove redundant constraint from
3204         requires-clause.
3205         (__detail::_Synth3way::operator()): Use three_way_comparable_with
3206         instead of workaround.
3207         * testsuite/18_support/comparisons/object/93479.cc: Prune extra
3208         output due to simplified constraints on compare_three_way::operator().
3210         PR libstdc++/93479
3211         * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
3212         * testsuite/18_support/comparisons/object/93479.cc: New test.
3214         * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
3215         returns the same type as test_range::begin(). Add comments.
3216         * testsuite/std/ranges/access/rbegin.cc: Likewise.
3217         * testsuite/std/ranges/access/rend.cc: Likewise.
3218         * testsuite/std/ranges/range.cc: Do not assume the sentinel for
3219         test_range is the same as its iterator type.
3220         * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
3221         operator- overloads to satisfy sized_sentinel_for when the iterator
3222         satisfies random_access_iterator.
3224 2020-01-28  Jonathan Wakely  <jwakely@redhat.com>
3226         PR libstdc++/93470
3227         * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
3228         static assertion to object types.
3230         PR libstdc++/93325
3231         * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
3232         clock_gettime instead of explicit glibc version check.
3233         * configure: Regenerate.
3235 2020-01-28  Martin Liska  <mliska@suse.cz>
3237         PR libstdc++/93478
3238         * include/std/atomic: Fix typo.
3239         * include/std/optional: Likewise.
3241 2020-01-27  Andrew Burgess  <andrew.burgess@embecosm.com>
3243         * configure: Regenerate.
3245 2020-01-27  Jonathan Wakely  <jwakely@redhat.com>
3247         PR libstdc++/93426
3248         * include/std/span (span): Fix deduction guide.
3249         * testsuite/23_containers/span/deduction.cc: New test.
3251 2020-01-24  Jonathan Wakely  <jwakely@redhat.com>
3253         * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
3254         (__cmp_cat::_Ord::equivalent): Add enumerator.
3255         (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
3256         and greater.
3257         (partial_ordering, weak_ordering, strong_ordering): Remove
3258         constructors taking __cmp_cat::_Eq parameters. Use renamed
3259         enumerators.
3261 2020-01-24  Maciej W. Rozycki  <macro@wdc.com>
3263         * acinclude.m4: Handle `--with-toolexeclibdir='.
3264         * Makefile.in: Regenerate.
3265         * aclocal.m4: Regenerate.
3266         * configure: Regenerate.
3267         * doc/Makefile.in: Regenerate.
3268         * include/Makefile.in: Regenerate.
3269         * libsupc++/Makefile.in: Regenerate.
3270         * po/Makefile.in: Regenerate.
3271         * python/Makefile.in: Regenerate.
3272         * src/Makefile.in: Regenerate.
3273         * src/c++11/Makefile.in: Regenerate.
3274         * src/c++17/Makefile.in: Regenerate.
3275         * src/c++98/Makefile.in: Regenerate.
3276         * src/filesystem/Makefile.in: Regenerate.
3277         * testsuite/Makefile.in: Regenerate.
3279 2020-01-23  Alexandre Oliva <oliva@adacore.com>
3281         * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
3282         * configure: Rebuild.
3284         * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
3286 2020-01-23  Jonathan Wakely  <jwakely@redhat.com>
3288         PR libstdc++/91947
3289         * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
3290         rule.
3291         * include/Makefile.in: Regenerate.
3293 2020-01-20  Jonathan Wakely  <jwakely@redhat.com>
3295         * doc/xml/faq.xml: Fix grammar.
3296         * doc/xml/manual/appendix_contributing.xml: Improve instructions.
3297         * doc/xml/manual/spine.xml: Update copyright years.
3298         * doc/html/*: Regenerate.
3300 2020-01-19  Eric S. Raymond <esr@thyrsus.com>
3302         * doc/xml/faq.xml: Update for SVN -> Git transition.
3303         * doc/xml/manual/appendix_contributing.xml: Likewise.
3304         * doc/xml/manual/status_cxx1998.xml: Likewise.
3305         * doc/xml/manual/status_cxx2011.xml: Likewise.
3306         * doc/xml/manual/status_cxx2014.xml: Likewise.
3307         * doc/xml/manual/status_cxx2017.xml: Likewise.
3308         * doc/xml/manual/status_cxx2020.xml: Likewise.
3309         * doc/xml/manual/status_cxxtr1.xml: Likewise.
3310         * doc/xml/manual/status_cxxtr24733.xml: Likewise.
3312 2020-01-18  Iain Sandoe  <iain@sandoe.co.uk>
3314         * include/Makefile.am: Add coroutine to the std set.
3315         * include/Makefile.in: Regenerated.
3316         * include/std/coroutine: New file.
3318 2020-01-17  Jonathan Wakely  <jwakely@redhat.com>
3320         PR libstdc++/92376
3321         * include/bits/c++config: Only do PSTL config when the header is
3322         present, to fix freestanding.
3323         * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
3324         functions if they were detected by configure.
3326 2020-01-16  Kai-Uwe Eckhardt  <kuehro@gmx.de>
3327             Matthew Bauer  <mjbauer95@gmail.com>
3328             Jonathan Wakely  <jwakely@redhat.com>
3330         PR bootstrap/64271 (partial)
3331         * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
3332         to unsigned short.
3333         (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
3334         (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
3335         definitions with NetBSD upstream.
3336         (ctype_base::blank): Use _CTYPE_BL.
3337         * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
3338         Declaration.
3339         (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
3340         (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
3341         parameters to unsigned char.
3342         * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
3344 2020-01-16  François Dumont  <fdumont@gcc.gnu.org>
3346         PR libstdc++/91263
3347         * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
3348         * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
3349         (_Equality_base): Remove.
3350         (_Equality<>::_M_equal): Review implementation. Use
3351         std::is_permutation.
3352         * testsuite/23_containers/unordered_multiset/operators/1.cc
3353         (Hash, Equal, test02, test03): New.
3354         * testsuite/23_containers/unordered_set/operators/1.cc
3355         (Hash, Equal, test02, test03): New.
3357 2020-01-15  Jonathan Wakely  <jwakely@redhat.com>
3359         PR libstdc++/93267
3360         * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
3361         Move here from <bits/range_access.h> and define using __int128 when
3362         available.
3363         (__is_integer_like, __is_signed_integer_like): Move here from
3364         <bits/range_access.h>.
3365         (weakly_incrementable): Use __is_signed_integer_like.
3366         * include/bits/range_access.h (__max_diff_type, __max_size_type)
3367         (__is_integer_like, __is_signed_integer_like): Move to
3368         <bits/iterator_concepts.h>.
3369         (__make_unsigned_like_t): Move here from <ranges>.
3370         * include/std/ranges (__make_unsigned_like_t): Move to
3371         <bits/range_access.h>.
3372         (iota_view): Replace using-directive with using-declarations.
3373         * testsuite/std/ranges/iota/93267.cc: New test.
3374         * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
3376 2020-01-13  Jonathan Wakely  <jwakely@redhat.com>
3378         PR libstdc++/93244
3379         * include/bits/fs_path.h (path::generic_string<C,A>)
3380         [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
3381         * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
3382         root-dir is converted to forward slash in generic pathname.
3383         * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
3384         * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
3386         PR libstdc++/58605
3387         * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
3388         Define.
3389         (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
3390         (__atomic_float): Add default member initializer for C++20.
3391         * include/std/atomic (atomic): Likewise.
3392         (atomic::atomic()): Remove noexcept-specifier on default constructor.
3393         * include/std/version (__cpp_lib_atomic_value_initialization): Define.
3394         * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
3395         number.
3396         * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3397         * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
3398         * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
3399         * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
3400         expected result for is_trivially_default_constructible.
3401         * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
3402         * testsuite/29_atomics/atomic_float/value_init.cc: New test.
3403         * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
3404         * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3405         * testsuite/29_atomics/atomic_integral/cons/value_init.cc
3406         * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
3407         expected results for is_trivially_default_constructible.
3408         * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
3409         new test generator.
3411 2020-01-10  Jonathan Wakely  <jwakely@redhat.com>
3413         * testsuite/util/testsuite_iterators.h: Improve comment.
3415         * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
3416         initialization syntax.
3418         PR libstdc++/92285
3419         * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
3420         of base class independent of __cplusplus value.
3421         [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
3422         type defined in the base class
3423         * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
3424         * testsuite/24_iterators/istreambuf_iterator/requirements/
3425         base_classes.cc: Adjust expected base class for C++98.
3427 2020-01-09  Olivier Hainque  <hainque@adacore.com>
3429         * doc/xml/manual/appendix_contributing.xml: Document _C2
3430         as a reserved identifier, by VxWorks.
3431         * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
3432         * include/bits/stl_multimap.h: Likewise.
3434 2020-01-09  Jonathan Wakely  <jwakely@redhat.com>
3436         * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
3437         (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
3438         * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
3439         partial specialization to disambiguate the two constrained
3440         specializations.
3442         * include/experimental/type_traits (experimental::is_pod_v): Disable
3443         -Wdeprecated-declarations warnings around reference to std::is_pod.
3444         * include/std/type_traits (is_pod_v): Likewise.
3445         * testsuite/18_support/max_align_t/requirements/2.cc: Also check
3446         is_standard_layout and is_trivial. Do not check is_pod for C++20.
3447         * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
3448         Add -Wno-deprecated for C++20.
3449         * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
3450         * testsuite/20_util/is_pod/value.cc: Likewise.
3451         * testsuite/experimental/type_traits/value.cc: Likewise.
3453 2020-01-09  JeanHeyd "ThePhD" Meneide  <phdofthehouse@gmail.com>
3455         * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
3456         * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
3457         * testuite/20_util/is_pod/deprecated-2a.cc: New test.
3459 2020-01-09  Jonathan Wakely  <jwakely@redhat.com>
3461         PR libstdc++/93205
3462         * include/bits/random.h (operator>>): Check stream operation succeeds.
3463         * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
3464         typedefs.
3465         (operator>>): Remove redundant __istream_type typedefs. Check stream
3466         operations succeed.
3467         (__extract_params): New function to fill a vector from a stream.
3468         * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
3470         PR libstdc++/93208
3471         * config/abi/pre/gnu.ver: Add new exports.
3472         * include/std/memory_resource (memory_resource::~memory_resource()):
3473         Do not define inline.
3474         (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
3475         * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
3476         Define.
3477         (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
3478         * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
3480 2020-01-09  François Dumont  <fdumont@gcc.gnu.org>
3482         PR libstdc++/92124
3483         * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
3484         template alias.
3485         (_Hashtable<>::__fwd_value_for): New.
3486         (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
3487         parameter.
3488         (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
3489         (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
3490         (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
3491         with std::move.
3492         (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
3493         (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
3494         Adapt.
3495         (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
3496         Adapt.
3497         * testsuite/23_containers/unordered_set/92124.cc: New.
3499 2020-01-08  Jonathan Wakely  <jwakely@redhat.com>
3501         PR libstdc++/93201
3502         * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
3503         detailed error reporting for remove_all. Check result of recursive
3504         call before incrementing iterator.
3505         (remove_all(const path&), remove_all(const path&, error_code&)): Use
3506         do_remove_all.
3507         * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
3508         result of recursive call before incrementing iterator.
3509         * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
3510         are reported correctly.
3511         * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
3513 2020-01-07  Thomas Rodgers  <trodgers@redhat.com>
3515         * include/std/condition_variable
3516         (condition_variable_any::wait_on): Rename to match current draft
3517         standard.
3518         (condition_variable_any::wait_on_until): Likewise.
3519         (condition_variable_any::wait_on_for): Likewise.
3520         * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
3521         Adjust tests to account for renamed methods.
3523 2020-01-07  François Dumont  <fdumont@gcc.gnu.org>
3525         PR libstdc++/92124
3526         * include/bits/stl_tree.h
3527         (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
3528         std::move_if_noexcept by std::move.
3529         * testsuite/23_containers/map/92124.cc: New.
3530         * testsuite/23_containers/set/92124.cc: New.
3532 2020-01-06  Jonathan Wakely  <jwakely@redhat.com>
3534         * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
3535         (stop_source): Likewise (LWG 3362).
3536         * testsuite/30_threads/stop_token/stop_source.cc: Test equality
3537         comparisons.
3539         * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
3540         (lexicographical_compare_three_way): Do not depend on
3541         __cpp_lib_concepts.
3542         * include/std/version (__cpp_lib_three_way_comparison): Only define
3543         when __cpp_lib_concepts is defined.
3544         * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
3546 2020-01-03  Jonathan Wakely  <jwakely@redhat.com>
3548         * include/bits/stl_algobase.h (lexicographical_compare_three_way):
3549         Only define four-argument overload when __cpp_lib_concepts is defined.
3551 2020-01-01  John David Anglin  <danglin@gcc.gnu.org>
3553         * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
3555 2020-01-01  Jakub Jelinek  <jakub@redhat.com>
3557         Update copyright years.
3559 Copyright (C) 2020 Free Software Foundation, Inc.
3561 Copying and distribution of this file, with or without modification,
3562 are permitted in any medium without royalty provided the copyright
3563 notice and this notice are preserved.