]> git.ipfire.org Git - thirdparty/gcc.git/blame - libstdc++-v3/ChangeLog
aix: Add GCC64 configuration and FAT target libraries.
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
CommitLineData
bbac3886
GA
12020-06-20 Jason Merrill <jason@redhat.com>
2
3 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
4 Remove greedy_ops tests.
5 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
6 Remove greedy_ops tests.
7
e37658df
GA
82020-06-19 Jonathan Wakely <jwakely@redhat.com>
9
10 PR libstdc++/95765
11 * include/bits/stl_algobase.h (__size_to_integer(float))
12 (__size_to_integer(double), __size_to_integer(long double))
13 (__size_to_integer(__float128)): Cast return type explicitly.
14 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
15 Remove unused typedef.
16
172020-06-19 Jonathan Wakely <jwakely@redhat.com>
18
19 * include/bits/stl_pair.h (_Index_tuple): Remove redundant
20 namespace qualification.
21 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
22 Likewise.
23 * include/std/tuple (_Head_base, _Tuple_impl, tuple_size)
24 (tuple_element, __get_helper, get, __make_tuple_impl)
25 (__make_1st_indices, __tuple_concater)
26 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
27 Likewise.
28 * include/std/utility (tuple_element, __is_tuple_like_impl)
29 (tuple_size, __pair_get, get): Likewise.
30
312020-06-19 Jonathan Wakely <jwakely@redhat.com>
32
33 * include/bits/std_function.h (function): Define all member
34 functions inline.
35
362020-06-19 Marc Glisse <marc.glisse@inria.fr>
37
38 * include/bits/stl_algo.h (__includes): Simplify the code.
39
402020-06-19 Marc Glisse <marc.glisse@inria.fr>
41
42 * include/std/optional (optional()): Explicitly define it.
43
aff95ee7
GA
442020-06-17 Jonathan Wakely <jwakely@redhat.com>
45
46 PR libstdc++/94540
47 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
48 Construct the first value at *__first instead of on the stack.
49 (__uninitialized_default_n_1<true>): Likewise.
50 Improve comments on several of the non-standard algorithms.
51 * testsuite/20_util/specialized_algorithms/uninitialized_default/94540.cc:
52 New test.
53 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/94540.cc:
54 New test.
55 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
56 New test.
57 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
58 New test.
59 * testsuite/23_containers/vector/cons/94540.cc: New test.
60
612020-06-17 Jonathan Wakely <jwakely@redhat.com>
62
63 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
64 Replace Value type with int so trivial code path is used.
65 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
66 Likewise.
67
682020-06-17 Jonathan Wakely <jwakely@redhat.com>
69
70 * include/bits/stl_uninitialized.h (uninitialized_fill_n): Only
71 use std::fill_n when the size is an integral type.
72 (__uninitialized_default_n): Likewise.
73 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
74 New test.
75 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
76 New test.
77 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
78 New test.
79
56638b9b
GA
802020-06-16 Jonathan Wakely <jwakely@redhat.com>
81
82 PR libstdc++/95282
83 * include/bits/atomic_base.h (__atomic_impl::load): Use the _Val
84 alias instead of deducing _Tp as an unqualified type.
85 (__atomic_impl::exchange): Use the _Val alias to remove volatile
86 from the reinterpret_cast result type.
87
882020-06-16 Jonathan Wakely <jwakely@redhat.com>
89
90 * include/std/atomic (atomic): Add static assertions.
91 * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
92
932020-06-16 Patrick Palka <ppalka@redhat.com>
94
95 PR libstdc++/94003
96 * testsuite/20_util/is_constructible/94003.cc: New test.
97
6fb94d67
GA
982020-06-15 Jonathan Wakely <jwakely@redhat.com>
99
100 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
101 Update value for C++20.
102 * include/std/version (__cpp_lib_constexpr_char_traits): Likewise.
103 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
104 Update expected value.
105 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
106 Likewise.
107
1082020-06-15 Paul Keir <paul.keir@uws.ac.uk>
109
110 * include/bits/char_traits.h (char_traits::move): constexpr move with
111 overlap was using copy_backward incorrectly.
112 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
113 New test.
114
8e3b453e
GA
1152020-06-12 Jonathan Wakely <jwakely@redhat.com>
116
117 * testsuite/29_atomics/atomic_flag/clear/1.cc: Also test clear()
118 when the value is currently set.
119 * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc:
120 Actually check the return value.
121 * testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc:
122 Likewise.
123
1242020-06-12 Jonathan Wakely <jwakely@redhat.com>
125
126 * include/bits/atomic_base.h (atomic_flag::test): Add missing
127 const qualifiers.
128 * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
129 dg-options and verify results of test function.
130 * testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
131
e68e80c8
GA
1322020-06-11 Jonathan Wakely <jwakely@redhat.com>
133
134 PR libstdc++/94749
135 * include/bits/istream.tcc (basic_istream::ignore(streamsize, CharT)):
136 Only discard an extra character if we didn't already reach the
137 maximum number.
138 * src/c++98/istream.cc (istream::ignore(streamsiz, char))
139 (wistream::ignore(streamsize, wchar_t)): Likewise.
140 * testsuite/27_io/basic_istream/ignore/char/94749.cc: New test.
141 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc: New test.
142
ec6ffbb9
GA
1432020-06-10 Patrick Palka <ppalka@redhat.com>
144
145 PR libstdc++/95578
146 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
147 Also check that the iterator and sentinel have the same type before
148 applying the unwrapping optimization for __normal_iterator.
149 Split the check into two, one for the first iterator/sentinel
150 pair and another for second iterator/sentinel pair. Remove uses
151 of __niter_base, and remove uses of std::move on a
152 __normal_iterator.
153 * include/bits/ranges_algobase.h (__equal_fn): Likewise.
154 (__copy_or_move): Likewise. Perform similar adjustments for
155 the reverse_iterator and move_iterator optimizations. Inline
156 the checks into the if-constexprs, and use using-declarations to
157 make them less visually noisy. Remove uses of __niter_wrap.
158 (__copy_or_move_backward): Likewise.
159 * testsuite/25_algorithms/copy/95578.cc: New test.
160 * testsuite/25_algorithms/copy_backward/95578.cc: New test.
161 * testsuite/25_algorithms/equal/95578.cc: New test.
162 * testsuite/25_algorithms/lexicographical_compare/95578.cc: New test.
163 * testsuite/25_algorithms/move/95578.cc: New test.
164 * testsuite/25_algorithms/move_backward/95578.cc: New test.
165
1662020-06-10 François Dumont <fdumont@gcc.gnu.org>
167 Jonathan Wakely <jwakely@redhat.com>
168
169 * include/bits/deque.tcc (__lex_cmp_dit): New.
170 (__lexicographical_compare_aux1): Define overloads for deque
171 iterators.
172 * include/bits/stl_algobase.h (__lexicographical_compare::__3way):
173 New static member function.
174 (__lexicographical_compare<true>::__3way): Likewise.
175 (__lexicographical_compare<true>::__lc): Use __3way.
176 (__lexicographical_compare_aux): Rename to
177 __lexicographical_compare_aux1 and declare overloads for deque
178 iterators.
179 (__lexicographical_compare_aux): Define new forwarding function
180 that calls __lexicographical_compare_aux1 and declare new overloads
181 for safe iterators.
182 (lexicographical_compare): Do not use __niter_base on
183 parameters.
184 * include/debug/safe_iterator.tcc
185 (__lexicographical_compare_aux): Define overloads for safe
186 iterators.
187 * testsuite/25_algorithms/lexicographical_compare/1.cc: Add
188 checks with random access iterators.
189 * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
190 New test.
191
b952c2cf
GA
1922020-06-09 Jonathan Wakely <jwakely@redhat.com>
193
194 * include/bits/stl_iterator.h (move_iterator::operator=): Define.
195 * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
196
1972020-06-09 Jonathan Wakely <jwakely@redhat.com>
198
199 * include/std/optional (bad_optional_access): Define default
200 constructor and destructor as defaulted.
201 * testsuite/20_util/optional/bad_access.cc: New test.
202
2c455ae0
GA
2032020-06-08 Jonathan Wakely <jwakely@redhat.com>
204
205 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
206 line number.
207 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
208
2092020-06-08 Jonathan Wakely <jwakely@redhat.com>
210
211 * include/bits/unique_ptr.h (operator<<): Define for C++20.
212 * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
213
3add3425
GA
2142020-06-04 Jonathan Wakely <jwakely@redhat.com>
215
216 * include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
217 (__detail::__cat, __detail::__diff): Move to class scope in the
218 relevant __iterator_traits specializations.
219 (__iterator_traits<>): Use nested class templates instead of ones from
220 namespace __detail.
221 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
222 class scope in iterator_traits<common_iterator<I, S>>.
223 (iterator_traits<common_iterator<I, S>>): Use nested class template
224 instead of __detail::__common_iter_ptr.
225
2262020-06-04 François Dumont <fdumont@gcc.gnu.org>
227
228 * include/bits/stl_algo.h (__copy_n_a): Move to ...
229 * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict
230 parameter.
231 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
232 Declare.
233 (__niter_base(const _Safe_iterator<_Ite, _Seq,
234 random_access_iterator_tag>&)): Declare.
235 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
236 _Deque_iterator<>)): Declare.
237 * include/bits/deque.tcc
238 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
239 _Deque_iterator<>)): New.
240 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
241 New.
242 * include/bits/streambuf_iterator.h
243 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*, bool)): Adapt.
244 * include/debug/safe_iterator.tcc (__niter_base): New.
245 * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
246 (test03): New.
247 * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc:
248 New test.
249 * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:
250 New test.
251 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New test.
252 * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc:
253 New test.
254
2552020-06-04 Jonathan Wakely <jwakely@redhat.com>
256
257 * include/bits/ranges_algobase.h (__copy_n_fn): Only call
258 ranges::copy for positive values.
259 * include/bits/stl_algo.h (copy_n): Convert Size argument to an
260 integral type and only call __copy_n for positive values.
261 * testsuite/util/testsuite_iterators.h
262 (random_access_iterator_wrapper::operator+=): Fix range check for
263 negative values.
264 (output_container, input_container, forward_container)
265 (bidirectional_container, random_access_container): New alias
266 templates.
267 * testsuite/25_algorithms/copy_n/5.cc: New test.
268
a9312a79
GA
2692020-06-02 Jonathan Wakely <jwakely@redhat.com>
270
271 PR libstdc++/90102
272 * include/debug/deque (deque(const _Base&)): Replace parameter
273 with a struct that wraps a const _Base&.
274 * include/debug/forward_list (forward_list(_Base_ref)): New
275 constructor.
276 * include/debug/list (list(const _Base&)): Replace parameter
277 with a struct that wraps a const _Base&.
278 * include/debug/map.h (map(const _Base&)): Likewise.
279 * include/debug/multimap.h (multimap(const _Base&)): Likewise.
280 * include/debug/multiset.h (multiset(const _Base&)): Likewise.
281 * include/debug/set.h (set(const _Base&)): Likewise.
282 * include/debug/unordered_map (unordered_map(const _Base&))
283 (unordered_multimap(const _Base&)): Likewise.
284 * include/debug/unordered_set (unordered_set(const _Base&))
285 (unordered_multiset(const _Base&)): Likewise.
286 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
287 Adjust dg-error line number.
288 * include/debug/vector (vector(const _Base&)): Likewise.
289 * testsuite/23_containers/deque/debug/90102.cc: New test.
290 * testsuite/23_containers/forward_list/debug/90102.cc: New test.
291 * testsuite/23_containers/list/debug/90102.cc: New test.
292 * testsuite/23_containers/map/debug/90102.cc: New test.
293 * testsuite/23_containers/multimap/debug/90102.cc: New test.
294 * testsuite/23_containers/multiset/debug/90102.cc: New test.
295 * testsuite/23_containers/set/debug/90102.cc: New test.
296 * testsuite/23_containers/unordered_map/debug/90102.cc: New test.
297 * testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
298 * testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
299 * testsuite/23_containers/unordered_set/debug/90102.cc: New test.
300 * testsuite/23_containers/vector/debug/90102.cc: New test.
301
4a9aa9de
GA
3022020-06-01 Jonathan Wakely <jwakely@redhat.com>
303
304 PR libstdc++/95392
305 * include/bits/fs_path.h (path::_S_to_string): Move to
306 namespace-scope and rename to ...
307 (__detail::__string_from_range): ... this.
308 [WINDOWS] (__detail::__wstr_from_utf8): New function template to
309 convert a char sequence containing UTF-8 to wstring.
310 (path::_S_convert(Iter, Iter)): Adjust call to _S_to_string.
311 (path::_S_convert_loc(Iter, Iter, const locale&)): Likewise.
312 (u8path(InputIterator, InputIterator)) [WINDOWS]: Use
313 __string_from_range to obtain a contiguous range and
314 __wstr_from_utf8 to obtain a wide string.
315 (u8path(const Source&)) [WINDOWS]: Use __effective_range to
316 obtain a contiguous range and __wstr_from_utf8 to obtain a wide
317 string.
318 (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
319 Use __wstr_from_utf8.
320
3212020-06-01 Jonathan Wakely <jwakely@redhat.com>
322
323 * testsuite/util/testsuite_iterators.h:
324 (input_iterator_wrapper::operator++(int)): Return proxy object.
325
3262020-06-01 Jonathan Wakely <jwakely@redhat.com>
327
328 * doc/xml/manual/evolution.xml: Document deprecation of
329 __is_nullptr_t and removal of std::allocator members.
330 * doc/html/manual/api.html: Regenerate.
331
3322020-06-01 Jonathan Wakely <jwakely@redhat.com>
333
334 * doc/xml/manual/containers.xml: Replace <xref> with <link>.
335 * doc/xml/manual/evolution.xml: Likewise.
336 * doc/html/manual/api.html: Regenerate.
337 * doc/html/manual/containers.html: Regenerate.
338
3392020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
340
341 * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
342 * doc/html/faq.html: Regenerate.
343
e7340ed7
GA
3442020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
345
346 * doc/xml/manual/policy_data_structures_biblio.xml: Remove
347 stray change.
348
3492020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
350
351 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
352 www.cs.princeton.edu to https.
353 * doc/html/manual/policy_data_structures.html: Regenerate.
354
3552020-05-31 Douglas B Rupp <douglas.b.rupp@gmail.com>
356
357 * crossconfig.m4 (<*-vxworks>): Check for more math decls.
358 * configure: Rebuild.
359
885ef72f
GA
3602020-05-29 H.J. Lu <hjl.tools@gmail.com>
361
362 PR bootstrap/95413
363 * configure: Regenerated.
364
3652020-05-29 François Dumont <fdumont@gcc.gnu.org>
366
367 PR libstdc++/95079
368 * include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
369 * include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
370 (unordered_map<>::insert_or_assign): Adapt.
371
61f3b605
GA
3722020-05-27 Jonathan Wakely <jwakely@redhat.com>
373
374 PR libstdc++/95282
375 * include/bits/atomic_base.h (__atomic_impl::load): Add
376 cv-qualifiers to parameter so that _Tp is deduced as the
377 unqualified type.
378 * testsuite/29_atomics/atomic_float/95282.cc: New test.
379
3802020-05-27 Jonathan Wakely <jwakely@redhat.com>
381
382 PR libstdc++/95322
383 * include/std/ranges (transform_view::_Sentinel): Allow hidden
384 friends to work with _Iterator<true> and _Iterator<false>.
385 (join_view::_Sentinel): Likewise.
386 * testsuite/std/ranges/adaptors/95322.cc: New test.
387
3882020-05-27 Jonathan Wakely <jwakely@redhat.com>
389
390 PR libstdc++/94354
391 * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
392 operators to use the correct operations on the underlying
393 iterators.
394 * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
395
3962020-05-27 Jonathan Wakely <jwakely@redhat.com>
397
398 * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
399
c3a4169b
GA
4002020-05-26 Patrick Palka <ppalka@redhat.com>
401
402 PR libstdc++/95322
403 * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
404 Remove and instead define it ...
405 (common_iterator::_Proxy): ... here.
406 (common_iterator::operator->): Use it.
407 * testsuite/24_iterators/common_iterator/2.cc: New test.
408 * testsuite/std/ranges/adaptors/95322.cc: New test.
409
a57aa111
PP
4102020-05-23 Patrick Palka <ppalka@redhat.com>
411
412 PR libstdc++/93978
413 * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
414 dg-additional-options. Avoid unused-but-set-variable warning.
415
988b853f
JW
4162020-05-23 Jonathan Wakely <jwakely@redhat.com>
417
3cb0c7cc
JW
418 PR libstdc++/95289
419 * include/debug/helper_functions.h (__get_distance): Only declare
420 as a constexpr function for C++14 and up.
421 * testsuite/25_algorithms/copy/debug/95289.cc: New test.
422
584d52b0
JW
423 * include/bits/fs_path.h (__detail::_S_range_begin)
424 (__detail::_S_range_end, path::_S_string_from_iter): Replace with
425 overloaded function template __detail::__effective_range.
426 (__detail::__effective_range): New overloaded function template to
427 create a basic_string or basic_string_view for an effective range.
428 (__detail::__value_type_is_char): Use __detail::__effective_range.
429 Do not use remove_const on value type.
430 (__detail::__value_type_is_char_or_char8_t): Likewise.
431 (path::path(const Source&, format))
432 (path::path(const Source&, const locale&))
433 (path::operator/=(const Source&), path::append(const Source&))
434 (path::concat(const Source&)): Use __detail::__effective_range.
435 (path::_S_to_string(InputIterator, InputIterator)): New function
436 template to create a string view if possible, or string otherwise.
437 (path::_S_convert): Add overloads that convert a string returned
438 by __detail::__effective_range. Use if-constexpr to inline conversion
439 logic from all overloads of _Cvt::_S_convert.
440 (path::_S_convert_loc): Add overload that converts a string. Use
441 _S_to_string to avoid allocation when possible.
442 (path::_Cvt): Remove.
443 (path::operator+=(CharT)): Remove indirection through path::concat.
444 * include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
445 overload for non-const pointers, to avoid constructing a std::string.
446 * src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
447 compilation with call to _S_convert.
448
00c8f2a5
JW
449 * include/bits/fs_path.h (__detail::_S_range_begin)
450 (__detail::_S_range_end): Remove unintentional static specifiers.
451 * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
452 (__detail::_S_range_end): Likewise.
453
988b853f
JW
454 * include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
455 Replace alias template with variable template. Don't remove const.
456 (filesystem::__detail::__is_path_src): Replace overloaded function
457 template with variable template and specializations.
458 (filesystem::__detail::__is_path_iter_src): Replace alias template
459 with class template.
460 (filesystem::__detail::_Path): Use __is_path_src. Remove support for
461 iterator pairs.
462 (filesystem::__detail::_Path2): New alias template for checking
463 InputIterator requirements.
464 (filesystem::__detail::__constructible_from): Remove.
465 (filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
466 * testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
467 constructor arguments of void and void* types.
468
bc7a4f2f
MK
4692020-05-21 Matthias Kretz <kretz@kde.org>
470
471 * testsuite/Makefile.am: Remove dup target_triplet and set tool,
472 allowing runtest to work without arguments.
473 * testsuite/Makefile.in: Regenerate.
474
f26e72d8
JW
4752020-05-21 Jonathan Wakely <jwakely@redhat.com>
476
f094665d
JW
477 PR libstdc++/93983
478 * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
479 Reorder constraints to avoid recursion when constructors use
480 iterator_traits (LWG 3420).
481 * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
482
0a1baad8
JW
483 * include/experimental/socket (basic_socket::is_open()
484 (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
485
b780db2e
JW
486 * include/experimental/bits/net.h (__endpoint, __protocol)
487 (__acceptable_protocol, __inet_protocol): New concepts.
488 (__detail::__is_endpoint): Move trait from <experimental/socket>.
489 (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
490 traits.
491 (__endpoint, __protocol, __acceptable_protocol): New variable
492 templates.
493 * include/experimental/socket (__is_endpoint): Move to net.h header.
494 (basic_socket, basic_socket_acceptor): Check requirements.
495
d9d34449
JW
496 * include/experimental/executor (use_future_t::use_future_t()): Fix
497 incorrect noexcept-specifier.
498 * include/experimental/internet (basic_resolver_results): Adjust
499 whitespace.
500 * include/experimental/socket (__basic_socket_impl::release): Add
501 member function.
502 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
503 target constructor.
504 (basic_socket::release(), basic_socket::release(error_code&)): Add
505 missing member functions.
506 (basic_socket::is_open()): Add nodiscard attribute.
507 (basic_socket::close(error_code&)): Pass argument to base function.
508 (basic_socket_acceptor::release())
509 (basic_socket_acceptor::release(error_code&)): Add missing member
510 functions.
511 (basic_socket_acceptor::is_open()): Add nodiscard attribute.
512 (basic_socket_streambuf::error()): Add noexcept.
513 (basic_socket_iostream::error()): Likewise.
514 * testsuite/experimental/net/socket/basic_socket.cc: New test.
515
f26e72d8
JW
516 * include/experimental/buffer: Replace typedefs with
517 alias-declarations.
518 * include/experimental/executor: Likewise.
519 * include/experimental/internet: Likewise.
520 * include/experimental/socket: Likewise.
521 * include/experimental/timer: Likewise.
522
a2d196e7
JW
5232020-05-19 Jonathan Wakely <jwakely@redhat.com>
524
525 PR libstdc++/94087
526 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
527 passed in.
528 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
529 fallback.
530 (random_device::_M_init): Use __x86_rdseed_rdrand when both
531 instructions are available.
532 * testsuite/26_numerics/random/random_device/94087.cc: New test.
533
864fed4a
PP
5342020-05-19 Patrick Palka <ppalka@redhat.com>
535
536 PR c++/66439
537 * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
538 mismatch" messages.
539 * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
540
4c1a5d8b
L
5412020-05-15 H.J. Lu <hongjiu.lu@intel.com>
542
543 PR bootstrap/95147
544 * configure: Regenerated.
545
8d286dd1
L
5462020-05-14 H.J. Lu <hongjiu.lu@intel.com>
547
548 * configure: Regenerated.
549
88324653
AO
5502020-05-13 Alexandre Oliva <oliva@adacore.com>
551
552 PR libstdc++/77691
553 * include/experimental/memory_resource
554 (__resource_adaptor_imp::do_allocate): Handle max_align_t on
555 x86-vxworks as on x86-solaris.
556 (__resource_adaptor_imp::do_deallocate): Likewise.
557 * testsuite/experimental/memory_resource/new_delete_resource.cc:
558 Drop xfail.
559 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
560 (test03): Drop max-align test for char-aligned alloc.
561
491ba663
UD
5622020-05-08 Ulrich Drepper <drepper@redhat.com>
563
564 * include/bits/atomic_base.h (atomic_flag): Implement test member
565 function.
566 * include/std/version: Define __cpp_lib_atomic_flag_test.
567 * testsuite/29_atomics/atomic_flag/test/explicit.cc: New file.
568 * testsuite/29_atomics/atomic_flag/test/implicit.cc: New file.
569
9c24e97a
JW
5702020-05-07 Jonathan Wakely <jwakely@redhat.com>
571
572 PR libstdc++/94971 (partial)
573 * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify
574 std::sample using macro to work in parallel mode.
575 (__sort_fn): Likewise for std::sort.
576 (ranges::__nth_element_fn): Likewise for std::nth_element.
577 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
578 Likewise for std::__min_cmp.
579 * include/parallel/algobase.h (lexicographical_compare_three_way):
580 Add to namespace std::__parallel.
581
582 PR c/92472
583 * include/parallel/multiway_merge.h (_GuardedIterator::operator*)
584 (_GuardedIterator::operator _RAIter, _UnguardedIterator::operator*)
585 (_UnguardedIterator::operator _RAIter): Add const qualifier.
586 (operator<(_GuardedIterator&, _GuardedIterator&)
587 (operator<=(_GuardedIterator&, _GuardedIterator&)
588 (operator<(_UnguardedIterator&, _UnguardedIterator&)
589 (operator<=(_UnguardedIterator&, _UnguardedIterator&): Change
590 parameters to const references.
591
359b19e9
EB
5922020-05-07 Eric Botcazou <ebotcazou@adacore.com>
593
594 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
595 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
596
72a54e5e
FD
5972020-05-06 François Dumont <fdumont@gcc.gnu.org>
598
91d50549
JW
599 * include/bits/stl_algobase.h (struct _Bit_iterator): New declaration.
600 (std::__fill_a1(_Bit_iterator, _Bit_iterator, const bool&)): Likewise.
601 * include/bits/stl_bvector.h (__fill_bvector): Move outside
602 _GLIBCXX_STD_C namespace.
603 (fill(_Bit_iterator, _Bit_iterator, const bool&)): Likewise and rename
604 into...
605 (__fill_a1): ...this.
606 * testsuite/25_algorithms/fill/bvector/1.cc: New.
72a54e5e 607
a3f1fc06
L
6082020-05-06 H.J. Lu <hongjiu.lu@intel.com>
609
610 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
611
093d95fe
RO
6122020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
613
614 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
615 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
616 Likewise.
617 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
618 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
619 Likewise.
620
6208287f
ML
6212020-05-06 Martin Liska <mliska@suse.cz>
622
623 Revert:
624 2020-05-05 Martin Liska <mliska@suse.cz>
625 PR c/92472
626 * include/parallel/multiway_merge.h:
627 Use const for _Compare template argument.
628
2b6f6aee
JW
6292020-05-06 Jonathan Wakely <jwakely@redhat.com>
630
631 * doc/xml/manual/abi.xml (abi.versioning.history): Document library
632 versions for GCC 9.[123] and 10.1 releases.
633 * doc/html/*: Regenerate.
634
19d42220
JJ
6352020-05-06 Jakub Jelinek <jakub@redhat.com>
636
637 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
638 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
639 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
640 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
641 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
642 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
643 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
644
af2311ab
ML
6452020-05-05 Martin Liska <mliska@suse.cz>
646
647 PR c/92472
648 * include/parallel/multiway_merge.h:
649 Use const for _Compare template argument.
650
1405ed43
FS
6512020-05-04 Fangrui Song <maskray@google.com>
652
653 * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
654
bb27781b
JW
6552020-05-04 Jonathan Wakely <jwakely@redhat.com>
656
ae8a08ff
JW
657 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
658 * doc/html/*: Regenerate.
659
bb27781b
JW
660 PR libstdc++/94906
661 * src/c++17/memory_resource.cc
662 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
663 operands.
664
e6b31fc7
NS
6652020-05-04 Nathan Sidwell <nathan@acm.org>
666
667 PR libstdc++/94747
668 * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
669 ptrdiff_t before negation, to show intent more clearly.
670
ec40967f
JW
6712020-05-04 Jonathan Wakely <jwakely@redhat.com>
672
673 PR libstdc++/94936
674 * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
675 Add comment about single-threaded behaviour.
676 (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
677 class member access out of loop.
678 (synchronized_pool_resource::synchronized_pool_resource())
679 (synchronized_pool_resource::~synchronized_pool_resource())
680 (synchronized_pool_resource::release()): Check __gthread_active_p
681 before creating and/or deleting the thread-specific data key.
682 (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
683 assertions.
684 (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
685 path for single-threaded case.
686 (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
687 Likewise. Return if unable to find a pool that owns the allocation.
688 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
689 New test.
690 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
691 test.
692 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
693 test.
694
22b6b5d6
JW
6952020-05-03 Jonathan Wakely <jwakely@redhat.com>
696
697 PR libstdc++/94933
698 * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
699 usable in constant expressions.
700 * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
701 non-scalars.
702
187c854c
JW
7032020-05-01 Jonathan Wakely <jwakely@redhat.com>
704
705 PR libstdc++/94901
706 * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
707
a5f2fb1f
JW
7082020-05-01 Jonathan Wakely <jwakely@redhat.com>
709 Patrick Palka <ppalka@redhat.com>
710
711 PR libstdc++/92894
712 * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
713 Add trait to determine return type and an alias for it.
714 (ranges::__cust_imove::_IMove::operator()): Use __result instead of
715 deduced return type.
716 (iter_rvalue_reference_t): Use _IMove::__type instead of checking
717 the result of ranges::iter_move.
718 (__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
719 instead of checking the result of ranges::iter_move.
720 * testsuite/24_iterators/customization_points/92894.cc: New test.
721 * testsuite/24_iterators/indirect_callable/92894.cc: New test.
722
070b4df8
JW
7232020-05-01 Jonathan Wakely <jwakely@redhat.com>
724
725 PR libstdc++/94901
726 * include/std/type_traits (__is_complete_or_unbounded): Replace
727 BADNAME _T with _Tp.
728 * testsuite/17_intro/badnames.cc: New test.
729
b1983f45
JW
7302020-04-30 Jonathan Wakely <jwakely@redhat.com>
731
732 PR libstdc++/89510
733 * include/bits/alloc_traits.h (allocator_traits::_S_construct)
734 (allocator_traits::_S_destroy)
735 (allocator_traits<allocator<T>>::construct): Use traits in
736 noexcept-specifiers.
737 * include/bits/allocator.h (allocator<void>::construct)
738 (allocator<void>::destroy): Likewise.
739 * include/ext/malloc_allocator.h (malloc_allocator::construct)
740 (malloc_allocator::destroy): Likewise.
741 * include/ext/new_allocator.h (new_allocator::construct)
742 (new_allocator::destroy): Likewise.
743 * testsuite/20_util/allocator/89510.cc: New test.
744 * testsuite/ext/malloc_allocator/89510.cc: New test.
745 * testsuite/ext/new_allocator/89510.cc: New test.
746
8f159176
JW
7472020-04-29 Jonathan Wakely <jwakely@redhat.com>
748
749 PR libstdc++/94854
750 * include/bits/basic_string.tcc: Update comment about explicit
751 instantiations.
752
162c40a4
JW
7532020-04-28 Jonathan Wakely <jwakely@redhat.com>
754
d0330a03
JW
755 PR libstdc++/91480
756 * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
757 Remove non-standard macro.
758 * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
759 to indicate P1032R1 support.
760 * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
761 * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
762 * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
763 * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
764 (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
765 (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
766 * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
767 feature test macro.
768 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
769 * testsuite/21_strings/basic_string_view/operations/copy/char/
770 constexpr.cc: Likewise.
771 * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
772
162c40a4
JW
773 PR libstdc++/94831
774 * include/bits/alloc_traits.h (_S_construct): Restore placement
775 new-expression for C++11/14/17 and call std::construct_at directly
776 for C++20.
777 * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
778 function returning void.
779 * testsuite/20_util/specialized_algorithms/
780 uninitialized_value_construct/94831.cc: New test.
781 * testsuite/23_containers/vector/cons/94831.cc: New test.
782
19667c82
PP
7832020-04-28 Patrick Palka <ppalka@redhat.com>
784
785 LWG 3433 subrange::advance(n) has UB when n < 0
786 * include/std/ranges (subrange::prev): Fix typo.
787 (subrange::advance): Handle a negative argument as per the proposed
788 resolution of LWG 3433.
789 * testsuite/std/ranges/subrange/lwg3433.cc: New test.
790
b9c91b7f
IS
7912020-04-28 Jonathan Wakely <jwakely@redhat.com>
792 Iain Sandoe <iain@sandoe.co.uk>
793
794 PR c++/94759
795 * include/std/coroutine: Implement handing for non-
796 class coroutine return types.
797
00082ff8
JW
7982020-04-24 Jonathan Wakely <jwakely@redhat.com>
799
800 * include/experimental/executor (service_already_exists): Make default
801 constructor public (LWG 3414).
802 * testsuite/experimental/net/execution_context/make_service.cc: Check
803 the service_already_exists can be default constructed.
804
d1462b07
JW
8052020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
806 Jonathan Wakely <jwakely@redhat.com>
807
808 PR libstdc++/90415
809 PR libstdc++/92156
810 * include/std/any (any): Rename template parameters for consistency
811 with the standard.
812 (any::_Decay): Rename to _Decay_if_not_any.
813 (any::any(T&&):: Remove is_constructible from constraints. Remove
814 non-standard overload.
815 (any::any(in_place_type_t<T>, Args&&...))
816 (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
817 (any::emplace(Args&&...))
818 (any::emplace(initializer_list<U>, Args&&...)):
819 Use decay_t instead of _Decay.
820 * testsuite/20_util/any/cons/90415.cc: New test.
821 * testsuite/20_util/any/cons/92156.cc: New Test.
822 * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
823 more robust.
824 * testsuite/20_util/any/modifiers/92156.cc: New test.
825
a2dcb56c
JW
8262020-04-23 Jonathan Wakely <jwakely@redhat.com>
827
be0363c8
JW
828 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
829 * doc/html/*: Regenerate.
830
40541efe
JW
831 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
832 value for C++17 to 201803L because P0858R0 is supported for C++17.
833 * include/std/version (__cpp_lib_array_constexpr): Likewise.
834 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
835 Check for value corresponding to P0031R0 features being tested.
836 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
837 Check for value corresponding to P0858R0 features being tested.
838
a2dcb56c
JW
839 * include/std/version (__cpp_lib_three_way_comparison): Define for
840 freestanding builds.
841
8c9d69ba
TR
8422020-04-23 Thomas Rodgers <rodgert@appliantology.com>
843
844 * include/experimental/net/executor (system_context): Mark
845 system_context::system_context() = delete.
846 * testsuite/experimental/net/executor/1.cc: Add new
847 test to check system_context is not default constructible.
848
dcf69ac5
IS
8492020-04-23 Iain Sandoe <iain@sandoe.co.uk>
850
851 * include/std/coroutine: Update the inline namespace to __n4861.
852 Add the __cpp_lib_coroutine define, set to 201902L.
853 * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
854
0fe9eaaa
JW
8552020-04-22 Jonathan Wakely <jwakely@redhat.com>
856
aac39307
JW
857 * include/std/execution (__cpp_lib_execution): Define to indicate
858 support for P0024R2 and P1001R2.
859 * include/std/version (__cpp_lib_execution): Define.
860 * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
861 defined by <algorithm>, move other tests to new tests ...
862 * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
863 * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
864 * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
865 * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
866
e851aa17
JW
867 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
868 different values for C++17 and C++20, to indicate different feature
869 sets. Update value for C++20 to indicate P1032R1 support.
870 * include/std/version (__cpp_lib_array_constexpr): Likewise.
871 * testsuite/23_containers/array/comparison_operators/constexpr.cc:
872 Check feature test macro.
873 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
874 New test.
875 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
876 feature test macro.
877 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
878 in C++17 mode and check feature test macro.
879
2025db69
JW
880 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
881 here.
882 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
883 defined by <utility>.
884
c9313582
JW
885 * include/std/functional (__cpp_lib_concepts): Update macro value to
886 indicate P1964R2 support.
887 * include/std/version (__cpp_lib_concepts): Likewise.
888 * testsuite/std/concepts/1.cc: Adjust expected value.
889 * testsuite/std/concepts/2.cc: Likewise.
890
eca477d1
JW
891 * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
892 __cpp_lib_constexpr_functional.
893 * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
894 * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
895
56772f62
JW
896 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
897 indicate P1006R1 support.
898 (__cpp_lib_to_address): Define to indicate P0653R2 support.
899 * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
900 P1227R2 support.
901 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
902 P0769R2 support.
903 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
904 P0020R6 support.
905 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
906 P1007R3 support.
907 * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
908 Define to indicate P0339R6 support.
909 * include/std/string_view (__cpp_lib_starts_ends_with): Define to
910 indicate P0457R2 support.
911 * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
912 to indicate P0758R1 support.
913 (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
914 (__cpp_lib_type_identity): Define to indicate P0887R1 support.
915 * include/std/version (__cpp_lib_atomic_float)
916 (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
917 (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
918 (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
919 (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
920 (__cpp_lib_to_address): Define.
921 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
922
0d2dbae4
JW
923 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
924 macro.
925 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
926 Likewise.
927 * include/std/version (__cpp_lib_map_insertion)
928 (__cpp_lib_unordered_map_insertion): Remove.
929
aa12ab2e
JW
930 * include/std/condition_variable (__cpp_lib_jthread): Remove
931 redundant definition.
932 * include/std/stop_token (__cpp_lib_jthread): Update macro value to
933 indicate P1869R1 support.
934 * include/std/version (__cpp_lib_jthread): Update value.
935 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
936 for updated macro value.
937 * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
938 Likewise.
939 * testsuite/30_threads/jthread/1.cc: Likewise.
940 * testsuite/30_threads/jthread/2.cc: Likewise.
941 * testsuite/30_threads/stop_token/1.cc: Likewise.
942 * testsuite/30_threads/stop_token/2.cc: Likewise.
943
0fe9eaaa
JW
944 * testsuite/21_strings/basic_string/erasure.cc: Check for
945 __cpp_lib_erase_if macro.
946 * testsuite/23_containers/deque/erasure.cc: Add header name to #error
947 messages.
948 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
949 * testsuite/23_containers/list/erasure.cc: Likewise.
950 * testsuite/23_containers/map/erasure.cc: Likewise.
951 * testsuite/23_containers/set/erasure.cc: Likewise.
952 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
953 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
954 * testsuite/23_containers/vector/erasure.cc: Likewise.
955
d76925e4
JW
9562020-04-21 Jonathan Wakely <jwakely@redhat.com>
957
87841658
JW
958 * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
959 to define operator<=>.
960 * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
961
57ede05c
JW
962 * doc/Makefile.am (xml_sources_manual): Add missing XML files.
963 * doc/Makefile.in: Regenerate.
964 * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
965 of "this page".
966 * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
967 to the C++11 status table.
968 * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
969 proposals with table matching contents of the C++14 standard.
970 * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
971 the C++17 standard.
972 * doc/html/*: Regenerate.
973
d76925e4
JW
974 PR c++/94149
975 * include/std/type_traits (__is_nt_constructible_impl): Add partial
976 specializations for bounded arrays with non-empty initializers.
977 * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
978
b90ff7a2
TR
9792020-04-20 Thomas Rodgers <trodgers@redhat.com>
980
981 * testsuite/lib/libstdc++.exp: Add additional_flags=
982 -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
983 compiling with a newer Thread Building Blocks.
984
93843da6
JW
9852020-04-20 Jonathan Wakely <jwakely@redhat.com>
986
86119f14
JW
987 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
988
0ea89b15
JW
989 * testsuite/20_util/is_constructible/51185.cc: Make test class a
990 non-aggregate so that the test verifies the same thing in all -std
991 modes.
992 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
993 results for some types when paren-init for aggregates is supported.
994
73a0a21d
JW
995 * include/std/version (__cpp_lib_three_way_comparison): Update value.
996 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
b0146791 997 (__detail::__synth3way): Add noexcept-specifier.
73a0a21d 998
93843da6
JW
999 * include/bits/stl_map.h (map): Define operator<=> and remove
1000 operator< for C++20.
1001 * include/bits/stl_multimap.h (multimap): Likewise.
1002 * include/bits/stl_multiset.h (multiset): Likewise.
1003 * include/bits/stl_set.h (set): Likewise.
1004 * include/bits/stl_tree.h (_Rb_tree): Likewise.
1005 (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
1006 operator!= for C++20.
1007 * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
1008 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
1009 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
1010 * include/debug/set.h (__gnu_debug::set): Likewise.
1011 * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
1012 * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
1013 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
1014 * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
1015
697b94cf
MK
10162020-04-20 Matthias Kretz <kretz@kde.org>
1017
1018 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
1019
a2c0fa35
JW
10202020-04-19 Jonathan Wakely <jwakely@redhat.com>
1021
717e91db
JW
1022 * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
1023 * include/bits/stl_stack.h (stack): Likewise.
1024 * testsuite/23_containers/queue/cmp_c++20.cc: New test.
1025 * testsuite/23_containers/stack/cmp_c++20.cc: New test.
1026
7ab9c243
JW
1027 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
1028 Remove redundant operator!= for C++20.
1029 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
1030 Likewise.
1031 * include/debug/unordered_map (unordered_map, unordered_multimap):
1032 Likewise.
1033 * include/debug/unordered_set (unordered_set, unordered_multiset):
1034 Likewise.
1035
a2c0fa35
JW
1036 PR other/94629
1037 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
1038 redundant assignment in constructor.
1039
c9960294
JW
10402020-04-18 Jonathan Wakely <jwakely@redhat.com>
1041
27c17177
JW
1042 * include/std/chrono (duration, time_point): Define operator<=> and
1043 remove redundant operator!= for C++20.
1044 * testsuite/20_util/duration/comparison_operators/three_way.cc: New
1045 test.
1046 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
1047 test.
1048
c9960294
JW
1049 * testsuite/util/native_type/native_priority_queue.hpp: Use
1050 allocator_traits to rebind allocator.
1051
875d6cb3
JW
10522020-04-17 Jonathan Wakely <jwakely@redhat.com>
1053
bd2420f8
JW
1054 * include/bits/forward_list.h (forward_list): Define operator<=> and
1055 remove redundant comparison operators for C++20.
1056 * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
1057 * include/bits/stl_deque.h (deque): Likewise.
1058 * include/bits/stl_iterator.h (__normal_iterator): Likewise.
1059 * include/bits/stl_list.h (list): Likewise.
1060 * include/bits/stl_vector.h (vector): Likewise.
1061 * include/debug/deque (__gnu_debug::deque): Likewise.
1062 * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
1063 * include/debug/list (__gnu_debug::list): Likewise.
1064 * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
1065 Likewise.
1066 * include/debug/vector (__gnu_debug::vector): Likewise.
1067 * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
1068 operator<=> for C++20.
1069 * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
1070 * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
1071 * testsuite/23_containers/list/cmp_c++20.cc: New test.
1072 * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
1073 * testsuite/23_containers/vector/cmp_c++20.cc: New test.
1074
875d6cb3
JW
1075 * include/bits/basic_string.h (basic_string): Define operator<=> and
1076 remove redundant comparison operators for C++20.
1077 * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
1078 Add comparison_category members.
1079 (__detail::__char_traits_cmp_cat): New helper to get comparison
1080 category from char traits class.
1081 * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
1082 define for C++20.
1083 (sub_match): Define operator<=> and remove redundant comparison
1084 operators for C++20.
1085 (match_results): Remove redundant operator!= for C++20.
1086 * include/std/string_view (basic_string_view): Define operator<=> and
1087 remove redundant comparison operators for C++20.
1088 * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
1089 test.
1090 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
1091 New test.
1092 * testsuite/21_strings/basic_string_view/operations/copy/char/
1093 constexpr.cc: Initialize variable.
1094 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
1095 constexpr.cc: Likewise.
1096 * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
1097 dg-do directive and remove comments showing incorrect signatures.
1098 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
1099 Likewise.
1100 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
1101 New test.
1102 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
1103 New test.
1104 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
1105
c8d88bf2
JW
11062020-04-16 Jonathan Wakely <jwakely@redhat.com>
1107
1108 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
1109 name of unused parameter.
1110
4714fd14
JW
11112020-04-15 Jonathan Wakely <jwakely@redhat.com>
1112
d43919bf
JW
1113 * include/bits/fs_dir.h (file_status): Define operator== for C++20.
1114 (directory_entry): Define operator<=> and remove redundant comparison
1115 operators for C++20.
1116 * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
1117 * include/bits/fs_path.h (path): Define operator<=> and remove
1118 redundant comparison operators for C++20.
1119 * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
1120 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
1121 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
1122 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
1123
596676d6
JW
1124 * include/bits/allocator.h (operator!=): Do not define for C++20.
1125 * include/bits/locale_classes.h (operator!=): Likewise.
1126 * include/bits/std_function.h (operator==(nullptr_t, const function&))
1127 (operator!=(const function&, nullptr_t))
1128 (operator!=(nullptr_t, const function&)): Likewise.
1129 * include/ext/bitmap_allocator.h (operator!=): Likewise.
1130 * include/ext/debug_allocator.h (operator!=): Likewise.
1131 * include/ext/extptr_allocator.h (operator!=): Likewise.
1132 * include/ext/malloc_allocator.h (operator!=): Likewise.
1133 * include/ext/mt_allocator.h (operator!=): Likewise.
1134 * include/ext/new_allocator.h (operator!=): Likewise.
1135 * include/ext/pool_allocator.h (operator!=): Likewise.
1136 * include/ext/throw_allocator.h (operator!=): Likewise.
1137 * include/std/bitset (bitset::operator!=): Likewise.
1138 * include/std/memory_resource (operator!=): Likewise.
1139 * include/std/scoped_allocator (operator!=): Likewise.
1140
4714fd14
JW
1141 * include/std/typeindex (operator<=>): Define for C++20.
1142 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
1143
597601aa
JW
11442020-04-14 Jonathan Wakely <jwakely@redhat.com>
1145
e1e9e8d7
JW
1146 * libsupc++/compare (compare_three_way): Fix constraint so that
1147 BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
1148 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
1149 New test.
1150
f5fa62ed
JW
1151 PR libstdc++/94562
1152 * include/bits/shared_ptr.h (operator<=>): Define for C++20.
1153 * include/bits/shared_ptr_base.h (operator<=>): Likewise.
1154 * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
1155 * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
1156 * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
1157 std::less<A*> to be used when comparing std::shared_ptr<A> objects in
1158 C++20.
1159
597601aa
JW
1160 PR libstdc++/94565
1161 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
1162 * testsuite/18_support/comparisons/categories/94565.cc: New test.
1163
fa9a57ed
JW
11642020-04-13 Iain Sandoe <iain@sandoe.co.uk>
1165
1166 * include/std/coroutine: Update coroutines builtin define,
1167 per n4861.
1168
5b074864
JW
11692020-04-09 Jonathan Wakely <jwakely@redhat.com>
1170
3fd1c229
JW
1171 * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
1172 (strong_order, weak_order, partial_order): Replace uses of <=> with
1173 compare_three_way function object (LWG 3324).
1174 * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
1175 equality operator so that X satisfies three_way_comparable.
1176 * testsuite/18_support/comparisons/algorithms/strong_order.cc:
1177 Likewise.
1178 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
1179
5b074864
JW
1180 * include/bits/unique_ptr.h (operator<=>): Define for C++20.
1181 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
1182 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
1183 * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
1184 * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
1185
e18cd376
JW
11862020-04-08 Jonathan Wakely <jwakely@redhat.com>
1187
ef389dad
JW
1188 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
1189 Define for C++20.
1190 * include/std/complex (operator==(const T&, const complex<T>&))
1191 (operator!=(const complex<T>&, const complex<T>&))
1192 (operator!=(const complex<T>&, const T&))
1193 (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
1194 * testsuite/26_numerics/slice/compare.cc: New test.
1195
e18cd376
JW
1196 * include/std/charconv (to_chars_result, from_chars_result): Add
1197 defaulted equality comparisons for C++20.
1198 * testsuite/20_util/from_chars/compare.cc: New test.
1199 * testsuite/20_util/to_chars/compare.cc: New test.
1200
c104e8f1
JW
12012020-04-07 Jonathan Wakely <jwakely@redhat.com>
1202
1203 PR libstdc++/94520
1204 * include/std/charconv (__integer_to_chars_result_type)
1205 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
1206 allow use in C++14.
1207 * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
1208 use of std::string_view with std::string.
1209 * testsuite/20_util/from_chars/2.cc: Likewise.
1210 * testsuite/20_util/to_chars/1.cc: Likewise.
1211 * testsuite/20_util/to_chars/2.cc: Likewise.
1212
b6966987
JW
12132020-04-06 Jonathan Wakely <jwakely@redhat.com>
1214
1215 PR libstdc++/94498
1216 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
1217 usable in constant expressions for C++20.
1218 (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
1219 _GLIBCXX20_CONSTEXPR.
1220 (std::char_traits<char>, std::char_traits<wchar_t>)
1221 (std::char_traits<char8_t>): Make move, copy and assign usable in
1222 constant expressions for C++20.
1223 (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
1224 and copy usable in constant expressions for C++20.
1225 * include/std/string_view (basic_string_view::copy): Add
1226 _GLIBCXX20_CONSTEXPR.
1227 * testsuite/21_strings/basic_string_view/operations/copy/char/
1228 constexpr.cc: New test.
1229 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
1230 constexpr.cc: New test.
1231
2a1a0c8c
GP
12322020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
1233
1234 * doc/xml/manual/appendix_contributing.xml: Refer to Git
1235 documentation instead of Subversion. Switch to https.
1236 * doc/html/manual/appendix_contributing.html: Regenerate.
1237
24fe8c8e
JW
12382020-04-03 Jonathan Wakely <jwakely@redhat.com>
1239
1240 PR libstdc++/93960
1241 * include/bits/ptr_traits.h (__to_address): Add special case for debug
1242 iterators, to avoid dereferenceable check.
1243 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
1244 * testsuite/20_util/to_address/debug.cc: New test.
1245
c1effaa2
AC
12462020-04-01 Andrea Corallo <andrea.corallo@arm.com>
1247
1248 * testsuite/experimental/net/execution_context/use_service.cc:
1249 Require pthread and gthreads.
1250
6c557ba5
GP
12512020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
1252
1253 * doc/xml/manual/appendix_free.xml: Move "free books" list from
1254 fsf.org to gnu.org.
1255 * doc/html/manual/appendix_free.html: Regenerate.
1256
e06cde87
VV
12572020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
1258
1259 Library-side tests for parenthesized aggregate init
1260
1261 PR c++/92878
1262 PR c++/92947
1263
1264 * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
1265 * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
1266 * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
1267 * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
1268 * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
1269 * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
1270 * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
1271 * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
1272 * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
1273 Likewise.
1274 * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
1275 * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
1276 * testsuite/20_util/variant/92878_92947.cc: Likewise.
1277 * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
1278 Likewise.
1279 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
1280 Likewise.
1281 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
1282 Likewise.
1283 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
1284 Likewise.
1285 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
1286 Likewise.
1287 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
1288 Likewise.
1289 * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
1290 * testsuite/23_containers/queue/92878_92947.cc: Likewise.
1291 * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
1292 Likewise.
1293 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
1294 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
1295 Likewise.
1296 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
1297 Likewise.
1298 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
1299 Likewise.
1300 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
1301 Likewise.
1302 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
1303 Likewise.
1304
42cda3ba
JW
13052020-03-28 Jonathan Wakely <jwakely@redhat.com>
1306
f6b2b790
JW
1307 * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
1308 for changes due to parenthesized aggregate-initialization in C++20.
1309 * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
1310 with std::chrono::sys_time in C++20.
1311
42cda3ba
JW
1312 * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
1313 to constrain C++20 versions of comparison operators. Fix backwards
1314 logic of relational operators.
1315 (move_iterator): Use requires-clause to constrain comparison operators
1316 in C++20. Do not declare non-standard same-type overloads for C++20.
1317 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
1318 of comparisons and check using greedy_ops type.
1319 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
1320 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
1321 main function from compile-only test.
1322 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
1323
0302a2de
JW
13242020-03-27 Jonathan Wakely <jwakely@redhat.com>
1325
b8a28a06
JW
1326 * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
1327 * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
1328 C++20 concepts are required.
1329 * include/bits/stl_iterator_base_types.h: Likewise.
1330 * include/std/concepts: Likewise.
1331 * include/std/version: Likewise.
1332 * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
1333 macro.
1334
81a8d137
JW
1335 * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
1336 (reverse_iterator::iterator_category): Define for C++20.
1337 (reverse_iterator): Define comparison operators correctly for C++20.
1338 (__normal_iterator): Add constraints to comparison operators for C++20.
1339 (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
1340 overload for input iterators.
1341 (move_iterator): Add constraints to comparison operators for C++20.
1342 Define operator<=> for C++20.
1343 * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
1344 * testsuite/24_iterators/move_iterator/move_only.cc: New test.
1345 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
1346 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
1347
ae6076b5
JW
1348 * include/bits/iterator_concepts.h (__detail::__decay_copy)
1349 (__detail::__member_begin, __detail::__adl_begin): Move here from
1350 <bits/range_access.h>.
1351 (__detail::__ranges_begin, __detail::__range_iter_t): Define.
1352 * bits/range_access.h (__cust_access::__decay_copy)
1353 (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
1354 <bits/iterator_concepts.h>.
1355 (ranges::iterator_t): Use __detail::__range_iter_t.
1356 * include/bits/stl_iterator.h (back_insert_iterator): Simplify
1357 conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
1358 (front_insert_iterator): Likewise.
1359 (insert_iterator): Implement changes from P0896R4 for C++20.
1360 * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
1361 * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
1362 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
1363 for inclusion in synopsis_c++20.cc which expects different signatures
1364 for some function templates.
1365 * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
1366
0302a2de
JW
1367 * include/std/type_traits (__is_array_convertible): Move definition
1368 to immediately after is_convertible.
1369
16948c54
JW
13702020-03-26 Jonathan Wakely <jwakely@redhat.com>
1371
1372 * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
1373 (chrono::months, chrono::sys_days, chrono::local_t)
1374 (chrono::local_time, chrono::local_seconds, chrono::local_days):
1375 Define for C++20.
1376 (chrono::time_point): Add missing static assert.
1377 * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
1378 * testsuite/std/time/clock/file/overview.cc: New test.
1379 * testsuite/std/time/clock/file/members.cc: New test.
1380 * testsuite/std/time/syn_c++20.cc: New test.
1381
9673d11e 13822020-03-25 Mike Crowe <mac@mcrowe.com>
bf1fc37b 1383
e3ef3719
JW
1384 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
1385 test.
1386 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
1387 test.
1388
9673d11e
JW
13892020-03-25 Jonathan Wakely <jwakely@redhat.com>
1390
bf1fc37b
JW
1391 * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
1392 * include/std/chrono (filesystem::__file_clock): Here.
1393 (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
1394 Define public member functions for C++20.
1395 (is_clock, is_clock_v): Define traits for C++20.
1396 * include/std/condition_variable (condition_variable::wait_until): Add
1397 check for valid clock.
1398 * include/std/future (_State_baseV2::wait_until): Likewise.
1399 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
1400 * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
1401 Likewise.
1402 * include/std/thread (this_thread::sleep_until): Likewise.
1403 * testsuite/30_threads/condition_variable/members/2.cc: Qualify
1404 slow_clock with new namespace.
1405 * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
1406 test.
1407 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
1408 New test.
1409 * testsuite/30_threads/future/members/clock_neg.cc: New test.
1410 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
1411 Qualify slow_clock with new namespace.
1412 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
1413 clock_neg.cc: New test.
1414 * testsuite/30_threads/shared_future/members/clock_neg.cc: New
1415 test.
1416 * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
1417 * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
1418 New test.
1419 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
1420 slow_clock with new namespace.
1421 * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
1422 * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
1423 test.
1424 * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
1425 * testsuite/std/time/traits/is_clock.cc: New test.
1426 * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
1427 namespace.
1428
9fc98511
JW
14292020-03-21 Jonathan Wakely <jwakely@redhat.com>
1430
a577c0c2
JW
1431 PR libstdc++/93245
1432 * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
1433 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
1434 Improve test coverage.
1435
9fc98511
JW
1436 PR libstdc++/94242
1437 * include/bits/fs_path.h (path::_S_str_convert): Replace first
1438 parameter with basic_string_view so that strings with different
1439 allocators can be accepted.
1440 (path::generic_string<C,T,A>()): Use basic_string object that uses the
1441 right allocator type.
1442 * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
1443 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
1444 test coverage.
1445
98f29f56
JW
14462020-03-18 Jonathan Wakely <jwakely@redhat.com>
1447
b3341826
JW
1448 PR libstdc++/94033
1449 * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
1450 (__is_nt_default_constructible_impl): Remove.
1451 (__is_nothrow_default_constructible_impl): Remove.
1452 (__is_nt_constructible_impl): Add bool template parameter. Adjust
1453 partial specializations.
1454 (__is_nothrow_constructible_impl): Replace class template with alias
1455 template.
1456 (is_nothrow_default_constructible): Derive from alias template
1457 __is_nothrow_constructible_impl instead of
1458 __is_nothrow_default_constructible_impl.
1459 * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
1460
e5de406f
JW
1461 * include/std/stop_token (stop_token::_Stop_state_ref): Define
1462 comparison operators explicitly if the compiler won't synthesize them.
1463
07522ae9
JW
1464 * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
1465 __cpp_lib_concepts before using iter_reference_t.
1466 * include/bits/stream_iterator.h (istream_iterator): Check
1467 __cpp_lib_concepts before using default_sentinel_t.
1468 * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
1469
98f29f56
JW
1470 PR libstdc++/94203
1471 * include/experimental/executor (executor::executor(Executor)): Call
1472 make_shared directly instead of _M_create. Create _Tgt1 object.
1473 (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
1474 Call allocate_shared directly instead of _M_create. Create _Tgt2
1475 object.
1476 (executor::target_type): Add cast needed for new _Tgt interface.
1477 (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
1478 (executor::_Tgt): Define the same interface whether RTTI is enabled or
1479 not.
1480 (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
1481 std::type_info in the interface.
1482 (executor::_Tgt::_M_func): Add data member.
1483 (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
1484 (executor::_Tgt1::_S_func): Define function to access target without
1485 depending on RTTI.
1486 (executor::_M_create): Remove.
1487 (operator==, operator!=): Simplify comparisons for executor.
1488 * include/experimental/socket (is_error_code_enum<socket_errc>):
1489 Define specialization before use.
1490 * testsuite/experimental/net/executor/1.cc: New test.
1491
c62f5e6e
JW
14922020-03-16 Jonathan Wakely <jwakely@redhat.com>
1493
1494 PR libstdc++/94199
1495 * include/experimental/executor (service_already_exists): Add default
1496 constructor. Declare make_service to be a friend.
1497 * testsuite/experimental/net/execution_context/make_service.cc: New
1498 test.
1499
fcc443b9
JW
15002020-03-12 Jonathan Wakely <jwakely@redhat.com>
1501
1502 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
1503 a null pointer to functions with nonnull(1) attribute.
1504
8f0d8cd8
PP
15052020-03-11 Patrick Palka <ppalka@redhat.com>
1506
4512b7d8
PP
1507 * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
1508 'address' -> 'std::__addressof'.
1509 * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
1510 a non-forward input_range.
1511 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
1512 default constructor protected instead of deleted, like with
1513 input_iterator_wrapper.
1514 (test_range::iterator): Add comment explaining that this type is used
1515 only when the underlying wrapper is input_iterator_wrapper or
1516 output_iterator_wrapper. Remove delegating defaulted constructor so
1517 that the inherited default constructor is used instead.
1518
8f0d8cd8
PP
1519 LWG 3286 ranges::size is not required to be valid after a call to
1520 ranges::begin on an input range
1521 * include/std/ranges (subrange::subrange): Split single-argument
1522 constructor into two, one constrained by _S_store_size and another by
1523 !_S_store_size.
1524 (take_view::begin): Call size() before calling ranges::begin(_M_base).
1525 * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
1526 * testsuite/std/ranges/subrange/lwg3286.cc: New test.
1527
3654d49d
JW
15282020-03-10 Jonathan Wakely <jwakely@redhat.com>
1529
0b7f1e24
JW
1530 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
1531 instead of _M_current.
1532 (split_view::_OuterIter::operator++): Likewise.
1533
cf0c3a45
JW
1534 * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
1535 (transform_view::_Iterator::operator*): Add noexcept-specifier.
1536 (transform_view::_Iterator::iter_move): Inline __iter_move body here.
1537 (split_view::_OuterIter::__current): Add noexcept.
1538 (split_view::_InnerIter::__iter_swap): Remove.
1539 (split_view::_InnerIter::__iter_move): Remove.
1540 (split_view::_InnerIter::_M_i_current): New accessors.
1541 (split_view::_InnerIter::__at_end): Use _M_i_current().
1542 (split_view::_InnerIter::operator*): Likewise.
1543 (split_view::_InnerIter::operator++): Likewise.
1544 (iter_move(const _InnerIter&)): Likewise.
1545 (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
1546 * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
1547 for iter_move and iter_swap on split_view's inner iterator.
1548
c222eabc
JW
1549 PR c++/94117
1550 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
1551 Change expression in noexcept-specifier to match function body.
1552
3654d49d
JW
1553 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
1554 comment explaining multiple dg-do directives.
1555 * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
1556 so test is run as well as compiled.
1557
ea182fe6
JW
15582020-03-09 Jonathan Wakely <jwakely@redhat.com>
1559
1560 PR libstdc++/94063
1561 * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
1562 handle concatenations that change the type of the first component.
1563 (path::operator+=(basic_string_view<value_type>)): Likewise.
1564 * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
1565
6d082cd9
PP
15662020-03-06 Patrick Palka <ppalka@redhat.com>
1567
6aa2ca21
PP
1568 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
1569 join_view::_Sentinel<!_Const>.
1570 * testsuite/std/ranges/adaptors/join.cc: Augment test.
1571
6d082cd9
PP
1572 PR libstdc++/93978
1573 * include/bits/range_access.h (__cust_access::_Empty::operator()):
1574 Declare return type to be bool instead of auto.
1575 * testsuite/std/ranges/adaptors/93978.cc: New test.
1576
180eeeae
JW
15772020-03-06 Jonathan Wakely <jwakely@redhat.com>
1578
4cdcb2c9 1579 PR libstdc++/94069
b0815713
JW
1580 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
1581 (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
1582 second argument to __glibcxx_rwlock_init.
1583 * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
1584
180eeeae
JW
1585 PR libstdc++/93244
1586 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
1587 test to not fail due to PR 94063.
1588 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
1589 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
1590
28119fba
AK
15912020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
1592
1593 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
1594 would match ENOSYS.
1595
6a705283
JW
15962020-03-05 Jonathan Wakely <jwakely@redhat.com>
1597
9412b35a
JW
1598 * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
1599 * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
1600 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
1601 * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
1602 for return value, and in comparison.
1603 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
1604
6a705283
JW
1605 PR libstdc++/94051
1606 * include/std/string_view: Include <bits/ostream_insert.h>.
1607 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
1608
94f7d7ec
JW
16092020-03-04 Jonathan Wakely <jwakely@redhat.com>
1610
1611 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
1612
05779e2c
PP
16132020-03-04 Patrick Palka <ppalka@redhat.com>
1614
712b182a
PP
1615 PR libstdc++/94017
1616 * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
1617 condition for when to use memset, making sure to additionally check that
1618 the output pointer's value type is a non-volatile byte type. Instead of
1619 requiring that the fill type is a byte type, just require that it's an
1620 integral type.
1621 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
1622 New test.
1623 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
1624 New test.
1625 * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
1626 blocked by PR 94017.
1627 * testsuite/25_algorithms/fill/94017.cc: New test.
1628 * testsuite/25_algorithms/fill_n/94017.cc: New test.
1629
144dfc68
PP
1630 LWG 3355 The memory algorithms should support move-only input iterators
1631 introduced by P1207
1632 * include/bits/ranges_uninitialized.h
1633 (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
1634 to copy __ifirst, which could be a move-only input iterator. Use
1635 operator- instead of ranges::distance to compute distance from a sized
1636 sentinel.
1637 (__uninitialized_copy_n_fn::operator()): Likewise.
1638 (__uninitialized_move_fn::operator()): Likewise.
1639 (__uninitialized_move_n_fn::operator()): Likewise.
1640 (__uninitialized_destroy_fn::operator()): Use std::move to avoid
1641 attempting to copy __first.
1642 (__uninitialized_destroy_n_fn::operator()): Likewise.
1643 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
1644 Augment test.
1645 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
1646 Likewise.
1647 * .../specialized_algorithms/uninitialized_move/constrained.cc:
1648 Likewise.
1649
26af9cd8
PP
1650 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
1651 protected instead of private.
1652 (test_sized_range_sized_sent): New.
1653
d6d4b339
PP
1654 * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
1655 New testsuite iterator.
1656 * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
1657 * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
1658
05779e2c
PP
1659 * include/bits/ranges_uninitialized.h
1660 (uninitialized_copy_fn::operator()): Pass a reference type as the first
1661 argument to is_nothrow_assignable_v.
1662 (uninitialized_copy_fn::operator()): Likewise.
1663 (uninitialized_move_fn::operator()): Likewise. Return an in_out_result
1664 with the input iterator stripped of its move_iterator.
1665 (uninitialized_move_n_fn::operator()): Likewise.
1666 (uninitialized_fill_fn::operator()): Pass a reference type as the first
1667 argument to is_nothrow_assignable_v.
1668 (uninitialized_fill_n_fn::operator()): Likewise.
1669
9b4f00dd
JW
16702020-03-03 Jonathan Wakely <jwakely@redhat.com>
1671
462f6c20
JW
1672 PR libstdc++/94013
1673 * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
1674 traits to control when to use memmove and memcmp optimizations.
1675 (__is_nonvolatile_trivially_copyable): New helper trait.
1676 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
1677 use memcmp optimization with volatile data.
1678 * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
1679 (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
1680 * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
1681 (__copy_move_backward_a2): Likewise.
1682 (__equal_aux1): Use __memcmpable.
1683 (__lexicographical_compare_aux): Do not use memcmp optimization with
1684 volatile data.
1685 * testsuite/25_algorithms/copy/94013.cc: New test.
1686 * testsuite/25_algorithms/copy_backward/94013.cc: New test.
1687 * testsuite/25_algorithms/equal/94013.cc: New test.
1688 * testsuite/25_algorithms/fill/94013.cc: New test.
1689 * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
1690 * testsuite/25_algorithms/move/94013.cc: New test.
1691 * testsuite/25_algorithms/move_backward/94013.cc: New test.
1692
9b4f00dd
JW
1693 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
1694 Avoid redundant iterator comparisons (LWG 3410).
1695
5fad0003
JW
16962020-03-02 Jonathan Wakely <jwakely@redhat.com>
1697
d112e173
JW
1698 PR libstdc++/93972
1699 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
1700 differ.
1701 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
1702
4c391563
JW
1703 * include/std/ranges (__detail::__maybe_empty_t): Rename to
1704 __maybe_present_t.
1705 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
1706
5fad0003
JW
1707 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
1708 dependent type.
1709
fed76afb
L
17102020-03-01 H.J. Lu <hongjiu.lu@intel.com>
1711
1712 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
1713
bd55ce63
JDA
17142020-02-29 John David Anglin <danglin@gcc.gnu.org>
1715
566f544c
JDA
1716 * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
1717 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
1718 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
1719 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
1720 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
1721
bd55ce63
JDA
1722 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
1723 Add libatomic option.
1724 * testsuite/30_threads/jthread/jthread.cc: Likewise.
1725
44c85722
FD
17262020-02-29 François Dumont <fdumont@gcc.gnu.org>
1727
1728 * include/bits/stl_algo.h
1729 (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
1730 * include/bits/stl_algobase.h: ...here.
1731 * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
1732
d4912dc7
JDA
17332020-02-29 John David Anglin <danglin@gcc.gnu.org>
1734
68a1a11f
JDA
1735 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
1736 option.
1737 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
1738 Likewise.
1739 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
1740 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
1741 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
1742 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
1743 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
1744 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
1745 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
1746 Likewise.
1747
d4912dc7
JDA
1748 PR libstdc++/92906
1749 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
1750
799270b4
PP
17512020-02-28 Patrick Palka <ppalka@redhat.com>
1752
ce33801f
PP
1753 PR libstdc++/93972
1754 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
1755 Fix condition for when to use memcmp, making it consistent with the
1756 corresponding condition used in std::lexicographical_compare.
1757 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
1758
799270b4
PP
1759 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
1760 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
1761 existing signatures for C++2a.
1762
4735f92d
JW
17632020-02-28 Jonathan Wakely <jwakely@redhat.com>
1764
1765 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
1766 test instead of just compiling it.
1767
a1535015
PP
17682020-02-28 Patrick Palka <ppalka@redhat.com>
1769
77e596cf
PP
1770 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
1771 whenever the underlying range models common_range.
1772
a1535015
PP
1773 * include/std/ranges (__detail::_CachedPosition): New struct.
1774 (views::filter_view::_S_needs_cached_begin): New member variable.
1775 (views::filter_view::_M_cached_begin): New member variable.
1776 (views::filter_view::begin): Use _M_cached_begin to cache its
1777 result.
1778 (views::drop_view::_S_needs_cached_begin): New static member variable.
1779 (views::drop_view::_M_cached_begin): New member variable.
1780 (views::drop_view::begin): Use _M_cached_begin to cache its result
1781 when _S_needs_cached_begin.
1782 (views::drop_while_view::_M_cached_begin): New member variable.
1783 (views::drop_while_view::begin): Use _M_cached_begin to cache its
1784 result.
1785 (views::reverse_view::_S_needs_cached_begin): New static member
1786 variable.
1787 (views::reverse_view::_M_cached_begin): New member variable.
1788 (views::reverse_view::begin): Use _M_cached_begin to cache its result
1789 when _S_needs_cached_begin.
1790 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
1791 drop_view::begin caches its result.
1792 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
1793 that drop_while_view::begin caches its result.
1794 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
1795 filter_view::begin caches its result.
1796 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
1797 reverse_view::begin caches its result.
1798
86e2dc22
JW
17992020-02-28 Jonathan Wakely <jwakely@redhat.com>
1800
a51a546c
JW
1801 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
1802 filesystems that silently truncate timestamps.
1803 * testsuite/experimental/filesystem/operations/last_write_time.cc:
1804 Likewise.
1805
86e2dc22
JW
1806 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
1807 -Wstringop-overflow warnings.
1808
44949494
JW
18092020-02-27 Jonathan Wakely <jwakely@redhat.com>
1810
1811 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
1812 -fdiagnostics-urls=never to options.
1813
10a32d47
PP
18142020-02-27 Patrick Palka <ppalka@redhat.com>
1815
ba49e9eb
PP
1816 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
1817 _Iterator<!_Const>.
1818 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
1819 (take_view::_Sentinel<_Const>): Likewise.
1820 (take_while_view::_Sentinel<_Const>): Likewise.
1821 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
1822 * testsuite/std/ranges/adaptors/split.cc: Augment test.
1823 * testsuite/std/ranges/adaptors/take.cc: Augment test.
1824 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
1825 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
1826
10a32d47
PP
1827 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
1828 base() of a vector<>::iterator is a pointer.
1829 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
1830 * testsuite/25_algorithms/move/constrained.cc: Likewise.
1831 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
1832 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
1833 instead of &foo[0].
1834 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
1835 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
1836 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
1837 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
1838 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
1839
eb8e6a30
JW
18402020-02-27 Jonathan Wakely <jwakely@redhat.com>
1841
ae705159
JW
1842 * include/debug/array (operator<=>): Define for C++20.
1843 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
1844 Adjust dg-error line numbers.
1845 * testsuite/23_containers/array/tuple_interface/
1846 tuple_element_debug_neg.cc: Likewise.
1847
b112e3cb
JW
1848 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
1849 defining _GLIBCXX_ASSERTIONS.
1850 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
1851 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
1852 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
1853 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
1854 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
1855 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
1856 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
1857 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
1858 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
1859 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
1860 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
1861 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
1862
f32a3662
JW
1863 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
1864 C++98 where the member function of the base class returns void.
1865
e94f2542
JW
1866 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
1867 equality comparisons that support value-initialized iterators.
1868
eb8e6a30
JW
1869 * include/bits/boost_concept_check.h (__function_requires): Add
1870 _GLIBCXX14_CONSTEXPR.
1871 * testsuite/25_algorithms/min/concept_checks.cc: New test.
1872
fd335985
PP
18732020-02-26 Patrick Palka <ppalka@redhat.com>
1874
8ce13842
PP
1875 PR libstdc++/93936
1876 * include/std/ranges (split_view::_InnerIter::operator==): Compare
1877 the operands' _M_i rather than their _M_i.current().
1878 * testsuite/std/ranges/adaptors/split.cc: Augment test.
1879
fd335985
PP
1880 P1645R1 constexpr for <numeric> algorithms
1881 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
1882 partial_sum, adjacent_difference): Make conditionally constexpr for
1883 C++20.
1884 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
1885 test macro.
1886 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
1887 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
1888 constexpr for C++20.
1889 * include/std/version (__cpp_lib_constexpr_numeric): Define.
1890 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
1891 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
1892 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
1893 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
1894 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
1895 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
1896 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
1897 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
1898 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
1899 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
1900 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
1901
8017d95c
JW
19022020-02-26 Jonathan Wakely <jwakely@redhat.com>
1903
113f0a63
JW
1904 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
1905 variables in smaller scope and avoid calling ranges::distance when we
1906 know they are pointers. Remove statically-unreachable use of
1907 __builtin_unreachable().
1908 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
1909 Define inline.
1910
8017d95c
JW
1911 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
1912 alias.
1913 (__detail::__maybe_const_t): Likewise.
1914 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
1915 (transform_view, take_view, take_while_view, elements_view): Use
1916 __maybe_const_t.
1917 (join_view, split_view): Use both.
1918
7f0f1083
PP
19192020-02-25 Patrick Palka <ppalka@redhat.com>
1920
76a8c0f6
PP
1921 LWG 3397 basic_istream_view::iterator should not provide
1922 iterator_category
1923 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
1924 Rename to ...
1925 (basic_istream_view:_Iterator::iterator_concept): ... this.
1926 * testsuite/std/ranges/istream_view.cc: Augment test.
1927
ec15da7c
PP
1928 LWG 3325 Constrain return type of transformation function for
1929 transform_view
1930 * include/std/ranges (transform_view): Constrain the return type of the
1931 transformation function as per LWG 3325.
1932 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
1933
55c4b3f4
PP
1934 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
1935 * include/std/ranges (join_view::_Iterator::operator--): Require that
1936 range_reference_t<_Base> models common_range.
1937 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
1938
510bd1c1
PP
1939 LWG 3301 transform_view::_Iterator has incorrect iterator_category
1940 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
1941 determination of iterator_category as per LWG 3301.
1942 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
1943
7f0f1083
PP
1944 LWG 3292 iota_view is under-constrained
1945 * include/std/ranges (iota_view): Require that _Winc models semiregular
1946 as per LWG 3292.
1947 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
1948
dfb93d05 19492020-02-25 Jonathan Wakely <jwakely@redhat.com>
5b904f17 1950
490350a1
JW
1951 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
1952 during constant evaluation. Call __builtin_memmove directly instead of
1953 __memmove.
1954 (__copy_or_move_backward): Likewise.
1955 * include/bits/stl_algobase.h (__memmove): Remove.
1956 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
1957 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
1958 Use __builtin_memmove directly instead of __memmove.
1959 (__copy_move_a2): Do not use memmove during constant evaluation.
1960 (__copy_move_backward_a2): Use _IsMove constant to select correct
1961 __copy_move_backward specialization.
1962 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
1963 begin turned into moves during constant evaluation.
1964
6de946e6
JW
1965 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
1966 previous commit.
1967
5b904f17
JW
1968 PR libstdc++/93872
1969 * include/bits/stl_algobase.h (__memmove): Cast away const before
1970 doing move assignment.
1971 * testsuite/25_algorithms/move/93872.cc: New test.
1972 * testsuite/25_algorithms/move_backward/93872.cc: New test.
1973
c5eab4ed
PP
19742020-02-24 Patrick Palka <ppalka@redhat.com>
1975
85c143d0
PP
1976 PR libstdc++/93884
1977 * include/bits/ranges_algobase.h (__copy_or_move,
1978 __copy_or_move_backward): Don't inspect the iter_value_t of the output
1979 iterator, instead inspect its iterator_traits directly.
1980 * include/bits/stl_iterator.h (back_insert_iterator::container):
1981 Conditionally initialize.
1982 (back_insert_iterator::difference_type): Conditionally define.
1983 (back_insert_iterator::back_insert_iterator): Conditionally define this
1984 default constructor.
1985 (front_insert_iterator::container): Conditionally initialize.
1986 (front_insert_iterator::difference_type): Conditionally define.
1987 (front_insert_iterator::front_insert_iterator): Conditionally define
1988 this default constructor.
1989 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
1990 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
1991
c5eab4ed
PP
1992 P0769R2 Add shift to <algorithm>
1993 * include/bits/ranges_algo.h (shift_left, shift_right): New.
1994 * testsuite/25_algorithms/shift_left/1.cc: New test.
1995 * testsuite/25_algorithms/shift_right/1.cc: New test.
1996
3841739c
JW
19972020-02-24 Jonathan Wakely <jwakely@redhat.com>
1998
8566286e
JW
1999 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
2000 Make noexcept-specifier conditional.
2001 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
2002 noexcept-specifier.
2003
120e8734
JW
2004 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
2005 Add constructor.
2006 (operator==(istream_iterator, default_sentinel_t)): Add operator.
2007 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
2008 * include/bits/streambuf_iterator.h
2009 (istreambuf_iterator(default_sentinel_t)): Add constructor.
2010 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
2011 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
2012 New test.
2013 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
2014 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
2015 New test.
2016 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
2017
3841739c
JW
2018 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
2019 (ranges::enable_view): Simplify (LWG 3326).
2020 * include/bits/range_access.h (ranges::enable_view): Declare.
2021 * include/bits/regex.h (__enable_view_impl): Remove partial
2022 specialization.
2023 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
2024 * include/bits/stl_set.h (__enable_view_impl): Likewise.
2025 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
2026 * include/debug/multiset.h (__enable_view_impl): Likewise.
2027 * include/debug/set.h (__enable_view_impl): Likewise.
2028 * include/debug/unordered_set (__enable_view_impl): Likewise.
2029 * include/experimental/string_view (ranges::enable_view): Define
2030 partial specialization.
2031 * include/std/span (ranges::enable_view): Likewise.
2032 * include/std/string_view (ranges::enable_view): Likewise.
2033 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
2034
9e589880
JW
20352020-02-21 Jonathan Wakely <jwakely@redhat.com>
2036
2037 * include/std/optional (operator<=>(optional<T>, optional<U>))
2038 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
2039 Define for C++20.
2040 * include/std/tuple (__tuple_cmp): New helper function for <=>.
2041 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
2042 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
2043 (operator<=>(monostate, monostate)): Define for C++20.
2044 * testsuite/20_util/optional/relops/three_way.cc: New test.
2045 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
2046 * testsuite/20_util/variant/89851.cc: Move to ...
2047 * testsuite/20_util/variant/relops/89851.cc: ... here.
2048 * testsuite/20_util/variant/90008.cc: Move to ...
2049 * testsuite/20_util/variant/relops/90008.cc: ... here.
2050 * testsuite/20_util/variant/relops/three_way.cc: New test.
2051
5586e506
PP
20522020-02-20 Patrick Palka <ppalka@redhat.com>
2053
6e63438a
PP
2054 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
2055 function.
2056 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
2057 __maybe_refwrap to capture lvalue references by reference, and then use
2058 unwrap_reference_t to forward the by-reference captures as references.
2059 * testsuite/std/ranges/adaptors/split.cc: Augment test.
2060 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
2061
5586e506
PP
2062 * include/std/ranges (iota_view): Forward declare _Sentinel.
2063 (iota_view::_Iterator): Befriend _Sentinel.
2064 (iota_view::_Sentinel::_M_equal): New member function.
2065 (iota_view::_Sentinel::operator==): Use it.
2066 (views::_Iota::operator()): Forward __f using the correct type.
2067 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
2068 with integers of different signedness, to appease iota_view's deduction
2069 guide.
2070 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
2071
c7b591f3
JW
20722020-02-20 Jonathan Wakely <jwakely@redhat.com>
2073
e817c23f
JW
2074 * include/bits/range_access.h (ranges::begin): Reject array of
2075 incomplete type.
2076 (ranges::end, ranges::size): Require arrays to be bounded.
2077 (ranges::data): Require lvalue or borrowed_range.
2078 (ranges::iterator_t): Remove constraint.
2079 * testsuite/std/ranges/access/begin.cc: Do not check array of
2080 incomplete type.
2081 * testsuite/std/ranges/access/begin_neg.cc: New test.
2082 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
2083 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
2084 * testsuite/std/ranges/access/ssize.cc: Do not check array of
2085 incomplete type.
2086
4be779f5
JW
2087 * include/std/system_error (error_category::operator<=>)
2088 (operator<=>(const error_code&, const error_code&))
2089 (operator<=>(const error_condition&, const error_condition&)): Define
2090 for C++20.
2091 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
2092 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
2093 test.
2094 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
2095 incorrect comment.
2096 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
2097 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
2098 incorrect comment.
2099 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
2100 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
2101 incorrect comment.
2102 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
2103 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
2104 Remove incorrect comment.
2105 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
2106 test.
2107
20fa41e6
JW
2108 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
2109
c7b591f3
JW
2110 * include/std/thread (thread::id::operator<=>): Define for C++20.
2111 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
2112 functions in namespace std.
2113 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
2114
38c7b74d
PP
21152020-02-19 Patrick Palka <ppalka@redhat.com>
2116
2117 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
2118 null terminator of the underlying string as part of the test_range.
2119 (main): Call test03.
2120
a45fb21a
JW
21212020-02-19 Jonathan Wakely <jwakely@redhat.com>
2122
1b425f3a
JW
2123 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
2124 requirement (LWG 3385).
2125 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
2126 expected declaration.
2127
7433536b
JW
2128 * include/std/ranges (take_while_view, drop_view, drop_while_view)
2129 (elements_view:_Iterator): Initialize data members (LWG 3364).
2130
256f67aa
JW
2131 * libsupc++/compare (three_way_comparable): Remove always-false check
2132 that should have been removed with weak_equality (P1959R0).
2133 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
2134
0294dc5f
JW
2135 * include/std/concepts (__detail::__partially_ordered_with): Move here
2136 from <compare>.
2137 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
2138 to simplify definition (LWG 3331).
2139 * libsupc++/compare (__detail::__partially_ordered_with): Move to
2140 <concepts>.
2141
241ed965
JW
2142 * include/std/concepts (totally_ordered_with): Remove redundant
2143 requirement (LWG 3329).
2144
77f5310f
JW
2145 * include/std/ranges (__detail::__convertible_to_non_slicing): New
2146 helper concept.
2147 (__detail::__pair_like_convertible_to): Remove.
2148 (__detail::__pair_like_convertible_from): Add requirements for
2149 non-slicing conversions.
2150 (subrange): Constrain constructors with __convertible_to_non_slicing.
2151 Remove constructors from pair-like types. Add new deduction guide.
2152 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
2153
59aa9e57
JW
2154 * include/bits/iterator_concepts.h (iter_move): Add declaration to
2155 prevent unqualified lookup finding a suitable declaration (LWG 3247).
2156
e89100ef
JW
2157 * include/std/memory_resource (polymorphic_allocator::allocate)
2158 (polymorphic_allocator::allocate_object): Change type of exception to
2159 bad_array_new_length (LWG 3237).
2160 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
2161
bb54e0b8
JW
2162 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
2163 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
2164 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
2165 * testsuite/20_util/unwrap_reference/3.cc: New test.
2166
5f031f97
JW
2167 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
2168 type during overload resolution, use static assert instead (LWG 3200).
2169 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
2170 incomplete type.
2171 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
2172
66ae31eb
JW
2173 * include/std/span (span(T (&)[N])): Use non-deduced context to
2174 prevent first parameter from interfering with class template argument
2175 deduction (LWG 3369).
2176 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
2177 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
2178 rvalues.
2179
247f410b
JW
2180 * include/std/span (span::const_iterator, span::const_reverse_iterator)
2181 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
2182 Remove (LWG 3320).
2183 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
2184 and cend.
2185 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
2186 Likewise.
2187 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
2188 constrained.cc: Likewise.
2189 * testsuite/20_util/specialized_algorithms/
2190 uninitialized_default_construct/constrained.cc: Likewise.
2191 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
2192 constrained.cc: Likewise.
2193 * testsuite/20_util/specialized_algorithms/uninitialized_move/
2194 constrained.cc: Likewise.
2195 * testsuite/20_util/specialized_algorithms/
2196 uninitialized_value_construct/constrained.cc: Likewise.
2197
aca60ecf
JW
2198 * include/bits/range_access.h (range_size_t): Define alias template.
2199 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
2200 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
2201
4cc3b275
JW
2202 * include/std/ranges (filter_view, transform_view, take_view)
2203 (join_view, split_view, reverse_view): Remove commented-out converting
2204 constructors (LWG 3280).
2205
5f3641d0
JW
2206 * include/std/memory (uninitialized_construct_using_allocator): Use
2207 std::construct_at (LWG 3321).
2208
020a03ee
JW
2209 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
2210 (polymorphic_allocator::allocate_object)
2211 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
2212
15411a64
JW
2213 LWG 3379. "safe" in several library names is misleading
2214 * include/bits/range_access.h (enable_safe_range): Rename to
2215 enable_borrowed_range.
2216 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
2217 (safe_range): Rename to borrowed_range.
2218 * include/bits/ranges_algo.h: Adjust to use new names.
2219 * include/bits/ranges_algobase.h: Likewise.
2220 * include/bits/ranges_uninitialized.h: Likewise.
2221 * include/std/ranges: Likewise.
2222 (safe_iterator_t): Rename to borrowed_iterator_t.
2223 (safe_subrange_t): Rename to borrowed_subrange_t.
2224 * include/std/span: Adjust to use new names.
2225 * include/std/string_view: Likewise.
2226 * include/experimental/string_view: Likewise.
2227 * testsuite/std/ranges/access/begin.cc: Likewise.
2228 * testsuite/std/ranges/access/cbegin.cc: Likewise.
2229 * testsuite/std/ranges/access/cdata.cc: Likewise.
2230 * testsuite/std/ranges/access/cend.cc: Likewise.
2231 * testsuite/std/ranges/access/crbegin.cc: Likewise.
2232 * testsuite/std/ranges/access/crend.cc: Likewise.
2233 * testsuite/std/ranges/access/data.cc: Likewise.
2234 * testsuite/std/ranges/access/end.cc: Likewise.
2235 * testsuite/std/ranges/access/rbegin.cc: Likewise.
2236 * testsuite/std/ranges/access/rend.cc: Likewise.
2237 * testsuite/std/ranges/safe_range.cc: Likewise.
2238 * testsuite/std/ranges/safe_range_types.cc: Likewise.
2239 * testsuite/util/testsuite_iterators.h: Likewise.
2240
fa89adaa
JW
2241 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
2242 (tuple_element<1, const subrange<I, S, K>>): Add partial
2243 specializations (LWG 3398).
2244 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
2245
a45fb21a
JW
2246 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
2247 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
2248 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
2249
242b4fb7
PP
22502020-02-18 Patrick Palka <ppalka@redhat.com>
2251
2252 P1983R0 Wording for GB301, US296, US292, US291, and US283
2253 * include/std/ranges (filter_view::pred): New member function.
2254 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
2255 P1983R0 fixes the highlighted issue in the same way.
2256 (join_view::_Iterator<_Const>): Add friend
2257 join_view::_Iterator<!_Const>.
2258 (join_view::_M_inner): Remove mutable specifier, effectively reverting
2259 the proposed wording changes of P3278.
2260 (join_view::begin): Refine the condition for when to return a const
2261 iterator.
2262 (split_view::_OuterIter::_OuterIter): Adjust constraints.
2263 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
2264 exists and works.
2265
f5b4dc38
JW
22662020-02-18 Jonathan Wakely <jwakely@redhat.com>
2267
a5b213dd
JW
2268 PR libstdc++/93818
2269 * include/std/ranges (_RangeAdaptor): Add deduction guide.
2270 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
2271 iterator_t<_Vp>.
2272 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
2273 (transform_view::_Iterator): Add alias _Base_iter and use in place of
2274 iterator_t<_Base>.
2275 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
2276 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
2277 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
2278 (split_view::_InnerIter::_S_iter_cat()): Likewise.
2279
ce7b39d0
JW
2280 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
2281 assumption that long is wider than int.
2282 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
2283 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
2284 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
2285 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
2286
9b8e2dea
JW
2287 P1976R2 Fixed-size span construction from dynamic range
2288 * include/std/span (__cpp_lib_span): Update value.
2289 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
2290 assertion.
2291 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
2292 constraints.
2293 (span::first<Count>(), span::last<Count>()): Use explicit type in
2294 return statement.
2295 (as_bytes, as_writable_bytes): Likewise.
2296 * include/std/version (__cpp_lib_span): Update value.
2297 * testsuite/23_containers/span/1.cc: Check new value.
2298 * testsuite/23_containers/span/2.cc: Check new value.
2299 * testsuite/23_containers/span/explicit.cc: New test.
2300
d6c9e372
JW
2301 * include/std/span (span::__is_compatible_array): Simplify alias
2302 template by using requires-clause.
2303 (span::__is_compatible_ref): New alias template for constraining
2304 constructors.
2305 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
2306 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
2307 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
2308 redundant parentheses.
2309 (span(R&&)): Add missing constraints.
2310
f09f3242
JW
2311 * include/std/span (span): Reorder members and rename template
2312 parameters to match declarations in the C++2a working paper.
2313
f5b4dc38
JW
2314 P2116R0 Remove tuple-like protocol support from fixed-extent span
2315 * include/std/span (get, tuple_size, tuple_element): Remove.
2316 * testsuite/23_containers/span/everything.cc: Remove checks for
2317 tuple-like API.
2318 * testsuite/23_containers/span/get_neg.cc: Remove.
2319 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
2320 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
2321 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
2322
f3169941
PP
23232020-02-17 Patrick Palka <ppalka@redhat.com>
2324
aa667c3f
PP
2325 P2106R0 Alternative wording for GB315 and GB316
2326 * include/bits/ranges_algo.h (in_fun_result): New.
2327 (for_each_result, for_each_n_result): Change into an alias of
2328 in_fun_result.
2329 (in_in_result): New.
2330 (mismatch_result): Change into an alias of in_in_result.
2331 (copy_if_result): Change into an alias of in_out_result.
2332 (swap_ranges_result): Change into an alias of in_in_result.
2333 (unary_transform_result): Change into an alias of in_out_result.
2334 (in_in_out_result): New.
2335 (binary_transform_result): Change into an alias of in_in_out_result.
2336 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
2337 remove_copy_result, unique_copy_result, reverse_copy_result,
2338 rotate_copy_result, partial_sort_copy_result): Change into an alias of
2339 in_out_result.
2340 (in_out_out_result): New.
2341 (partition_copy_result, merge_result): Change into an alias of
2342 in_out_out_result.
2343 (set_union_result, set_intersection_result): Change into an alias of
2344 in_in_out_result.
2345 (set_difference_result): Change into an alias of in_out_result.
2346 (set_symmetric_difference): Change into an alias of in_in_out_result.
2347 (min_max_result): New.
2348 (minmax_result, minmax_element_result): Change into an alias of
2349 min_max_result.
2350 (in_found_result): New.
2351 (next_permutation_result, prev_permutation_result): Change into an alias
2352 of in_found_result.
2353 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
2354 Adjust following changes to next_permutation_result and
2355 prev_permutation_result.
2356 * include/bits/ranges_algobase.h (in_out_result): New.
2357 (copy_result, move_result, move_backward_result, copy_backward_result,
2358 copy_n_result): Change into an alias of in_out_result.
2359 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
2360 uninitialized_copy_n_result, uninitialized_move_result,
2361 uninitialized_move_n_result): Likewise.
2362 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
2363 structured bindings.
2364 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
2365
f3169941
PP
2366 P1243R4 Rangify new algorithms
2367 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
2368 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
2369 * testsuite/25_algorithms/clamp/constrained.cc: New test.
2370 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
2371 * testsuite/25_algorithms/sample/constrained.cc: New test.
2372
98cf2c26
JW
23732020-02-17 Jonathan Wakely <jwakely@redhat.com>
2374
c5e1c1d3
JW
2375 P1964R2 Wording for boolean-testable
2376 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
2377 (__adjacent_find_fn): Cast result of predicate to bool.
2378 * include/std/concepts (__boolean): Remove.
2379 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
2380 new helper concepts.
2381 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
2382 (predicate): Use __boolean_testable instead of boolean.
2383 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
2384 Likewise.
2385
7ab36231
JW
2386 P1970R2 Consistency for size() functions: Add ranges::ssize
2387 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
2388 * testsuite/std/ranges/access/ssize.cc: New test.
2389
9866abe3
JW
2390 P1956R1 On the names of low-level bit manipulation functions
2391 * include/bits/hashtable_policy.h: Update comment.
2392 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
2393 (ispow2, ceil2, floor2, log2p1): Likewise.
2394 (__cpp_lib_int_pow2): Add feature test macro.
2395 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
2396 * include/std/memory (assume_aligned): Adjust use of ispow2.
2397 * include/std/version (__cpp_lib_int_pow2): Add.
2398 * libsupc++/new_opa.cc: Adjust use of __ispow2.
2399 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
2400 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
2401 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
2402 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
2403 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
2404 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
2405 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
2406 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
2407 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
2408 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
2409 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
2410 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
2411
cfbc8fbb
JW
2412 * include/std/charconv: Add comment.
2413
9cd4eeef
JW
2414 PR libstdc++/92546 (partial)
2415 * include/bits/random.h (uniform_random_bit_generator): Move definition
2416 to <bits/uniform_int_dist.h>.
2417 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
2418 of <bits/random.h>.
2419 * include/bits/ranges_algobase.h: Do not include <cmath>.
2420 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
2421 Move here.
2422 * include/std/ranges: Do not include <limits>.
2423 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
2424
c03b53da
JW
2425 PR libstdc++/92546 (partial)
2426 * include/Makefile.am: Add new header.
2427 * include/Makefile.in: Regenerate.
2428 * include/bits/int_limits.h: New header.
2429 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
2430 numeric_limits with __detail::__int_limits.
2431 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
2432 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
2433 Likewise.
2434 * include/std/charconv (__to_chars_8, __from_chars_binary)
2435 (__from_chars_alpha_to_num, from_chars): Likewise.
2436 * include/std/memory_resource (polymorphic_allocator::allocate)
2437 (polymorphic_allocator::allocate_object): Likewise.
2438 * include/std/string_view (basic_string_view::_S_compare): Likewise.
2439 * include/std/utility (in_range): Likewise.
2440 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
2441 extra error about incomplete type __int_limits<bool>.
2442 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
2443 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
2444 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
2445 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
2446 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
2447 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
2448 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
2449 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
2450 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
2451 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
2452 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
2453 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
2454
4540ef78
JW
2455 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
2456 value for partial_ordering::unordered.
2457
d6dfa3da
JW
2458 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
2459 const-qualified expression variations.
2460 * include/std/concepts (copyable): Likewise.
2461
98cf2c26
JW
2462 * include/std/type_traits (__is_standard_integer): New helper trait.
2463 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
2464 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
2465 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
2466 * testsuite/20_util/integer_comparisons/1.cc: New test.
2467 * testsuite/20_util/integer_comparisons/2.cc: New test.
2468 * testsuite/20_util/integer_comparisons/equal.cc: New test.
2469 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
2470 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
2471 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
2472 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
2473 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
2474 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
2475 * testsuite/20_util/integer_comparisons/less.cc: New test.
2476 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
2477 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
2478 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
2479 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
2480 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
2481
93b8cfce
PP
24822020-02-16 Patrick Palka <ppalka@redhat.com>
2483
2484 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
2485 Move code after an early exit constexpr if to under an else branch.
2486 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
2487
90b7eb65
PP
24882020-02-15 Patrick Palka <ppalka@redhat.com>
2489
55992626
PP
2490 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
2491 * include/bits/ranges_algobase.h: Likewise.
2492 * include/bits/ranges_uninitialized.h: Likewise.
2493
b40c57bd
PP
2494 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
2495 binary_search, copy_if, count, count_if, equal_range, find, find_end,
2496 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
2497 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
2498 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
2499 lower_bound, make_heap, max, max_element, merge, min, min_element,
2500 minmax, minmax_element, mismatch, next_permutation, none_of,
2501 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
2502 partition_point, pop_heap, prev_permutation, push_heap, remove,
2503 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
2504 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
2505 search, search_n, set_difference, set_intersection,
2506 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
2507 stable_partition, stable_sort, swap_ranges, transform, unique,
2508 unique_copy, upper_bound): Convert into function objects.
2509 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
2510 fill, move_backward, copy_backward): Likewise.
2511 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
2512 uninitialized_default_construct_n, uninitialized_value_construct,
2513 uninitialized_value_construct_n, uninitialized_copy,
2514 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
2515 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
2516 destroy, destroy_n): Likewise.
2517
90b7eb65
PP
2518 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
2519 (ranges::find_end): ... here.
2520 (ranges::__lexicographical_compare): Fold into ...
2521 (ranges::lexicographical_compare): ... here.
2522 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
2523 (ranges::equal): ... here.
2524
55b00d14
JW
25252020-02-15 Jonathan Wakely <jwakely@redhat.com>
2526
2527 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
2528 * include/std/deque: Likewise.
2529 * include/std/forward_list: Likewise.
2530 * include/std/list: Likewise.
2531 * include/std/string: Likewise.
2532 * include/std/vector: Likewise.
2533 * include/std/version: Likewise.
2534 * testsuite/23_containers/deque/erasure.cc: Test for new value.
2535 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
2536 * testsuite/23_containers/list/erasure.cc: Likewise.
2537 * testsuite/23_containers/map/erasure.cc: Likewise.
2538 * testsuite/23_containers/set/erasure.cc: Likewise.
2539 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
2540 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
2541 * testsuite/23_containers/vector/erasure.cc: Likewise.
2542
5b1d5885
JW
25432020-02-15 Jonathan Wakely <jwakely@redhat.com>
2544
2545 * include/bits/random.h (uniform_random_bit_generator): Require min()
2546 and max() to be constant expressions and min() to be less than max().
2547 * testsuite/26_numerics/random/concept.cc: Check additional cases.
2548 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
2549
90fc7b3c
PP
25502020-02-13 Patrick Palka <ppalka@redhat.com>
2551
613c932f
PP
2552 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
2553 * include/Makefile.in: Regenerate.
2554 * include/bits/ranges_uninitialized.h: New header.
2555 * include/std/memory: Include it.
2556 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
2557 test.
2558 * .../uninitialized_copy/constrained.cc: New test.
2559 * .../uninitialized_default_construct/constrained.cc: New test.
2560 * .../uninitialized_fill/constrained.cc: New test.
2561 * .../uninitialized_move/constrained.cc: New test.
2562 * .../uninitialized_value_construct/constrained.cc: New test.
2563
90fc7b3c
PP
2564 * include/Makefile.am: Add bits/ranges_algobase.h
2565 * include/Makefile.in: Regenerate.
2566 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
2567 existing #includes.
2568 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
2569 __detail::__is_move_iterator, copy_result, move_result,
2570 __equal, equal, copy_result, move_result, move_backward_result,
2571 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
2572 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
2573 fill): Split out into ...
2574 * bits/range_algobase.h: ... this new header.
2575
99bbab9f
PP
25762020-02-12 Patrick Palka <ppalka@redhat.com>
2577
2578 LWG 3389 and LWG 3390
2579 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
2580 constructing the move_iterator with __i.
2581 (counted_iterator::counted_iterator): Use std::move when initializing
2582 M_current with __i.
2583 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
2584 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
2585
02ce382c
SL
25862020-02-12 Sandra Loosemore <sandra@codesourcery.com>
2587
2588 PR libstdc++/79193
2589 PR libstdc++/88999
2590
2591 * configure: Regenerated.
2592
b32a3f32
FD
25932020-02-12 François Dumont <fdumont@gcc.gnu.org>
2594
2595 * include/bits/hashtable.h
2596 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
2597 missing std namespace qualification to forward call.
2598
dcda050e
JW
25992020-02-09 Jonathan Wakely <jwakely@redhat.com>
2600
38660e87
JW
2601 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
2602 comment.
2603 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
2604
97a7c229
JW
2605 * include/std/ranges: Fix non-ASCII characters in comment.
2606
dcda050e
JW
2607 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
2608 equality comparison to be valid and return bool.
2609 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
2610 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
2611 type with ambiguous conversion to fundamental types.
2612 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
2613
d222d8ec
JW
26142020-02-07 Jonathan Wakely <jwakely@redhat.com>
2615
c8dd2446
JW
2616 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
2617 Use remove_cvref_t.
2618 (readable_traits): Rename to indirectly_readable_traits.
2619 (readable): Rename to indirectly_readable.
2620 (writable): Rename to indirectly_writable.
2621 (__detail::__iter_exchange_move): Do not use remove_reference_t.
2622 (indirectly_swappable): Adjust requires expression parameter types.
2623 expression.
2624 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
2625 (ranges::replace_if, ranges::generate_n, ranges::generate)
2626 (ranges::remove): Use new name for writable.
2627 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
2628 Use new name for readable.
2629 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
2630 new name for readable_traits.
2631 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
2632 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
2633 new definition of indirectly_readable.
2634
d222d8ec
JW
2635 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
2636 to take parameters of common_iterator, instead of the common_iterator
2637 type itself. Fix argument for __common_iter_has_arrow constraint.
2638 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
2639
572992c8
JW
26402020-02-07 Jonathan Wakely <jwakely@redhat.com>
2641
2642 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
2643 warning.
2644 (basic_istream_view::_Iterator::operator++()): Add missing return.
2645
cba9ef06
PP
26462020-02-07 Patrick Palka <ppalka@redhat.com>
2647
a04f635d
PP
2648 * include/bits/ranges_algo.h: Remove extraneous &&.
2649
b7903d9f
PP
2650 * include/std/ranges (ranges::__detail::__stream_extractable,
2651 ranges::basic_istream_view, ranges::istream_view): Define.
2652 * testsuite/std/ranges/istream_view: New test.
2653
cba9ef06
PP
2654 Implement C++20 range adaptors
2655 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
2656 (subrange::_S_store_size): Mark as const instead of constexpr to
2657 avoid what seems to be a bug in GCC.
2658 (__detail::__box): Give it defaulted copy and move constructors.
55d4cbcb
PP
2659 (ranges::views::_Single::operator()): Mark constexpr.
2660 (ranges::views::_Iota::operator()): Mark constexpr.
cba9ef06 2661 (__detail::Empty): Define.
55d4cbcb
PP
2662 (ranges::views::__closure::_RangeAdaptor,
2663 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
2664 ranges::views::all, ranges::__detail::find_if,
2665 ranges::__detail::find_if_not, ranges::__detail::mismatch,
2666 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
2667 ranges::views::transform, take_view, ranges::views::take,
2668 take_while_view, ranges::views::take_while, drop_view,
2669 ranges::views::drop, join_view, ranges::views::join,
cba9ef06 2670 __detail::require_constant, __detail::tiny_range, split_view,
55d4cbcb
PP
2671 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
2672 common_view, ranges::views::common, reverse_view,
2673 ranges::views::reverse,
2674 ranges::views::__detail::__is_reversible_subrange,
2675 ranges::views::__detail::__is_reverse_view, reverse_view,
2676 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
2677 ranges::views::elements, ranges::views::keys, ranges::views::values):
2678 Define.
2679 (views): Alias for ranges::views.
2680 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
2681 tuple_element<1, ranges::subrange>): New partial specializations.
cba9ef06
PP
2682 * testsuite/std/ranges/adaptors/all.cc: New test.
2683 * testsuite/std/ranges/adaptors/common.cc: Likewise.
2684 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
2685 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
2686 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
2687 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
2688 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
2689 * testsuite/std/ranges/adaptors/join.cc: Likewise.
2690 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
2691 * testsuite/std/ranges/adaptors/split.cc: Likewise.
2692 * testsuite/std/ranges/adaptors/take.cc: Likewise.
2693 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
2694 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
2695
5713834e
JW
26962020-02-07 Jonathan Wakely <jwakely@redhat.com>
2697
0d57370c
JW
2698 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
2699 type of enumerations and comparison category types.
2700 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
2701 (__cmp_cat::_Ncmp::unordered): Change value to 2.
2702 (partial_ordering::_M_value, weak_ordering::_M_value)
2703 (strong_ordering::_M_value): Change type to __cmp_cat::type.
2704 (partial_ordering::_M_is_ordered): Remove data member.
2705 (partial_ordering): Use second bit of _M_value for unordered. Adjust
2706 comparison operators.
2707 (weak_ordering::operator partial_ordering): Simplify to remove
2708 branches.
2709 (operator<=>(unspecified, weak_ordering)): Likewise.
2710 (strong_ordering::operator partial_ordering): Likewise.
2711 (strong_ordering::operator weak_ordering): Likewise.
2712 (operator<=>(unspecified, strong_ordering)): Likewise.
2713 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
2714 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
2715 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
2716
5713834e
JW
2717 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
2718 __cpp_lib_three_way_comparison macro and use deduced return type for
2719 operator<=>.
2720 * testsuite/std/ranges/iota/iterator.cc: New test.
2721
bc464641
PP
27222020-02-07 Patrick Palka <ppalka@redhat.com>
2723 Jonathan Wakely <jwakely@redhat.com>
2724
2725 Implement C++20 constrained algorithms
2726 * include/Makefile.am: Add new header.
2727 * include/Makefile.in: Regenerate.
2728 * include/std/algorithm: Include <bits/ranges_algo.h>.
2729 * include/bits/ranges_algo.h: New file.
2730 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
2731 * testsuite/25_algorithms/all_of/constrained.cc: New test.
2732 * testsuite/25_algorithms/any_of/constrained.cc: New test.
2733 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
2734 * testsuite/25_algorithms/copy/constrained.cc: New test.
2735 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
2736 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
2737 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
2738 * testsuite/25_algorithms/count/constrained.cc: New test.
2739 * testsuite/25_algorithms/count_if/constrained.cc: New test.
2740 * testsuite/25_algorithms/equal/constrained.cc: New test.
2741 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
2742 * testsuite/25_algorithms/fill/constrained.cc: New test.
2743 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
2744 * testsuite/25_algorithms/find/constrained.cc: New test.
2745 * testsuite/25_algorithms/find_end/constrained.cc: New test.
2746 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
2747 * testsuite/25_algorithms/find_if/constrained.cc: New test.
2748 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
2749 * testsuite/25_algorithms/for_each/constrained.cc: New test.
2750 * testsuite/25_algorithms/generate/constrained.cc: New test.
2751 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
2752 * testsuite/25_algorithms/heap/constrained.cc: New test.
2753 * testsuite/25_algorithms/includes/constrained.cc: New test.
2754 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
2755 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
2756 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
2757 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
2758 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
2759 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
2760 test.
2761 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
2762 * testsuite/25_algorithms/max/constrained.cc: New test.
2763 * testsuite/25_algorithms/max_element/constrained.cc: New test.
2764 * testsuite/25_algorithms/merge/constrained.cc: New test.
2765 * testsuite/25_algorithms/min/constrained.cc: New test.
2766 * testsuite/25_algorithms/min_element/constrained.cc: New test.
2767 * testsuite/25_algorithms/minmax/constrained.cc: New test.
2768 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
2769 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
2770 * testsuite/25_algorithms/move/constrained.cc: New test.
2771 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
2772 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
2773 * testsuite/25_algorithms/none_of/constrained.cc: New test.
2774 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
2775 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
2776 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
2777 * testsuite/25_algorithms/partition/constrained.cc: New test.
2778 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
2779 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
2780 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
2781 * testsuite/25_algorithms/remove/constrained.cc: New test.
2782 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
2783 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
2784 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
2785 * testsuite/25_algorithms/replace/constrained.cc: New test.
2786 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
2787 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
2788 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
2789 * testsuite/25_algorithms/reverse/constrained.cc: New test.
2790 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
2791 * testsuite/25_algorithms/rotate/constrained.cc: New test.
2792 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
2793 * testsuite/25_algorithms/search/constrained.cc: New test.
2794 * testsuite/25_algorithms/search_n/constrained.cc: New test.
2795 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
2796 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
2797 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
2798 test.
2799 * testsuite/25_algorithms/set_union/constrained.cc: New test.
2800 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
2801 * testsuite/25_algorithms/sort/constrained.cc: New test.
2802 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
2803 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
2804 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
2805 * testsuite/25_algorithms/transform/constrained.cc: New test.
2806 * testsuite/25_algorithms/unique/constrained.cc: New test.
2807 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
2808 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
2809
d1aa7705
JW
28102020-02-06 Jonathan Wakely <jwakely@redhat.com>
2811
bd630df0
JW
2812 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
2813 number in comment. Fix indentation.
2814
d1aa7705
JW
2815 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
2816 redundant _GLIBCXX20_CONSTEXPR.
2817
26eae9ac
JW
2818 * include/std/ranges (viewable_range): Replace decay_t with
2819 remove_cvref_t (LWG 3375).
2820
269e8130
JW
28212020-02-05 Jonathan Wakely <jwakely@redhat.com>
2822
2823 * include/bits/iterator_concepts.h (iter_reference_t)
2824 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
2825 Remove workarounds for PR c++/67704.
2826 * testsuite/24_iterators/aliases.cc: New test.
2827
7db12d15
PP
28282020-02-05 Patrick Palka <ppalka@redhat.com>
2829
2830 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
2831 when initializing _M_current.
2832 (move_iterator::base): Split into two overloads differing in
2833 ref-qualifiers as in P1207R4 for C++20.
2834
9962493c
JW
28352020-02-04 Jonathan Wakely <jwakely@redhat.com>
2836
9bc5bea1
JW
2837 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
2838 use.
2839
9962493c
JW
2840 PR libstdc++/93562
2841 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
2842 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
2843 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
2844
20fa702b
AB
28452020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
2846
2847 * configure: Regenerate.
2848
6e5a1963
PP
28492020-01-31 Patrick Palka <ppalka@redhat.com>
2850
2851 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
2852 test_range::end() returns the same type as test_range::begin().
2853 * testsuite/24_iterators/range_operations/next.cc: Likewise.
2854 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
2855 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
2856 Always return a sentinel<I>.
2857
5cd2e126
JW
28582020-01-29 Jonathan Wakely <jwakely@redhat.com>
2859
0a8f4feb
JW
2860 PR libstdc++/92895
2861 * include/std/stop_token (stop_token::stop_possible()): Call new
2862 _M_stop_possible() function.
2863 (stop_token::stop_requested()): Do not use stop_possible().
2864 (stop_token::binary_semaphore): New class, as temporary stand-in for
2865 std::binary_semaphore.
2866 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
2867 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
2868 New data members for symchronization with stop_callback destruction.
2869 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
2870 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
2871 Remove.
2872 (stop_token::_Stop_cb::_M_run): New member function.
2873 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
2874 Remove.
2875 (stop_token::_Stop_state::_M_owners): New data member to track
2876 reference count for ownership.
2877 (stop_token::_Stop_state::_M_value): New data member combining a
2878 spinlock, the stop requested flag, and the reference count for
2879 associated stop_source objects.
2880 (stop_token::_Stop_state::_M_requester): New data member for
2881 synchronization with stop_callback destruction.
2882 (stop_token::_Stop_state::_M_stop_possible()): New member function.
2883 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
2884 of _M_value.
2885 (stop_token::_Stop_state::_M_add_owner)
2886 (stop_token::_Stop_state::_M_release_ownership)
2887 (stop_token::_Stop_state::_M_add_ssrc)
2888 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
2889 updating reference counts.
2890 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
2891 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
2892 (stop_token::_Stop_state::_M_try_lock)
2893 (stop_token::_Stop_state::_M_try_lock_and_stop)
2894 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
2895 managing spinlock.
2896 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
2897 read and update state. Release lock while running callbacks. Use new
2898 data members to synchronize with callback destruction.
2899 (stop_token::_Stop_state::_M_remove_callback): Likewise.
2900 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
2901 to read and update state.
2902 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
2903 replacing shared_ptr.
2904 (stop_source::stop_source(const stop_source&)): Update reference count.
2905 (stop_source::operator=(const stop_source&)): Likewise.
2906 (stop_source::~stop_source()): Likewise.
2907 (stop_source::stop_source(stop_source&&)): Define as defaulted.
2908 (stop_source::operator=(stop_source&&)): Establish postcondition on
2909 parameter.
2910 (stop_callback): Enforce preconditions on template parameter. Replace
2911 base class with data member of new _Cb_impl type.
2912 (stop_callback::stop_callback(const stop_token&, Cb&&))
2913 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
2914 (stop_callback::_Cb_impl): New type wrapping _Callback member and
2915 defining the _S_execute member function.
2916 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
2917 test.
2918 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
2919 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
2920 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
2921 New test.
2922 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
2923 test.
2924 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
2925 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
2926 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
2927 test.
2928
f214ffb3
JW
2929 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
2930 three_way_comparable_with.
2931 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
2932 (compare_three_way::operator()): Remove redundant constraint from
2933 requires-clause.
2934 (__detail::_Synth3way::operator()): Use three_way_comparable_with
2935 instead of workaround.
2936 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
2937 output due to simplified constraints on compare_three_way::operator().
2938
83b02010
JW
2939 PR libstdc++/93479
2940 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
2941 * testsuite/18_support/comparisons/object/93479.cc: New test.
2942
5cd2e126
JW
2943 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
2944 returns the same type as test_range::begin(). Add comments.
2945 * testsuite/std/ranges/access/rbegin.cc: Likewise.
2946 * testsuite/std/ranges/access/rend.cc: Likewise.
2947 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
2948 test_range is the same as its iterator type.
2949 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
2950 operator- overloads to satisfy sized_sentinel_for when the iterator
2951 satisfies random_access_iterator.
2952
759812fd
JW
29532020-01-28 Jonathan Wakely <jwakely@redhat.com>
2954
72a9fd20
JW
2955 PR libstdc++/93470
2956 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
2957 static assertion to object types.
2958
759812fd
JW
2959 PR libstdc++/93325
2960 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
2961 clock_gettime instead of explicit glibc version check.
2962 * configure: Regenerate.
2963
a5d81aaa
JW
29642020-01-28 Martin Liska <mliska@suse.cz>
2965
2966 PR libstdc++/93478
2967 * include/std/atomic: Fix typo.
2968 * include/std/optional: Likewise.
2969
29702020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
2971
2972 * configure: Regenerate.
2973
389cd88c
JW
29742020-01-27 Jonathan Wakely <jwakely@redhat.com>
2975
2976 PR libstdc++/93426
2977 * include/std/span (span): Fix deduction guide.
2978 * testsuite/23_containers/span/deduction.cc: New test.
2979
482eeff5
JW
29802020-01-24 Jonathan Wakely <jwakely@redhat.com>
2981
2982 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
2983 (__cmp_cat::_Ord::equivalent): Add enumerator.
2984 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
2985 and greater.
2986 (partial_ordering, weak_ordering, strong_ordering): Remove
2987 constructors taking __cmp_cat::_Eq parameters. Use renamed
2988 enumerators.
2989
e8e66971
MR
29902020-01-24 Maciej W. Rozycki <macro@wdc.com>
2991
2992 * acinclude.m4: Handle `--with-toolexeclibdir='.
2993 * Makefile.in: Regenerate.
2994 * aclocal.m4: Regenerate.
2995 * configure: Regenerate.
2996 * doc/Makefile.in: Regenerate.
2997 * include/Makefile.in: Regenerate.
2998 * libsupc++/Makefile.in: Regenerate.
2999 * po/Makefile.in: Regenerate.
3000 * python/Makefile.in: Regenerate.
3001 * src/Makefile.in: Regenerate.
3002 * src/c++11/Makefile.in: Regenerate.
3003 * src/c++17/Makefile.in: Regenerate.
3004 * src/c++98/Makefile.in: Regenerate.
3005 * src/filesystem/Makefile.in: Regenerate.
3006 * testsuite/Makefile.in: Regenerate.
3007
7a900bce
AO
30082020-01-23 Alexandre Oliva <oliva@adacore.com>
3009
f9e84b31
AO
3010 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
3011 * configure: Rebuild.
3012
7a900bce
AO
3013 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
3014
04681fca
JW
30152020-01-23 Jonathan Wakely <jwakely@redhat.com>
3016
3017 PR libstdc++/91947
3018 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
3019 rule.
3020 * include/Makefile.in: Regenerate.
3021
c784f162
JW
30222020-01-20 Jonathan Wakely <jwakely@redhat.com>
3023
3024 * doc/xml/faq.xml: Fix grammar.
3025 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
3026 * doc/xml/manual/spine.xml: Update copyright years.
3027 * doc/html/*: Regenerate.
3028
f4d83eba
ER
30292020-01-19 Eric S. Raymond <esr@thyrsus.com>
3030
3031 * doc/xml/faq.xml: Update for SVN -> Git transition.
3032 * doc/xml/manual/appendix_contributing.xml: Likewise.
3033 * doc/xml/manual/status_cxx1998.xml: Likewise.
3034 * doc/xml/manual/status_cxx2011.xml: Likewise.
3035 * doc/xml/manual/status_cxx2014.xml: Likewise.
3036 * doc/xml/manual/status_cxx2017.xml: Likewise.
3037 * doc/xml/manual/status_cxx2020.xml: Likewise.
3038 * doc/xml/manual/status_cxxtr1.xml: Likewise.
3039 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
3040
49789fd0
IS
30412020-01-18 Iain Sandoe <iain@sandoe.co.uk>
3042
3043 * include/Makefile.am: Add coroutine to the std set.
3044 * include/Makefile.in: Regenerated.
3045 * include/std/coroutine: New file.
3046
0ba6a850
JW
30472020-01-17 Jonathan Wakely <jwakely@redhat.com>
3048
3049 PR libstdc++/92376
3050 * include/bits/c++config: Only do PSTL config when the header is
3051 present, to fix freestanding.
3052 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
3053 functions if they were detected by configure.
3054
98d56ea8
JW
30552020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
3056 Matthew Bauer <mjbauer95@gmail.com>
3057 Jonathan Wakely <jwakely@redhat.com>
3058
3059 PR bootstrap/64271 (partial)
3060 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
3061 to unsigned short.
3062 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
3063 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
3064 definitions with NetBSD upstream.
3065 (ctype_base::blank): Use _CTYPE_BL.
3066 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
3067 Declaration.
3068 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
3069 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
3070 parameters to unsigned char.
3071 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
3072
d9165389
FD
30732020-01-16 François Dumont <fdumont@gcc.gnu.org>
3074
3075 PR libstdc++/91263
3076 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
3077 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
3078 (_Equality_base): Remove.
3079 (_Equality<>::_M_equal): Review implementation. Use
3080 std::is_permutation.
3081 * testsuite/23_containers/unordered_multiset/operators/1.cc
3082 (Hash, Equal, test02, test03): New.
3083 * testsuite/23_containers/unordered_set/operators/1.cc
3084 (Hash, Equal, test02, test03): New.
3085
2a0f6c61
JW
30862020-01-15 Jonathan Wakely <jwakely@redhat.com>
3087
3088 PR libstdc++/93267
3089 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
3090 Move here from <bits/range_access.h> and define using __int128 when
3091 available.
3092 (__is_integer_like, __is_signed_integer_like): Move here from
3093 <bits/range_access.h>.
3094 (weakly_incrementable): Use __is_signed_integer_like.
3095 * include/bits/range_access.h (__max_diff_type, __max_size_type)
3096 (__is_integer_like, __is_signed_integer_like): Move to
3097 <bits/iterator_concepts.h>.
3098 (__make_unsigned_like_t): Move here from <ranges>.
3099 * include/std/ranges (__make_unsigned_like_t): Move to
3100 <bits/range_access.h>.
3101 (iota_view): Replace using-directive with using-declarations.
3102 * testsuite/std/ranges/iota/93267.cc: New test.
3103 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
3104
e4379a93
JW
31052020-01-13 Jonathan Wakely <jwakely@redhat.com>
3106
fe7cc34f
JW
3107 PR libstdc++/93244
3108 * include/bits/fs_path.h (path::generic_string<C,A>)
3109 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
3110 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
3111 root-dir is converted to forward slash in generic pathname.
3112 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
3113 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
3114
e4379a93
JW
3115 PR libstdc++/58605
3116 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
3117 Define.
3118 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
3119 (__atomic_float): Add default member initializer for C++20.
3120 * include/std/atomic (atomic): Likewise.
3121 (atomic::atomic()): Remove noexcept-specifier on default constructor.
3122 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
3123 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
3124 number.
3125 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
3126 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
3127 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
3128 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
3129 expected result for is_trivially_default_constructible.
3130 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
3131 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
3132 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
3133 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
3134 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
3135 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
3136 expected results for is_trivially_default_constructible.
3137 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
3138 new test generator.
3139
7918cb93
JW
31402020-01-10 Jonathan Wakely <jwakely@redhat.com>
3141
68be73fc
JW
3142 * testsuite/util/testsuite_iterators.h: Improve comment.
3143
78f02e80
JW
3144 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
3145 initialization syntax.
3146
7918cb93
JW
3147 PR libstdc++/92285
3148 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
3149 of base class independent of __cplusplus value.
3150 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
3151 type defined in the base class
3152 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
3153 * testsuite/24_iterators/istreambuf_iterator/requirements/
3154 base_classes.cc: Adjust expected base class for C++98.
3155
acd43917
OH
31562020-01-09 Olivier Hainque <hainque@adacore.com>
3157
3158 * doc/xml/manual/appendix_contributing.xml: Document _C2
3159 as a reserved identifier, by VxWorks.
3160 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
3161 * include/bits/stl_multimap.h: Likewise.
3162
caa39b2e
JW
31632020-01-09 Jonathan Wakely <jwakely@redhat.com>
3164
1a788638
JW
3165 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
3166 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
3167 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
3168 partial specialization to disambiguate the two constrained
3169 specializations.
3170
caa39b2e
JW
3171 * include/experimental/type_traits (experimental::is_pod_v): Disable
3172 -Wdeprecated-declarations warnings around reference to std::is_pod.
3173 * include/std/type_traits (is_pod_v): Likewise.
3174 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
3175 is_standard_layout and is_trivial. Do not check is_pod for C++20.
3176 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
3177 Add -Wno-deprecated for C++20.
3178 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
3179 * testsuite/20_util/is_pod/value.cc: Likewise.
3180 * testsuite/experimental/type_traits/value.cc: Likewise.
3181
1a6c5064
JTM
31822020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
3183
3184 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
3185 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
3186 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
3187
d574c8aa
JW
31882020-01-09 Jonathan Wakely <jwakely@redhat.com>
3189
160e95dc
JW
3190 PR libstdc++/93205
3191 * include/bits/random.h (operator>>): Check stream operation succeeds.
3192 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
3193 typedefs.
3194 (operator>>): Remove redundant __istream_type typedefs. Check stream
3195 operations succeed.
3196 (__extract_params): New function to fill a vector from a stream.
3197 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
3198
d574c8aa
JW
3199 PR libstdc++/93208
3200 * config/abi/pre/gnu.ver: Add new exports.
3201 * include/std/memory_resource (memory_resource::~memory_resource()):
3202 Do not define inline.
3203 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
3204 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
3205 Define.
3206 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
3207 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
3208
b9c84e95
FD
32092020-01-09 François Dumont <fdumont@gcc.gnu.org>
3210
3211 PR libstdc++/92124
3212 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
3213 template alias.
3214 (_Hashtable<>::__fwd_value_for): New.
3215 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
3216 parameter.
3217 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
3218 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
3219 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
3220 with std::move.
3221 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
3222 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
3223 Adapt.
3224 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
3225 Adapt.
3226 * testsuite/23_containers/unordered_set/92124.cc: New.
3227
fff148b7
JW
32282020-01-08 Jonathan Wakely <jwakely@redhat.com>
3229
3230 PR libstdc++/93201
3231 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
3232 detailed error reporting for remove_all. Check result of recursive
3233 call before incrementing iterator.
3234 (remove_all(const path&), remove_all(const path&, error_code&)): Use
3235 do_remove_all.
3236 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
3237 result of recursive call before incrementing iterator.
3238 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
3239 are reported correctly.
3240 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
3241
9e3c1eb7
TR
32422020-01-07 Thomas Rodgers <trodgers@redhat.com>
3243
3244 * include/std/condition_variable
3245 (condition_variable_any::wait_on): Rename to match current draft
3246 standard.
3247 (condition_variable_any::wait_on_until): Likewise.
3248 (condition_variable_any::wait_on_for): Likewise.
3249 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
3250 Adjust tests to account for renamed methods.
3251
6af8819b
FD
32522020-01-07 François Dumont <fdumont@gcc.gnu.org>
3253
3254 PR libstdc++/92124
3255 * include/bits/stl_tree.h
3256 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
3257 std::move_if_noexcept by std::move.
3258 * testsuite/23_containers/map/92124.cc: New.
3259 * testsuite/23_containers/set/92124.cc: New.
3260
f31a99f7
JW
32612020-01-06 Jonathan Wakely <jwakely@redhat.com>
3262
a4a1f965
JW
3263 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
3264 (stop_source): Likewise (LWG 3362).
3265 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
3266 comparisons.
3267
f31a99f7
JW
3268 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
3269 (lexicographical_compare_three_way): Do not depend on
3270 __cpp_lib_concepts.
3271 * include/std/version (__cpp_lib_three_way_comparison): Only define
3272 when __cpp_lib_concepts is defined.
3273 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
3274
b4e70137
JW
32752020-01-03 Jonathan Wakely <jwakely@redhat.com>
3276
3277 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
3278 Only define four-argument overload when __cpp_lib_concepts is defined.
3279
a8497ec6
JDA
32802020-01-01 John David Anglin <danglin@gcc.gnu.org>
3281
3282 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
3283
8d9254fc 32842020-01-01 Jakub Jelinek <jakub@redhat.com>
5624e564
JJ
3285
3286 Update copyright years.
b4df5e92 3287\f
8d9254fc 3288Copyright (C) 2020 Free Software Foundation, Inc.
b4df5e92
JW
3289
3290Copying and distribution of this file, with or without modification,
3291are permitted in any medium without royalty provided the copyright
3292notice and this notice are preserved.