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