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