]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/ChangeLog
Daily bump.
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
bd55ce63
JDA
12020-02-29 John David Anglin <danglin@gcc.gnu.org>
2
566f544c
JDA
3 * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
4 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
5 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
6 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
7 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
8
bd55ce63
JDA
9 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
10 Add libatomic option.
11 * testsuite/30_threads/jthread/jthread.cc: Likewise.
12
44c85722
FD
132020-02-29 François Dumont <fdumont@gcc.gnu.org>
14
15 * include/bits/stl_algo.h
16 (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
17 * include/bits/stl_algobase.h: ...here.
18 * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
19
d4912dc7
JDA
202020-02-29 John David Anglin <danglin@gcc.gnu.org>
21
68a1a11f
JDA
22 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
23 option.
24 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
25 Likewise.
26 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
27 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
28 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
29 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
30 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
31 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
32 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
33 Likewise.
34
d4912dc7
JDA
35 PR libstdc++/92906
36 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
37
799270b4
PP
382020-02-28 Patrick Palka <ppalka@redhat.com>
39
ce33801f
PP
40 PR libstdc++/93972
41 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
42 Fix condition for when to use memcmp, making it consistent with the
43 corresponding condition used in std::lexicographical_compare.
44 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
45
799270b4
PP
46 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
47 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
48 existing signatures for C++2a.
49
4735f92d
JW
502020-02-28 Jonathan Wakely <jwakely@redhat.com>
51
52 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
53 test instead of just compiling it.
54
a1535015
PP
552020-02-28 Patrick Palka <ppalka@redhat.com>
56
77e596cf
PP
57 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
58 whenever the underlying range models common_range.
59
a1535015
PP
60 * include/std/ranges (__detail::_CachedPosition): New struct.
61 (views::filter_view::_S_needs_cached_begin): New member variable.
62 (views::filter_view::_M_cached_begin): New member variable.
63 (views::filter_view::begin): Use _M_cached_begin to cache its
64 result.
65 (views::drop_view::_S_needs_cached_begin): New static member variable.
66 (views::drop_view::_M_cached_begin): New member variable.
67 (views::drop_view::begin): Use _M_cached_begin to cache its result
68 when _S_needs_cached_begin.
69 (views::drop_while_view::_M_cached_begin): New member variable.
70 (views::drop_while_view::begin): Use _M_cached_begin to cache its
71 result.
72 (views::reverse_view::_S_needs_cached_begin): New static member
73 variable.
74 (views::reverse_view::_M_cached_begin): New member variable.
75 (views::reverse_view::begin): Use _M_cached_begin to cache its result
76 when _S_needs_cached_begin.
77 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
78 drop_view::begin caches its result.
79 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
80 that drop_while_view::begin caches its result.
81 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
82 filter_view::begin caches its result.
83 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
84 reverse_view::begin caches its result.
85
86e2dc22
JW
862020-02-28 Jonathan Wakely <jwakely@redhat.com>
87
a51a546c
JW
88 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
89 filesystems that silently truncate timestamps.
90 * testsuite/experimental/filesystem/operations/last_write_time.cc:
91 Likewise.
92
86e2dc22
JW
93 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
94 -Wstringop-overflow warnings.
95
44949494
JW
962020-02-27 Jonathan Wakely <jwakely@redhat.com>
97
98 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
99 -fdiagnostics-urls=never to options.
100
10a32d47
PP
1012020-02-27 Patrick Palka <ppalka@redhat.com>
102
ba49e9eb
PP
103 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
104 _Iterator<!_Const>.
105 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
106 (take_view::_Sentinel<_Const>): Likewise.
107 (take_while_view::_Sentinel<_Const>): Likewise.
108 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
109 * testsuite/std/ranges/adaptors/split.cc: Augment test.
110 * testsuite/std/ranges/adaptors/take.cc: Augment test.
111 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
112 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
113
10a32d47
PP
114 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
115 base() of a vector<>::iterator is a pointer.
116 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
117 * testsuite/25_algorithms/move/constrained.cc: Likewise.
118 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
119 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
120 instead of &foo[0].
121 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
122 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
123 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
124 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
125 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
126
eb8e6a30
JW
1272020-02-27 Jonathan Wakely <jwakely@redhat.com>
128
ae705159
JW
129 * include/debug/array (operator<=>): Define for C++20.
130 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
131 Adjust dg-error line numbers.
132 * testsuite/23_containers/array/tuple_interface/
133 tuple_element_debug_neg.cc: Likewise.
134
b112e3cb
JW
135 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
136 defining _GLIBCXX_ASSERTIONS.
137 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
138 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
139 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
140 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
141 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
142 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
143 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
144 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
145 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
146 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
147 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
148 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
149
f32a3662
JW
150 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
151 C++98 where the member function of the base class returns void.
152
e94f2542
JW
153 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
154 equality comparisons that support value-initialized iterators.
155
eb8e6a30
JW
156 * include/bits/boost_concept_check.h (__function_requires): Add
157 _GLIBCXX14_CONSTEXPR.
158 * testsuite/25_algorithms/min/concept_checks.cc: New test.
159
fd335985
PP
1602020-02-26 Patrick Palka <ppalka@redhat.com>
161
8ce13842
PP
162 PR libstdc++/93936
163 * include/std/ranges (split_view::_InnerIter::operator==): Compare
164 the operands' _M_i rather than their _M_i.current().
165 * testsuite/std/ranges/adaptors/split.cc: Augment test.
166
fd335985
PP
167 P1645R1 constexpr for <numeric> algorithms
168 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
169 partial_sum, adjacent_difference): Make conditionally constexpr for
170 C++20.
171 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
172 test macro.
173 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
174 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
175 constexpr for C++20.
176 * include/std/version (__cpp_lib_constexpr_numeric): Define.
177 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
178 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
179 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
180 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
181 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
182 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
183 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
184 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
185 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
186 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
187 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
188
8017d95c
JW
1892020-02-26 Jonathan Wakely <jwakely@redhat.com>
190
113f0a63
JW
191 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
192 variables in smaller scope and avoid calling ranges::distance when we
193 know they are pointers. Remove statically-unreachable use of
194 __builtin_unreachable().
195 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
196 Define inline.
197
8017d95c
JW
198 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
199 alias.
200 (__detail::__maybe_const_t): Likewise.
201 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
202 (transform_view, take_view, take_while_view, elements_view): Use
203 __maybe_const_t.
204 (join_view, split_view): Use both.
205
7f0f1083
PP
2062020-02-25 Patrick Palka <ppalka@redhat.com>
207
76a8c0f6
PP
208 LWG 3397 basic_istream_view::iterator should not provide
209 iterator_category
210 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
211 Rename to ...
212 (basic_istream_view:_Iterator::iterator_concept): ... this.
213 * testsuite/std/ranges/istream_view.cc: Augment test.
214
ec15da7c
PP
215 LWG 3325 Constrain return type of transformation function for
216 transform_view
217 * include/std/ranges (transform_view): Constrain the return type of the
218 transformation function as per LWG 3325.
219 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
220
55c4b3f4
PP
221 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
222 * include/std/ranges (join_view::_Iterator::operator--): Require that
223 range_reference_t<_Base> models common_range.
224 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
225
510bd1c1
PP
226 LWG 3301 transform_view::_Iterator has incorrect iterator_category
227 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
228 determination of iterator_category as per LWG 3301.
229 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
230
7f0f1083
PP
231 LWG 3292 iota_view is under-constrained
232 * include/std/ranges (iota_view): Require that _Winc models semiregular
233 as per LWG 3292.
234 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
235
dfb93d05 2362020-02-25 Jonathan Wakely <jwakely@redhat.com>
5b904f17 237
490350a1
JW
238 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
239 during constant evaluation. Call __builtin_memmove directly instead of
240 __memmove.
241 (__copy_or_move_backward): Likewise.
242 * include/bits/stl_algobase.h (__memmove): Remove.
243 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
244 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
245 Use __builtin_memmove directly instead of __memmove.
246 (__copy_move_a2): Do not use memmove during constant evaluation.
247 (__copy_move_backward_a2): Use _IsMove constant to select correct
248 __copy_move_backward specialization.
249 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
250 begin turned into moves during constant evaluation.
251
6de946e6
JW
252 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
253 previous commit.
254
5b904f17
JW
255 PR libstdc++/93872
256 * include/bits/stl_algobase.h (__memmove): Cast away const before
257 doing move assignment.
258 * testsuite/25_algorithms/move/93872.cc: New test.
259 * testsuite/25_algorithms/move_backward/93872.cc: New test.
260
c5eab4ed
PP
2612020-02-24 Patrick Palka <ppalka@redhat.com>
262
85c143d0
PP
263 PR libstdc++/93884
264 * include/bits/ranges_algobase.h (__copy_or_move,
265 __copy_or_move_backward): Don't inspect the iter_value_t of the output
266 iterator, instead inspect its iterator_traits directly.
267 * include/bits/stl_iterator.h (back_insert_iterator::container):
268 Conditionally initialize.
269 (back_insert_iterator::difference_type): Conditionally define.
270 (back_insert_iterator::back_insert_iterator): Conditionally define this
271 default constructor.
272 (front_insert_iterator::container): Conditionally initialize.
273 (front_insert_iterator::difference_type): Conditionally define.
274 (front_insert_iterator::front_insert_iterator): Conditionally define
275 this default constructor.
276 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
277 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
278
c5eab4ed
PP
279 P0769R2 Add shift to <algorithm>
280 * include/bits/ranges_algo.h (shift_left, shift_right): New.
281 * testsuite/25_algorithms/shift_left/1.cc: New test.
282 * testsuite/25_algorithms/shift_right/1.cc: New test.
283
3841739c
JW
2842020-02-24 Jonathan Wakely <jwakely@redhat.com>
285
8566286e
JW
286 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
287 Make noexcept-specifier conditional.
288 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
289 noexcept-specifier.
290
120e8734
JW
291 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
292 Add constructor.
293 (operator==(istream_iterator, default_sentinel_t)): Add operator.
294 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
295 * include/bits/streambuf_iterator.h
296 (istreambuf_iterator(default_sentinel_t)): Add constructor.
297 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
298 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
299 New test.
300 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
301 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
302 New test.
303 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
304
3841739c
JW
305 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
306 (ranges::enable_view): Simplify (LWG 3326).
307 * include/bits/range_access.h (ranges::enable_view): Declare.
308 * include/bits/regex.h (__enable_view_impl): Remove partial
309 specialization.
310 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
311 * include/bits/stl_set.h (__enable_view_impl): Likewise.
312 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
313 * include/debug/multiset.h (__enable_view_impl): Likewise.
314 * include/debug/set.h (__enable_view_impl): Likewise.
315 * include/debug/unordered_set (__enable_view_impl): Likewise.
316 * include/experimental/string_view (ranges::enable_view): Define
317 partial specialization.
318 * include/std/span (ranges::enable_view): Likewise.
319 * include/std/string_view (ranges::enable_view): Likewise.
320 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
321
9e589880
JW
3222020-02-21 Jonathan Wakely <jwakely@redhat.com>
323
324 * include/std/optional (operator<=>(optional<T>, optional<U>))
325 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
326 Define for C++20.
327 * include/std/tuple (__tuple_cmp): New helper function for <=>.
328 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
329 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
330 (operator<=>(monostate, monostate)): Define for C++20.
331 * testsuite/20_util/optional/relops/three_way.cc: New test.
332 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
333 * testsuite/20_util/variant/89851.cc: Move to ...
334 * testsuite/20_util/variant/relops/89851.cc: ... here.
335 * testsuite/20_util/variant/90008.cc: Move to ...
336 * testsuite/20_util/variant/relops/90008.cc: ... here.
337 * testsuite/20_util/variant/relops/three_way.cc: New test.
338
5586e506
PP
3392020-02-20 Patrick Palka <ppalka@redhat.com>
340
6e63438a
PP
341 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
342 function.
343 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
344 __maybe_refwrap to capture lvalue references by reference, and then use
345 unwrap_reference_t to forward the by-reference captures as references.
346 * testsuite/std/ranges/adaptors/split.cc: Augment test.
347 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
348
5586e506
PP
349 * include/std/ranges (iota_view): Forward declare _Sentinel.
350 (iota_view::_Iterator): Befriend _Sentinel.
351 (iota_view::_Sentinel::_M_equal): New member function.
352 (iota_view::_Sentinel::operator==): Use it.
353 (views::_Iota::operator()): Forward __f using the correct type.
354 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
355 with integers of different signedness, to appease iota_view's deduction
356 guide.
357 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
358
c7b591f3
JW
3592020-02-20 Jonathan Wakely <jwakely@redhat.com>
360
e817c23f
JW
361 * include/bits/range_access.h (ranges::begin): Reject array of
362 incomplete type.
363 (ranges::end, ranges::size): Require arrays to be bounded.
364 (ranges::data): Require lvalue or borrowed_range.
365 (ranges::iterator_t): Remove constraint.
366 * testsuite/std/ranges/access/begin.cc: Do not check array of
367 incomplete type.
368 * testsuite/std/ranges/access/begin_neg.cc: New test.
369 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
370 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
371 * testsuite/std/ranges/access/ssize.cc: Do not check array of
372 incomplete type.
373
4be779f5
JW
374 * include/std/system_error (error_category::operator<=>)
375 (operator<=>(const error_code&, const error_code&))
376 (operator<=>(const error_condition&, const error_condition&)): Define
377 for C++20.
378 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
379 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
380 test.
381 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
382 incorrect comment.
383 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
384 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
385 incorrect comment.
386 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
387 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
388 incorrect comment.
389 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
390 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
391 Remove incorrect comment.
392 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
393 test.
394
20fa41e6
JW
395 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
396
c7b591f3
JW
397 * include/std/thread (thread::id::operator<=>): Define for C++20.
398 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
399 functions in namespace std.
400 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
401
38c7b74d
PP
4022020-02-19 Patrick Palka <ppalka@redhat.com>
403
404 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
405 null terminator of the underlying string as part of the test_range.
406 (main): Call test03.
407
a45fb21a
JW
4082020-02-19 Jonathan Wakely <jwakely@redhat.com>
409
1b425f3a
JW
410 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
411 requirement (LWG 3385).
412 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
413 expected declaration.
414
7433536b
JW
415 * include/std/ranges (take_while_view, drop_view, drop_while_view)
416 (elements_view:_Iterator): Initialize data members (LWG 3364).
417
256f67aa
JW
418 * libsupc++/compare (three_way_comparable): Remove always-false check
419 that should have been removed with weak_equality (P1959R0).
420 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
421
0294dc5f
JW
422 * include/std/concepts (__detail::__partially_ordered_with): Move here
423 from <compare>.
424 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
425 to simplify definition (LWG 3331).
426 * libsupc++/compare (__detail::__partially_ordered_with): Move to
427 <concepts>.
428
241ed965
JW
429 * include/std/concepts (totally_ordered_with): Remove redundant
430 requirement (LWG 3329).
431
77f5310f
JW
432 * include/std/ranges (__detail::__convertible_to_non_slicing): New
433 helper concept.
434 (__detail::__pair_like_convertible_to): Remove.
435 (__detail::__pair_like_convertible_from): Add requirements for
436 non-slicing conversions.
437 (subrange): Constrain constructors with __convertible_to_non_slicing.
438 Remove constructors from pair-like types. Add new deduction guide.
439 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
440
59aa9e57
JW
441 * include/bits/iterator_concepts.h (iter_move): Add declaration to
442 prevent unqualified lookup finding a suitable declaration (LWG 3247).
443
e89100ef
JW
444 * include/std/memory_resource (polymorphic_allocator::allocate)
445 (polymorphic_allocator::allocate_object): Change type of exception to
446 bad_array_new_length (LWG 3237).
447 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
448
bb54e0b8
JW
449 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
450 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
451 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
452 * testsuite/20_util/unwrap_reference/3.cc: New test.
453
5f031f97
JW
454 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
455 type during overload resolution, use static assert instead (LWG 3200).
456 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
457 incomplete type.
458 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
459
66ae31eb
JW
460 * include/std/span (span(T (&)[N])): Use non-deduced context to
461 prevent first parameter from interfering with class template argument
462 deduction (LWG 3369).
463 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
464 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
465 rvalues.
466
247f410b
JW
467 * include/std/span (span::const_iterator, span::const_reverse_iterator)
468 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
469 Remove (LWG 3320).
470 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
471 and cend.
472 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
473 Likewise.
474 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
475 constrained.cc: Likewise.
476 * testsuite/20_util/specialized_algorithms/
477 uninitialized_default_construct/constrained.cc: Likewise.
478 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
479 constrained.cc: Likewise.
480 * testsuite/20_util/specialized_algorithms/uninitialized_move/
481 constrained.cc: Likewise.
482 * testsuite/20_util/specialized_algorithms/
483 uninitialized_value_construct/constrained.cc: Likewise.
484
aca60ecf
JW
485 * include/bits/range_access.h (range_size_t): Define alias template.
486 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
487 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
488
4cc3b275
JW
489 * include/std/ranges (filter_view, transform_view, take_view)
490 (join_view, split_view, reverse_view): Remove commented-out converting
491 constructors (LWG 3280).
492
5f3641d0
JW
493 * include/std/memory (uninitialized_construct_using_allocator): Use
494 std::construct_at (LWG 3321).
495
020a03ee
JW
496 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
497 (polymorphic_allocator::allocate_object)
498 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
499
15411a64
JW
500 LWG 3379. "safe" in several library names is misleading
501 * include/bits/range_access.h (enable_safe_range): Rename to
502 enable_borrowed_range.
503 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
504 (safe_range): Rename to borrowed_range.
505 * include/bits/ranges_algo.h: Adjust to use new names.
506 * include/bits/ranges_algobase.h: Likewise.
507 * include/bits/ranges_uninitialized.h: Likewise.
508 * include/std/ranges: Likewise.
509 (safe_iterator_t): Rename to borrowed_iterator_t.
510 (safe_subrange_t): Rename to borrowed_subrange_t.
511 * include/std/span: Adjust to use new names.
512 * include/std/string_view: Likewise.
513 * include/experimental/string_view: Likewise.
514 * testsuite/std/ranges/access/begin.cc: Likewise.
515 * testsuite/std/ranges/access/cbegin.cc: Likewise.
516 * testsuite/std/ranges/access/cdata.cc: Likewise.
517 * testsuite/std/ranges/access/cend.cc: Likewise.
518 * testsuite/std/ranges/access/crbegin.cc: Likewise.
519 * testsuite/std/ranges/access/crend.cc: Likewise.
520 * testsuite/std/ranges/access/data.cc: Likewise.
521 * testsuite/std/ranges/access/end.cc: Likewise.
522 * testsuite/std/ranges/access/rbegin.cc: Likewise.
523 * testsuite/std/ranges/access/rend.cc: Likewise.
524 * testsuite/std/ranges/safe_range.cc: Likewise.
525 * testsuite/std/ranges/safe_range_types.cc: Likewise.
526 * testsuite/util/testsuite_iterators.h: Likewise.
527
fa89adaa
JW
528 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
529 (tuple_element<1, const subrange<I, S, K>>): Add partial
530 specializations (LWG 3398).
531 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
532
a45fb21a
JW
533 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
534 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
535 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
536
242b4fb7
PP
5372020-02-18 Patrick Palka <ppalka@redhat.com>
538
539 P1983R0 Wording for GB301, US296, US292, US291, and US283
540 * include/std/ranges (filter_view::pred): New member function.
541 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
542 P1983R0 fixes the highlighted issue in the same way.
543 (join_view::_Iterator<_Const>): Add friend
544 join_view::_Iterator<!_Const>.
545 (join_view::_M_inner): Remove mutable specifier, effectively reverting
546 the proposed wording changes of P3278.
547 (join_view::begin): Refine the condition for when to return a const
548 iterator.
549 (split_view::_OuterIter::_OuterIter): Adjust constraints.
550 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
551 exists and works.
552
f5b4dc38
JW
5532020-02-18 Jonathan Wakely <jwakely@redhat.com>
554
a5b213dd
JW
555 PR libstdc++/93818
556 * include/std/ranges (_RangeAdaptor): Add deduction guide.
557 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
558 iterator_t<_Vp>.
559 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
560 (transform_view::_Iterator): Add alias _Base_iter and use in place of
561 iterator_t<_Base>.
562 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
563 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
564 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
565 (split_view::_InnerIter::_S_iter_cat()): Likewise.
566
ce7b39d0
JW
567 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
568 assumption that long is wider than int.
569 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
570 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
571 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
572 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
573
9b8e2dea
JW
574 P1976R2 Fixed-size span construction from dynamic range
575 * include/std/span (__cpp_lib_span): Update value.
576 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
577 assertion.
578 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
579 constraints.
580 (span::first<Count>(), span::last<Count>()): Use explicit type in
581 return statement.
582 (as_bytes, as_writable_bytes): Likewise.
583 * include/std/version (__cpp_lib_span): Update value.
584 * testsuite/23_containers/span/1.cc: Check new value.
585 * testsuite/23_containers/span/2.cc: Check new value.
586 * testsuite/23_containers/span/explicit.cc: New test.
587
d6c9e372
JW
588 * include/std/span (span::__is_compatible_array): Simplify alias
589 template by using requires-clause.
590 (span::__is_compatible_ref): New alias template for constraining
591 constructors.
592 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
593 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
594 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
595 redundant parentheses.
596 (span(R&&)): Add missing constraints.
597
f09f3242
JW
598 * include/std/span (span): Reorder members and rename template
599 parameters to match declarations in the C++2a working paper.
600
f5b4dc38
JW
601 P2116R0 Remove tuple-like protocol support from fixed-extent span
602 * include/std/span (get, tuple_size, tuple_element): Remove.
603 * testsuite/23_containers/span/everything.cc: Remove checks for
604 tuple-like API.
605 * testsuite/23_containers/span/get_neg.cc: Remove.
606 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
607 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
608 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
609
f3169941
PP
6102020-02-17 Patrick Palka <ppalka@redhat.com>
611
aa667c3f
PP
612 P2106R0 Alternative wording for GB315 and GB316
613 * include/bits/ranges_algo.h (in_fun_result): New.
614 (for_each_result, for_each_n_result): Change into an alias of
615 in_fun_result.
616 (in_in_result): New.
617 (mismatch_result): Change into an alias of in_in_result.
618 (copy_if_result): Change into an alias of in_out_result.
619 (swap_ranges_result): Change into an alias of in_in_result.
620 (unary_transform_result): Change into an alias of in_out_result.
621 (in_in_out_result): New.
622 (binary_transform_result): Change into an alias of in_in_out_result.
623 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
624 remove_copy_result, unique_copy_result, reverse_copy_result,
625 rotate_copy_result, partial_sort_copy_result): Change into an alias of
626 in_out_result.
627 (in_out_out_result): New.
628 (partition_copy_result, merge_result): Change into an alias of
629 in_out_out_result.
630 (set_union_result, set_intersection_result): Change into an alias of
631 in_in_out_result.
632 (set_difference_result): Change into an alias of in_out_result.
633 (set_symmetric_difference): Change into an alias of in_in_out_result.
634 (min_max_result): New.
635 (minmax_result, minmax_element_result): Change into an alias of
636 min_max_result.
637 (in_found_result): New.
638 (next_permutation_result, prev_permutation_result): Change into an alias
639 of in_found_result.
640 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
641 Adjust following changes to next_permutation_result and
642 prev_permutation_result.
643 * include/bits/ranges_algobase.h (in_out_result): New.
644 (copy_result, move_result, move_backward_result, copy_backward_result,
645 copy_n_result): Change into an alias of in_out_result.
646 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
647 uninitialized_copy_n_result, uninitialized_move_result,
648 uninitialized_move_n_result): Likewise.
649 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
650 structured bindings.
651 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
652
f3169941
PP
653 P1243R4 Rangify new algorithms
654 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
655 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
656 * testsuite/25_algorithms/clamp/constrained.cc: New test.
657 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
658 * testsuite/25_algorithms/sample/constrained.cc: New test.
659
98cf2c26
JW
6602020-02-17 Jonathan Wakely <jwakely@redhat.com>
661
c5e1c1d3
JW
662 P1964R2 Wording for boolean-testable
663 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
664 (__adjacent_find_fn): Cast result of predicate to bool.
665 * include/std/concepts (__boolean): Remove.
666 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
667 new helper concepts.
668 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
669 (predicate): Use __boolean_testable instead of boolean.
670 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
671 Likewise.
672
7ab36231
JW
673 P1970R2 Consistency for size() functions: Add ranges::ssize
674 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
675 * testsuite/std/ranges/access/ssize.cc: New test.
676
9866abe3
JW
677 P1956R1 On the names of low-level bit manipulation functions
678 * include/bits/hashtable_policy.h: Update comment.
679 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
680 (ispow2, ceil2, floor2, log2p1): Likewise.
681 (__cpp_lib_int_pow2): Add feature test macro.
682 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
683 * include/std/memory (assume_aligned): Adjust use of ispow2.
684 * include/std/version (__cpp_lib_int_pow2): Add.
685 * libsupc++/new_opa.cc: Adjust use of __ispow2.
686 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
687 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
688 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
689 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
690 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
691 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
692 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
693 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
694 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
695 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
696 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
697 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
698
cfbc8fbb
JW
699 * include/std/charconv: Add comment.
700
9cd4eeef
JW
701 PR libstdc++/92546 (partial)
702 * include/bits/random.h (uniform_random_bit_generator): Move definition
703 to <bits/uniform_int_dist.h>.
704 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
705 of <bits/random.h>.
706 * include/bits/ranges_algobase.h: Do not include <cmath>.
707 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
708 Move here.
709 * include/std/ranges: Do not include <limits>.
710 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
711
c03b53da
JW
712 PR libstdc++/92546 (partial)
713 * include/Makefile.am: Add new header.
714 * include/Makefile.in: Regenerate.
715 * include/bits/int_limits.h: New header.
716 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
717 numeric_limits with __detail::__int_limits.
718 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
719 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
720 Likewise.
721 * include/std/charconv (__to_chars_8, __from_chars_binary)
722 (__from_chars_alpha_to_num, from_chars): Likewise.
723 * include/std/memory_resource (polymorphic_allocator::allocate)
724 (polymorphic_allocator::allocate_object): Likewise.
725 * include/std/string_view (basic_string_view::_S_compare): Likewise.
726 * include/std/utility (in_range): Likewise.
727 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
728 extra error about incomplete type __int_limits<bool>.
729 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
730 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
731 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
732 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
733 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
734 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
735 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
736 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
737 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
738 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
739 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
740 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
741
4540ef78
JW
742 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
743 value for partial_ordering::unordered.
744
d6dfa3da
JW
745 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
746 const-qualified expression variations.
747 * include/std/concepts (copyable): Likewise.
748
98cf2c26
JW
749 * include/std/type_traits (__is_standard_integer): New helper trait.
750 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
751 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
752 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
753 * testsuite/20_util/integer_comparisons/1.cc: New test.
754 * testsuite/20_util/integer_comparisons/2.cc: New test.
755 * testsuite/20_util/integer_comparisons/equal.cc: New test.
756 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
757 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
758 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
759 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
760 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
761 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
762 * testsuite/20_util/integer_comparisons/less.cc: New test.
763 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
764 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
765 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
766 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
767 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
768
93b8cfce
PP
7692020-02-16 Patrick Palka <ppalka@redhat.com>
770
771 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
772 Move code after an early exit constexpr if to under an else branch.
773 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
774
90b7eb65
PP
7752020-02-15 Patrick Palka <ppalka@redhat.com>
776
55992626
PP
777 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
778 * include/bits/ranges_algobase.h: Likewise.
779 * include/bits/ranges_uninitialized.h: Likewise.
780
b40c57bd
PP
781 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
782 binary_search, copy_if, count, count_if, equal_range, find, find_end,
783 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
784 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
785 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
786 lower_bound, make_heap, max, max_element, merge, min, min_element,
787 minmax, minmax_element, mismatch, next_permutation, none_of,
788 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
789 partition_point, pop_heap, prev_permutation, push_heap, remove,
790 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
791 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
792 search, search_n, set_difference, set_intersection,
793 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
794 stable_partition, stable_sort, swap_ranges, transform, unique,
795 unique_copy, upper_bound): Convert into function objects.
796 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
797 fill, move_backward, copy_backward): Likewise.
798 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
799 uninitialized_default_construct_n, uninitialized_value_construct,
800 uninitialized_value_construct_n, uninitialized_copy,
801 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
802 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
803 destroy, destroy_n): Likewise.
804
90b7eb65
PP
805 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
806 (ranges::find_end): ... here.
807 (ranges::__lexicographical_compare): Fold into ...
808 (ranges::lexicographical_compare): ... here.
809 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
810 (ranges::equal): ... here.
811
55b00d14
JW
8122020-02-15 Jonathan Wakely <jwakely@redhat.com>
813
814 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
815 * include/std/deque: Likewise.
816 * include/std/forward_list: Likewise.
817 * include/std/list: Likewise.
818 * include/std/string: Likewise.
819 * include/std/vector: Likewise.
820 * include/std/version: Likewise.
821 * testsuite/23_containers/deque/erasure.cc: Test for new value.
822 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
823 * testsuite/23_containers/list/erasure.cc: Likewise.
824 * testsuite/23_containers/map/erasure.cc: Likewise.
825 * testsuite/23_containers/set/erasure.cc: Likewise.
826 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
827 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
828 * testsuite/23_containers/vector/erasure.cc: Likewise.
829
5b1d5885
JW
8302020-02-15 Jonathan Wakely <jwakely@redhat.com>
831
832 * include/bits/random.h (uniform_random_bit_generator): Require min()
833 and max() to be constant expressions and min() to be less than max().
834 * testsuite/26_numerics/random/concept.cc: Check additional cases.
835 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
836
90fc7b3c
PP
8372020-02-13 Patrick Palka <ppalka@redhat.com>
838
613c932f
PP
839 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
840 * include/Makefile.in: Regenerate.
841 * include/bits/ranges_uninitialized.h: New header.
842 * include/std/memory: Include it.
843 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
844 test.
845 * .../uninitialized_copy/constrained.cc: New test.
846 * .../uninitialized_default_construct/constrained.cc: New test.
847 * .../uninitialized_fill/constrained.cc: New test.
848 * .../uninitialized_move/constrained.cc: New test.
849 * .../uninitialized_value_construct/constrained.cc: New test.
850
90fc7b3c
PP
851 * include/Makefile.am: Add bits/ranges_algobase.h
852 * include/Makefile.in: Regenerate.
853 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
854 existing #includes.
855 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
856 __detail::__is_move_iterator, copy_result, move_result,
857 __equal, equal, copy_result, move_result, move_backward_result,
858 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
859 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
860 fill): Split out into ...
861 * bits/range_algobase.h: ... this new header.
862
99bbab9f
PP
8632020-02-12 Patrick Palka <ppalka@redhat.com>
864
865 LWG 3389 and LWG 3390
866 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
867 constructing the move_iterator with __i.
868 (counted_iterator::counted_iterator): Use std::move when initializing
869 M_current with __i.
870 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
871 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
872
02ce382c
SL
8732020-02-12 Sandra Loosemore <sandra@codesourcery.com>
874
875 PR libstdc++/79193
876 PR libstdc++/88999
877
878 * configure: Regenerated.
879
b32a3f32
FD
8802020-02-12 François Dumont <fdumont@gcc.gnu.org>
881
882 * include/bits/hashtable.h
883 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
884 missing std namespace qualification to forward call.
885
dcda050e
JW
8862020-02-09 Jonathan Wakely <jwakely@redhat.com>
887
38660e87
JW
888 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
889 comment.
890 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
891
97a7c229
JW
892 * include/std/ranges: Fix non-ASCII characters in comment.
893
dcda050e
JW
894 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
895 equality comparison to be valid and return bool.
896 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
897 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
898 type with ambiguous conversion to fundamental types.
899 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
900
d222d8ec
JW
9012020-02-07 Jonathan Wakely <jwakely@redhat.com>
902
c8dd2446
JW
903 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
904 Use remove_cvref_t.
905 (readable_traits): Rename to indirectly_readable_traits.
906 (readable): Rename to indirectly_readable.
907 (writable): Rename to indirectly_writable.
908 (__detail::__iter_exchange_move): Do not use remove_reference_t.
909 (indirectly_swappable): Adjust requires expression parameter types.
910 expression.
911 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
912 (ranges::replace_if, ranges::generate_n, ranges::generate)
913 (ranges::remove): Use new name for writable.
914 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
915 Use new name for readable.
916 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
917 new name for readable_traits.
918 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
919 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
920 new definition of indirectly_readable.
921
d222d8ec
JW
922 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
923 to take parameters of common_iterator, instead of the common_iterator
924 type itself. Fix argument for __common_iter_has_arrow constraint.
925 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
926
572992c8
JW
9272020-02-07 Jonathan Wakely <jwakely@redhat.com>
928
929 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
930 warning.
931 (basic_istream_view::_Iterator::operator++()): Add missing return.
932
cba9ef06
PP
9332020-02-07 Patrick Palka <ppalka@redhat.com>
934
a04f635d
PP
935 * include/bits/ranges_algo.h: Remove extraneous &&.
936
b7903d9f
PP
937 * include/std/ranges (ranges::__detail::__stream_extractable,
938 ranges::basic_istream_view, ranges::istream_view): Define.
939 * testsuite/std/ranges/istream_view: New test.
940
cba9ef06
PP
941 Implement C++20 range adaptors
942 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
943 (subrange::_S_store_size): Mark as const instead of constexpr to
944 avoid what seems to be a bug in GCC.
945 (__detail::__box): Give it defaulted copy and move constructors.
55d4cbcb
PP
946 (ranges::views::_Single::operator()): Mark constexpr.
947 (ranges::views::_Iota::operator()): Mark constexpr.
cba9ef06 948 (__detail::Empty): Define.
55d4cbcb
PP
949 (ranges::views::__closure::_RangeAdaptor,
950 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
951 ranges::views::all, ranges::__detail::find_if,
952 ranges::__detail::find_if_not, ranges::__detail::mismatch,
953 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
954 ranges::views::transform, take_view, ranges::views::take,
955 take_while_view, ranges::views::take_while, drop_view,
956 ranges::views::drop, join_view, ranges::views::join,
cba9ef06 957 __detail::require_constant, __detail::tiny_range, split_view,
55d4cbcb
PP
958 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
959 common_view, ranges::views::common, reverse_view,
960 ranges::views::reverse,
961 ranges::views::__detail::__is_reversible_subrange,
962 ranges::views::__detail::__is_reverse_view, reverse_view,
963 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
964 ranges::views::elements, ranges::views::keys, ranges::views::values):
965 Define.
966 (views): Alias for ranges::views.
967 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
968 tuple_element<1, ranges::subrange>): New partial specializations.
cba9ef06
PP
969 * testsuite/std/ranges/adaptors/all.cc: New test.
970 * testsuite/std/ranges/adaptors/common.cc: Likewise.
971 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
972 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
973 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
974 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
975 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
976 * testsuite/std/ranges/adaptors/join.cc: Likewise.
977 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
978 * testsuite/std/ranges/adaptors/split.cc: Likewise.
979 * testsuite/std/ranges/adaptors/take.cc: Likewise.
980 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
981 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
982
5713834e
JW
9832020-02-07 Jonathan Wakely <jwakely@redhat.com>
984
0d57370c
JW
985 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
986 type of enumerations and comparison category types.
987 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
988 (__cmp_cat::_Ncmp::unordered): Change value to 2.
989 (partial_ordering::_M_value, weak_ordering::_M_value)
990 (strong_ordering::_M_value): Change type to __cmp_cat::type.
991 (partial_ordering::_M_is_ordered): Remove data member.
992 (partial_ordering): Use second bit of _M_value for unordered. Adjust
993 comparison operators.
994 (weak_ordering::operator partial_ordering): Simplify to remove
995 branches.
996 (operator<=>(unspecified, weak_ordering)): Likewise.
997 (strong_ordering::operator partial_ordering): Likewise.
998 (strong_ordering::operator weak_ordering): Likewise.
999 (operator<=>(unspecified, strong_ordering)): Likewise.
1000 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
1001 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
1002 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
1003
5713834e
JW
1004 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
1005 __cpp_lib_three_way_comparison macro and use deduced return type for
1006 operator<=>.
1007 * testsuite/std/ranges/iota/iterator.cc: New test.
1008
bc464641
PP
10092020-02-07 Patrick Palka <ppalka@redhat.com>
1010 Jonathan Wakely <jwakely@redhat.com>
1011
1012 Implement C++20 constrained algorithms
1013 * include/Makefile.am: Add new header.
1014 * include/Makefile.in: Regenerate.
1015 * include/std/algorithm: Include <bits/ranges_algo.h>.
1016 * include/bits/ranges_algo.h: New file.
1017 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
1018 * testsuite/25_algorithms/all_of/constrained.cc: New test.
1019 * testsuite/25_algorithms/any_of/constrained.cc: New test.
1020 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
1021 * testsuite/25_algorithms/copy/constrained.cc: New test.
1022 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
1023 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
1024 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
1025 * testsuite/25_algorithms/count/constrained.cc: New test.
1026 * testsuite/25_algorithms/count_if/constrained.cc: New test.
1027 * testsuite/25_algorithms/equal/constrained.cc: New test.
1028 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
1029 * testsuite/25_algorithms/fill/constrained.cc: New test.
1030 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
1031 * testsuite/25_algorithms/find/constrained.cc: New test.
1032 * testsuite/25_algorithms/find_end/constrained.cc: New test.
1033 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
1034 * testsuite/25_algorithms/find_if/constrained.cc: New test.
1035 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
1036 * testsuite/25_algorithms/for_each/constrained.cc: New test.
1037 * testsuite/25_algorithms/generate/constrained.cc: New test.
1038 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
1039 * testsuite/25_algorithms/heap/constrained.cc: New test.
1040 * testsuite/25_algorithms/includes/constrained.cc: New test.
1041 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
1042 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
1043 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
1044 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
1045 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
1046 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
1047 test.
1048 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
1049 * testsuite/25_algorithms/max/constrained.cc: New test.
1050 * testsuite/25_algorithms/max_element/constrained.cc: New test.
1051 * testsuite/25_algorithms/merge/constrained.cc: New test.
1052 * testsuite/25_algorithms/min/constrained.cc: New test.
1053 * testsuite/25_algorithms/min_element/constrained.cc: New test.
1054 * testsuite/25_algorithms/minmax/constrained.cc: New test.
1055 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
1056 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
1057 * testsuite/25_algorithms/move/constrained.cc: New test.
1058 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
1059 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
1060 * testsuite/25_algorithms/none_of/constrained.cc: New test.
1061 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
1062 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
1063 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
1064 * testsuite/25_algorithms/partition/constrained.cc: New test.
1065 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
1066 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
1067 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
1068 * testsuite/25_algorithms/remove/constrained.cc: New test.
1069 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
1070 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
1071 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
1072 * testsuite/25_algorithms/replace/constrained.cc: New test.
1073 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
1074 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
1075 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
1076 * testsuite/25_algorithms/reverse/constrained.cc: New test.
1077 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
1078 * testsuite/25_algorithms/rotate/constrained.cc: New test.
1079 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
1080 * testsuite/25_algorithms/search/constrained.cc: New test.
1081 * testsuite/25_algorithms/search_n/constrained.cc: New test.
1082 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
1083 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
1084 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
1085 test.
1086 * testsuite/25_algorithms/set_union/constrained.cc: New test.
1087 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
1088 * testsuite/25_algorithms/sort/constrained.cc: New test.
1089 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
1090 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
1091 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
1092 * testsuite/25_algorithms/transform/constrained.cc: New test.
1093 * testsuite/25_algorithms/unique/constrained.cc: New test.
1094 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
1095 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
1096
d1aa7705
JW
10972020-02-06 Jonathan Wakely <jwakely@redhat.com>
1098
bd630df0
JW
1099 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
1100 number in comment. Fix indentation.
1101
d1aa7705
JW
1102 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
1103 redundant _GLIBCXX20_CONSTEXPR.
1104
26eae9ac
JW
1105 * include/std/ranges (viewable_range): Replace decay_t with
1106 remove_cvref_t (LWG 3375).
1107
269e8130
JW
11082020-02-05 Jonathan Wakely <jwakely@redhat.com>
1109
1110 * include/bits/iterator_concepts.h (iter_reference_t)
1111 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
1112 Remove workarounds for PR c++/67704.
1113 * testsuite/24_iterators/aliases.cc: New test.
1114
7db12d15
PP
11152020-02-05 Patrick Palka <ppalka@redhat.com>
1116
1117 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
1118 when initializing _M_current.
1119 (move_iterator::base): Split into two overloads differing in
1120 ref-qualifiers as in P1207R4 for C++20.
1121
9962493c
JW
11222020-02-04 Jonathan Wakely <jwakely@redhat.com>
1123
9bc5bea1
JW
1124 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
1125 use.
1126
9962493c
JW
1127 PR libstdc++/93562
1128 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
1129 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
1130 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
1131
20fa702b
AB
11322020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
1133
1134 * configure: Regenerate.
1135
6e5a1963
PP
11362020-01-31 Patrick Palka <ppalka@redhat.com>
1137
1138 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
1139 test_range::end() returns the same type as test_range::begin().
1140 * testsuite/24_iterators/range_operations/next.cc: Likewise.
1141 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
1142 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
1143 Always return a sentinel<I>.
1144
5cd2e126
JW
11452020-01-29 Jonathan Wakely <jwakely@redhat.com>
1146
0a8f4feb
JW
1147 PR libstdc++/92895
1148 * include/std/stop_token (stop_token::stop_possible()): Call new
1149 _M_stop_possible() function.
1150 (stop_token::stop_requested()): Do not use stop_possible().
1151 (stop_token::binary_semaphore): New class, as temporary stand-in for
1152 std::binary_semaphore.
1153 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
1154 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
1155 New data members for symchronization with stop_callback destruction.
1156 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
1157 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
1158 Remove.
1159 (stop_token::_Stop_cb::_M_run): New member function.
1160 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
1161 Remove.
1162 (stop_token::_Stop_state::_M_owners): New data member to track
1163 reference count for ownership.
1164 (stop_token::_Stop_state::_M_value): New data member combining a
1165 spinlock, the stop requested flag, and the reference count for
1166 associated stop_source objects.
1167 (stop_token::_Stop_state::_M_requester): New data member for
1168 synchronization with stop_callback destruction.
1169 (stop_token::_Stop_state::_M_stop_possible()): New member function.
1170 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
1171 of _M_value.
1172 (stop_token::_Stop_state::_M_add_owner)
1173 (stop_token::_Stop_state::_M_release_ownership)
1174 (stop_token::_Stop_state::_M_add_ssrc)
1175 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
1176 updating reference counts.
1177 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
1178 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
1179 (stop_token::_Stop_state::_M_try_lock)
1180 (stop_token::_Stop_state::_M_try_lock_and_stop)
1181 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
1182 managing spinlock.
1183 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
1184 read and update state. Release lock while running callbacks. Use new
1185 data members to synchronize with callback destruction.
1186 (stop_token::_Stop_state::_M_remove_callback): Likewise.
1187 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
1188 to read and update state.
1189 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
1190 replacing shared_ptr.
1191 (stop_source::stop_source(const stop_source&)): Update reference count.
1192 (stop_source::operator=(const stop_source&)): Likewise.
1193 (stop_source::~stop_source()): Likewise.
1194 (stop_source::stop_source(stop_source&&)): Define as defaulted.
1195 (stop_source::operator=(stop_source&&)): Establish postcondition on
1196 parameter.
1197 (stop_callback): Enforce preconditions on template parameter. Replace
1198 base class with data member of new _Cb_impl type.
1199 (stop_callback::stop_callback(const stop_token&, Cb&&))
1200 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
1201 (stop_callback::_Cb_impl): New type wrapping _Callback member and
1202 defining the _S_execute member function.
1203 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
1204 test.
1205 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
1206 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
1207 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
1208 New test.
1209 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
1210 test.
1211 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
1212 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
1213 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
1214 test.
1215
f214ffb3
JW
1216 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
1217 three_way_comparable_with.
1218 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
1219 (compare_three_way::operator()): Remove redundant constraint from
1220 requires-clause.
1221 (__detail::_Synth3way::operator()): Use three_way_comparable_with
1222 instead of workaround.
1223 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
1224 output due to simplified constraints on compare_three_way::operator().
1225
83b02010
JW
1226 PR libstdc++/93479
1227 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
1228 * testsuite/18_support/comparisons/object/93479.cc: New test.
1229
5cd2e126
JW
1230 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
1231 returns the same type as test_range::begin(). Add comments.
1232 * testsuite/std/ranges/access/rbegin.cc: Likewise.
1233 * testsuite/std/ranges/access/rend.cc: Likewise.
1234 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
1235 test_range is the same as its iterator type.
1236 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
1237 operator- overloads to satisfy sized_sentinel_for when the iterator
1238 satisfies random_access_iterator.
1239
759812fd
JW
12402020-01-28 Jonathan Wakely <jwakely@redhat.com>
1241
72a9fd20
JW
1242 PR libstdc++/93470
1243 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
1244 static assertion to object types.
1245
759812fd
JW
1246 PR libstdc++/93325
1247 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
1248 clock_gettime instead of explicit glibc version check.
1249 * configure: Regenerate.
1250
a5d81aaa
JW
12512020-01-28 Martin Liska <mliska@suse.cz>
1252
1253 PR libstdc++/93478
1254 * include/std/atomic: Fix typo.
1255 * include/std/optional: Likewise.
1256
12572020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
1258
1259 * configure: Regenerate.
1260
389cd88c
JW
12612020-01-27 Jonathan Wakely <jwakely@redhat.com>
1262
1263 PR libstdc++/93426
1264 * include/std/span (span): Fix deduction guide.
1265 * testsuite/23_containers/span/deduction.cc: New test.
1266
482eeff5
JW
12672020-01-24 Jonathan Wakely <jwakely@redhat.com>
1268
1269 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
1270 (__cmp_cat::_Ord::equivalent): Add enumerator.
1271 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
1272 and greater.
1273 (partial_ordering, weak_ordering, strong_ordering): Remove
1274 constructors taking __cmp_cat::_Eq parameters. Use renamed
1275 enumerators.
1276
e8e66971
MR
12772020-01-24 Maciej W. Rozycki <macro@wdc.com>
1278
1279 * acinclude.m4: Handle `--with-toolexeclibdir='.
1280 * Makefile.in: Regenerate.
1281 * aclocal.m4: Regenerate.
1282 * configure: Regenerate.
1283 * doc/Makefile.in: Regenerate.
1284 * include/Makefile.in: Regenerate.
1285 * libsupc++/Makefile.in: Regenerate.
1286 * po/Makefile.in: Regenerate.
1287 * python/Makefile.in: Regenerate.
1288 * src/Makefile.in: Regenerate.
1289 * src/c++11/Makefile.in: Regenerate.
1290 * src/c++17/Makefile.in: Regenerate.
1291 * src/c++98/Makefile.in: Regenerate.
1292 * src/filesystem/Makefile.in: Regenerate.
1293 * testsuite/Makefile.in: Regenerate.
1294
7a900bce
AO
12952020-01-23 Alexandre Oliva <oliva@adacore.com>
1296
f9e84b31
AO
1297 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
1298 * configure: Rebuild.
1299
7a900bce
AO
1300 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
1301
04681fca
JW
13022020-01-23 Jonathan Wakely <jwakely@redhat.com>
1303
1304 PR libstdc++/91947
1305 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
1306 rule.
1307 * include/Makefile.in: Regenerate.
1308
c784f162
JW
13092020-01-20 Jonathan Wakely <jwakely@redhat.com>
1310
1311 * doc/xml/faq.xml: Fix grammar.
1312 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
1313 * doc/xml/manual/spine.xml: Update copyright years.
1314 * doc/html/*: Regenerate.
1315
f4d83eba
ER
13162020-01-19 Eric S. Raymond <esr@thyrsus.com>
1317
1318 * doc/xml/faq.xml: Update for SVN -> Git transition.
1319 * doc/xml/manual/appendix_contributing.xml: Likewise.
1320 * doc/xml/manual/status_cxx1998.xml: Likewise.
1321 * doc/xml/manual/status_cxx2011.xml: Likewise.
1322 * doc/xml/manual/status_cxx2014.xml: Likewise.
1323 * doc/xml/manual/status_cxx2017.xml: Likewise.
1324 * doc/xml/manual/status_cxx2020.xml: Likewise.
1325 * doc/xml/manual/status_cxxtr1.xml: Likewise.
1326 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
1327
49789fd0
IS
13282020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1329
1330 * include/Makefile.am: Add coroutine to the std set.
1331 * include/Makefile.in: Regenerated.
1332 * include/std/coroutine: New file.
1333
0ba6a850
JW
13342020-01-17 Jonathan Wakely <jwakely@redhat.com>
1335
1336 PR libstdc++/92376
1337 * include/bits/c++config: Only do PSTL config when the header is
1338 present, to fix freestanding.
1339 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
1340 functions if they were detected by configure.
1341
98d56ea8
JW
13422020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
1343 Matthew Bauer <mjbauer95@gmail.com>
1344 Jonathan Wakely <jwakely@redhat.com>
1345
1346 PR bootstrap/64271 (partial)
1347 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
1348 to unsigned short.
1349 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
1350 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
1351 definitions with NetBSD upstream.
1352 (ctype_base::blank): Use _CTYPE_BL.
1353 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
1354 Declaration.
1355 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
1356 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
1357 parameters to unsigned char.
1358 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
1359
d9165389
FD
13602020-01-16 François Dumont <fdumont@gcc.gnu.org>
1361
1362 PR libstdc++/91263
1363 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
1364 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
1365 (_Equality_base): Remove.
1366 (_Equality<>::_M_equal): Review implementation. Use
1367 std::is_permutation.
1368 * testsuite/23_containers/unordered_multiset/operators/1.cc
1369 (Hash, Equal, test02, test03): New.
1370 * testsuite/23_containers/unordered_set/operators/1.cc
1371 (Hash, Equal, test02, test03): New.
1372
2a0f6c61
JW
13732020-01-15 Jonathan Wakely <jwakely@redhat.com>
1374
1375 PR libstdc++/93267
1376 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
1377 Move here from <bits/range_access.h> and define using __int128 when
1378 available.
1379 (__is_integer_like, __is_signed_integer_like): Move here from
1380 <bits/range_access.h>.
1381 (weakly_incrementable): Use __is_signed_integer_like.
1382 * include/bits/range_access.h (__max_diff_type, __max_size_type)
1383 (__is_integer_like, __is_signed_integer_like): Move to
1384 <bits/iterator_concepts.h>.
1385 (__make_unsigned_like_t): Move here from <ranges>.
1386 * include/std/ranges (__make_unsigned_like_t): Move to
1387 <bits/range_access.h>.
1388 (iota_view): Replace using-directive with using-declarations.
1389 * testsuite/std/ranges/iota/93267.cc: New test.
1390 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
1391
e4379a93
JW
13922020-01-13 Jonathan Wakely <jwakely@redhat.com>
1393
fe7cc34f
JW
1394 PR libstdc++/93244
1395 * include/bits/fs_path.h (path::generic_string<C,A>)
1396 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
1397 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
1398 root-dir is converted to forward slash in generic pathname.
1399 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
1400 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
1401
e4379a93
JW
1402 PR libstdc++/58605
1403 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
1404 Define.
1405 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
1406 (__atomic_float): Add default member initializer for C++20.
1407 * include/std/atomic (atomic): Likewise.
1408 (atomic::atomic()): Remove noexcept-specifier on default constructor.
1409 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
1410 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
1411 number.
1412 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
1413 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
1414 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
1415 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
1416 expected result for is_trivially_default_constructible.
1417 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
1418 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
1419 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
1420 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
1421 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
1422 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
1423 expected results for is_trivially_default_constructible.
1424 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
1425 new test generator.
1426
7918cb93
JW
14272020-01-10 Jonathan Wakely <jwakely@redhat.com>
1428
68be73fc
JW
1429 * testsuite/util/testsuite_iterators.h: Improve comment.
1430
78f02e80
JW
1431 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
1432 initialization syntax.
1433
7918cb93
JW
1434 PR libstdc++/92285
1435 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
1436 of base class independent of __cplusplus value.
1437 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
1438 type defined in the base class
1439 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
1440 * testsuite/24_iterators/istreambuf_iterator/requirements/
1441 base_classes.cc: Adjust expected base class for C++98.
1442
acd43917
OH
14432020-01-09 Olivier Hainque <hainque@adacore.com>
1444
1445 * doc/xml/manual/appendix_contributing.xml: Document _C2
1446 as a reserved identifier, by VxWorks.
1447 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
1448 * include/bits/stl_multimap.h: Likewise.
1449
caa39b2e
JW
14502020-01-09 Jonathan Wakely <jwakely@redhat.com>
1451
1a788638
JW
1452 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
1453 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
1454 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
1455 partial specialization to disambiguate the two constrained
1456 specializations.
1457
caa39b2e
JW
1458 * include/experimental/type_traits (experimental::is_pod_v): Disable
1459 -Wdeprecated-declarations warnings around reference to std::is_pod.
1460 * include/std/type_traits (is_pod_v): Likewise.
1461 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
1462 is_standard_layout and is_trivial. Do not check is_pod for C++20.
1463 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
1464 Add -Wno-deprecated for C++20.
1465 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
1466 * testsuite/20_util/is_pod/value.cc: Likewise.
1467 * testsuite/experimental/type_traits/value.cc: Likewise.
1468
1a6c5064
JTM
14692020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
1470
1471 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
1472 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
1473 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
1474
d574c8aa
JW
14752020-01-09 Jonathan Wakely <jwakely@redhat.com>
1476
160e95dc
JW
1477 PR libstdc++/93205
1478 * include/bits/random.h (operator>>): Check stream operation succeeds.
1479 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
1480 typedefs.
1481 (operator>>): Remove redundant __istream_type typedefs. Check stream
1482 operations succeed.
1483 (__extract_params): New function to fill a vector from a stream.
1484 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
1485
d574c8aa
JW
1486 PR libstdc++/93208
1487 * config/abi/pre/gnu.ver: Add new exports.
1488 * include/std/memory_resource (memory_resource::~memory_resource()):
1489 Do not define inline.
1490 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
1491 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
1492 Define.
1493 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
1494 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
1495
b9c84e95
FD
14962020-01-09 François Dumont <fdumont@gcc.gnu.org>
1497
1498 PR libstdc++/92124
1499 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
1500 template alias.
1501 (_Hashtable<>::__fwd_value_for): New.
1502 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
1503 parameter.
1504 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
1505 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
1506 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
1507 with std::move.
1508 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
1509 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
1510 Adapt.
1511 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
1512 Adapt.
1513 * testsuite/23_containers/unordered_set/92124.cc: New.
1514
fff148b7
JW
15152020-01-08 Jonathan Wakely <jwakely@redhat.com>
1516
1517 PR libstdc++/93201
1518 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
1519 detailed error reporting for remove_all. Check result of recursive
1520 call before incrementing iterator.
1521 (remove_all(const path&), remove_all(const path&, error_code&)): Use
1522 do_remove_all.
1523 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
1524 result of recursive call before incrementing iterator.
1525 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
1526 are reported correctly.
1527 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
1528
9e3c1eb7
TR
15292020-01-07 Thomas Rodgers <trodgers@redhat.com>
1530
1531 * include/std/condition_variable
1532 (condition_variable_any::wait_on): Rename to match current draft
1533 standard.
1534 (condition_variable_any::wait_on_until): Likewise.
1535 (condition_variable_any::wait_on_for): Likewise.
1536 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
1537 Adjust tests to account for renamed methods.
1538
6af8819b
FD
15392020-01-07 François Dumont <fdumont@gcc.gnu.org>
1540
1541 PR libstdc++/92124
1542 * include/bits/stl_tree.h
1543 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
1544 std::move_if_noexcept by std::move.
1545 * testsuite/23_containers/map/92124.cc: New.
1546 * testsuite/23_containers/set/92124.cc: New.
1547
f31a99f7
JW
15482020-01-06 Jonathan Wakely <jwakely@redhat.com>
1549
a4a1f965
JW
1550 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
1551 (stop_source): Likewise (LWG 3362).
1552 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
1553 comparisons.
1554
f31a99f7
JW
1555 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
1556 (lexicographical_compare_three_way): Do not depend on
1557 __cpp_lib_concepts.
1558 * include/std/version (__cpp_lib_three_way_comparison): Only define
1559 when __cpp_lib_concepts is defined.
1560 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
1561
b4e70137
JW
15622020-01-03 Jonathan Wakely <jwakely@redhat.com>
1563
1564 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
1565 Only define four-argument overload when __cpp_lib_concepts is defined.
1566
a8497ec6
JDA
15672020-01-01 John David Anglin <danglin@gcc.gnu.org>
1568
1569 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
1570
8d9254fc 15712020-01-01 Jakub Jelinek <jakub@redhat.com>
5624e564
JJ
1572
1573 Update copyright years.
b4df5e92 1574\f
8d9254fc 1575Copyright (C) 2020 Free Software Foundation, Inc.
b4df5e92
JW
1576
1577Copying and distribution of this file, with or without modification,
1578are permitted in any medium without royalty provided the copyright
1579notice and this notice are preserved.