1 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
3 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
5 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
7 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
8 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
9 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
10 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
11 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
12 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
13 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
17 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
19 2020-02-28 Patrick Palka <ppalka@redhat.com>
22 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
23 Fix condition for when to use memcmp, making it consistent with the
24 corresponding condition used in std::lexicographical_compare.
25 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
27 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
28 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
29 existing signatures for C++2a.
31 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
33 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
34 test instead of just compiling it.
36 2020-02-28 Patrick Palka <ppalka@redhat.com>
38 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
39 whenever the underlying range models common_range.
41 * include/std/ranges (__detail::_CachedPosition): New struct.
42 (views::filter_view::_S_needs_cached_begin): New member variable.
43 (views::filter_view::_M_cached_begin): New member variable.
44 (views::filter_view::begin): Use _M_cached_begin to cache its
46 (views::drop_view::_S_needs_cached_begin): New static member variable.
47 (views::drop_view::_M_cached_begin): New member variable.
48 (views::drop_view::begin): Use _M_cached_begin to cache its result
49 when _S_needs_cached_begin.
50 (views::drop_while_view::_M_cached_begin): New member variable.
51 (views::drop_while_view::begin): Use _M_cached_begin to cache its
53 (views::reverse_view::_S_needs_cached_begin): New static member
55 (views::reverse_view::_M_cached_begin): New member variable.
56 (views::reverse_view::begin): Use _M_cached_begin to cache its result
57 when _S_needs_cached_begin.
58 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
59 drop_view::begin caches its result.
60 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
61 that drop_while_view::begin caches its result.
62 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
63 filter_view::begin caches its result.
64 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
65 reverse_view::begin caches its result.
67 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
69 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
70 filesystems that silently truncate timestamps.
71 * testsuite/experimental/filesystem/operations/last_write_time.cc:
74 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
75 -Wstringop-overflow warnings.
77 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
79 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
80 -fdiagnostics-urls=never to options.
82 2020-02-27 Patrick Palka <ppalka@redhat.com>
84 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
86 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
87 (take_view::_Sentinel<_Const>): Likewise.
88 (take_while_view::_Sentinel<_Const>): Likewise.
89 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
90 * testsuite/std/ranges/adaptors/split.cc: Augment test.
91 * testsuite/std/ranges/adaptors/take.cc: Augment test.
92 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
93 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
95 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
96 base() of a vector<>::iterator is a pointer.
97 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
98 * testsuite/25_algorithms/move/constrained.cc: Likewise.
99 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
100 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
102 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
103 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
104 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
105 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
106 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
108 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
110 * include/debug/array (operator<=>): Define for C++20.
111 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
112 Adjust dg-error line numbers.
113 * testsuite/23_containers/array/tuple_interface/
114 tuple_element_debug_neg.cc: Likewise.
116 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
117 defining _GLIBCXX_ASSERTIONS.
118 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
119 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
120 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
121 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
122 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
123 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
124 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
125 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
126 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
127 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
128 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
129 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
131 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
132 C++98 where the member function of the base class returns void.
134 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
135 equality comparisons that support value-initialized iterators.
137 * include/bits/boost_concept_check.h (__function_requires): Add
138 _GLIBCXX14_CONSTEXPR.
139 * testsuite/25_algorithms/min/concept_checks.cc: New test.
141 2020-02-26 Patrick Palka <ppalka@redhat.com>
144 * include/std/ranges (split_view::_InnerIter::operator==): Compare
145 the operands' _M_i rather than their _M_i.current().
146 * testsuite/std/ranges/adaptors/split.cc: Augment test.
148 P1645R1 constexpr for <numeric> algorithms
149 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
150 partial_sum, adjacent_difference): Make conditionally constexpr for
152 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
154 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
155 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
157 * include/std/version (__cpp_lib_constexpr_numeric): Define.
158 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
159 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
160 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
161 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
162 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
163 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
164 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
165 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
166 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
167 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
168 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
170 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
172 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
173 variables in smaller scope and avoid calling ranges::distance when we
174 know they are pointers. Remove statically-unreachable use of
175 __builtin_unreachable().
176 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
179 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
181 (__detail::__maybe_const_t): Likewise.
182 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
183 (transform_view, take_view, take_while_view, elements_view): Use
185 (join_view, split_view): Use both.
187 2020-02-25 Patrick Palka <ppalka@redhat.com>
189 LWG 3397 basic_istream_view::iterator should not provide
191 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
193 (basic_istream_view:_Iterator::iterator_concept): ... this.
194 * testsuite/std/ranges/istream_view.cc: Augment test.
196 LWG 3325 Constrain return type of transformation function for
198 * include/std/ranges (transform_view): Constrain the return type of the
199 transformation function as per LWG 3325.
200 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
202 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
203 * include/std/ranges (join_view::_Iterator::operator--): Require that
204 range_reference_t<_Base> models common_range.
205 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
207 LWG 3301 transform_view::_Iterator has incorrect iterator_category
208 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
209 determination of iterator_category as per LWG 3301.
210 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
212 LWG 3292 iota_view is under-constrained
213 * include/std/ranges (iota_view): Require that _Winc models semiregular
215 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
217 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
219 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
220 during constant evaluation. Call __builtin_memmove directly instead of
222 (__copy_or_move_backward): Likewise.
223 * include/bits/stl_algobase.h (__memmove): Remove.
224 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
225 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
226 Use __builtin_memmove directly instead of __memmove.
227 (__copy_move_a2): Do not use memmove during constant evaluation.
228 (__copy_move_backward_a2): Use _IsMove constant to select correct
229 __copy_move_backward specialization.
230 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
231 begin turned into moves during constant evaluation.
233 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
237 * include/bits/stl_algobase.h (__memmove): Cast away const before
238 doing move assignment.
239 * testsuite/25_algorithms/move/93872.cc: New test.
240 * testsuite/25_algorithms/move_backward/93872.cc: New test.
242 2020-02-24 Patrick Palka <ppalka@redhat.com>
245 * include/bits/ranges_algobase.h (__copy_or_move,
246 __copy_or_move_backward): Don't inspect the iter_value_t of the output
247 iterator, instead inspect its iterator_traits directly.
248 * include/bits/stl_iterator.h (back_insert_iterator::container):
249 Conditionally initialize.
250 (back_insert_iterator::difference_type): Conditionally define.
251 (back_insert_iterator::back_insert_iterator): Conditionally define this
253 (front_insert_iterator::container): Conditionally initialize.
254 (front_insert_iterator::difference_type): Conditionally define.
255 (front_insert_iterator::front_insert_iterator): Conditionally define
256 this default constructor.
257 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
258 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
260 P0769R2 Add shift to <algorithm>
261 * include/bits/ranges_algo.h (shift_left, shift_right): New.
262 * testsuite/25_algorithms/shift_left/1.cc: New test.
263 * testsuite/25_algorithms/shift_right/1.cc: New test.
265 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
267 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
268 Make noexcept-specifier conditional.
269 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
272 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
274 (operator==(istream_iterator, default_sentinel_t)): Add operator.
275 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
276 * include/bits/streambuf_iterator.h
277 (istreambuf_iterator(default_sentinel_t)): Add constructor.
278 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
279 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
281 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
282 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
284 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
286 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
287 (ranges::enable_view): Simplify (LWG 3326).
288 * include/bits/range_access.h (ranges::enable_view): Declare.
289 * include/bits/regex.h (__enable_view_impl): Remove partial
291 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
292 * include/bits/stl_set.h (__enable_view_impl): Likewise.
293 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
294 * include/debug/multiset.h (__enable_view_impl): Likewise.
295 * include/debug/set.h (__enable_view_impl): Likewise.
296 * include/debug/unordered_set (__enable_view_impl): Likewise.
297 * include/experimental/string_view (ranges::enable_view): Define
298 partial specialization.
299 * include/std/span (ranges::enable_view): Likewise.
300 * include/std/string_view (ranges::enable_view): Likewise.
301 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
303 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
305 * include/std/optional (operator<=>(optional<T>, optional<U>))
306 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
308 * include/std/tuple (__tuple_cmp): New helper function for <=>.
309 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
310 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
311 (operator<=>(monostate, monostate)): Define for C++20.
312 * testsuite/20_util/optional/relops/three_way.cc: New test.
313 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
314 * testsuite/20_util/variant/89851.cc: Move to ...
315 * testsuite/20_util/variant/relops/89851.cc: ... here.
316 * testsuite/20_util/variant/90008.cc: Move to ...
317 * testsuite/20_util/variant/relops/90008.cc: ... here.
318 * testsuite/20_util/variant/relops/three_way.cc: New test.
320 2020-02-20 Patrick Palka <ppalka@redhat.com>
322 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
324 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
325 __maybe_refwrap to capture lvalue references by reference, and then use
326 unwrap_reference_t to forward the by-reference captures as references.
327 * testsuite/std/ranges/adaptors/split.cc: Augment test.
328 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
330 * include/std/ranges (iota_view): Forward declare _Sentinel.
331 (iota_view::_Iterator): Befriend _Sentinel.
332 (iota_view::_Sentinel::_M_equal): New member function.
333 (iota_view::_Sentinel::operator==): Use it.
334 (views::_Iota::operator()): Forward __f using the correct type.
335 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
336 with integers of different signedness, to appease iota_view's deduction
338 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
340 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
342 * include/bits/range_access.h (ranges::begin): Reject array of
344 (ranges::end, ranges::size): Require arrays to be bounded.
345 (ranges::data): Require lvalue or borrowed_range.
346 (ranges::iterator_t): Remove constraint.
347 * testsuite/std/ranges/access/begin.cc: Do not check array of
349 * testsuite/std/ranges/access/begin_neg.cc: New test.
350 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
351 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
352 * testsuite/std/ranges/access/ssize.cc: Do not check array of
355 * include/std/system_error (error_category::operator<=>)
356 (operator<=>(const error_code&, const error_code&))
357 (operator<=>(const error_condition&, const error_condition&)): Define
359 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
360 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
362 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
364 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
365 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
367 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
368 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
370 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
371 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
372 Remove incorrect comment.
373 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
376 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
378 * include/std/thread (thread::id::operator<=>): Define for C++20.
379 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
380 functions in namespace std.
381 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
383 2020-02-19 Patrick Palka <ppalka@redhat.com>
385 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
386 null terminator of the underlying string as part of the test_range.
389 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
391 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
392 requirement (LWG 3385).
393 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
394 expected declaration.
396 * include/std/ranges (take_while_view, drop_view, drop_while_view)
397 (elements_view:_Iterator): Initialize data members (LWG 3364).
399 * libsupc++/compare (three_way_comparable): Remove always-false check
400 that should have been removed with weak_equality (P1959R0).
401 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
403 * include/std/concepts (__detail::__partially_ordered_with): Move here
405 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
406 to simplify definition (LWG 3331).
407 * libsupc++/compare (__detail::__partially_ordered_with): Move to
410 * include/std/concepts (totally_ordered_with): Remove redundant
411 requirement (LWG 3329).
413 * include/std/ranges (__detail::__convertible_to_non_slicing): New
415 (__detail::__pair_like_convertible_to): Remove.
416 (__detail::__pair_like_convertible_from): Add requirements for
417 non-slicing conversions.
418 (subrange): Constrain constructors with __convertible_to_non_slicing.
419 Remove constructors from pair-like types. Add new deduction guide.
420 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
422 * include/bits/iterator_concepts.h (iter_move): Add declaration to
423 prevent unqualified lookup finding a suitable declaration (LWG 3247).
425 * include/std/memory_resource (polymorphic_allocator::allocate)
426 (polymorphic_allocator::allocate_object): Change type of exception to
427 bad_array_new_length (LWG 3237).
428 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
430 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
431 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
432 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
433 * testsuite/20_util/unwrap_reference/3.cc: New test.
435 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
436 type during overload resolution, use static assert instead (LWG 3200).
437 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
439 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
441 * include/std/span (span(T (&)[N])): Use non-deduced context to
442 prevent first parameter from interfering with class template argument
443 deduction (LWG 3369).
444 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
445 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
448 * include/std/span (span::const_iterator, span::const_reverse_iterator)
449 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
451 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
453 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
455 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
456 constrained.cc: Likewise.
457 * testsuite/20_util/specialized_algorithms/
458 uninitialized_default_construct/constrained.cc: Likewise.
459 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
460 constrained.cc: Likewise.
461 * testsuite/20_util/specialized_algorithms/uninitialized_move/
462 constrained.cc: Likewise.
463 * testsuite/20_util/specialized_algorithms/
464 uninitialized_value_construct/constrained.cc: Likewise.
466 * include/bits/range_access.h (range_size_t): Define alias template.
467 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
468 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
470 * include/std/ranges (filter_view, transform_view, take_view)
471 (join_view, split_view, reverse_view): Remove commented-out converting
472 constructors (LWG 3280).
474 * include/std/memory (uninitialized_construct_using_allocator): Use
475 std::construct_at (LWG 3321).
477 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
478 (polymorphic_allocator::allocate_object)
479 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
481 LWG 3379. "safe" in several library names is misleading
482 * include/bits/range_access.h (enable_safe_range): Rename to
483 enable_borrowed_range.
484 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
485 (safe_range): Rename to borrowed_range.
486 * include/bits/ranges_algo.h: Adjust to use new names.
487 * include/bits/ranges_algobase.h: Likewise.
488 * include/bits/ranges_uninitialized.h: Likewise.
489 * include/std/ranges: Likewise.
490 (safe_iterator_t): Rename to borrowed_iterator_t.
491 (safe_subrange_t): Rename to borrowed_subrange_t.
492 * include/std/span: Adjust to use new names.
493 * include/std/string_view: Likewise.
494 * include/experimental/string_view: Likewise.
495 * testsuite/std/ranges/access/begin.cc: Likewise.
496 * testsuite/std/ranges/access/cbegin.cc: Likewise.
497 * testsuite/std/ranges/access/cdata.cc: Likewise.
498 * testsuite/std/ranges/access/cend.cc: Likewise.
499 * testsuite/std/ranges/access/crbegin.cc: Likewise.
500 * testsuite/std/ranges/access/crend.cc: Likewise.
501 * testsuite/std/ranges/access/data.cc: Likewise.
502 * testsuite/std/ranges/access/end.cc: Likewise.
503 * testsuite/std/ranges/access/rbegin.cc: Likewise.
504 * testsuite/std/ranges/access/rend.cc: Likewise.
505 * testsuite/std/ranges/safe_range.cc: Likewise.
506 * testsuite/std/ranges/safe_range_types.cc: Likewise.
507 * testsuite/util/testsuite_iterators.h: Likewise.
509 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
510 (tuple_element<1, const subrange<I, S, K>>): Add partial
511 specializations (LWG 3398).
512 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
514 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
515 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
516 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
518 2020-02-18 Patrick Palka <ppalka@redhat.com>
520 P1983R0 Wording for GB301, US296, US292, US291, and US283
521 * include/std/ranges (filter_view::pred): New member function.
522 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
523 P1983R0 fixes the highlighted issue in the same way.
524 (join_view::_Iterator<_Const>): Add friend
525 join_view::_Iterator<!_Const>.
526 (join_view::_M_inner): Remove mutable specifier, effectively reverting
527 the proposed wording changes of P3278.
528 (join_view::begin): Refine the condition for when to return a const
530 (split_view::_OuterIter::_OuterIter): Adjust constraints.
531 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
534 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
537 * include/std/ranges (_RangeAdaptor): Add deduction guide.
538 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
540 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
541 (transform_view::_Iterator): Add alias _Base_iter and use in place of
543 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
544 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
545 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
546 (split_view::_InnerIter::_S_iter_cat()): Likewise.
548 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
549 assumption that long is wider than int.
550 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
551 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
552 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
553 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
555 P1976R2 Fixed-size span construction from dynamic range
556 * include/std/span (__cpp_lib_span): Update value.
557 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
559 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
561 (span::first<Count>(), span::last<Count>()): Use explicit type in
563 (as_bytes, as_writable_bytes): Likewise.
564 * include/std/version (__cpp_lib_span): Update value.
565 * testsuite/23_containers/span/1.cc: Check new value.
566 * testsuite/23_containers/span/2.cc: Check new value.
567 * testsuite/23_containers/span/explicit.cc: New test.
569 * include/std/span (span::__is_compatible_array): Simplify alias
570 template by using requires-clause.
571 (span::__is_compatible_ref): New alias template for constraining
573 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
574 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
575 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
576 redundant parentheses.
577 (span(R&&)): Add missing constraints.
579 * include/std/span (span): Reorder members and rename template
580 parameters to match declarations in the C++2a working paper.
582 P2116R0 Remove tuple-like protocol support from fixed-extent span
583 * include/std/span (get, tuple_size, tuple_element): Remove.
584 * testsuite/23_containers/span/everything.cc: Remove checks for
586 * testsuite/23_containers/span/get_neg.cc: Remove.
587 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
588 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
589 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
591 2020-02-17 Patrick Palka <ppalka@redhat.com>
593 P2106R0 Alternative wording for GB315 and GB316
594 * include/bits/ranges_algo.h (in_fun_result): New.
595 (for_each_result, for_each_n_result): Change into an alias of
598 (mismatch_result): Change into an alias of in_in_result.
599 (copy_if_result): Change into an alias of in_out_result.
600 (swap_ranges_result): Change into an alias of in_in_result.
601 (unary_transform_result): Change into an alias of in_out_result.
602 (in_in_out_result): New.
603 (binary_transform_result): Change into an alias of in_in_out_result.
604 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
605 remove_copy_result, unique_copy_result, reverse_copy_result,
606 rotate_copy_result, partial_sort_copy_result): Change into an alias of
608 (in_out_out_result): New.
609 (partition_copy_result, merge_result): Change into an alias of
611 (set_union_result, set_intersection_result): Change into an alias of
613 (set_difference_result): Change into an alias of in_out_result.
614 (set_symmetric_difference): Change into an alias of in_in_out_result.
615 (min_max_result): New.
616 (minmax_result, minmax_element_result): Change into an alias of
618 (in_found_result): New.
619 (next_permutation_result, prev_permutation_result): Change into an alias
621 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
622 Adjust following changes to next_permutation_result and
623 prev_permutation_result.
624 * include/bits/ranges_algobase.h (in_out_result): New.
625 (copy_result, move_result, move_backward_result, copy_backward_result,
626 copy_n_result): Change into an alias of in_out_result.
627 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
628 uninitialized_copy_n_result, uninitialized_move_result,
629 uninitialized_move_n_result): Likewise.
630 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
632 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
634 P1243R4 Rangify new algorithms
635 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
636 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
637 * testsuite/25_algorithms/clamp/constrained.cc: New test.
638 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
639 * testsuite/25_algorithms/sample/constrained.cc: New test.
641 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
643 P1964R2 Wording for boolean-testable
644 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
645 (__adjacent_find_fn): Cast result of predicate to bool.
646 * include/std/concepts (__boolean): Remove.
647 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
649 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
650 (predicate): Use __boolean_testable instead of boolean.
651 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
654 P1970R2 Consistency for size() functions: Add ranges::ssize
655 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
656 * testsuite/std/ranges/access/ssize.cc: New test.
658 P1956R1 On the names of low-level bit manipulation functions
659 * include/bits/hashtable_policy.h: Update comment.
660 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
661 (ispow2, ceil2, floor2, log2p1): Likewise.
662 (__cpp_lib_int_pow2): Add feature test macro.
663 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
664 * include/std/memory (assume_aligned): Adjust use of ispow2.
665 * include/std/version (__cpp_lib_int_pow2): Add.
666 * libsupc++/new_opa.cc: Adjust use of __ispow2.
667 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
668 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
669 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
670 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
671 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
672 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
673 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
674 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
675 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
676 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
677 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
678 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
680 * include/std/charconv: Add comment.
682 PR libstdc++/92546 (partial)
683 * include/bits/random.h (uniform_random_bit_generator): Move definition
684 to <bits/uniform_int_dist.h>.
685 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
687 * include/bits/ranges_algobase.h: Do not include <cmath>.
688 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
690 * include/std/ranges: Do not include <limits>.
691 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
693 PR libstdc++/92546 (partial)
694 * include/Makefile.am: Add new header.
695 * include/Makefile.in: Regenerate.
696 * include/bits/int_limits.h: New header.
697 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
698 numeric_limits with __detail::__int_limits.
699 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
700 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
702 * include/std/charconv (__to_chars_8, __from_chars_binary)
703 (__from_chars_alpha_to_num, from_chars): Likewise.
704 * include/std/memory_resource (polymorphic_allocator::allocate)
705 (polymorphic_allocator::allocate_object): Likewise.
706 * include/std/string_view (basic_string_view::_S_compare): Likewise.
707 * include/std/utility (in_range): Likewise.
708 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
709 extra error about incomplete type __int_limits<bool>.
710 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
711 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
712 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
713 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
714 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
715 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
716 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
717 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
718 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
719 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
720 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
721 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
723 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
724 value for partial_ordering::unordered.
726 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
727 const-qualified expression variations.
728 * include/std/concepts (copyable): Likewise.
730 * include/std/type_traits (__is_standard_integer): New helper trait.
731 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
732 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
733 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
734 * testsuite/20_util/integer_comparisons/1.cc: New test.
735 * testsuite/20_util/integer_comparisons/2.cc: New test.
736 * testsuite/20_util/integer_comparisons/equal.cc: New test.
737 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
738 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
739 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
740 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
741 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
742 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
743 * testsuite/20_util/integer_comparisons/less.cc: New test.
744 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
745 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
746 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
747 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
748 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
750 2020-02-16 Patrick Palka <ppalka@redhat.com>
752 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
753 Move code after an early exit constexpr if to under an else branch.
754 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
756 2020-02-15 Patrick Palka <ppalka@redhat.com>
758 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
759 * include/bits/ranges_algobase.h: Likewise.
760 * include/bits/ranges_uninitialized.h: Likewise.
762 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
763 binary_search, copy_if, count, count_if, equal_range, find, find_end,
764 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
765 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
766 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
767 lower_bound, make_heap, max, max_element, merge, min, min_element,
768 minmax, minmax_element, mismatch, next_permutation, none_of,
769 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
770 partition_point, pop_heap, prev_permutation, push_heap, remove,
771 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
772 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
773 search, search_n, set_difference, set_intersection,
774 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
775 stable_partition, stable_sort, swap_ranges, transform, unique,
776 unique_copy, upper_bound): Convert into function objects.
777 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
778 fill, move_backward, copy_backward): Likewise.
779 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
780 uninitialized_default_construct_n, uninitialized_value_construct,
781 uninitialized_value_construct_n, uninitialized_copy,
782 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
783 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
784 destroy, destroy_n): Likewise.
786 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
787 (ranges::find_end): ... here.
788 (ranges::__lexicographical_compare): Fold into ...
789 (ranges::lexicographical_compare): ... here.
790 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
791 (ranges::equal): ... here.
793 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
795 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
796 * include/std/deque: Likewise.
797 * include/std/forward_list: Likewise.
798 * include/std/list: Likewise.
799 * include/std/string: Likewise.
800 * include/std/vector: Likewise.
801 * include/std/version: Likewise.
802 * testsuite/23_containers/deque/erasure.cc: Test for new value.
803 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
804 * testsuite/23_containers/list/erasure.cc: Likewise.
805 * testsuite/23_containers/map/erasure.cc: Likewise.
806 * testsuite/23_containers/set/erasure.cc: Likewise.
807 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
808 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
809 * testsuite/23_containers/vector/erasure.cc: Likewise.
811 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
813 * include/bits/random.h (uniform_random_bit_generator): Require min()
814 and max() to be constant expressions and min() to be less than max().
815 * testsuite/26_numerics/random/concept.cc: Check additional cases.
816 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
818 2020-02-13 Patrick Palka <ppalka@redhat.com>
820 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
821 * include/Makefile.in: Regenerate.
822 * include/bits/ranges_uninitialized.h: New header.
823 * include/std/memory: Include it.
824 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
826 * .../uninitialized_copy/constrained.cc: New test.
827 * .../uninitialized_default_construct/constrained.cc: New test.
828 * .../uninitialized_fill/constrained.cc: New test.
829 * .../uninitialized_move/constrained.cc: New test.
830 * .../uninitialized_value_construct/constrained.cc: New test.
832 * include/Makefile.am: Add bits/ranges_algobase.h
833 * include/Makefile.in: Regenerate.
834 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
836 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
837 __detail::__is_move_iterator, copy_result, move_result,
838 __equal, equal, copy_result, move_result, move_backward_result,
839 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
840 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
841 fill): Split out into ...
842 * bits/range_algobase.h: ... this new header.
844 2020-02-12 Patrick Palka <ppalka@redhat.com>
846 LWG 3389 and LWG 3390
847 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
848 constructing the move_iterator with __i.
849 (counted_iterator::counted_iterator): Use std::move when initializing
851 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
852 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
854 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
859 * configure: Regenerated.
861 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
863 * include/bits/hashtable.h
864 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
865 missing std namespace qualification to forward call.
867 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
869 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
871 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
873 * include/std/ranges: Fix non-ASCII characters in comment.
875 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
876 equality comparison to be valid and return bool.
877 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
878 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
879 type with ambiguous conversion to fundamental types.
880 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
882 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
884 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
886 (readable_traits): Rename to indirectly_readable_traits.
887 (readable): Rename to indirectly_readable.
888 (writable): Rename to indirectly_writable.
889 (__detail::__iter_exchange_move): Do not use remove_reference_t.
890 (indirectly_swappable): Adjust requires expression parameter types.
892 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
893 (ranges::replace_if, ranges::generate_n, ranges::generate)
894 (ranges::remove): Use new name for writable.
895 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
896 Use new name for readable.
897 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
898 new name for readable_traits.
899 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
900 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
901 new definition of indirectly_readable.
903 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
904 to take parameters of common_iterator, instead of the common_iterator
905 type itself. Fix argument for __common_iter_has_arrow constraint.
906 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
908 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
910 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
912 (basic_istream_view::_Iterator::operator++()): Add missing return.
914 2020-02-07 Patrick Palka <ppalka@redhat.com>
916 * include/bits/ranges_algo.h: Remove extraneous &&.
918 * include/std/ranges (ranges::__detail::__stream_extractable,
919 ranges::basic_istream_view, ranges::istream_view): Define.
920 * testsuite/std/ranges/istream_view: New test.
922 Implement C++20 range adaptors
923 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
924 (subrange::_S_store_size): Mark as const instead of constexpr to
925 avoid what seems to be a bug in GCC.
926 (__detail::__box): Give it defaulted copy and move constructors.
927 (ranges::views::_Single::operator()): Mark constexpr.
928 (ranges::views::_Iota::operator()): Mark constexpr.
929 (__detail::Empty): Define.
930 (ranges::views::__closure::_RangeAdaptor,
931 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
932 ranges::views::all, ranges::__detail::find_if,
933 ranges::__detail::find_if_not, ranges::__detail::mismatch,
934 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
935 ranges::views::transform, take_view, ranges::views::take,
936 take_while_view, ranges::views::take_while, drop_view,
937 ranges::views::drop, join_view, ranges::views::join,
938 __detail::require_constant, __detail::tiny_range, split_view,
939 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
940 common_view, ranges::views::common, reverse_view,
941 ranges::views::reverse,
942 ranges::views::__detail::__is_reversible_subrange,
943 ranges::views::__detail::__is_reverse_view, reverse_view,
944 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
945 ranges::views::elements, ranges::views::keys, ranges::views::values):
947 (views): Alias for ranges::views.
948 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
949 tuple_element<1, ranges::subrange>): New partial specializations.
950 * testsuite/std/ranges/adaptors/all.cc: New test.
951 * testsuite/std/ranges/adaptors/common.cc: Likewise.
952 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
953 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
954 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
955 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
956 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
957 * testsuite/std/ranges/adaptors/join.cc: Likewise.
958 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
959 * testsuite/std/ranges/adaptors/split.cc: Likewise.
960 * testsuite/std/ranges/adaptors/take.cc: Likewise.
961 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
962 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
964 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
966 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
967 type of enumerations and comparison category types.
968 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
969 (__cmp_cat::_Ncmp::unordered): Change value to 2.
970 (partial_ordering::_M_value, weak_ordering::_M_value)
971 (strong_ordering::_M_value): Change type to __cmp_cat::type.
972 (partial_ordering::_M_is_ordered): Remove data member.
973 (partial_ordering): Use second bit of _M_value for unordered. Adjust
974 comparison operators.
975 (weak_ordering::operator partial_ordering): Simplify to remove
977 (operator<=>(unspecified, weak_ordering)): Likewise.
978 (strong_ordering::operator partial_ordering): Likewise.
979 (strong_ordering::operator weak_ordering): Likewise.
980 (operator<=>(unspecified, strong_ordering)): Likewise.
981 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
982 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
983 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
985 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
986 __cpp_lib_three_way_comparison macro and use deduced return type for
988 * testsuite/std/ranges/iota/iterator.cc: New test.
990 2020-02-07 Patrick Palka <ppalka@redhat.com>
991 Jonathan Wakely <jwakely@redhat.com>
993 Implement C++20 constrained algorithms
994 * include/Makefile.am: Add new header.
995 * include/Makefile.in: Regenerate.
996 * include/std/algorithm: Include <bits/ranges_algo.h>.
997 * include/bits/ranges_algo.h: New file.
998 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
999 * testsuite/25_algorithms/all_of/constrained.cc: New test.
1000 * testsuite/25_algorithms/any_of/constrained.cc: New test.
1001 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
1002 * testsuite/25_algorithms/copy/constrained.cc: New test.
1003 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
1004 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
1005 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
1006 * testsuite/25_algorithms/count/constrained.cc: New test.
1007 * testsuite/25_algorithms/count_if/constrained.cc: New test.
1008 * testsuite/25_algorithms/equal/constrained.cc: New test.
1009 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
1010 * testsuite/25_algorithms/fill/constrained.cc: New test.
1011 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
1012 * testsuite/25_algorithms/find/constrained.cc: New test.
1013 * testsuite/25_algorithms/find_end/constrained.cc: New test.
1014 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
1015 * testsuite/25_algorithms/find_if/constrained.cc: New test.
1016 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
1017 * testsuite/25_algorithms/for_each/constrained.cc: New test.
1018 * testsuite/25_algorithms/generate/constrained.cc: New test.
1019 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
1020 * testsuite/25_algorithms/heap/constrained.cc: New test.
1021 * testsuite/25_algorithms/includes/constrained.cc: New test.
1022 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
1023 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
1024 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
1025 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
1026 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
1027 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
1029 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
1030 * testsuite/25_algorithms/max/constrained.cc: New test.
1031 * testsuite/25_algorithms/max_element/constrained.cc: New test.
1032 * testsuite/25_algorithms/merge/constrained.cc: New test.
1033 * testsuite/25_algorithms/min/constrained.cc: New test.
1034 * testsuite/25_algorithms/min_element/constrained.cc: New test.
1035 * testsuite/25_algorithms/minmax/constrained.cc: New test.
1036 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
1037 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
1038 * testsuite/25_algorithms/move/constrained.cc: New test.
1039 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
1040 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
1041 * testsuite/25_algorithms/none_of/constrained.cc: New test.
1042 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
1043 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
1044 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
1045 * testsuite/25_algorithms/partition/constrained.cc: New test.
1046 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
1047 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
1048 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
1049 * testsuite/25_algorithms/remove/constrained.cc: New test.
1050 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
1051 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
1052 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
1053 * testsuite/25_algorithms/replace/constrained.cc: New test.
1054 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
1055 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
1056 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
1057 * testsuite/25_algorithms/reverse/constrained.cc: New test.
1058 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
1059 * testsuite/25_algorithms/rotate/constrained.cc: New test.
1060 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
1061 * testsuite/25_algorithms/search/constrained.cc: New test.
1062 * testsuite/25_algorithms/search_n/constrained.cc: New test.
1063 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
1064 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
1065 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
1067 * testsuite/25_algorithms/set_union/constrained.cc: New test.
1068 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
1069 * testsuite/25_algorithms/sort/constrained.cc: New test.
1070 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
1071 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
1072 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
1073 * testsuite/25_algorithms/transform/constrained.cc: New test.
1074 * testsuite/25_algorithms/unique/constrained.cc: New test.
1075 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
1076 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
1078 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
1080 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
1081 number in comment. Fix indentation.
1083 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
1084 redundant _GLIBCXX20_CONSTEXPR.
1086 * include/std/ranges (viewable_range): Replace decay_t with
1087 remove_cvref_t (LWG 3375).
1089 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
1091 * include/bits/iterator_concepts.h (iter_reference_t)
1092 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
1093 Remove workarounds for PR c++/67704.
1094 * testsuite/24_iterators/aliases.cc: New test.
1096 2020-02-05 Patrick Palka <ppalka@redhat.com>
1098 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
1099 when initializing _M_current.
1100 (move_iterator::base): Split into two overloads differing in
1101 ref-qualifiers as in P1207R4 for C++20.
1103 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
1105 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
1109 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
1110 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
1111 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
1113 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
1115 * configure: Regenerate.
1117 2020-01-31 Patrick Palka <ppalka@redhat.com>
1119 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
1120 test_range::end() returns the same type as test_range::begin().
1121 * testsuite/24_iterators/range_operations/next.cc: Likewise.
1122 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
1123 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
1124 Always return a sentinel<I>.
1126 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
1129 * include/std/stop_token (stop_token::stop_possible()): Call new
1130 _M_stop_possible() function.
1131 (stop_token::stop_requested()): Do not use stop_possible().
1132 (stop_token::binary_semaphore): New class, as temporary stand-in for
1133 std::binary_semaphore.
1134 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
1135 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
1136 New data members for symchronization with stop_callback destruction.
1137 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
1138 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
1140 (stop_token::_Stop_cb::_M_run): New member function.
1141 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
1143 (stop_token::_Stop_state::_M_owners): New data member to track
1144 reference count for ownership.
1145 (stop_token::_Stop_state::_M_value): New data member combining a
1146 spinlock, the stop requested flag, and the reference count for
1147 associated stop_source objects.
1148 (stop_token::_Stop_state::_M_requester): New data member for
1149 synchronization with stop_callback destruction.
1150 (stop_token::_Stop_state::_M_stop_possible()): New member function.
1151 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
1153 (stop_token::_Stop_state::_M_add_owner)
1154 (stop_token::_Stop_state::_M_release_ownership)
1155 (stop_token::_Stop_state::_M_add_ssrc)
1156 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
1157 updating reference counts.
1158 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
1159 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
1160 (stop_token::_Stop_state::_M_try_lock)
1161 (stop_token::_Stop_state::_M_try_lock_and_stop)
1162 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
1164 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
1165 read and update state. Release lock while running callbacks. Use new
1166 data members to synchronize with callback destruction.
1167 (stop_token::_Stop_state::_M_remove_callback): Likewise.
1168 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
1169 to read and update state.
1170 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
1171 replacing shared_ptr.
1172 (stop_source::stop_source(const stop_source&)): Update reference count.
1173 (stop_source::operator=(const stop_source&)): Likewise.
1174 (stop_source::~stop_source()): Likewise.
1175 (stop_source::stop_source(stop_source&&)): Define as defaulted.
1176 (stop_source::operator=(stop_source&&)): Establish postcondition on
1178 (stop_callback): Enforce preconditions on template parameter. Replace
1179 base class with data member of new _Cb_impl type.
1180 (stop_callback::stop_callback(const stop_token&, Cb&&))
1181 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
1182 (stop_callback::_Cb_impl): New type wrapping _Callback member and
1183 defining the _S_execute member function.
1184 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
1186 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
1187 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
1188 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
1190 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
1192 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
1193 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
1194 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
1197 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
1198 three_way_comparable_with.
1199 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
1200 (compare_three_way::operator()): Remove redundant constraint from
1202 (__detail::_Synth3way::operator()): Use three_way_comparable_with
1203 instead of workaround.
1204 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
1205 output due to simplified constraints on compare_three_way::operator().
1208 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
1209 * testsuite/18_support/comparisons/object/93479.cc: New test.
1211 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
1212 returns the same type as test_range::begin(). Add comments.
1213 * testsuite/std/ranges/access/rbegin.cc: Likewise.
1214 * testsuite/std/ranges/access/rend.cc: Likewise.
1215 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
1216 test_range is the same as its iterator type.
1217 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
1218 operator- overloads to satisfy sized_sentinel_for when the iterator
1219 satisfies random_access_iterator.
1221 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
1224 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
1225 static assertion to object types.
1228 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
1229 clock_gettime instead of explicit glibc version check.
1230 * configure: Regenerate.
1232 2020-01-28 Martin Liska <mliska@suse.cz>
1235 * include/std/atomic: Fix typo.
1236 * include/std/optional: Likewise.
1238 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
1240 * configure: Regenerate.
1242 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
1245 * include/std/span (span): Fix deduction guide.
1246 * testsuite/23_containers/span/deduction.cc: New test.
1248 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
1250 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
1251 (__cmp_cat::_Ord::equivalent): Add enumerator.
1252 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
1254 (partial_ordering, weak_ordering, strong_ordering): Remove
1255 constructors taking __cmp_cat::_Eq parameters. Use renamed
1258 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
1260 * acinclude.m4: Handle `--with-toolexeclibdir='.
1261 * Makefile.in: Regenerate.
1262 * aclocal.m4: Regenerate.
1263 * configure: Regenerate.
1264 * doc/Makefile.in: Regenerate.
1265 * include/Makefile.in: Regenerate.
1266 * libsupc++/Makefile.in: Regenerate.
1267 * po/Makefile.in: Regenerate.
1268 * python/Makefile.in: Regenerate.
1269 * src/Makefile.in: Regenerate.
1270 * src/c++11/Makefile.in: Regenerate.
1271 * src/c++17/Makefile.in: Regenerate.
1272 * src/c++98/Makefile.in: Regenerate.
1273 * src/filesystem/Makefile.in: Regenerate.
1274 * testsuite/Makefile.in: Regenerate.
1276 2020-01-23 Alexandre Oliva <oliva@adacore.com>
1278 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
1279 * configure: Rebuild.
1281 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
1283 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
1286 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
1288 * include/Makefile.in: Regenerate.
1290 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
1292 * doc/xml/faq.xml: Fix grammar.
1293 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
1294 * doc/xml/manual/spine.xml: Update copyright years.
1295 * doc/html/*: Regenerate.
1297 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
1299 * doc/xml/faq.xml: Update for SVN -> Git transition.
1300 * doc/xml/manual/appendix_contributing.xml: Likewise.
1301 * doc/xml/manual/status_cxx1998.xml: Likewise.
1302 * doc/xml/manual/status_cxx2011.xml: Likewise.
1303 * doc/xml/manual/status_cxx2014.xml: Likewise.
1304 * doc/xml/manual/status_cxx2017.xml: Likewise.
1305 * doc/xml/manual/status_cxx2020.xml: Likewise.
1306 * doc/xml/manual/status_cxxtr1.xml: Likewise.
1307 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
1309 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
1311 * include/Makefile.am: Add coroutine to the std set.
1312 * include/Makefile.in: Regenerated.
1313 * include/std/coroutine: New file.
1315 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
1318 * include/bits/c++config: Only do PSTL config when the header is
1319 present, to fix freestanding.
1320 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
1321 functions if they were detected by configure.
1323 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
1324 Matthew Bauer <mjbauer95@gmail.com>
1325 Jonathan Wakely <jwakely@redhat.com>
1327 PR bootstrap/64271 (partial)
1328 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
1330 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
1331 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
1332 definitions with NetBSD upstream.
1333 (ctype_base::blank): Use _CTYPE_BL.
1334 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
1336 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
1337 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
1338 parameters to unsigned char.
1339 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
1341 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
1344 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
1345 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
1346 (_Equality_base): Remove.
1347 (_Equality<>::_M_equal): Review implementation. Use
1348 std::is_permutation.
1349 * testsuite/23_containers/unordered_multiset/operators/1.cc
1350 (Hash, Equal, test02, test03): New.
1351 * testsuite/23_containers/unordered_set/operators/1.cc
1352 (Hash, Equal, test02, test03): New.
1354 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
1357 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
1358 Move here from <bits/range_access.h> and define using __int128 when
1360 (__is_integer_like, __is_signed_integer_like): Move here from
1361 <bits/range_access.h>.
1362 (weakly_incrementable): Use __is_signed_integer_like.
1363 * include/bits/range_access.h (__max_diff_type, __max_size_type)
1364 (__is_integer_like, __is_signed_integer_like): Move to
1365 <bits/iterator_concepts.h>.
1366 (__make_unsigned_like_t): Move here from <ranges>.
1367 * include/std/ranges (__make_unsigned_like_t): Move to
1368 <bits/range_access.h>.
1369 (iota_view): Replace using-directive with using-declarations.
1370 * testsuite/std/ranges/iota/93267.cc: New test.
1371 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
1373 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
1376 * include/bits/fs_path.h (path::generic_string<C,A>)
1377 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
1378 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
1379 root-dir is converted to forward slash in generic pathname.
1380 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
1381 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
1384 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
1386 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
1387 (__atomic_float): Add default member initializer for C++20.
1388 * include/std/atomic (atomic): Likewise.
1389 (atomic::atomic()): Remove noexcept-specifier on default constructor.
1390 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
1391 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
1393 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
1394 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
1395 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
1396 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
1397 expected result for is_trivially_default_constructible.
1398 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
1399 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
1400 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
1401 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
1402 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
1403 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
1404 expected results for is_trivially_default_constructible.
1405 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
1408 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
1410 * testsuite/util/testsuite_iterators.h: Improve comment.
1412 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
1413 initialization syntax.
1416 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
1417 of base class independent of __cplusplus value.
1418 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
1419 type defined in the base class
1420 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
1421 * testsuite/24_iterators/istreambuf_iterator/requirements/
1422 base_classes.cc: Adjust expected base class for C++98.
1424 2020-01-09 Olivier Hainque <hainque@adacore.com>
1426 * doc/xml/manual/appendix_contributing.xml: Document _C2
1427 as a reserved identifier, by VxWorks.
1428 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
1429 * include/bits/stl_multimap.h: Likewise.
1431 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
1433 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
1434 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
1435 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
1436 partial specialization to disambiguate the two constrained
1439 * include/experimental/type_traits (experimental::is_pod_v): Disable
1440 -Wdeprecated-declarations warnings around reference to std::is_pod.
1441 * include/std/type_traits (is_pod_v): Likewise.
1442 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
1443 is_standard_layout and is_trivial. Do not check is_pod for C++20.
1444 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
1445 Add -Wno-deprecated for C++20.
1446 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
1447 * testsuite/20_util/is_pod/value.cc: Likewise.
1448 * testsuite/experimental/type_traits/value.cc: Likewise.
1450 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
1452 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
1453 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
1454 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
1456 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
1459 * include/bits/random.h (operator>>): Check stream operation succeeds.
1460 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
1462 (operator>>): Remove redundant __istream_type typedefs. Check stream
1464 (__extract_params): New function to fill a vector from a stream.
1465 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
1468 * config/abi/pre/gnu.ver: Add new exports.
1469 * include/std/memory_resource (memory_resource::~memory_resource()):
1470 Do not define inline.
1471 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
1472 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
1474 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
1475 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
1477 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
1480 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
1482 (_Hashtable<>::__fwd_value_for): New.
1483 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
1485 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
1486 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
1487 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
1489 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
1490 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
1492 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
1494 * testsuite/23_containers/unordered_set/92124.cc: New.
1496 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
1499 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
1500 detailed error reporting for remove_all. Check result of recursive
1501 call before incrementing iterator.
1502 (remove_all(const path&), remove_all(const path&, error_code&)): Use
1504 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
1505 result of recursive call before incrementing iterator.
1506 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
1507 are reported correctly.
1508 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
1510 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
1512 * include/std/condition_variable
1513 (condition_variable_any::wait_on): Rename to match current draft
1515 (condition_variable_any::wait_on_until): Likewise.
1516 (condition_variable_any::wait_on_for): Likewise.
1517 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
1518 Adjust tests to account for renamed methods.
1520 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
1523 * include/bits/stl_tree.h
1524 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
1525 std::move_if_noexcept by std::move.
1526 * testsuite/23_containers/map/92124.cc: New.
1527 * testsuite/23_containers/set/92124.cc: New.
1529 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
1531 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
1532 (stop_source): Likewise (LWG 3362).
1533 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
1536 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
1537 (lexicographical_compare_three_way): Do not depend on
1539 * include/std/version (__cpp_lib_three_way_comparison): Only define
1540 when __cpp_lib_concepts is defined.
1541 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
1543 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
1545 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
1546 Only define four-argument overload when __cpp_lib_concepts is defined.
1548 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
1550 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
1552 2020-01-01 Jakub Jelinek <jakub@redhat.com>
1554 Update copyright years.
1556 Copyright (C) 2020 Free Software Foundation, Inc.
1558 Copying and distribution of this file, with or without modification,
1559 are permitted in any medium without royalty provided the copyright
1560 notice and this notice are preserved.