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