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