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