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