]> gcc.gnu.org Git - gcc.git/blame - libstdc++-v3/ChangeLog
libstdc++: Implement "Safe Integral Comparisons" (P0586R2)
[gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
98cf2c26
JW
12020-02-17 Jonathan Wakely <jwakely@redhat.com>
2
3 * include/std/type_traits (__is_standard_integer): New helper trait.
4 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
5 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
6 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
7 * testsuite/20_util/integer_comparisons/1.cc: New test.
8 * testsuite/20_util/integer_comparisons/2.cc: New test.
9 * testsuite/20_util/integer_comparisons/equal.cc: New test.
10 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
11 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
12 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
13 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
14 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
15 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
16 * testsuite/20_util/integer_comparisons/less.cc: New test.
17 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
18 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
19 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
20 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
21 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
22
93b8cfce
PP
232020-02-16 Patrick Palka <ppalka@redhat.com>
24
25 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
26 Move code after an early exit constexpr if to under an else branch.
27 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
28
90b7eb65
PP
292020-02-15 Patrick Palka <ppalka@redhat.com>
30
55992626
PP
31 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
32 * include/bits/ranges_algobase.h: Likewise.
33 * include/bits/ranges_uninitialized.h: Likewise.
34
b40c57bd
PP
35 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
36 binary_search, copy_if, count, count_if, equal_range, find, find_end,
37 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
38 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
39 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
40 lower_bound, make_heap, max, max_element, merge, min, min_element,
41 minmax, minmax_element, mismatch, next_permutation, none_of,
42 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
43 partition_point, pop_heap, prev_permutation, push_heap, remove,
44 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
45 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
46 search, search_n, set_difference, set_intersection,
47 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
48 stable_partition, stable_sort, swap_ranges, transform, unique,
49 unique_copy, upper_bound): Convert into function objects.
50 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
51 fill, move_backward, copy_backward): Likewise.
52 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
53 uninitialized_default_construct_n, uninitialized_value_construct,
54 uninitialized_value_construct_n, uninitialized_copy,
55 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
56 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
57 destroy, destroy_n): Likewise.
58
90b7eb65
PP
59 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
60 (ranges::find_end): ... here.
61 (ranges::__lexicographical_compare): Fold into ...
62 (ranges::lexicographical_compare): ... here.
63 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
64 (ranges::equal): ... here.
65
55b00d14
JW
662020-02-15 Jonathan Wakely <jwakely@redhat.com>
67
68 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
69 * include/std/deque: Likewise.
70 * include/std/forward_list: Likewise.
71 * include/std/list: Likewise.
72 * include/std/string: Likewise.
73 * include/std/vector: Likewise.
74 * include/std/version: Likewise.
75 * testsuite/23_containers/deque/erasure.cc: Test for new value.
76 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
77 * testsuite/23_containers/list/erasure.cc: Likewise.
78 * testsuite/23_containers/map/erasure.cc: Likewise.
79 * testsuite/23_containers/set/erasure.cc: Likewise.
80 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
81 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
82 * testsuite/23_containers/vector/erasure.cc: Likewise.
83
5b1d5885
JW
842020-02-15 Jonathan Wakely <jwakely@redhat.com>
85
86 * include/bits/random.h (uniform_random_bit_generator): Require min()
87 and max() to be constant expressions and min() to be less than max().
88 * testsuite/26_numerics/random/concept.cc: Check additional cases.
89 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
90
90fc7b3c
PP
912020-02-13 Patrick Palka <ppalka@redhat.com>
92
613c932f
PP
93 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
94 * include/Makefile.in: Regenerate.
95 * include/bits/ranges_uninitialized.h: New header.
96 * include/std/memory: Include it.
97 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
98 test.
99 * .../uninitialized_copy/constrained.cc: New test.
100 * .../uninitialized_default_construct/constrained.cc: New test.
101 * .../uninitialized_fill/constrained.cc: New test.
102 * .../uninitialized_move/constrained.cc: New test.
103 * .../uninitialized_value_construct/constrained.cc: New test.
104
90fc7b3c
PP
105 * include/Makefile.am: Add bits/ranges_algobase.h
106 * include/Makefile.in: Regenerate.
107 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
108 existing #includes.
109 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
110 __detail::__is_move_iterator, copy_result, move_result,
111 __equal, equal, copy_result, move_result, move_backward_result,
112 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
113 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
114 fill): Split out into ...
115 * bits/range_algobase.h: ... this new header.
116
99bbab9f
PP
1172020-02-12 Patrick Palka <ppalka@redhat.com>
118
119 LWG 3389 and LWG 3390
120 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
121 constructing the move_iterator with __i.
122 (counted_iterator::counted_iterator): Use std::move when initializing
123 M_current with __i.
124 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
125 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
126
02ce382c
SL
1272020-02-12 Sandra Loosemore <sandra@codesourcery.com>
128
129 PR libstdc++/79193
130 PR libstdc++/88999
131
132 * configure: Regenerated.
133
b32a3f32
FD
1342020-02-12 François Dumont <fdumont@gcc.gnu.org>
135
136 * include/bits/hashtable.h
137 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
138 missing std namespace qualification to forward call.
139
dcda050e
JW
1402020-02-09 Jonathan Wakely <jwakely@redhat.com>
141
38660e87
JW
142 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
143 comment.
144 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
145
97a7c229
JW
146 * include/std/ranges: Fix non-ASCII characters in comment.
147
dcda050e
JW
148 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
149 equality comparison to be valid and return bool.
150 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
151 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
152 type with ambiguous conversion to fundamental types.
153 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
154
d222d8ec
JW
1552020-02-07 Jonathan Wakely <jwakely@redhat.com>
156
c8dd2446
JW
157 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
158 Use remove_cvref_t.
159 (readable_traits): Rename to indirectly_readable_traits.
160 (readable): Rename to indirectly_readable.
161 (writable): Rename to indirectly_writable.
162 (__detail::__iter_exchange_move): Do not use remove_reference_t.
163 (indirectly_swappable): Adjust requires expression parameter types.
164 expression.
165 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
166 (ranges::replace_if, ranges::generate_n, ranges::generate)
167 (ranges::remove): Use new name for writable.
168 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
169 Use new name for readable.
170 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
171 new name for readable_traits.
172 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
173 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
174 new definition of indirectly_readable.
175
d222d8ec
JW
176 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
177 to take parameters of common_iterator, instead of the common_iterator
178 type itself. Fix argument for __common_iter_has_arrow constraint.
179 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
180
572992c8
JW
1812020-02-07 Jonathan Wakely <jwakely@redhat.com>
182
183 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
184 warning.
185 (basic_istream_view::_Iterator::operator++()): Add missing return.
186
cba9ef06
PP
1872020-02-07 Patrick Palka <ppalka@redhat.com>
188
a04f635d
PP
189 * include/bits/ranges_algo.h: Remove extraneous &&.
190
b7903d9f
PP
191 * include/std/ranges (ranges::__detail::__stream_extractable,
192 ranges::basic_istream_view, ranges::istream_view): Define.
193 * testsuite/std/ranges/istream_view: New test.
194
cba9ef06
PP
195 Implement C++20 range adaptors
196 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
197 (subrange::_S_store_size): Mark as const instead of constexpr to
198 avoid what seems to be a bug in GCC.
199 (__detail::__box): Give it defaulted copy and move constructors.
55d4cbcb
PP
200 (ranges::views::_Single::operator()): Mark constexpr.
201 (ranges::views::_Iota::operator()): Mark constexpr.
cba9ef06 202 (__detail::Empty): Define.
55d4cbcb
PP
203 (ranges::views::__closure::_RangeAdaptor,
204 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
205 ranges::views::all, ranges::__detail::find_if,
206 ranges::__detail::find_if_not, ranges::__detail::mismatch,
207 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
208 ranges::views::transform, take_view, ranges::views::take,
209 take_while_view, ranges::views::take_while, drop_view,
210 ranges::views::drop, join_view, ranges::views::join,
cba9ef06 211 __detail::require_constant, __detail::tiny_range, split_view,
55d4cbcb
PP
212 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
213 common_view, ranges::views::common, reverse_view,
214 ranges::views::reverse,
215 ranges::views::__detail::__is_reversible_subrange,
216 ranges::views::__detail::__is_reverse_view, reverse_view,
217 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
218 ranges::views::elements, ranges::views::keys, ranges::views::values):
219 Define.
220 (views): Alias for ranges::views.
221 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
222 tuple_element<1, ranges::subrange>): New partial specializations.
cba9ef06
PP
223 * testsuite/std/ranges/adaptors/all.cc: New test.
224 * testsuite/std/ranges/adaptors/common.cc: Likewise.
225 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
226 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
227 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
228 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
229 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
230 * testsuite/std/ranges/adaptors/join.cc: Likewise.
231 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
232 * testsuite/std/ranges/adaptors/split.cc: Likewise.
233 * testsuite/std/ranges/adaptors/take.cc: Likewise.
234 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
235 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
236
5713834e
JW
2372020-02-07 Jonathan Wakely <jwakely@redhat.com>
238
0d57370c
JW
239 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
240 type of enumerations and comparison category types.
241 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
242 (__cmp_cat::_Ncmp::unordered): Change value to 2.
243 (partial_ordering::_M_value, weak_ordering::_M_value)
244 (strong_ordering::_M_value): Change type to __cmp_cat::type.
245 (partial_ordering::_M_is_ordered): Remove data member.
246 (partial_ordering): Use second bit of _M_value for unordered. Adjust
247 comparison operators.
248 (weak_ordering::operator partial_ordering): Simplify to remove
249 branches.
250 (operator<=>(unspecified, weak_ordering)): Likewise.
251 (strong_ordering::operator partial_ordering): Likewise.
252 (strong_ordering::operator weak_ordering): Likewise.
253 (operator<=>(unspecified, strong_ordering)): Likewise.
254 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
255 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
256 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
257
5713834e
JW
258 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
259 __cpp_lib_three_way_comparison macro and use deduced return type for
260 operator<=>.
261 * testsuite/std/ranges/iota/iterator.cc: New test.
262
bc464641
PP
2632020-02-07 Patrick Palka <ppalka@redhat.com>
264 Jonathan Wakely <jwakely@redhat.com>
265
266 Implement C++20 constrained algorithms
267 * include/Makefile.am: Add new header.
268 * include/Makefile.in: Regenerate.
269 * include/std/algorithm: Include <bits/ranges_algo.h>.
270 * include/bits/ranges_algo.h: New file.
271 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
272 * testsuite/25_algorithms/all_of/constrained.cc: New test.
273 * testsuite/25_algorithms/any_of/constrained.cc: New test.
274 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
275 * testsuite/25_algorithms/copy/constrained.cc: New test.
276 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
277 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
278 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
279 * testsuite/25_algorithms/count/constrained.cc: New test.
280 * testsuite/25_algorithms/count_if/constrained.cc: New test.
281 * testsuite/25_algorithms/equal/constrained.cc: New test.
282 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
283 * testsuite/25_algorithms/fill/constrained.cc: New test.
284 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
285 * testsuite/25_algorithms/find/constrained.cc: New test.
286 * testsuite/25_algorithms/find_end/constrained.cc: New test.
287 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
288 * testsuite/25_algorithms/find_if/constrained.cc: New test.
289 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
290 * testsuite/25_algorithms/for_each/constrained.cc: New test.
291 * testsuite/25_algorithms/generate/constrained.cc: New test.
292 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
293 * testsuite/25_algorithms/heap/constrained.cc: New test.
294 * testsuite/25_algorithms/includes/constrained.cc: New test.
295 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
296 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
297 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
298 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
299 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
300 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
301 test.
302 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
303 * testsuite/25_algorithms/max/constrained.cc: New test.
304 * testsuite/25_algorithms/max_element/constrained.cc: New test.
305 * testsuite/25_algorithms/merge/constrained.cc: New test.
306 * testsuite/25_algorithms/min/constrained.cc: New test.
307 * testsuite/25_algorithms/min_element/constrained.cc: New test.
308 * testsuite/25_algorithms/minmax/constrained.cc: New test.
309 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
310 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
311 * testsuite/25_algorithms/move/constrained.cc: New test.
312 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
313 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
314 * testsuite/25_algorithms/none_of/constrained.cc: New test.
315 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
316 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
317 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
318 * testsuite/25_algorithms/partition/constrained.cc: New test.
319 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
320 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
321 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
322 * testsuite/25_algorithms/remove/constrained.cc: New test.
323 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
324 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
325 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
326 * testsuite/25_algorithms/replace/constrained.cc: New test.
327 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
328 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
329 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
330 * testsuite/25_algorithms/reverse/constrained.cc: New test.
331 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
332 * testsuite/25_algorithms/rotate/constrained.cc: New test.
333 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
334 * testsuite/25_algorithms/search/constrained.cc: New test.
335 * testsuite/25_algorithms/search_n/constrained.cc: New test.
336 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
337 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
338 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
339 test.
340 * testsuite/25_algorithms/set_union/constrained.cc: New test.
341 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
342 * testsuite/25_algorithms/sort/constrained.cc: New test.
343 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
344 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
345 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
346 * testsuite/25_algorithms/transform/constrained.cc: New test.
347 * testsuite/25_algorithms/unique/constrained.cc: New test.
348 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
349 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
350
d1aa7705
JW
3512020-02-06 Jonathan Wakely <jwakely@redhat.com>
352
bd630df0
JW
353 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
354 number in comment. Fix indentation.
355
d1aa7705
JW
356 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
357 redundant _GLIBCXX20_CONSTEXPR.
358
26eae9ac
JW
359 * include/std/ranges (viewable_range): Replace decay_t with
360 remove_cvref_t (LWG 3375).
361
269e8130
JW
3622020-02-05 Jonathan Wakely <jwakely@redhat.com>
363
364 * include/bits/iterator_concepts.h (iter_reference_t)
365 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
366 Remove workarounds for PR c++/67704.
367 * testsuite/24_iterators/aliases.cc: New test.
368
7db12d15
PP
3692020-02-05 Patrick Palka <ppalka@redhat.com>
370
371 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
372 when initializing _M_current.
373 (move_iterator::base): Split into two overloads differing in
374 ref-qualifiers as in P1207R4 for C++20.
375
9962493c
JW
3762020-02-04 Jonathan Wakely <jwakely@redhat.com>
377
9bc5bea1
JW
378 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
379 use.
380
9962493c
JW
381 PR libstdc++/93562
382 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
383 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
384 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
385
20fa702b
AB
3862020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
387
388 * configure: Regenerate.
389
6e5a1963
PP
3902020-01-31 Patrick Palka <ppalka@redhat.com>
391
392 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
393 test_range::end() returns the same type as test_range::begin().
394 * testsuite/24_iterators/range_operations/next.cc: Likewise.
395 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
396 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
397 Always return a sentinel<I>.
398
5cd2e126
JW
3992020-01-29 Jonathan Wakely <jwakely@redhat.com>
400
0a8f4feb
JW
401 PR libstdc++/92895
402 * include/std/stop_token (stop_token::stop_possible()): Call new
403 _M_stop_possible() function.
404 (stop_token::stop_requested()): Do not use stop_possible().
405 (stop_token::binary_semaphore): New class, as temporary stand-in for
406 std::binary_semaphore.
407 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
408 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
409 New data members for symchronization with stop_callback destruction.
410 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
411 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
412 Remove.
413 (stop_token::_Stop_cb::_M_run): New member function.
414 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
415 Remove.
416 (stop_token::_Stop_state::_M_owners): New data member to track
417 reference count for ownership.
418 (stop_token::_Stop_state::_M_value): New data member combining a
419 spinlock, the stop requested flag, and the reference count for
420 associated stop_source objects.
421 (stop_token::_Stop_state::_M_requester): New data member for
422 synchronization with stop_callback destruction.
423 (stop_token::_Stop_state::_M_stop_possible()): New member function.
424 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
425 of _M_value.
426 (stop_token::_Stop_state::_M_add_owner)
427 (stop_token::_Stop_state::_M_release_ownership)
428 (stop_token::_Stop_state::_M_add_ssrc)
429 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
430 updating reference counts.
431 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
432 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
433 (stop_token::_Stop_state::_M_try_lock)
434 (stop_token::_Stop_state::_M_try_lock_and_stop)
435 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
436 managing spinlock.
437 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
438 read and update state. Release lock while running callbacks. Use new
439 data members to synchronize with callback destruction.
440 (stop_token::_Stop_state::_M_remove_callback): Likewise.
441 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
442 to read and update state.
443 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
444 replacing shared_ptr.
445 (stop_source::stop_source(const stop_source&)): Update reference count.
446 (stop_source::operator=(const stop_source&)): Likewise.
447 (stop_source::~stop_source()): Likewise.
448 (stop_source::stop_source(stop_source&&)): Define as defaulted.
449 (stop_source::operator=(stop_source&&)): Establish postcondition on
450 parameter.
451 (stop_callback): Enforce preconditions on template parameter. Replace
452 base class with data member of new _Cb_impl type.
453 (stop_callback::stop_callback(const stop_token&, Cb&&))
454 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
455 (stop_callback::_Cb_impl): New type wrapping _Callback member and
456 defining the _S_execute member function.
457 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
458 test.
459 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
460 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
461 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
462 New test.
463 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
464 test.
465 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
466 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
467 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
468 test.
469
f214ffb3
JW
470 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
471 three_way_comparable_with.
472 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
473 (compare_three_way::operator()): Remove redundant constraint from
474 requires-clause.
475 (__detail::_Synth3way::operator()): Use three_way_comparable_with
476 instead of workaround.
477 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
478 output due to simplified constraints on compare_three_way::operator().
479
83b02010
JW
480 PR libstdc++/93479
481 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
482 * testsuite/18_support/comparisons/object/93479.cc: New test.
483
5cd2e126
JW
484 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
485 returns the same type as test_range::begin(). Add comments.
486 * testsuite/std/ranges/access/rbegin.cc: Likewise.
487 * testsuite/std/ranges/access/rend.cc: Likewise.
488 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
489 test_range is the same as its iterator type.
490 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
491 operator- overloads to satisfy sized_sentinel_for when the iterator
492 satisfies random_access_iterator.
493
759812fd
JW
4942020-01-28 Jonathan Wakely <jwakely@redhat.com>
495
72a9fd20
JW
496 PR libstdc++/93470
497 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
498 static assertion to object types.
499
759812fd
JW
500 PR libstdc++/93325
501 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
502 clock_gettime instead of explicit glibc version check.
503 * configure: Regenerate.
504
a5d81aaa
JW
5052020-01-28 Martin Liska <mliska@suse.cz>
506
507 PR libstdc++/93478
508 * include/std/atomic: Fix typo.
509 * include/std/optional: Likewise.
510
5112020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
512
513 * configure: Regenerate.
514
389cd88c
JW
5152020-01-27 Jonathan Wakely <jwakely@redhat.com>
516
517 PR libstdc++/93426
518 * include/std/span (span): Fix deduction guide.
519 * testsuite/23_containers/span/deduction.cc: New test.
520
482eeff5
JW
5212020-01-24 Jonathan Wakely <jwakely@redhat.com>
522
523 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
524 (__cmp_cat::_Ord::equivalent): Add enumerator.
525 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
526 and greater.
527 (partial_ordering, weak_ordering, strong_ordering): Remove
528 constructors taking __cmp_cat::_Eq parameters. Use renamed
529 enumerators.
530
e8e66971
MR
5312020-01-24 Maciej W. Rozycki <macro@wdc.com>
532
533 * acinclude.m4: Handle `--with-toolexeclibdir='.
534 * Makefile.in: Regenerate.
535 * aclocal.m4: Regenerate.
536 * configure: Regenerate.
537 * doc/Makefile.in: Regenerate.
538 * include/Makefile.in: Regenerate.
539 * libsupc++/Makefile.in: Regenerate.
540 * po/Makefile.in: Regenerate.
541 * python/Makefile.in: Regenerate.
542 * src/Makefile.in: Regenerate.
543 * src/c++11/Makefile.in: Regenerate.
544 * src/c++17/Makefile.in: Regenerate.
545 * src/c++98/Makefile.in: Regenerate.
546 * src/filesystem/Makefile.in: Regenerate.
547 * testsuite/Makefile.in: Regenerate.
548
7a900bce
AO
5492020-01-23 Alexandre Oliva <oliva@adacore.com>
550
f9e84b31
AO
551 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
552 * configure: Rebuild.
553
7a900bce
AO
554 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
555
04681fca
JW
5562020-01-23 Jonathan Wakely <jwakely@redhat.com>
557
558 PR libstdc++/91947
559 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
560 rule.
561 * include/Makefile.in: Regenerate.
562
c784f162
JW
5632020-01-20 Jonathan Wakely <jwakely@redhat.com>
564
565 * doc/xml/faq.xml: Fix grammar.
566 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
567 * doc/xml/manual/spine.xml: Update copyright years.
568 * doc/html/*: Regenerate.
569
f4d83eba
ER
5702020-01-19 Eric S. Raymond <esr@thyrsus.com>
571
572 * doc/xml/faq.xml: Update for SVN -> Git transition.
573 * doc/xml/manual/appendix_contributing.xml: Likewise.
574 * doc/xml/manual/status_cxx1998.xml: Likewise.
575 * doc/xml/manual/status_cxx2011.xml: Likewise.
576 * doc/xml/manual/status_cxx2014.xml: Likewise.
577 * doc/xml/manual/status_cxx2017.xml: Likewise.
578 * doc/xml/manual/status_cxx2020.xml: Likewise.
579 * doc/xml/manual/status_cxxtr1.xml: Likewise.
580 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
581
49789fd0
IS
5822020-01-18 Iain Sandoe <iain@sandoe.co.uk>
583
584 * include/Makefile.am: Add coroutine to the std set.
585 * include/Makefile.in: Regenerated.
586 * include/std/coroutine: New file.
587
0ba6a850
JW
5882020-01-17 Jonathan Wakely <jwakely@redhat.com>
589
590 PR libstdc++/92376
591 * include/bits/c++config: Only do PSTL config when the header is
592 present, to fix freestanding.
593 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
594 functions if they were detected by configure.
595
98d56ea8
JW
5962020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
597 Matthew Bauer <mjbauer95@gmail.com>
598 Jonathan Wakely <jwakely@redhat.com>
599
600 PR bootstrap/64271 (partial)
601 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
602 to unsigned short.
603 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
604 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
605 definitions with NetBSD upstream.
606 (ctype_base::blank): Use _CTYPE_BL.
607 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
608 Declaration.
609 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
610 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
611 parameters to unsigned char.
612 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
613
d9165389
FD
6142020-01-16 François Dumont <fdumont@gcc.gnu.org>
615
616 PR libstdc++/91263
617 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
618 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
619 (_Equality_base): Remove.
620 (_Equality<>::_M_equal): Review implementation. Use
621 std::is_permutation.
622 * testsuite/23_containers/unordered_multiset/operators/1.cc
623 (Hash, Equal, test02, test03): New.
624 * testsuite/23_containers/unordered_set/operators/1.cc
625 (Hash, Equal, test02, test03): New.
626
2a0f6c61
JW
6272020-01-15 Jonathan Wakely <jwakely@redhat.com>
628
629 PR libstdc++/93267
630 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
631 Move here from <bits/range_access.h> and define using __int128 when
632 available.
633 (__is_integer_like, __is_signed_integer_like): Move here from
634 <bits/range_access.h>.
635 (weakly_incrementable): Use __is_signed_integer_like.
636 * include/bits/range_access.h (__max_diff_type, __max_size_type)
637 (__is_integer_like, __is_signed_integer_like): Move to
638 <bits/iterator_concepts.h>.
639 (__make_unsigned_like_t): Move here from <ranges>.
640 * include/std/ranges (__make_unsigned_like_t): Move to
641 <bits/range_access.h>.
642 (iota_view): Replace using-directive with using-declarations.
643 * testsuite/std/ranges/iota/93267.cc: New test.
644 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
645
e4379a93
JW
6462020-01-13 Jonathan Wakely <jwakely@redhat.com>
647
fe7cc34f
JW
648 PR libstdc++/93244
649 * include/bits/fs_path.h (path::generic_string<C,A>)
650 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
651 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
652 root-dir is converted to forward slash in generic pathname.
653 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
654 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
655
e4379a93
JW
656 PR libstdc++/58605
657 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
658 Define.
659 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
660 (__atomic_float): Add default member initializer for C++20.
661 * include/std/atomic (atomic): Likewise.
662 (atomic::atomic()): Remove noexcept-specifier on default constructor.
663 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
664 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
665 number.
666 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
667 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
668 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
669 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
670 expected result for is_trivially_default_constructible.
671 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
672 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
673 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
674 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
675 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
676 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
677 expected results for is_trivially_default_constructible.
678 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
679 new test generator.
680
7918cb93
JW
6812020-01-10 Jonathan Wakely <jwakely@redhat.com>
682
68be73fc
JW
683 * testsuite/util/testsuite_iterators.h: Improve comment.
684
78f02e80
JW
685 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
686 initialization syntax.
687
7918cb93
JW
688 PR libstdc++/92285
689 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
690 of base class independent of __cplusplus value.
691 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
692 type defined in the base class
693 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
694 * testsuite/24_iterators/istreambuf_iterator/requirements/
695 base_classes.cc: Adjust expected base class for C++98.
696
acd43917
OH
6972020-01-09 Olivier Hainque <hainque@adacore.com>
698
699 * doc/xml/manual/appendix_contributing.xml: Document _C2
700 as a reserved identifier, by VxWorks.
701 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
702 * include/bits/stl_multimap.h: Likewise.
703
caa39b2e
JW
7042020-01-09 Jonathan Wakely <jwakely@redhat.com>
705
1a788638
JW
706 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
707 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
708 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
709 partial specialization to disambiguate the two constrained
710 specializations.
711
caa39b2e
JW
712 * include/experimental/type_traits (experimental::is_pod_v): Disable
713 -Wdeprecated-declarations warnings around reference to std::is_pod.
714 * include/std/type_traits (is_pod_v): Likewise.
715 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
716 is_standard_layout and is_trivial. Do not check is_pod for C++20.
717 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
718 Add -Wno-deprecated for C++20.
719 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
720 * testsuite/20_util/is_pod/value.cc: Likewise.
721 * testsuite/experimental/type_traits/value.cc: Likewise.
722
1a6c5064
JTM
7232020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
724
725 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
726 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
727 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
728
d574c8aa
JW
7292020-01-09 Jonathan Wakely <jwakely@redhat.com>
730
160e95dc
JW
731 PR libstdc++/93205
732 * include/bits/random.h (operator>>): Check stream operation succeeds.
733 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
734 typedefs.
735 (operator>>): Remove redundant __istream_type typedefs. Check stream
736 operations succeed.
737 (__extract_params): New function to fill a vector from a stream.
738 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
739
d574c8aa
JW
740 PR libstdc++/93208
741 * config/abi/pre/gnu.ver: Add new exports.
742 * include/std/memory_resource (memory_resource::~memory_resource()):
743 Do not define inline.
744 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
745 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
746 Define.
747 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
748 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
749
b9c84e95
FD
7502020-01-09 François Dumont <fdumont@gcc.gnu.org>
751
752 PR libstdc++/92124
753 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
754 template alias.
755 (_Hashtable<>::__fwd_value_for): New.
756 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
757 parameter.
758 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
759 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
760 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
761 with std::move.
762 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
763 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
764 Adapt.
765 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
766 Adapt.
767 * testsuite/23_containers/unordered_set/92124.cc: New.
768
fff148b7
JW
7692020-01-08 Jonathan Wakely <jwakely@redhat.com>
770
771 PR libstdc++/93201
772 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
773 detailed error reporting for remove_all. Check result of recursive
774 call before incrementing iterator.
775 (remove_all(const path&), remove_all(const path&, error_code&)): Use
776 do_remove_all.
777 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
778 result of recursive call before incrementing iterator.
779 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
780 are reported correctly.
781 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
782
9e3c1eb7
TR
7832020-01-07 Thomas Rodgers <trodgers@redhat.com>
784
785 * include/std/condition_variable
786 (condition_variable_any::wait_on): Rename to match current draft
787 standard.
788 (condition_variable_any::wait_on_until): Likewise.
789 (condition_variable_any::wait_on_for): Likewise.
790 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
791 Adjust tests to account for renamed methods.
792
6af8819b
FD
7932020-01-07 François Dumont <fdumont@gcc.gnu.org>
794
795 PR libstdc++/92124
796 * include/bits/stl_tree.h
797 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
798 std::move_if_noexcept by std::move.
799 * testsuite/23_containers/map/92124.cc: New.
800 * testsuite/23_containers/set/92124.cc: New.
801
f31a99f7
JW
8022020-01-06 Jonathan Wakely <jwakely@redhat.com>
803
a4a1f965
JW
804 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
805 (stop_source): Likewise (LWG 3362).
806 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
807 comparisons.
808
f31a99f7
JW
809 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
810 (lexicographical_compare_three_way): Do not depend on
811 __cpp_lib_concepts.
812 * include/std/version (__cpp_lib_three_way_comparison): Only define
813 when __cpp_lib_concepts is defined.
814 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
815
b4e70137
JW
8162020-01-03 Jonathan Wakely <jwakely@redhat.com>
817
818 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
819 Only define four-argument overload when __cpp_lib_concepts is defined.
820
a8497ec6
JDA
8212020-01-01 John David Anglin <danglin@gcc.gnu.org>
822
823 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
824
8d9254fc 8252020-01-01 Jakub Jelinek <jakub@redhat.com>
5624e564
JJ
826
827 Update copyright years.
b4df5e92 828\f
8d9254fc 829Copyright (C) 2020 Free Software Foundation, Inc.
b4df5e92
JW
830
831Copying and distribution of this file, with or without modification,
832are permitted in any medium without royalty provided the copyright
833notice and this notice are preserved.
This page took 0.875465 seconds and 5 git commands to generate.