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