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