]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/ChangeLog
libstdc++: Define operator<=> for <system_error> types
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
c7b591f3
JW
12020-02-20 Jonathan Wakely <jwakely@redhat.com>
2
4be779f5
JW
3 * include/std/system_error (error_category::operator<=>)
4 (operator<=>(const error_code&, const error_code&))
5 (operator<=>(const error_condition&, const error_condition&)): Define
6 for C++20.
7 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
8 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
9 test.
10 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
11 incorrect comment.
12 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
13 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
14 incorrect comment.
15 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
16 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
17 incorrect comment.
18 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
19 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
20 Remove incorrect comment.
21 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
22 test.
23
20fa41e6
JW
24 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
25
c7b591f3
JW
26 * include/std/thread (thread::id::operator<=>): Define for C++20.
27 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
28 functions in namespace std.
29 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
30
38c7b74d
PP
312020-02-19 Patrick Palka <ppalka@redhat.com>
32
33 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
34 null terminator of the underlying string as part of the test_range.
35 (main): Call test03.
36
a45fb21a
JW
372020-02-19 Jonathan Wakely <jwakely@redhat.com>
38
1b425f3a
JW
39 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
40 requirement (LWG 3385).
41 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
42 expected declaration.
43
7433536b
JW
44 * include/std/ranges (take_while_view, drop_view, drop_while_view)
45 (elements_view:_Iterator): Initialize data members (LWG 3364).
46
256f67aa
JW
47 * libsupc++/compare (three_way_comparable): Remove always-false check
48 that should have been removed with weak_equality (P1959R0).
49 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
50
0294dc5f
JW
51 * include/std/concepts (__detail::__partially_ordered_with): Move here
52 from <compare>.
53 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
54 to simplify definition (LWG 3331).
55 * libsupc++/compare (__detail::__partially_ordered_with): Move to
56 <concepts>.
57
241ed965
JW
58 * include/std/concepts (totally_ordered_with): Remove redundant
59 requirement (LWG 3329).
60
77f5310f
JW
61 * include/std/ranges (__detail::__convertible_to_non_slicing): New
62 helper concept.
63 (__detail::__pair_like_convertible_to): Remove.
64 (__detail::__pair_like_convertible_from): Add requirements for
65 non-slicing conversions.
66 (subrange): Constrain constructors with __convertible_to_non_slicing.
67 Remove constructors from pair-like types. Add new deduction guide.
68 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
69
59aa9e57
JW
70 * include/bits/iterator_concepts.h (iter_move): Add declaration to
71 prevent unqualified lookup finding a suitable declaration (LWG 3247).
72
e89100ef
JW
73 * include/std/memory_resource (polymorphic_allocator::allocate)
74 (polymorphic_allocator::allocate_object): Change type of exception to
75 bad_array_new_length (LWG 3237).
76 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
77
bb54e0b8
JW
78 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
79 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
80 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
81 * testsuite/20_util/unwrap_reference/3.cc: New test.
82
5f031f97
JW
83 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
84 type during overload resolution, use static assert instead (LWG 3200).
85 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
86 incomplete type.
87 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
88
66ae31eb
JW
89 * include/std/span (span(T (&)[N])): Use non-deduced context to
90 prevent first parameter from interfering with class template argument
91 deduction (LWG 3369).
92 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
93 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
94 rvalues.
95
247f410b
JW
96 * include/std/span (span::const_iterator, span::const_reverse_iterator)
97 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
98 Remove (LWG 3320).
99 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
100 and cend.
101 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
102 Likewise.
103 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
104 constrained.cc: Likewise.
105 * testsuite/20_util/specialized_algorithms/
106 uninitialized_default_construct/constrained.cc: Likewise.
107 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
108 constrained.cc: Likewise.
109 * testsuite/20_util/specialized_algorithms/uninitialized_move/
110 constrained.cc: Likewise.
111 * testsuite/20_util/specialized_algorithms/
112 uninitialized_value_construct/constrained.cc: Likewise.
113
aca60ecf
JW
114 * include/bits/range_access.h (range_size_t): Define alias template.
115 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
116 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
117
4cc3b275
JW
118 * include/std/ranges (filter_view, transform_view, take_view)
119 (join_view, split_view, reverse_view): Remove commented-out converting
120 constructors (LWG 3280).
121
5f3641d0
JW
122 * include/std/memory (uninitialized_construct_using_allocator): Use
123 std::construct_at (LWG 3321).
124
020a03ee
JW
125 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
126 (polymorphic_allocator::allocate_object)
127 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
128
15411a64
JW
129 LWG 3379. "safe" in several library names is misleading
130 * include/bits/range_access.h (enable_safe_range): Rename to
131 enable_borrowed_range.
132 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
133 (safe_range): Rename to borrowed_range.
134 * include/bits/ranges_algo.h: Adjust to use new names.
135 * include/bits/ranges_algobase.h: Likewise.
136 * include/bits/ranges_uninitialized.h: Likewise.
137 * include/std/ranges: Likewise.
138 (safe_iterator_t): Rename to borrowed_iterator_t.
139 (safe_subrange_t): Rename to borrowed_subrange_t.
140 * include/std/span: Adjust to use new names.
141 * include/std/string_view: Likewise.
142 * include/experimental/string_view: Likewise.
143 * testsuite/std/ranges/access/begin.cc: Likewise.
144 * testsuite/std/ranges/access/cbegin.cc: Likewise.
145 * testsuite/std/ranges/access/cdata.cc: Likewise.
146 * testsuite/std/ranges/access/cend.cc: Likewise.
147 * testsuite/std/ranges/access/crbegin.cc: Likewise.
148 * testsuite/std/ranges/access/crend.cc: Likewise.
149 * testsuite/std/ranges/access/data.cc: Likewise.
150 * testsuite/std/ranges/access/end.cc: Likewise.
151 * testsuite/std/ranges/access/rbegin.cc: Likewise.
152 * testsuite/std/ranges/access/rend.cc: Likewise.
153 * testsuite/std/ranges/safe_range.cc: Likewise.
154 * testsuite/std/ranges/safe_range_types.cc: Likewise.
155 * testsuite/util/testsuite_iterators.h: Likewise.
156
fa89adaa
JW
157 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
158 (tuple_element<1, const subrange<I, S, K>>): Add partial
159 specializations (LWG 3398).
160 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
161
a45fb21a
JW
162 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
163 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
164 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
165
242b4fb7
PP
1662020-02-18 Patrick Palka <ppalka@redhat.com>
167
168 P1983R0 Wording for GB301, US296, US292, US291, and US283
169 * include/std/ranges (filter_view::pred): New member function.
170 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
171 P1983R0 fixes the highlighted issue in the same way.
172 (join_view::_Iterator<_Const>): Add friend
173 join_view::_Iterator<!_Const>.
174 (join_view::_M_inner): Remove mutable specifier, effectively reverting
175 the proposed wording changes of P3278.
176 (join_view::begin): Refine the condition for when to return a const
177 iterator.
178 (split_view::_OuterIter::_OuterIter): Adjust constraints.
179 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
180 exists and works.
181
f5b4dc38
JW
1822020-02-18 Jonathan Wakely <jwakely@redhat.com>
183
a5b213dd
JW
184 PR libstdc++/93818
185 * include/std/ranges (_RangeAdaptor): Add deduction guide.
186 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
187 iterator_t<_Vp>.
188 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
189 (transform_view::_Iterator): Add alias _Base_iter and use in place of
190 iterator_t<_Base>.
191 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
192 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
193 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
194 (split_view::_InnerIter::_S_iter_cat()): Likewise.
195
ce7b39d0
JW
196 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
197 assumption that long is wider than int.
198 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
199 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
200 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
201 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
202
9b8e2dea
JW
203 P1976R2 Fixed-size span construction from dynamic range
204 * include/std/span (__cpp_lib_span): Update value.
205 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
206 assertion.
207 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
208 constraints.
209 (span::first<Count>(), span::last<Count>()): Use explicit type in
210 return statement.
211 (as_bytes, as_writable_bytes): Likewise.
212 * include/std/version (__cpp_lib_span): Update value.
213 * testsuite/23_containers/span/1.cc: Check new value.
214 * testsuite/23_containers/span/2.cc: Check new value.
215 * testsuite/23_containers/span/explicit.cc: New test.
216
d6c9e372
JW
217 * include/std/span (span::__is_compatible_array): Simplify alias
218 template by using requires-clause.
219 (span::__is_compatible_ref): New alias template for constraining
220 constructors.
221 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
222 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
223 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
224 redundant parentheses.
225 (span(R&&)): Add missing constraints.
226
f09f3242
JW
227 * include/std/span (span): Reorder members and rename template
228 parameters to match declarations in the C++2a working paper.
229
f5b4dc38
JW
230 P2116R0 Remove tuple-like protocol support from fixed-extent span
231 * include/std/span (get, tuple_size, tuple_element): Remove.
232 * testsuite/23_containers/span/everything.cc: Remove checks for
233 tuple-like API.
234 * testsuite/23_containers/span/get_neg.cc: Remove.
235 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
236 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
237 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
238
f3169941
PP
2392020-02-17 Patrick Palka <ppalka@redhat.com>
240
aa667c3f
PP
241 P2106R0 Alternative wording for GB315 and GB316
242 * include/bits/ranges_algo.h (in_fun_result): New.
243 (for_each_result, for_each_n_result): Change into an alias of
244 in_fun_result.
245 (in_in_result): New.
246 (mismatch_result): Change into an alias of in_in_result.
247 (copy_if_result): Change into an alias of in_out_result.
248 (swap_ranges_result): Change into an alias of in_in_result.
249 (unary_transform_result): Change into an alias of in_out_result.
250 (in_in_out_result): New.
251 (binary_transform_result): Change into an alias of in_in_out_result.
252 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
253 remove_copy_result, unique_copy_result, reverse_copy_result,
254 rotate_copy_result, partial_sort_copy_result): Change into an alias of
255 in_out_result.
256 (in_out_out_result): New.
257 (partition_copy_result, merge_result): Change into an alias of
258 in_out_out_result.
259 (set_union_result, set_intersection_result): Change into an alias of
260 in_in_out_result.
261 (set_difference_result): Change into an alias of in_out_result.
262 (set_symmetric_difference): Change into an alias of in_in_out_result.
263 (min_max_result): New.
264 (minmax_result, minmax_element_result): Change into an alias of
265 min_max_result.
266 (in_found_result): New.
267 (next_permutation_result, prev_permutation_result): Change into an alias
268 of in_found_result.
269 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
270 Adjust following changes to next_permutation_result and
271 prev_permutation_result.
272 * include/bits/ranges_algobase.h (in_out_result): New.
273 (copy_result, move_result, move_backward_result, copy_backward_result,
274 copy_n_result): Change into an alias of in_out_result.
275 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
276 uninitialized_copy_n_result, uninitialized_move_result,
277 uninitialized_move_n_result): Likewise.
278 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
279 structured bindings.
280 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
281
f3169941
PP
282 P1243R4 Rangify new algorithms
283 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
284 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
285 * testsuite/25_algorithms/clamp/constrained.cc: New test.
286 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
287 * testsuite/25_algorithms/sample/constrained.cc: New test.
288
98cf2c26
JW
2892020-02-17 Jonathan Wakely <jwakely@redhat.com>
290
c5e1c1d3
JW
291 P1964R2 Wording for boolean-testable
292 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
293 (__adjacent_find_fn): Cast result of predicate to bool.
294 * include/std/concepts (__boolean): Remove.
295 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
296 new helper concepts.
297 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
298 (predicate): Use __boolean_testable instead of boolean.
299 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
300 Likewise.
301
7ab36231
JW
302 P1970R2 Consistency for size() functions: Add ranges::ssize
303 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
304 * testsuite/std/ranges/access/ssize.cc: New test.
305
9866abe3
JW
306 P1956R1 On the names of low-level bit manipulation functions
307 * include/bits/hashtable_policy.h: Update comment.
308 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
309 (ispow2, ceil2, floor2, log2p1): Likewise.
310 (__cpp_lib_int_pow2): Add feature test macro.
311 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
312 * include/std/memory (assume_aligned): Adjust use of ispow2.
313 * include/std/version (__cpp_lib_int_pow2): Add.
314 * libsupc++/new_opa.cc: Adjust use of __ispow2.
315 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
316 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
317 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
318 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
319 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
320 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
321 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
322 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
323 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
324 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
325 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
326 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
327
cfbc8fbb
JW
328 * include/std/charconv: Add comment.
329
9cd4eeef
JW
330 PR libstdc++/92546 (partial)
331 * include/bits/random.h (uniform_random_bit_generator): Move definition
332 to <bits/uniform_int_dist.h>.
333 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
334 of <bits/random.h>.
335 * include/bits/ranges_algobase.h: Do not include <cmath>.
336 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
337 Move here.
338 * include/std/ranges: Do not include <limits>.
339 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
340
c03b53da
JW
341 PR libstdc++/92546 (partial)
342 * include/Makefile.am: Add new header.
343 * include/Makefile.in: Regenerate.
344 * include/bits/int_limits.h: New header.
345 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
346 numeric_limits with __detail::__int_limits.
347 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
348 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
349 Likewise.
350 * include/std/charconv (__to_chars_8, __from_chars_binary)
351 (__from_chars_alpha_to_num, from_chars): Likewise.
352 * include/std/memory_resource (polymorphic_allocator::allocate)
353 (polymorphic_allocator::allocate_object): Likewise.
354 * include/std/string_view (basic_string_view::_S_compare): Likewise.
355 * include/std/utility (in_range): Likewise.
356 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
357 extra error about incomplete type __int_limits<bool>.
358 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
359 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
360 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
361 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
362 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
363 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
364 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
365 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
366 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
367 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
368 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
369 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
370
4540ef78
JW
371 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
372 value for partial_ordering::unordered.
373
d6dfa3da
JW
374 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
375 const-qualified expression variations.
376 * include/std/concepts (copyable): Likewise.
377
98cf2c26
JW
378 * include/std/type_traits (__is_standard_integer): New helper trait.
379 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
380 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
381 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
382 * testsuite/20_util/integer_comparisons/1.cc: New test.
383 * testsuite/20_util/integer_comparisons/2.cc: New test.
384 * testsuite/20_util/integer_comparisons/equal.cc: New test.
385 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
386 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
387 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
388 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
389 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
390 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
391 * testsuite/20_util/integer_comparisons/less.cc: New test.
392 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
393 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
394 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
395 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
396 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
397
93b8cfce
PP
3982020-02-16 Patrick Palka <ppalka@redhat.com>
399
400 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
401 Move code after an early exit constexpr if to under an else branch.
402 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
403
90b7eb65
PP
4042020-02-15 Patrick Palka <ppalka@redhat.com>
405
55992626
PP
406 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
407 * include/bits/ranges_algobase.h: Likewise.
408 * include/bits/ranges_uninitialized.h: Likewise.
409
b40c57bd
PP
410 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
411 binary_search, copy_if, count, count_if, equal_range, find, find_end,
412 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
413 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
414 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
415 lower_bound, make_heap, max, max_element, merge, min, min_element,
416 minmax, minmax_element, mismatch, next_permutation, none_of,
417 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
418 partition_point, pop_heap, prev_permutation, push_heap, remove,
419 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
420 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
421 search, search_n, set_difference, set_intersection,
422 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
423 stable_partition, stable_sort, swap_ranges, transform, unique,
424 unique_copy, upper_bound): Convert into function objects.
425 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
426 fill, move_backward, copy_backward): Likewise.
427 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
428 uninitialized_default_construct_n, uninitialized_value_construct,
429 uninitialized_value_construct_n, uninitialized_copy,
430 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
431 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
432 destroy, destroy_n): Likewise.
433
90b7eb65
PP
434 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
435 (ranges::find_end): ... here.
436 (ranges::__lexicographical_compare): Fold into ...
437 (ranges::lexicographical_compare): ... here.
438 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
439 (ranges::equal): ... here.
440
55b00d14
JW
4412020-02-15 Jonathan Wakely <jwakely@redhat.com>
442
443 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
444 * include/std/deque: Likewise.
445 * include/std/forward_list: Likewise.
446 * include/std/list: Likewise.
447 * include/std/string: Likewise.
448 * include/std/vector: Likewise.
449 * include/std/version: Likewise.
450 * testsuite/23_containers/deque/erasure.cc: Test for new value.
451 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
452 * testsuite/23_containers/list/erasure.cc: Likewise.
453 * testsuite/23_containers/map/erasure.cc: Likewise.
454 * testsuite/23_containers/set/erasure.cc: Likewise.
455 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
456 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
457 * testsuite/23_containers/vector/erasure.cc: Likewise.
458
5b1d5885
JW
4592020-02-15 Jonathan Wakely <jwakely@redhat.com>
460
461 * include/bits/random.h (uniform_random_bit_generator): Require min()
462 and max() to be constant expressions and min() to be less than max().
463 * testsuite/26_numerics/random/concept.cc: Check additional cases.
464 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
465
90fc7b3c
PP
4662020-02-13 Patrick Palka <ppalka@redhat.com>
467
613c932f
PP
468 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
469 * include/Makefile.in: Regenerate.
470 * include/bits/ranges_uninitialized.h: New header.
471 * include/std/memory: Include it.
472 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
473 test.
474 * .../uninitialized_copy/constrained.cc: New test.
475 * .../uninitialized_default_construct/constrained.cc: New test.
476 * .../uninitialized_fill/constrained.cc: New test.
477 * .../uninitialized_move/constrained.cc: New test.
478 * .../uninitialized_value_construct/constrained.cc: New test.
479
90fc7b3c
PP
480 * include/Makefile.am: Add bits/ranges_algobase.h
481 * include/Makefile.in: Regenerate.
482 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
483 existing #includes.
484 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
485 __detail::__is_move_iterator, copy_result, move_result,
486 __equal, equal, copy_result, move_result, move_backward_result,
487 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
488 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
489 fill): Split out into ...
490 * bits/range_algobase.h: ... this new header.
491
99bbab9f
PP
4922020-02-12 Patrick Palka <ppalka@redhat.com>
493
494 LWG 3389 and LWG 3390
495 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
496 constructing the move_iterator with __i.
497 (counted_iterator::counted_iterator): Use std::move when initializing
498 M_current with __i.
499 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
500 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
501
02ce382c
SL
5022020-02-12 Sandra Loosemore <sandra@codesourcery.com>
503
504 PR libstdc++/79193
505 PR libstdc++/88999
506
507 * configure: Regenerated.
508
b32a3f32
FD
5092020-02-12 François Dumont <fdumont@gcc.gnu.org>
510
511 * include/bits/hashtable.h
512 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
513 missing std namespace qualification to forward call.
514
dcda050e
JW
5152020-02-09 Jonathan Wakely <jwakely@redhat.com>
516
38660e87
JW
517 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
518 comment.
519 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
520
97a7c229
JW
521 * include/std/ranges: Fix non-ASCII characters in comment.
522
dcda050e
JW
523 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
524 equality comparison to be valid and return bool.
525 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
526 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
527 type with ambiguous conversion to fundamental types.
528 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
529
d222d8ec
JW
5302020-02-07 Jonathan Wakely <jwakely@redhat.com>
531
c8dd2446
JW
532 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
533 Use remove_cvref_t.
534 (readable_traits): Rename to indirectly_readable_traits.
535 (readable): Rename to indirectly_readable.
536 (writable): Rename to indirectly_writable.
537 (__detail::__iter_exchange_move): Do not use remove_reference_t.
538 (indirectly_swappable): Adjust requires expression parameter types.
539 expression.
540 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
541 (ranges::replace_if, ranges::generate_n, ranges::generate)
542 (ranges::remove): Use new name for writable.
543 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
544 Use new name for readable.
545 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
546 new name for readable_traits.
547 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
548 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
549 new definition of indirectly_readable.
550
d222d8ec
JW
551 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
552 to take parameters of common_iterator, instead of the common_iterator
553 type itself. Fix argument for __common_iter_has_arrow constraint.
554 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
555
572992c8
JW
5562020-02-07 Jonathan Wakely <jwakely@redhat.com>
557
558 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
559 warning.
560 (basic_istream_view::_Iterator::operator++()): Add missing return.
561
cba9ef06
PP
5622020-02-07 Patrick Palka <ppalka@redhat.com>
563
a04f635d
PP
564 * include/bits/ranges_algo.h: Remove extraneous &&.
565
b7903d9f
PP
566 * include/std/ranges (ranges::__detail::__stream_extractable,
567 ranges::basic_istream_view, ranges::istream_view): Define.
568 * testsuite/std/ranges/istream_view: New test.
569
cba9ef06
PP
570 Implement C++20 range adaptors
571 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
572 (subrange::_S_store_size): Mark as const instead of constexpr to
573 avoid what seems to be a bug in GCC.
574 (__detail::__box): Give it defaulted copy and move constructors.
55d4cbcb
PP
575 (ranges::views::_Single::operator()): Mark constexpr.
576 (ranges::views::_Iota::operator()): Mark constexpr.
cba9ef06 577 (__detail::Empty): Define.
55d4cbcb
PP
578 (ranges::views::__closure::_RangeAdaptor,
579 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
580 ranges::views::all, ranges::__detail::find_if,
581 ranges::__detail::find_if_not, ranges::__detail::mismatch,
582 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
583 ranges::views::transform, take_view, ranges::views::take,
584 take_while_view, ranges::views::take_while, drop_view,
585 ranges::views::drop, join_view, ranges::views::join,
cba9ef06 586 __detail::require_constant, __detail::tiny_range, split_view,
55d4cbcb
PP
587 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
588 common_view, ranges::views::common, reverse_view,
589 ranges::views::reverse,
590 ranges::views::__detail::__is_reversible_subrange,
591 ranges::views::__detail::__is_reverse_view, reverse_view,
592 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
593 ranges::views::elements, ranges::views::keys, ranges::views::values):
594 Define.
595 (views): Alias for ranges::views.
596 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
597 tuple_element<1, ranges::subrange>): New partial specializations.
cba9ef06
PP
598 * testsuite/std/ranges/adaptors/all.cc: New test.
599 * testsuite/std/ranges/adaptors/common.cc: Likewise.
600 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
601 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
602 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
603 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
604 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
605 * testsuite/std/ranges/adaptors/join.cc: Likewise.
606 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
607 * testsuite/std/ranges/adaptors/split.cc: Likewise.
608 * testsuite/std/ranges/adaptors/take.cc: Likewise.
609 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
610 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
611
5713834e
JW
6122020-02-07 Jonathan Wakely <jwakely@redhat.com>
613
0d57370c
JW
614 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
615 type of enumerations and comparison category types.
616 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
617 (__cmp_cat::_Ncmp::unordered): Change value to 2.
618 (partial_ordering::_M_value, weak_ordering::_M_value)
619 (strong_ordering::_M_value): Change type to __cmp_cat::type.
620 (partial_ordering::_M_is_ordered): Remove data member.
621 (partial_ordering): Use second bit of _M_value for unordered. Adjust
622 comparison operators.
623 (weak_ordering::operator partial_ordering): Simplify to remove
624 branches.
625 (operator<=>(unspecified, weak_ordering)): Likewise.
626 (strong_ordering::operator partial_ordering): Likewise.
627 (strong_ordering::operator weak_ordering): Likewise.
628 (operator<=>(unspecified, strong_ordering)): Likewise.
629 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
630 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
631 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
632
5713834e
JW
633 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
634 __cpp_lib_three_way_comparison macro and use deduced return type for
635 operator<=>.
636 * testsuite/std/ranges/iota/iterator.cc: New test.
637
bc464641
PP
6382020-02-07 Patrick Palka <ppalka@redhat.com>
639 Jonathan Wakely <jwakely@redhat.com>
640
641 Implement C++20 constrained algorithms
642 * include/Makefile.am: Add new header.
643 * include/Makefile.in: Regenerate.
644 * include/std/algorithm: Include <bits/ranges_algo.h>.
645 * include/bits/ranges_algo.h: New file.
646 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
647 * testsuite/25_algorithms/all_of/constrained.cc: New test.
648 * testsuite/25_algorithms/any_of/constrained.cc: New test.
649 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
650 * testsuite/25_algorithms/copy/constrained.cc: New test.
651 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
652 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
653 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
654 * testsuite/25_algorithms/count/constrained.cc: New test.
655 * testsuite/25_algorithms/count_if/constrained.cc: New test.
656 * testsuite/25_algorithms/equal/constrained.cc: New test.
657 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
658 * testsuite/25_algorithms/fill/constrained.cc: New test.
659 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
660 * testsuite/25_algorithms/find/constrained.cc: New test.
661 * testsuite/25_algorithms/find_end/constrained.cc: New test.
662 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
663 * testsuite/25_algorithms/find_if/constrained.cc: New test.
664 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
665 * testsuite/25_algorithms/for_each/constrained.cc: New test.
666 * testsuite/25_algorithms/generate/constrained.cc: New test.
667 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
668 * testsuite/25_algorithms/heap/constrained.cc: New test.
669 * testsuite/25_algorithms/includes/constrained.cc: New test.
670 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
671 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
672 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
673 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
674 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
675 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
676 test.
677 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
678 * testsuite/25_algorithms/max/constrained.cc: New test.
679 * testsuite/25_algorithms/max_element/constrained.cc: New test.
680 * testsuite/25_algorithms/merge/constrained.cc: New test.
681 * testsuite/25_algorithms/min/constrained.cc: New test.
682 * testsuite/25_algorithms/min_element/constrained.cc: New test.
683 * testsuite/25_algorithms/minmax/constrained.cc: New test.
684 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
685 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
686 * testsuite/25_algorithms/move/constrained.cc: New test.
687 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
688 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
689 * testsuite/25_algorithms/none_of/constrained.cc: New test.
690 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
691 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
692 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
693 * testsuite/25_algorithms/partition/constrained.cc: New test.
694 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
695 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
696 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
697 * testsuite/25_algorithms/remove/constrained.cc: New test.
698 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
699 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
700 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
701 * testsuite/25_algorithms/replace/constrained.cc: New test.
702 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
703 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
704 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
705 * testsuite/25_algorithms/reverse/constrained.cc: New test.
706 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
707 * testsuite/25_algorithms/rotate/constrained.cc: New test.
708 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
709 * testsuite/25_algorithms/search/constrained.cc: New test.
710 * testsuite/25_algorithms/search_n/constrained.cc: New test.
711 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
712 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
713 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
714 test.
715 * testsuite/25_algorithms/set_union/constrained.cc: New test.
716 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
717 * testsuite/25_algorithms/sort/constrained.cc: New test.
718 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
719 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
720 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
721 * testsuite/25_algorithms/transform/constrained.cc: New test.
722 * testsuite/25_algorithms/unique/constrained.cc: New test.
723 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
724 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
725
d1aa7705
JW
7262020-02-06 Jonathan Wakely <jwakely@redhat.com>
727
bd630df0
JW
728 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
729 number in comment. Fix indentation.
730
d1aa7705
JW
731 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
732 redundant _GLIBCXX20_CONSTEXPR.
733
26eae9ac
JW
734 * include/std/ranges (viewable_range): Replace decay_t with
735 remove_cvref_t (LWG 3375).
736
269e8130
JW
7372020-02-05 Jonathan Wakely <jwakely@redhat.com>
738
739 * include/bits/iterator_concepts.h (iter_reference_t)
740 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
741 Remove workarounds for PR c++/67704.
742 * testsuite/24_iterators/aliases.cc: New test.
743
7db12d15
PP
7442020-02-05 Patrick Palka <ppalka@redhat.com>
745
746 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
747 when initializing _M_current.
748 (move_iterator::base): Split into two overloads differing in
749 ref-qualifiers as in P1207R4 for C++20.
750
9962493c
JW
7512020-02-04 Jonathan Wakely <jwakely@redhat.com>
752
9bc5bea1
JW
753 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
754 use.
755
9962493c
JW
756 PR libstdc++/93562
757 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
758 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
759 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
760
20fa702b
AB
7612020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
762
763 * configure: Regenerate.
764
6e5a1963
PP
7652020-01-31 Patrick Palka <ppalka@redhat.com>
766
767 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
768 test_range::end() returns the same type as test_range::begin().
769 * testsuite/24_iterators/range_operations/next.cc: Likewise.
770 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
771 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
772 Always return a sentinel<I>.
773
5cd2e126
JW
7742020-01-29 Jonathan Wakely <jwakely@redhat.com>
775
0a8f4feb
JW
776 PR libstdc++/92895
777 * include/std/stop_token (stop_token::stop_possible()): Call new
778 _M_stop_possible() function.
779 (stop_token::stop_requested()): Do not use stop_possible().
780 (stop_token::binary_semaphore): New class, as temporary stand-in for
781 std::binary_semaphore.
782 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
783 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
784 New data members for symchronization with stop_callback destruction.
785 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
786 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
787 Remove.
788 (stop_token::_Stop_cb::_M_run): New member function.
789 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
790 Remove.
791 (stop_token::_Stop_state::_M_owners): New data member to track
792 reference count for ownership.
793 (stop_token::_Stop_state::_M_value): New data member combining a
794 spinlock, the stop requested flag, and the reference count for
795 associated stop_source objects.
796 (stop_token::_Stop_state::_M_requester): New data member for
797 synchronization with stop_callback destruction.
798 (stop_token::_Stop_state::_M_stop_possible()): New member function.
799 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
800 of _M_value.
801 (stop_token::_Stop_state::_M_add_owner)
802 (stop_token::_Stop_state::_M_release_ownership)
803 (stop_token::_Stop_state::_M_add_ssrc)
804 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
805 updating reference counts.
806 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
807 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
808 (stop_token::_Stop_state::_M_try_lock)
809 (stop_token::_Stop_state::_M_try_lock_and_stop)
810 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
811 managing spinlock.
812 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
813 read and update state. Release lock while running callbacks. Use new
814 data members to synchronize with callback destruction.
815 (stop_token::_Stop_state::_M_remove_callback): Likewise.
816 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
817 to read and update state.
818 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
819 replacing shared_ptr.
820 (stop_source::stop_source(const stop_source&)): Update reference count.
821 (stop_source::operator=(const stop_source&)): Likewise.
822 (stop_source::~stop_source()): Likewise.
823 (stop_source::stop_source(stop_source&&)): Define as defaulted.
824 (stop_source::operator=(stop_source&&)): Establish postcondition on
825 parameter.
826 (stop_callback): Enforce preconditions on template parameter. Replace
827 base class with data member of new _Cb_impl type.
828 (stop_callback::stop_callback(const stop_token&, Cb&&))
829 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
830 (stop_callback::_Cb_impl): New type wrapping _Callback member and
831 defining the _S_execute member function.
832 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
833 test.
834 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
835 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
836 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
837 New test.
838 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
839 test.
840 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
841 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
842 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
843 test.
844
f214ffb3
JW
845 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
846 three_way_comparable_with.
847 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
848 (compare_three_way::operator()): Remove redundant constraint from
849 requires-clause.
850 (__detail::_Synth3way::operator()): Use three_way_comparable_with
851 instead of workaround.
852 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
853 output due to simplified constraints on compare_three_way::operator().
854
83b02010
JW
855 PR libstdc++/93479
856 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
857 * testsuite/18_support/comparisons/object/93479.cc: New test.
858
5cd2e126
JW
859 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
860 returns the same type as test_range::begin(). Add comments.
861 * testsuite/std/ranges/access/rbegin.cc: Likewise.
862 * testsuite/std/ranges/access/rend.cc: Likewise.
863 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
864 test_range is the same as its iterator type.
865 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
866 operator- overloads to satisfy sized_sentinel_for when the iterator
867 satisfies random_access_iterator.
868
759812fd
JW
8692020-01-28 Jonathan Wakely <jwakely@redhat.com>
870
72a9fd20
JW
871 PR libstdc++/93470
872 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
873 static assertion to object types.
874
759812fd
JW
875 PR libstdc++/93325
876 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
877 clock_gettime instead of explicit glibc version check.
878 * configure: Regenerate.
879
a5d81aaa
JW
8802020-01-28 Martin Liska <mliska@suse.cz>
881
882 PR libstdc++/93478
883 * include/std/atomic: Fix typo.
884 * include/std/optional: Likewise.
885
8862020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
887
888 * configure: Regenerate.
889
389cd88c
JW
8902020-01-27 Jonathan Wakely <jwakely@redhat.com>
891
892 PR libstdc++/93426
893 * include/std/span (span): Fix deduction guide.
894 * testsuite/23_containers/span/deduction.cc: New test.
895
482eeff5
JW
8962020-01-24 Jonathan Wakely <jwakely@redhat.com>
897
898 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
899 (__cmp_cat::_Ord::equivalent): Add enumerator.
900 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
901 and greater.
902 (partial_ordering, weak_ordering, strong_ordering): Remove
903 constructors taking __cmp_cat::_Eq parameters. Use renamed
904 enumerators.
905
e8e66971
MR
9062020-01-24 Maciej W. Rozycki <macro@wdc.com>
907
908 * acinclude.m4: Handle `--with-toolexeclibdir='.
909 * Makefile.in: Regenerate.
910 * aclocal.m4: Regenerate.
911 * configure: Regenerate.
912 * doc/Makefile.in: Regenerate.
913 * include/Makefile.in: Regenerate.
914 * libsupc++/Makefile.in: Regenerate.
915 * po/Makefile.in: Regenerate.
916 * python/Makefile.in: Regenerate.
917 * src/Makefile.in: Regenerate.
918 * src/c++11/Makefile.in: Regenerate.
919 * src/c++17/Makefile.in: Regenerate.
920 * src/c++98/Makefile.in: Regenerate.
921 * src/filesystem/Makefile.in: Regenerate.
922 * testsuite/Makefile.in: Regenerate.
923
7a900bce
AO
9242020-01-23 Alexandre Oliva <oliva@adacore.com>
925
f9e84b31
AO
926 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
927 * configure: Rebuild.
928
7a900bce
AO
929 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
930
04681fca
JW
9312020-01-23 Jonathan Wakely <jwakely@redhat.com>
932
933 PR libstdc++/91947
934 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
935 rule.
936 * include/Makefile.in: Regenerate.
937
c784f162
JW
9382020-01-20 Jonathan Wakely <jwakely@redhat.com>
939
940 * doc/xml/faq.xml: Fix grammar.
941 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
942 * doc/xml/manual/spine.xml: Update copyright years.
943 * doc/html/*: Regenerate.
944
f4d83eba
ER
9452020-01-19 Eric S. Raymond <esr@thyrsus.com>
946
947 * doc/xml/faq.xml: Update for SVN -> Git transition.
948 * doc/xml/manual/appendix_contributing.xml: Likewise.
949 * doc/xml/manual/status_cxx1998.xml: Likewise.
950 * doc/xml/manual/status_cxx2011.xml: Likewise.
951 * doc/xml/manual/status_cxx2014.xml: Likewise.
952 * doc/xml/manual/status_cxx2017.xml: Likewise.
953 * doc/xml/manual/status_cxx2020.xml: Likewise.
954 * doc/xml/manual/status_cxxtr1.xml: Likewise.
955 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
956
49789fd0
IS
9572020-01-18 Iain Sandoe <iain@sandoe.co.uk>
958
959 * include/Makefile.am: Add coroutine to the std set.
960 * include/Makefile.in: Regenerated.
961 * include/std/coroutine: New file.
962
0ba6a850
JW
9632020-01-17 Jonathan Wakely <jwakely@redhat.com>
964
965 PR libstdc++/92376
966 * include/bits/c++config: Only do PSTL config when the header is
967 present, to fix freestanding.
968 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
969 functions if they were detected by configure.
970
98d56ea8
JW
9712020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
972 Matthew Bauer <mjbauer95@gmail.com>
973 Jonathan Wakely <jwakely@redhat.com>
974
975 PR bootstrap/64271 (partial)
976 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
977 to unsigned short.
978 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
979 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
980 definitions with NetBSD upstream.
981 (ctype_base::blank): Use _CTYPE_BL.
982 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
983 Declaration.
984 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
985 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
986 parameters to unsigned char.
987 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
988
d9165389
FD
9892020-01-16 François Dumont <fdumont@gcc.gnu.org>
990
991 PR libstdc++/91263
992 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
993 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
994 (_Equality_base): Remove.
995 (_Equality<>::_M_equal): Review implementation. Use
996 std::is_permutation.
997 * testsuite/23_containers/unordered_multiset/operators/1.cc
998 (Hash, Equal, test02, test03): New.
999 * testsuite/23_containers/unordered_set/operators/1.cc
1000 (Hash, Equal, test02, test03): New.
1001
2a0f6c61
JW
10022020-01-15 Jonathan Wakely <jwakely@redhat.com>
1003
1004 PR libstdc++/93267
1005 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
1006 Move here from <bits/range_access.h> and define using __int128 when
1007 available.
1008 (__is_integer_like, __is_signed_integer_like): Move here from
1009 <bits/range_access.h>.
1010 (weakly_incrementable): Use __is_signed_integer_like.
1011 * include/bits/range_access.h (__max_diff_type, __max_size_type)
1012 (__is_integer_like, __is_signed_integer_like): Move to
1013 <bits/iterator_concepts.h>.
1014 (__make_unsigned_like_t): Move here from <ranges>.
1015 * include/std/ranges (__make_unsigned_like_t): Move to
1016 <bits/range_access.h>.
1017 (iota_view): Replace using-directive with using-declarations.
1018 * testsuite/std/ranges/iota/93267.cc: New test.
1019 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
1020
e4379a93
JW
10212020-01-13 Jonathan Wakely <jwakely@redhat.com>
1022
fe7cc34f
JW
1023 PR libstdc++/93244
1024 * include/bits/fs_path.h (path::generic_string<C,A>)
1025 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
1026 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
1027 root-dir is converted to forward slash in generic pathname.
1028 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
1029 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
1030
e4379a93
JW
1031 PR libstdc++/58605
1032 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
1033 Define.
1034 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
1035 (__atomic_float): Add default member initializer for C++20.
1036 * include/std/atomic (atomic): Likewise.
1037 (atomic::atomic()): Remove noexcept-specifier on default constructor.
1038 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
1039 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
1040 number.
1041 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
1042 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
1043 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
1044 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
1045 expected result for is_trivially_default_constructible.
1046 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
1047 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
1048 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
1049 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
1050 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
1051 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
1052 expected results for is_trivially_default_constructible.
1053 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
1054 new test generator.
1055
7918cb93
JW
10562020-01-10 Jonathan Wakely <jwakely@redhat.com>
1057
68be73fc
JW
1058 * testsuite/util/testsuite_iterators.h: Improve comment.
1059
78f02e80
JW
1060 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
1061 initialization syntax.
1062
7918cb93
JW
1063 PR libstdc++/92285
1064 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
1065 of base class independent of __cplusplus value.
1066 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
1067 type defined in the base class
1068 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
1069 * testsuite/24_iterators/istreambuf_iterator/requirements/
1070 base_classes.cc: Adjust expected base class for C++98.
1071
acd43917
OH
10722020-01-09 Olivier Hainque <hainque@adacore.com>
1073
1074 * doc/xml/manual/appendix_contributing.xml: Document _C2
1075 as a reserved identifier, by VxWorks.
1076 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
1077 * include/bits/stl_multimap.h: Likewise.
1078
caa39b2e
JW
10792020-01-09 Jonathan Wakely <jwakely@redhat.com>
1080
1a788638
JW
1081 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
1082 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
1083 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
1084 partial specialization to disambiguate the two constrained
1085 specializations.
1086
caa39b2e
JW
1087 * include/experimental/type_traits (experimental::is_pod_v): Disable
1088 -Wdeprecated-declarations warnings around reference to std::is_pod.
1089 * include/std/type_traits (is_pod_v): Likewise.
1090 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
1091 is_standard_layout and is_trivial. Do not check is_pod for C++20.
1092 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
1093 Add -Wno-deprecated for C++20.
1094 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
1095 * testsuite/20_util/is_pod/value.cc: Likewise.
1096 * testsuite/experimental/type_traits/value.cc: Likewise.
1097
1a6c5064
JTM
10982020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
1099
1100 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
1101 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
1102 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
1103
d574c8aa
JW
11042020-01-09 Jonathan Wakely <jwakely@redhat.com>
1105
160e95dc
JW
1106 PR libstdc++/93205
1107 * include/bits/random.h (operator>>): Check stream operation succeeds.
1108 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
1109 typedefs.
1110 (operator>>): Remove redundant __istream_type typedefs. Check stream
1111 operations succeed.
1112 (__extract_params): New function to fill a vector from a stream.
1113 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
1114
d574c8aa
JW
1115 PR libstdc++/93208
1116 * config/abi/pre/gnu.ver: Add new exports.
1117 * include/std/memory_resource (memory_resource::~memory_resource()):
1118 Do not define inline.
1119 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
1120 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
1121 Define.
1122 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
1123 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
1124
b9c84e95
FD
11252020-01-09 François Dumont <fdumont@gcc.gnu.org>
1126
1127 PR libstdc++/92124
1128 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
1129 template alias.
1130 (_Hashtable<>::__fwd_value_for): New.
1131 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
1132 parameter.
1133 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
1134 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
1135 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
1136 with std::move.
1137 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
1138 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
1139 Adapt.
1140 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
1141 Adapt.
1142 * testsuite/23_containers/unordered_set/92124.cc: New.
1143
fff148b7
JW
11442020-01-08 Jonathan Wakely <jwakely@redhat.com>
1145
1146 PR libstdc++/93201
1147 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
1148 detailed error reporting for remove_all. Check result of recursive
1149 call before incrementing iterator.
1150 (remove_all(const path&), remove_all(const path&, error_code&)): Use
1151 do_remove_all.
1152 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
1153 result of recursive call before incrementing iterator.
1154 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
1155 are reported correctly.
1156 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
1157
9e3c1eb7
TR
11582020-01-07 Thomas Rodgers <trodgers@redhat.com>
1159
1160 * include/std/condition_variable
1161 (condition_variable_any::wait_on): Rename to match current draft
1162 standard.
1163 (condition_variable_any::wait_on_until): Likewise.
1164 (condition_variable_any::wait_on_for): Likewise.
1165 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
1166 Adjust tests to account for renamed methods.
1167
6af8819b
FD
11682020-01-07 François Dumont <fdumont@gcc.gnu.org>
1169
1170 PR libstdc++/92124
1171 * include/bits/stl_tree.h
1172 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
1173 std::move_if_noexcept by std::move.
1174 * testsuite/23_containers/map/92124.cc: New.
1175 * testsuite/23_containers/set/92124.cc: New.
1176
f31a99f7
JW
11772020-01-06 Jonathan Wakely <jwakely@redhat.com>
1178
a4a1f965
JW
1179 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
1180 (stop_source): Likewise (LWG 3362).
1181 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
1182 comparisons.
1183
f31a99f7
JW
1184 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
1185 (lexicographical_compare_three_way): Do not depend on
1186 __cpp_lib_concepts.
1187 * include/std/version (__cpp_lib_three_way_comparison): Only define
1188 when __cpp_lib_concepts is defined.
1189 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
1190
b4e70137
JW
11912020-01-03 Jonathan Wakely <jwakely@redhat.com>
1192
1193 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
1194 Only define four-argument overload when __cpp_lib_concepts is defined.
1195
a8497ec6
JDA
11962020-01-01 John David Anglin <danglin@gcc.gnu.org>
1197
1198 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
1199
8d9254fc 12002020-01-01 Jakub Jelinek <jakub@redhat.com>
5624e564
JJ
1201
1202 Update copyright years.
b4df5e92 1203\f
8d9254fc 1204Copyright (C) 2020 Free Software Foundation, Inc.
b4df5e92
JW
1205
1206Copying and distribution of this file, with or without modification,
1207are permitted in any medium without royalty provided the copyright
1208notice and this notice are preserved.