1 2020-02-07 Patrick Palka <ppalka@redhat.com>
3 Implement C++20 range adaptors
4 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
5 (subrange::_S_store_size): Mark as const instead of constexpr to
6 avoid what seems to be a bug in GCC.
7 (__detail::__box): Give it defaulted copy and move constructors.
8 (views::_Single::operator()): Mark constexpr.
9 (views::_Iota::operator()): Mark constexpr.
10 (__detail::Empty): Define.
11 (views::_RangeAdaptor, views::_RangeAdaptorClosure, ref_view, all_view,
12 views::all, filter_view, views::filter, transform_view,
13 views::transform, take_view, views::take, take_while_view,
14 views::take_while, drop_view, views::drop, join_view, views::join,
15 __detail::require_constant, __detail::tiny_range, split_view,
16 views::split, views::_Counted, views::counted, common_view,
17 views::common, reverse_view, views::reverse,
18 views::__detail::__is_reversible_subrange,
19 views::__detail::__is_reverse_view, reverse_view, views::reverse,
20 __detail::__has_tuple_element, elements_view, views::elements,
21 views::keys, views::values): Define.
22 * testsuite/std/ranges/adaptors/all.cc: New test.
23 * testsuite/std/ranges/adaptors/common.cc: Likewise.
24 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
25 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
26 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
27 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
28 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
29 * testsuite/std/ranges/adaptors/join.cc: Likewise.
30 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
31 * testsuite/std/ranges/adaptors/split.cc: Likewise.
32 * testsuite/std/ranges/adaptors/take.cc: Likewise.
33 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
34 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
36 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
38 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
39 type of enumerations and comparison category types.
40 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
41 (__cmp_cat::_Ncmp::unordered): Change value to 2.
42 (partial_ordering::_M_value, weak_ordering::_M_value)
43 (strong_ordering::_M_value): Change type to __cmp_cat::type.
44 (partial_ordering::_M_is_ordered): Remove data member.
45 (partial_ordering): Use second bit of _M_value for unordered. Adjust
47 (weak_ordering::operator partial_ordering): Simplify to remove
49 (operator<=>(unspecified, weak_ordering)): Likewise.
50 (strong_ordering::operator partial_ordering): Likewise.
51 (strong_ordering::operator weak_ordering): Likewise.
52 (operator<=>(unspecified, strong_ordering)): Likewise.
53 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
54 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
55 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
57 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
58 __cpp_lib_three_way_comparison macro and use deduced return type for
60 * testsuite/std/ranges/iota/iterator.cc: New test.
62 2020-02-07 Patrick Palka <ppalka@redhat.com>
63 Jonathan Wakely <jwakely@redhat.com>
65 Implement C++20 constrained algorithms
66 * include/Makefile.am: Add new header.
67 * include/Makefile.in: Regenerate.
68 * include/std/algorithm: Include <bits/ranges_algo.h>.
69 * include/bits/ranges_algo.h: New file.
70 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
71 * testsuite/25_algorithms/all_of/constrained.cc: New test.
72 * testsuite/25_algorithms/any_of/constrained.cc: New test.
73 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
74 * testsuite/25_algorithms/copy/constrained.cc: New test.
75 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
76 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
77 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
78 * testsuite/25_algorithms/count/constrained.cc: New test.
79 * testsuite/25_algorithms/count_if/constrained.cc: New test.
80 * testsuite/25_algorithms/equal/constrained.cc: New test.
81 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
82 * testsuite/25_algorithms/fill/constrained.cc: New test.
83 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
84 * testsuite/25_algorithms/find/constrained.cc: New test.
85 * testsuite/25_algorithms/find_end/constrained.cc: New test.
86 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
87 * testsuite/25_algorithms/find_if/constrained.cc: New test.
88 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
89 * testsuite/25_algorithms/for_each/constrained.cc: New test.
90 * testsuite/25_algorithms/generate/constrained.cc: New test.
91 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
92 * testsuite/25_algorithms/heap/constrained.cc: New test.
93 * testsuite/25_algorithms/includes/constrained.cc: New test.
94 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
95 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
96 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
97 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
98 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
99 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
101 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
102 * testsuite/25_algorithms/max/constrained.cc: New test.
103 * testsuite/25_algorithms/max_element/constrained.cc: New test.
104 * testsuite/25_algorithms/merge/constrained.cc: New test.
105 * testsuite/25_algorithms/min/constrained.cc: New test.
106 * testsuite/25_algorithms/min_element/constrained.cc: New test.
107 * testsuite/25_algorithms/minmax/constrained.cc: New test.
108 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
109 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
110 * testsuite/25_algorithms/move/constrained.cc: New test.
111 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
112 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
113 * testsuite/25_algorithms/none_of/constrained.cc: New test.
114 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
115 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
116 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
117 * testsuite/25_algorithms/partition/constrained.cc: New test.
118 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
119 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
120 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
121 * testsuite/25_algorithms/remove/constrained.cc: New test.
122 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
123 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
124 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
125 * testsuite/25_algorithms/replace/constrained.cc: New test.
126 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
127 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
128 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
129 * testsuite/25_algorithms/reverse/constrained.cc: New test.
130 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
131 * testsuite/25_algorithms/rotate/constrained.cc: New test.
132 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
133 * testsuite/25_algorithms/search/constrained.cc: New test.
134 * testsuite/25_algorithms/search_n/constrained.cc: New test.
135 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
136 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
137 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
139 * testsuite/25_algorithms/set_union/constrained.cc: New test.
140 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
141 * testsuite/25_algorithms/sort/constrained.cc: New test.
142 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
143 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
144 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
145 * testsuite/25_algorithms/transform/constrained.cc: New test.
146 * testsuite/25_algorithms/unique/constrained.cc: New test.
147 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
148 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
150 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
152 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
153 number in comment. Fix indentation.
155 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
156 redundant _GLIBCXX20_CONSTEXPR.
158 * include/std/ranges (viewable_range): Replace decay_t with
159 remove_cvref_t (LWG 3375).
161 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
163 * include/bits/iterator_concepts.h (iter_reference_t)
164 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
165 Remove workarounds for PR c++/67704.
166 * testsuite/24_iterators/aliases.cc: New test.
168 2020-02-05 Patrick Palka <ppalka@redhat.com>
170 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
171 when initializing _M_current.
172 (move_iterator::base): Split into two overloads differing in
173 ref-qualifiers as in P1207R4 for C++20.
175 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
177 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
181 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
182 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
183 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
185 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
187 * configure: Regenerate.
189 2020-01-31 Patrick Palka <ppalka@redhat.com>
191 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
192 test_range::end() returns the same type as test_range::begin().
193 * testsuite/24_iterators/range_operations/next.cc: Likewise.
194 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
195 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
196 Always return a sentinel<I>.
198 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
201 * include/std/stop_token (stop_token::stop_possible()): Call new
202 _M_stop_possible() function.
203 (stop_token::stop_requested()): Do not use stop_possible().
204 (stop_token::binary_semaphore): New class, as temporary stand-in for
205 std::binary_semaphore.
206 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
207 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
208 New data members for symchronization with stop_callback destruction.
209 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
210 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
212 (stop_token::_Stop_cb::_M_run): New member function.
213 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
215 (stop_token::_Stop_state::_M_owners): New data member to track
216 reference count for ownership.
217 (stop_token::_Stop_state::_M_value): New data member combining a
218 spinlock, the stop requested flag, and the reference count for
219 associated stop_source objects.
220 (stop_token::_Stop_state::_M_requester): New data member for
221 synchronization with stop_callback destruction.
222 (stop_token::_Stop_state::_M_stop_possible()): New member function.
223 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
225 (stop_token::_Stop_state::_M_add_owner)
226 (stop_token::_Stop_state::_M_release_ownership)
227 (stop_token::_Stop_state::_M_add_ssrc)
228 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
229 updating reference counts.
230 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
231 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
232 (stop_token::_Stop_state::_M_try_lock)
233 (stop_token::_Stop_state::_M_try_lock_and_stop)
234 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
236 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
237 read and update state. Release lock while running callbacks. Use new
238 data members to synchronize with callback destruction.
239 (stop_token::_Stop_state::_M_remove_callback): Likewise.
240 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
241 to read and update state.
242 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
243 replacing shared_ptr.
244 (stop_source::stop_source(const stop_source&)): Update reference count.
245 (stop_source::operator=(const stop_source&)): Likewise.
246 (stop_source::~stop_source()): Likewise.
247 (stop_source::stop_source(stop_source&&)): Define as defaulted.
248 (stop_source::operator=(stop_source&&)): Establish postcondition on
250 (stop_callback): Enforce preconditions on template parameter. Replace
251 base class with data member of new _Cb_impl type.
252 (stop_callback::stop_callback(const stop_token&, Cb&&))
253 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
254 (stop_callback::_Cb_impl): New type wrapping _Callback member and
255 defining the _S_execute member function.
256 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
258 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
259 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
260 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
262 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
264 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
265 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
266 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
269 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
270 three_way_comparable_with.
271 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
272 (compare_three_way::operator()): Remove redundant constraint from
274 (__detail::_Synth3way::operator()): Use three_way_comparable_with
275 instead of workaround.
276 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
277 output due to simplified constraints on compare_three_way::operator().
280 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
281 * testsuite/18_support/comparisons/object/93479.cc: New test.
283 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
284 returns the same type as test_range::begin(). Add comments.
285 * testsuite/std/ranges/access/rbegin.cc: Likewise.
286 * testsuite/std/ranges/access/rend.cc: Likewise.
287 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
288 test_range is the same as its iterator type.
289 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
290 operator- overloads to satisfy sized_sentinel_for when the iterator
291 satisfies random_access_iterator.
293 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
296 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
297 static assertion to object types.
300 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
301 clock_gettime instead of explicit glibc version check.
302 * configure: Regenerate.
304 2020-01-28 Martin Liska <mliska@suse.cz>
307 * include/std/atomic: Fix typo.
308 * include/std/optional: Likewise.
310 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
312 * configure: Regenerate.
314 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
317 * include/std/span (span): Fix deduction guide.
318 * testsuite/23_containers/span/deduction.cc: New test.
320 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
322 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
323 (__cmp_cat::_Ord::equivalent): Add enumerator.
324 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
326 (partial_ordering, weak_ordering, strong_ordering): Remove
327 constructors taking __cmp_cat::_Eq parameters. Use renamed
330 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
332 * acinclude.m4: Handle `--with-toolexeclibdir='.
333 * Makefile.in: Regenerate.
334 * aclocal.m4: Regenerate.
335 * configure: Regenerate.
336 * doc/Makefile.in: Regenerate.
337 * include/Makefile.in: Regenerate.
338 * libsupc++/Makefile.in: Regenerate.
339 * po/Makefile.in: Regenerate.
340 * python/Makefile.in: Regenerate.
341 * src/Makefile.in: Regenerate.
342 * src/c++11/Makefile.in: Regenerate.
343 * src/c++17/Makefile.in: Regenerate.
344 * src/c++98/Makefile.in: Regenerate.
345 * src/filesystem/Makefile.in: Regenerate.
346 * testsuite/Makefile.in: Regenerate.
348 2020-01-23 Alexandre Oliva <oliva@adacore.com>
350 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
351 * configure: Rebuild.
353 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
355 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
358 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
360 * include/Makefile.in: Regenerate.
362 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
364 * doc/xml/faq.xml: Fix grammar.
365 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
366 * doc/xml/manual/spine.xml: Update copyright years.
367 * doc/html/*: Regenerate.
369 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
371 * doc/xml/faq.xml: Update for SVN -> Git transition.
372 * doc/xml/manual/appendix_contributing.xml: Likewise.
373 * doc/xml/manual/status_cxx1998.xml: Likewise.
374 * doc/xml/manual/status_cxx2011.xml: Likewise.
375 * doc/xml/manual/status_cxx2014.xml: Likewise.
376 * doc/xml/manual/status_cxx2017.xml: Likewise.
377 * doc/xml/manual/status_cxx2020.xml: Likewise.
378 * doc/xml/manual/status_cxxtr1.xml: Likewise.
379 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
381 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
383 * include/Makefile.am: Add coroutine to the std set.
384 * include/Makefile.in: Regenerated.
385 * include/std/coroutine: New file.
387 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
390 * include/bits/c++config: Only do PSTL config when the header is
391 present, to fix freestanding.
392 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
393 functions if they were detected by configure.
395 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
396 Matthew Bauer <mjbauer95@gmail.com>
397 Jonathan Wakely <jwakely@redhat.com>
399 PR bootstrap/64271 (partial)
400 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
402 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
403 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
404 definitions with NetBSD upstream.
405 (ctype_base::blank): Use _CTYPE_BL.
406 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
408 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
409 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
410 parameters to unsigned char.
411 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
413 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
416 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
417 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
418 (_Equality_base): Remove.
419 (_Equality<>::_M_equal): Review implementation. Use
421 * testsuite/23_containers/unordered_multiset/operators/1.cc
422 (Hash, Equal, test02, test03): New.
423 * testsuite/23_containers/unordered_set/operators/1.cc
424 (Hash, Equal, test02, test03): New.
426 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
429 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
430 Move here from <bits/range_access.h> and define using __int128 when
432 (__is_integer_like, __is_signed_integer_like): Move here from
433 <bits/range_access.h>.
434 (weakly_incrementable): Use __is_signed_integer_like.
435 * include/bits/range_access.h (__max_diff_type, __max_size_type)
436 (__is_integer_like, __is_signed_integer_like): Move to
437 <bits/iterator_concepts.h>.
438 (__make_unsigned_like_t): Move here from <ranges>.
439 * include/std/ranges (__make_unsigned_like_t): Move to
440 <bits/range_access.h>.
441 (iota_view): Replace using-directive with using-declarations.
442 * testsuite/std/ranges/iota/93267.cc: New test.
443 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
445 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
448 * include/bits/fs_path.h (path::generic_string<C,A>)
449 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
450 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
451 root-dir is converted to forward slash in generic pathname.
452 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
453 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
456 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
458 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
459 (__atomic_float): Add default member initializer for C++20.
460 * include/std/atomic (atomic): Likewise.
461 (atomic::atomic()): Remove noexcept-specifier on default constructor.
462 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
463 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
465 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
466 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
467 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
468 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
469 expected result for is_trivially_default_constructible.
470 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
471 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
472 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
473 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
474 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
475 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
476 expected results for is_trivially_default_constructible.
477 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
480 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
482 * testsuite/util/testsuite_iterators.h: Improve comment.
484 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
485 initialization syntax.
488 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
489 of base class independent of __cplusplus value.
490 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
491 type defined in the base class
492 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
493 * testsuite/24_iterators/istreambuf_iterator/requirements/
494 base_classes.cc: Adjust expected base class for C++98.
496 2020-01-09 Olivier Hainque <hainque@adacore.com>
498 * doc/xml/manual/appendix_contributing.xml: Document _C2
499 as a reserved identifier, by VxWorks.
500 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
501 * include/bits/stl_multimap.h: Likewise.
503 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
505 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
506 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
507 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
508 partial specialization to disambiguate the two constrained
511 * include/experimental/type_traits (experimental::is_pod_v): Disable
512 -Wdeprecated-declarations warnings around reference to std::is_pod.
513 * include/std/type_traits (is_pod_v): Likewise.
514 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
515 is_standard_layout and is_trivial. Do not check is_pod for C++20.
516 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
517 Add -Wno-deprecated for C++20.
518 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
519 * testsuite/20_util/is_pod/value.cc: Likewise.
520 * testsuite/experimental/type_traits/value.cc: Likewise.
522 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
524 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
525 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
526 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
528 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
531 * include/bits/random.h (operator>>): Check stream operation succeeds.
532 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
534 (operator>>): Remove redundant __istream_type typedefs. Check stream
536 (__extract_params): New function to fill a vector from a stream.
537 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
540 * config/abi/pre/gnu.ver: Add new exports.
541 * include/std/memory_resource (memory_resource::~memory_resource()):
542 Do not define inline.
543 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
544 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
546 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
547 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
549 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
552 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
554 (_Hashtable<>::__fwd_value_for): New.
555 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
557 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
558 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
559 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
561 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
562 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
564 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
566 * testsuite/23_containers/unordered_set/92124.cc: New.
568 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
571 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
572 detailed error reporting for remove_all. Check result of recursive
573 call before incrementing iterator.
574 (remove_all(const path&), remove_all(const path&, error_code&)): Use
576 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
577 result of recursive call before incrementing iterator.
578 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
579 are reported correctly.
580 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
582 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
584 * include/std/condition_variable
585 (condition_variable_any::wait_on): Rename to match current draft
587 (condition_variable_any::wait_on_until): Likewise.
588 (condition_variable_any::wait_on_for): Likewise.
589 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
590 Adjust tests to account for renamed methods.
592 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
595 * include/bits/stl_tree.h
596 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
597 std::move_if_noexcept by std::move.
598 * testsuite/23_containers/map/92124.cc: New.
599 * testsuite/23_containers/set/92124.cc: New.
601 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
603 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
604 (stop_source): Likewise (LWG 3362).
605 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
608 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
609 (lexicographical_compare_three_way): Do not depend on
611 * include/std/version (__cpp_lib_three_way_comparison): Only define
612 when __cpp_lib_concepts is defined.
613 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
615 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
617 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
618 Only define four-argument overload when __cpp_lib_concepts is defined.
620 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
622 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
624 2020-01-01 Jakub Jelinek <jakub@redhat.com>
626 Update copyright years.
628 Copyright (C) 2020 Free Software Foundation, Inc.
630 Copying and distribution of this file, with or without modification,
631 are permitted in any medium without royalty provided the copyright
632 notice and this notice are preserved.