1 2020-11-23 Jonathan Wakely <jwakely@redhat.com>
3 * include/bits/semaphore_base.h
4 (__platform_semaphore::_M_try_acquire_until): Fix type of
7 2020-11-23 Stephan Bergmann <sbergman@redhat.com>
9 * include/bits/atomic_wait.h (__thread_relax, __thread_yield):
12 2020-11-23 Jonathan Wakely <jwakely@redhat.com>
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.
20 2020-11-23 Jonathan Wakely <jwakely@redhat.com>
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
38 * include/std/atomic (atomic::wait, atomic::notify_one)
39 (atomic::notify_all): Likewise.
40 * include/std/version (__cpp_lib_semaphore): Define
43 2020-11-23 Jonathan Wakely <jwakely@redhat.com>
46 * testsuite/29_atomics/atomic_float/wait_notify.cc: Add options
48 * testsuite/29_atomics/atomic_integral/wait_notify.cc: Likewise.
49 * testsuite/29_atomics/atomic_ref/wait_notify.cc: Likewise.
51 2020-11-21 Jonathan Wakely <jwakely@redhat.com>
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
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.
67 2020-11-20 Thomas Rodgers <trodgers@redhat.com>
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.
128 2020-11-20 François Dumont <fdumont@gcc.gnu.org>
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.
141 2020-11-20 François Dumont <fdumont@gcc.gnu.org>
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.
154 2020-11-20 Jonathan Wakely <jwakely@redhat.com>
157 * include/std/regex (pmr::smatch, pmr::wsmatch): Declare using
158 underlying __normal_iterator type, not nested typedef
159 basic_string::const_iterator.
161 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
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.
171 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
173 * testsuite/30_threads/async/async.cc: Include <thread>.
174 * testsuite/30_threads/future/members/93456.cc: Likewise.
176 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
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
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.
201 2020-11-19 Jonathan Wakely <jwakely@redhat.com>
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
211 2020-11-18 Patrick Palka <ppalka@redhat.com>
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.
219 2020-11-17 Jonathan Wakely <jwakely@redhat.com>
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.
230 2020-11-17 Jonathan Wakely <jwakely@redhat.com>
233 * include/precompiled/stdc++.h: Include <coroutine>.
234 * include/std/version (__cpp_lib_span): Check __cpp_lib_concepts
237 2020-11-17 Patrick Palka <ppalka@redhat.com>
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.
246 2020-11-16 Jonathan Wakely <jwakely@redhat.com>
248 * src/Makefile.am (libstdc++-symbols.ver-sun): Remove -lrt from
249 arguments passed to make_sunver.pl script.
250 * src/Makefile.in: Regenerate.
252 2020-11-15 Jason Merrill <jason@redhat.com>
254 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Adjust.
256 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
259 * src/c++11/chrono.cc [_GLIBCXX_USE_CLOCK_GETTIME_SYSCALL]
260 (syscall_timespec): Define a type suitable for SYS_clock_gettime
262 (system_clock::now(), steady_clock::now()): Use syscall_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):
271 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
274 * src/c++11/futex.cc (relative_timespec): Remove redundant check
276 * testsuite/30_threads/future/members/wait_until_overflow.cc: Moved to...
277 * testsuite/30_threads/future/members/93456.cc: ...here.
279 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
281 * src/c++11/futex.cc (relative_timespec): Add [[unlikely]]
283 (__atomic_futex_unsigned_base::_M_futex_wait_until)
284 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
286 * testsuite/30_threads/future/members/wait_until_overflow.cc:
289 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
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.
297 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
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.
303 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
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
310 * testsuite/30_threads/future/members/poll.cc: New test.
312 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
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.
319 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
322 * include/ext/numeric_traits.h (__glibcxx_signed)
323 (__glibcxx_digits, __glibcxx_min, __glibcxx_max): Remove
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
329 (_GLIBCXX_INT_N_TRAITS): Macro to define explicit
330 specializations for non-standard integer types.
332 2020-11-11 Jonathan Yong <10walls@gmail.com>
334 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Exclude
335 cygwin and mingw from relro linker test.
336 * configure: Regenerate.
338 2020-11-11 Paul Scharnofske <asynts@gmail.com>
340 * include/std/thread (jthread::operator=(jthread&&)): Transfer
341 any existing state to a temporary that will request a stop and
343 * testsuite/30_threads/jthread/jthread.cc: Test move assignment.
345 2020-11-11 Jonathan Wakely <jwakely@redhat.com>
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().
353 2020-11-11 Jonathan Wakely <jwakely@redhat.com>
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
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.
369 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
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
377 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
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.
383 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
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
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>&)):
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
404 * testsuite/27_io/basic_istringstream/view/char/1.cc: Add more
406 * testsuite/27_io/basic_istringstream/view/wchar_t/1.cc:
408 * testsuite/27_io/basic_ostringstream/view/char/1.cc:
410 * testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc:
412 * testsuite/27_io/basic_stringstream/view/char/1.cc:
414 * testsuite/27_io/basic_stringstream/view/wchar_t/1.cc:
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.
425 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
428 * include/std/sstream (basic_stringbuf::_M_update_egptr)
429 (basic_stringbuf::__xfer_bufptrs::__xfer_bufptrs): Check for
430 null before comparing pointers.
432 2020-11-09 François Dumont <fdumont@gcc.gnu.org>
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:
448 * testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc:
450 * testsuite/23_containers/array/element_access/60497.cc
451 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
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
457 2020-11-09 François Dumont <fdumont@gcc.gnu.org>
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
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
470 (_GLIBCXX_DEBUG_VERIFY_AT_F): Use __glibcxx_assert_1.
471 * testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
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:
477 * testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
479 * testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
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:
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.
496 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
498 * include/bits/uniform_int_dist.h (__detail::_Power_of_2):
499 Document that true result for zero is intentional.
501 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
503 * include/std/bit (__popcount): Remove redundant check for zero.
505 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
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.
513 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
516 * include/bits/std_function.h [!__cpp_rtti]: Include <typeinfo>.
518 2020-11-07 Liu Hao <lh_mouse@126.com>
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
527 2020-11-06 Jonathan Wakely <jwakely@redhat.com>
529 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten up patterns
530 for basic_stringbuf that refer to __xfer_bufptrs.
532 2020-11-05 Marek Polacek <polacek@redhat.com>
535 * testsuite/20_util/reference_wrapper/lwg2993.cc: Add a dg-warning.
536 * testsuite/25_algorithms/generate_n/87982_neg.cc: Likewise.
538 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
541 * include/std/optional (operator==, operator!=, operator<)
542 (operator>, operator<=, operator>=): Fix types used in
544 * testsuite/20_util/optional/relops/96269.cc: New test.
546 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
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.
553 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
556 * include/std/future (__basic_future::_M_get_result): Use
557 nullptr for null pointer constant.
558 * libsupc++/eh_ptr.cc (operator==, operator!=): Remove
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".
569 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
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.
576 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
578 * include/std/sstream (basic_stringbuf(const allocator_type&):
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
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&)):
590 (basic_stringstream(const basic_string<C,T,SA>&, openmode, const A&)):
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.
603 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
605 * include/std/sstream: Adjust whitespace.
607 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
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.
614 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
616 * testsuite/18_support/96817.cc: Fail fast if the library is
617 configured to not use futexes.
619 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
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.
627 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
630 * doc/xml/manual/evolution.xml: Document change to base class.
631 * doc/html/manual/api.html: Regenerate.
633 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
635 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
636 Use qualified-id to refer to static member functions.
638 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
640 * include/std/syncstream: Include <bits/std_mutex.h>
643 2020-11-03 François Dumont <fdumont@gcc.gnu.org>
645 * config/abi/pre/gnu-versioned-namespace.ver:
646 Add __istream_extract and _Safe_local_iterator_base::_M_attach_single
649 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
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
656 [!_GLIBCXX_HAVE_TLS] (__set_once_functor_lock_ptr): Adjust to
658 [!_GLIBCXX_HAVE_TLS] (__once_proxy): Likewise.
660 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
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
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
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.
690 2020-11-03 Jonathan Yong <10walls@gmail.com>
692 * src/Makefile.am (libstdc___la_LINK): Add lt_host_flags.
693 * src/Makefile.in: Regenerate.
695 2020-11-02 Thomas Rodgers <trodgers@redhat.com>
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:
707 * testsuite/27_io/basic_syncbuf/requirements/types.cc:
709 * testsuite/27_io/basic_syncbuf/sync_ops/1.cc:
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:
715 * testsuite/27_io/basic_syncstream/requirements/types.cc:
718 2020-11-01 Jonathan Wakely <jwakely@redhat.com>
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.
726 2020-10-31 François Dumont <fdumont@gcc.gnu.org>
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.
732 * src/c++20/sstream-inst.cc: Limit instantiations to
733 _GLIBCXX_USE_CXX11_ABI.
735 2020-10-31 Jonathan Wakely <jwakely@redhat.com>
737 * include/bits/random.h (independent_bit_engine): Fix typo
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
747 2020-10-31 Jonathan Wakely <jwakely@redhat.com>
750 * include/bits/hashtable_policy.h (_Prime_rehash_policy)
751 (_Power2_rehash_policy): Use ceil and floor instead of ceill and
753 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy): Likewise.
754 Use double instead of long double.
756 2020-10-31 Patrick Palka <ppalka@redhat.com>
759 * include/std/ranges (basic_istream_view::begin): Initialize
760 _Iterator from 'this' instead of '*this'.
761 (basic_istream_view::_Iterator::_Iterator): Adjust constructor
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
768 (filter_view::end): Likewise.
769 (transform_view::_Iterator::_Iterator): Take a _Parent* instead
771 (filter_view::_Iterator::operator+): Adjust accordingly.
772 (filter_view::_Iterator::operator-): Likewise.
773 (filter_view::begin): Initialize _Iterator from 'this' instead
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
780 (join_view::end): Initialize _Sentinel from 'this' instead of
782 (split_view::_OuterIter): Take a _Parent& instead of a _Parent*.
783 (split_view::begin): Initialize _OuterIter from 'this' instead
785 (split_view::end): Likewise.
786 * testsuite/std/ranges/97600.cc: New test.
788 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
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:
800 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
803 * include/bits/hashtable_policy.h (_Prime_rehash_policy)
804 (_Power2_rehash_policy): Use double instead of long double.
806 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
808 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
809 Avoid -Wcatch-value warnings.
811 2020-10-30 Patrick Palka <ppalka@redhat.com>
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:
821 2020-10-30 David Edelsohn <dje.gcc@gmail.com>
823 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: XFAIL on AIX.
825 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
827 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten patterns
828 for old <sstream> symbols some more.
830 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
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.
837 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
839 * include/bits/parse_numbers.h (_Select_int_base): Avoid
840 narrowing conversion in constant expression.
841 * include/experimental/buffer (buffer_copy): Avoid narrowing
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.
848 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
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.
855 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
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
865 * testsuite/20_util/headers/memory/synopsis.cc: Add exception
867 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Avoid
868 -Wsign-compare warning.
869 * testsuite/20_util/tuple/cons/deduction.cc: Avoid -Wunused
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:
879 * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
881 * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
883 * testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc:
885 * testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
887 * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
889 * testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc:
891 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc:
893 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc:
895 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc:
897 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc:
899 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc:
901 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc:
903 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc:
905 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc:
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:
911 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc:
913 * testsuite/21_strings/headers/string/synopsis.cc: Add exception
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:
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:
935 * testsuite/23_containers/multiset/modifiers/swap/1.cc:
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
949 * testsuite/27_io/basic_ostream/exceptions/char/9561.cc:
951 * testsuite/27_io/basic_ostream/exceptions/wchar_t/9561.cc:
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:
961 * testsuite/experimental/memory_resource/null_memory_resource.cc:
963 * testsuite/experimental/source_location/1.cc: Avoid -Waddress
965 * testsuite/ext/pod_char_traits.cc: Avoid -Wunused warning.
966 * testsuite/ext/vstring/modifiers/clear/56166.cc: Avoid
968 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
969 Avoid -Wunused warning.
970 * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc:
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
981 * testsuite/util/testsuite_containers.h: Avoid -Wunused warning.
982 * testsuite/util/testsuite_iterators.h: Avoid -Wsign-compare
984 * testsuite/util/testsuite_new_operators.h: Define sized deleted.
986 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
988 * testsuite/25_algorithms/all_of/constexpr.cc: Check result of
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:
1003 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
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:
1021 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
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.
1027 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1029 * include/bits/uniform_int_dist.h (_Power_of_two): Add
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.
1039 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1041 * include/ext/rope (_Refcount_Base::_M_ref_count): Remove
1043 (_Refcount_Base::_M_decr()): Likewise.
1045 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
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.
1057 2020-10-29 Patrick Palka <ppalka@redhat.com>
1059 * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
1060 (test03): Fix initializing the vector vy with the array y of size 4.
1062 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
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
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.
1081 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1083 * include/bits/uniform_int_dist.h (uniform_int_distribution):
1084 Rename _UniformRandomNumberGenerator template parameters to
1085 _UniformRandomBitGenerator, as per P0346R1.
1087 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
1089 * include/std/sstream (basic_stringbuf(__string_type&&, openmode)):
1090 Call _M_init_syncbuf to set up get/put areas. Also qualify
1093 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1095 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Remove duplicate
1097 (CXXABI_1.3.13): Restore missing piece.
1099 2020-10-28 Thomas Rodgers <trodgers@redhat.com>
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&)):
1110 (basic_stringbuf::get_allocator()): New method.
1111 (basic_stringbuf::view()): Likewise.
1112 (basic_istringstream::basic_istringstream(basic_string&&, openmode)):
1114 (basic_istringstream::basic_istringstream(openmode, allocator const&)):
1116 (basic_istringstream::view()): New method.
1117 (basic_ostringstream::basic_ostringstream(basic_string&&, openmode)):
1119 (basic_ostringstream::basic_ostringstream(openmode, allocator const&)):
1121 (basic_ostringstream::view()): New method.
1122 (basic_stringstream::basic_stringstream(basic_string&&, openmode)):
1124 (basic_stringstream::basic_stringstream(openmode, allocator const&)):
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
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.
1152 2020-10-28 Patrick Palka <ppalka@redhat.com>
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
1159 * testsuite/std/time/year_month_weekday/3.cc: New test.
1161 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1163 * libsupc++/new_opnt.cc (new): Add comment about forced unwind
1166 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
1169 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_BUFSIZ):
1171 * config/os/mingw32/os_defines.h (_GLIBCXX_BUFSIZ):
1173 * include/bits/fstream.tcc: Use _GLIBCXX_BUFSIZ instead
1175 * include/ext/stdio_filebuf.h: Likewise.
1176 * include/std/fstream (_GLIBCXX_BUFSIZ): Define.
1178 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
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.
1187 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
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.
1194 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
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
1200 (tr1::_Placeholder): Replace with using-declaration for
1202 (tr1::placeholders::_1 etc.): Replace with using-directive for
1205 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
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.
1211 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
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):
1219 * include/tr1/legendre_function.tcc (__sph_legendre): Use
1220 unsigned for loop variable.
1222 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
1224 * include/std/charconv (from_chars): Add noexcept to match
1225 definitions in src/c++17/floating_from_chars.cc
1227 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
1229 * src/c++17/fs_dir.cc (fs::directory_iterator::operator*):
1230 Add noexcept. Do not throw on precondition violation.
1232 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
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.
1237 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
1239 * testsuite/experimental/memory_resource/new_delete_resource.cc:
1240 Add missing <cstdint> header.
1241 * testsuite/experimental/memory_resource/resource_adaptor.cc:
1244 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
1246 * include/experimental/executor (strand::_State): Fix thinko.
1248 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
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.
1256 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
1259 * libsupc++/new_opa.cc: Declare size_t in global namespace.
1260 Remove unused header.
1262 2020-10-26 Stephan Bergmann <sbergman@redhat.com>
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.
1270 2020-10-23 Patrick Palka <ppalka@redhat.com>
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.
1277 2020-10-23 Jonathan Wakely <jwakely@redhat.com>
1279 * include/experimental/memory_resource: Include <tuple>.
1280 (polymorphic_allocator::construct): Qualify forward_as_tuple.
1281 * include/std/memory_resource: Likewise.
1283 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
1285 * testsuite/30_threads/condition_variable/members/68519.cc:
1286 Define recent_epoch_float_clock::duration to meet the Cpp17Clock
1289 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
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.
1298 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
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
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
1318 * include/std/scoped_allocator: Likewise.
1319 * include/std/version (__cpp_lib_make_obj_using_allocator):
1322 2020-10-22 Olivier Hainque <hainque@adacore.com>
1324 * crossconfig.m4: Turn vxworks matcher into vxworks*.
1325 * configure.host: Likewise.
1326 * configure: Regenerate.
1328 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
1330 * include/bits/shared_ptr.h (shared_ptr(const weak_ptr&, nothrow_t)):
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
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.
1342 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
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.
1350 2020-10-21 Thomas Rodgers <trodgers@redhat.com>
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.
1366 2020-10-20 François Dumont <fdumont@gcc.gnu.org>
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)):
1384 (_Hash_code_base<>::_M_bucket_index(const _Hash_node_value<>&, size_t)):
1386 (_Hash_code_base<>::_M_store_code(__node_type*, __hash_code)):
1388 (_Hash_code_base<>::_M_store_code(_Hash_node_code_cache<>&, __hash_code)):
1390 (_Hash_code_base<>::_M_copy_code(__node_type*, const __node_type*)):
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<>&)):
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.
1428 2020-10-20 Aldy Hernandez <aldyh@redhat.com>
1430 * testsuite/21_strings/basic_string/capacity/1.cc: Pass
1431 -Wno-stringop-overflow to test.
1433 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
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.
1443 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
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.
1451 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
1453 * include/bits/unique_ptr.h (make_unique_for_overwrite): Define
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.
1460 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
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.
1466 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
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
1473 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
1475 * include/precompiled/expc++.h: Removed.
1477 2020-10-17 Ville Voutilainen <ville.voutilainen@gmail.com>
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):
1486 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
1488 * include/std/concepts: Fix typos in copyright notice.
1489 * include/std/ranges: Likewise.
1491 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1494 * include/std/sstream (basic_stringbuf::str()): Check for
1495 null egptr() before comparing to non-null pptr().
1497 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
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:
1504 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
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.
1523 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1525 * testsuite/lib/libstdc++.exp (check_effective_target_cxx11-abi):
1526 Add comments about which test flags get used by the check.
1528 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
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:
1534 * testsuite/21_strings/basic_string/allocator/char/move.cc:
1536 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
1538 * testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
1540 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1542 * testsuite/21_strings/basic_string/allocator/char/swap.cc:
1544 * testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
1546 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1548 * testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
1550 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
1552 * testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
1554 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1556 * testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
1559 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
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:
1565 * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
1567 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
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:
1574 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
1577 2020-10-13 Nuno Lopes <nuno.lopes@ist.utl.pt>
1579 * include/bits/stl_algo.h (any_of): Fix incorrect description
1582 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
1584 * doc/xml/manual/evolution.xml: Document some API changes
1586 * doc/xml/manual/intro.xml: Document LWG 2499.
1587 * doc/xml/manual/status_cxx2020.xml: Update status.
1588 * doc/html/*: Regenerate.
1590 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
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.
1644 2020-10-12 Patrick Palka <ppalka@redhat.com>
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
1652 2020-10-12 Patrick Palka <ppalka@redhat.com>
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.
1664 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
1666 * doc/doxygen/user.cfg.in: Update to Doxygen 1.8.20 format.
1668 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
1670 * doc/doxygen/user.cfg.in (PREDEFINED): Use __cplusplus=201703L
1671 so that C++17 features are documented.
1673 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
1675 * include/bits/stl_algobase.h (copy, move, copy_backward)
1676 (move_backward): Fix documentation for returned iterator.
1678 2020-10-12 Martin Sebor <msebor@redhat.com>
1681 * libsupc++/new (operator new): Add attribute alloc_size and malloc.
1683 2020-10-11 Clement Chigot <clement.chigot@atos.net>
1685 * config/os/aix/t-aix: Add complementary mode object file to
1688 2020-10-10 Jonathan Wakely <jwakely@redhat.com>
1691 * doc/html/manual/source_code_style.html: Regenerate.
1692 * doc/xml/manual/appendix_contributing.xml: Add __deref to
1694 * include/debug/functions.h (_Irreflexive_checker::__deref):
1696 * testsuite/17_intro/badnames.cc: Check __deref.
1698 2020-10-10 Ville Voutilainen <ville.voutilainen@gmail.com>
1700 * include/std/variant (__check_visitor_result):
1701 Use size_t for indexes.
1702 (__check_visitor_results): Likewise.
1704 2020-10-09 Ville Voutilainen <ville.voutilainen@gmail.com>
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.
1717 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
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
1727 2020-10-09 Daniel Lemire <lemire@gmail.com>
1729 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
1730 New member function implementing Lemire's "nearly divisionless"
1732 (uniform_int_distribution::operator()): Use _S_nd when the range
1733 of the URBG is the full width of the result type.
1735 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1737 * testsuite/Makefile.am: Set and export variable separately.
1738 * testsuite/Makefile.in: Regenerate.
1740 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1742 * scripts/check_performance: Use gnu++11 instead of gnu++0x.
1743 * testsuite/Makefile.am (check-performance): Export CXXFLAGS to
1745 * testsuite/Makefile.in: Regenerate.
1747 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1749 * testsuite/performance/26_numerics/random_dist.cc: New test.
1751 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1753 * testsuite/util/testsuite_performance.h (report_header): Remove
1756 2020-10-08 Patrick Palka <ppalka@redhat.com>
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:
1766 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
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
1777 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
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
1784 * testsuite/27_io/ios_base/failure/error_code.cc: New test.
1786 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
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
1795 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
1797 * include/bits/random.h (__detail::_Mod): Avoid divide by zero.
1798 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
1801 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
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
1812 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
1815 * config/abi/pre/gnu.ver (CXXABI_1.3.13): New symbol version.
1816 (exception_ptr::_M_addref(), exception_ptr::_M_release()):
1818 * libsupc++/eh_ptr.cc (exception_ptr::exception_ptr()):
1819 Remove out-of-line definition.
1820 (exception_ptr::exception_ptr(const exception_ptr&)):
1822 (exception_ptr::~exception_ptr()): Likewise.
1823 (exception_ptr::operator=(const exception_ptr&)):
1825 (exception_ptr::swap(exception_ptr&)): Likewise.
1826 (exception_ptr::_M_addref()): Add branch prediction.
1827 * libsupc++/exception_ptr.h (exception_ptr::operator bool):
1829 [!_GLIBCXX_EH_PTR_COMPAT] (operator==, operator!=): Define
1830 inline as hidden friends. Remove declarations at namespace
1832 (exception_ptr::exception_ptr()): Define inline.
1833 (exception_ptr::exception_ptr(const exception_ptr&)):
1835 (exception_ptr::~exception_ptr()): Likewise.
1836 (exception_ptr::operator=(const exception_ptr&)):
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.
1842 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
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
1849 * testsuite/std/ranges/adaptors/join_lwg3474.cc: Removed.
1851 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
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.
1867 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
1869 * include/std/numeric: Move all #include directives to the top
1871 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line
1873 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1875 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
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):
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):
1889 * testsuite/20_util/allocator/lwg3190.cc: New test.
1891 2020-10-05 Mike Crowe <mac@mcrowe.com>
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.
1902 2020-10-05 Mike Crowe <mac@mcrowe.com>
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.
1908 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
1910 * testsuite/29_atomics/atomic_float/value_init.cc: Use float
1911 instead of double so that __atomic_load_8 isn't needed.
1913 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
1915 * testsuite/18_support/96817.cc: Use terminate handler that
1918 2020-10-02 Patrick Palka <ppalka@redhat.com>
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.
1927 2020-10-01 Jonathan Wakely <jwakely@redhat.com>
1929 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
1930 Do not try to dereference return value of __atomic_load_n.
1932 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
1934 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
1935 (_GLIBCXX_GUARD_SET_AND_RELEASE): Define for EABI.
1937 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
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.
1945 2020-09-28 Patrick Palka <ppalka@redhat.com>
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
1961 2020-09-28 Patrick Palka <ppalka@redhat.com>
1963 * testsuite/std/ranges/adaptors/sizeof.cc: New test.
1965 2020-09-28 Patrick Palka <ppalka@redhat.com>
1967 * include/bits/ranges_util.h (subrange::_M_end): Give it
1968 [[no_unique_address]].
1969 * testsuite/std/ranges/subrange/sizeof.cc: New test.
1971 2020-09-28 Patrick Palka <ppalka@redhat.com>
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.
1978 2020-09-27 Clement Chigot <clement.chigot@atos.net>
1980 * config/os/aix/t-aix: Use $(AR) without -X32_64.
1982 2020-09-26 Jonathan Wakely <jwakely@redhat.com>
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.
1992 2020-09-25 Jonathan Wakely <jwakely@redhat.com>
1994 * libsupc++/Makefile.am: Remove redundant -std=gnu++1z flags.
1995 * libsupc++/Makefile.in: Regenerate.
1997 2020-09-24 Antony Polukhin <antoshkka@gmail.com>
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:
2009 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: Check
2010 for error on incomplete type usage in trait.
2012 2020-09-24 Patrick Palka <ppalka@redhat.com>
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
2026 2020-09-24 Jonathan Wakely <jwakely@redhat.com>
2028 * doc/xml/manual/configure.xml: Correct name of option.
2029 * doc/html/*: Regenerate.
2031 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
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.
2039 2020-09-22 Glen Joseph Fernandes <glenjofe@gmail.com>
2041 * include/bits/align.h (align): Fix overflow handling.
2042 * testsuite/20_util/align/3.cc: New test.
2044 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
2046 * include/Makefile.am: Add new headers and adjust for renamed
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>
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>
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:
2076 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
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.
2085 2020-09-22 Patrick Palka <ppalka@redhat.com>
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
2094 * testsuite/23_containers/span/index_op_neg.cc: Likewise for
2097 2020-09-22 Patrick Palka <ppalka@redhat.com>
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.
2103 2020-09-22 Patrick Palka <ppalka@redhat.com>
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
2109 * testsuite/25_algorithms/search/constexpr.cc: Test constexpr
2110 std::search overload that takes a searcher.
2112 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2114 * include/bits/c++config (__replacement_assert): Add noreturn
2116 (__glibcxx_assert_impl): Use __builtin_expect to hint that the
2117 assertion is expected to pass.
2119 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
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.
2126 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
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
2133 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
2135 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
2138 * include/bits/align.h (align) [!_GLIBCXX_USE_C99_STDINT_TR1]:
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.
2145 2020-09-20 Jonathan Wakely <jwakely@redhat.com>
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.
2152 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
2154 * include/std/memory: Move #include <bits/align.h> inside C++11
2155 conditional includes.
2157 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
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.
2165 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
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.
2174 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
2176 * include/bits/regex_error.h (__throw_regex_error): Fix
2177 parameter declaration and use reserved attribute names.
2179 2020-09-11 Mike Crowe <mac@mcrowe.com>
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.
2192 2020-09-11 Mike Crowe <mac@mcrowe.com>
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.
2206 2020-09-11 Mike Crowe <mac@mcrowe.com>
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
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.
2220 2020-09-11 Mike Crowe <mac@mcrowe.com>
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.
2231 2020-09-11 Mike Crowe <mac@mcrowe.com>
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
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.
2256 2020-09-11 Mike Crowe <mac@mcrowe.com>
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
2266 2020-09-11 Mike Crowe <mac@mcrowe.com>
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.
2274 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
2275 Christophe Lyon <christophe.lyon@linaro.org>
2277 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
2279 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
2280 Christophe Lyon <christophe.lyon@linaro.org>
2282 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
2284 2020-09-11 Christophe Lyon <christophe.lyon@linaro.org>
2286 * include/bits/regex_error.h: Avoid warning with -fno-exceptions.
2288 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2290 * include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in_all):
2291 Add casts to compare types of the same signedness.
2293 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2295 * include/bits/ranges_algobase.h (__equal_fn): Remove unused
2298 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2300 * include/std/version (__cpp_lib_array_constexpr):
2301 (__cpp_lib_constexpr_char_traits): Only define C++17 value when
2304 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
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.
2314 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2316 * include/bits/fs_path.h (path::_List::type()): Avoid narrowing
2318 * include/std/chrono (operator+(const year&, const years&)):
2321 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2323 * include/bits/codecvt.h (codecvt_byname): Remove names of
2326 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2328 * include/bits/locale_facets_nonio.tcc: Adjust whitespace.
2330 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
2332 * include/c_global/cmath (__lerp): Avoid -Wparentheses warnings.
2334 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
2336 * include/bits/atomic_base.h: Fix -Wunused-variable
2338 * include/ext/new_allocator.h: Fix -Wunused-parameter
2341 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2343 * include/bits/stl_iterator.h (counted_iterator): Add assertions
2344 to check preconditions added by LWG 3472.
2346 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
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.
2356 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
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
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
2374 (monotonic_buffer_resource::_M_new_buffer): Use aligned_ceil.
2375 (big_block): Replace _M_size and _M_align with aligned_size
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.
2387 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
2389 * include/std/chrono (duration::_S_gcd): Use invariant that
2390 neither value is zero initially.
2392 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
2394 * include/std/ranges (__box): Simplify constraints as per LWG 3477.
2396 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
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.
2403 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
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.
2415 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
2418 * testsuite/experimental/numeric/92978.cc: Use experimental::lcm
2421 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
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):
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:
2438 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
2439 Adjust dg-error line numbers.
2441 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
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
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.
2453 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
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
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
2470 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
2472 * include/std/chrono (duration::_S_gcd(intmax_t, intmax_t)):
2473 New helper function for finding GCD of two positive intmax_t
2475 (duration::__divide): New helper alias for dividing one period
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.
2486 2020-08-29 Jonathan Wakely <jwakely@redhat.com>
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.
2494 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
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.
2503 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
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
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.
2522 2020-08-27 Jonathan Wakely <jwakely@redhat.com>
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.
2537 2020-08-27 Patrick Palka <ppalka@redhat.com>
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].
2547 2020-08-27 Patrick Palka <ppalka@redhat.com>
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.
2585 2020-08-27 Patrick Palka <ppalka@redhat.com>
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.
2595 2020-08-27 Patrick Palka <ppalka@redhat.com>
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.
2606 2020-08-27 Patrick Palka <ppalka@redhat.com>
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.
2614 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2616 * include/std/tuple (_Tuple_impl): Whitespaces changes for
2617 consistent indentation. Also use __enable_if_t alias template.
2619 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
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.
2628 2020-08-26 Patrick Palka <ppalka@redhat.com>
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.
2634 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
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.
2640 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2643 * include/experimental/string_view (basic_string_view):
2644 Enable debug assertions.
2645 * include/std/string_view (basic_string_view):
2648 2020-08-26 François Dumont <fdumont@gcc.gnu.org>
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>):
2661 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>):
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)):
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
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.
2691 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
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:
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:
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.
2722 2020-08-25 Patrick Palka <ppalka@redhat.com>
2724 * include/std/chrono (year_month_weekday::ok): Fix assert.
2726 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
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:
2735 * testsuite/30_threads/shared_future/requirements/lwg3458.cc:
2738 2020-08-25 Patrick Palka <ppalka@redhat.com>
2739 Ed Smith-Rowland <3dw4rd@verizon.net>
2740 Jonathan Wakely <jwakely@redhat.com>
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):
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.
2791 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2793 * include/std/ranges (join_view): Add deduction guide (LWG 3474).
2794 * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test.
2796 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
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.
2803 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
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.
2809 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2812 * include/std/variant (_Variant_storage): Replace implicit
2813 conversions from size_t to __index_type with explicit casts.
2815 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2817 * testsuite/30_threads/packaged_task/cons/alloc.cc: Run for
2818 C++11 and skip for C++17 or later.
2820 2020-08-24 Corentin Gay <gay@adacore.com>
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:
2826 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
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:
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:
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:
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:
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:
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:
2934 * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
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:
2940 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
2942 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
2944 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
2946 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
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:
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:
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:
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.
3035 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
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:
3042 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
3044 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
3046 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
3049 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
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.
3058 2020-08-20 Jonathan Wakely <jwakely@redhat.com>
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
3066 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3067 Patrick Palka <ppalka@redhat.com>
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.
3078 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3080 * include/bits/stl_tree.h (operator!=, operator>, operator<=)
3081 (operator>=): Remove deprecated functions.
3083 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
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>):
3093 * testsuite/std/ranges/iota/96042.cc: New test.
3095 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
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.
3102 2020-08-19 Patrick Palka <ppalka@redhat.com>
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
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.
3123 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
3125 * include/bits/c++config (_GLIBCXX_DEPRECATED): Define for all
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):
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.
3146 2020-08-19 Antony Polukhin <antoshkka@gmail.com>
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
3160 * testsuite/20_util/is_swappable_with/incomplete_neg.cc: New test.
3162 2020-08-18 David Edelsohn <dje.gcc@gmail.com>
3163 Clement Chigot <clement.chigot@atos.net>
3165 * config/os/aix/t-aix: Add complementary mode object files to
3168 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
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:
3174 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
3176 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
3178 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
3181 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
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
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
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.
3203 2020-08-17 Jonathan Wakely <jwakely@redhat.com>
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
3212 * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
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.
3218 2020-08-14 Lewis Hyatt <lhyatt@gmail.com>
3220 * testsuite/lib/libstdc++.exp: Use the new option
3221 -fdiagnostics-plain-output.
3223 2020-08-13 Jonathan Wakely <jwakely@redhat.com>
3225 * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Warn if the c_std
3226 option is used and fail unless --enable-cheaders-obsolete is
3228 * configure: Regenerate.
3230 2020-08-12 Jonathan Wakely <jwakely@redhat.com>
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
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
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.
3259 2020-08-11 François Dumont <fdumont@gcc.gnu.org>
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.
3277 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3279 * testsuite/30_threads/thread/cons/84535.cc: Use a custom
3281 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
3283 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
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
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
3301 * testsuite/experimental/net/execution_context/use_service.cc:
3302 Enable test for non-pthread targets.
3304 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3306 * include/experimental/executor (system_context::a__tag): Make
3307 default constructor explicit.
3309 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3311 * include/experimental/executor (system_context::_M_run()):
3313 * testsuite/experimental/net/system_context/1.cc: New test.
3315 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
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.
3322 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
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):
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
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.
3342 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
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.
3349 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
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.
3356 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3359 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
3360 $enable_libstdcxx_filesystem_ts.
3361 * configure: Regenerate.
3363 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
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.
3370 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3372 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI=0]
3373 (basic_string::reserve()): Do nothing if exceptions are not
3376 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3379 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
3380 (stat_type): Change to __stat64.
3381 (stat): Use _wstat64.
3383 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
3386 * include/debug/bitset (bitset::operator==): Call _M_base() on
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.
3392 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
3394 * testsuite/18_support/comparisons/algorithms/partial_order.cc:
3395 Replace VERIFY with static_assert where the compiler now
3397 * testsuite/18_support/comparisons/algorithms/weak_order.cc:
3400 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
3402 * config/abi/pre/gnu.ver: Fix wildcards for wstring symbols.
3404 2020-08-06 Andrew Luo <andrewluotechnologies@outlook.com>
3405 Jonathan Wakely <jwakely@redhat.com>
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:
3423 * testsuite/21_strings/basic_string/capacity/char/18654.cc:
3425 * testsuite/21_strings/basic_string/capacity/char/2.cc:
3427 * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
3429 * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
3431 * testsuite/21_strings/basic_string/capacity/wchar_t/2.cc:
3434 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
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&)):
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.
3449 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
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.
3456 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
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.
3468 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
3470 * include/std/atomic (atomic<T>::store): Reformat.
3472 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
3474 * doc/xml/manual/status_cxx2017.xml: Replace oneAPI DPC++ link
3475 with LLVM repo for PSTL.
3476 * doc/html/manual/status.html: Regenerate.
3478 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
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])):
3494 (operator>>(basic_istream<char,T>&, unsigned char(&)[N])):
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:
3520 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
3522 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
3524 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
3526 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
3529 2020-08-01 Gerald Pfeifer <gerald@pfeifer.com>
3531 * doc/xml/manual/using_exceptions.xml: Move www.stroustrup.com to
3533 * doc/html/manual/using_exceptions.html: Regenerate.
3535 2020-07-31 Gerald Pfeifer <gerald@pfeifer.com>
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.
3541 2020-07-31 François Dumont <fdumont@gcc.gnu.org>
3543 * include/bits/stl_bvector.h
3544 [_GLIBCXX_INLINE_VERSION](_Bvector_impl_data::_M_start): Define as
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&)):
3556 (vector::vector(vector&&, const allocator_type&, true_type)): New, use
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:
3578 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3580 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Use 0
3582 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
3585 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3587 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
3588 Move struct to namespace scope.
3590 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
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:
3597 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3599 * testsuite/18_support/set_terminate.cc: Require C++11 or
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.
3606 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
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:
3618 * testsuite/23_containers/span/subspan_3_assert_neg.cc:
3620 * testsuite/23_containers/span/subspan_4_assert_neg.cc:
3622 * testsuite/23_containers/span/subspan_5_assert_neg.cc:
3624 * testsuite/23_containers/span/subspan_6_assert_neg.cc:
3626 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
3628 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
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:
3634 * testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
3636 * testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
3638 * testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
3640 * testsuite/26_numerics/valarray/69116.cc:
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:
3647 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
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:
3653 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: Likewise.
3654 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
3656 * testsuite/17_intro/headers/c++2017/operator_names.cc:
3658 * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
3659 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
3661 * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
3663 * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
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:
3690 * testsuite/20_util/duration_cast/rounding.cc: Likewise.
3691 * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
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:
3699 * testsuite/20_util/is_invocable/requirements/typedefs.cc:
3701 * testsuite/20_util/is_invocable/value.cc: Likewise.
3702 * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
3704 * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc:
3706 * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
3708 * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
3710 * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
3711 * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
3713 * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
3715 * testsuite/20_util/is_nothrow_swappable_with/value.cc:
3717 * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
3719 * testsuite/20_util/is_swappable/requirements/typedefs.cc:
3721 * testsuite/20_util/is_swappable/value.cc: Likewise.
3722 * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
3724 * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
3726 * testsuite/20_util/is_swappable_with/value.cc: Likewise.
3727 * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
3729 * testsuite/20_util/logical_traits/requirements/typedefs.cc:
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:
3740 * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
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:
3748 * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
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:
3763 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
3765 * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
3767 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
3769 * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
3771 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
3773 * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
3775 * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
3777 * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
3779 * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
3781 * testsuite/21_strings/basic_string/operations/data/char/2.cc:
3783 * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
3785 * testsuite/21_strings/basic_string/operations/find/char/5.cc:
3787 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
3789 * testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
3790 * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
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:
3798 * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
3800 * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
3802 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
3804 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
3806 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
3808 * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
3810 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
3812 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
3814 * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
3816 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
3818 * testsuite/21_strings/basic_string_view/include.cc: Likewise.
3819 * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
3821 * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
3823 * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
3825 * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
3827 * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
3829 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
3831 * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
3833 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3835 * testsuite/21_strings/basic_string_view/literals/types.cc:
3837 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
3839 * testsuite/21_strings/basic_string_view/literals/values.cc:
3841 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
3843 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
3845 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
3847 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
3849 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
3851 * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
3853 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
3855 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
3857 * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
3859 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
3861 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
3863 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
3865 * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
3867 * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
3869 * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
3871 * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
3873 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
3875 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
3877 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
3879 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
3881 * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
3883 * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
3885 * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
3887 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
3889 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
3891 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
3893 * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
3895 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
3897 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
3899 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
3901 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
3903 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
3905 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
3907 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
3909 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
3911 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
3913 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
3915 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
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:
3921 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
3922 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
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:
3934 * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
3936 * testsuite/23_containers/unordered_map/modifiers/merge.cc:
3938 * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
3940 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
3942 * testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
3944 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
3946 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
3948 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
3950 * testsuite/23_containers/unordered_set/modifiers/merge.cc:
3952 * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
3954 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
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:
3961 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
3963 * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
3965 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3967 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
3969 * testsuite/29_atomics/atomic/is_always_lock_free.cc: Likewise.
3970 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
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:
3976 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc:
3978 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
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.
3984 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3987 * include/bits/stl_iterator.h (reverse_iterator): Friend
3988 declaration should not depend on __cplusplus.
3990 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3992 * testsuite/experimental/filesystem/filesystem_error/cons.cc:
3993 Remove -std=gnu++17 option.
3995 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
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.
4002 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
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
4009 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4011 * testsuite/20_util/time_point_cast/rounding.cc: Remove
4012 duplicate dg-do directive and add c++17 effective target.
4014 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
4016 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
4017 LC_ALL_MASK not LC_ALL.
4019 2020-07-31 Richard Biener <rguenther@suse.de>
4022 * testsuite/20_util/assume_aligned/3.cc: Use -g0.
4024 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4026 * include/bits/basic_string.h (size_type, difference_type):
4027 Use allocator_traits to obtain the allocator's size_type and
4030 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4033 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
4035 [!_GLIBCXX_USE_C99_STDLIB]: Use strtod for float and long
4038 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
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:
4045 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4047 * testsuite/20_util/from_chars/4.cc: Pass non-const iterator
4050 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4052 * include/bits/iterator_concepts.h (__detail::__cv_bool): New
4054 (__detail::__integral_nonbool): Likewise.
4055 (__detail::__is_integer_like): Use __integral_nonbool.
4056 * testsuite/std/ranges/access/lwg3467.cc: New test.
4058 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
4060 * testsuite/20_util/from_chars/4.cc: Use dg-add-options ieee.
4061 * testsuite/29_atomics/atomic_float/1.cc: Likewise.
4063 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
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.
4076 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
4078 * include/bits/hashtable_policy.h (_Node_iterator_base()): New.
4079 (operator==(const _Node_iterator_base&, const _Node_iterator_base&)):
4081 (operator!=(const _Node_iterator_base&, const _Node_iterator_base&)):
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&)):
4088 (operator!=(const _Local_iterator_base&, const _Local_iterator_base&)):
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.
4095 2020-07-29 David Edelsohn <dje.gcc@gmail.com>
4096 Jonathan Wakely <jwakely@redhat.com>
4097 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
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
4104 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
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
4112 * include/bits/unordered_map.h
4113 (unordered_map(unordered_map&&, const allocator_type&)): Add noexcept
4115 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
4117 * include/bits/unordered_set.h
4118 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
4119 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
4121 * include/debug/unordered_map
4122 (unordered_map(unordered_map&&, const allocator_type&)): Likewise.
4123 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
4125 * include/debug/unordered_set
4126 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
4127 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
4129 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
4131 * testsuite/23_containers/unordered_map/cons/noexcept_default_construct.cc:
4133 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
4135 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
4137 * testsuite/23_containers/unordered_multimap/cons/noexcept_default_construct.cc:
4139 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
4141 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
4143 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
4145 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
4147 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
4149 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
4152 2020-07-28 François Dumont <fdumont@gcc.gnu.org>
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.
4172 2020-07-27 François Dumont <fdumont@gcc.gnu.org>
4174 * include/bits/hashtable_policy.h (_Map_base<>::at): Use
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
4192 2020-07-27 Jonathan Wakely <jwakely@redhat.com>
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]:
4201 * testsuite/20_util/from_chars/6.cc: New test.
4203 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
4205 * include/std/future (future, shared_future, promise): Add
4206 static assertions to the primary template to reject array and
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.
4212 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
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
4218 (move_iterator): Likewise.
4219 * testsuite/24_iterators/move_iterator/dr3435.cc: New test.
4220 * testsuite/24_iterators/reverse_iterator/dr3435.cc: New test.
4222 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
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
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.
4247 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
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.
4255 2020-07-17 Iain Sandoe <iain@sandoe.co.uk>
4257 * include/std/coroutine: Mark the methods of the
4258 trivial awaitables as constexpr.
4260 2020-07-14 David Edelsohn <dje.gcc@gmail.com>
4262 * config/os/aix/t-aix: Set BITS from compiler cpp macro.
4264 2020-07-13 Jonathan Wakely <jwakely@redhat.com>
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
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:
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.
4286 2020-07-08 François Dumont <fdumont@gcc.gnu.org>
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
4292 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
4294 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
4296 * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
4298 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
4300 * include/std/limits: Whitespace changes.
4302 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
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
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
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):
4323 * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
4325 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
4327 * include/std/limits: Whitespace changes.
4329 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
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.
4336 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
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.
4342 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
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.
4351 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
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.
4370 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
4372 * testsuite/27_io/basic_ios/conv/voidptr.cc: Add c++98_only
4375 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
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:
4381 * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc:
4383 * testsuite/18_support/headers/new/synopsis_cxx98.cc: Likewise.
4384 * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc:
4386 * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc:
4388 * testsuite/23_containers/headers/array/std_c++0x_neg.cc:
4390 * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc:
4392 * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
4394 * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
4396 * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc:
4398 * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc:
4400 * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++98.cc:
4402 * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc:
4404 * testsuite/26_numerics/headers/random/std_c++0x_neg.cc:
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:
4410 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
4412 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
4414 * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: Likewise.
4415 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc:
4418 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
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.
4427 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
4431 * testsuite/29_atomics/atomic_float/1.cc: Use different values
4433 * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
4435 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
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.
4442 2020-07-01 Martin Sebor <msebor@redhat.com>
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.
4451 2020-06-29 Ville Voutilainen <ville.voutilainen@gmail.com>
4454 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
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.
4461 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
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.
4468 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
4471 * include/std/type_traits (is_literal_type, is_literal_type_v):
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:
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.
4493 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4495 * include/std/charconv (__from_chars_binary): Ignore leading zeros.
4496 * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
4498 * testsuite/20_util/from_chars/3.cc: New test.
4500 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4502 * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
4503 * include/std/charconv (__detail::__to_chars): Avoid
4504 -Wsign-compare warning.
4506 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4509 * include/std/charconv (__to_chars_i): Check for zero-sized
4510 buffer unconditionally.
4511 * testsuite/20_util/to_chars/95851.cc: New test.
4513 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
4515 * testsuite/20_util/from_chars/1_c++20_neg.cc: Check enumeration
4517 * testsuite/20_util/from_chars/1_neg.cc: Likewise. Move dg-error
4518 directives outside preprocessor condition.
4520 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
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.
4529 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
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.
4543 2020-06-22 David Edelsohn <dje.gcc@gmail.com>
4545 * Makefile.am: Use -include.
4546 * Makefile.in: Regenerate.
4548 2020-06-21 David Edelsohn <dje.gcc@gmail.com>
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.
4557 2020-06-20 Jason Merrill <jason@redhat.com>
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.
4564 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
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.
4573 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
4575 * include/bits/stl_pair.h (_Index_tuple): Remove redundant
4576 namespace qualification.
4577 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
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)):
4584 * include/std/utility (tuple_element, __is_tuple_like_impl)
4585 (tuple_size, __pair_get, get): Likewise.
4587 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
4589 * include/bits/std_function.h (function): Define all member
4592 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
4594 * include/bits/stl_algo.h (__includes): Simplify the code.
4596 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
4598 * include/std/optional (optional()): Explicitly define it.
4600 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
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:
4609 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/94540.cc:
4611 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
4613 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
4615 * testsuite/23_containers/vector/cons/94540.cc: New test.
4617 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
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:
4624 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
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:
4631 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
4633 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
4636 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
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.
4644 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
4646 * include/std/atomic (atomic): Add static assertions.
4647 * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
4649 2020-06-16 Patrick Palka <ppalka@redhat.com>
4652 * testsuite/20_util/is_constructible/94003.cc: New test.
4654 2020-06-15 Jonathan Wakely <jwakely@redhat.com>
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:
4664 2020-06-15 Paul Keir <paul.keir@uws.ac.uk>
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:
4671 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
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:
4680 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
4682 * include/bits/atomic_base.h (atomic_flag::test): Add missing
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.
4688 2020-06-11 Jonathan Wakely <jwakely@redhat.com>
4691 * include/bits/istream.tcc (basic_istream::ignore(streamsize, CharT)):
4692 Only discard an extra character if we didn't already reach the
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.
4699 2020-06-10 Patrick Palka <ppalka@redhat.com>
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
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.
4722 2020-06-10 François Dumont <fdumont@gcc.gnu.org>
4723 Jonathan Wakely <jwakely@redhat.com>
4725 * include/bits/deque.tcc (__lex_cmp_dit): New.
4726 (__lexicographical_compare_aux1): Define overloads for deque
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
4735 (__lexicographical_compare_aux): Define new forwarding function
4736 that calls __lexicographical_compare_aux1 and declare new overloads
4738 (lexicographical_compare): Do not use __niter_base on
4740 * include/debug/safe_iterator.tcc
4741 (__lexicographical_compare_aux): Define overloads for safe
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:
4748 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
4750 * include/bits/stl_iterator.h (move_iterator::operator=): Define.
4751 * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
4753 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
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.
4759 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
4761 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
4763 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
4765 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
4767 * include/bits/unique_ptr.h (operator<<): Define for C++20.
4768 * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
4770 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
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
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.
4782 2020-06-04 François Dumont <fdumont@gcc.gnu.org>
4784 * include/bits/stl_algo.h (__copy_n_a): Move to ...
4785 * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict
4787 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
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)):
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
4803 * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc:
4805 * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:
4807 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New test.
4808 * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc:
4811 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
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
4820 (output_container, input_container, forward_container)
4821 (bidirectional_container, random_access_container): New alias
4823 * testsuite/25_algorithms/copy_n/5.cc: New test.
4825 2020-06-02 Jonathan Wakely <jwakely@redhat.com>
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
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.
4858 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
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
4874 (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
4875 Use __wstr_from_utf8.
4877 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
4879 * testsuite/util/testsuite_iterators.h:
4880 (input_iterator_wrapper::operator++(int)): Return proxy object.
4882 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
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.
4888 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
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.
4895 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
4897 * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
4898 * doc/html/faq.html: Regenerate.
4900 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
4902 * doc/xml/manual/policy_data_structures_biblio.xml: Remove
4905 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
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.
4911 2020-05-31 Douglas B Rupp <douglas.b.rupp@gmail.com>
4913 * crossconfig.m4 (<*-vxworks>): Check for more math decls.
4914 * configure: Rebuild.
4916 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
4919 * configure: Regenerated.
4921 2020-05-29 François Dumont <fdumont@gcc.gnu.org>
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.
4928 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4931 * include/bits/atomic_base.h (__atomic_impl::load): Add
4932 cv-qualifiers to parameter so that _Tp is deduced as the
4934 * testsuite/29_atomics/atomic_float/95282.cc: New test.
4936 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
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.
4944 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4947 * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
4948 operators to use the correct operations on the underlying
4950 * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
4952 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4954 * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
4956 2020-05-26 Patrick Palka <ppalka@redhat.com>
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.
4966 2020-05-23 Patrick Palka <ppalka@redhat.com>
4969 * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
4970 dg-additional-options. Avoid unused-but-set-variable warning.
4972 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
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.
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.
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.
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
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.
5025 2020-05-21 Matthias Kretz <kretz@kde.org>
5027 * testsuite/Makefile.am: Remove dup target_triplet and set tool,
5028 allowing runtest to work without arguments.
5029 * testsuite/Makefile.in: Regenerate.
5031 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
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.
5039 * include/experimental/socket (basic_socket::is_open()
5040 (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
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
5047 (__endpoint, __protocol, __acceptable_protocol): New variable
5049 * include/experimental/socket (__is_endpoint): Move to net.h header.
5050 (basic_socket, basic_socket_acceptor): Check requirements.
5052 * include/experimental/executor (use_future_t::use_future_t()): Fix
5053 incorrect noexcept-specifier.
5054 * include/experimental/internet (basic_resolver_results): Adjust
5056 * include/experimental/socket (__basic_socket_impl::release): Add
5058 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
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
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.
5072 * include/experimental/buffer: Replace typedefs with
5074 * include/experimental/executor: Likewise.
5075 * include/experimental/internet: Likewise.
5076 * include/experimental/socket: Likewise.
5077 * include/experimental/timer: Likewise.
5079 2020-05-19 Jonathan Wakely <jwakely@redhat.com>
5082 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
5084 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
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.
5090 2020-05-19 Patrick Palka <ppalka@redhat.com>
5093 * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
5095 * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
5097 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
5100 * configure: Regenerated.
5102 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
5104 * configure: Regenerated.
5106 2020-05-13 Alexandre Oliva <oliva@adacore.com>
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:
5115 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
5116 (test03): Drop max-align test for char-aligned alloc.
5118 2020-05-08 Ulrich Drepper <drepper@redhat.com>
5120 * include/bits/atomic_base.h (atomic_flag): Implement test member
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.
5126 2020-05-07 Jonathan Wakely <jwakely@redhat.com>
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.
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.
5148 2020-05-07 Eric Botcazou <ebotcazou@adacore.com>
5150 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
5151 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
5153 2020-05-06 François Dumont <fdumont@gcc.gnu.org>
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
5161 (__fill_a1): ...this.
5162 * testsuite/25_algorithms/fill/bvector/1.cc: New.
5164 2020-05-06 H.J. Lu <hongjiu.lu@intel.com>
5166 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
5168 2020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
5170 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
5171 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
5173 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
5174 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
5177 2020-05-06 Martin Liska <mliska@suse.cz>
5180 2020-05-05 Martin Liska <mliska@suse.cz>
5182 * include/parallel/multiway_merge.h:
5183 Use const for _Compare template argument.
5185 2020-05-06 Jonathan Wakely <jwakely@redhat.com>
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.
5191 2020-05-06 Jakub Jelinek <jakub@redhat.com>
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.
5201 2020-05-05 Martin Liska <mliska@suse.cz>
5204 * include/parallel/multiway_merge.h:
5205 Use const for _Compare template argument.
5207 2020-05-04 Fangrui Song <maskray@google.com>
5209 * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
5211 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
5213 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
5214 * doc/html/*: Regenerate.
5217 * src/c++17/memory_resource.cc
5218 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
5221 2020-05-04 Nathan Sidwell <nathan@acm.org>
5224 * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
5225 ptrdiff_t before negation, to show intent more clearly.
5227 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
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
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:
5246 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
5248 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
5251 2020-05-03 Jonathan Wakely <jwakely@redhat.com>
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
5259 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
5262 * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
5264 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
5265 Patrick Palka <ppalka@redhat.com>
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.
5279 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
5282 * include/std/type_traits (__is_complete_or_unbounded): Replace
5283 BADNAME _T with _Tp.
5284 * testsuite/17_intro/badnames.cc: New test.
5286 2020-04-30 Jonathan Wakely <jwakely@redhat.com>
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.
5303 2020-04-29 Jonathan Wakely <jwakely@redhat.com>
5306 * include/bits/basic_string.tcc: Update comment about explicit
5309 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
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
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.
5330 * include/bits/alloc_traits.h (_S_construct): Restore placement
5331 new-expression for C++11/14/17 and call std::construct_at directly
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.
5339 2020-04-28 Patrick Palka <ppalka@redhat.com>
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.
5347 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
5348 Iain Sandoe <iain@sandoe.co.uk>
5351 * include/std/coroutine: Implement handing for non-
5352 class coroutine return types.
5354 2020-04-24 Jonathan Wakely <jwakely@redhat.com>
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.
5361 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
5362 Jonathan Wakely <jwakely@redhat.com>
5366 * include/std/any (any): Rename template parameters for consistency
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
5380 * testsuite/20_util/any/modifiers/92156.cc: New test.
5382 2020-04-23 Jonathan Wakely <jwakely@redhat.com>
5384 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
5385 * doc/html/*: Regenerate.
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.
5395 * include/std/version (__cpp_lib_three_way_comparison): Define for
5396 freestanding builds.
5398 2020-04-23 Thomas Rodgers <rodgert@appliantology.com>
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.
5405 2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
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.
5411 2020-04-22 Jonathan Wakely <jwakely@redhat.com>
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.
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:
5431 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
5433 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
5434 in C++17 mode and check feature test macro.
5436 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
5438 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
5439 defined by <utility>.
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.
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.
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
5457 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
5459 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
5461 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
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.
5479 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
5481 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
5483 * include/std/version (__cpp_lib_map_insertion)
5484 (__cpp_lib_unordered_map_insertion): Remove.
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:
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.
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
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.
5512 2020-04-21 Jonathan Wakely <jwakely@redhat.com>
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.
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
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
5528 * doc/html/*: Regenerate.
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.
5535 2020-04-20 Thomas Rodgers <trodgers@redhat.com>
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.
5541 2020-04-20 Jonathan Wakely <jwakely@redhat.com>
5543 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
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
5548 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
5549 results for some types when paren-init for aggregates is supported.
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.
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.
5572 2020-04-20 Matthias Kretz <kretz@kde.org>
5574 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
5576 2020-04-19 Jonathan Wakely <jwakely@redhat.com>
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.
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):
5587 * include/debug/unordered_map (unordered_map, unordered_multimap):
5589 * include/debug/unordered_set (unordered_set, unordered_multiset):
5593 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
5594 redundant assignment in constructor.
5596 2020-04-18 Jonathan Wakely <jwakely@redhat.com>
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
5602 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
5605 * testsuite/util/native_type/native_priority_queue.hpp: Use
5606 allocator_traits to rebind allocator.
5608 2020-04-17 Jonathan Wakely <jwakely@redhat.com>
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):
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.
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
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
5646 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
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:
5656 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
5658 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
5660 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
5662 2020-04-16 Jonathan Wakely <jwakely@redhat.com>
5664 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
5665 name of unused parameter.
5667 2020-04-15 Jonathan Wakely <jwakely@redhat.com>
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.
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.
5697 * include/std/typeindex (operator<=>): Define for C++20.
5698 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
5700 2020-04-14 Jonathan Wakely <jwakely@redhat.com>
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:
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
5717 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
5718 * testsuite/18_support/comparisons/categories/94565.cc: New test.
5720 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
5722 * include/std/coroutine: Update coroutines builtin define,
5725 2020-04-09 Jonathan Wakely <jwakely@redhat.com>
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:
5734 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
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.
5742 2020-04-08 Jonathan Wakely <jwakely@redhat.com>
5744 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
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.
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.
5757 2020-04-07 Jonathan Wakely <jwakely@redhat.com>
5760 * include/std/charconv (__integer_to_chars_result_type)
5761 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
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.
5769 2020-04-06 Jonathan Wakely <jwakely@redhat.com>
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.
5788 2020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
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.
5794 2020-04-03 Jonathan Wakely <jwakely@redhat.com>
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.
5802 2020-04-01 Andrea Corallo <andrea.corallo@arm.com>
5804 * testsuite/experimental/net/execution_context/use_service.cc:
5805 Require pthread and gthreads.
5807 2020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
5809 * doc/xml/manual/appendix_free.xml: Move "free books" list from
5811 * doc/html/manual/appendix_free.html: Regenerate.
5813 2020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
5815 Library-side tests for parenthesized aggregate init
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:
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:
5835 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
5837 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
5839 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
5841 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
5843 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
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:
5849 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
5850 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
5852 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
5854 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
5856 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
5858 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
5861 2020-03-28 Jonathan Wakely <jwakely@redhat.com>
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.
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.
5880 2020-03-27 Jonathan Wakely <jwakely@redhat.com>
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
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.
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.
5923 * include/std/type_traits (__is_array_convertible): Move definition
5924 to immediately after is_convertible.
5926 2020-03-26 Jonathan Wakely <jwakely@redhat.com>
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):
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.
5938 2020-03-25 Mike Crowe <mac@mcrowe.com>
5940 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
5942 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
5945 2020-03-25 Jonathan Wakely <jwakely@redhat.com>
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):
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
5963 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
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
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:
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
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
5985 2020-03-21 Jonathan Wakely <jwakely@redhat.com>
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.
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
6002 2020-03-18 Jonathan Wakely <jwakely@redhat.com>
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
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.
6017 * include/std/stop_token (stop_token::_Stop_state_ref): Define
6018 comparison operators explicitly if the compiler won't synthesize them.
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.
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
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
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
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.
6048 2020-03-16 Jonathan Wakely <jwakely@redhat.com>
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
6056 2020-03-12 Jonathan Wakely <jwakely@redhat.com>
6058 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
6059 a null pointer to functions with nonnull(1) attribute.
6061 2020-03-11 Patrick Palka <ppalka@redhat.com>
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.
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
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.
6084 2020-03-10 Jonathan Wakely <jwakely@redhat.com>
6086 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
6087 instead of _M_current.
6088 (split_view::_OuterIter::operator++): Likewise.
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.
6106 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
6107 Change expression in noexcept-specifier to match function body.
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.
6114 2020-03-09 Jonathan Wakely <jwakely@redhat.com>
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.
6122 2020-03-06 Patrick Palka <ppalka@redhat.com>
6124 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
6125 join_view::_Sentinel<!_Const>.
6126 * testsuite/std/ranges/adaptors/join.cc: Augment test.
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.
6133 2020-03-06 Jonathan Wakely <jwakely@redhat.com>
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.
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.
6147 2020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
6149 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
6152 2020-03-05 Jonathan Wakely <jwakely@redhat.com>
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.
6162 * include/std/string_view: Include <bits/ostream_insert.h>.
6163 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
6165 2020-03-04 Jonathan Wakely <jwakely@redhat.com>
6167 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
6169 2020-03-04 Patrick Palka <ppalka@redhat.com>
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
6177 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
6179 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
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.
6186 LWG 3355 The memory algorithms should support move-only input iterators
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
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:
6201 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
6203 * .../specialized_algorithms/uninitialized_move/constrained.cc:
6206 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
6207 protected instead of private.
6208 (test_sized_range_sized_sent): New.
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.
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.
6226 2020-03-03 Jonathan Wakely <jwakely@redhat.com>
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
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.
6249 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
6250 Avoid redundant iterator comparisons (LWG 3410).
6252 2020-03-02 Jonathan Wakely <jwakely@redhat.com>
6255 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
6257 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
6259 * include/std/ranges (__detail::__maybe_empty_t): Rename to
6261 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
6263 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
6266 2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
6268 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
6270 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
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.
6278 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
6279 Add libatomic option.
6280 * testsuite/30_threads/jthread/jthread.cc: Likewise.
6282 2020-02-29 François Dumont <fdumont@gcc.gnu.org>
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.
6289 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
6291 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
6293 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
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:
6305 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
6307 2020-02-28 Patrick Palka <ppalka@redhat.com>
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.
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.
6319 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
6321 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
6322 test instead of just compiling it.
6324 2020-02-28 Patrick Palka <ppalka@redhat.com>
6326 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
6327 whenever the underlying range models common_range.
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
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
6341 (views::reverse_view::_S_needs_cached_begin): New static member
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.
6355 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
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:
6362 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
6363 -Wstringop-overflow warnings.
6365 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
6367 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
6368 -fdiagnostics-urls=never to options.
6370 2020-02-27 Patrick Palka <ppalka@redhat.com>
6372 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
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.
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()
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.
6396 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
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.
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.
6419 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
6420 C++98 where the member function of the base class returns void.
6422 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
6423 equality comparisons that support value-initialized iterators.
6425 * include/bits/boost_concept_check.h (__function_requires): Add
6426 _GLIBCXX14_CONSTEXPR.
6427 * testsuite/25_algorithms/min/concept_checks.cc: New test.
6429 2020-02-26 Patrick Palka <ppalka@redhat.com>
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.
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
6440 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
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.
6458 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
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):
6467 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
6469 (__detail::__maybe_const_t): Likewise.
6470 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
6471 (transform_view, take_view, take_while_view, elements_view): Use
6473 (join_view, split_view): Use both.
6475 2020-02-25 Patrick Palka <ppalka@redhat.com>
6477 LWG 3397 basic_istream_view::iterator should not provide
6479 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
6481 (basic_istream_view:_Iterator::iterator_concept): ... this.
6482 * testsuite/std/ranges/istream_view.cc: Augment test.
6484 LWG 3325 Constrain return type of transformation function for
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.
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.
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.
6500 LWG 3292 iota_view is under-constrained
6501 * include/std/ranges (iota_view): Require that _Winc models semiregular
6503 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
6505 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
6507 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
6508 during constant evaluation. Call __builtin_memmove directly instead of
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.
6521 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
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.
6530 2020-02-24 Patrick Palka <ppalka@redhat.com>
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.
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.
6553 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
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
6560 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
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:
6569 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
6570 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
6572 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
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
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.
6591 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
6593 * include/std/optional (operator<=>(optional<T>, optional<U>))
6594 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
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.
6608 2020-02-20 Patrick Palka <ppalka@redhat.com>
6610 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
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.
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
6626 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
6628 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
6630 * include/bits/range_access.h (ranges::begin): Reject array of
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
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
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
6647 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
6648 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
6650 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
6652 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
6653 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
6655 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
6656 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
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
6664 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
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.
6671 2020-02-19 Patrick Palka <ppalka@redhat.com>
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.
6677 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
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.
6684 * include/std/ranges (take_while_view, drop_view, drop_while_view)
6685 (elements_view:_Iterator): Initialize data members (LWG 3364).
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).
6691 * include/std/concepts (__detail::__partially_ordered_with): Move here
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
6698 * include/std/concepts (totally_ordered_with): Remove redundant
6699 requirement (LWG 3329).
6701 * include/std/ranges (__detail::__convertible_to_non_slicing): New
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.
6710 * include/bits/iterator_concepts.h (iter_move): Add declaration to
6711 prevent unqualified lookup finding a suitable declaration (LWG 3247).
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.
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.
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
6727 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
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
6736 * include/std/span (span::const_iterator, span::const_reverse_iterator)
6737 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
6739 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
6741 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
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.
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.
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).
6762 * include/std/memory (uninitialized_construct_using_allocator): Use
6763 std::construct_at (LWG 3321).
6765 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
6766 (polymorphic_allocator::allocate_object)
6767 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
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.
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.
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.
6806 2020-02-18 Patrick Palka <ppalka@redhat.com>
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
6818 (split_view::_OuterIter::_OuterIter): Adjust constraints.
6819 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
6822 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
6825 * include/std/ranges (_RangeAdaptor): Add deduction guide.
6826 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
6828 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
6829 (transform_view::_Iterator): Add alias _Base_iter and use in place of
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.
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.
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
6847 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
6849 (span::first<Count>(), span::last<Count>()): Use explicit type in
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.
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
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.
6867 * include/std/span (span): Reorder members and rename template
6868 parameters to match declarations in the C++2a working paper.
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
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.
6879 2020-02-17 Patrick Palka <ppalka@redhat.com>
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
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
6896 (in_out_out_result): New.
6897 (partition_copy_result, merge_result): Change into an alias of
6899 (set_union_result, set_intersection_result): Change into an alias of
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
6906 (in_found_result): New.
6907 (next_permutation_result, prev_permutation_result): Change into an alias
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.
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.
6929 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
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):
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.
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.
6968 * include/std/charconv: Add comment.
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
6975 * include/bits/ranges_algobase.h: Do not include <cmath>.
6976 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
6978 * include/std/ranges: Do not include <limits>.
6979 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
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):
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.
7011 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
7012 value for partial_ordering::unordered.
7014 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
7015 const-qualified expression variations.
7016 * include/std/concepts (copyable): Likewise.
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.
7038 2020-02-16 Patrick Palka <ppalka@redhat.com>
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.
7044 2020-02-15 Patrick Palka <ppalka@redhat.com>
7046 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
7047 * include/bits/ranges_algobase.h: Likewise.
7048 * include/bits/ranges_uninitialized.h: Likewise.
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.
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.
7081 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
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.
7099 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
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.
7106 2020-02-13 Patrick Palka <ppalka@redhat.com>
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
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.
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
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.
7132 2020-02-12 Patrick Palka <ppalka@redhat.com>
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
7139 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
7140 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
7142 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
7147 * configure: Regenerated.
7149 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
7151 * include/bits/hashtable.h
7152 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
7153 missing std namespace qualification to forward call.
7155 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
7157 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
7159 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
7161 * include/std/ranges: Fix non-ASCII characters in comment.
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.
7170 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
7172 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_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.
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.
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.
7196 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
7198 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
7200 (basic_istream_view::_Iterator::operator++()): Add missing return.
7202 2020-02-07 Patrick Palka <ppalka@redhat.com>
7204 * include/bits/ranges_algo.h: Remove extraneous &&.
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.
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):
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.
7252 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
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
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.
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
7276 * testsuite/std/ranges/iota/iterator.cc: New test.
7278 2020-02-07 Patrick Palka <ppalka@redhat.com>
7279 Jonathan Wakely <jwakely@redhat.com>
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
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
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.
7366 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
7368 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
7369 number in comment. Fix indentation.
7371 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
7372 redundant _GLIBCXX20_CONSTEXPR.
7374 * include/std/ranges (viewable_range): Replace decay_t with
7375 remove_cvref_t (LWG 3375).
7377 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
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.
7384 2020-02-05 Patrick Palka <ppalka@redhat.com>
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.
7391 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
7393 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
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.
7401 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
7403 * configure: Regenerate.
7405 2020-01-31 Patrick Palka <ppalka@redhat.com>
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>.
7414 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
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):
7428 (stop_token::_Stop_cb::_M_run): New member function.
7429 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
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
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
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
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
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:
7478 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
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
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
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().
7496 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
7497 * testsuite/18_support/comparisons/object/93479.cc: New test.
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.
7509 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
7512 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
7513 static assertion to object types.
7516 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
7517 clock_gettime instead of explicit glibc version check.
7518 * configure: Regenerate.
7520 2020-01-28 Martin Liska <mliska@suse.cz>
7523 * include/std/atomic: Fix typo.
7524 * include/std/optional: Likewise.
7526 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
7528 * configure: Regenerate.
7530 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
7533 * include/std/span (span): Fix deduction guide.
7534 * testsuite/23_containers/span/deduction.cc: New test.
7536 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
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
7542 (partial_ordering, weak_ordering, strong_ordering): Remove
7543 constructors taking __cmp_cat::_Eq parameters. Use renamed
7546 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
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.
7564 2020-01-23 Alexandre Oliva <oliva@adacore.com>
7566 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
7567 * configure: Rebuild.
7569 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
7571 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
7574 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
7576 * include/Makefile.in: Regenerate.
7578 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
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.
7585 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
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.
7597 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
7599 * include/Makefile.am: Add coroutine to the std set.
7600 * include/Makefile.in: Regenerated.
7601 * include/std/coroutine: New file.
7603 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
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.
7611 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
7612 Matthew Bauer <mjbauer95@gmail.com>
7613 Jonathan Wakely <jwakely@redhat.com>
7615 PR bootstrap/64271 (partial)
7616 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
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
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.
7629 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
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.
7642 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
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
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.
7661 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
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.
7672 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
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
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
7696 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
7698 * testsuite/util/testsuite_iterators.h: Improve comment.
7700 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
7701 initialization syntax.
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.
7712 2020-01-09 Olivier Hainque <hainque@adacore.com>
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.
7719 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
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
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.
7738 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
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.
7744 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
7747 * include/bits/random.h (operator>>): Check stream operation succeeds.
7748 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
7750 (operator>>): Remove redundant __istream_type typedefs. Check stream
7752 (__extract_params): New function to fill a vector from a stream.
7753 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
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()):
7762 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
7763 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
7765 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
7768 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
7770 (_Hashtable<>::__fwd_value_for): New.
7771 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
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
7777 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
7778 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
7780 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
7782 * testsuite/23_containers/unordered_set/92124.cc: New.
7784 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
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
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.
7798 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
7800 * include/std/condition_variable
7801 (condition_variable_any::wait_on): Rename to match current draft
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.
7808 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
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.
7817 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
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
7824 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
7825 (lexicographical_compare_three_way): Do not depend on
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.
7831 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
7833 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
7834 Only define four-argument overload when __cpp_lib_concepts is defined.
7836 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
7838 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
7840 2020-01-01 Jakub Jelinek <jakub@redhat.com>
7842 Update copyright years.
7844 Copyright (C) 2020 Free Software Foundation, Inc.
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.