]> git.ipfire.org Git - thirdparty/gcc.git/blob - libstdc++-v3/ChangeLog
Daily bump.
[thirdparty/gcc.git] / libstdc++-v3 / ChangeLog
1 2020-10-13 Nuno Lopes <nuno.lopes@ist.utl.pt>
2
3 * include/bits/stl_algo.h (any_of): Fix incorrect description
4 in comment.
5
6 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
7
8 * doc/xml/manual/evolution.xml: Document some API changes
9 and deprecations.
10 * doc/xml/manual/intro.xml: Document LWG 2499.
11 * doc/xml/manual/status_cxx2020.xml: Update status.
12 * doc/html/*: Regenerate.
13
14 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
15
16 * doc/xml/book.txml: Remove trailing whitespace.
17 * doc/xml/chapter.txml: Likewise.
18 * doc/xml/class.txml: Likewise.
19 * doc/xml/gnu/fdl-1.3.xml: Likewise.
20 * doc/xml/gnu/gpl-3.0.xml: Likewise.
21 * doc/xml/manual/abi.xml: Likewise.
22 * doc/xml/manual/algorithms.xml: Likewise.
23 * doc/xml/manual/allocator.xml: Likewise.
24 * doc/xml/manual/appendix_contributing.xml: Likewise.
25 * doc/xml/manual/appendix_free.xml: Likewise.
26 * doc/xml/manual/appendix_porting.xml: Likewise.
27 * doc/xml/manual/atomics.xml: Likewise.
28 * doc/xml/manual/auto_ptr.xml: Likewise.
29 * doc/xml/manual/backwards_compatibility.xml: Likewise.
30 * doc/xml/manual/bitmap_allocator.xml: Likewise.
31 * doc/xml/manual/build_hacking.xml: Likewise.
32 * doc/xml/manual/codecvt.xml: Likewise.
33 * doc/xml/manual/concurrency.xml: Likewise.
34 * doc/xml/manual/concurrency_extensions.xml: Likewise.
35 * doc/xml/manual/configure.xml: Likewise.
36 * doc/xml/manual/containers.xml: Likewise.
37 * doc/xml/manual/ctype.xml: Likewise.
38 * doc/xml/manual/debug.xml: Likewise.
39 * doc/xml/manual/debug_mode.xml: Likewise.
40 * doc/xml/manual/diagnostics.xml: Likewise.
41 * doc/xml/manual/documentation_hacking.xml: Likewise.
42 * doc/xml/manual/evolution.xml: Likewise.
43 * doc/xml/manual/internals.xml: Likewise.
44 * doc/xml/manual/intro.xml: Likewise.
45 * doc/xml/manual/io.xml: Likewise.
46 * doc/xml/manual/iterators.xml: Likewise.
47 * doc/xml/manual/locale.xml: Likewise.
48 * doc/xml/manual/localization.xml: Likewise.
49 * doc/xml/manual/messages.xml: Likewise.
50 * doc/xml/manual/mt_allocator.xml: Likewise.
51 * doc/xml/manual/numerics.xml: Likewise.
52 * doc/xml/manual/parallel_mode.xml: Likewise.
53 * doc/xml/manual/policy_data_structures.xml: Likewise.
54 * doc/xml/manual/prerequisites.xml: Likewise.
55 * doc/xml/manual/shared_ptr.xml: Likewise.
56 * doc/xml/manual/spine.xml: Likewise.
57 * doc/xml/manual/status_cxxtr1.xml: Likewise.
58 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
59 * doc/xml/manual/strings.xml: Likewise.
60 * doc/xml/manual/support.xml: Likewise.
61 * doc/xml/manual/test.xml: Likewise.
62 * doc/xml/manual/test_policy_data_structures.xml: Likewise.
63 * doc/xml/manual/using.xml: Likewise.
64 * doc/xml/manual/using_exceptions.xml: Likewise.
65 * doc/xml/manual/utilities.xml: Likewise.
66 * doc/html/*: Regenerate.
67
68 2020-10-12 Patrick Palka <ppalka@redhat.com>
69
70 * include/std/ranges (take_while_view::begin): Constrain the
71 const overload further as per LWG 3450.
72 (take_while_view::end): Likewise.
73 * testsuite/std/ranges/adaptors/take_while.cc: Add test for LWG
74 3450.
75
76 2020-10-12 Patrick Palka <ppalka@redhat.com>
77
78 PR libstdc++/95322
79 * include/std/ranges (take_view::_CI): Define this alias
80 template as per LWG 3449 and remove ...
81 (take_view::_Sentinel::_CI): ... this type alias.
82 (take_view::_Sentinel::operator==): Adjust use of _CI
83 accordingly. Define a second overload that accepts an iterator
84 of the opposite constness as per LWG 3449.
85 (take_while_view::_Sentinel::operator==): Likewise.
86 * testsuite/std/ranges/adaptors/95322.cc: Add tests for LWG 3449.
87
88 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
89
90 * doc/doxygen/user.cfg.in: Update to Doxygen 1.8.20 format.
91
92 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
93
94 * doc/doxygen/user.cfg.in (PREDEFINED): Use __cplusplus=201703L
95 so that C++17 features are documented.
96
97 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
98
99 * include/bits/stl_algobase.h (copy, move, copy_backward)
100 (move_backward): Fix documentation for returned iterator.
101
102 2020-10-12 Martin Sebor <msebor@redhat.com>
103
104 PR c++/97201
105 * libsupc++/new (operator new): Add attribute alloc_size and malloc.
106
107 2020-10-11 Clement Chigot <clement.chigot@atos.net>
108
109 * config/os/aix/t-aix: Add complementary mode object file to
110 libstdc++fs.a
111
112 2020-10-10 Jonathan Wakely <jwakely@redhat.com>
113
114 PR libstdc++/97362
115 * doc/html/manual/source_code_style.html: Regenerate.
116 * doc/xml/manual/appendix_contributing.xml: Add __deref to
117 BADNAMES.
118 * include/debug/functions.h (_Irreflexive_checker::__deref):
119 Rename to __ref.
120 * testsuite/17_intro/badnames.cc: Check __deref.
121
122 2020-10-10 Ville Voutilainen <ville.voutilainen@gmail.com>
123
124 * include/std/variant (__check_visitor_result):
125 Use size_t for indexes.
126 (__check_visitor_results): Likewise.
127
128 2020-10-09 Ville Voutilainen <ville.voutilainen@gmail.com>
129
130 PR libstdc++/95904
131 * include/std/variant (__deduce_visit_result): Add a nested ::type.
132 (__gen_vtable_impl</*base case*/>::_S_apply):
133 Check the visitor return type.
134 (__same_types): New.
135 (__check_visitor_result): Likewise.
136 (__check_visitor_results): Likewise.
137 (visit(_Visitor&&, _Variants&&...)): Use __check_visitor_results
138 in case we're visiting just one variant.
139 * testsuite/20_util/variant/visit_neg.cc: Adjust.
140
141 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
142
143 PR libstdc++/97311
144 * include/bits/random.tcc (seed_seq::generate): Use uint32_t for
145 calculations. Also split the first loop into three loops to
146 avoid branching on k on every iteration, resolving PR 94823.
147 * testsuite/26_numerics/random/seed_seq/97311.cc: New test.
148 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-erro
149 line number.
150
151 2020-10-09 Daniel Lemire <lemire@gmail.com>
152
153 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
154 New member function implementing Lemire's "nearly divisionless"
155 algorithm.
156 (uniform_int_distribution::operator()): Use _S_nd when the range
157 of the URBG is the full width of the result type.
158
159 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
160
161 * testsuite/Makefile.am: Set and export variable separately.
162 * testsuite/Makefile.in: Regenerate.
163
164 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
165
166 * scripts/check_performance: Use gnu++11 instead of gnu++0x.
167 * testsuite/Makefile.am (check-performance): Export CXXFLAGS to
168 child process.
169 * testsuite/Makefile.in: Regenerate.
170
171 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
172
173 * testsuite/performance/26_numerics/random_dist.cc: New test.
174
175 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
176
177 * testsuite/util/testsuite_performance.h (report_header): Remove
178 unused variable.
179
180 2020-10-08 Patrick Palka <ppalka@redhat.com>
181
182 PR libstdc++/95788
183 * include/bits/ranges_uninitialized.h:
184 (__construct_at_fn::operator()): Rewrite in terms of
185 std::construct_at. Declare it conditionally noexcept. Qualify
186 calls to declval in its requires-clause.
187 * testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
188 New test.
189
190 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
191
192 PR libstdc++/82584
193 * include/bits/random.tcc
194 (discrete_distribution::param_type::_M_initialize)
195 (piecewise_constant_distribution::param_type::_M_initialize)
196 (piecewise_linear_distribution::param_type::_M_initialize):
197 Add assertions for positive sums..
198 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
199 line.
200
201 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
202
203 * include/bits/ios_base.h (ios_base::failure): Add constructors
204 takeing error_code argument. Add code() member function.
205 * testsuite/27_io/ios_base/failure/cxx11.cc: Allow test to
206 run for the old ABI but do not check for derivation from
207 std::system_error.
208 * testsuite/27_io/ios_base/failure/error_code.cc: New test.
209
210 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
211
212 * include/bits/random.h (__detail::_Mod): Revert last change.
213 (__detail::__mod): Do not use _Mod for a==0 case.
214 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
215 Check other cases with a==0. Also check runtime results.
216 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
217 line.
218
219 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
220
221 * include/bits/random.h (__detail::_Mod): Avoid divide by zero.
222 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
223 New test.
224
225 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
226
227 * include/bits/random.h (seed_seq(initializer_list<T>)): Rename
228 parameter to use reserved name.
229 * include/bits/ranges_algo.h (shift_left, shift_right): Rename
230 template parameters to use reserved name.
231 * libsupc++/exception_ptr.h (exception_ptr): Likewise for
232 parameters and local variables.
233 * testsuite/17_intro/names.cc: Check "il". Do not check "d" and
234 "y" in C++20 mode.
235
236 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
237
238 PR libstdc++/90295
239 * config/abi/pre/gnu.ver (CXXABI_1.3.13): New symbol version.
240 (exception_ptr::_M_addref(), exception_ptr::_M_release()):
241 Export symbols.
242 * libsupc++/eh_ptr.cc (exception_ptr::exception_ptr()):
243 Remove out-of-line definition.
244 (exception_ptr::exception_ptr(const exception_ptr&)):
245 Likewise.
246 (exception_ptr::~exception_ptr()): Likewise.
247 (exception_ptr::operator=(const exception_ptr&)):
248 Likewise.
249 (exception_ptr::swap(exception_ptr&)): Likewise.
250 (exception_ptr::_M_addref()): Add branch prediction.
251 * libsupc++/exception_ptr.h (exception_ptr::operator bool):
252 Add noexcept.
253 [!_GLIBCXX_EH_PTR_COMPAT] (operator==, operator!=): Define
254 inline as hidden friends. Remove declarations at namespace
255 scope.
256 (exception_ptr::exception_ptr()): Define inline.
257 (exception_ptr::exception_ptr(const exception_ptr&)):
258 Likewise.
259 (exception_ptr::~exception_ptr()): Likewise.
260 (exception_ptr::operator=(const exception_ptr&)):
261 Likewise.
262 (exception_ptr::swap(exception_ptr&)): Likewise.
263 * testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.13.
264 * testsuite/18_support/exception_ptr/90295.cc: New test.
265
266 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
267
268 * include/std/ranges (join_view): Remove deduction guide.
269 (views::join): Add explicit template argument list to prevent
270 deducing the wrong type.
271 * testsuite/std/ranges/adaptors/join.cc: Move test for LWG 3474
272 here, from ...
273 * testsuite/std/ranges/adaptors/join_lwg3474.cc: Removed.
274
275 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
276
277 * include/bits/regex.h: Use __int_traits<int> instead of
278 std::numeric_limits<int>.
279 * include/bits/uniform_int_dist.h: Use __int_traits<T>::__max
280 instead of std::numeric_limits<T>::max().
281 * include/bits/hashtable_policy.h: Use size_t(-1) instead of
282 std::numeric_limits<size_t>::max().
283 * include/std/regex: Include <ext/numeric_traits.h>.
284 * include/std/string_view: Use typedef for __int_traits<int>.
285 * src/c++11/hashtable_c++0x.cc: Use size_t(-1) instead of
286 std::numeric_limits<size_t>::max().
287 * testsuite/std/ranges/iota/96042.cc: Include <limits>.
288 * testsuite/std/ranges/iota/difference_type.cc: Likewise.
289 * testsuite/std/ranges/subrange/96042.cc: Likewise.
290
291 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
292
293 * include/std/numeric: Move all #include directives to the top
294 of the header.
295 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line
296 numbers.
297 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
298
299 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
300
301 * config/abi/pre/gnu.ver: Add new symbol.
302 * include/bits/functexcept.h (__throw_bad_array_new_length):
303 Declare new function.
304 * include/ext/malloc_allocator.h (malloc_allocator::allocate):
305 Throw bad_array_new_length for impossible sizes (LWG 3190).
306 * include/ext/new_allocator.h (new_allocator::allocate):
307 Likewise.
308 * include/std/memory_resource (polymorphic_allocator::allocate)
309 (polymorphic_allocator::allocate_object): Use new function,
310 __throw_bad_array_new_length.
311 * src/c++11/functexcept.cc (__throw_bad_array_new_length):
312 Define.
313 * testsuite/20_util/allocator/lwg3190.cc: New test.
314
315 2020-10-05 Mike Crowe <mac@mcrowe.com>
316
317 PR libstdc++/91486
318 * include/bits/atomic_futex.h:
319 (__atomic_futex_unsigned::_M_load_when_equal_until): Use target
320 clock duration type when rounding.
321 * testsuite/30_threads/async/async.cc (test_pr91486_wait_for):
322 Rename from test_pr91486.
323 (float_steady_clock): New class for test.
324 (test_pr91486_wait_until): New test.
325
326 2020-10-05 Mike Crowe <mac@mcrowe.com>
327
328 * testsuite/20_util/duration_cast/rounding_c++11.cc: Copy
329 rounding.cc and alter to support compilation for C++11 and to
330 test std::chrono::__detail::ceil.
331
332 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
333
334 * testsuite/29_atomics/atomic_float/value_init.cc: Use float
335 instead of double so that __atomic_load_8 isn't needed.
336
337 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
338
339 * testsuite/18_support/96817.cc: Use terminate handler that
340 calls _Exit(0).
341
342 2020-10-02 Patrick Palka <ppalka@redhat.com>
343
344 * include/bits/stl_iterator.h (reverse_iterator::iter_move):
345 Define for C++20 as per P0896.
346 (reverse_iterator::iter_swap): Likewise.
347 (move_iterator::operator*): Apply P0896 changes for C++20.
348 (move_iterator::operator[]): Likewise.
349 * testsuite/24_iterators/reverse_iterator/cust.cc: New test.
350
351 2020-10-01 Jonathan Wakely <jwakely@redhat.com>
352
353 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
354 Do not try to dereference return value of __atomic_load_n.
355
356 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
357
358 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
359 (_GLIBCXX_GUARD_SET_AND_RELEASE): Define for EABI.
360
361 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
362
363 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_IS_SAME):
364 Define for GCC 11 or when !__is_identifier(__is_same).
365 (_GLIBCXX_BUILTIN_IS_SAME_AS): Remove.
366 * include/std/type_traits (is_same, is_same_v): Replace uses
367 of _GLIBCXX_BUILTIN_IS_SAME_AS.
368
369 2020-09-28 Patrick Palka <ppalka@redhat.com>
370
371 * include/std/ranges (filter_view): Declare the data member
372 _M_base last instead of first, and adjust constructors' member
373 initializer lists accordingly.
374 (transform_view): Likewise.
375 (take_view): Likewise.
376 (take_while_view): Likewise.
377 (drop_view): Likewise.
378 (drop_while_view): Likewise.
379 (join_view): Likewise.
380 (split_view): Likewise (and tweak nearby formatting).
381 (reverse_view): Likewise.
382 * testsuite/std/ranges/adaptors/sizeof.cc: Update expected
383 sizes.
384
385 2020-09-28 Patrick Palka <ppalka@redhat.com>
386
387 * testsuite/std/ranges/adaptors/sizeof.cc: New test.
388
389 2020-09-28 Patrick Palka <ppalka@redhat.com>
390
391 * include/bits/ranges_util.h (subrange::_M_end): Give it
392 [[no_unique_address]].
393 * testsuite/std/ranges/subrange/sizeof.cc: New test.
394
395 2020-09-28 Patrick Palka <ppalka@redhat.com>
396
397 * include/std/ranges (iota_view::_M_bound): Give it
398 [[no_unique_address]].
399 * testsuite/std/ranges/iota/iota_view.cc: Check that an
400 unbounded iota_view has minimal size.
401
402 2020-09-27 Clement Chigot <clement.chigot@atos.net>
403
404 * config/os/aix/t-aix: Use $(AR) without -X32_64.
405
406 2020-09-26 Jonathan Wakely <jwakely@redhat.com>
407
408 PR libstdc++/96817
409 * include/ext/atomicity.h (__gnu_cxx::__is_single_threaded()):
410 New function wrapping __libc_single_threaded if available.
411 (__exchange_and_add_dispatch, __atomic_add_dispatch): Use it.
412 * libsupc++/guard.cc (__cxa_guard_acquire, __cxa_guard_abort)
413 (__cxa_guard_release): Likewise.
414 * testsuite/18_support/96817.cc: New test.
415
416 2020-09-25 Jonathan Wakely <jwakely@redhat.com>
417
418 * libsupc++/Makefile.am: Remove redundant -std=gnu++1z flags.
419 * libsupc++/Makefile.in: Regenerate.
420
421 2020-09-24 Antony Polukhin <antoshkka@gmail.com>
422
423 PR libstdc++/71579
424 * include/std/type_traits (invoke_result, is_invocable)
425 (is_invocable_r, is_nothrow_invocable, is_nothrow_invocable_r):
426 Add static_asserts to make sure that the arguments of the type
427 traits are not misused with incomplete types.
428 * testsuite/20_util/invoke_result/incomplete_args_neg.cc: New test.
429 * testsuite/20_util/is_invocable/incomplete_args_neg.cc: New test.
430 * testsuite/20_util/is_invocable/incomplete_neg.cc: New test.
431 * testsuite/20_util/is_nothrow_invocable/incomplete_args_neg.cc:
432 New test.
433 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: Check
434 for error on incomplete type usage in trait.
435
436 2020-09-24 Patrick Palka <ppalka@redhat.com>
437
438 * include/std/ranges (__detail::__boxable): Split out the
439 associated constraints of __box into here.
440 (__detail::__box): Use the __boxable concept. Define a leaner
441 partial specialization for semiregular types.
442 (single_view::_M_value): Give it [[no_unique_address]].
443 (filter_view::_M_pred): Likewise.
444 (transform_view::_M_fun): Likewise.
445 (take_while_view::_M_pred): Likewise.
446 (drop_while_view::_M_pred):: Likewise.
447 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc: New
448 test.
449
450 2020-09-24 Jonathan Wakely <jwakely@redhat.com>
451
452 * doc/xml/manual/configure.xml: Correct name of option.
453 * doc/html/*: Regenerate.
454
455 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
456
457 PR libstdc++/97167
458 * src/c++17/fs_path.cc (path::_Parser::root_path()): Check
459 for empty string before inspecting the first character.
460 * testsuite/27_io/filesystem/path/append/source.cc: Append
461 empty string_view to path.
462
463 2020-09-22 Glen Joseph Fernandes <glenjofe@gmail.com>
464
465 * include/bits/align.h (align): Fix overflow handling.
466 * testsuite/20_util/align/3.cc: New test.
467
468 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
469
470 * include/Makefile.am: Add new headers and adjust for renamed
471 header.
472 * include/Makefile.in: Regenerate.
473 * include/bits/iterator_concepts.h: Adjust for renamed header.
474 * include/bits/range_access.h (ranges::*): Move to new
475 <bits/ranges_base.h> header.
476 * include/bits/ranges_algobase.h: Include new <bits/ranges_base.h>
477 header instead of <ranges>.
478 * include/bits/ranges_algo.h: Include new <bits/ranges_util.h>
479 header.
480 * include/bits/range_cmp.h: Moved to...
481 * include/bits/ranges_cmp.h: ...here.
482 * include/bits/ranges_base.h: New header.
483 * include/bits/ranges_util.h: New header.
484 * include/experimental/string_view: Include new
485 <bits/ranges_base.h> header.
486 * include/std/functional: Adjust for renamed header.
487 * include/std/ranges (ranges::view_base, ranges::enable_view)
488 (ranges::dangling, ranges::borrowed_iterator_t): Move to new
489 <bits/ranges_base.h> header.
490 (ranges::view_interface, ranges::subrange)
491 (ranges::borrowed_subrange_t): Move to new <bits/ranges_util.h>
492 header.
493 * include/std/span: Include new <bits/ranges_base.h> header.
494 * include/std/string_view: Likewise.
495 * testsuite/24_iterators/back_insert_iterator/pr93884.cc: Add
496 missing <ranges> header.
497 * testsuite/24_iterators/front_insert_iterator/pr93884.cc:
498 Likewise.
499
500 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
501
502 PR libstdc++/96803
503 * include/std/tuple
504 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
505 Use correct value category in __use_alloc call.
506 * testsuite/20_util/tuple/cons/96803.cc: Check with constructors
507 that require correct value category to be used.
508
509 2020-09-22 Patrick Palka <ppalka@redhat.com>
510
511 * include/std/span (span::front): Remove static_assert.
512 (span::back): Likewise.
513 (span::operator[]): Likewise.
514 * testsuite/23_containers/span/back_neg.cc: Rewrite to verify
515 that we check the preconditions of back() only when it's called.
516 * testsuite/23_containers/span/front_neg.cc: Likewise for
517 front().
518 * testsuite/23_containers/span/index_op_neg.cc: Likewise for
519 operator[].
520
521 2020-09-22 Patrick Palka <ppalka@redhat.com>
522
523 * include/bits/stl_algo.h (__sample): Exit early when the
524 input range is empty.
525 * testsuite/25_algorithms/sample/3.cc: New test.
526
527 2020-09-22 Patrick Palka <ppalka@redhat.com>
528
529 * include/bits/stl_algo.h (for_each_n): Mark constexpr for C++20.
530 (search): Likewise for the overload that takes a searcher.
531 * testsuite/25_algorithms/for_each/constexpr.cc: Test constexpr
532 std::for_each_n.
533 * testsuite/25_algorithms/search/constexpr.cc: Test constexpr
534 std::search overload that takes a searcher.
535
536 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
537
538 * include/bits/c++config (__replacement_assert): Add noreturn
539 attribute.
540 (__glibcxx_assert_impl): Use __builtin_expect to hint that the
541 assertion is expected to pass.
542
543 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
544
545 * include/std/ranges (drop_view::begin()): Adjust constraints
546 to match the correct condition for O(1) ranges::next (LWG 3482).
547 * testsuite/std/ranges/adaptors/drop.cc: Check that iterator is
548 cached for non-sized_range.
549
550 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
551
552 * include/std/ranges (transform_view, elements_view): Relax
553 constraints on operator- for iterators, as per LWG 3483.
554 * testsuite/std/ranges/adaptors/elements.cc: Check that we
555 can take the difference of two iterators from a non-random
556 access range.
557 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
558
559 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
560
561 PR libstdc++/97132
562 * include/bits/align.h (align) [!_GLIBCXX_USE_C99_STDINT_TR1]:
563 Remove unused code.
564 (assume_aligned): Do not use __builtin_assume_aligned during
565 constant evaluation.
566 * testsuite/20_util/assume_aligned/1.cc: Improve test.
567 * testsuite/20_util/assume_aligned/97132.cc: New test.
568
569 2020-09-20 Jonathan Wakely <jwakely@redhat.com>
570
571 PR libstdc++/97101
572 * include/std/functional (bind_front): Fix order of parameters
573 in is_nothrow_constructible_v specialization.
574 * testsuite/20_util/function_objects/bind_front/97101.cc: New test.
575
576 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
577
578 * include/std/memory: Move #include <bits/align.h> inside C++11
579 conditional includes.
580
581 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
582
583 * include/Makefile.am (bits_headers): Add new header.
584 * include/Makefile.in: Regenerate.
585 * include/bits/align.h: New file.
586 * include/std/memory (align): Move definition to bits/align.h.
587 (assume_aligned): Likewise.
588
589 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
590
591 * include/std/chrono [C++17] (chrono::__detail::ceil): Add
592 using declaration to make chrono::ceil available for internal
593 use with a consistent name.
594 (chrono::__detail::__ceil_impl): New function template.
595 (chrono::__detail::ceil): Use __ceil_impl to compare and
596 increment the value. Remove SFINAE constraint.
597
598 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
599
600 * include/bits/regex_error.h (__throw_regex_error): Fix
601 parameter declaration and use reserved attribute names.
602
603 2020-09-11 Mike Crowe <mac@mcrowe.com>
604
605 * include/std/condition_variable (condition_variable::wait_until):
606 Convert delta to steady_clock duration before adding to current
607 steady_clock time to avoid rounding errors described in PR68519.
608 (condition_variable::wait_for): Simplify calculation of absolute
609 time by using chrono::__detail::ceil in both overloads.
610 * testsuite/30_threads/condition_variable/members/68519.cc:
611 (test_wait_for): Renamed from test01. Replace unassigned val
612 variable with constant false. Reduce scope of mx and cv
613 variables to just test_wait_for function.
614 (test_wait_until): Add new test case.
615
616 2020-09-11 Mike Crowe <mac@mcrowe.com>
617
618 PR libstdc++/91486
619 * include/bits/atomic_futex.h
620 (__atomic_futex_unsigned::_M_load_when_equal_for)
621 (__atomic_futex_unsigned::_M_load_when_equal_until): Use
622 __detail::ceil to convert delta to the reference clock
623 duration type to avoid resolution problems.
624 * include/std/chrono (__detail::ceil): Move implementation
625 of std::chrono::ceil into private namespace so that it's
626 available to pre-C++17 code.
627 * testsuite/30_threads/async/async.cc (test_pr91486):
628 Test __atomic_futex_unsigned::_M_load_when_equal_for.
629
630 2020-09-11 Mike Crowe <mac@mcrowe.com>
631
632 * include/bits/atomic_futex.h
633 (__atomic_futex_unsigned::_M_load_when_equal_until): Add
634 loop on generic _Clock to check the timeout against _Clock
635 again after _M_load_when_equal_until returns indicating a
636 timeout.
637 * testsuite/30_threads/async/async.cc: Invent slow_clock
638 that runs at an eleventh of steady_clock's speed. Use it
639 to test the user-supplied-clock variant of
640 __atomic_futex_unsigned::_M_load_when_equal_until works
641 generally with test03 and loops correctly when the timeout
642 time hasn't been reached in test04.
643
644 2020-09-11 Mike Crowe <mac@mcrowe.com>
645
646 PR libstdc++/93542
647 * include/bits/atomic_futex.h (__atomic_futex_unsigned): Change
648 __clock_t typedef to use steady_clock so that unknown clocks are
649 synced to it rather than system_clock. Change existing __clock_t
650 overloads of _M_load_and_text_until_impl and
651 _M_load_when_equal_until to use system_clock explicitly. Remove
652 comment about DR 887 since these changes address that problem as
653 best as we currently able.
654
655 2020-09-11 Mike Crowe <mac@mcrowe.com>
656
657 PR libstdc++/93542
658 * config/abi/pre/gnu.ver: Update for addition of
659 __atomic_futex_unsigned_base::_M_futex_wait_until_steady.
660 * include/bits/atomic_futex.h (__atomic_futex_unsigned_base):
661 Add comments to clarify that _M_futex_wait_until and
662 _M_load_and_test_until use CLOCK_REALTIME.
663 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady)
664 (__atomic_futex_unsigned_base::_M_load_and_text_until_steady):
665 New member functions that use CLOCK_MONOTONIC.
666 (__atomic_futex_unsigned_base::_M_load_and_test_until_impl)
667 (__atomic_futex_unsigned_base::_M_load_when_equal_until): Add
668 overloads that accept a steady_clock time_point and use the
669 new member functions.
670 * src/c++11/futex.cc: Include headers required for
671 clock_gettime.
672 (futex_clock_monotonic_flag): New constant to tell futex to
673 use CLOCK_MONOTONIC to match existing futex_clock_realtime_flag.
674 (futex_clock_monotonic_unavailable): New global to store the
675 result of trying to use CLOCK_MONOTONIC.
676 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady): Add
677 new variant of _M_futex_wait_until that uses CLOCK_MONOTONIC to
678 support waiting using steady_clock.
679
680 2020-09-11 Mike Crowe <mac@mcrowe.com>
681
682 * src/c++11/futex.cc: Add new constants for required futex
683 flags. Add futex_clock_realtime_unavailable flag to store
684 result of trying to use FUTEX_CLOCK_REALTIME.
685 (__atomic_futex_unsigned_base::_M_futex_wait_until): Try to
686 use FUTEX_WAIT_BITSET with FUTEX_CLOCK_REALTIME and only
687 fall back to using gettimeofday and FUTEX_WAIT if that's not
688 supported.
689
690 2020-09-11 Mike Crowe <mac@mcrowe.com>
691
692 * testsuite/30_threads/async/async.cc (test02): Test steady_clock
693 with std::future::wait_until.
694 (test03): Add new test templated on clock type waiting for future
695 associated with async to resolve.
696 (main): Call test03 to test both system_clock and steady_clock.
697
698 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
699 Christophe Lyon <christophe.lyon@linaro.org>
700
701 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
702
703 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
704 Christophe Lyon <christophe.lyon@linaro.org>
705
706 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
707
708 2020-09-11 Christophe Lyon <christophe.lyon@linaro.org>
709
710 * include/bits/regex_error.h: Avoid warning with -fno-exceptions.
711
712 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
713
714 * include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in_all):
715 Add casts to compare types of the same signedness.
716
717 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
718
719 * include/bits/ranges_algobase.h (__equal_fn): Remove unused
720 typedef.
721
722 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
723
724 * include/std/version (__cpp_lib_array_constexpr):
725 (__cpp_lib_constexpr_char_traits): Only define C++17 value when
726 compiling C++17.
727
728 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
729
730 * include/experimental/bits/shared_ptr.h (shared_ptr(auto_ptr&&))
731 (operator=(auto_ptr&&)): Add diagnostic pragmas to suppress
732 warnings for uses of std::auto_ptr.
733 * include/experimental/type_traits (is_literal_type_v):
734 Likewise, for use of std::is_literal_type.
735 * include/std/condition_variable (condition_variable_any::_Unlock):
736 Likewise, for use of std::uncaught_exception.
737
738 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
739
740 * include/bits/fs_path.h (path::_List::type()): Avoid narrowing
741 conversion.
742 * include/std/chrono (operator+(const year&, const years&)):
743 Likewise.
744
745 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
746
747 * include/bits/codecvt.h (codecvt_byname): Remove names of
748 unused parameters.
749
750 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
751
752 * include/bits/locale_facets_nonio.tcc: Adjust whitespace.
753
754 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
755
756 * include/c_global/cmath (__lerp): Avoid -Wparentheses warnings.
757
758 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
759
760 * include/bits/atomic_base.h: Fix -Wunused-variable
761 warnings.
762 * include/ext/new_allocator.h: Fix -Wunused-parameter
763 warnings.
764
765 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
766
767 * include/bits/stl_iterator.h (counted_iterator): Add assertions
768 to check preconditions added by LWG 3472.
769
770 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
771
772 PR libstdc++/94160
773 * src/c++17/memory_resource.cc (munge_options): Round
774 max_blocks_per_chunk to a multiple of four.
775 (__pool_resource::_M_alloc_pools()): Simplify slightly.
776 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
777 Check that valid pointers are returned when small values are
778 used for max_blocks_per_chunk.
779
780 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
781
782 PR libstdc++/96942
783 * include/std/memory_resource (monotonic_buffer_resource::do_allocate):
784 Use __builtin_expect when checking if a new buffer needs to be
785 allocated from the upstream resource, and for checks for edge
786 cases like zero sized buffers and allocations.
787 * src/c++17/memory_resource.cc (aligned_size): New class template.
788 (aligned_ceil): New helper function to round up to a given
789 alignment.
790 (monotonic_buffer_resource::chunk): Replace _M_size and _M_align
791 with an aligned_size member. Remove _M_canary member. Change _M_next
792 to pointer instead of unaligned buffer.
793 (monotonic_buffer_resource::chunk::allocate): Round up to multiple
794 of 64 instead of to power of two. Check for size overflow. Remove
795 redundant check for minimum required alignment.
796 (monotonic_buffer_resource::chunk::release): Adjust for changes
797 to data members.
798 (monotonic_buffer_resource::_M_new_buffer): Use aligned_ceil.
799 (big_block): Replace _M_size and _M_align with aligned_size
800 member.
801 (big_block::big_block): Check for size overflow.
802 (big_block::size, big_block::align): Adjust to use aligned_size.
803 (big_block::alloc_size): Use aligned_ceil.
804 (munge_options): Use aligned_ceil.
805 (__pool_resource::allocate): Use big_block::align for alignment.
806 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Check
807 upstream resource gets expected values for impossible sizes.
808 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
809 Likewise. Adjust checks for expected alignment in existing test.
810
811 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
812
813 * include/std/chrono (duration::_S_gcd): Use invariant that
814 neither value is zero initially.
815
816 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
817
818 * include/std/ranges (__box): Simplify constraints as per LWG 3477.
819
820 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
821
822 PR libstdc++/96592
823 * include/std/tuple (_TupleConstraints<true, T...>): Use
824 alternative is_constructible instead of std::is_constructible.
825 * testsuite/20_util/tuple/cons/96592.cc: New test.
826
827 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
828
829 * include/std/chrono (duration::_S_gcd): Use iterative algorithm
830 for C++14 and later.
831 * include/std/numeric (__detail::__gcd): Replace recursive
832 Euclidean algorithm with iterative version of binary GCD algorithm.
833 * testsuite/26_numerics/gcd/1.cc: Test additional inputs.
834 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
835 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
836 * testsuite/experimental/numeric/gcd.cc: Test additional inputs.
837 * testsuite/26_numerics/gcd/2.cc: New test.
838
839 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
840
841 PR libstdc++/92978
842 * testsuite/experimental/numeric/92978.cc: Use experimental::lcm
843 not std::lcm.
844
845 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
846
847 PR libstdc++/96851
848 * include/bits/cpp_type_traits.h (__is_memcmp_ordered):
849 New trait that says if memcmp can be used for ordering.
850 (__is_memcmp_ordered_with): Likewise, for two types.
851 * include/bits/deque.tcc (__lex_cmp_dit): Use new traits
852 instead of __is_byte and __numeric_traits.
853 (__lexicographical_compare_aux1): Likewise.
854 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
855 Likewise.
856 * include/bits/stl_algobase.h (__lexicographical_compare_aux1)
857 (__is_byte_iter): Likewise.
858 * include/std/array (operator<=>): Likewise. Only use memcmp
859 when std::is_constant_evaluated() is false.
860 * testsuite/23_containers/array/comparison_operators/96851.cc:
861 New test.
862 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
863 Adjust dg-error line numbers.
864
865 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
866
867 * include/bits/stl_iterator.h: Include <bits/exception_defines.h>
868 for definitions of __try, __catch and __throw_exception_again.
869 (counted_iterator::operator++(int)): Use __throw_exception_again
870 instead of throw.
871 * libsupc++/new: Include <bits/exception.h> not <exception>.
872 * libsupc++/new_opvnt.cc: Include <bits/exception_defines.h>.
873 * testsuite/18_support/destroying_delete.cc: Include
874 <type_traits> for std::is_same_v definition.
875 * testsuite/20_util/variant/index_type.cc: Qualify size_t.
876
877 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
878
879 PR libstdc++/71960
880 * include/bits/c++config (__glibcxx_assert_impl): Remove
881 do-while so that uses of the macro need to add it.
882 (__glibcxx_assert): Rename macro for runtime assertions
883 to __glibcxx_assert_2.
884 (__glibcxx_assert_1): Define macro for constexpr assertions.
885 (__glibcxx_assert): Define macro for constexpr and runtime
886 assertions.
887 * include/bits/range_access.h (ranges::advance): Remove
888 redundant precondition checks during constant evaluation.
889 * include/parallel/base.h (_GLIBCXX_PARALLEL_ASSERT): Always
890 use do-while in macro expansion.
891 * include/std/ranges (iota_view::iota_view(W, B)): Remove
892 redundant braces.
893
894 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
895
896 * include/std/chrono (duration::_S_gcd(intmax_t, intmax_t)):
897 New helper function for finding GCD of two positive intmax_t
898 values.
899 (duration::__divide): New helper alias for dividing one period
900 by another.
901 (duration::__is_harmonic): Use __divide not ratio_divide.
902 (duration(const duration<R2, P2>&)): Require the duration rep
903 types to be convertible.
904 * testsuite/20_util/duration/cons/dr2094.cc: New test.
905 * testsuite/20_util/duration/requirements/reduced_period.cc:
906 Fix definition of unused member functions in test type.
907 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
908 Adjust expected errors.
909
910 2020-08-29 Jonathan Wakely <jwakely@redhat.com>
911
912 * include/std/numeric (__detail::__absu(bool)): Make deleted
913 function a function template, so it will be chosen for calls
914 with an explicit template argument list.
915 * testsuite/26_numerics/gcd/gcd_neg.cc: Add dg-prune-output.
916 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
917
918 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
919
920 * include/std/chrono (common_type): Fix partial specializations
921 for a single duration type to use the common_type of the rep.
922 (duration::operator+, duration::operator-): Fix return types
923 to also use the common_type of the rep.
924 * testsuite/20_util/duration/requirements/reduced_period.cc:
925 Check duration using a rep that has common_type specialized.
926
927 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
928
929 PR libstdc++/92978
930 * include/std/numeric (__abs_integral): Replace with ...
931 (__detail::__absu): New function template that returns an
932 unsigned type, guaranteeing it can represent the most
933 negative signed value.
934 (__detail::__gcd, __detail::__lcm): Require arguments to
935 be unsigned and therefore already non-negative.
936 (gcd, lcm): Convert arguments to absolute value as unsigned
937 type before calling __detail::__gcd or __detail::__lcm.
938 * include/experimental/numeric (gcd, lcm): Likewise.
939 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust expected
940 errors.
941 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
942 * testsuite/26_numerics/gcd/92978.cc: New test.
943 * testsuite/26_numerics/lcm/92978.cc: New test.
944 * testsuite/experimental/numeric/92978.cc: New test.
945
946 2020-08-27 Jonathan Wakely <jwakely@redhat.com>
947
948 * include/std/chrono (__duration_common_type): Ensure the
949 reduced ratio is used. Remove unused partial specialization
950 using __failure_type.
951 (common_type): Pass reduced ratios to __duration_common_type.
952 Add partial specializations for simple cases involving a single
953 duration or time_point type.
954 (duration::period): Use reduced ratio.
955 (duration::operator+(), duration::operator-()): Return duration
956 type using the reduced ratio.
957 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
958 Adjust expected errors.
959 * testsuite/20_util/duration/requirements/reduced_period.cc: New test.
960
961 2020-08-27 Patrick Palka <ppalka@redhat.com>
962
963 * include/std/chrono (year_month::operator+): Properly handle a
964 month value of 0 by casting the month value to int before
965 subtracting 1 from it so that the difference is sign-extended in
966 the subsequent addition.
967 * testsuite/std/time/year_month/1.cc: Test adding months to a
968 year_month whose month component is below or above the
969 normalized range of [1,12].
970
971 2020-08-27 Patrick Palka <ppalka@redhat.com>
972
973 * include/std/chrono
974 (__detail::__months_years_conversion_disambiguator): Define.
975 (year_month::operator+=): Templatize the 'months'-based overload
976 so that the 'years'-based overload is selected in case of
977 equally-ranked implicit conversion sequences to both 'months'
978 and 'years' from the supplied argument.
979 (year_month::operator-=): Likewise.
980 (year_month::operator+): Likewise.
981 (year_month::operator-): Likewise.
982 (year_month_day::operator+=): Likewise.
983 (year_month_day::operator-=): Likewise.
984 (year_month_day::operator+): Likewise.
985 (year_month_day::operator-): Likewise.
986 (year_month_day_last::operator+=): Likewise.
987 (year_month_day_last::operator-=): Likewise.
988 (year_month_day_last::operator+): Likewise
989 (year_month_day_last::operator-): Likewise.
990 (year_month_day_weekday::operator+=): Likewise
991 (year_month_day_weekday::operator-=): Likewise.
992 (year_month_day_weekday::operator+): Likewise.
993 (year_month_day_weekday::operator-): Likewise.
994 (year_month_day_weekday_last::operator+=): Likewise
995 (year_month_day_weekday_last::operator-=): Likewise.
996 (year_month_day_weekday_last::operator+): Likewise.
997 (year_month_day_weekday_last::operator-): Likewise.
998 (testsuite/std/time/year_month/2.cc): New test.
999 (testsuite/std/time/year_month_day/2.cc): New test.
1000 (testsuite/std/time/year_month_day_last/2.cc): New test.
1001 (testsuite/std/time/year_month_weekday/2.cc): New test.
1002 (testsuite/std/time/year_month_weekday_last/2.cc): New test.
1003 * testsuite/std/time/year_month/2.cc: New file.
1004 * testsuite/std/time/year_month_day/2.cc: New file.
1005 * testsuite/std/time/year_month_day_last/2.cc: New file.
1006 * testsuite/std/time/year_month_weekday/2.cc: New file.
1007 * testsuite/std/time/year_month_weekday_last/2.cc: New file.
1008
1009 2020-08-27 Patrick Palka <ppalka@redhat.com>
1010
1011 PR libstdc++/95322
1012 * include/std/ranges (transform_view::sentinel::__distance_from):
1013 Give this a deduced return type.
1014 (transform_view::sentinel::operator-): Adjust the return type so
1015 that it's based on the constness of the iterator rather than
1016 that of the sentinel.
1017 * testsuite/std/ranges/adaptors/95322.cc: Refer to LWG 3488.
1018
1019 2020-08-27 Patrick Palka <ppalka@redhat.com>
1020
1021 * include/std/ranges (elements_view::begin): Adjust constraints.
1022 (elements_view::end): Likewise.
1023 (elements_view::_Sentinel::operator==): Templatize to take both
1024 _Iterator<true> and _Iterator<false>.
1025 (elements_view::_Sentinel::operator-): Likewise.
1026 * testsuite/std/ranges/adaptors/elements.cc: Add testcase for
1027 the example from P1994R1.
1028 * testsuite/std/ranges/adaptors/lwg3406.cc: New test.
1029
1030 2020-08-27 Patrick Palka <ppalka@redhat.com>
1031
1032 * include/std/ranges (elements_view::end): Replace these two
1033 overloads with four new overloads.
1034 (elements_view::_Iterator::operator==): Remove.
1035 (elements_view::_Iterator::operator-): Likewise.
1036 (elements_view::_Sentinel): Define.
1037
1038 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1039
1040 * include/std/tuple (_Tuple_impl): Whitespaces changes for
1041 consistent indentation. Also use __enable_if_t alias template.
1042
1043 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1044
1045 PR libstdc++/96803
1046 * include/std/tuple
1047 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
1048 Replace parameter pack with a type parameter and a pack and pass
1049 the first type to __use_alloc.
1050 * testsuite/20_util/tuple/cons/96803.cc: New test.
1051
1052 2020-08-26 Patrick Palka <ppalka@redhat.com>
1053
1054 * include/std/chrono (year_month_weekday::operator==): Compare
1055 weekday_indexed instead of weekday.
1056 * testsuite/std/time/year_month_weekday/1.cc: Augment testcase.
1057
1058 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1059
1060 * include/bits/hashtable_policy.h (_Hash_code_base): Change
1061 index of _Hashtable_ebo_helper base class.
1062 * testsuite/23_containers/unordered_map/dup_types.cc: New test.
1063
1064 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1065
1066 PR libstdc++/71960
1067 * include/experimental/string_view (basic_string_view):
1068 Enable debug assertions.
1069 * include/std/string_view (basic_string_view):
1070 Likewise.
1071
1072 2020-08-26 François Dumont <fdumont@gcc.gnu.org>
1073
1074 * include/bits/hashtable_policy.h (_Hashtable<>): Rename _H1 into _Hash
1075 _H2 into _RangeHash and _Hash into _Unused.
1076 (_Hastable_base<>): Likewise.
1077 (_Map_base<>): Likewise.
1078 (_Insert_base<>): Likewise.
1079 (_Insert<>): Likewise.
1080 (_Rehash_base<>): Likewise.
1081 (_Local_iterator_base<>): Likewise.
1082 (_Hash_code_base<>): Likewise.
1083 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false>):
1084 Remove.
1085 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>):
1086 Remove.
1087 (_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHas, _Unused,
1088 bool>): Remove _Hashtable_ebo_helper<2, _RangeHash> base type..
1089 (_Hash_code_base<>::_M_bucket_index(const _Key&, __hash_code, size_t)):
1090 Replace by...
1091 (_Hash_code_base<>::_M_bucket_index(__hash_code, size_t)): ...this.
1092 (_Local_iterator<>): Remove _H1 and _H2 template parameters.
1093 (_Local_const_iterator<>): Likewise.
1094 (_Equality<>): Likewise.
1095 (_Map_base<>::operator[](const key_type&): Adapt.
1096 (_Map_base<>::operator[](key_type&&): Adapt.
1097 (_Identity::operator()): Add noexcept.
1098 (_Select1st::operator()): Likewise.
1099 (_Hash_code_base<>): Remove _Hashtable_ebo_helper<0, _ExtractKey> base
1100 type.
1101 (_Hash_code_base::_M_extract): Remove.
1102 * include/bits/hashtable.h (_Hashtable<>): Remove _H1 and _H2 template
1103 parameters. Remove _ExtractKey from constructors.
1104 (_Hashtable<>::_M_insert_unique_node(const key_type&, size_t,
1105 __hash_code, __node_type*, size_t)): Replace by...
1106 (_Hashtable<>::_M_insert_unique_node(size_t, __hash_code,
1107 __node_type*, size_t)): ...this.
1108 (_Hashtable<>::_M_insert_muti_node(__node_type*, const key_type&,
1109 __hash_code, __node_type*)): Replace by...
1110 (_Hashtable<>::_M_insert_multi_node(__node_type*, __hash_code,
1111 __node_type*)): ...this.
1112 (_Hashtable<>::__key_extract): Remove.
1113 * include/bits/node_handle.h: Adapt.
1114
1115 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
1116
1117 * testsuite/21_strings/debug/iterator_self_move_assign_neg.cc: Removed.
1118 * testsuite/21_strings/debug/self_move_assign_neg.cc: Removed.
1119 * testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc: Removed.
1120 * testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Removed.
1121 * testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc: Removed.
1122 * testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc: Removed.
1123 * testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc: Removed.
1124 * testsuite/23_containers/list/debug/self_move_assign_neg.cc: Removed.
1125 * testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc: Removed.
1126 * testsuite/23_containers/map/debug/self_move_assign_neg.cc: Removed.
1127 * testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc: Removed.
1128 * testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: Removed.
1129 * testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc: Removed.
1130 * testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: Removed.
1131 * testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc: Removed.
1132 * testsuite/23_containers/set/debug/self_move_assign_neg.cc: Removed.
1133 * testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc: Removed.
1134 * testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc: Removed.
1135 * testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc:
1136 Removed.
1137 * testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc: Removed.
1138 * testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc:
1139 Removed.
1140 * testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc: Removed.
1141 * testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc: Removed.
1142 * testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc: Removed.
1143 * testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc: Removed.
1144 * testsuite/23_containers/vector/debug/self_move_assign_neg.cc: Removed.
1145
1146 2020-08-25 Patrick Palka <ppalka@redhat.com>
1147
1148 * include/std/chrono (year_month_weekday::ok): Fix assert.
1149
1150 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
1151
1152 * include/std/future (future, shared_future. promise): Add
1153 is_destructible assertion (LWG 3466). Adjust string-literal for
1154 !is_array and !is_function assertions.
1155 * testsuite/30_threads/future/requirements/lwg3458.cc: Check
1156 types with no accessible destructor. Adjust expected errors.
1157 * testsuite/30_threads/promise/requirements/lwg3466.cc:
1158 Likewise.
1159 * testsuite/30_threads/shared_future/requirements/lwg3458.cc:
1160 Likewise.
1161
1162 2020-08-25 Patrick Palka <ppalka@redhat.com>
1163 Ed Smith-Rowland <3dw4rd@verizon.net>
1164 Jonathan Wakely <jwakely@redhat.com>
1165
1166 * include/std/chrono (time_point::operator++)
1167 (time_point::operator--): Define.
1168 (utc_clock, tai_clock, gps_clock): Forward declare.
1169 (utc_time, utc_seconds, tai_time, tai_seconds, gps_time)
1170 (gps_seconds): Define.
1171 (is_clock<utc_clock>, is_clock<tai_clock>, is_clock<gps_clock>)
1172 (is_clock_v<utc_clock>, is_clock_v<tai_clock>)
1173 (is_clock_v<gps_clock>): Define these specializations.
1174 (leap_second_info): Define.
1175 (day, month, year, weekday, weekday_indexed)
1176 (weekday_last, month_day, month_day_last, month_weekday)
1177 (month_weekday_last, year_month, year_month_day)
1178 (year_month_day_last, year_month_weekday, year_month_weekday_last):
1179 Declare and later define.
1180 (last_spec, last, __detail::__days_per_month)
1181 (__detail::__days_per_month, __detail::__last_day): Define.
1182 (January, February, March, April, May, June, July, August)
1183 (September, October, November, December, Sunday, Monday, Tuesday)
1184 (Wednesday, Thursday, Friday, Saturday): Define.
1185 (weekday::operator[]): Define out-of-line.
1186 (year_month_day::_S_from_days, year_month_day::M_days_since_epoch):
1187 Likewise.
1188 (year_month_day::year_month_day, year_month_day::ok): Likewise.
1189 (__detail::__pow10, hh_mm_ss): Define.
1190 (literals::chrono_literals::operator""d)
1191 (literals::chrono_literals::operator""y): Define.
1192 (is_am, is_pm, make12, make24): Define.
1193 * testsuite/20_util/time_point/4.cc: New test.
1194 * testsuite/std/time/day/1.cc: New test.
1195 * testsuite/std/time/hh_mm_ss/1.cc: New test.
1196 * testsuite/std/time/is_am/1.cc: New test.
1197 * testsuite/std/time/is_pm/1.cc: New test.
1198 * testsuite/std/time/make12/1.cc: New test.
1199 * testsuite/std/time/make24/1.cc: New test.
1200 * testsuite/std/time/month/1.cc: New test.
1201 * testsuite/std/time/month_day/1.cc: New test.
1202 * testsuite/std/time/month_day_last/1.cc: New test.
1203 * testsuite/std/time/month_weekday/1.cc: New test.
1204 * testsuite/std/time/month_weekday_last/1.cc: New test.
1205 * testsuite/std/time/weekday/1.cc: New test.
1206 * testsuite/std/time/weekday_indexed/1.cc: New test.
1207 * testsuite/std/time/weekday_last/1.cc: New test.
1208 * testsuite/std/time/year/1.cc: New test.
1209 * testsuite/std/time/year_month/1.cc: New test.
1210 * testsuite/std/time/year_month_day/1.cc: New test.
1211 * testsuite/std/time/year_month_day_last/1.cc: New test.
1212 * testsuite/std/time/year_month_weekday/1.cc: New test.
1213 * testsuite/std/time/year_month_weekday_last/1.cc: New test.
1214
1215 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1216
1217 * include/std/ranges (join_view): Add deduction guide (LWG 3474).
1218 * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test.
1219
1220 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1221
1222 * include/bits/iterator_concepts.h (indirectly_readable): Add
1223 partial specializations to resolve ambiguities (LWG 3446).
1224 * testsuite/24_iterators/associated_types/readable.traits.cc:
1225 Check types with both value_type and element_type.
1226
1227 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1228
1229 * include/std/ranges (ranges::iota_view::size()): Perform all
1230 calculations in the right unsigned types.
1231 * testsuite/std/ranges/iota/size.cc: New test.
1232
1233 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1234
1235 PR libstdc++/96766
1236 * include/std/variant (_Variant_storage): Replace implicit
1237 conversions from size_t to __index_type with explicit casts.
1238
1239 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1240
1241 * testsuite/30_threads/packaged_task/cons/alloc.cc: Run for
1242 C++11 and skip for C++17 or later.
1243
1244 2020-08-24 Corentin Gay <gay@adacore.com>
1245
1246 * testsuite/20_util/shared_ptr/atomic/3.cc: Do not require POSIX
1247 threads and add -pthread only on targets supporting them.
1248 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
1249 Likewise.
1250 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
1251 Likewise.
1252 * testsuite/30_threads/async/42819.cc: Likewise.
1253 * testsuite/30_threads/async/49668.cc: Likewise.
1254 * testsuite/30_threads/async/54297.cc: Likewise.
1255 * testsuite/30_threads/async/any.cc: Likewise.
1256 * testsuite/30_threads/async/async.cc: Likewise.
1257 * testsuite/30_threads/async/except.cc: Likewise.
1258 * testsuite/30_threads/async/launch.cc: Likewise.
1259 * testsuite/30_threads/async/lwg2021.cc: Likewise.
1260 * testsuite/30_threads/async/sync.cc: Likewise. : Likewise.
1261 * testsuite/30_threads/call_once/39909.cc: Likewise.
1262 * testsuite/30_threads/call_once/49668.cc: Likewise.
1263 * testsuite/30_threads/call_once/60497.cc: Likewise.
1264 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
1265 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
1266 * testsuite/30_threads/condition_variable/54185.cc: Likewise.
1267 * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
1268 * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
1269 * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
1270 * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
1271 * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
1272 * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
1273 * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
1274 Likewise.
1275 * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
1276 * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
1277 * testsuite/30_threads/condition_variable_any/cond.cc: Likewise.
1278 * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
1279 * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
1280 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
1281 * testsuite/30_threads/future/cons/move.cc: Likewise.
1282 * testsuite/30_threads/future/members/45133.cc: Likewise.
1283 * testsuite/30_threads/future/members/get.cc: Likewise.
1284 * testsuite/30_threads/future/members/get2.cc: Likewise.
1285 * testsuite/30_threads/future/members/share.cc: Likewise.
1286 * testsuite/30_threads/future/members/valid.cc: Likewise.
1287 * testsuite/30_threads/future/members/wait.cc: Likewise.
1288 * testsuite/30_threads/future/members/wait_for.cc: Likewise.
1289 * testsuite/30_threads/future/members/wait_until.cc: Likewise.
1290 * testsuite/30_threads/lock/1.cc: Likewise.
1291 * testsuite/30_threads/lock/2.cc: Likewise.
1292 * testsuite/30_threads/lock/3.cc: Likewise.
1293 * testsuite/30_threads/lock/4.cc: Likewise.
1294 * testsuite/30_threads/mutex/cons/1.cc: Likewise.
1295 * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
1296 * testsuite/30_threads/mutex/lock/1.cc: Likewise.
1297 * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
1298 * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
1299 * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
1300 * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
1301 * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
1302 * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
1303 * testsuite/30_threads/packaged_task/49668.cc: Likewise.
1304 * testsuite/30_threads/packaged_task/60564.cc: Likewise.
1305 * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
1306 * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
1307 * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
1308 * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
1309 * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
1310 * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
1311 * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
1312 * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
1313 Likewise.
1314 * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
1315 * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
1316 * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
1317 * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
1318 * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
1319 * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
1320 * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
1321 * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
1322 * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
1323 * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
1324 * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
1325 * testsuite/30_threads/promise/60966.cc: Likewise.
1326 * testsuite/30_threads/promise/cons/1.cc: Likewise.
1327 * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
1328 * testsuite/30_threads/promise/cons/move.cc: Likewise.
1329 * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
1330 * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
1331 * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
1332 * testsuite/30_threads/promise/members/get_future.cc: Likewise.
1333 * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
1334 * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
1335 * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
1336 * testsuite/30_threads/promise/members/set_value.cc: Likewise.
1337 * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
1338 * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
1339 * testsuite/30_threads/promise/members/swap.cc: Likewise.
1340 * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
1341 * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
1342 Likewise.
1343 * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
1344 * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
1345 * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
1346 Likewise.
1347 * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
1348 * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
1349 * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
1350 * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
1351 * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
1352 * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
1353 Likewise.
1354 * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
1355 * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
1356 * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
1357 Likewise.
1358 * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
1359 Likewise.
1360 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
1361 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
1362 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
1363 Likewise.
1364 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
1365 Likewise.
1366 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
1367 Likewise.
1368 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
1369 Likewise.
1370 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
1371 Likewise.
1372 * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
1373 * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
1374 * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
1375 * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
1376 * testsuite/30_threads/shared_future/members/get.cc: Likewise.
1377 * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
1378 * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
1379 * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
1380 * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
1381 * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
1382 * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
1383 * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
1384 * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
1385 * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
1386 * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
1387 * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
1388 * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
1389 * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
1390 * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
1391 * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
1392 * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
1393 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
1394 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
1395 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
1396 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
1397 * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
1398 * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
1399 * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
1400 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
1401 * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
1402 * testsuite/30_threads/this_thread/1.cc: Likewise.
1403 * testsuite/30_threads/this_thread/sleep_for-mt.cc: Likewise.
1404 * testsuite/30_threads/this_thread/sleep_until-mt.cc: Likewise.
1405 * testsuite/30_threads/thread/cons/1.cc: Likewise.
1406 * testsuite/30_threads/thread/cons/2.cc: Likewise.
1407 * testsuite/30_threads/thread/cons/3.cc: Likewise.
1408 * testsuite/30_threads/thread/cons/4.cc: Likewise.
1409 * testsuite/30_threads/thread/cons/49668.cc: Likewise.
1410 * testsuite/30_threads/thread/cons/5.cc: Likewise.
1411 * testsuite/30_threads/thread/cons/6.cc: Likewise.
1412 * testsuite/30_threads/thread/cons/7.cc: Likewise.
1413 * testsuite/30_threads/thread/cons/8.cc: Likewise.
1414 * testsuite/30_threads/thread/cons/9.cc: Likewise.
1415 * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
1416 * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
1417 * testsuite/30_threads/thread/members/1.cc: Likewise.
1418 * testsuite/30_threads/thread/members/2.cc: Likewise.
1419 * testsuite/30_threads/thread/members/3.cc: Likewise.
1420 * testsuite/30_threads/thread/members/4.cc: Likewise.
1421 * testsuite/30_threads/thread/members/5.cc: Likewise.
1422 * testsuite/30_threads/thread/members/hardware_concurrency.cc:
1423 Likewise.
1424 * testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise.
1425 * testsuite/30_threads/thread/swap/1.cc: Likewise.
1426 * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
1427 * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
1428 Likewise.
1429 * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
1430 * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
1431 * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
1432 Likewise.
1433 * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
1434 * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
1435 * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
1436 * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
1437 * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
1438 * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
1439 * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
1440 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
1441 * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
1442 * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
1443 * testsuite/30_threads/try_lock/1.cc: Likewise.
1444 * testsuite/30_threads/try_lock/2.cc: Likewise.
1445 * testsuite/30_threads/try_lock/3.cc: Likewise.
1446 * testsuite/30_threads/try_lock/4.cc: Likewise.
1447 * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
1448 * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
1449 * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
1450 * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
1451 * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
1452 * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
1453 * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
1454 * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
1455 * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
1456 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
1457 * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
1458
1459 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
1460
1461 PR libstdc++/96736
1462 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Do not
1463 test "cold" on darwin.
1464 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
1465 Likewise.
1466 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
1467 Likewise.
1468 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
1469 Likewise.
1470 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
1471 Likewise.
1472
1473 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
1474
1475 PR libstdc++/96718
1476 * testsuite/25_algorithms/pstl/feature_test-2.cc: Require
1477 tbb-backend effective target.
1478 * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
1479 * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
1480 * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
1481
1482 2020-08-20 Jonathan Wakely <jwakely@redhat.com>
1483
1484 * include/bits/iterator_concepts.h [__STRICT_ANSI__]
1485 (incrementable_traits<__int128>): Define specialization.
1486 (incrementable_traits<unsigned __int128>): Likewise.
1487 * testsuite/std/ranges/iota/96042.cc: Test iota_view with
1488 __int128.
1489
1490 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
1491 Patrick Palka <ppalka@redhat.com>
1492
1493 PR libstdc++/96042
1494 * include/bits/range_access.h (__detail::__to_unsigned_like):
1495 Do not use make_unsigned_t<T> in the return type, as it can
1496 result in an error before the integral<T> constraint is checked.
1497 [__STRICT_ANSI__]: Add overloads for 128-bit integer types.
1498 (__detail::__make_unsigned_like_t): Define as the return type
1499 of __to_unsigned_like.
1500 * testsuite/std/ranges/subrange/96042.cc: New test.
1501
1502 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
1503
1504 * include/bits/stl_tree.h (operator!=, operator>, operator<=)
1505 (operator>=): Remove deprecated functions.
1506
1507 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
1508
1509 PR libstdc++/96042
1510 * include/ext/numeric_traits.h (__is_integer_nonstrict): New
1511 trait which is true for 128-bit integers even in strict modes.
1512 (__numeric_traits_integer, __numeric_traits): Use
1513 __is_integer_nonstrict instead of __is_integer.
1514 * include/std/limits [__STRICT_ANSI__ && __SIZEOF_INT128__]
1515 (numeric_limits<__int128>, (numeric_limits<unsigned __int128>):
1516 Define.
1517 * testsuite/std/ranges/iota/96042.cc: New test.
1518
1519 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
1520
1521 * include/bits/c++config (_GLIBCXX_DEPRECATED_SUGGEST)
1522 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST)
1523 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
1524 Add new macros to comment.
1525
1526 2020-08-19 Patrick Palka <ppalka@redhat.com>
1527
1528 * include/Makefile.am (bits_headers): Add new header
1529 <bits/max_size_type.h>.
1530 * include/Makefile.in: Regenerate.
1531 * include/bits/iterator_concepts.h
1532 (ranges::__detail::__max_diff_type): Remove definition, replace
1533 with forward declaration of class __max_diff_type.
1534 (__detail::__max_size_type): Remove definition, replace with
1535 forward declaration of class __max_size_type.
1536 (__detail::__is_unsigned_int128, __is_signed_int128)
1537 (__is_int128): New concepts.
1538 (__detail::__is_integer_like): Accept __int128 and unsigned
1539 __int128.
1540 (__detail::__is_signed_integer_like): Accept __int128.
1541 * include/bits/max_size_type.h: New header.
1542 * include/bits/range_access.h: Include <bits/max_size_type.h>.
1543 (__detail::__to_unsigned_like): Two new overloads.
1544 * testsuite/std/ranges/iota/difference_type.cc: New test.
1545 * testsuite/std/ranges/iota/max_size_type.cc: New test.
1546
1547 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
1548
1549 * include/bits/c++config (_GLIBCXX_DEPRECATED): Define for all
1550 standard modes.
1551 (_GLIBCXX_DEPRECATED_SUGGEST): New macro for "use 'foo' instead"
1552 message in deprecated warnings.
1553 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST): New
1554 macros for marking features deprecated in C++11.
1555 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
1556 New macros.
1557 * include/backward/auto_ptr.h (auto_ptr_ref, auto_ptr<void>):
1558 Use _GLIBCXX11_DEPRECATED instead of _GLIBCXX_DEPRECATED.
1559 (auto_ptr): Use _GLIBCXX11_DEPRECATED_SUGGEST.
1560 * include/backward/binders.h (binder1st, binder2nd): Likewise.
1561 * include/bits/ios_base.h (io_state, open_mode, seek_dir)
1562 (streampos, streamoff): Use _GLIBCXX_DEPRECATED_SUGGEST.
1563 * include/std/streambuf (stossc): Replace C++11 attribute
1564 with _GLIBCXX_DEPRECATED_SUGGEST.
1565 * include/std/type_traits (__is_nullptr_t): Use
1566 _GLIBCXX_DEPRECATED_SUGGEST instead of _GLIBCXX_DEPRECATED.
1567 * testsuite/27_io/types/1.cc: Check for deprecated warnings.
1568 Also check for io_state, open_mode and seek_dir typedefs.
1569
1570 2020-08-19 Antony Polukhin <antoshkka@gmail.com>
1571
1572 PR libstdc++/71579
1573 * include/std/type_traits (invoke_result, is_nothrow_invocable_r)
1574 Add static_asserts to make sure that the argument of the type
1575 trait is not misused with incomplete types.
1576 (is_swappable_with, is_nothrow_swappable_with): Add static_asserts
1577 to make sure that the first and second arguments of the type trait
1578 are not misused with incomplete types.
1579 * testsuite/20_util/invoke_result/incomplete_neg.cc: New test.
1580 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: New test.
1581 * testsuite/20_util/is_nothrow_swappable/incomplete_neg.cc: New test.
1582 * testsuite/20_util/is_nothrow_swappable_with/incomplete_neg.cc: New
1583 test.
1584 * testsuite/20_util/is_swappable_with/incomplete_neg.cc: New test.
1585
1586 2020-08-18 David Edelsohn <dje.gcc@gmail.com>
1587 Clement Chigot <clement.chigot@atos.net>
1588
1589 * config/os/aix/t-aix: Add complementary mode object files to
1590 libsupc++.a
1591
1592 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
1593
1594 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Check
1595 "cold" isn't used in the library. Also check <cxxabi.h>.
1596 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
1597 Likewise.
1598 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
1599 Likewise.
1600 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
1601 Likewise.
1602 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
1603 Likewise.
1604
1605 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
1606
1607 PR libstdc++/69724
1608 * include/std/future (__future_base::_S_make_deferred_state)
1609 (__future_base::_S_make_async_state): Remove.
1610 (__future_base::_Deferred_state): Change constructor to accept a
1611 parameter pack of arguments and forward them to the call
1612 wrapper.
1613 (__future_base::_Async_state_impl): Likewise. Replace lambda
1614 expression with a named member function.
1615 (async): Construct state object directly from the arguments,
1616 instead of using thread::__make_invoker, _S_make_deferred_state
1617 and _S_make_async_state. Move shared state into the returned
1618 future.
1619 * include/std/thread (thread::_Call_wrapper): New alias
1620 template for use by constructor and std::async.
1621 (thread::thread(Callable&&, Args&&...)): Create state object
1622 directly instead of using _S_make_state.
1623 (thread::__make_invoker, thread::__decayed_tuple)
1624 (thread::_S_make_state): Remove.
1625 * testsuite/30_threads/async/69724.cc: New test.
1626
1627 2020-08-17 Jonathan Wakely <jwakely@redhat.com>
1628
1629 PR libstdc++/55713
1630 PR libstdc++/71096
1631 PR libstdc++/93147
1632 * include/std/tuple [__has_cpp_attribute(no_unique_address)]
1633 (_Head_base<Idx, Head, true>): New definition of the partial
1634 specialization, using [[no_unique_address]] instead of
1635 inheritance.
1636 * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
1637 output.
1638 * testsuite/20_util/tuple/comparison_operators/93147.cc: New test.
1639 * testsuite/20_util/tuple/creation_functions/55713.cc: New test.
1640 * testsuite/20_util/tuple/element_access/71096.cc: New test.
1641
1642 2020-08-14 Lewis Hyatt <lhyatt@gmail.com>
1643
1644 * testsuite/lib/libstdc++.exp: Use the new option
1645 -fdiagnostics-plain-output.
1646
1647 2020-08-13 Jonathan Wakely <jwakely@redhat.com>
1648
1649 * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Warn if the c_std
1650 option is used and fail unless --enable-cheaders-obsolete is
1651 also used.
1652 * configure: Regenerate.
1653
1654 2020-08-12 Jonathan Wakely <jwakely@redhat.com>
1655
1656 PR libstdc++/85828
1657 * include/bits/basic_string.h (operator=(basic_string&&)): Check
1658 for self-move before copying with char_traits::copy.
1659 * include/bits/hashtable.h (operator=(_Hashtable&&)): Check for
1660 self-move.
1661 * include/bits/stl_deque.h (_M_move_assign1(deque&&, false_type)):
1662 Check for equal allocators.
1663 * include/bits/stl_list.h (_M_move_assign(list&&, true_type)):
1664 Call clear() instead of _M_clear().
1665 * include/debug/formatter.h (__msg_self_move_assign): Change
1666 comment.
1667 * include/debug/macros.h (__glibcxx_check_self_move_assign):
1668 (_GLIBCXX_DEBUG_VERIFY): Remove.
1669 * include/debug/safe_container.h (operator=(_Safe_container&&)):
1670 Remove assertion check for safe move and make it well-defined.
1671 * include/debug/safe_iterator.h (operator=(_Safe_iterator&&)):
1672 Remove assertion check for self-move.
1673 * include/debug/safe_local_iterator.h
1674 (operator=(_Safe_local_iterator&&)): Likewise.
1675 * testsuite/21_strings/basic_string/cons/char/self_move.cc: New test.
1676 * testsuite/23_containers/deque/cons/self_move.cc: New test.
1677 * testsuite/23_containers/forward_list/cons/self_move.cc: New test.
1678 * testsuite/23_containers/list/cons/self_move.cc: New test.
1679 * testsuite/23_containers/set/cons/self_move.cc: New test.
1680 * testsuite/23_containers/unordered_set/cons/self_move.cc: New test.
1681 * testsuite/23_containers/vector/cons/self_move.cc: New test.
1682
1683 2020-08-11 François Dumont <fdumont@gcc.gnu.org>
1684
1685 PR libstdc++/91620
1686 * include/bits/forward_list.tcc (forward_list<>::remove): Collect nodes
1687 to destroy in an intermediate forward_list.
1688 (forward_list<>::remove_if, forward_list<>::unique): Likewise.
1689 * include/bits/list.tcc (list<>::remove, list<>::unique): Likewise.
1690 (list<>::remove_if): Likewise.
1691 * include/debug/forward_list (forward_list<>::_M_erase_after): Remove.
1692 (forward_list<>::erase_after): Adapt.
1693 (forward_list<>::remove, forward_list<>::remove_if): Collect nodes to
1694 destroy in an intermediate forward_list.
1695 (forward_list<>::unique): Likewise.
1696 * include/debug/list (list<>::remove, list<>::unique): Likewise.
1697 (list<>::remove_if): Likewise.
1698 * testsuite/23_containers/forward_list/operations/91620.cc: New test.
1699 * testsuite/23_containers/list/operations/91620.cc: New test.
1700
1701 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
1702
1703 * testsuite/30_threads/thread/cons/84535.cc: Use a custom
1704 namespace.
1705 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
1706
1707 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
1708
1709 PR libstdc++/89760
1710 * include/experimental/executor [!_GLIBCXX_HAS_GTHREADS]:
1711 (execution_context::mutex_type): Define dummy mutex type.
1712 (system_context): Use execution_context::mutex_type.
1713 (system_context) [!_GLIBCXX_HAS_GTHREADS]: Define dummy
1714 thread and condition variable types.
1715 [!_GLIBCXX_HAS_GTHREADS] (system_context::_M_run()): Do not
1716 define.
1717 (system_context::_M_post) [!_GLIBCXX_HAS_GTHREADS]: Throw
1718 an exception when threads aren't available.
1719 (strand::running_in_this_thread()): Defer to _M_state.
1720 (strand::_State::running_in_this_thread()): New function.
1721 (use_future_t): Do not depend on _GLIBCXX_USE_C99_STDINT_TR1.
1722 * include/experimental/io_context (io_context): Use the
1723 execution_context::mutex_type alias. Replace stack of thread
1724 IDs with counter.
1725 * testsuite/experimental/net/execution_context/use_service.cc:
1726 Enable test for non-pthread targets.
1727
1728 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
1729
1730 * include/experimental/executor (system_context::a__tag): Make
1731 default constructor explicit.
1732
1733 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
1734
1735 * include/experimental/executor (system_context::_M_run()):
1736 Fix predicate.
1737 * testsuite/experimental/net/system_context/1.cc: New test.
1738
1739 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
1740
1741 * include/std/stop_token: Check _GLIBCXX_HAS_GTHREADS using
1742 #ifdef instead of #if.
1743 (stop_token::_S_yield()): Check _GLIBCXX_HAS_GTHREADS before
1744 using __gthread_yield.
1745
1746 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
1747
1748 * include/std/thread [!_GLIBCXX_HAS_GTHREADS] (this_thread::yield)
1749 (this_thread::sleep_until): Define.
1750 [!_GLIBCXX_HAS_GTHREADS] (this_thread::sleep_for): Define. Replace
1751 use of __gthread_time_t typedef with timespec.
1752 * src/c++11/thread.cc [!_GLIBCXX_HAS_GTHREADS] (__sleep_for):
1753 Likewise.
1754 * testsuite/30_threads/this_thread/2.cc: Moved to...
1755 * testsuite/30_threads/this_thread/yield.cc: ...here.
1756 * testsuite/30_threads/this_thread/3.cc: Moved to...
1757 * testsuite/30_threads/this_thread/sleep_for-mt.cc: ...here.
1758 * testsuite/30_threads/this_thread/4.cc: Moved to...
1759 * testsuite/30_threads/this_thread/sleep_until-mt.cc: ...here.
1760 * testsuite/30_threads/this_thread/58038.cc: Add
1761 dg-require-sleep.
1762 * testsuite/30_threads/this_thread/60421.cc: Likewise.
1763 * testsuite/30_threads/this_thread/sleep_for.cc: New test.
1764 * testsuite/30_threads/this_thread/sleep_until.cc: New test.
1765
1766 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
1767
1768 PR libstdc++/94681
1769 * src/c++17/fs_ops.cc (read_symlink): Use posix::lstat instead
1770 of calling ::lstat directly.
1771 * src/filesystem/ops.cc (read_symlink): Likewise.
1772
1773 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
1774
1775 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
1776 Use gdb.Type.strip_typedefs().
1777 * testsuite/libstdc++-prettyprinters/compat.cc: Use a typedef in
1778 the emulated old type.
1779
1780 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
1781
1782 PR libstdc++/94681
1783 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
1784 $enable_libstdcxx_filesystem_ts.
1785 * configure: Regenerate.
1786
1787 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
1788
1789 PR libstdc++/93904
1790 * include/bits/stl_iterator.h (inserter): Do not deduce
1791 iterator type (LWG 561).
1792 * testsuite/24_iterators/insert_iterator/dr561.cc: New test.
1793
1794 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
1795
1796 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI=0]
1797 (basic_string::reserve()): Do nothing if exceptions are not
1798 enabled.
1799
1800 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
1801
1802 PR libstdc++/95749
1803 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
1804 (stat_type): Change to __stat64.
1805 (stat): Use _wstat64.
1806
1807 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
1808
1809 PR libstdc++/96303
1810 * include/debug/bitset (bitset::operator==): Call _M_base() on
1811 right operand.
1812 (bitset::operator!=): Likewise, but don't define it at all when
1813 default comparisons are supported by the compiler.
1814 * testsuite/23_containers/bitset/operations/96303.cc: New test.
1815
1816 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
1817
1818 * testsuite/18_support/comparisons/algorithms/partial_order.cc:
1819 Replace VERIFY with static_assert where the compiler now
1820 allows it.
1821 * testsuite/18_support/comparisons/algorithms/weak_order.cc:
1822 Likewise.
1823
1824 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
1825
1826 * config/abi/pre/gnu.ver: Fix wildcards for wstring symbols.
1827
1828 2020-08-06 Andrew Luo <andrewluotechnologies@outlook.com>
1829 Jonathan Wakely <jwakely@redhat.com>
1830
1831 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Use less greedy
1832 patterns for basic_string members.
1833 (GLIBCXX_3.4.29): Export new basic_string::reserve symbols.
1834 * doc/xml/manual/status_cxx2020.xml: Update P0966 status.
1835 * include/bits/basic_string.h (shrink_to_fit()): Call reserve().
1836 (reserve(size_type)): Remove default argument.
1837 (reserve()): Declare new overload.
1838 [!_GLIBCXX_USE_CXX11_ABI] (shrink_to_fit, reserve): Likewise.
1839 * include/bits/basic_string.tcc (reserve(size_type)): Remove
1840 support for shrinking capacity.
1841 (reserve()): Perform shrink-to-fit operation.
1842 [!_GLIBCXX_USE_CXX11_ABI] (reserve): Likewise.
1843 * testsuite/21_strings/basic_string/capacity/1.cc: Adjust to
1844 reflect new behavior.
1845 * testsuite/21_strings/basic_string/capacity/char/1.cc:
1846 Likewise.
1847 * testsuite/21_strings/basic_string/capacity/char/18654.cc:
1848 Likewise.
1849 * testsuite/21_strings/basic_string/capacity/char/2.cc:
1850 Likewise.
1851 * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
1852 Likewise.
1853 * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
1854 Likewise.
1855 * testsuite/21_strings/basic_string/capacity/wchar_t/2.cc:
1856 Likewise.
1857
1858 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
1859
1860 * include/bits/basic_string.tcc
1861 (operator>>(basic_istream&, basic_string&)): Do not set eofbit
1862 if extraction stopped after in.width() characters.
1863 * src/c++98/istream-string.cc (operator>>(istream&, string&)):
1864 Likewise.
1865 * include/bits/istream.tcc (__istream_extract): Do not set
1866 eofbit if extraction stopped after n-1 characters.
1867 * src/c++98/istream.cc (__istream_extract): Likewise.
1868 * testsuite/21_strings/basic_string/inserters_extractors/char/13.cc: New test.
1869 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/13.cc: New test.
1870 * testsuite/27_io/basic_istream/extractors_character/char/5.cc: New test.
1871 * testsuite/27_io/basic_istream/extractors_character/wchar_t/5.cc: New test.
1872
1873 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
1874
1875 PR libstdc++/96484
1876 * src/c++17/fs_ops.cc (fs::read_symlink): Return an error
1877 immediately for non-symlinks.
1878 * src/filesystem/ops.cc (fs::read_symlink): Likewise.
1879
1880 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
1881
1882 * include/std/istream (operator>>(istream&, char*)): Add
1883 attributes to get warnings for pointers that are null or known
1884 to point to the end of a buffer. Request upper bound from
1885 __builtin_object_size check and handle zero-sized buffer case.
1886 (operator>>(istream&, signed char))
1887 (operator>>(istream&, unsigned char*)): Add attributes.
1888 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
1889 Check extracting into the middle of a buffer.
1890 * testsuite/27_io/basic_istream/extractors_character/wchar_t/overflow.cc: New test.
1891
1892 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
1893
1894 * include/std/atomic (atomic<T>::store): Reformat.
1895
1896 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
1897
1898 * doc/xml/manual/status_cxx2017.xml: Replace oneAPI DPC++ link
1899 with LLVM repo for PSTL.
1900 * doc/html/manual/status.html: Regenerate.
1901
1902 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
1903
1904 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Export new symbols.
1905 * include/bits/istream.tcc (__istream_extract): New function
1906 template implementing both of operator>>(istream&, char*) and
1907 operator>>(istream&, char(&)[N]). Add explicit instantiation
1908 declaration for it. Remove explicit instantiation declarations
1909 for old function templates.
1910 * include/std/istream (__istream_extract): Declare.
1911 (operator>>(basic_istream<C,T>&, C*)): Define inline and simply
1912 call __istream_extract.
1913 (operator>>(basic_istream<char,T>&, signed char*)): Likewise.
1914 (operator>>(basic_istream<char,T>&, unsigned char*)): Likewise.
1915 (operator>>(basic_istream<C,T>&, C(7)[N])): Define for LWG 2499.
1916 (operator>>(basic_istream<char,T>&, signed char(&)[N])):
1917 Likewise.
1918 (operator>>(basic_istream<char,T>&, unsigned char(&)[N])):
1919 Likewise.
1920 * include/std/streambuf (basic_streambuf): Declare char overload
1921 of __istream_extract as a friend.
1922 * src/c++11/istream-inst.cc: Add explicit instantiation
1923 definition for wchar_t overload of __istream_extract. Remove
1924 explicit instantiation definitions of old operator>> overloads
1925 for versioned-namespace build.
1926 * src/c++98/istream.cc (operator>>(istream&, char*)): Replace
1927 with __istream_extract(istream&, char*, streamsize).
1928 * testsuite/27_io/basic_istream/extractors_character/char/3.cc:
1929 Do not use variable-length array.
1930 * testsuite/27_io/basic_istream/extractors_character/char/4.cc:
1931 Do not run test for C++20.
1932 * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
1933 Do not test writing to pointers for C++20.
1934 * testsuite/27_io/basic_istream/extractors_character/char/9826.cc:
1935 Use array instead of pointer.
1936 * testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc:
1937 Do not use variable-length array.
1938 * testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
1939 Do not run test for C++20.
1940 * testsuite/27_io/basic_istream/extractors_character/wchar_t/9555-ic.cc:
1941 Do not test writing to pointers for C++20.
1942 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499.cc:
1943 New test.
1944 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
1945 New test.
1946 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
1947 New test.
1948 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
1949 New test.
1950 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
1951 New test.
1952
1953 2020-08-01 Gerald Pfeifer <gerald@pfeifer.com>
1954
1955 * doc/xml/manual/using_exceptions.xml: Move www.stroustrup.com to
1956 https.
1957 * doc/html/manual/using_exceptions.html: Regenerate.
1958
1959 2020-07-31 Gerald Pfeifer <gerald@pfeifer.com>
1960
1961 * doc/xml/manual/status_cxx2017.xml: ParallelSTL is now part
1962 of oneAPI DPC++ Library on Github.
1963 * doc/html/manual/status.html: Regenerate.
1964
1965 2020-07-31 François Dumont <fdumont@gcc.gnu.org>
1966
1967 * include/bits/stl_bvector.h
1968 [_GLIBCXX_INLINE_VERSION](_Bvector_impl_data::_M_start): Define as
1969 _Bit_type*.
1970 (_Bvector_impl_data(const _Bvector_impl_data&)): Default.
1971 (_Bvector_impl_data(_Bvector_impl_data&&)): Delegate to latter.
1972 (_Bvector_impl_data::operator=(const _Bvector_impl_data&)): Default.
1973 (_Bvector_impl_data::_M_move_data(_Bvector_impl_data&&)): Use latter.
1974 (_Bvector_impl_data::_M_reset()): Likewise.
1975 (_Bvector_impl_data::_M_swap_data): New.
1976 (_Bvector_impl::_Bvector_impl(_Bvector_impl&&)): Implement explicitely.
1977 (_Bvector_impl::_Bvector_impl(_Bit_alloc_type&&, _Bvector_impl&&)): New.
1978 (_Bvector_base::_Bvector_base(_Bvector_base&&, const allocator_type&)):
1979 New, use latter.
1980 (vector::vector(vector&&, const allocator_type&, true_type)): New, use
1981 latter.
1982 (vector::vector(vector&&, const allocator_type&, false_type)): New.
1983 (vector::vector(vector&&, const allocator_type&)): Use latters.
1984 (vector::vector(const vector&, const allocator_type&)): Adapt.
1985 [__cplusplus >= 201103](vector::vector(_InputIt, _InputIt,
1986 const allocator_type&)): Use _M_initialize_range.
1987 (vector::operator[](size_type)): Use iterator operator[].
1988 (vector::operator[](size_type) const): Use const_iterator operator[].
1989 (vector::swap(vector&)): Add assertions on allocators. Use _M_swap_data.
1990 [__cplusplus >= 201103](vector::insert(const_iterator, _InputIt,
1991 _InputIt)): Use _M_insert_range.
1992 (vector::_M_initialize(size_type)): Adapt.
1993 [__cplusplus >= 201103](vector::_M_initialize_dispatch): Remove.
1994 [__cplusplus >= 201103](vector::_M_insert_dispatch): Remove.
1995 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Stop
1996 using start _M_offset.
1997 (StdVectorPrinter.to_string): Likewise.
1998 * testsuite/23_containers/vector/bool/allocator/swap.cc: Adapt.
1999 * testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc:
2000 Add check.
2001
2002 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2003
2004 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Use 0
2005 instead of nullptr.
2006 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
2007 Likewise.
2008
2009 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2010
2011 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
2012 Move struct to namespace scope.
2013
2014 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2015
2016 * testsuite/26_numerics/numbers/float128.cc: Check
2017 __STRICT_ANSI__ before using __float128.
2018 * testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc:
2019 Likewise.
2020
2021 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2022
2023 * testsuite/18_support/set_terminate.cc: Require C++11 or
2024 higher.
2025 * testsuite/28_regex/simple_c++11.cc: Likewise.
2026 * testsuite/tr1/headers/c++200x/complex.cc: Likewise.
2027 * testsuite/24_iterators/headers/iterator/synopsis.cc:
2028 Require C++14 or lower.
2029
2030 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2031
2032 * testsuite/23_containers/span/back_assert_neg.cc: Split c++2a
2033 effective-target from xfail selector.
2034 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
2035 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
2036 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
2037 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
2038 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
2039 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
2040 * testsuite/23_containers/span/subspan_2_assert_neg.cc:
2041 Likewise.
2042 * testsuite/23_containers/span/subspan_3_assert_neg.cc:
2043 Likewise.
2044 * testsuite/23_containers/span/subspan_4_assert_neg.cc:
2045 Likewise.
2046 * testsuite/23_containers/span/subspan_5_assert_neg.cc:
2047 Likewise.
2048 * testsuite/23_containers/span/subspan_6_assert_neg.cc:
2049 Likewise.
2050 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
2051
2052 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2053
2054 * testsuite/20_util/reference_wrapper/83427.cc: Adjust
2055 effective-target to specific language mode only.
2056 * testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
2057 Likewise.
2058 * testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
2059 Likewise.
2060 * testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
2061 Likewise.
2062 * testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
2063 Likewise.
2064 * testsuite/26_numerics/valarray/69116.cc:
2065 Likewise.
2066 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
2067 Remove whitespace at end of file.
2068 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
2069 Likewise.
2070
2071 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2072
2073 * testsuite/17_intro/headers/c++2017/all_attributes.cc: Add
2074 c++17 effective-target.
2075 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
2076 Likewise.
2077 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: Likewise.
2078 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
2079 Likewise.
2080 * testsuite/17_intro/headers/c++2017/operator_names.cc:
2081 Likewise.
2082 * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
2083 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
2084 Likewise.
2085 * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
2086 Likewise.
2087 * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
2088 Likewise.
2089 * testsuite/20_util/any/assign/1.cc: Likewise.
2090 * testsuite/20_util/any/assign/2.cc: Likewise.
2091 * testsuite/20_util/any/assign/emplace.cc: Likewise.
2092 * testsuite/20_util/any/assign/exception.cc: Likewise.
2093 * testsuite/20_util/any/assign/self.cc: Likewise.
2094 * testsuite/20_util/any/cons/1.cc: Likewise.
2095 * testsuite/20_util/any/cons/2.cc: Likewise.
2096 * testsuite/20_util/any/cons/aligned.cc: Likewise.
2097 * testsuite/20_util/any/cons/explicit.cc: Likewise.
2098 * testsuite/20_util/any/cons/in_place.cc: Likewise.
2099 * testsuite/20_util/any/cons/nontrivial.cc: Likewise.
2100 * testsuite/20_util/any/make_any.cc: Likewise.
2101 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
2102 * testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
2103 * testsuite/20_util/any/misc/swap.cc: Likewise.
2104 * testsuite/20_util/any/modifiers/1.cc: Likewise.
2105 * testsuite/20_util/any/observers/type.cc: Likewise.
2106 * testsuite/20_util/any/requirements.cc: Likewise.
2107 * testsuite/20_util/any/typedefs.cc: Likewise.
2108 * testsuite/20_util/as_const/1.cc: Likewise.
2109 * testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
2110 * testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
2111 * testsuite/20_util/bool_constant/requirements.cc: Likewise.
2112 * testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
2113 Likewise.
2114 * testsuite/20_util/duration_cast/rounding.cc: Likewise.
2115 * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
2116 Likewise.
2117 * testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
2118 * testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
2119 * testsuite/20_util/function_objects/searchers.cc: Likewise.
2120 * testsuite/20_util/in_place/requirements.cc: Likewise.
2121 * testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
2122 Likewise.
2123 * testsuite/20_util/is_invocable/requirements/typedefs.cc:
2124 Likewise.
2125 * testsuite/20_util/is_invocable/value.cc: Likewise.
2126 * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
2127 Likewise.
2128 * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc:
2129 Likewise.
2130 * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
2131 Likewise.
2132 * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
2133 Likewise.
2134 * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
2135 * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
2136 Likewise.
2137 * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
2138 Likewise.
2139 * testsuite/20_util/is_nothrow_swappable_with/value.cc:
2140 Likewise.
2141 * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
2142 Likewise.
2143 * testsuite/20_util/is_swappable/requirements/typedefs.cc:
2144 Likewise.
2145 * testsuite/20_util/is_swappable/value.cc: Likewise.
2146 * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
2147 Likewise.
2148 * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
2149 Likewise.
2150 * testsuite/20_util/is_swappable_with/value.cc: Likewise.
2151 * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
2152 Likewise.
2153 * testsuite/20_util/logical_traits/requirements/typedefs.cc:
2154 Likewise.
2155 * testsuite/20_util/logical_traits/value.cc: Likewise.
2156 * testsuite/20_util/optional/constexpr/make_optional.cc: Likewise.
2157 * testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
2158 * testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
2159 * testsuite/20_util/optional/hash.cc: Likewise.
2160 * testsuite/20_util/pair/swap_cxx17.cc: Likewise.
2161 * testsuite/20_util/ratio/requirements/ratio_equal_v.cc: Likewise.
2162 * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
2163 Likewise.
2164 * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
2165 Likewise.
2166 * testsuite/20_util/tuple/apply/1.cc: Likewise.
2167 * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
2168 * testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
2169 * testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
2170 * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
2171 Likewise.
2172 * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
2173 Likewise.
2174 * testsuite/20_util/variant/any.cc: Likewise.
2175 * testsuite/20_util/variant/compile.cc: Likewise.
2176 * testsuite/20_util/variant/hash.cc: Likewise.
2177 * testsuite/20_util/variant/index_type.cc: Likewise.
2178 * testsuite/20_util/variant/run.cc: Likewise.
2179 * testsuite/20_util/void_t/1.cc: Likewise.
2180 * testsuite/21_strings/basic_string/79162.cc: Likewise.
2181 * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
2182 * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
2183 * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
2184 * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
2185 * testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
2186 Likewise.
2187 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
2188 Likewise.
2189 * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
2190 Likewise.
2191 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
2192 Likewise.
2193 * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
2194 Likewise.
2195 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
2196 Likewise.
2197 * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
2198 Likewise.
2199 * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
2200 Likewise.
2201 * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
2202 Likewise.
2203 * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
2204 Likewise.
2205 * testsuite/21_strings/basic_string/operations/data/char/2.cc:
2206 Likewise.
2207 * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
2208 Likewise.
2209 * testsuite/21_strings/basic_string/operations/find/char/5.cc:
2210 Likewise.
2211 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
2212 Likewise.
2213 * testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
2214 * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
2215 Likewise.
2216 * testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise.
2217 * testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise.
2218 * testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise.
2219 * testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise.
2220 * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
2221 Likewise.
2222 * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
2223 Likewise.
2224 * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
2225 Likewise.
2226 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
2227 Likewise.
2228 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
2229 Likewise.
2230 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
2231 Likewise.
2232 * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
2233 Likewise.
2234 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
2235 Likewise.
2236 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
2237 Likewise.
2238 * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
2239 Likewise.
2240 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
2241 Likewise.
2242 * testsuite/21_strings/basic_string_view/include.cc: Likewise.
2243 * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
2244 Likewise.
2245 * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
2246 Likewise.
2247 * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
2248 Likewise.
2249 * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
2250 Likewise.
2251 * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
2252 Likewise.
2253 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
2254 Likewise.
2255 * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
2256 Likewise.
2257 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
2258 Likewise.
2259 * testsuite/21_strings/basic_string_view/literals/types.cc:
2260 Likewise.
2261 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
2262 Likewise.
2263 * testsuite/21_strings/basic_string_view/literals/values.cc:
2264 Likewise.
2265 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
2266 Likewise.
2267 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
2268 Likewise.
2269 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
2270 Likewise.
2271 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
2272 Likewise.
2273 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
2274 Likewise.
2275 * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
2276 Likewise.
2277 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
2278 Likewise.
2279 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
2280 Likewise.
2281 * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
2282 Likewise.
2283 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
2284 Likewise.
2285 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
2286 Likewise.
2287 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
2288 Likewise.
2289 * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
2290 Likewise.
2291 * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
2292 Likewise.
2293 * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
2294 Likewise.
2295 * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
2296 Likewise.
2297 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
2298 Likewise.
2299 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
2300 Likewise.
2301 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
2302 Likewise.
2303 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
2304 Likewise.
2305 * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
2306 Likewise.
2307 * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
2308 Likewise.
2309 * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
2310 Likewise.
2311 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
2312 Likewise.
2313 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
2314 Likewise.
2315 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
2316 Likewise.
2317 * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
2318 Likewise.
2319 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
2320 Likewise.
2321 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
2322 Likewise.
2323 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
2324 Likewise.
2325 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
2326 Likewise.
2327 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
2328 Likewise.
2329 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
2330 Likewise.
2331 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
2332 Likewise.
2333 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
2334 Likewise.
2335 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
2336 Likewise.
2337 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
2338 Likewise.
2339 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2340 Likewise.
2341 * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
2342 * testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
2343 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
2344 Likewise.
2345 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
2346 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
2347 Likewise.
2348 * testsuite/23_containers/map/modifiers/merge.cc: Likewise.
2349 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
2350 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
2351 * testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
2352 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
2353 * testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
2354 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2355 * testsuite/23_containers/set/modifiers/merge.cc: Likewise.
2356 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2357 Likewise.
2358 * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
2359 Likewise.
2360 * testsuite/23_containers/unordered_map/modifiers/merge.cc:
2361 Likewise.
2362 * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
2363 Likewise.
2364 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2365 Likewise.
2366 * testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
2367 Likewise.
2368 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2369 Likewise.
2370 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
2371 Likewise.
2372 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2373 Likewise.
2374 * testsuite/23_containers/unordered_set/modifiers/merge.cc:
2375 Likewise.
2376 * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
2377 Likewise.
2378 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
2379 Likewise.
2380 * testsuite/25_algorithms/clamp/1.cc: Likewise.
2381 * testsuite/25_algorithms/clamp/2.cc: Likewise.
2382 * testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
2383 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
2384 Likewise.
2385 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
2386 Likewise.
2387 * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
2388 Likewise.
2389 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2390 Likewise.
2391 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
2392 Likewise.
2393 * testsuite/29_atomics/atomic/is_always_lock_free.cc: Likewise.
2394 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
2395 Likewise.
2396 * testsuite/30_threads/shared_lock/70766.cc: Likewise.
2397 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
2398 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
2399 Likewise.
2400 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc:
2401 Likewise.
2402 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
2403 Likewise.
2404 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
2405 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
2406 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
2407
2408 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2409
2410 PR libstdc++/96382
2411 * include/bits/stl_iterator.h (reverse_iterator): Friend
2412 declaration should not depend on __cplusplus.
2413
2414 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2415
2416 * testsuite/experimental/filesystem/filesystem_error/cons.cc:
2417 Remove -std=gnu++17 option.
2418
2419 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2420
2421 * testsuite/20_util/is_aggregate/value.cc: Adjust for changes to
2422 definition of aggregates in C++20.
2423 * testsuite/20_util/optional/requirements.cc: Adjust for
2424 defaulted comparisons in C++20.
2425
2426 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2427
2428 * testsuite/20_util/tuple/78939.cc: Suppress warnings about
2429 deprecation of volatile-qualified structured bindings in C++20.
2430 * testsuite/20_util/variable_templates_for_traits.cc: Likewise
2431 for deprecation of is_pod in C++20
2432
2433 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2434
2435 * testsuite/20_util/time_point_cast/rounding.cc: Remove
2436 duplicate dg-do directive and add c++17 effective target.
2437
2438 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2439
2440 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
2441 LC_ALL_MASK not LC_ALL.
2442
2443 2020-07-31 Richard Biener <rguenther@suse.de>
2444
2445 PR debug/96383
2446 * testsuite/20_util/assume_aligned/3.cc: Use -g0.
2447
2448 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2449
2450 * include/bits/basic_string.h (size_type, difference_type):
2451 Use allocator_traits to obtain the allocator's size_type and
2452 difference_type.
2453
2454 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2455
2456 PR libstdc++/96279
2457 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
2458 isinf unqualified.
2459 [!_GLIBCXX_USE_C99_STDLIB]: Use strtod for float and long
2460 double.
2461
2462 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2463
2464 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
2465 Use allocator with the correct value type.
2466 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
2467 Likewise.
2468
2469 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2470
2471 * testsuite/20_util/from_chars/4.cc: Pass non-const iterator
2472 to string::insert.
2473
2474 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2475
2476 * include/bits/iterator_concepts.h (__detail::__cv_bool): New
2477 helper concept.
2478 (__detail::__integral_nonbool): Likewise.
2479 (__detail::__is_integer_like): Use __integral_nonbool.
2480 * testsuite/std/ranges/access/lwg3467.cc: New test.
2481
2482 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2483
2484 * testsuite/20_util/from_chars/4.cc: Use dg-add-options ieee.
2485 * testsuite/29_atomics/atomic_float/1.cc: Likewise.
2486
2487 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2488
2489 * testsuite/23_containers/vector/bool/72847.cc: Use the
2490 exceptions_enabled effective-target keyword instead of
2491 checking for an explicit -fno-exceptions option.
2492 * testsuite/util/testsuite_abi.cc (examine_symbol): Remove
2493 redundant try-catch.
2494 * testsuite/util/testsuite_allocator.h [!__cpp_exceptions]:
2495 Do not define check_allocate_max_size and memory_resource.
2496 * testsuite/util/testsuite_containers.h: Replace comment with
2497 #error if wrong standard dialect used.
2498 * testsuite/util/testsuite_shared.cc: Likewise.
2499
2500 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
2501
2502 * include/bits/hashtable_policy.h (_Node_iterator_base()): New.
2503 (operator==(const _Node_iterator_base&, const _Node_iterator_base&)):
2504 Make hidden friend.
2505 (operator!=(const _Node_iterator_base&, const _Node_iterator_base&)):
2506 Make hidden friend.
2507 (_Local_iterator_base<>): Inherits _Node_iterator_base.
2508 (_Local_iterator_base<>::_M_cur): Remove.
2509 (_Local_iterator_base<>::_M_curr()): Remove.
2510 (operator==(const _Local_iterator_base&, const _Local_iterator_base&)):
2511 Remove.
2512 (operator!=(const _Local_iterator_base&, const _Local_iterator_base&)):
2513 Remove.
2514 * include/debug/unordered_map (unordered_map<>::_M_invalidate): Adapt.
2515 (unordered_multimap<>::_M_invalidate): Adapt.
2516 * include/debug/unordered_set (unordered_set<>::_M_invalidate): Adapt.
2517 (unordered_multiset<>::_M_invalidate): Adapt.
2518
2519 2020-07-29 David Edelsohn <dje.gcc@gmail.com>
2520 Jonathan Wakely <jwakely@redhat.com>
2521 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
2522
2523 * testsuite/lib/dg-options.exp (add_options_for_libatomic): Add
2524 target powerpc-ibm-aix* and powerpc*-*-darwin*.
2525 * testsuite/29_atomics/atomic_float/value_init.cc: Add options
2526 for libatomic.
2527
2528 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
2529
2530 * include/bits/hashtable.h
2531 (_Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type)):
2532 Add noexcept qualification.
2533 (_Hashtable(_Hashtable&&)): Fix noexcept qualification.
2534 (_Hashtable(_Hashtable&&, const allocator_type&)): Add noexcept
2535 qualification.
2536 * include/bits/unordered_map.h
2537 (unordered_map(unordered_map&&, const allocator_type&)): Add noexcept
2538 qualification.
2539 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
2540 Likewise.
2541 * include/bits/unordered_set.h
2542 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
2543 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
2544 Likewise.
2545 * include/debug/unordered_map
2546 (unordered_map(unordered_map&&, const allocator_type&)): Likewise.
2547 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
2548 Likewise.
2549 * include/debug/unordered_set
2550 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
2551 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
2552 Likewise.
2553 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
2554 New test.
2555 * testsuite/23_containers/unordered_map/cons/noexcept_default_construct.cc:
2556 New test.
2557 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
2558 New test.
2559 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
2560 New test.
2561 * testsuite/23_containers/unordered_multimap/cons/noexcept_default_construct.cc:
2562 New test.
2563 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
2564 New test.
2565 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
2566 New test.
2567 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
2568 New test.
2569 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
2570 New test.
2571 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
2572 New test.
2573 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
2574 New test.
2575
2576 2020-07-28 François Dumont <fdumont@gcc.gnu.org>
2577
2578 * include/bits/hashtable.h
2579 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
2580 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
2581 const allocator_type&, true_type)): New.
2582 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
2583 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
2584 const allocator_type&, false_type)): New.
2585 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
2586 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
2587 const allocator_type&)): Delegate to latters.
2588 (operator=(initializer_list<value_type>)): Rehash if too small.
2589 (_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Remove
2590 size_t len parameter.
2591 * include/bits/hashtable_policy.h (_Insert_base<>::_M_insert_range):
2592 Do not try to get input range distance.
2593 * testsuite/23_containers/unordered_set/cons/bucket_hint.cc: New test.
2594 * testsuite/23_containers/unordered_set/modifiers/insert.cc: New test.
2595
2596 2020-07-27 François Dumont <fdumont@gcc.gnu.org>
2597
2598 * include/bits/hashtable_policy.h (_Map_base<>::at): Use
2599 _Hashtable<>::find.
2600 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals):New.
2601 (_Hashtable_base<>::_M_node_equals): New, use latter.
2602 (_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash,
2603 _RehashPolicy, false>::_M_equal): Adapt to use latter.
2604 * include/bits/hashtable.h (_Hashtable<>::_M_update_bbegin): New.
2605 (_Hashtable<>::_M_assign): Use latter.
2606 (_Hashtable<>::_M_move_assign): Likewise.
2607 (_Hashtable<>(_Hashtable<>&&)): Likewise.
2608 (_Hashtable<>(_Hashtable<>&&, const allocator_type&)): Likewise.
2609 (_Hashtable<>::swap): Likewise.
2610 (_Hashtable<>::find): Build iterator directly from _M_find_node result.
2611 (_Hashtable<>::count): Use _Hashtable<>::find.
2612 (_Hashtable<>::equal_range): Likewise.
2613 (_Hashtable<>::_M_erase(false_type, const key_type&)): Use
2614 _M_node_equals.
2615
2616 2020-07-27 Jonathan Wakely <jwakely@redhat.com>
2617
2618 * src/c++17/floating_from_chars.cc (from_chars_impl): Ensure
2619 that FE_NEAREST is used.
2620 * testsuite/20_util/from_chars/4.cc: Do not use if constexpr in
2621 a { target c++14 } test.
2622 [!_GLIBCXX_HAVE_USELOCALE]: Disable all tests.
2623 * testsuite/20_util/from_chars/5.cc [!_GLIBCXX_HAVE_USELOCALE]:
2624 Likewise.
2625 * testsuite/20_util/from_chars/6.cc: New test.
2626
2627 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
2628
2629 * include/std/future (future, shared_future, promise): Add
2630 static assertions to the primary template to reject array and
2631 function types.
2632 * testsuite/30_threads/future/requirements/lwg3458.cc: New test.
2633 * testsuite/30_threads/promise/requirements/lwg3466.cc: New test.
2634 * testsuite/30_threads/shared_future/requirements/lwg3458.cc: New test.
2635
2636 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
2637
2638 * include/bits/stl_iterator.h (reverse_iterator): Constrain
2639 converting constructor and converting assignment operator.
2640 Access source iterator's data member directly instead of
2641 calling base().
2642 (move_iterator): Likewise.
2643 * testsuite/24_iterators/move_iterator/dr3435.cc: New test.
2644 * testsuite/24_iterators/reverse_iterator/dr3435.cc: New test.
2645
2646 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
2647
2648 * acinclude.m4 (libtool_VERSION): Bump version.
2649 * config.h.in: Regenerate.
2650 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.29 version and new
2651 exports.
2652 * config/os/gnu-linux/ldbl-extra.ver: Add _GLIBCXX_LDBL_3.4.29
2653 version and new export.
2654 * configure: Regenerate.
2655 * configure.ac: Check for <xlocale.h> and uselocale.
2656 * crossconfig.m4: Add macro or checks for uselocale.
2657 * include/std/charconv (from_chars): Declare overloads for
2658 float, double, and long double.
2659 * src/c++17/Makefile.am: Add new file.
2660 * src/c++17/Makefile.in: Regenerate.
2661 * src/c++17/floating_from_chars.cc: New file.
2662 (from_chars): Define for float, double, and long double.
2663 * testsuite/20_util/from_chars/1_c++20_neg.cc: Prune extra
2664 diagnostics caused by new overloads.
2665 * testsuite/20_util/from_chars/1_neg.cc: Likewise.
2666 * testsuite/20_util/from_chars/2.cc: Check leading '+'.
2667 * testsuite/20_util/from_chars/4.cc: New test.
2668 * testsuite/20_util/from_chars/5.cc: New test.
2669 * testsuite/util/testsuite_abi.cc: Add new symbol versions.
2670
2671 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
2672
2673 * include/bits/istream.tcc
2674 (basic_istream::get(__streambuf_type&, char_type): Use unsigned
2675 long long for counter and check if it would overflow _M_gcount.
2676 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: New test.
2677 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: New test.
2678
2679 2020-07-17 Iain Sandoe <iain@sandoe.co.uk>
2680
2681 * include/std/coroutine: Mark the methods of the
2682 trivial awaitables as constexpr.
2683
2684 2020-07-14 David Edelsohn <dje.gcc@gmail.com>
2685
2686 * config/os/aix/t-aix: Set BITS from compiler cpp macro.
2687
2688 2020-07-13 Jonathan Wakely <jwakely@redhat.com>
2689
2690 PR libstdc++/94749
2691 PR libstdc++/96161
2692 * include/bits/istream.tcc (basic_istream::ignore(streamsize))
2693 [n == max]: Check overflow conditions on _M_gcount. Rely on
2694 the fact that either EOF or the delimiter was reached.
2695 [n < max]: Check _M_gcount < n before checking for EOF or
2696 delimiter.
2697 (basic_istream::ignore(streamsize, char_type): Likewise.
2698 * src/c++98/compatibility.cc (istream::ignore(streamsize))
2699 (wistream::ignore(streamsize)): Likewise.
2700 * src/c++98/istream.cc (istream::ignore(streamsize, char_type))
2701 (wistream::ignore(streamsize, char_type)): Likewise.
2702 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Check that
2703 delimiter is discarded if the number of characters ignored
2704 doesn't fit in streamsize.
2705 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
2706 Likewise.
2707 * testsuite/27_io/basic_istream/ignore/char/96161.cc: New test.
2708 * testsuite/27_io/basic_istream/ignore/wchar_t/96161.cc: New test.
2709
2710 2020-07-08 François Dumont <fdumont@gcc.gnu.org>
2711
2712 * include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&)): Add noexcept
2713 qualification based only on _Compare one.
2714 * testsuite/23_containers/map/cons/noexcept_move_construct.cc: Add
2715 static asserts.
2716 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
2717 Likewise.
2718 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
2719 Likewise.
2720 * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
2721
2722 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
2723
2724 * include/std/limits: Whitespace changes.
2725
2726 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
2727
2728 * include/Makefile.am: Remove bits/int_limits.h.
2729 * include/Makefile.in: Regenerate.
2730 * include/bits/int_limits.h: Removed.
2731 * include/bits/parse_numbers.h (_Select_int_base): Replace
2732 __int_limits with __int_traits.
2733 * include/bits/range_access.h (_SSize::operator()): Likewise.
2734 * include/ext/numeric_traits.h (__numeric_traits_integer): Add
2735 static assertion.
2736 (__int_traits): New alias template.
2737 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
2738 (__countr_zero, __countr_one, __popcount, __bit_ceil)
2739 (__bit_floor, __bit_width) Replace __int_limits with
2740 __int_traits.
2741 * include/std/charconv (__to_chars_8, __from_chars_binary)
2742 (__from_chars_alpha_to_num, from_chars): Likewise.
2743 * include/std/memory_resource (polymorphic_allocator::allocate)
2744 (polymorphic_allocator::allocate_object): Likewise.
2745 * include/std/string_view (basic_string_view::_S_compare):
2746 Likewise.
2747 * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
2748
2749 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
2750
2751 * include/std/limits: Whitespace changes.
2752
2753 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
2754
2755 * include/std/optional (_Optional_payload_base, _Optional_base)
2756 (optional, __optional_hash_call_base): Adjust whitespace and
2757 other formatting. Remove redundant && tokens on template
2758 arguments to type traits.
2759
2760 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
2761
2762 * include/std/optional (make_optional): Add enable_if
2763 constraints and noexcept-specifier to each overload.
2764 * testsuite/20_util/optional/make_optional-2.cc: New test.
2765
2766 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
2767
2768 PR libstdc++/96036
2769 * include/std/optional (optional): Add noexcept-specifier to
2770 every constructor, assignment operator, emplace function and
2771 dereference operator.
2772 * testsuite/20_util/optional/assignment/noexcept.cc: New test.
2773 * testsuite/20_util/optional/cons/noexcept.cc: New test.
2774
2775 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
2776
2777 PR libstdc++/96063
2778 * include/bits/fs_dir.h: Use consistent tag in class-head.
2779 * include/bits/localefwd.h: Likewise.
2780 * include/bits/regex.h: Likewise.
2781 * include/bits/stl_map.h: Likewise.
2782 * include/bits/stl_multimap.h: Likewise.
2783 * include/bits/stl_multiset.h: Likewise.
2784 * include/bits/stl_set.h: Likewise.
2785 * include/std/complex: Likewise.
2786 * include/std/functional: Likewise.
2787 * include/std/future: Likewise.
2788 * include/std/system_error: Likewise.
2789 * include/std/thread: Likewise.
2790 * include/std/tuple: Likewise.
2791 * include/std/type_traits: Likewise.
2792 * include/std/valarray: Likewise.
2793
2794 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
2795
2796 * testsuite/27_io/basic_ios/conv/voidptr.cc: Add c++98_only
2797 target selector.
2798
2799 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
2800
2801 * testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: Add
2802 c++98_only target selector.
2803 * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc:
2804 Likewise.
2805 * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc:
2806 Likewise.
2807 * testsuite/18_support/headers/new/synopsis_cxx98.cc: Likewise.
2808 * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc:
2809 Likewise.
2810 * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc:
2811 Likewise.
2812 * testsuite/23_containers/headers/array/std_c++0x_neg.cc:
2813 Likewise.
2814 * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc:
2815 Likewise.
2816 * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
2817 Likewise.
2818 * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
2819 Likewise.
2820 * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc:
2821 Likewise.
2822 * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc:
2823 Likewise.
2824 * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++98.cc:
2825 Likewise.
2826 * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc:
2827 Likewise.
2828 * testsuite/26_numerics/headers/random/std_c++0x_neg.cc:
2829 Likewise.
2830 * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Likewise.
2831 * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Likewise.
2832 * testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc:
2833 Likewise.
2834 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
2835 Likewise.
2836 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
2837 Likewise.
2838 * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: Likewise.
2839 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc:
2840 Likewise.
2841
2842 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
2843
2844 PR libstdc++/91807
2845 * include/std/variant
2846 (_Copy_assign_base::operator=(const _Copy_assign_base&):
2847 Do the move-assignment from a temporary so that the temporary
2848 is constructed with an explicit index.
2849 * testsuite/20_util/variant/91807.cc: New.
2850
2851 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
2852
2853 PR libstdc++/91153
2854 PR target/93224
2855 * testsuite/29_atomics/atomic_float/1.cc: Use different values
2856 for tests.
2857 * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
2858
2859 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
2860
2861 PR libstdc++/94627
2862 * include/bits/regex.h (operator==, operator!=): Remove noexcept
2863 equality comparisons for match_results.
2864 * testsuite/28_regex/match_results/94627.cc: New test.
2865
2866 2020-07-01 Martin Sebor <msebor@redhat.com>
2867
2868 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Adjust
2869 text of expected warning.
2870 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Same.
2871 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc: Same.
2872 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc: Same.
2873 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc: Same.
2874
2875 2020-06-29 Ville Voutilainen <ville.voutilainen@gmail.com>
2876
2877 Revert:
2878 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2879
2880 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
2881 Add a __nonnull__ attribute.
2882 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
2883 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
2884
2885 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2886
2887 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
2888 Add a __nonnull__ attribute.
2889 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
2890 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
2891
2892 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
2893
2894 PR libstdc++/95915
2895 * include/std/type_traits (is_literal_type, is_literal_type_v):
2896 Deprecate in C++17.
2897 * include/std/variant (_Uninitialized):
2898 Adjust the condition and the comment.
2899 * testsuite/20_util/is_literal_type/deprecated-1z.cc: New.
2900 * testsuite/20_util/is_literal_type/requirements/explicit_instantiation.cc:
2901 Adjust.
2902 * testsuite/20_util/is_literal_type/requirements/typedefs.cc: Likewise.
2903 * testsuite/20_util/is_literal_type/value.cc: Likewise.
2904 * testsuite/20_util/optional/constexpr/nullopt.cc:
2905 Use __is_literal_type directly.
2906 * testsuite/20_util/optional/nullopt.cc: Likewise.
2907 * testsuite/20_util/variable_templates_for_traits.cc: Adjust.
2908 * testsuite/20_util/variant/95915.cc: New.
2909 * testsuite/20_util/variant/compile.cc: Add new test.
2910 * testsuite/experimental/optional/constexpr/nullopt.cc:
2911 Use __is_literal_type directly.
2912 * testsuite/experimental/optional/nullopt.cc: Likewise.
2913 * testsuite/experimental/type_traits/value.cc: Adjust.
2914 * testsuite/util/testsuite_common_types.h:
2915 Use __is_literal_type directly.
2916
2917 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
2918
2919 * include/std/charconv (__from_chars_binary): Ignore leading zeros.
2920 * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
2921 not just 10 and 16.
2922 * testsuite/20_util/from_chars/3.cc: New test.
2923
2924 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
2925
2926 * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
2927 * include/std/charconv (__detail::__to_chars): Avoid
2928 -Wsign-compare warning.
2929
2930 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
2931
2932 PR libstdc++/95851
2933 * include/std/charconv (__to_chars_i): Check for zero-sized
2934 buffer unconditionally.
2935 * testsuite/20_util/to_chars/95851.cc: New test.
2936
2937 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
2938
2939 * testsuite/20_util/from_chars/1_c++20_neg.cc: Check enumeration
2940 type.
2941 * testsuite/20_util/from_chars/1_neg.cc: Likewise. Move dg-error
2942 directives outside preprocessor condition.
2943
2944 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
2945
2946 PR libstdc++/95832
2947 * include/std/variant (__detail::__variant::_Build_FUN): Remove
2948 partial specialization to prevent narrowing conversions to bool.
2949 * testsuite/20_util/variant/compile.cc: Test non-narrowing
2950 conversions to bool.
2951 * testsuite/20_util/variant/run.cc: Likewise.
2952
2953 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
2954
2955 * doc/Makefile.in: Regenerate.
2956 * include/Makefile.in: Regenerate.
2957 * libsupc++/Makefile.in: Regenerate.
2958 * po/Makefile.in: Regenerate.
2959 * python/Makefile.in: Regenerate.
2960 * src/Makefile.in: Regenerate.
2961 * src/c++11/Makefile.in: Regenerate.
2962 * src/c++17/Makefile.in: Regenerate.
2963 * src/c++98/Makefile.in: Regenerate.
2964 * src/filesystem/Makefile.in: Regenerate.
2965 * testsuite/Makefile.in: Regenerate.
2966
2967 2020-06-22 David Edelsohn <dje.gcc@gmail.com>
2968
2969 * Makefile.am: Use -include.
2970 * Makefile.in: Regenerate.
2971
2972 2020-06-21 David Edelsohn <dje.gcc@gmail.com>
2973
2974 * Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
2975 * Makefile.in: Regenerate.
2976 * configure.ac (tmake_file): Substitute.
2977 * configure: Regenerate.
2978 * configure.host (aix*): Define tmake_file.
2979 * config/os/aix/t-aix: New file.
2980
2981 2020-06-20 Jason Merrill <jason@redhat.com>
2982
2983 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
2984 Remove greedy_ops tests.
2985 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
2986 Remove greedy_ops tests.
2987
2988 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
2989
2990 PR libstdc++/95765
2991 * include/bits/stl_algobase.h (__size_to_integer(float))
2992 (__size_to_integer(double), __size_to_integer(long double))
2993 (__size_to_integer(__float128)): Cast return type explicitly.
2994 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
2995 Remove unused typedef.
2996
2997 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
2998
2999 * include/bits/stl_pair.h (_Index_tuple): Remove redundant
3000 namespace qualification.
3001 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
3002 Likewise.
3003 * include/std/tuple (_Head_base, _Tuple_impl, tuple_size)
3004 (tuple_element, __get_helper, get, __make_tuple_impl)
3005 (__make_1st_indices, __tuple_concater)
3006 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
3007 Likewise.
3008 * include/std/utility (tuple_element, __is_tuple_like_impl)
3009 (tuple_size, __pair_get, get): Likewise.
3010
3011 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
3012
3013 * include/bits/std_function.h (function): Define all member
3014 functions inline.
3015
3016 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
3017
3018 * include/bits/stl_algo.h (__includes): Simplify the code.
3019
3020 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
3021
3022 * include/std/optional (optional()): Explicitly define it.
3023
3024 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3025
3026 PR libstdc++/94540
3027 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
3028 Construct the first value at *__first instead of on the stack.
3029 (__uninitialized_default_n_1<true>): Likewise.
3030 Improve comments on several of the non-standard algorithms.
3031 * testsuite/20_util/specialized_algorithms/uninitialized_default/94540.cc:
3032 New test.
3033 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/94540.cc:
3034 New test.
3035 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
3036 New test.
3037 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
3038 New test.
3039 * testsuite/23_containers/vector/cons/94540.cc: New test.
3040
3041 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3042
3043 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
3044 Replace Value type with int so trivial code path is used.
3045 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
3046 Likewise.
3047
3048 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3049
3050 * include/bits/stl_uninitialized.h (uninitialized_fill_n): Only
3051 use std::fill_n when the size is an integral type.
3052 (__uninitialized_default_n): Likewise.
3053 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
3054 New test.
3055 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
3056 New test.
3057 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
3058 New test.
3059
3060 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
3061
3062 PR libstdc++/95282
3063 * include/bits/atomic_base.h (__atomic_impl::load): Use the _Val
3064 alias instead of deducing _Tp as an unqualified type.
3065 (__atomic_impl::exchange): Use the _Val alias to remove volatile
3066 from the reinterpret_cast result type.
3067
3068 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
3069
3070 * include/std/atomic (atomic): Add static assertions.
3071 * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
3072
3073 2020-06-16 Patrick Palka <ppalka@redhat.com>
3074
3075 PR libstdc++/94003
3076 * testsuite/20_util/is_constructible/94003.cc: New test.
3077
3078 2020-06-15 Jonathan Wakely <jwakely@redhat.com>
3079
3080 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
3081 Update value for C++20.
3082 * include/std/version (__cpp_lib_constexpr_char_traits): Likewise.
3083 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
3084 Update expected value.
3085 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
3086 Likewise.
3087
3088 2020-06-15 Paul Keir <paul.keir@uws.ac.uk>
3089
3090 * include/bits/char_traits.h (char_traits::move): constexpr move with
3091 overlap was using copy_backward incorrectly.
3092 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
3093 New test.
3094
3095 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
3096
3097 * testsuite/29_atomics/atomic_flag/clear/1.cc: Also test clear()
3098 when the value is currently set.
3099 * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc:
3100 Actually check the return value.
3101 * testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc:
3102 Likewise.
3103
3104 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
3105
3106 * include/bits/atomic_base.h (atomic_flag::test): Add missing
3107 const qualifiers.
3108 * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
3109 dg-options and verify results of test function.
3110 * testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
3111
3112 2020-06-11 Jonathan Wakely <jwakely@redhat.com>
3113
3114 PR libstdc++/94749
3115 * include/bits/istream.tcc (basic_istream::ignore(streamsize, CharT)):
3116 Only discard an extra character if we didn't already reach the
3117 maximum number.
3118 * src/c++98/istream.cc (istream::ignore(streamsiz, char))
3119 (wistream::ignore(streamsize, wchar_t)): Likewise.
3120 * testsuite/27_io/basic_istream/ignore/char/94749.cc: New test.
3121 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc: New test.
3122
3123 2020-06-10 Patrick Palka <ppalka@redhat.com>
3124
3125 PR libstdc++/95578
3126 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
3127 Also check that the iterator and sentinel have the same type before
3128 applying the unwrapping optimization for __normal_iterator.
3129 Split the check into two, one for the first iterator/sentinel
3130 pair and another for second iterator/sentinel pair. Remove uses
3131 of __niter_base, and remove uses of std::move on a
3132 __normal_iterator.
3133 * include/bits/ranges_algobase.h (__equal_fn): Likewise.
3134 (__copy_or_move): Likewise. Perform similar adjustments for
3135 the reverse_iterator and move_iterator optimizations. Inline
3136 the checks into the if-constexprs, and use using-declarations to
3137 make them less visually noisy. Remove uses of __niter_wrap.
3138 (__copy_or_move_backward): Likewise.
3139 * testsuite/25_algorithms/copy/95578.cc: New test.
3140 * testsuite/25_algorithms/copy_backward/95578.cc: New test.
3141 * testsuite/25_algorithms/equal/95578.cc: New test.
3142 * testsuite/25_algorithms/lexicographical_compare/95578.cc: New test.
3143 * testsuite/25_algorithms/move/95578.cc: New test.
3144 * testsuite/25_algorithms/move_backward/95578.cc: New test.
3145
3146 2020-06-10 François Dumont <fdumont@gcc.gnu.org>
3147 Jonathan Wakely <jwakely@redhat.com>
3148
3149 * include/bits/deque.tcc (__lex_cmp_dit): New.
3150 (__lexicographical_compare_aux1): Define overloads for deque
3151 iterators.
3152 * include/bits/stl_algobase.h (__lexicographical_compare::__3way):
3153 New static member function.
3154 (__lexicographical_compare<true>::__3way): Likewise.
3155 (__lexicographical_compare<true>::__lc): Use __3way.
3156 (__lexicographical_compare_aux): Rename to
3157 __lexicographical_compare_aux1 and declare overloads for deque
3158 iterators.
3159 (__lexicographical_compare_aux): Define new forwarding function
3160 that calls __lexicographical_compare_aux1 and declare new overloads
3161 for safe iterators.
3162 (lexicographical_compare): Do not use __niter_base on
3163 parameters.
3164 * include/debug/safe_iterator.tcc
3165 (__lexicographical_compare_aux): Define overloads for safe
3166 iterators.
3167 * testsuite/25_algorithms/lexicographical_compare/1.cc: Add
3168 checks with random access iterators.
3169 * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
3170 New test.
3171
3172 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
3173
3174 * include/bits/stl_iterator.h (move_iterator::operator=): Define.
3175 * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
3176
3177 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
3178
3179 * include/std/optional (bad_optional_access): Define default
3180 constructor and destructor as defaulted.
3181 * testsuite/20_util/optional/bad_access.cc: New test.
3182
3183 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
3184
3185 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
3186 line number.
3187 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
3188
3189 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
3190
3191 * include/bits/unique_ptr.h (operator<<): Define for C++20.
3192 * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
3193
3194 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
3195
3196 * include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
3197 (__detail::__cat, __detail::__diff): Move to class scope in the
3198 relevant __iterator_traits specializations.
3199 (__iterator_traits<>): Use nested class templates instead of ones from
3200 namespace __detail.
3201 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
3202 class scope in iterator_traits<common_iterator<I, S>>.
3203 (iterator_traits<common_iterator<I, S>>): Use nested class template
3204 instead of __detail::__common_iter_ptr.
3205
3206 2020-06-04 François Dumont <fdumont@gcc.gnu.org>
3207
3208 * include/bits/stl_algo.h (__copy_n_a): Move to ...
3209 * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict
3210 parameter.
3211 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
3212 Declare.
3213 (__niter_base(const _Safe_iterator<_Ite, _Seq,
3214 random_access_iterator_tag>&)): Declare.
3215 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
3216 _Deque_iterator<>)): Declare.
3217 * include/bits/deque.tcc
3218 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
3219 _Deque_iterator<>)): New.
3220 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
3221 New.
3222 * include/bits/streambuf_iterator.h
3223 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*, bool)): Adapt.
3224 * include/debug/safe_iterator.tcc (__niter_base): New.
3225 * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
3226 (test03): New.
3227 * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc:
3228 New test.
3229 * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:
3230 New test.
3231 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New test.
3232 * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc:
3233 New test.
3234
3235 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
3236
3237 * include/bits/ranges_algobase.h (__copy_n_fn): Only call
3238 ranges::copy for positive values.
3239 * include/bits/stl_algo.h (copy_n): Convert Size argument to an
3240 integral type and only call __copy_n for positive values.
3241 * testsuite/util/testsuite_iterators.h
3242 (random_access_iterator_wrapper::operator+=): Fix range check for
3243 negative values.
3244 (output_container, input_container, forward_container)
3245 (bidirectional_container, random_access_container): New alias
3246 templates.
3247 * testsuite/25_algorithms/copy_n/5.cc: New test.
3248
3249 2020-06-02 Jonathan Wakely <jwakely@redhat.com>
3250
3251 PR libstdc++/90102
3252 * include/debug/deque (deque(const _Base&)): Replace parameter
3253 with a struct that wraps a const _Base&.
3254 * include/debug/forward_list (forward_list(_Base_ref)): New
3255 constructor.
3256 * include/debug/list (list(const _Base&)): Replace parameter
3257 with a struct that wraps a const _Base&.
3258 * include/debug/map.h (map(const _Base&)): Likewise.
3259 * include/debug/multimap.h (multimap(const _Base&)): Likewise.
3260 * include/debug/multiset.h (multiset(const _Base&)): Likewise.
3261 * include/debug/set.h (set(const _Base&)): Likewise.
3262 * include/debug/unordered_map (unordered_map(const _Base&))
3263 (unordered_multimap(const _Base&)): Likewise.
3264 * include/debug/unordered_set (unordered_set(const _Base&))
3265 (unordered_multiset(const _Base&)): Likewise.
3266 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
3267 Adjust dg-error line number.
3268 * include/debug/vector (vector(const _Base&)): Likewise.
3269 * testsuite/23_containers/deque/debug/90102.cc: New test.
3270 * testsuite/23_containers/forward_list/debug/90102.cc: New test.
3271 * testsuite/23_containers/list/debug/90102.cc: New test.
3272 * testsuite/23_containers/map/debug/90102.cc: New test.
3273 * testsuite/23_containers/multimap/debug/90102.cc: New test.
3274 * testsuite/23_containers/multiset/debug/90102.cc: New test.
3275 * testsuite/23_containers/set/debug/90102.cc: New test.
3276 * testsuite/23_containers/unordered_map/debug/90102.cc: New test.
3277 * testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
3278 * testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
3279 * testsuite/23_containers/unordered_set/debug/90102.cc: New test.
3280 * testsuite/23_containers/vector/debug/90102.cc: New test.
3281
3282 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
3283
3284 PR libstdc++/95392
3285 * include/bits/fs_path.h (path::_S_to_string): Move to
3286 namespace-scope and rename to ...
3287 (__detail::__string_from_range): ... this.
3288 [WINDOWS] (__detail::__wstr_from_utf8): New function template to
3289 convert a char sequence containing UTF-8 to wstring.
3290 (path::_S_convert(Iter, Iter)): Adjust call to _S_to_string.
3291 (path::_S_convert_loc(Iter, Iter, const locale&)): Likewise.
3292 (u8path(InputIterator, InputIterator)) [WINDOWS]: Use
3293 __string_from_range to obtain a contiguous range and
3294 __wstr_from_utf8 to obtain a wide string.
3295 (u8path(const Source&)) [WINDOWS]: Use __effective_range to
3296 obtain a contiguous range and __wstr_from_utf8 to obtain a wide
3297 string.
3298 (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
3299 Use __wstr_from_utf8.
3300
3301 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
3302
3303 * testsuite/util/testsuite_iterators.h:
3304 (input_iterator_wrapper::operator++(int)): Return proxy object.
3305
3306 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
3307
3308 * doc/xml/manual/evolution.xml: Document deprecation of
3309 __is_nullptr_t and removal of std::allocator members.
3310 * doc/html/manual/api.html: Regenerate.
3311
3312 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
3313
3314 * doc/xml/manual/containers.xml: Replace <xref> with <link>.
3315 * doc/xml/manual/evolution.xml: Likewise.
3316 * doc/html/manual/api.html: Regenerate.
3317 * doc/html/manual/containers.html: Regenerate.
3318
3319 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
3320
3321 * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
3322 * doc/html/faq.html: Regenerate.
3323
3324 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
3325
3326 * doc/xml/manual/policy_data_structures_biblio.xml: Remove
3327 stray change.
3328
3329 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
3330
3331 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
3332 www.cs.princeton.edu to https.
3333 * doc/html/manual/policy_data_structures.html: Regenerate.
3334
3335 2020-05-31 Douglas B Rupp <douglas.b.rupp@gmail.com>
3336
3337 * crossconfig.m4 (<*-vxworks>): Check for more math decls.
3338 * configure: Rebuild.
3339
3340 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
3341
3342 PR bootstrap/95413
3343 * configure: Regenerated.
3344
3345 2020-05-29 François Dumont <fdumont@gcc.gnu.org>
3346
3347 PR libstdc++/95079
3348 * include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
3349 * include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
3350 (unordered_map<>::insert_or_assign): Adapt.
3351
3352 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
3353
3354 PR libstdc++/95282
3355 * include/bits/atomic_base.h (__atomic_impl::load): Add
3356 cv-qualifiers to parameter so that _Tp is deduced as the
3357 unqualified type.
3358 * testsuite/29_atomics/atomic_float/95282.cc: New test.
3359
3360 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
3361
3362 PR libstdc++/95322
3363 * include/std/ranges (transform_view::_Sentinel): Allow hidden
3364 friends to work with _Iterator<true> and _Iterator<false>.
3365 (join_view::_Sentinel): Likewise.
3366 * testsuite/std/ranges/adaptors/95322.cc: New test.
3367
3368 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
3369
3370 PR libstdc++/94354
3371 * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
3372 operators to use the correct operations on the underlying
3373 iterators.
3374 * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
3375
3376 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
3377
3378 * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
3379
3380 2020-05-26 Patrick Palka <ppalka@redhat.com>
3381
3382 PR libstdc++/95322
3383 * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
3384 Remove and instead define it ...
3385 (common_iterator::_Proxy): ... here.
3386 (common_iterator::operator->): Use it.
3387 * testsuite/24_iterators/common_iterator/2.cc: New test.
3388 * testsuite/std/ranges/adaptors/95322.cc: New test.
3389
3390 2020-05-23 Patrick Palka <ppalka@redhat.com>
3391
3392 PR libstdc++/93978
3393 * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
3394 dg-additional-options. Avoid unused-but-set-variable warning.
3395
3396 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
3397
3398 PR libstdc++/95289
3399 * include/debug/helper_functions.h (__get_distance): Only declare
3400 as a constexpr function for C++14 and up.
3401 * testsuite/25_algorithms/copy/debug/95289.cc: New test.
3402
3403 * include/bits/fs_path.h (__detail::_S_range_begin)
3404 (__detail::_S_range_end, path::_S_string_from_iter): Replace with
3405 overloaded function template __detail::__effective_range.
3406 (__detail::__effective_range): New overloaded function template to
3407 create a basic_string or basic_string_view for an effective range.
3408 (__detail::__value_type_is_char): Use __detail::__effective_range.
3409 Do not use remove_const on value type.
3410 (__detail::__value_type_is_char_or_char8_t): Likewise.
3411 (path::path(const Source&, format))
3412 (path::path(const Source&, const locale&))
3413 (path::operator/=(const Source&), path::append(const Source&))
3414 (path::concat(const Source&)): Use __detail::__effective_range.
3415 (path::_S_to_string(InputIterator, InputIterator)): New function
3416 template to create a string view if possible, or string otherwise.
3417 (path::_S_convert): Add overloads that convert a string returned
3418 by __detail::__effective_range. Use if-constexpr to inline conversion
3419 logic from all overloads of _Cvt::_S_convert.
3420 (path::_S_convert_loc): Add overload that converts a string. Use
3421 _S_to_string to avoid allocation when possible.
3422 (path::_Cvt): Remove.
3423 (path::operator+=(CharT)): Remove indirection through path::concat.
3424 * include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
3425 overload for non-const pointers, to avoid constructing a std::string.
3426 * src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
3427 compilation with call to _S_convert.
3428
3429 * include/bits/fs_path.h (__detail::_S_range_begin)
3430 (__detail::_S_range_end): Remove unintentional static specifiers.
3431 * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
3432 (__detail::_S_range_end): Likewise.
3433
3434 * include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
3435 Replace alias template with variable template. Don't remove const.
3436 (filesystem::__detail::__is_path_src): Replace overloaded function
3437 template with variable template and specializations.
3438 (filesystem::__detail::__is_path_iter_src): Replace alias template
3439 with class template.
3440 (filesystem::__detail::_Path): Use __is_path_src. Remove support for
3441 iterator pairs.
3442 (filesystem::__detail::_Path2): New alias template for checking
3443 InputIterator requirements.
3444 (filesystem::__detail::__constructible_from): Remove.
3445 (filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
3446 * testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
3447 constructor arguments of void and void* types.
3448
3449 2020-05-21 Matthias Kretz <kretz@kde.org>
3450
3451 * testsuite/Makefile.am: Remove dup target_triplet and set tool,
3452 allowing runtest to work without arguments.
3453 * testsuite/Makefile.in: Regenerate.
3454
3455 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
3456
3457 PR libstdc++/93983
3458 * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
3459 Reorder constraints to avoid recursion when constructors use
3460 iterator_traits (LWG 3420).
3461 * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
3462
3463 * include/experimental/socket (basic_socket::is_open()
3464 (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
3465
3466 * include/experimental/bits/net.h (__endpoint, __protocol)
3467 (__acceptable_protocol, __inet_protocol): New concepts.
3468 (__detail::__is_endpoint): Move trait from <experimental/socket>.
3469 (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
3470 traits.
3471 (__endpoint, __protocol, __acceptable_protocol): New variable
3472 templates.
3473 * include/experimental/socket (__is_endpoint): Move to net.h header.
3474 (basic_socket, basic_socket_acceptor): Check requirements.
3475
3476 * include/experimental/executor (use_future_t::use_future_t()): Fix
3477 incorrect noexcept-specifier.
3478 * include/experimental/internet (basic_resolver_results): Adjust
3479 whitespace.
3480 * include/experimental/socket (__basic_socket_impl::release): Add
3481 member function.
3482 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
3483 target constructor.
3484 (basic_socket::release(), basic_socket::release(error_code&)): Add
3485 missing member functions.
3486 (basic_socket::is_open()): Add nodiscard attribute.
3487 (basic_socket::close(error_code&)): Pass argument to base function.
3488 (basic_socket_acceptor::release())
3489 (basic_socket_acceptor::release(error_code&)): Add missing member
3490 functions.
3491 (basic_socket_acceptor::is_open()): Add nodiscard attribute.
3492 (basic_socket_streambuf::error()): Add noexcept.
3493 (basic_socket_iostream::error()): Likewise.
3494 * testsuite/experimental/net/socket/basic_socket.cc: New test.
3495
3496 * include/experimental/buffer: Replace typedefs with
3497 alias-declarations.
3498 * include/experimental/executor: Likewise.
3499 * include/experimental/internet: Likewise.
3500 * include/experimental/socket: Likewise.
3501 * include/experimental/timer: Likewise.
3502
3503 2020-05-19 Jonathan Wakely <jwakely@redhat.com>
3504
3505 PR libstdc++/94087
3506 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
3507 passed in.
3508 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
3509 fallback.
3510 (random_device::_M_init): Use __x86_rdseed_rdrand when both
3511 instructions are available.
3512 * testsuite/26_numerics/random/random_device/94087.cc: New test.
3513
3514 2020-05-19 Patrick Palka <ppalka@redhat.com>
3515
3516 PR c++/66439
3517 * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
3518 mismatch" messages.
3519 * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
3520
3521 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
3522
3523 PR bootstrap/95147
3524 * configure: Regenerated.
3525
3526 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
3527
3528 * configure: Regenerated.
3529
3530 2020-05-13 Alexandre Oliva <oliva@adacore.com>
3531
3532 PR libstdc++/77691
3533 * include/experimental/memory_resource
3534 (__resource_adaptor_imp::do_allocate): Handle max_align_t on
3535 x86-vxworks as on x86-solaris.
3536 (__resource_adaptor_imp::do_deallocate): Likewise.
3537 * testsuite/experimental/memory_resource/new_delete_resource.cc:
3538 Drop xfail.
3539 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
3540 (test03): Drop max-align test for char-aligned alloc.
3541
3542 2020-05-08 Ulrich Drepper <drepper@redhat.com>
3543
3544 * include/bits/atomic_base.h (atomic_flag): Implement test member
3545 function.
3546 * include/std/version: Define __cpp_lib_atomic_flag_test.
3547 * testsuite/29_atomics/atomic_flag/test/explicit.cc: New file.
3548 * testsuite/29_atomics/atomic_flag/test/implicit.cc: New file.
3549
3550 2020-05-07 Jonathan Wakely <jwakely@redhat.com>
3551
3552 PR libstdc++/94971 (partial)
3553 * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify
3554 std::sample using macro to work in parallel mode.
3555 (__sort_fn): Likewise for std::sort.
3556 (ranges::__nth_element_fn): Likewise for std::nth_element.
3557 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
3558 Likewise for std::__min_cmp.
3559 * include/parallel/algobase.h (lexicographical_compare_three_way):
3560 Add to namespace std::__parallel.
3561
3562 PR c/92472
3563 * include/parallel/multiway_merge.h (_GuardedIterator::operator*)
3564 (_GuardedIterator::operator _RAIter, _UnguardedIterator::operator*)
3565 (_UnguardedIterator::operator _RAIter): Add const qualifier.
3566 (operator<(_GuardedIterator&, _GuardedIterator&)
3567 (operator<=(_GuardedIterator&, _GuardedIterator&)
3568 (operator<(_UnguardedIterator&, _UnguardedIterator&)
3569 (operator<=(_UnguardedIterator&, _UnguardedIterator&): Change
3570 parameters to const references.
3571
3572 2020-05-07 Eric Botcazou <ebotcazou@adacore.com>
3573
3574 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
3575 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
3576
3577 2020-05-06 François Dumont <fdumont@gcc.gnu.org>
3578
3579 * include/bits/stl_algobase.h (struct _Bit_iterator): New declaration.
3580 (std::__fill_a1(_Bit_iterator, _Bit_iterator, const bool&)): Likewise.
3581 * include/bits/stl_bvector.h (__fill_bvector): Move outside
3582 _GLIBCXX_STD_C namespace.
3583 (fill(_Bit_iterator, _Bit_iterator, const bool&)): Likewise and rename
3584 into...
3585 (__fill_a1): ...this.
3586 * testsuite/25_algorithms/fill/bvector/1.cc: New.
3587
3588 2020-05-06 H.J. Lu <hongjiu.lu@intel.com>
3589
3590 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
3591
3592 2020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3593
3594 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
3595 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
3596 Likewise.
3597 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
3598 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
3599 Likewise.
3600
3601 2020-05-06 Martin Liska <mliska@suse.cz>
3602
3603 Revert:
3604 2020-05-05 Martin Liska <mliska@suse.cz>
3605 PR c/92472
3606 * include/parallel/multiway_merge.h:
3607 Use const for _Compare template argument.
3608
3609 2020-05-06 Jonathan Wakely <jwakely@redhat.com>
3610
3611 * doc/xml/manual/abi.xml (abi.versioning.history): Document library
3612 versions for GCC 9.[123] and 10.1 releases.
3613 * doc/html/*: Regenerate.
3614
3615 2020-05-06 Jakub Jelinek <jakub@redhat.com>
3616
3617 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
3618 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
3619 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
3620 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
3621 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
3622 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
3623 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
3624
3625 2020-05-05 Martin Liska <mliska@suse.cz>
3626
3627 PR c/92472
3628 * include/parallel/multiway_merge.h:
3629 Use const for _Compare template argument.
3630
3631 2020-05-04 Fangrui Song <maskray@google.com>
3632
3633 * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
3634
3635 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
3636
3637 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
3638 * doc/html/*: Regenerate.
3639
3640 PR libstdc++/94906
3641 * src/c++17/memory_resource.cc
3642 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
3643 operands.
3644
3645 2020-05-04 Nathan Sidwell <nathan@acm.org>
3646
3647 PR libstdc++/94747
3648 * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
3649 ptrdiff_t before negation, to show intent more clearly.
3650
3651 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
3652
3653 PR libstdc++/94936
3654 * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
3655 Add comment about single-threaded behaviour.
3656 (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
3657 class member access out of loop.
3658 (synchronized_pool_resource::synchronized_pool_resource())
3659 (synchronized_pool_resource::~synchronized_pool_resource())
3660 (synchronized_pool_resource::release()): Check __gthread_active_p
3661 before creating and/or deleting the thread-specific data key.
3662 (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
3663 assertions.
3664 (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
3665 path for single-threaded case.
3666 (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
3667 Likewise. Return if unable to find a pool that owns the allocation.
3668 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
3669 New test.
3670 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
3671 test.
3672 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
3673 test.
3674
3675 2020-05-03 Jonathan Wakely <jwakely@redhat.com>
3676
3677 PR libstdc++/94933
3678 * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
3679 usable in constant expressions.
3680 * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
3681 non-scalars.
3682
3683 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
3684
3685 PR libstdc++/94901
3686 * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
3687
3688 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
3689 Patrick Palka <ppalka@redhat.com>
3690
3691 PR libstdc++/92894
3692 * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
3693 Add trait to determine return type and an alias for it.
3694 (ranges::__cust_imove::_IMove::operator()): Use __result instead of
3695 deduced return type.
3696 (iter_rvalue_reference_t): Use _IMove::__type instead of checking
3697 the result of ranges::iter_move.
3698 (__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
3699 instead of checking the result of ranges::iter_move.
3700 * testsuite/24_iterators/customization_points/92894.cc: New test.
3701 * testsuite/24_iterators/indirect_callable/92894.cc: New test.
3702
3703 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
3704
3705 PR libstdc++/94901
3706 * include/std/type_traits (__is_complete_or_unbounded): Replace
3707 BADNAME _T with _Tp.
3708 * testsuite/17_intro/badnames.cc: New test.
3709
3710 2020-04-30 Jonathan Wakely <jwakely@redhat.com>
3711
3712 PR libstdc++/89510
3713 * include/bits/alloc_traits.h (allocator_traits::_S_construct)
3714 (allocator_traits::_S_destroy)
3715 (allocator_traits<allocator<T>>::construct): Use traits in
3716 noexcept-specifiers.
3717 * include/bits/allocator.h (allocator<void>::construct)
3718 (allocator<void>::destroy): Likewise.
3719 * include/ext/malloc_allocator.h (malloc_allocator::construct)
3720 (malloc_allocator::destroy): Likewise.
3721 * include/ext/new_allocator.h (new_allocator::construct)
3722 (new_allocator::destroy): Likewise.
3723 * testsuite/20_util/allocator/89510.cc: New test.
3724 * testsuite/ext/malloc_allocator/89510.cc: New test.
3725 * testsuite/ext/new_allocator/89510.cc: New test.
3726
3727 2020-04-29 Jonathan Wakely <jwakely@redhat.com>
3728
3729 PR libstdc++/94854
3730 * include/bits/basic_string.tcc: Update comment about explicit
3731 instantiations.
3732
3733 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
3734
3735 PR libstdc++/91480
3736 * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
3737 Remove non-standard macro.
3738 * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
3739 to indicate P1032R1 support.
3740 * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
3741 * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
3742 * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
3743 * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
3744 (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
3745 (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
3746 * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
3747 feature test macro.
3748 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
3749 * testsuite/21_strings/basic_string_view/operations/copy/char/
3750 constexpr.cc: Likewise.
3751 * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
3752
3753 PR libstdc++/94831
3754 * include/bits/alloc_traits.h (_S_construct): Restore placement
3755 new-expression for C++11/14/17 and call std::construct_at directly
3756 for C++20.
3757 * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
3758 function returning void.
3759 * testsuite/20_util/specialized_algorithms/
3760 uninitialized_value_construct/94831.cc: New test.
3761 * testsuite/23_containers/vector/cons/94831.cc: New test.
3762
3763 2020-04-28 Patrick Palka <ppalka@redhat.com>
3764
3765 LWG 3433 subrange::advance(n) has UB when n < 0
3766 * include/std/ranges (subrange::prev): Fix typo.
3767 (subrange::advance): Handle a negative argument as per the proposed
3768 resolution of LWG 3433.
3769 * testsuite/std/ranges/subrange/lwg3433.cc: New test.
3770
3771 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
3772 Iain Sandoe <iain@sandoe.co.uk>
3773
3774 PR c++/94759
3775 * include/std/coroutine: Implement handing for non-
3776 class coroutine return types.
3777
3778 2020-04-24 Jonathan Wakely <jwakely@redhat.com>
3779
3780 * include/experimental/executor (service_already_exists): Make default
3781 constructor public (LWG 3414).
3782 * testsuite/experimental/net/execution_context/make_service.cc: Check
3783 the service_already_exists can be default constructed.
3784
3785 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
3786 Jonathan Wakely <jwakely@redhat.com>
3787
3788 PR libstdc++/90415
3789 PR libstdc++/92156
3790 * include/std/any (any): Rename template parameters for consistency
3791 with the standard.
3792 (any::_Decay): Rename to _Decay_if_not_any.
3793 (any::any(T&&):: Remove is_constructible from constraints. Remove
3794 non-standard overload.
3795 (any::any(in_place_type_t<T>, Args&&...))
3796 (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
3797 (any::emplace(Args&&...))
3798 (any::emplace(initializer_list<U>, Args&&...)):
3799 Use decay_t instead of _Decay.
3800 * testsuite/20_util/any/cons/90415.cc: New test.
3801 * testsuite/20_util/any/cons/92156.cc: New Test.
3802 * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
3803 more robust.
3804 * testsuite/20_util/any/modifiers/92156.cc: New test.
3805
3806 2020-04-23 Jonathan Wakely <jwakely@redhat.com>
3807
3808 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
3809 * doc/html/*: Regenerate.
3810
3811 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
3812 value for C++17 to 201803L because P0858R0 is supported for C++17.
3813 * include/std/version (__cpp_lib_array_constexpr): Likewise.
3814 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
3815 Check for value corresponding to P0031R0 features being tested.
3816 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
3817 Check for value corresponding to P0858R0 features being tested.
3818
3819 * include/std/version (__cpp_lib_three_way_comparison): Define for
3820 freestanding builds.
3821
3822 2020-04-23 Thomas Rodgers <rodgert@appliantology.com>
3823
3824 * include/experimental/net/executor (system_context): Mark
3825 system_context::system_context() = delete.
3826 * testsuite/experimental/net/executor/1.cc: Add new
3827 test to check system_context is not default constructible.
3828
3829 2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
3830
3831 * include/std/coroutine: Update the inline namespace to __n4861.
3832 Add the __cpp_lib_coroutine define, set to 201902L.
3833 * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
3834
3835 2020-04-22 Jonathan Wakely <jwakely@redhat.com>
3836
3837 * include/std/execution (__cpp_lib_execution): Define to indicate
3838 support for P0024R2 and P1001R2.
3839 * include/std/version (__cpp_lib_execution): Define.
3840 * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
3841 defined by <algorithm>, move other tests to new tests ...
3842 * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
3843 * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
3844 * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
3845 * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
3846
3847 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
3848 different values for C++17 and C++20, to indicate different feature
3849 sets. Update value for C++20 to indicate P1032R1 support.
3850 * include/std/version (__cpp_lib_array_constexpr): Likewise.
3851 * testsuite/23_containers/array/comparison_operators/constexpr.cc:
3852 Check feature test macro.
3853 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
3854 New test.
3855 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
3856 feature test macro.
3857 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
3858 in C++17 mode and check feature test macro.
3859
3860 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
3861 here.
3862 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
3863 defined by <utility>.
3864
3865 * include/std/functional (__cpp_lib_concepts): Update macro value to
3866 indicate P1964R2 support.
3867 * include/std/version (__cpp_lib_concepts): Likewise.
3868 * testsuite/std/concepts/1.cc: Adjust expected value.
3869 * testsuite/std/concepts/2.cc: Likewise.
3870
3871 * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
3872 __cpp_lib_constexpr_functional.
3873 * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
3874 * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
3875
3876 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
3877 indicate P1006R1 support.
3878 (__cpp_lib_to_address): Define to indicate P0653R2 support.
3879 * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
3880 P1227R2 support.
3881 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
3882 P0769R2 support.
3883 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
3884 P0020R6 support.
3885 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
3886 P1007R3 support.
3887 * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
3888 Define to indicate P0339R6 support.
3889 * include/std/string_view (__cpp_lib_starts_ends_with): Define to
3890 indicate P0457R2 support.
3891 * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
3892 to indicate P0758R1 support.
3893 (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
3894 (__cpp_lib_type_identity): Define to indicate P0887R1 support.
3895 * include/std/version (__cpp_lib_atomic_float)
3896 (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
3897 (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
3898 (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
3899 (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
3900 (__cpp_lib_to_address): Define.
3901 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
3902
3903 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
3904 macro.
3905 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
3906 Likewise.
3907 * include/std/version (__cpp_lib_map_insertion)
3908 (__cpp_lib_unordered_map_insertion): Remove.
3909
3910 * include/std/condition_variable (__cpp_lib_jthread): Remove
3911 redundant definition.
3912 * include/std/stop_token (__cpp_lib_jthread): Update macro value to
3913 indicate P1869R1 support.
3914 * include/std/version (__cpp_lib_jthread): Update value.
3915 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
3916 for updated macro value.
3917 * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
3918 Likewise.
3919 * testsuite/30_threads/jthread/1.cc: Likewise.
3920 * testsuite/30_threads/jthread/2.cc: Likewise.
3921 * testsuite/30_threads/stop_token/1.cc: Likewise.
3922 * testsuite/30_threads/stop_token/2.cc: Likewise.
3923
3924 * testsuite/21_strings/basic_string/erasure.cc: Check for
3925 __cpp_lib_erase_if macro.
3926 * testsuite/23_containers/deque/erasure.cc: Add header name to #error
3927 messages.
3928 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
3929 * testsuite/23_containers/list/erasure.cc: Likewise.
3930 * testsuite/23_containers/map/erasure.cc: Likewise.
3931 * testsuite/23_containers/set/erasure.cc: Likewise.
3932 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
3933 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
3934 * testsuite/23_containers/vector/erasure.cc: Likewise.
3935
3936 2020-04-21 Jonathan Wakely <jwakely@redhat.com>
3937
3938 * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
3939 to define operator<=>.
3940 * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
3941
3942 * doc/Makefile.am (xml_sources_manual): Add missing XML files.
3943 * doc/Makefile.in: Regenerate.
3944 * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
3945 of "this page".
3946 * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
3947 to the C++11 status table.
3948 * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
3949 proposals with table matching contents of the C++14 standard.
3950 * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
3951 the C++17 standard.
3952 * doc/html/*: Regenerate.
3953
3954 PR c++/94149
3955 * include/std/type_traits (__is_nt_constructible_impl): Add partial
3956 specializations for bounded arrays with non-empty initializers.
3957 * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
3958
3959 2020-04-20 Thomas Rodgers <trodgers@redhat.com>
3960
3961 * testsuite/lib/libstdc++.exp: Add additional_flags=
3962 -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
3963 compiling with a newer Thread Building Blocks.
3964
3965 2020-04-20 Jonathan Wakely <jwakely@redhat.com>
3966
3967 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
3968
3969 * testsuite/20_util/is_constructible/51185.cc: Make test class a
3970 non-aggregate so that the test verifies the same thing in all -std
3971 modes.
3972 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
3973 results for some types when paren-init for aggregates is supported.
3974
3975 * include/std/version (__cpp_lib_three_way_comparison): Update value.
3976 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
3977 (__detail::__synth3way): Add noexcept-specifier.
3978
3979 * include/bits/stl_map.h (map): Define operator<=> and remove
3980 operator< for C++20.
3981 * include/bits/stl_multimap.h (multimap): Likewise.
3982 * include/bits/stl_multiset.h (multiset): Likewise.
3983 * include/bits/stl_set.h (set): Likewise.
3984 * include/bits/stl_tree.h (_Rb_tree): Likewise.
3985 (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
3986 operator!= for C++20.
3987 * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
3988 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
3989 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
3990 * include/debug/set.h (__gnu_debug::set): Likewise.
3991 * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
3992 * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
3993 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
3994 * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
3995
3996 2020-04-20 Matthias Kretz <kretz@kde.org>
3997
3998 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
3999
4000 2020-04-19 Jonathan Wakely <jwakely@redhat.com>
4001
4002 * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
4003 * include/bits/stl_stack.h (stack): Likewise.
4004 * testsuite/23_containers/queue/cmp_c++20.cc: New test.
4005 * testsuite/23_containers/stack/cmp_c++20.cc: New test.
4006
4007 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
4008 Remove redundant operator!= for C++20.
4009 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
4010 Likewise.
4011 * include/debug/unordered_map (unordered_map, unordered_multimap):
4012 Likewise.
4013 * include/debug/unordered_set (unordered_set, unordered_multiset):
4014 Likewise.
4015
4016 PR other/94629
4017 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
4018 redundant assignment in constructor.
4019
4020 2020-04-18 Jonathan Wakely <jwakely@redhat.com>
4021
4022 * include/std/chrono (duration, time_point): Define operator<=> and
4023 remove redundant operator!= for C++20.
4024 * testsuite/20_util/duration/comparison_operators/three_way.cc: New
4025 test.
4026 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
4027 test.
4028
4029 * testsuite/util/native_type/native_priority_queue.hpp: Use
4030 allocator_traits to rebind allocator.
4031
4032 2020-04-17 Jonathan Wakely <jwakely@redhat.com>
4033
4034 * include/bits/forward_list.h (forward_list): Define operator<=> and
4035 remove redundant comparison operators for C++20.
4036 * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
4037 * include/bits/stl_deque.h (deque): Likewise.
4038 * include/bits/stl_iterator.h (__normal_iterator): Likewise.
4039 * include/bits/stl_list.h (list): Likewise.
4040 * include/bits/stl_vector.h (vector): Likewise.
4041 * include/debug/deque (__gnu_debug::deque): Likewise.
4042 * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
4043 * include/debug/list (__gnu_debug::list): Likewise.
4044 * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
4045 Likewise.
4046 * include/debug/vector (__gnu_debug::vector): Likewise.
4047 * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
4048 operator<=> for C++20.
4049 * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
4050 * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
4051 * testsuite/23_containers/list/cmp_c++20.cc: New test.
4052 * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
4053 * testsuite/23_containers/vector/cmp_c++20.cc: New test.
4054
4055 * include/bits/basic_string.h (basic_string): Define operator<=> and
4056 remove redundant comparison operators for C++20.
4057 * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
4058 Add comparison_category members.
4059 (__detail::__char_traits_cmp_cat): New helper to get comparison
4060 category from char traits class.
4061 * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
4062 define for C++20.
4063 (sub_match): Define operator<=> and remove redundant comparison
4064 operators for C++20.
4065 (match_results): Remove redundant operator!= for C++20.
4066 * include/std/string_view (basic_string_view): Define operator<=> and
4067 remove redundant comparison operators for C++20.
4068 * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
4069 test.
4070 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
4071 New test.
4072 * testsuite/21_strings/basic_string_view/operations/copy/char/
4073 constexpr.cc: Initialize variable.
4074 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
4075 constexpr.cc: Likewise.
4076 * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
4077 dg-do directive and remove comments showing incorrect signatures.
4078 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
4079 Likewise.
4080 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
4081 New test.
4082 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
4083 New test.
4084 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
4085
4086 2020-04-16 Jonathan Wakely <jwakely@redhat.com>
4087
4088 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
4089 name of unused parameter.
4090
4091 2020-04-15 Jonathan Wakely <jwakely@redhat.com>
4092
4093 * include/bits/fs_dir.h (file_status): Define operator== for C++20.
4094 (directory_entry): Define operator<=> and remove redundant comparison
4095 operators for C++20.
4096 * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
4097 * include/bits/fs_path.h (path): Define operator<=> and remove
4098 redundant comparison operators for C++20.
4099 * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
4100 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4101 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4102 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4103
4104 * include/bits/allocator.h (operator!=): Do not define for C++20.
4105 * include/bits/locale_classes.h (operator!=): Likewise.
4106 * include/bits/std_function.h (operator==(nullptr_t, const function&))
4107 (operator!=(const function&, nullptr_t))
4108 (operator!=(nullptr_t, const function&)): Likewise.
4109 * include/ext/bitmap_allocator.h (operator!=): Likewise.
4110 * include/ext/debug_allocator.h (operator!=): Likewise.
4111 * include/ext/extptr_allocator.h (operator!=): Likewise.
4112 * include/ext/malloc_allocator.h (operator!=): Likewise.
4113 * include/ext/mt_allocator.h (operator!=): Likewise.
4114 * include/ext/new_allocator.h (operator!=): Likewise.
4115 * include/ext/pool_allocator.h (operator!=): Likewise.
4116 * include/ext/throw_allocator.h (operator!=): Likewise.
4117 * include/std/bitset (bitset::operator!=): Likewise.
4118 * include/std/memory_resource (operator!=): Likewise.
4119 * include/std/scoped_allocator (operator!=): Likewise.
4120
4121 * include/std/typeindex (operator<=>): Define for C++20.
4122 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
4123
4124 2020-04-14 Jonathan Wakely <jwakely@redhat.com>
4125
4126 * libsupc++/compare (compare_three_way): Fix constraint so that
4127 BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
4128 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
4129 New test.
4130
4131 PR libstdc++/94562
4132 * include/bits/shared_ptr.h (operator<=>): Define for C++20.
4133 * include/bits/shared_ptr_base.h (operator<=>): Likewise.
4134 * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
4135 * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
4136 * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
4137 std::less<A*> to be used when comparing std::shared_ptr<A> objects in
4138 C++20.
4139
4140 PR libstdc++/94565
4141 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
4142 * testsuite/18_support/comparisons/categories/94565.cc: New test.
4143
4144 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
4145
4146 * include/std/coroutine: Update coroutines builtin define,
4147 per n4861.
4148
4149 2020-04-09 Jonathan Wakely <jwakely@redhat.com>
4150
4151 * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
4152 (strong_order, weak_order, partial_order): Replace uses of <=> with
4153 compare_three_way function object (LWG 3324).
4154 * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
4155 equality operator so that X satisfies three_way_comparable.
4156 * testsuite/18_support/comparisons/algorithms/strong_order.cc:
4157 Likewise.
4158 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
4159
4160 * include/bits/unique_ptr.h (operator<=>): Define for C++20.
4161 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
4162 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
4163 * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
4164 * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
4165
4166 2020-04-08 Jonathan Wakely <jwakely@redhat.com>
4167
4168 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
4169 Define for C++20.
4170 * include/std/complex (operator==(const T&, const complex<T>&))
4171 (operator!=(const complex<T>&, const complex<T>&))
4172 (operator!=(const complex<T>&, const T&))
4173 (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
4174 * testsuite/26_numerics/slice/compare.cc: New test.
4175
4176 * include/std/charconv (to_chars_result, from_chars_result): Add
4177 defaulted equality comparisons for C++20.
4178 * testsuite/20_util/from_chars/compare.cc: New test.
4179 * testsuite/20_util/to_chars/compare.cc: New test.
4180
4181 2020-04-07 Jonathan Wakely <jwakely@redhat.com>
4182
4183 PR libstdc++/94520
4184 * include/std/charconv (__integer_to_chars_result_type)
4185 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
4186 allow use in C++14.
4187 * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
4188 use of std::string_view with std::string.
4189 * testsuite/20_util/from_chars/2.cc: Likewise.
4190 * testsuite/20_util/to_chars/1.cc: Likewise.
4191 * testsuite/20_util/to_chars/2.cc: Likewise.
4192
4193 2020-04-06 Jonathan Wakely <jwakely@redhat.com>
4194
4195 PR libstdc++/94498
4196 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
4197 usable in constant expressions for C++20.
4198 (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
4199 _GLIBCXX20_CONSTEXPR.
4200 (std::char_traits<char>, std::char_traits<wchar_t>)
4201 (std::char_traits<char8_t>): Make move, copy and assign usable in
4202 constant expressions for C++20.
4203 (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
4204 and copy usable in constant expressions for C++20.
4205 * include/std/string_view (basic_string_view::copy): Add
4206 _GLIBCXX20_CONSTEXPR.
4207 * testsuite/21_strings/basic_string_view/operations/copy/char/
4208 constexpr.cc: New test.
4209 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
4210 constexpr.cc: New test.
4211
4212 2020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
4213
4214 * doc/xml/manual/appendix_contributing.xml: Refer to Git
4215 documentation instead of Subversion. Switch to https.
4216 * doc/html/manual/appendix_contributing.html: Regenerate.
4217
4218 2020-04-03 Jonathan Wakely <jwakely@redhat.com>
4219
4220 PR libstdc++/93960
4221 * include/bits/ptr_traits.h (__to_address): Add special case for debug
4222 iterators, to avoid dereferenceable check.
4223 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
4224 * testsuite/20_util/to_address/debug.cc: New test.
4225
4226 2020-04-01 Andrea Corallo <andrea.corallo@arm.com>
4227
4228 * testsuite/experimental/net/execution_context/use_service.cc:
4229 Require pthread and gthreads.
4230
4231 2020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
4232
4233 * doc/xml/manual/appendix_free.xml: Move "free books" list from
4234 fsf.org to gnu.org.
4235 * doc/html/manual/appendix_free.html: Regenerate.
4236
4237 2020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
4238
4239 Library-side tests for parenthesized aggregate init
4240
4241 PR c++/92878
4242 PR c++/92947
4243
4244 * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
4245 * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
4246 * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
4247 * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
4248 * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
4249 * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
4250 * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
4251 * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
4252 * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
4253 Likewise.
4254 * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
4255 * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
4256 * testsuite/20_util/variant/92878_92947.cc: Likewise.
4257 * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
4258 Likewise.
4259 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
4260 Likewise.
4261 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
4262 Likewise.
4263 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
4264 Likewise.
4265 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
4266 Likewise.
4267 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
4268 Likewise.
4269 * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
4270 * testsuite/23_containers/queue/92878_92947.cc: Likewise.
4271 * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
4272 Likewise.
4273 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
4274 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
4275 Likewise.
4276 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
4277 Likewise.
4278 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
4279 Likewise.
4280 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
4281 Likewise.
4282 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
4283 Likewise.
4284
4285 2020-03-28 Jonathan Wakely <jwakely@redhat.com>
4286
4287 * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
4288 for changes due to parenthesized aggregate-initialization in C++20.
4289 * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
4290 with std::chrono::sys_time in C++20.
4291
4292 * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
4293 to constrain C++20 versions of comparison operators. Fix backwards
4294 logic of relational operators.
4295 (move_iterator): Use requires-clause to constrain comparison operators
4296 in C++20. Do not declare non-standard same-type overloads for C++20.
4297 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
4298 of comparisons and check using greedy_ops type.
4299 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
4300 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
4301 main function from compile-only test.
4302 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
4303
4304 2020-03-27 Jonathan Wakely <jwakely@redhat.com>
4305
4306 * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
4307 * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
4308 C++20 concepts are required.
4309 * include/bits/stl_iterator_base_types.h: Likewise.
4310 * include/std/concepts: Likewise.
4311 * include/std/version: Likewise.
4312 * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
4313 macro.
4314
4315 * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
4316 (reverse_iterator::iterator_category): Define for C++20.
4317 (reverse_iterator): Define comparison operators correctly for C++20.
4318 (__normal_iterator): Add constraints to comparison operators for C++20.
4319 (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
4320 overload for input iterators.
4321 (move_iterator): Add constraints to comparison operators for C++20.
4322 Define operator<=> for C++20.
4323 * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
4324 * testsuite/24_iterators/move_iterator/move_only.cc: New test.
4325 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
4326 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
4327
4328 * include/bits/iterator_concepts.h (__detail::__decay_copy)
4329 (__detail::__member_begin, __detail::__adl_begin): Move here from
4330 <bits/range_access.h>.
4331 (__detail::__ranges_begin, __detail::__range_iter_t): Define.
4332 * bits/range_access.h (__cust_access::__decay_copy)
4333 (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
4334 <bits/iterator_concepts.h>.
4335 (ranges::iterator_t): Use __detail::__range_iter_t.
4336 * include/bits/stl_iterator.h (back_insert_iterator): Simplify
4337 conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
4338 (front_insert_iterator): Likewise.
4339 (insert_iterator): Implement changes from P0896R4 for C++20.
4340 * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
4341 * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
4342 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
4343 for inclusion in synopsis_c++20.cc which expects different signatures
4344 for some function templates.
4345 * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
4346
4347 * include/std/type_traits (__is_array_convertible): Move definition
4348 to immediately after is_convertible.
4349
4350 2020-03-26 Jonathan Wakely <jwakely@redhat.com>
4351
4352 * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
4353 (chrono::months, chrono::sys_days, chrono::local_t)
4354 (chrono::local_time, chrono::local_seconds, chrono::local_days):
4355 Define for C++20.
4356 (chrono::time_point): Add missing static assert.
4357 * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
4358 * testsuite/std/time/clock/file/overview.cc: New test.
4359 * testsuite/std/time/clock/file/members.cc: New test.
4360 * testsuite/std/time/syn_c++20.cc: New test.
4361
4362 2020-03-25 Mike Crowe <mac@mcrowe.com>
4363
4364 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
4365 test.
4366 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
4367 test.
4368
4369 2020-03-25 Jonathan Wakely <jwakely@redhat.com>
4370
4371 * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
4372 * include/std/chrono (filesystem::__file_clock): Here.
4373 (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
4374 Define public member functions for C++20.
4375 (is_clock, is_clock_v): Define traits for C++20.
4376 * include/std/condition_variable (condition_variable::wait_until): Add
4377 check for valid clock.
4378 * include/std/future (_State_baseV2::wait_until): Likewise.
4379 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
4380 * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
4381 Likewise.
4382 * include/std/thread (this_thread::sleep_until): Likewise.
4383 * testsuite/30_threads/condition_variable/members/2.cc: Qualify
4384 slow_clock with new namespace.
4385 * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
4386 test.
4387 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
4388 New test.
4389 * testsuite/30_threads/future/members/clock_neg.cc: New test.
4390 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
4391 Qualify slow_clock with new namespace.
4392 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
4393 clock_neg.cc: New test.
4394 * testsuite/30_threads/shared_future/members/clock_neg.cc: New
4395 test.
4396 * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
4397 * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
4398 New test.
4399 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
4400 slow_clock with new namespace.
4401 * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
4402 * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
4403 test.
4404 * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
4405 * testsuite/std/time/traits/is_clock.cc: New test.
4406 * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
4407 namespace.
4408
4409 2020-03-21 Jonathan Wakely <jwakely@redhat.com>
4410
4411 PR libstdc++/93245
4412 * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
4413 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
4414 Improve test coverage.
4415
4416 PR libstdc++/94242
4417 * include/bits/fs_path.h (path::_S_str_convert): Replace first
4418 parameter with basic_string_view so that strings with different
4419 allocators can be accepted.
4420 (path::generic_string<C,T,A>()): Use basic_string object that uses the
4421 right allocator type.
4422 * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
4423 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
4424 test coverage.
4425
4426 2020-03-18 Jonathan Wakely <jwakely@redhat.com>
4427
4428 PR libstdc++/94033
4429 * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
4430 (__is_nt_default_constructible_impl): Remove.
4431 (__is_nothrow_default_constructible_impl): Remove.
4432 (__is_nt_constructible_impl): Add bool template parameter. Adjust
4433 partial specializations.
4434 (__is_nothrow_constructible_impl): Replace class template with alias
4435 template.
4436 (is_nothrow_default_constructible): Derive from alias template
4437 __is_nothrow_constructible_impl instead of
4438 __is_nothrow_default_constructible_impl.
4439 * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
4440
4441 * include/std/stop_token (stop_token::_Stop_state_ref): Define
4442 comparison operators explicitly if the compiler won't synthesize them.
4443
4444 * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
4445 __cpp_lib_concepts before using iter_reference_t.
4446 * include/bits/stream_iterator.h (istream_iterator): Check
4447 __cpp_lib_concepts before using default_sentinel_t.
4448 * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
4449
4450 PR libstdc++/94203
4451 * include/experimental/executor (executor::executor(Executor)): Call
4452 make_shared directly instead of _M_create. Create _Tgt1 object.
4453 (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
4454 Call allocate_shared directly instead of _M_create. Create _Tgt2
4455 object.
4456 (executor::target_type): Add cast needed for new _Tgt interface.
4457 (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
4458 (executor::_Tgt): Define the same interface whether RTTI is enabled or
4459 not.
4460 (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
4461 std::type_info in the interface.
4462 (executor::_Tgt::_M_func): Add data member.
4463 (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
4464 (executor::_Tgt1::_S_func): Define function to access target without
4465 depending on RTTI.
4466 (executor::_M_create): Remove.
4467 (operator==, operator!=): Simplify comparisons for executor.
4468 * include/experimental/socket (is_error_code_enum<socket_errc>):
4469 Define specialization before use.
4470 * testsuite/experimental/net/executor/1.cc: New test.
4471
4472 2020-03-16 Jonathan Wakely <jwakely@redhat.com>
4473
4474 PR libstdc++/94199
4475 * include/experimental/executor (service_already_exists): Add default
4476 constructor. Declare make_service to be a friend.
4477 * testsuite/experimental/net/execution_context/make_service.cc: New
4478 test.
4479
4480 2020-03-12 Jonathan Wakely <jwakely@redhat.com>
4481
4482 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
4483 a null pointer to functions with nonnull(1) attribute.
4484
4485 2020-03-11 Patrick Palka <ppalka@redhat.com>
4486
4487 * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
4488 'address' -> 'std::__addressof'.
4489 * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
4490 a non-forward input_range.
4491 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
4492 default constructor protected instead of deleted, like with
4493 input_iterator_wrapper.
4494 (test_range::iterator): Add comment explaining that this type is used
4495 only when the underlying wrapper is input_iterator_wrapper or
4496 output_iterator_wrapper. Remove delegating defaulted constructor so
4497 that the inherited default constructor is used instead.
4498
4499 LWG 3286 ranges::size is not required to be valid after a call to
4500 ranges::begin on an input range
4501 * include/std/ranges (subrange::subrange): Split single-argument
4502 constructor into two, one constrained by _S_store_size and another by
4503 !_S_store_size.
4504 (take_view::begin): Call size() before calling ranges::begin(_M_base).
4505 * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
4506 * testsuite/std/ranges/subrange/lwg3286.cc: New test.
4507
4508 2020-03-10 Jonathan Wakely <jwakely@redhat.com>
4509
4510 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
4511 instead of _M_current.
4512 (split_view::_OuterIter::operator++): Likewise.
4513
4514 * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
4515 (transform_view::_Iterator::operator*): Add noexcept-specifier.
4516 (transform_view::_Iterator::iter_move): Inline __iter_move body here.
4517 (split_view::_OuterIter::__current): Add noexcept.
4518 (split_view::_InnerIter::__iter_swap): Remove.
4519 (split_view::_InnerIter::__iter_move): Remove.
4520 (split_view::_InnerIter::_M_i_current): New accessors.
4521 (split_view::_InnerIter::__at_end): Use _M_i_current().
4522 (split_view::_InnerIter::operator*): Likewise.
4523 (split_view::_InnerIter::operator++): Likewise.
4524 (iter_move(const _InnerIter&)): Likewise.
4525 (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
4526 * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
4527 for iter_move and iter_swap on split_view's inner iterator.
4528
4529 PR c++/94117
4530 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
4531 Change expression in noexcept-specifier to match function body.
4532
4533 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
4534 comment explaining multiple dg-do directives.
4535 * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
4536 so test is run as well as compiled.
4537
4538 2020-03-09 Jonathan Wakely <jwakely@redhat.com>
4539
4540 PR libstdc++/94063
4541 * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
4542 handle concatenations that change the type of the first component.
4543 (path::operator+=(basic_string_view<value_type>)): Likewise.
4544 * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
4545
4546 2020-03-06 Patrick Palka <ppalka@redhat.com>
4547
4548 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
4549 join_view::_Sentinel<!_Const>.
4550 * testsuite/std/ranges/adaptors/join.cc: Augment test.
4551
4552 PR libstdc++/93978
4553 * include/bits/range_access.h (__cust_access::_Empty::operator()):
4554 Declare return type to be bool instead of auto.
4555 * testsuite/std/ranges/adaptors/93978.cc: New test.
4556
4557 2020-03-06 Jonathan Wakely <jwakely@redhat.com>
4558
4559 PR libstdc++/94069
4560 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
4561 (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
4562 second argument to __glibcxx_rwlock_init.
4563 * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
4564
4565 PR libstdc++/93244
4566 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
4567 test to not fail due to PR 94063.
4568 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
4569 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
4570
4571 2020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
4572
4573 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
4574 would match ENOSYS.
4575
4576 2020-03-05 Jonathan Wakely <jwakely@redhat.com>
4577
4578 * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
4579 * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
4580 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
4581 * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
4582 for return value, and in comparison.
4583 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
4584
4585 PR libstdc++/94051
4586 * include/std/string_view: Include <bits/ostream_insert.h>.
4587 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
4588
4589 2020-03-04 Jonathan Wakely <jwakely@redhat.com>
4590
4591 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
4592
4593 2020-03-04 Patrick Palka <ppalka@redhat.com>
4594
4595 PR libstdc++/94017
4596 * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
4597 condition for when to use memset, making sure to additionally check that
4598 the output pointer's value type is a non-volatile byte type. Instead of
4599 requiring that the fill type is a byte type, just require that it's an
4600 integral type.
4601 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
4602 New test.
4603 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
4604 New test.
4605 * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
4606 blocked by PR 94017.
4607 * testsuite/25_algorithms/fill/94017.cc: New test.
4608 * testsuite/25_algorithms/fill_n/94017.cc: New test.
4609
4610 LWG 3355 The memory algorithms should support move-only input iterators
4611 introduced by P1207
4612 * include/bits/ranges_uninitialized.h
4613 (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
4614 to copy __ifirst, which could be a move-only input iterator. Use
4615 operator- instead of ranges::distance to compute distance from a sized
4616 sentinel.
4617 (__uninitialized_copy_n_fn::operator()): Likewise.
4618 (__uninitialized_move_fn::operator()): Likewise.
4619 (__uninitialized_move_n_fn::operator()): Likewise.
4620 (__uninitialized_destroy_fn::operator()): Use std::move to avoid
4621 attempting to copy __first.
4622 (__uninitialized_destroy_n_fn::operator()): Likewise.
4623 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
4624 Augment test.
4625 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
4626 Likewise.
4627 * .../specialized_algorithms/uninitialized_move/constrained.cc:
4628 Likewise.
4629
4630 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
4631 protected instead of private.
4632 (test_sized_range_sized_sent): New.
4633
4634 * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
4635 New testsuite iterator.
4636 * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
4637 * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
4638
4639 * include/bits/ranges_uninitialized.h
4640 (uninitialized_copy_fn::operator()): Pass a reference type as the first
4641 argument to is_nothrow_assignable_v.
4642 (uninitialized_copy_fn::operator()): Likewise.
4643 (uninitialized_move_fn::operator()): Likewise. Return an in_out_result
4644 with the input iterator stripped of its move_iterator.
4645 (uninitialized_move_n_fn::operator()): Likewise.
4646 (uninitialized_fill_fn::operator()): Pass a reference type as the first
4647 argument to is_nothrow_assignable_v.
4648 (uninitialized_fill_n_fn::operator()): Likewise.
4649
4650 2020-03-03 Jonathan Wakely <jwakely@redhat.com>
4651
4652 PR libstdc++/94013
4653 * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
4654 traits to control when to use memmove and memcmp optimizations.
4655 (__is_nonvolatile_trivially_copyable): New helper trait.
4656 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
4657 use memcmp optimization with volatile data.
4658 * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
4659 (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
4660 * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
4661 (__copy_move_backward_a2): Likewise.
4662 (__equal_aux1): Use __memcmpable.
4663 (__lexicographical_compare_aux): Do not use memcmp optimization with
4664 volatile data.
4665 * testsuite/25_algorithms/copy/94013.cc: New test.
4666 * testsuite/25_algorithms/copy_backward/94013.cc: New test.
4667 * testsuite/25_algorithms/equal/94013.cc: New test.
4668 * testsuite/25_algorithms/fill/94013.cc: New test.
4669 * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
4670 * testsuite/25_algorithms/move/94013.cc: New test.
4671 * testsuite/25_algorithms/move_backward/94013.cc: New test.
4672
4673 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
4674 Avoid redundant iterator comparisons (LWG 3410).
4675
4676 2020-03-02 Jonathan Wakely <jwakely@redhat.com>
4677
4678 PR libstdc++/93972
4679 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
4680 differ.
4681 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
4682
4683 * include/std/ranges (__detail::__maybe_empty_t): Rename to
4684 __maybe_present_t.
4685 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
4686
4687 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
4688 dependent type.
4689
4690 2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
4691
4692 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
4693
4694 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
4695
4696 * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
4697 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
4698 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
4699 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
4700 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
4701
4702 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
4703 Add libatomic option.
4704 * testsuite/30_threads/jthread/jthread.cc: Likewise.
4705
4706 2020-02-29 François Dumont <fdumont@gcc.gnu.org>
4707
4708 * include/bits/stl_algo.h
4709 (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
4710 * include/bits/stl_algobase.h: ...here.
4711 * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
4712
4713 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
4714
4715 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
4716 option.
4717 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
4718 Likewise.
4719 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
4720 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
4721 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
4722 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
4723 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
4724 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
4725 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
4726 Likewise.
4727
4728 PR libstdc++/92906
4729 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
4730
4731 2020-02-28 Patrick Palka <ppalka@redhat.com>
4732
4733 PR libstdc++/93972
4734 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
4735 Fix condition for when to use memcmp, making it consistent with the
4736 corresponding condition used in std::lexicographical_compare.
4737 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
4738
4739 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
4740 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
4741 existing signatures for C++2a.
4742
4743 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
4744
4745 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
4746 test instead of just compiling it.
4747
4748 2020-02-28 Patrick Palka <ppalka@redhat.com>
4749
4750 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
4751 whenever the underlying range models common_range.
4752
4753 * include/std/ranges (__detail::_CachedPosition): New struct.
4754 (views::filter_view::_S_needs_cached_begin): New member variable.
4755 (views::filter_view::_M_cached_begin): New member variable.
4756 (views::filter_view::begin): Use _M_cached_begin to cache its
4757 result.
4758 (views::drop_view::_S_needs_cached_begin): New static member variable.
4759 (views::drop_view::_M_cached_begin): New member variable.
4760 (views::drop_view::begin): Use _M_cached_begin to cache its result
4761 when _S_needs_cached_begin.
4762 (views::drop_while_view::_M_cached_begin): New member variable.
4763 (views::drop_while_view::begin): Use _M_cached_begin to cache its
4764 result.
4765 (views::reverse_view::_S_needs_cached_begin): New static member
4766 variable.
4767 (views::reverse_view::_M_cached_begin): New member variable.
4768 (views::reverse_view::begin): Use _M_cached_begin to cache its result
4769 when _S_needs_cached_begin.
4770 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
4771 drop_view::begin caches its result.
4772 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
4773 that drop_while_view::begin caches its result.
4774 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
4775 filter_view::begin caches its result.
4776 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
4777 reverse_view::begin caches its result.
4778
4779 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
4780
4781 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
4782 filesystems that silently truncate timestamps.
4783 * testsuite/experimental/filesystem/operations/last_write_time.cc:
4784 Likewise.
4785
4786 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
4787 -Wstringop-overflow warnings.
4788
4789 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
4790
4791 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
4792 -fdiagnostics-urls=never to options.
4793
4794 2020-02-27 Patrick Palka <ppalka@redhat.com>
4795
4796 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
4797 _Iterator<!_Const>.
4798 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
4799 (take_view::_Sentinel<_Const>): Likewise.
4800 (take_while_view::_Sentinel<_Const>): Likewise.
4801 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
4802 * testsuite/std/ranges/adaptors/split.cc: Augment test.
4803 * testsuite/std/ranges/adaptors/take.cc: Augment test.
4804 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
4805 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
4806
4807 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
4808 base() of a vector<>::iterator is a pointer.
4809 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
4810 * testsuite/25_algorithms/move/constrained.cc: Likewise.
4811 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
4812 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
4813 instead of &foo[0].
4814 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
4815 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
4816 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
4817 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
4818 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
4819
4820 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
4821
4822 * include/debug/array (operator<=>): Define for C++20.
4823 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
4824 Adjust dg-error line numbers.
4825 * testsuite/23_containers/array/tuple_interface/
4826 tuple_element_debug_neg.cc: Likewise.
4827
4828 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
4829 defining _GLIBCXX_ASSERTIONS.
4830 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
4831 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
4832 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
4833 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
4834 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
4835 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
4836 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
4837 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
4838 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
4839 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
4840 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
4841 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
4842
4843 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
4844 C++98 where the member function of the base class returns void.
4845
4846 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
4847 equality comparisons that support value-initialized iterators.
4848
4849 * include/bits/boost_concept_check.h (__function_requires): Add
4850 _GLIBCXX14_CONSTEXPR.
4851 * testsuite/25_algorithms/min/concept_checks.cc: New test.
4852
4853 2020-02-26 Patrick Palka <ppalka@redhat.com>
4854
4855 PR libstdc++/93936
4856 * include/std/ranges (split_view::_InnerIter::operator==): Compare
4857 the operands' _M_i rather than their _M_i.current().
4858 * testsuite/std/ranges/adaptors/split.cc: Augment test.
4859
4860 P1645R1 constexpr for <numeric> algorithms
4861 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
4862 partial_sum, adjacent_difference): Make conditionally constexpr for
4863 C++20.
4864 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
4865 test macro.
4866 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
4867 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
4868 constexpr for C++20.
4869 * include/std/version (__cpp_lib_constexpr_numeric): Define.
4870 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
4871 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
4872 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
4873 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
4874 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
4875 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
4876 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
4877 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
4878 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
4879 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
4880 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
4881
4882 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
4883
4884 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
4885 variables in smaller scope and avoid calling ranges::distance when we
4886 know they are pointers. Remove statically-unreachable use of
4887 __builtin_unreachable().
4888 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
4889 Define inline.
4890
4891 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
4892 alias.
4893 (__detail::__maybe_const_t): Likewise.
4894 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
4895 (transform_view, take_view, take_while_view, elements_view): Use
4896 __maybe_const_t.
4897 (join_view, split_view): Use both.
4898
4899 2020-02-25 Patrick Palka <ppalka@redhat.com>
4900
4901 LWG 3397 basic_istream_view::iterator should not provide
4902 iterator_category
4903 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
4904 Rename to ...
4905 (basic_istream_view:_Iterator::iterator_concept): ... this.
4906 * testsuite/std/ranges/istream_view.cc: Augment test.
4907
4908 LWG 3325 Constrain return type of transformation function for
4909 transform_view
4910 * include/std/ranges (transform_view): Constrain the return type of the
4911 transformation function as per LWG 3325.
4912 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
4913
4914 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
4915 * include/std/ranges (join_view::_Iterator::operator--): Require that
4916 range_reference_t<_Base> models common_range.
4917 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
4918
4919 LWG 3301 transform_view::_Iterator has incorrect iterator_category
4920 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
4921 determination of iterator_category as per LWG 3301.
4922 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
4923
4924 LWG 3292 iota_view is under-constrained
4925 * include/std/ranges (iota_view): Require that _Winc models semiregular
4926 as per LWG 3292.
4927 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
4928
4929 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
4930
4931 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
4932 during constant evaluation. Call __builtin_memmove directly instead of
4933 __memmove.
4934 (__copy_or_move_backward): Likewise.
4935 * include/bits/stl_algobase.h (__memmove): Remove.
4936 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
4937 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
4938 Use __builtin_memmove directly instead of __memmove.
4939 (__copy_move_a2): Do not use memmove during constant evaluation.
4940 (__copy_move_backward_a2): Use _IsMove constant to select correct
4941 __copy_move_backward specialization.
4942 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
4943 begin turned into moves during constant evaluation.
4944
4945 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
4946 previous commit.
4947
4948 PR libstdc++/93872
4949 * include/bits/stl_algobase.h (__memmove): Cast away const before
4950 doing move assignment.
4951 * testsuite/25_algorithms/move/93872.cc: New test.
4952 * testsuite/25_algorithms/move_backward/93872.cc: New test.
4953
4954 2020-02-24 Patrick Palka <ppalka@redhat.com>
4955
4956 PR libstdc++/93884
4957 * include/bits/ranges_algobase.h (__copy_or_move,
4958 __copy_or_move_backward): Don't inspect the iter_value_t of the output
4959 iterator, instead inspect its iterator_traits directly.
4960 * include/bits/stl_iterator.h (back_insert_iterator::container):
4961 Conditionally initialize.
4962 (back_insert_iterator::difference_type): Conditionally define.
4963 (back_insert_iterator::back_insert_iterator): Conditionally define this
4964 default constructor.
4965 (front_insert_iterator::container): Conditionally initialize.
4966 (front_insert_iterator::difference_type): Conditionally define.
4967 (front_insert_iterator::front_insert_iterator): Conditionally define
4968 this default constructor.
4969 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
4970 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
4971
4972 P0769R2 Add shift to <algorithm>
4973 * include/bits/ranges_algo.h (shift_left, shift_right): New.
4974 * testsuite/25_algorithms/shift_left/1.cc: New test.
4975 * testsuite/25_algorithms/shift_right/1.cc: New test.
4976
4977 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
4978
4979 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
4980 Make noexcept-specifier conditional.
4981 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
4982 noexcept-specifier.
4983
4984 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
4985 Add constructor.
4986 (operator==(istream_iterator, default_sentinel_t)): Add operator.
4987 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
4988 * include/bits/streambuf_iterator.h
4989 (istreambuf_iterator(default_sentinel_t)): Add constructor.
4990 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
4991 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
4992 New test.
4993 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
4994 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
4995 New test.
4996 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
4997
4998 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
4999 (ranges::enable_view): Simplify (LWG 3326).
5000 * include/bits/range_access.h (ranges::enable_view): Declare.
5001 * include/bits/regex.h (__enable_view_impl): Remove partial
5002 specialization.
5003 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
5004 * include/bits/stl_set.h (__enable_view_impl): Likewise.
5005 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
5006 * include/debug/multiset.h (__enable_view_impl): Likewise.
5007 * include/debug/set.h (__enable_view_impl): Likewise.
5008 * include/debug/unordered_set (__enable_view_impl): Likewise.
5009 * include/experimental/string_view (ranges::enable_view): Define
5010 partial specialization.
5011 * include/std/span (ranges::enable_view): Likewise.
5012 * include/std/string_view (ranges::enable_view): Likewise.
5013 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
5014
5015 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
5016
5017 * include/std/optional (operator<=>(optional<T>, optional<U>))
5018 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
5019 Define for C++20.
5020 * include/std/tuple (__tuple_cmp): New helper function for <=>.
5021 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
5022 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
5023 (operator<=>(monostate, monostate)): Define for C++20.
5024 * testsuite/20_util/optional/relops/three_way.cc: New test.
5025 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
5026 * testsuite/20_util/variant/89851.cc: Move to ...
5027 * testsuite/20_util/variant/relops/89851.cc: ... here.
5028 * testsuite/20_util/variant/90008.cc: Move to ...
5029 * testsuite/20_util/variant/relops/90008.cc: ... here.
5030 * testsuite/20_util/variant/relops/three_way.cc: New test.
5031
5032 2020-02-20 Patrick Palka <ppalka@redhat.com>
5033
5034 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
5035 function.
5036 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
5037 __maybe_refwrap to capture lvalue references by reference, and then use
5038 unwrap_reference_t to forward the by-reference captures as references.
5039 * testsuite/std/ranges/adaptors/split.cc: Augment test.
5040 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
5041
5042 * include/std/ranges (iota_view): Forward declare _Sentinel.
5043 (iota_view::_Iterator): Befriend _Sentinel.
5044 (iota_view::_Sentinel::_M_equal): New member function.
5045 (iota_view::_Sentinel::operator==): Use it.
5046 (views::_Iota::operator()): Forward __f using the correct type.
5047 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
5048 with integers of different signedness, to appease iota_view's deduction
5049 guide.
5050 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
5051
5052 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
5053
5054 * include/bits/range_access.h (ranges::begin): Reject array of
5055 incomplete type.
5056 (ranges::end, ranges::size): Require arrays to be bounded.
5057 (ranges::data): Require lvalue or borrowed_range.
5058 (ranges::iterator_t): Remove constraint.
5059 * testsuite/std/ranges/access/begin.cc: Do not check array of
5060 incomplete type.
5061 * testsuite/std/ranges/access/begin_neg.cc: New test.
5062 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
5063 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
5064 * testsuite/std/ranges/access/ssize.cc: Do not check array of
5065 incomplete type.
5066
5067 * include/std/system_error (error_category::operator<=>)
5068 (operator<=>(const error_code&, const error_code&))
5069 (operator<=>(const error_condition&, const error_condition&)): Define
5070 for C++20.
5071 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
5072 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
5073 test.
5074 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
5075 incorrect comment.
5076 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
5077 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
5078 incorrect comment.
5079 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
5080 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
5081 incorrect comment.
5082 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
5083 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
5084 Remove incorrect comment.
5085 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
5086 test.
5087
5088 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
5089
5090 * include/std/thread (thread::id::operator<=>): Define for C++20.
5091 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
5092 functions in namespace std.
5093 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
5094
5095 2020-02-19 Patrick Palka <ppalka@redhat.com>
5096
5097 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
5098 null terminator of the underlying string as part of the test_range.
5099 (main): Call test03.
5100
5101 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
5102
5103 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
5104 requirement (LWG 3385).
5105 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
5106 expected declaration.
5107
5108 * include/std/ranges (take_while_view, drop_view, drop_while_view)
5109 (elements_view:_Iterator): Initialize data members (LWG 3364).
5110
5111 * libsupc++/compare (three_way_comparable): Remove always-false check
5112 that should have been removed with weak_equality (P1959R0).
5113 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
5114
5115 * include/std/concepts (__detail::__partially_ordered_with): Move here
5116 from <compare>.
5117 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
5118 to simplify definition (LWG 3331).
5119 * libsupc++/compare (__detail::__partially_ordered_with): Move to
5120 <concepts>.
5121
5122 * include/std/concepts (totally_ordered_with): Remove redundant
5123 requirement (LWG 3329).
5124
5125 * include/std/ranges (__detail::__convertible_to_non_slicing): New
5126 helper concept.
5127 (__detail::__pair_like_convertible_to): Remove.
5128 (__detail::__pair_like_convertible_from): Add requirements for
5129 non-slicing conversions.
5130 (subrange): Constrain constructors with __convertible_to_non_slicing.
5131 Remove constructors from pair-like types. Add new deduction guide.
5132 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
5133
5134 * include/bits/iterator_concepts.h (iter_move): Add declaration to
5135 prevent unqualified lookup finding a suitable declaration (LWG 3247).
5136
5137 * include/std/memory_resource (polymorphic_allocator::allocate)
5138 (polymorphic_allocator::allocate_object): Change type of exception to
5139 bad_array_new_length (LWG 3237).
5140 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
5141
5142 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
5143 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
5144 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
5145 * testsuite/20_util/unwrap_reference/3.cc: New test.
5146
5147 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
5148 type during overload resolution, use static assert instead (LWG 3200).
5149 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
5150 incomplete type.
5151 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
5152
5153 * include/std/span (span(T (&)[N])): Use non-deduced context to
5154 prevent first parameter from interfering with class template argument
5155 deduction (LWG 3369).
5156 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
5157 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
5158 rvalues.
5159
5160 * include/std/span (span::const_iterator, span::const_reverse_iterator)
5161 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
5162 Remove (LWG 3320).
5163 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
5164 and cend.
5165 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
5166 Likewise.
5167 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
5168 constrained.cc: Likewise.
5169 * testsuite/20_util/specialized_algorithms/
5170 uninitialized_default_construct/constrained.cc: Likewise.
5171 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
5172 constrained.cc: Likewise.
5173 * testsuite/20_util/specialized_algorithms/uninitialized_move/
5174 constrained.cc: Likewise.
5175 * testsuite/20_util/specialized_algorithms/
5176 uninitialized_value_construct/constrained.cc: Likewise.
5177
5178 * include/bits/range_access.h (range_size_t): Define alias template.
5179 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
5180 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
5181
5182 * include/std/ranges (filter_view, transform_view, take_view)
5183 (join_view, split_view, reverse_view): Remove commented-out converting
5184 constructors (LWG 3280).
5185
5186 * include/std/memory (uninitialized_construct_using_allocator): Use
5187 std::construct_at (LWG 3321).
5188
5189 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
5190 (polymorphic_allocator::allocate_object)
5191 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
5192
5193 LWG 3379. "safe" in several library names is misleading
5194 * include/bits/range_access.h (enable_safe_range): Rename to
5195 enable_borrowed_range.
5196 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
5197 (safe_range): Rename to borrowed_range.
5198 * include/bits/ranges_algo.h: Adjust to use new names.
5199 * include/bits/ranges_algobase.h: Likewise.
5200 * include/bits/ranges_uninitialized.h: Likewise.
5201 * include/std/ranges: Likewise.
5202 (safe_iterator_t): Rename to borrowed_iterator_t.
5203 (safe_subrange_t): Rename to borrowed_subrange_t.
5204 * include/std/span: Adjust to use new names.
5205 * include/std/string_view: Likewise.
5206 * include/experimental/string_view: Likewise.
5207 * testsuite/std/ranges/access/begin.cc: Likewise.
5208 * testsuite/std/ranges/access/cbegin.cc: Likewise.
5209 * testsuite/std/ranges/access/cdata.cc: Likewise.
5210 * testsuite/std/ranges/access/cend.cc: Likewise.
5211 * testsuite/std/ranges/access/crbegin.cc: Likewise.
5212 * testsuite/std/ranges/access/crend.cc: Likewise.
5213 * testsuite/std/ranges/access/data.cc: Likewise.
5214 * testsuite/std/ranges/access/end.cc: Likewise.
5215 * testsuite/std/ranges/access/rbegin.cc: Likewise.
5216 * testsuite/std/ranges/access/rend.cc: Likewise.
5217 * testsuite/std/ranges/safe_range.cc: Likewise.
5218 * testsuite/std/ranges/safe_range_types.cc: Likewise.
5219 * testsuite/util/testsuite_iterators.h: Likewise.
5220
5221 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
5222 (tuple_element<1, const subrange<I, S, K>>): Add partial
5223 specializations (LWG 3398).
5224 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
5225
5226 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
5227 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
5228 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
5229
5230 2020-02-18 Patrick Palka <ppalka@redhat.com>
5231
5232 P1983R0 Wording for GB301, US296, US292, US291, and US283
5233 * include/std/ranges (filter_view::pred): New member function.
5234 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
5235 P1983R0 fixes the highlighted issue in the same way.
5236 (join_view::_Iterator<_Const>): Add friend
5237 join_view::_Iterator<!_Const>.
5238 (join_view::_M_inner): Remove mutable specifier, effectively reverting
5239 the proposed wording changes of P3278.
5240 (join_view::begin): Refine the condition for when to return a const
5241 iterator.
5242 (split_view::_OuterIter::_OuterIter): Adjust constraints.
5243 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
5244 exists and works.
5245
5246 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
5247
5248 PR libstdc++/93818
5249 * include/std/ranges (_RangeAdaptor): Add deduction guide.
5250 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
5251 iterator_t<_Vp>.
5252 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
5253 (transform_view::_Iterator): Add alias _Base_iter and use in place of
5254 iterator_t<_Base>.
5255 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
5256 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
5257 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
5258 (split_view::_InnerIter::_S_iter_cat()): Likewise.
5259
5260 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
5261 assumption that long is wider than int.
5262 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
5263 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
5264 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
5265 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
5266
5267 P1976R2 Fixed-size span construction from dynamic range
5268 * include/std/span (__cpp_lib_span): Update value.
5269 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
5270 assertion.
5271 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
5272 constraints.
5273 (span::first<Count>(), span::last<Count>()): Use explicit type in
5274 return statement.
5275 (as_bytes, as_writable_bytes): Likewise.
5276 * include/std/version (__cpp_lib_span): Update value.
5277 * testsuite/23_containers/span/1.cc: Check new value.
5278 * testsuite/23_containers/span/2.cc: Check new value.
5279 * testsuite/23_containers/span/explicit.cc: New test.
5280
5281 * include/std/span (span::__is_compatible_array): Simplify alias
5282 template by using requires-clause.
5283 (span::__is_compatible_ref): New alias template for constraining
5284 constructors.
5285 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
5286 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
5287 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
5288 redundant parentheses.
5289 (span(R&&)): Add missing constraints.
5290
5291 * include/std/span (span): Reorder members and rename template
5292 parameters to match declarations in the C++2a working paper.
5293
5294 P2116R0 Remove tuple-like protocol support from fixed-extent span
5295 * include/std/span (get, tuple_size, tuple_element): Remove.
5296 * testsuite/23_containers/span/everything.cc: Remove checks for
5297 tuple-like API.
5298 * testsuite/23_containers/span/get_neg.cc: Remove.
5299 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
5300 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
5301 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
5302
5303 2020-02-17 Patrick Palka <ppalka@redhat.com>
5304
5305 P2106R0 Alternative wording for GB315 and GB316
5306 * include/bits/ranges_algo.h (in_fun_result): New.
5307 (for_each_result, for_each_n_result): Change into an alias of
5308 in_fun_result.
5309 (in_in_result): New.
5310 (mismatch_result): Change into an alias of in_in_result.
5311 (copy_if_result): Change into an alias of in_out_result.
5312 (swap_ranges_result): Change into an alias of in_in_result.
5313 (unary_transform_result): Change into an alias of in_out_result.
5314 (in_in_out_result): New.
5315 (binary_transform_result): Change into an alias of in_in_out_result.
5316 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
5317 remove_copy_result, unique_copy_result, reverse_copy_result,
5318 rotate_copy_result, partial_sort_copy_result): Change into an alias of
5319 in_out_result.
5320 (in_out_out_result): New.
5321 (partition_copy_result, merge_result): Change into an alias of
5322 in_out_out_result.
5323 (set_union_result, set_intersection_result): Change into an alias of
5324 in_in_out_result.
5325 (set_difference_result): Change into an alias of in_out_result.
5326 (set_symmetric_difference): Change into an alias of in_in_out_result.
5327 (min_max_result): New.
5328 (minmax_result, minmax_element_result): Change into an alias of
5329 min_max_result.
5330 (in_found_result): New.
5331 (next_permutation_result, prev_permutation_result): Change into an alias
5332 of in_found_result.
5333 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
5334 Adjust following changes to next_permutation_result and
5335 prev_permutation_result.
5336 * include/bits/ranges_algobase.h (in_out_result): New.
5337 (copy_result, move_result, move_backward_result, copy_backward_result,
5338 copy_n_result): Change into an alias of in_out_result.
5339 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
5340 uninitialized_copy_n_result, uninitialized_move_result,
5341 uninitialized_move_n_result): Likewise.
5342 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
5343 structured bindings.
5344 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
5345
5346 P1243R4 Rangify new algorithms
5347 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
5348 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
5349 * testsuite/25_algorithms/clamp/constrained.cc: New test.
5350 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
5351 * testsuite/25_algorithms/sample/constrained.cc: New test.
5352
5353 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
5354
5355 P1964R2 Wording for boolean-testable
5356 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
5357 (__adjacent_find_fn): Cast result of predicate to bool.
5358 * include/std/concepts (__boolean): Remove.
5359 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
5360 new helper concepts.
5361 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
5362 (predicate): Use __boolean_testable instead of boolean.
5363 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
5364 Likewise.
5365
5366 P1970R2 Consistency for size() functions: Add ranges::ssize
5367 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
5368 * testsuite/std/ranges/access/ssize.cc: New test.
5369
5370 P1956R1 On the names of low-level bit manipulation functions
5371 * include/bits/hashtable_policy.h: Update comment.
5372 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
5373 (ispow2, ceil2, floor2, log2p1): Likewise.
5374 (__cpp_lib_int_pow2): Add feature test macro.
5375 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
5376 * include/std/memory (assume_aligned): Adjust use of ispow2.
5377 * include/std/version (__cpp_lib_int_pow2): Add.
5378 * libsupc++/new_opa.cc: Adjust use of __ispow2.
5379 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
5380 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
5381 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
5382 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
5383 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
5384 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
5385 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
5386 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
5387 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
5388 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
5389 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
5390 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
5391
5392 * include/std/charconv: Add comment.
5393
5394 PR libstdc++/92546 (partial)
5395 * include/bits/random.h (uniform_random_bit_generator): Move definition
5396 to <bits/uniform_int_dist.h>.
5397 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
5398 of <bits/random.h>.
5399 * include/bits/ranges_algobase.h: Do not include <cmath>.
5400 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
5401 Move here.
5402 * include/std/ranges: Do not include <limits>.
5403 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
5404
5405 PR libstdc++/92546 (partial)
5406 * include/Makefile.am: Add new header.
5407 * include/Makefile.in: Regenerate.
5408 * include/bits/int_limits.h: New header.
5409 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
5410 numeric_limits with __detail::__int_limits.
5411 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
5412 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
5413 Likewise.
5414 * include/std/charconv (__to_chars_8, __from_chars_binary)
5415 (__from_chars_alpha_to_num, from_chars): Likewise.
5416 * include/std/memory_resource (polymorphic_allocator::allocate)
5417 (polymorphic_allocator::allocate_object): Likewise.
5418 * include/std/string_view (basic_string_view::_S_compare): Likewise.
5419 * include/std/utility (in_range): Likewise.
5420 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
5421 extra error about incomplete type __int_limits<bool>.
5422 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
5423 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
5424 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
5425 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
5426 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
5427 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
5428 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
5429 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
5430 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
5431 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
5432 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
5433 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
5434
5435 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
5436 value for partial_ordering::unordered.
5437
5438 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
5439 const-qualified expression variations.
5440 * include/std/concepts (copyable): Likewise.
5441
5442 * include/std/type_traits (__is_standard_integer): New helper trait.
5443 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
5444 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
5445 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
5446 * testsuite/20_util/integer_comparisons/1.cc: New test.
5447 * testsuite/20_util/integer_comparisons/2.cc: New test.
5448 * testsuite/20_util/integer_comparisons/equal.cc: New test.
5449 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
5450 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
5451 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
5452 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
5453 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
5454 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
5455 * testsuite/20_util/integer_comparisons/less.cc: New test.
5456 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
5457 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
5458 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
5459 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
5460 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
5461
5462 2020-02-16 Patrick Palka <ppalka@redhat.com>
5463
5464 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
5465 Move code after an early exit constexpr if to under an else branch.
5466 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
5467
5468 2020-02-15 Patrick Palka <ppalka@redhat.com>
5469
5470 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
5471 * include/bits/ranges_algobase.h: Likewise.
5472 * include/bits/ranges_uninitialized.h: Likewise.
5473
5474 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
5475 binary_search, copy_if, count, count_if, equal_range, find, find_end,
5476 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
5477 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
5478 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
5479 lower_bound, make_heap, max, max_element, merge, min, min_element,
5480 minmax, minmax_element, mismatch, next_permutation, none_of,
5481 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
5482 partition_point, pop_heap, prev_permutation, push_heap, remove,
5483 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
5484 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
5485 search, search_n, set_difference, set_intersection,
5486 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
5487 stable_partition, stable_sort, swap_ranges, transform, unique,
5488 unique_copy, upper_bound): Convert into function objects.
5489 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
5490 fill, move_backward, copy_backward): Likewise.
5491 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
5492 uninitialized_default_construct_n, uninitialized_value_construct,
5493 uninitialized_value_construct_n, uninitialized_copy,
5494 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
5495 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
5496 destroy, destroy_n): Likewise.
5497
5498 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
5499 (ranges::find_end): ... here.
5500 (ranges::__lexicographical_compare): Fold into ...
5501 (ranges::lexicographical_compare): ... here.
5502 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
5503 (ranges::equal): ... here.
5504
5505 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
5506
5507 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
5508 * include/std/deque: Likewise.
5509 * include/std/forward_list: Likewise.
5510 * include/std/list: Likewise.
5511 * include/std/string: Likewise.
5512 * include/std/vector: Likewise.
5513 * include/std/version: Likewise.
5514 * testsuite/23_containers/deque/erasure.cc: Test for new value.
5515 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
5516 * testsuite/23_containers/list/erasure.cc: Likewise.
5517 * testsuite/23_containers/map/erasure.cc: Likewise.
5518 * testsuite/23_containers/set/erasure.cc: Likewise.
5519 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
5520 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
5521 * testsuite/23_containers/vector/erasure.cc: Likewise.
5522
5523 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
5524
5525 * include/bits/random.h (uniform_random_bit_generator): Require min()
5526 and max() to be constant expressions and min() to be less than max().
5527 * testsuite/26_numerics/random/concept.cc: Check additional cases.
5528 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
5529
5530 2020-02-13 Patrick Palka <ppalka@redhat.com>
5531
5532 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
5533 * include/Makefile.in: Regenerate.
5534 * include/bits/ranges_uninitialized.h: New header.
5535 * include/std/memory: Include it.
5536 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
5537 test.
5538 * .../uninitialized_copy/constrained.cc: New test.
5539 * .../uninitialized_default_construct/constrained.cc: New test.
5540 * .../uninitialized_fill/constrained.cc: New test.
5541 * .../uninitialized_move/constrained.cc: New test.
5542 * .../uninitialized_value_construct/constrained.cc: New test.
5543
5544 * include/Makefile.am: Add bits/ranges_algobase.h
5545 * include/Makefile.in: Regenerate.
5546 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
5547 existing #includes.
5548 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
5549 __detail::__is_move_iterator, copy_result, move_result,
5550 __equal, equal, copy_result, move_result, move_backward_result,
5551 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
5552 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
5553 fill): Split out into ...
5554 * bits/range_algobase.h: ... this new header.
5555
5556 2020-02-12 Patrick Palka <ppalka@redhat.com>
5557
5558 LWG 3389 and LWG 3390
5559 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
5560 constructing the move_iterator with __i.
5561 (counted_iterator::counted_iterator): Use std::move when initializing
5562 M_current with __i.
5563 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
5564 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
5565
5566 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
5567
5568 PR libstdc++/79193
5569 PR libstdc++/88999
5570
5571 * configure: Regenerated.
5572
5573 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
5574
5575 * include/bits/hashtable.h
5576 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
5577 missing std namespace qualification to forward call.
5578
5579 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
5580
5581 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
5582 comment.
5583 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
5584
5585 * include/std/ranges: Fix non-ASCII characters in comment.
5586
5587 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
5588 equality comparison to be valid and return bool.
5589 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
5590 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
5591 type with ambiguous conversion to fundamental types.
5592 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
5593
5594 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
5595
5596 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
5597 Use remove_cvref_t.
5598 (readable_traits): Rename to indirectly_readable_traits.
5599 (readable): Rename to indirectly_readable.
5600 (writable): Rename to indirectly_writable.
5601 (__detail::__iter_exchange_move): Do not use remove_reference_t.
5602 (indirectly_swappable): Adjust requires expression parameter types.
5603 expression.
5604 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
5605 (ranges::replace_if, ranges::generate_n, ranges::generate)
5606 (ranges::remove): Use new name for writable.
5607 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
5608 Use new name for readable.
5609 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
5610 new name for readable_traits.
5611 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
5612 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
5613 new definition of indirectly_readable.
5614
5615 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
5616 to take parameters of common_iterator, instead of the common_iterator
5617 type itself. Fix argument for __common_iter_has_arrow constraint.
5618 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
5619
5620 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
5621
5622 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
5623 warning.
5624 (basic_istream_view::_Iterator::operator++()): Add missing return.
5625
5626 2020-02-07 Patrick Palka <ppalka@redhat.com>
5627
5628 * include/bits/ranges_algo.h: Remove extraneous &&.
5629
5630 * include/std/ranges (ranges::__detail::__stream_extractable,
5631 ranges::basic_istream_view, ranges::istream_view): Define.
5632 * testsuite/std/ranges/istream_view: New test.
5633
5634 Implement C++20 range adaptors
5635 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
5636 (subrange::_S_store_size): Mark as const instead of constexpr to
5637 avoid what seems to be a bug in GCC.
5638 (__detail::__box): Give it defaulted copy and move constructors.
5639 (ranges::views::_Single::operator()): Mark constexpr.
5640 (ranges::views::_Iota::operator()): Mark constexpr.
5641 (__detail::Empty): Define.
5642 (ranges::views::__closure::_RangeAdaptor,
5643 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
5644 ranges::views::all, ranges::__detail::find_if,
5645 ranges::__detail::find_if_not, ranges::__detail::mismatch,
5646 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
5647 ranges::views::transform, take_view, ranges::views::take,
5648 take_while_view, ranges::views::take_while, drop_view,
5649 ranges::views::drop, join_view, ranges::views::join,
5650 __detail::require_constant, __detail::tiny_range, split_view,
5651 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
5652 common_view, ranges::views::common, reverse_view,
5653 ranges::views::reverse,
5654 ranges::views::__detail::__is_reversible_subrange,
5655 ranges::views::__detail::__is_reverse_view, reverse_view,
5656 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
5657 ranges::views::elements, ranges::views::keys, ranges::views::values):
5658 Define.
5659 (views): Alias for ranges::views.
5660 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
5661 tuple_element<1, ranges::subrange>): New partial specializations.
5662 * testsuite/std/ranges/adaptors/all.cc: New test.
5663 * testsuite/std/ranges/adaptors/common.cc: Likewise.
5664 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
5665 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
5666 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
5667 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
5668 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
5669 * testsuite/std/ranges/adaptors/join.cc: Likewise.
5670 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
5671 * testsuite/std/ranges/adaptors/split.cc: Likewise.
5672 * testsuite/std/ranges/adaptors/take.cc: Likewise.
5673 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
5674 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
5675
5676 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
5677
5678 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
5679 type of enumerations and comparison category types.
5680 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
5681 (__cmp_cat::_Ncmp::unordered): Change value to 2.
5682 (partial_ordering::_M_value, weak_ordering::_M_value)
5683 (strong_ordering::_M_value): Change type to __cmp_cat::type.
5684 (partial_ordering::_M_is_ordered): Remove data member.
5685 (partial_ordering): Use second bit of _M_value for unordered. Adjust
5686 comparison operators.
5687 (weak_ordering::operator partial_ordering): Simplify to remove
5688 branches.
5689 (operator<=>(unspecified, weak_ordering)): Likewise.
5690 (strong_ordering::operator partial_ordering): Likewise.
5691 (strong_ordering::operator weak_ordering): Likewise.
5692 (operator<=>(unspecified, strong_ordering)): Likewise.
5693 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
5694 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
5695 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
5696
5697 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
5698 __cpp_lib_three_way_comparison macro and use deduced return type for
5699 operator<=>.
5700 * testsuite/std/ranges/iota/iterator.cc: New test.
5701
5702 2020-02-07 Patrick Palka <ppalka@redhat.com>
5703 Jonathan Wakely <jwakely@redhat.com>
5704
5705 Implement C++20 constrained algorithms
5706 * include/Makefile.am: Add new header.
5707 * include/Makefile.in: Regenerate.
5708 * include/std/algorithm: Include <bits/ranges_algo.h>.
5709 * include/bits/ranges_algo.h: New file.
5710 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
5711 * testsuite/25_algorithms/all_of/constrained.cc: New test.
5712 * testsuite/25_algorithms/any_of/constrained.cc: New test.
5713 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
5714 * testsuite/25_algorithms/copy/constrained.cc: New test.
5715 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
5716 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
5717 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
5718 * testsuite/25_algorithms/count/constrained.cc: New test.
5719 * testsuite/25_algorithms/count_if/constrained.cc: New test.
5720 * testsuite/25_algorithms/equal/constrained.cc: New test.
5721 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
5722 * testsuite/25_algorithms/fill/constrained.cc: New test.
5723 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
5724 * testsuite/25_algorithms/find/constrained.cc: New test.
5725 * testsuite/25_algorithms/find_end/constrained.cc: New test.
5726 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
5727 * testsuite/25_algorithms/find_if/constrained.cc: New test.
5728 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
5729 * testsuite/25_algorithms/for_each/constrained.cc: New test.
5730 * testsuite/25_algorithms/generate/constrained.cc: New test.
5731 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
5732 * testsuite/25_algorithms/heap/constrained.cc: New test.
5733 * testsuite/25_algorithms/includes/constrained.cc: New test.
5734 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
5735 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
5736 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
5737 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
5738 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
5739 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
5740 test.
5741 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
5742 * testsuite/25_algorithms/max/constrained.cc: New test.
5743 * testsuite/25_algorithms/max_element/constrained.cc: New test.
5744 * testsuite/25_algorithms/merge/constrained.cc: New test.
5745 * testsuite/25_algorithms/min/constrained.cc: New test.
5746 * testsuite/25_algorithms/min_element/constrained.cc: New test.
5747 * testsuite/25_algorithms/minmax/constrained.cc: New test.
5748 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
5749 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
5750 * testsuite/25_algorithms/move/constrained.cc: New test.
5751 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
5752 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
5753 * testsuite/25_algorithms/none_of/constrained.cc: New test.
5754 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
5755 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
5756 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
5757 * testsuite/25_algorithms/partition/constrained.cc: New test.
5758 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
5759 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
5760 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
5761 * testsuite/25_algorithms/remove/constrained.cc: New test.
5762 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
5763 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
5764 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
5765 * testsuite/25_algorithms/replace/constrained.cc: New test.
5766 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
5767 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
5768 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
5769 * testsuite/25_algorithms/reverse/constrained.cc: New test.
5770 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
5771 * testsuite/25_algorithms/rotate/constrained.cc: New test.
5772 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
5773 * testsuite/25_algorithms/search/constrained.cc: New test.
5774 * testsuite/25_algorithms/search_n/constrained.cc: New test.
5775 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
5776 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
5777 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
5778 test.
5779 * testsuite/25_algorithms/set_union/constrained.cc: New test.
5780 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
5781 * testsuite/25_algorithms/sort/constrained.cc: New test.
5782 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
5783 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
5784 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
5785 * testsuite/25_algorithms/transform/constrained.cc: New test.
5786 * testsuite/25_algorithms/unique/constrained.cc: New test.
5787 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
5788 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
5789
5790 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
5791
5792 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
5793 number in comment. Fix indentation.
5794
5795 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
5796 redundant _GLIBCXX20_CONSTEXPR.
5797
5798 * include/std/ranges (viewable_range): Replace decay_t with
5799 remove_cvref_t (LWG 3375).
5800
5801 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
5802
5803 * include/bits/iterator_concepts.h (iter_reference_t)
5804 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
5805 Remove workarounds for PR c++/67704.
5806 * testsuite/24_iterators/aliases.cc: New test.
5807
5808 2020-02-05 Patrick Palka <ppalka@redhat.com>
5809
5810 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
5811 when initializing _M_current.
5812 (move_iterator::base): Split into two overloads differing in
5813 ref-qualifiers as in P1207R4 for C++20.
5814
5815 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
5816
5817 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
5818 use.
5819
5820 PR libstdc++/93562
5821 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
5822 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
5823 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
5824
5825 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
5826
5827 * configure: Regenerate.
5828
5829 2020-01-31 Patrick Palka <ppalka@redhat.com>
5830
5831 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
5832 test_range::end() returns the same type as test_range::begin().
5833 * testsuite/24_iterators/range_operations/next.cc: Likewise.
5834 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
5835 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
5836 Always return a sentinel<I>.
5837
5838 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
5839
5840 PR libstdc++/92895
5841 * include/std/stop_token (stop_token::stop_possible()): Call new
5842 _M_stop_possible() function.
5843 (stop_token::stop_requested()): Do not use stop_possible().
5844 (stop_token::binary_semaphore): New class, as temporary stand-in for
5845 std::binary_semaphore.
5846 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
5847 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
5848 New data members for symchronization with stop_callback destruction.
5849 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
5850 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
5851 Remove.
5852 (stop_token::_Stop_cb::_M_run): New member function.
5853 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
5854 Remove.
5855 (stop_token::_Stop_state::_M_owners): New data member to track
5856 reference count for ownership.
5857 (stop_token::_Stop_state::_M_value): New data member combining a
5858 spinlock, the stop requested flag, and the reference count for
5859 associated stop_source objects.
5860 (stop_token::_Stop_state::_M_requester): New data member for
5861 synchronization with stop_callback destruction.
5862 (stop_token::_Stop_state::_M_stop_possible()): New member function.
5863 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
5864 of _M_value.
5865 (stop_token::_Stop_state::_M_add_owner)
5866 (stop_token::_Stop_state::_M_release_ownership)
5867 (stop_token::_Stop_state::_M_add_ssrc)
5868 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
5869 updating reference counts.
5870 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
5871 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
5872 (stop_token::_Stop_state::_M_try_lock)
5873 (stop_token::_Stop_state::_M_try_lock_and_stop)
5874 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
5875 managing spinlock.
5876 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
5877 read and update state. Release lock while running callbacks. Use new
5878 data members to synchronize with callback destruction.
5879 (stop_token::_Stop_state::_M_remove_callback): Likewise.
5880 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
5881 to read and update state.
5882 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
5883 replacing shared_ptr.
5884 (stop_source::stop_source(const stop_source&)): Update reference count.
5885 (stop_source::operator=(const stop_source&)): Likewise.
5886 (stop_source::~stop_source()): Likewise.
5887 (stop_source::stop_source(stop_source&&)): Define as defaulted.
5888 (stop_source::operator=(stop_source&&)): Establish postcondition on
5889 parameter.
5890 (stop_callback): Enforce preconditions on template parameter. Replace
5891 base class with data member of new _Cb_impl type.
5892 (stop_callback::stop_callback(const stop_token&, Cb&&))
5893 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
5894 (stop_callback::_Cb_impl): New type wrapping _Callback member and
5895 defining the _S_execute member function.
5896 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
5897 test.
5898 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
5899 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
5900 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
5901 New test.
5902 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
5903 test.
5904 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
5905 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
5906 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
5907 test.
5908
5909 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
5910 three_way_comparable_with.
5911 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
5912 (compare_three_way::operator()): Remove redundant constraint from
5913 requires-clause.
5914 (__detail::_Synth3way::operator()): Use three_way_comparable_with
5915 instead of workaround.
5916 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
5917 output due to simplified constraints on compare_three_way::operator().
5918
5919 PR libstdc++/93479
5920 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
5921 * testsuite/18_support/comparisons/object/93479.cc: New test.
5922
5923 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
5924 returns the same type as test_range::begin(). Add comments.
5925 * testsuite/std/ranges/access/rbegin.cc: Likewise.
5926 * testsuite/std/ranges/access/rend.cc: Likewise.
5927 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
5928 test_range is the same as its iterator type.
5929 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
5930 operator- overloads to satisfy sized_sentinel_for when the iterator
5931 satisfies random_access_iterator.
5932
5933 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
5934
5935 PR libstdc++/93470
5936 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
5937 static assertion to object types.
5938
5939 PR libstdc++/93325
5940 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
5941 clock_gettime instead of explicit glibc version check.
5942 * configure: Regenerate.
5943
5944 2020-01-28 Martin Liska <mliska@suse.cz>
5945
5946 PR libstdc++/93478
5947 * include/std/atomic: Fix typo.
5948 * include/std/optional: Likewise.
5949
5950 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
5951
5952 * configure: Regenerate.
5953
5954 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
5955
5956 PR libstdc++/93426
5957 * include/std/span (span): Fix deduction guide.
5958 * testsuite/23_containers/span/deduction.cc: New test.
5959
5960 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
5961
5962 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
5963 (__cmp_cat::_Ord::equivalent): Add enumerator.
5964 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
5965 and greater.
5966 (partial_ordering, weak_ordering, strong_ordering): Remove
5967 constructors taking __cmp_cat::_Eq parameters. Use renamed
5968 enumerators.
5969
5970 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
5971
5972 * acinclude.m4: Handle `--with-toolexeclibdir='.
5973 * Makefile.in: Regenerate.
5974 * aclocal.m4: Regenerate.
5975 * configure: Regenerate.
5976 * doc/Makefile.in: Regenerate.
5977 * include/Makefile.in: Regenerate.
5978 * libsupc++/Makefile.in: Regenerate.
5979 * po/Makefile.in: Regenerate.
5980 * python/Makefile.in: Regenerate.
5981 * src/Makefile.in: Regenerate.
5982 * src/c++11/Makefile.in: Regenerate.
5983 * src/c++17/Makefile.in: Regenerate.
5984 * src/c++98/Makefile.in: Regenerate.
5985 * src/filesystem/Makefile.in: Regenerate.
5986 * testsuite/Makefile.in: Regenerate.
5987
5988 2020-01-23 Alexandre Oliva <oliva@adacore.com>
5989
5990 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
5991 * configure: Rebuild.
5992
5993 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
5994
5995 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
5996
5997 PR libstdc++/91947
5998 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
5999 rule.
6000 * include/Makefile.in: Regenerate.
6001
6002 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
6003
6004 * doc/xml/faq.xml: Fix grammar.
6005 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
6006 * doc/xml/manual/spine.xml: Update copyright years.
6007 * doc/html/*: Regenerate.
6008
6009 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
6010
6011 * doc/xml/faq.xml: Update for SVN -> Git transition.
6012 * doc/xml/manual/appendix_contributing.xml: Likewise.
6013 * doc/xml/manual/status_cxx1998.xml: Likewise.
6014 * doc/xml/manual/status_cxx2011.xml: Likewise.
6015 * doc/xml/manual/status_cxx2014.xml: Likewise.
6016 * doc/xml/manual/status_cxx2017.xml: Likewise.
6017 * doc/xml/manual/status_cxx2020.xml: Likewise.
6018 * doc/xml/manual/status_cxxtr1.xml: Likewise.
6019 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
6020
6021 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
6022
6023 * include/Makefile.am: Add coroutine to the std set.
6024 * include/Makefile.in: Regenerated.
6025 * include/std/coroutine: New file.
6026
6027 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
6028
6029 PR libstdc++/92376
6030 * include/bits/c++config: Only do PSTL config when the header is
6031 present, to fix freestanding.
6032 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
6033 functions if they were detected by configure.
6034
6035 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
6036 Matthew Bauer <mjbauer95@gmail.com>
6037 Jonathan Wakely <jwakely@redhat.com>
6038
6039 PR bootstrap/64271 (partial)
6040 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
6041 to unsigned short.
6042 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
6043 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
6044 definitions with NetBSD upstream.
6045 (ctype_base::blank): Use _CTYPE_BL.
6046 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
6047 Declaration.
6048 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
6049 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
6050 parameters to unsigned char.
6051 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
6052
6053 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
6054
6055 PR libstdc++/91263
6056 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
6057 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
6058 (_Equality_base): Remove.
6059 (_Equality<>::_M_equal): Review implementation. Use
6060 std::is_permutation.
6061 * testsuite/23_containers/unordered_multiset/operators/1.cc
6062 (Hash, Equal, test02, test03): New.
6063 * testsuite/23_containers/unordered_set/operators/1.cc
6064 (Hash, Equal, test02, test03): New.
6065
6066 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
6067
6068 PR libstdc++/93267
6069 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
6070 Move here from <bits/range_access.h> and define using __int128 when
6071 available.
6072 (__is_integer_like, __is_signed_integer_like): Move here from
6073 <bits/range_access.h>.
6074 (weakly_incrementable): Use __is_signed_integer_like.
6075 * include/bits/range_access.h (__max_diff_type, __max_size_type)
6076 (__is_integer_like, __is_signed_integer_like): Move to
6077 <bits/iterator_concepts.h>.
6078 (__make_unsigned_like_t): Move here from <ranges>.
6079 * include/std/ranges (__make_unsigned_like_t): Move to
6080 <bits/range_access.h>.
6081 (iota_view): Replace using-directive with using-declarations.
6082 * testsuite/std/ranges/iota/93267.cc: New test.
6083 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
6084
6085 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
6086
6087 PR libstdc++/93244
6088 * include/bits/fs_path.h (path::generic_string<C,A>)
6089 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
6090 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
6091 root-dir is converted to forward slash in generic pathname.
6092 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
6093 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
6094
6095 PR libstdc++/58605
6096 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
6097 Define.
6098 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
6099 (__atomic_float): Add default member initializer for C++20.
6100 * include/std/atomic (atomic): Likewise.
6101 (atomic::atomic()): Remove noexcept-specifier on default constructor.
6102 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
6103 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
6104 number.
6105 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
6106 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
6107 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
6108 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
6109 expected result for is_trivially_default_constructible.
6110 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
6111 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
6112 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
6113 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
6114 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
6115 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
6116 expected results for is_trivially_default_constructible.
6117 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
6118 new test generator.
6119
6120 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
6121
6122 * testsuite/util/testsuite_iterators.h: Improve comment.
6123
6124 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
6125 initialization syntax.
6126
6127 PR libstdc++/92285
6128 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
6129 of base class independent of __cplusplus value.
6130 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
6131 type defined in the base class
6132 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
6133 * testsuite/24_iterators/istreambuf_iterator/requirements/
6134 base_classes.cc: Adjust expected base class for C++98.
6135
6136 2020-01-09 Olivier Hainque <hainque@adacore.com>
6137
6138 * doc/xml/manual/appendix_contributing.xml: Document _C2
6139 as a reserved identifier, by VxWorks.
6140 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
6141 * include/bits/stl_multimap.h: Likewise.
6142
6143 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
6144
6145 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
6146 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
6147 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
6148 partial specialization to disambiguate the two constrained
6149 specializations.
6150
6151 * include/experimental/type_traits (experimental::is_pod_v): Disable
6152 -Wdeprecated-declarations warnings around reference to std::is_pod.
6153 * include/std/type_traits (is_pod_v): Likewise.
6154 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
6155 is_standard_layout and is_trivial. Do not check is_pod for C++20.
6156 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
6157 Add -Wno-deprecated for C++20.
6158 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
6159 * testsuite/20_util/is_pod/value.cc: Likewise.
6160 * testsuite/experimental/type_traits/value.cc: Likewise.
6161
6162 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
6163
6164 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
6165 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
6166 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
6167
6168 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
6169
6170 PR libstdc++/93205
6171 * include/bits/random.h (operator>>): Check stream operation succeeds.
6172 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
6173 typedefs.
6174 (operator>>): Remove redundant __istream_type typedefs. Check stream
6175 operations succeed.
6176 (__extract_params): New function to fill a vector from a stream.
6177 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
6178
6179 PR libstdc++/93208
6180 * config/abi/pre/gnu.ver: Add new exports.
6181 * include/std/memory_resource (memory_resource::~memory_resource()):
6182 Do not define inline.
6183 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
6184 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
6185 Define.
6186 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
6187 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
6188
6189 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
6190
6191 PR libstdc++/92124
6192 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
6193 template alias.
6194 (_Hashtable<>::__fwd_value_for): New.
6195 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
6196 parameter.
6197 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
6198 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
6199 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
6200 with std::move.
6201 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
6202 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
6203 Adapt.
6204 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
6205 Adapt.
6206 * testsuite/23_containers/unordered_set/92124.cc: New.
6207
6208 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
6209
6210 PR libstdc++/93201
6211 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
6212 detailed error reporting for remove_all. Check result of recursive
6213 call before incrementing iterator.
6214 (remove_all(const path&), remove_all(const path&, error_code&)): Use
6215 do_remove_all.
6216 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
6217 result of recursive call before incrementing iterator.
6218 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
6219 are reported correctly.
6220 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
6221
6222 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
6223
6224 * include/std/condition_variable
6225 (condition_variable_any::wait_on): Rename to match current draft
6226 standard.
6227 (condition_variable_any::wait_on_until): Likewise.
6228 (condition_variable_any::wait_on_for): Likewise.
6229 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
6230 Adjust tests to account for renamed methods.
6231
6232 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
6233
6234 PR libstdc++/92124
6235 * include/bits/stl_tree.h
6236 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
6237 std::move_if_noexcept by std::move.
6238 * testsuite/23_containers/map/92124.cc: New.
6239 * testsuite/23_containers/set/92124.cc: New.
6240
6241 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
6242
6243 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
6244 (stop_source): Likewise (LWG 3362).
6245 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
6246 comparisons.
6247
6248 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
6249 (lexicographical_compare_three_way): Do not depend on
6250 __cpp_lib_concepts.
6251 * include/std/version (__cpp_lib_three_way_comparison): Only define
6252 when __cpp_lib_concepts is defined.
6253 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
6254
6255 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
6256
6257 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
6258 Only define four-argument overload when __cpp_lib_concepts is defined.
6259
6260 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
6261
6262 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
6263
6264 2020-01-01 Jakub Jelinek <jakub@redhat.com>
6265
6266 Update copyright years.
6267 \f
6268 Copyright (C) 2020 Free Software Foundation, Inc.
6269
6270 Copying and distribution of this file, with or without modification,
6271 are permitted in any medium without royalty provided the copyright
6272 notice and this notice are preserved.