1 2020-11-16 Jonathan Wakely <jwakely@redhat.com>
3 * src/Makefile.am (libstdc++-symbols.ver-sun): Remove -lrt from
4 arguments passed to make_sunver.pl script.
5 * src/Makefile.in: Regenerate.
7 2020-11-15 Jason Merrill <jason@redhat.com>
9 * testsuite/20_util/result_of/sfinae_friendly_1.cc: Adjust.
11 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
14 * src/c++11/chrono.cc [_GLIBCXX_USE_CLOCK_GETTIME_SYSCALL]
15 (syscall_timespec): Define a type suitable for SYS_clock_gettime
17 (system_clock::now(), steady_clock::now()): Use syscall_timespec
19 * src/c++11/futex.cc (syscall_timespec): Define a type suitable
20 for SYS_futex and SYS_clock_gettime calls.
21 (relative_timespec): Use syscall_timespec instead of timespec.
22 (__atomic_futex_unsigned_base::_M_futex_wait_until): Likewise.
23 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
26 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
29 * src/c++11/futex.cc (relative_timespec): Remove redundant check
31 * testsuite/30_threads/future/members/wait_until_overflow.cc: Moved to...
32 * testsuite/30_threads/future/members/93456.cc: ...here.
34 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
36 * src/c++11/futex.cc (relative_timespec): Add [[unlikely]]
38 (__atomic_futex_unsigned_base::_M_futex_wait_until)
39 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
41 * testsuite/30_threads/future/members/wait_until_overflow.cc:
44 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
46 * src/c++11/futex.cc (relative_timespec): New function to
47 create relative time from two absolute times.
48 (__atomic_futex_unsigned_base::_M_futex_wait_until)
49 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady):
50 Use relative_timespec.
52 2020-11-13 Jonathan Wakely <jwakely@redhat.com>
54 * testsuite/30_threads/future/members/poll.cc: Require gthreads
55 and add -pthread for targets that require it. Relax required
56 ratio of wait_for calls before/after the future is ready.
58 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
60 * include/std/future (future::wait_for): Do not wait for
61 durations less than or equal to zero.
62 * src/c++11/futex.cc (_M_futex_wait_until)
63 (_M_futex_wait_until_steady): Do not wait for timeouts before
65 * testsuite/30_threads/future/members/poll.cc: New test.
67 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
69 * include/ext/numeric_traits.h (__numeric_traits): Change
70 primary template to always derive from __numeric_traits_integer.
71 (__numeric_traits<float>, __numeric_traits<double>)
72 (__numeric_traits<long double>): Add explicit specializations.
74 2020-11-12 Jonathan Wakely <jwakely@redhat.com>
77 * include/ext/numeric_traits.h (__glibcxx_signed)
78 (__glibcxx_digits, __glibcxx_min, __glibcxx_max): Remove
80 (__is_integer_nonstrict::__width): Define new constant.
81 (__numeric_traits_integer): Define constants in terms of each
82 other and __is_integer_nonstrict::__width, rather than the
84 (_GLIBCXX_INT_N_TRAITS): Macro to define explicit
85 specializations for non-standard integer types.
87 2020-11-11 Jonathan Yong <10walls@gmail.com>
89 * acinclude.m4 (GLIBCXX_CHECK_LINKER_FEATURES): Exclude
90 cygwin and mingw from relro linker test.
91 * configure: Regenerate.
93 2020-11-11 Paul Scharnofske <asynts@gmail.com>
95 * include/std/thread (jthread::operator=(jthread&&)): Transfer
96 any existing state to a temporary that will request a stop and
98 * testsuite/30_threads/jthread/jthread.cc: Test move assignment.
100 2020-11-11 Jonathan Wakely <jwakely@redhat.com>
102 * include/std/stop_token (_Stop_state_t::_M_requester): Define
103 new struct with members to store and check the thread ID.
104 (_Stop_state_t::_M_request_stop()): Use _M_requester._M_set().
105 (_Stop_state_t::_M_remove_callback(_Stop_cb*)): Use
106 _M_requester._M_is_current_thread().
108 2020-11-11 Jonathan Wakely <jwakely@redhat.com>
110 * include/std/ostream (__syncbuf_base): New class template.
111 (emit_on_flush, noemit_on_flush, flush_emit): New manipulators.
112 * include/std/syncstream (basic_syncbuf): Derive from
113 __syncbuf_base instead of basic_streambuf.
114 (basic_syncbuf::operator=): Remove self-assignment check.
115 (basic_syncbuf::swap): Remove self-swap check.
116 (basic_syncbuf::emit): Do not skip pubsync() call if sequence
118 (basic_syncbuf::sync): Remove no-op pubsync on stringbuf.
119 (basic_syncbuf::overflow): Define override.
120 * testsuite/27_io/basic_syncstream/basic_ops/1.cc: Test
121 basic_osyncstream::put(char_type).
122 * testsuite/27_io/basic_ostream/emit/1.cc: New test.
124 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
126 * config/locale/generic/c_locale.cc (__set_C_locale()): New function
127 to set the "C" locale and return the name of the previous locale.
128 (__convert_to_v<float>, __convert_to_v<double>)
129 (__convert_to_v<long double>): Use __set_C_locale and set failbit on
132 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
134 * include/std/sstream (basic_stringbug, basic_istringstream)
135 (basic_ostringstream, basic_stringstream): Reorder C++20
136 constructors to be declared next to other constructors.
138 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
140 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten patterns.
141 (GLIBCXX_3.4.29): Export new symbols.
142 * include/bits/alloc_traits.h (__allocator_like): New concept.
143 * include/std/sstream (basic_stringbuf::swap): Add exception
145 (basic_stringbuf::str() const): Add ref-qualifier. Use new
146 _M_high_mark function.
147 (basic_stringbuf::str(const SAlloc&) const): Define new function.
148 (basic_stringbuf::str() &&): Likewise.
149 (basic_stringbuf::str(const basic_string<C,T,SAlloc>&)):
151 (basic_stringbuf::str(basic_string<C,T,Alloc>&&)): Likewise.
152 (basic_stringbuf::view() const): Use _M_high_mark.
153 (basic_istringstream::str, basic_ostringstream::str)
154 (basic_stringstream::str): Define new overloads.
155 * src/c++20/sstream-inst.cc (basic_stringbuf::str)
156 (basic_istringstream::str, basic_ostringstream::str)
157 (basic_stringstream::str): Explicit instantiation definitions
159 * testsuite/27_io/basic_istringstream/view/char/1.cc: Add more
161 * testsuite/27_io/basic_istringstream/view/wchar_t/1.cc:
163 * testsuite/27_io/basic_ostringstream/view/char/1.cc:
165 * testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc:
167 * testsuite/27_io/basic_stringstream/view/char/1.cc:
169 * testsuite/27_io/basic_stringstream/view/wchar_t/1.cc:
171 * testsuite/27_io/basic_istringstream/str/char/2.cc: New test.
172 * testsuite/27_io/basic_istringstream/str/wchar_t/2.cc: New test.
173 * testsuite/27_io/basic_ostringstream/str/char/3.cc: New test.
174 * testsuite/27_io/basic_ostringstream/str/wchar_t/3.cc: New test.
175 * testsuite/27_io/basic_stringbuf/str/char/4.cc: New test.
176 * testsuite/27_io/basic_stringbuf/str/wchar_t/4.cc: New test.
177 * testsuite/27_io/basic_stringstream/str/char/5.cc: New test.
178 * testsuite/27_io/basic_stringstream/str/wchar_t/5.cc.cc: New test.
180 2020-11-10 Jonathan Wakely <jwakely@redhat.com>
183 * include/std/sstream (basic_stringbuf::_M_update_egptr)
184 (basic_stringbuf::__xfer_bufptrs::__xfer_bufptrs): Check for
185 null before comparing pointers.
187 2020-11-09 François Dumont <fdumont@gcc.gnu.org>
189 * include/debug/array: Remove.
190 * include/Makefile.am: Remove <debug/array>.
191 * include/Makefile.in: Regenerate.
192 * include/experimental/functional: Adapt.
193 * include/std/array: Move to _GLIBCXX_INLINE_VERSION namespace.
194 * include/std/functional: Adapt.
195 * include/std/span: Adapt.
196 * testsuite/23_containers/array/debug/back1_neg.cc:
197 Remove dg-require-debug-mode. Add -D_GLIBCXX_ASSERTIONS option.
198 * testsuite/23_containers/array/debug/back2_neg.cc: Likewise.
199 * testsuite/23_containers/array/debug/front1_neg.cc: Likewise.
200 * testsuite/23_containers/array/debug/front2_neg.cc: Likewise.
201 * testsuite/23_containers/array/debug/square_brackets_operator1_neg.cc:
203 * testsuite/23_containers/array/debug/square_brackets_operator2_neg.cc:
205 * testsuite/23_containers/array/element_access/60497.cc
206 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
208 * testsuite/23_containers/array/tuple_interface/get_neg.cc
209 * testsuite/23_containers/array/tuple_interface/tuple_element_debug_neg.cc
210 * testsuite/23_containers/array/tuple_interface/tuple_element_neg.cc
212 2020-11-09 François Dumont <fdumont@gcc.gnu.org>
214 * include/debug/assertions.h (__glibcxx_requires_non_empty_range):
215 Remove __builtin_expect.
216 (__glibcxx_requires_subscript): Likewise.
217 (__glibcxx_requires_nonempty): Likewise.
218 * include/debug/formatter.h (__check_singular): Add C++11 constexpr
220 * include/debug/helper_functions.h (__check_singular): Likewise. Skip
221 check if constant evaluated.
222 (__valid_range): Do not skip check if constant evaluated.
223 * include/debug/macros.h (_GLIBCXX_DEBUG_VERIFY_COND_AT): Add
225 (_GLIBCXX_DEBUG_VERIFY_AT_F): Use __glibcxx_assert_1.
226 * testsuite/21_strings/basic_string_view/element_access/char/back_constexpr_neg.cc:
228 * testsuite/21_strings/basic_string_view/element_access/char/constexpr.cc: New test.
229 * testsuite/21_strings/basic_string_view/element_access/char/constexpr_neg.cc: New test.
230 * testsuite/21_strings/basic_string_view/element_access/char/front_back_constexpr.cc:
232 * testsuite/21_strings/basic_string_view/element_access/char/front_constexpr_neg.cc:
234 * testsuite/21_strings/basic_string_view/element_access/wchar_t/back_constexpr_neg.cc:
236 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr.cc: New test.
237 * testsuite/21_strings/basic_string_view/element_access/wchar_t/constexpr_neg.cc: New test.
238 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_constexpr_neg.cc:
240 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_neg.cc: New test.
241 * testsuite/25_algorithms/lower_bound/debug/constexpr_partitioned_pred_neg.cc: New test.
242 * testsuite/25_algorithms/lower_bound/debug/constexpr_valid_range_neg.cc: New test.
243 * testsuite/25_algorithms/lower_bound/debug/partitioned_neg.cc: New test.
244 * testsuite/25_algorithms/lower_bound/debug/partitioned_pred_neg.cc: New test.
245 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_neg.cc: New test.
246 * testsuite/25_algorithms/upper_bound/debug/constexpr_partitioned_pred_neg.cc: New test.
247 * testsuite/25_algorithms/upper_bound/debug/constexpr_valid_range_neg.cc: New test.
248 * testsuite/25_algorithms/upper_bound/debug/partitioned_neg.cc: New test.
249 * testsuite/25_algorithms/upper_bound/debug/partitioned_pred_neg.cc: New test.
251 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
253 * include/bits/uniform_int_dist.h (__detail::_Power_of_2):
254 Document that true result for zero is intentional.
256 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
258 * include/std/bit (__popcount): Remove redundant check for zero.
260 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
263 * libsupc++/exception_ptr.h (exception_ptr::exception_ptr())
264 (exception_ptr::exception_ptr(const exception_ptr&))
265 (exception_ptr::~exception_ptr()): Remove 'always_inline'
266 attributes. Use 'inline' unconditionally.
268 2020-11-09 Jonathan Wakely <jwakely@redhat.com>
271 * include/bits/std_function.h [!__cpp_rtti]: Include <typeinfo>.
273 2020-11-07 Liu Hao <lh_mouse@126.com>
275 * libsupc++/cxxabi.h: (__cxa_atexit): mark with _GLIBCXX_CDTOR_CALLABI
276 (__cxa_thread_atexit): ditto
277 * libsupc++/atexit_thread.cc: (__cxa_atexit): mark with
278 _GLIBCXX_CDTOR_CALLABI
279 (__cxa_thread_atexit): ditto
282 2020-11-06 Jonathan Wakely <jwakely@redhat.com>
284 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten up patterns
285 for basic_stringbuf that refer to __xfer_bufptrs.
287 2020-11-05 Marek Polacek <polacek@redhat.com>
290 * testsuite/20_util/reference_wrapper/lwg2993.cc: Add a dg-warning.
291 * testsuite/25_algorithms/generate_n/87982_neg.cc: Likewise.
293 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
296 * include/std/optional (operator==, operator!=, operator<)
297 (operator>, operator<=, operator>=): Fix types used in
299 * testsuite/20_util/optional/relops/96269.cc: New test.
301 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
304 * src/filesystem/dir.cc (recursive_directory_iterator): Call the
305 right overload of _Dir::advance.
306 * testsuite/experimental/filesystem/iterators/97731.cc: New test.
308 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
311 * include/std/future (__basic_future::_M_get_result): Use
312 nullptr for null pointer constant.
313 * libsupc++/eh_ptr.cc (operator==, operator!=): Remove
315 * libsupc++/exception_ptr.h (_GLIBCXX_EH_PTR_USED): Define
316 macro to conditionally add __attribute__((__used__)).
317 (operator==, operator!=, exception_ptr::exception_ptr())
318 (exception_ptr::exception_ptr(const exception_ptr&))
319 (exception_ptr::~exception_ptr())
320 (exception_ptr::operator=(const exception_ptr&))
321 (exception_ptr::swap(exception_ptr&)): Always define as
322 inline. Add macro to be conditionally "used".
324 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
327 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Add exports.
328 * src/c++20/sstream-inst.cc (basic_stringbuf): Instantiate
329 private constructor taking __xfer_bufptrs.
331 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
333 * include/std/sstream (basic_stringbuf(const allocator_type&):
335 (basic_stringbuf(const basic_string<C,T,SA>&, openmode, const A&)):
336 Call _M_stringbuf_init. Construct _M_string from pointer and length
337 to avoid constraint checks for string view.
338 (basic_stringbuf::view()): Make __sv_type alias local to the
340 (basic_istringstream(const basic_string<C,T,SA>&, openmode, const A&)):
341 Pass string to _M_streambuf instead of constructing a temporary
342 with the wrong allocator.
343 (basic_ostringstream(const basic_string<C,T,SA>&, openmode, const A&)):
345 (basic_stringstream(const basic_string<C,T,SA>&, openmode, const A&)):
347 * src/c++20/sstream-inst.cc: Use string_view and wstring_view
348 typedefs in explicit instantiations.
349 * testsuite/27_io/basic_istringstream/cons/char/1.cc: Add more
350 tests for constructors.
351 * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
352 * testsuite/27_io/basic_stringbuf/cons/char/1.cc: Likewise.
353 * testsuite/27_io/basic_stringbuf/cons/char/2.cc: Likewise.
354 * testsuite/27_io/basic_stringbuf/cons/wchar_t/1.cc: Likewise.
355 * testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
356 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
358 2020-11-05 Jonathan Wakely <jwakely@redhat.com>
360 * include/std/sstream: Adjust whitespace.
362 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
365 * include/std/sstream (basic_stringstream(string_type&&, openmode)):
366 Fix default argument.
367 * testsuite/27_io/basic_stringstream/cons/char/97719.cc: New test.
369 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
371 * testsuite/18_support/96817.cc: Fail fast if the library is
372 configured to not use futexes.
374 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
377 * include/bits/stl_algo.h (search(FIter, FIter, const Searcher):
378 Adjust #if condition.
379 * include/parallel/algo.h (search(FIter, FIter, const Searcher&):
380 Define new overload for C++17.
382 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
385 * doc/xml/manual/evolution.xml: Document change to base class.
386 * doc/html/manual/api.html: Regenerate.
388 2020-11-04 Jonathan Wakely <jwakely@redhat.com>
390 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
391 Use qualified-id to refer to static member functions.
393 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
395 * include/std/syncstream: Include <bits/std_mutex.h>
398 2020-11-03 François Dumont <fdumont@gcc.gnu.org>
400 * config/abi/pre/gnu-versioned-namespace.ver:
401 Add __istream_extract and _Safe_local_iterator_base::_M_attach_single
404 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
406 * src/c++11/mutex.cc [_GLIBCXX_HAVE_TLS] (__once_proxy): Define
407 separately for TLS targets.
408 [!_GLIBCXX_HAVE_TLS] (__get_once_functor_lock_ptr): Replace with ...
409 (set_lock_ptr): ... this. Set new value and return previous
411 [!_GLIBCXX_HAVE_TLS] (__set_once_functor_lock_ptr): Adjust to
413 [!_GLIBCXX_HAVE_TLS] (__once_proxy): Likewise.
415 2020-11-03 Jonathan Wakely <jwakely@redhat.com>
420 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Add new symbols.
421 * include/std/mutex [!_GLIBCXX_HAS_GTHREADS] (once_flag): Define
422 even when gthreads is not supported.
423 (once_flag::_M_once) [_GLIBCXX_HAVE_LINUX_FUTEX]: Change type
424 from __gthread_once_t to int.
425 (once_flag::_M_passive(), once_flag::_M_activate())
426 (once_flag::_M_finish(bool), once_flag::_Active_execution):
427 Define new members for futex and non-threaded implementation.
428 [_GLIBCXX_HAS_GTHREADS] (once_flag::_Prepare_execution): New
430 (call_once): Use new members of once_flag.
431 * src/c++11/mutex.cc (std::once_flag::_M_activate): Define.
432 (std::once_flag::_M_finish): Define.
433 * testsuite/30_threads/call_once/39909.cc: Do not require
435 * testsuite/30_threads/call_once/49668.cc: Likewise.
436 * testsuite/30_threads/call_once/60497.cc: Likewise.
437 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
438 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
439 * testsuite/30_threads/call_once/once_flag.cc: Add test for
440 constexpr constructor.
441 * testsuite/30_threads/call_once/66146.cc: New test.
442 * testsuite/30_threads/call_once/constexpr.cc: Removed.
443 * testsuite/30_threads/once_flag/cons/constexpr.cc: Removed.
445 2020-11-03 Jonathan Yong <10walls@gmail.com>
447 * src/Makefile.am (libstdc___la_LINK): Add lt_host_flags.
448 * src/Makefile.in: Regenerate.
450 2020-11-02 Thomas Rodgers <trodgers@redhat.com>
452 * doc/doxygen/user.cfg.in (INPUT): Add new header.
453 * include/Makefile.am (std_headers): Add new header.
454 * include/Makefile.in: Regenerate.
455 * include/precompiled/stdc++.h: Include new header.
456 * include/std/syncstream: New header.
457 * include/std/version: Add __cpp_lib_syncbuf.
458 * testsuite/27_io/basic_syncbuf/1.cc: New test.
459 * testsuite/27_io/basic_syncbuf/2.cc: Likewise.
460 * testsuite/27_io/basic_syncbuf/basic_ops/1.cc:
462 * testsuite/27_io/basic_syncbuf/requirements/types.cc:
464 * testsuite/27_io/basic_syncbuf/sync_ops/1.cc:
466 * testsuite/27_io/basic_syncstream/1.cc: Likewise.
467 * testsuite/27_io/basic_syncstream/2.cc: Likewise.
468 * testsuite/27_io/basic_syncstream/basic_ops/1.cc:
470 * testsuite/27_io/basic_syncstream/requirements/types.cc:
473 2020-11-01 Jonathan Wakely <jwakely@redhat.com>
475 * include/std/type_traits (is_integral<wchar_t>)
476 (make_unsigned<wchar_t>, make_signed<wchar_t>): Define based
477 on #ifdef __WCHAR_TYPE__ instead of _GLIBCXX_USE_WCHAR_T.
478 * include/bits/cpp_type_traits.h (__is_integer<wchar_t>)
479 (__is_char<wchar_t>): Likewise.
481 2020-10-31 François Dumont <fdumont@gcc.gnu.org>
483 * src/c++17/floating_from_chars.cc (_GLIBCXX_USE_CX11_ABI): Add define.
484 (buffering_string): New.
485 [!_GLIBCXX_USE_CXX11_ABI](reserve_string): New.
487 * src/c++20/sstream-inst.cc: Limit instantiations to
488 _GLIBCXX_USE_CXX11_ABI.
490 2020-10-31 Jonathan Wakely <jwakely@redhat.com>
492 * include/bits/random.h (independent_bit_engine): Fix typo
494 (shuffle_order_engine): Fix incorrect description in comment.
495 * include/bits/random.tcc (__representable_as_double
496 (__p1_representable_as_double): New helper functions.
497 (shuffle_order_engine::operator()): Use double for calculation
498 if (max() - min() + 1) is representable as double.
499 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
502 2020-10-31 Jonathan Wakely <jwakely@redhat.com>
505 * include/bits/hashtable_policy.h (_Prime_rehash_policy)
506 (_Power2_rehash_policy): Use ceil and floor instead of ceill and
508 * src/c++11/hashtable_c++0x.cc (_Prime_rehash_policy): Likewise.
509 Use double instead of long double.
511 2020-10-31 Patrick Palka <ppalka@redhat.com>
514 * include/std/ranges (basic_istream_view::begin): Initialize
515 _Iterator from 'this' instead of '*this'.
516 (basic_istream_view::_Iterator::_Iterator): Adjust constructor
518 (filter_view::_Iterator::_Iterator): Take a filter_view*
519 argument instead of a filter_view& argument.
520 (filter_view::_Sentinel::_Sentinel): Likewise.
521 (filter_view::begin): Initialize _Iterator from 'this' instead
523 (filter_view::end): Likewise.
524 (transform_view::_Iterator::_Iterator): Take a _Parent* instead
526 (filter_view::_Iterator::operator+): Adjust accordingly.
527 (filter_view::_Iterator::operator-): Likewise.
528 (filter_view::begin): Initialize _Iterator from 'this' instead
530 (filter_view::end): Likewise.
531 (join_view::_Iterator): Take a _Parent* instead of a _Parent&.
532 (join_view::_Sentinel): Likewise.
533 (join_view::begin): Initialize _Iterator from 'this' instead of
535 (join_view::end): Initialize _Sentinel from 'this' instead of
537 (split_view::_OuterIter): Take a _Parent& instead of a _Parent*.
538 (split_view::begin): Initialize _OuterIter from 'this' instead
540 (split_view::end): Likewise.
541 * testsuite/std/ranges/97600.cc: New test.
543 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
545 * include/std/ranges (enable_borrowed_view<take_view<T>>)
546 (enable_borrowed_view<drop_view<T>>)
547 (enable_borrowed_view<drop_while_view<T>>)
548 (enable_borrowed_view<reverse_view<T>>)
549 (enable_borrowed_view<common_view<T>>)
550 (enable_borrowed_view<elements_view<T>>): Add partial
551 specializations as per P2017R1.
552 * testsuite/std/ranges/adaptors/conditionally_borrowed.cc:
555 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
558 * include/bits/hashtable_policy.h (_Prime_rehash_policy)
559 (_Power2_rehash_policy): Use double instead of long double.
561 2020-10-30 Jonathan Wakely <jwakely@redhat.com>
563 * testsuite/23_containers/vector/bool/modifiers/insert/31370.cc:
564 Avoid -Wcatch-value warnings.
566 2020-10-30 Patrick Palka <ppalka@redhat.com>
568 * include/std/ranges (__detail::__box): For the partial
569 specialization used by types that are already semiregular,
570 make the default constructor value-initialize the underlying
571 object instead of default-initializing it. Make its in place
572 constructor explicit.
573 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc:
576 2020-10-30 David Edelsohn <dje.gcc@gmail.com>
578 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: XFAIL on AIX.
580 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
582 * config/abi/pre/gnu.ver (GLIBCXX_3.4.21): Tighten patterns
583 for old <sstream> symbols some more.
585 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
587 * include/bits/ranges_util.h (subrange::subrange(R&&)): Use
588 direct-initialization instead of list-initialization, so a
589 potential narrowing conversion from ranges::size(r) to the
590 stored size isn't ill-formed.
592 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
594 * include/bits/parse_numbers.h (_Select_int_base): Avoid
595 narrowing conversion in constant expression.
596 * include/experimental/buffer (buffer_copy): Avoid narrowing
598 * include/experimental/internet (hash<>::operator()): Do not
599 use deprecated 'argument_type' member.
600 * include/std/variant (variant::emplace): Use cast instead
601 of implicit conversion from size_t to narrower unsigned type.
603 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
605 * include/tr1/shared_ptr.h (__shared_count, __shared_ptr)
606 (shared_ptr): Add diagnostic pragmas around uses of auto_ptr.
607 * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
608 Adust dg-error line numbers.
610 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
612 * testsuite/18_support/96817.cc: Avoid -Wunused warnings.
613 * testsuite/20_util/any/assign/2.cc: Likewise.
614 * testsuite/20_util/any/cons/2.cc: Likewise.
615 * testsuite/20_util/align/1.cc: Avoid -Wsign-compare warning.
616 * testsuite/20_util/function/65760.cc: Avoid -Wunused warning.
617 * testsuite/20_util/function/1.cc: Avoid -Wcatch-value warning.
618 * testsuite/20_util/function/cons/move_target.cc: Avoid -Wunused
620 * testsuite/20_util/headers/memory/synopsis.cc: Add exception
622 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Avoid
623 -Wsign-compare warning.
624 * testsuite/20_util/tuple/cons/deduction.cc: Avoid -Wunused
626 * testsuite/20_util/specialized_algorithms/uninitialized_copy/808590-cxx11.cc:
627 Avoid -Wdeprecated-copy warning.
628 * testsuite/21_strings/basic_string/56166.cc: Avoid
629 -Wcatch-value warning.
630 * testsuite/21_strings/basic_string/numeric_conversions/char/stod.cc:
631 Avoid -Wcatch-value warnings.
632 * testsuite/21_strings/basic_string/numeric_conversions/char/stof.cc:
634 * testsuite/21_strings/basic_string/numeric_conversions/char/stoi.cc:
636 * testsuite/21_strings/basic_string/numeric_conversions/char/stol.cc:
638 * testsuite/21_strings/basic_string/numeric_conversions/char/stold.cc:
640 * testsuite/21_strings/basic_string/numeric_conversions/char/stoll.cc:
642 * testsuite/21_strings/basic_string/numeric_conversions/char/stoul.cc:
644 * testsuite/21_strings/basic_string/numeric_conversions/char/stoull.cc:
646 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stod.cc:
648 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stof.cc:
650 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoi.cc:
652 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stol.cc:
654 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stold.cc:
656 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoll.cc:
658 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoul.cc:
660 * testsuite/21_strings/basic_string/numeric_conversions/wchar_t/stoull.cc:
662 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc:
663 Prune additional diagnostics.
664 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc:
666 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc:
668 * testsuite/21_strings/headers/string/synopsis.cc: Add exception
670 * testsuite/22_locale/locale/cons/12352.cc: Define sized
671 delete operators to avoid warnings.
672 * testsuite/23_containers/deque/modifiers/swap/1.cc: Add
673 exception specification.
674 * testsuite/23_containers/forward_list/cons/11.cc: Avoid
675 -Wdeprecated-copy warning.
676 * testsuite/23_containers/headers/bitset/synopsis.cc: Add
677 exception specification.
678 * testsuite/23_containers/headers/deque/synopsis.cc: Likewise.
679 * testsuite/23_containers/headers/forward_list/synopsis.cc:
681 * testsuite/23_containers/headers/list/synopsis.cc: Likewise.
682 * testsuite/23_containers/headers/map/synopsis.cc: Likewise.
683 * testsuite/23_containers/headers/queue/synopsis.cc: Likewise.
684 * testsuite/23_containers/headers/set/synopsis.cc: Likewise.
685 * testsuite/23_containers/headers/vector/synopsis.cc: Likewise.
686 * testsuite/23_containers/list/modifiers/swap/1.cc: Likewise.
687 * testsuite/23_containers/map/modifiers/swap/1.cc: Likewise.
688 * testsuite/23_containers/multimap/modifiers/swap/1.cc:
690 * testsuite/23_containers/multiset/modifiers/swap/1.cc:
692 * testsuite/23_containers/set/modifiers/swap/1.cc: Likewise.
693 * testsuite/23_containers/unordered_set/56267-2.cc: Avoid
694 -Wdeprecated-copy warning.
695 * testsuite/23_containers/vector/bool/23632.cc: Avoid
696 -Wempty-body warning.
697 * testsuite/23_containers/vector/modifiers/swap/1.cc: Add
698 exception specification.
699 * testsuite/25_algorithms/heap/moveable2.cc: Fix misplaced
700 parentheses around arguments.
701 * testsuite/25_algorithms/sample/1.cc: Use return value.
702 * testsuite/25_algorithms/search/searcher.cc: Avoid -Wunused
704 * testsuite/27_io/basic_ostream/exceptions/char/9561.cc:
706 * testsuite/27_io/basic_ostream/exceptions/wchar_t/9561.cc:
708 * testsuite/27_io/filesystem/operations/remove_all.cc: Avoid
709 -Wsign-compare warning.
710 * testsuite/experimental/any/assign/2.cc: Avoid -Wunused warnings.
711 * testsuite/experimental/any/cons/2.cc: Likewise.
712 * testsuite/experimental/filesystem/operations/remove_all.cc:
713 Avoid -Wign-compare warning.
714 * testsuite/experimental/memory/observer_ptr/cons/cons.cc:
716 * testsuite/experimental/memory_resource/null_memory_resource.cc:
718 * testsuite/experimental/source_location/1.cc: Avoid -Waddress
720 * testsuite/ext/pod_char_traits.cc: Avoid -Wunused warning.
721 * testsuite/ext/vstring/modifiers/clear/56166.cc: Avoid
723 * testsuite/std/concepts/concepts.lang/concept.swappable/swap.cc:
724 Avoid -Wunused warning.
725 * testsuite/std/concepts/concepts.lang/concept.swappable/swappable.cc:
727 * testsuite/tr1/2_general_utilities/shared_ptr/cons/43820_neg.cc:
728 Prune additional warnings.
729 * testsuite/tr1/3_function_objects/function/1.cc: Avoid
730 -Wcatch-value warning.
731 * testsuite/util/replacement_memory_operators.h: Define sized
732 delete to avoid warnings.
733 * testsuite/util/testsuite_api.h (_NonDefaultConstructible): Add
734 user-declared assignment operator to stop -Wdeprecated-copy
736 * testsuite/util/testsuite_containers.h: Avoid -Wunused warning.
737 * testsuite/util/testsuite_iterators.h: Avoid -Wsign-compare
739 * testsuite/util/testsuite_new_operators.h: Define sized deleted.
741 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
743 * testsuite/25_algorithms/all_of/constexpr.cc: Check result of
745 * testsuite/25_algorithms/any_of/constexpr.cc: Likewise.
746 * testsuite/25_algorithms/binary_search/constexpr.cc: Likewise.
747 * testsuite/25_algorithms/copy_backward/constexpr.cc: Likewise.
748 * testsuite/25_algorithms/count/constexpr.cc: Likewise.
749 * testsuite/25_algorithms/equal/constexpr.cc: Likewise.
750 * testsuite/25_algorithms/equal_range/constexpr.cc: Likewise.
751 * testsuite/25_algorithms/fill/constexpr.cc: Likewise.
752 * testsuite/25_algorithms/find_end/constexpr.cc: Likewise.
753 * testsuite/25_algorithms/find_if/constexpr.cc: Likewise.
754 * testsuite/25_algorithms/is_partitioned/constexpr.cc: Likewise.
755 * testsuite/25_algorithms/is_permutation/constexpr.cc: Likewise.
756 * testsuite/25_algorithms/is_sorted_until/constexpr.cc:
758 * testsuite/25_algorithms/lexicographical_compare/constexpr.cc:
760 * testsuite/25_algorithms/lower_bound/constexpr.cc: Likewise.
761 * testsuite/25_algorithms/merge/constexpr.cc: Likewise.
762 * testsuite/25_algorithms/mismatch/constexpr.cc: Likewise.
763 * testsuite/25_algorithms/none_of/constexpr.cc: Likewise.
764 * testsuite/25_algorithms/partition_copy/constexpr.cc: Likewise.
765 * testsuite/25_algorithms/remove_copy/constexpr.cc: Likewise.
766 * testsuite/25_algorithms/remove_copy_if/constexpr.cc: Likewise.
767 * testsuite/25_algorithms/remove_if/constexpr.cc: Likewise.
768 * testsuite/25_algorithms/replace_if/constexpr.cc: Likewise.
769 * testsuite/25_algorithms/reverse/constexpr.cc: Likewise.
770 * testsuite/25_algorithms/reverse_copy/constexpr.cc: Likewise.
771 * testsuite/25_algorithms/rotate_copy/constexpr.cc: Likewise.
772 * testsuite/25_algorithms/search/constexpr.cc: Likewise.
773 * testsuite/25_algorithms/set_difference/constexpr.cc: Likewise.
774 * testsuite/25_algorithms/set_intersection/constexpr.cc:
776 * testsuite/25_algorithms/set_symmetric_difference/constexpr.cc:
778 * testsuite/25_algorithms/set_union/constexpr.cc: Likewise.
779 * testsuite/25_algorithms/unique_copy/constexpr.cc: Likewise.
780 * testsuite/25_algorithms/upper_bound/constexpr.cc: Likewise.
782 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
784 * include/bits/uniform_int_dist.h (_Power_of_two): Add
786 (uniform_int_distribution::_S_nd): Add static_assert to ensure
787 the wider type is twice as wide as the result type.
788 (uniform_int_distribution::__generate_impl): Add static_assert
789 and declare variables as constexpr where appropriate.
790 (uniform_int_distribution:operator()): Likewise. Only consider
791 the uniform random bit generator's range of possible results
792 when deciding whether _S_nd can be used, not the __uctype type.
794 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
796 * include/ext/rope (_Refcount_Base::_M_ref_count): Remove
798 (_Refcount_Base::_M_decr()): Likewise.
800 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
802 * include/bits/std_function.h (_Function_handler<void, void>):
803 Define explicit specialization used for invalid target types.
804 (_Base_manager::_M_manager) [!__cpp_rtti]: Return null.
805 (function::target_type()): Check for null pointer.
806 (function::target()): Define unconditionall. Fix bug with
807 const_cast of function pointer type.
808 (function::target() const): Define unconditionally, but
809 only use RTTI if enabled.
810 * testsuite/20_util/function/target_no_rtti.cc: New test.
812 2020-10-29 Patrick Palka <ppalka@redhat.com>
814 * testsuite/25_algorithms/lexicographical_compare/constrained.cc:
815 (test03): Fix initializing the vector vy with the array y of size 4.
817 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
819 * include/bits/hashtable_policy.h (_Local_iterator_base): Cast
820 value to avoid -Wsign-compare warnings.
821 * include/bits/regex.h (sub_match::_M_str): Avoid narrowing
823 * include/bits/regex_compiler.tcc (_Compiler::_M_quantifier):
824 Initialize variable to avoid -Wmaybe-uninitialized warning.
825 * include/bits/shared_ptr_base.h (_Sp_counted_deleter::_Impl):
826 Reorder mem-initializer-list to avoid -Wreorder warning.
827 * include/bits/stl_tree.h (_Rb_tree_impl): Explicitly
828 initialize base class in copy constructor.
829 * include/debug/safe_iterator.h (_Safe_iterator): Likewise.
830 * include/ext/debug_allocator.h: Reorder mem-initializer-list
831 to avoid -Wreorder warning.
832 * include/ext/throw_allocator.h (throw_allocator_limit)
833 (throw_allocator_random): Add user-declared assignment operators
834 to avoid -Wdeprecated-copy warnings.
836 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
838 * include/bits/uniform_int_dist.h (uniform_int_distribution):
839 Rename _UniformRandomNumberGenerator template parameters to
840 _UniformRandomBitGenerator, as per P0346R1.
842 2020-10-29 Jonathan Wakely <jwakely@redhat.com>
844 * include/std/sstream (basic_stringbuf(__string_type&&, openmode)):
845 Call _M_init_syncbuf to set up get/put areas. Also qualify
848 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
850 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Remove duplicate
852 (CXXABI_1.3.13): Restore missing piece.
854 2020-10-28 Thomas Rodgers <trodgers@redhat.com>
856 * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++20.
857 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): New symbols.
858 * configure: Regenerate.
859 * include/std/sstream:
860 (basic_stringbuf::basic_stringbuf(allocator const&)): New constructor.
861 (basic_stringbuf::basic_stringbuf(openmode, allocator const&)): Likewise.
862 (basic_stringbuf::basic_stringbuf(basic_string&&, openmode)): Likewise.
863 (basic_stringbuf::basic_stringbuf(basic_stringbuf&&, allocator const&)):
865 (basic_stringbuf::get_allocator()): New method.
866 (basic_stringbuf::view()): Likewise.
867 (basic_istringstream::basic_istringstream(basic_string&&, openmode)):
869 (basic_istringstream::basic_istringstream(openmode, allocator const&)):
871 (basic_istringstream::view()): New method.
872 (basic_ostringstream::basic_ostringstream(basic_string&&, openmode)):
874 (basic_ostringstream::basic_ostringstream(openmode, allocator const&)):
876 (basic_ostringstream::view()): New method.
877 (basic_stringstream::basic_stringstream(basic_string&&, openmode)):
879 (basic_stringstream::basic_stringstream(openmode, allocator const&)):
881 (basic_stringstream::view()): New method.
882 * src/Makefile.in: Add c++20 directory.
883 * src/Makefile.am: Regenerate.
884 * src/c++20/Makefile.am: Add makefile for new sub-directory.
885 * src/c++20/Makefile.in: Generate.
886 * src/c++20/sstream-inst.cc: New file defining explicit
887 instantiations for basic_stringbuf, basic_istringstream,
888 basic_ostringstream, and basic_stringstream member functions
890 * testsuite/27_io/basic_stringbuf/cons/char/2.cc: New test.
891 * testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
892 * testsuite/27_io/basic_stringbuf/view/char/1.cc: Likewise.
893 * testsuite/27_io/basic_stringbuf/view/wchar_t/1.cc: Likewise.
894 * testsuite/27_io/basic_istringstream/cons/char/1.cc: Likewise.
895 * testsuite/27_io/basic_istringstream/cons/wchar_t/1.cc: Likewise.
896 * testsuite/27_io/basic_istringstream/view/char/1.cc: Likewise.
897 * testsuite/27_io/basic_istringstream/view/wchar_t/1.cc: Likewise.
898 * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
899 * testsuite/27_io/basic_ostringstream/cons/wchar_t/1.cc: Likewise.
900 * testsuite/27_io/basic_ostringstream/view/char/1.cc: Likewise.
901 * testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc: Likewise.
902 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
903 * testsuite/27_io/basic_stringstream/cons/wchar_t/1.cc: Likewise.
904 * testsuite/27_io/basic_stringstream/view/char/1.cc: Likewise.
905 * testsuite/27_io/basic_stringstream/view/wchar_t/1.cc: Likewise.
907 2020-10-28 Patrick Palka <ppalka@redhat.com>
910 * include/std/chrono (year_month_weekday::operator sys_days):
911 Cast the result of index() to int so that the initializer for
912 days{} is sign-extended when it's converted to the underlying
914 * testsuite/std/time/year_month_weekday/3.cc: New test.
916 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
918 * libsupc++/new_opnt.cc (new): Add comment about forced unwind
921 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
924 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_BUFSIZ):
926 * config/os/mingw32/os_defines.h (_GLIBCXX_BUFSIZ):
928 * include/bits/fstream.tcc: Use _GLIBCXX_BUFSIZ instead
930 * include/ext/stdio_filebuf.h: Likewise.
931 * include/std/fstream (_GLIBCXX_BUFSIZ): Define.
933 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
936 * include/bits/valarray_after.h (_DEFINE_EXPR_UNARY_OPERATOR)
937 (_DEFINE_EXPR_BINARY_OPERATOR, _DEFINE_EXPR_BINARY_FUNCTION):
938 Use elaborated-type-specifier and qualified-id to avoid
939 ambiguities with QNX system headers.
940 * testsuite/26_numerics/valarray/95592.cc: New test.
942 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
945 * include/std/span (span): Reorder data members to match common
946 implementations of struct iovec.
947 * testsuite/23_containers/span/layout_compat.cc: New test.
949 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
951 * include/std/functional (std::_Placeholder): Define for C++98
952 as well as later standards.
953 * include/tr1/functional (std::placeholders::_1 etc): Declare
955 (tr1::_Placeholder): Replace with using-declaration for
957 (tr1::placeholders::_1 etc.): Replace with using-directive for
960 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
962 * include/tr1/ell_integral.tcc (__ellint_rf, __ellint_rd)
963 (__ellint_rc, __ellint_rj): Remove unused variables.
964 * include/tr1/modified_bessel_func.tcc (__airy): Likewise.
966 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
968 * include/bits/locale_conv.h (__str_codecvt_out_all):
969 Add cast to compare operands of the same signedness.
970 * include/bits/locale_facets_nonio.tcc
971 (time_get::_M_extract_wday_or_month): Likewise.
972 * include/bits/sstream.tcc (basic_stringbuf::overflow):
974 * include/tr1/legendre_function.tcc (__sph_legendre): Use
975 unsigned for loop variable.
977 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
979 * include/std/charconv (from_chars): Add noexcept to match
980 definitions in src/c++17/floating_from_chars.cc
982 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
984 * src/c++17/fs_dir.cc (fs::directory_iterator::operator*):
985 Add noexcept. Do not throw on precondition violation.
987 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
989 * include/bits/fs_path.h (path::_List::begin, path::_List::end):
990 Add noexcept to match definitions in src/c++17/fs_path.cc.
992 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
994 * testsuite/experimental/memory_resource/new_delete_resource.cc:
995 Add missing <cstdint> header.
996 * testsuite/experimental/memory_resource/resource_adaptor.cc:
999 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
1001 * include/experimental/executor (strand::_State): Fix thinko.
1003 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
1005 * include/std/type_traits (__is_nt_constructible_impl): Remove.
1006 (__is_nothrow_constructible_impl): Adjust.
1007 (is_nothrow_default_constructible): Likewise.
1008 (__is_nt_assignable_impl): Remove.
1009 (__is_nothrow_assignable_impl): Adjust.
1011 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
1014 * libsupc++/new_opa.cc: Declare size_t in global namespace.
1015 Remove unused header.
1017 2020-10-26 Stephan Bergmann <sbergman@redhat.com>
1019 * include/bits/shared_ptr_base.h
1020 (_Sp_counted_base::_M_add_ref_lock_nothrow(): Add noexcept to
1021 definitions to match declaration.
1022 (__shared_count(const __weak_count&, nothrow_t)): Add noexcept
1023 to declaration to match definition.
1025 2020-10-23 Patrick Palka <ppalka@redhat.com>
1027 * include/std/ranges (single_view::single_view): Mark the
1028 in place constructor explicit as per LWG 3428.
1029 (take_view): Remove the constraint on the deduction guide's
1030 template parameter as per LWG 3447.
1032 2020-10-23 Jonathan Wakely <jwakely@redhat.com>
1034 * include/experimental/memory_resource: Include <tuple>.
1035 (polymorphic_allocator::construct): Qualify forward_as_tuple.
1036 * include/std/memory_resource: Likewise.
1038 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
1040 * testsuite/30_threads/condition_variable/members/68519.cc:
1041 Define recent_epoch_float_clock::duration to meet the Cpp17Clock
1044 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
1046 * include/std/shared_mutex: Only include <condition_variable>
1047 when pthread_rwlock_t and POSIX timers are not available.
1048 (__cpp_lib_shared_mutex, __cpp_lib_shared_timed_mutex): Change
1049 value to be type 'long'.
1050 * include/std/version (__cpp_lib_shared_mutex)
1051 (__cpp_lib_shared_timed_mutex): Likewise.
1053 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
1055 * include/Makefile.am: Add new header.
1056 * include/Makefile.in: Regenerate.
1057 * include/bits/shared_ptr.h: Include <iosfwd>.
1058 * include/bits/shared_ptr_base.h: Include required headers here
1059 directly, instead of in <memory>.
1060 * include/bits/uses_allocator_args.h: New file. Move utility
1061 functions for uses-allocator construction from <memory> to here.
1062 Only define the utility functions when concepts are available.
1063 (__cpp_lib_make_obj_using_allocator): Define non-standard
1065 * include/std/condition_variable: Remove unused headers.
1066 * include/std/future: Likewise.
1067 * include/std/memory: Remove headers that are not needed
1068 directly, and are now inclkuded where they're needed. Include
1069 new <bits/uses_allocator_args.h> header.
1070 * include/std/memory_resource: Include only the necessary
1071 headers. Use new feature test macro to detect support for the
1073 * include/std/scoped_allocator: Likewise.
1074 * include/std/version (__cpp_lib_make_obj_using_allocator):
1077 2020-10-22 Olivier Hainque <hainque@adacore.com>
1079 * crossconfig.m4: Turn vxworks matcher into vxworks*.
1080 * configure.host: Likewise.
1081 * configure: Regenerate.
1083 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
1085 * include/bits/shared_ptr.h (shared_ptr(const weak_ptr&, nothrow_t)):
1087 * include/bits/shared_ptr_base.h (_Sp_counted_base::_M_add_ref_lock):
1088 Remove specializations and just call _M_add_ref_lock_nothrow.
1089 (__shared_count, __shared_ptr): Use nullptr for null pointer
1091 (__shared_count(const __weak_count&)): Use _M_add_ref_lock_nothrow
1092 instead of _M_add_ref_lock.
1093 (__shared_count(const __weak_count&, nothrow_t)): Add noexcept.
1094 (__shared_ptr::operator bool()): Add noexcept.
1095 (__shared_ptr(const __weak_ptr&, nothrow_t)): Add noexcept.
1097 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
1100 * include/bits/ranges_util.h (tuple_size<subrange>)
1101 (tuple_element<I, cv subrange>): Move here from ...
1102 * include/std/ranges: ... here.
1103 * testsuite/std/ranges/subrange/97512.cc: New test.
1105 2020-10-21 Thomas Rodgers <trodgers@redhat.com>
1107 * include/pstl/algorithm_impl.h: Update file.
1108 * include/pstl/execution_impl.h: Likewise.
1109 * include/pstl/glue_algorithm_impl.h: Likewise.
1110 * include/pstl/glue_memory_impl.h: Likewise.
1111 * include/pstl/glue_numeric_impl.h: Likewise.
1112 * include/pstl/memory_impl.h: Likewise.
1113 * include/pstl/numeric_impl.h: Likewise.
1114 * include/pstl/parallel_backend.h: Likewise.
1115 * include/pstl/parallel_backend_serial.h: Likewise.
1116 * include/pstl/parallel_backend_tbb.h: Likewise.
1117 * include/pstl/parallel_backend_utils.h: Likewise.
1118 * include/pstl/pstl_config.h: Likewise.
1119 * include/pstl/unseq_backend_simd.h: Likewise.
1121 2020-10-20 François Dumont <fdumont@gcc.gnu.org>
1123 * include/bits/hashtable_policy.h
1124 (_Hash_node_value_base<>): Remove _Hash_node_base inheritance.
1125 (_Hash_node_code_cache<bool _Cache_hash_code>): New.
1126 (_Hash_node_value<typename _Value, bool _Cache_hash_code>): New.
1127 (_Hash_node<>): Inherits _Hash_node_base<> and _Hash_node_value<>.
1128 (_Map_base<>::__node_type): Remove.
1129 (_Map_base<>::iterator): Remove.
1130 (_Insert_base<>::__hash_cached): New.
1131 (_Insert_base<>::__constant_iterators): New.
1132 (_Insert_base<>::__hashtable_alloc): New.
1133 (_Insert_base<>::__node_type): Remove.
1134 (_Insert_base<>::__node_ptr): New.
1135 (_Hash_code_base<>): Remove specializations.
1136 (_Hash_code_base<>::__node_type): Remove.
1137 (_Hash_code_base<>::_M_bucket_index(const __node_type*, size_t)):
1139 (_Hash_code_base<>::_M_bucket_index(const _Hash_node_value<>&, size_t)):
1141 (_Hash_code_base<>::_M_store_code(__node_type*, __hash_code)):
1143 (_Hash_code_base<>::_M_store_code(_Hash_node_code_cache<>&, __hash_code)):
1145 (_Hash_code_base<>::_M_copy_code(__node_type*, const __node_type*)):
1147 (_Hash_code_base<>::_M_copy_code(_Hash_node_code_cache<>&,
1148 const _Hash_node_code_base<>&)): ...this.
1149 (_Hashtable_base<>::__constant_iterators): Remove.
1150 (_Hashtable_base<>::__unique_keys): Remove.
1151 (_Hashtable_base<>::__node_type): Remove.
1152 (_Hashtable_base<>::iterator): Remove.
1153 (_Hashtable_base<>::const_iterator): Remove.
1154 (_Hashtable_base<>::local_iterator): Remove.
1155 (_Hashtable_base<>::const_local_iterator): Remove.
1156 (_Hashtable_base<>::__ireturn_type): Remove.
1157 (_Hashtable_base<>::_Equal_hash_code<>::_S_equals): Replace by...
1158 (_Hashtable_base<>::_S_equals(__hash_code, const _Hash_node_code_hash<>&)):
1160 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals): Replace by...
1161 (_Hashtable_base<>::_S_node_equals(__hash_code,
1162 const _Hash_node_code_hash<>&)): ...this.
1163 (_Hashtable_base<>::_Equal_hash_code<>): Remove.
1164 (_Hashtable_base<>::_M_equals): Adapt.
1165 (_Hashtable_baxe<>::_M_node_equals): Adapt.
1166 (_Equality<>::_M_equal): Adapt.
1167 (_Hashtable_alloc<>::__node_ptr): New.
1168 (_Hashtable_alloc<>::__bucket_type): Rename into...
1169 (_Hashtable_alloc<>::__node_base_ptr): ...this.
1170 (_Hashtable_alloc<>::__bucket_alloc_type): Rename into...
1171 (_Hashtable_alloc<>::__buckets_alloc_type): ...this.
1172 (_Hashtable_alloc<>::__bucket_alloc_traits): Rename into...
1173 (_Hashtable_alloc<>::__buckets_alloc_traits): ...this.
1174 (_Hashtable_alloc<>::__buckets_ptr): New.
1175 (_Hashtable_alloc<>::_M_allocate_node): Adapt.
1176 (_Hashtable_alloc<>::_M_deallocate_node): Adapt.
1177 (_Hashtable_alloc<>::_M_deallocate_node_ptr): Adapt.
1178 (_Hashtable_alloc<>::_M_deallocate_nodes): Adapt.
1179 (_Hashtable_alloc<>::_M_allocate_buckets): Adapt.
1180 (_Hashtable_alloc<>::_M_deallocate_buckets): Adapt.
1181 * include/bits/hashtable.h (_Hashtable<>): Adapt.
1183 2020-10-20 Aldy Hernandez <aldyh@redhat.com>
1185 * testsuite/21_strings/basic_string/capacity/1.cc: Pass
1186 -Wno-stringop-overflow to test.
1188 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
1191 * include/std/coroutine (__noop_coro_frame): Replace with
1192 noop_coroutine_handle::__frame.
1193 (__dummy_resume_destroy): Define inline in __frame.
1194 (__noop_coro_fr): Replace with noop_coroutine_handle::_S_fr
1195 and define as inline.
1196 * testsuite/18_support/coroutines/95917.cc: New test.
1198 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
1200 * include/std/coroutine (coroutine_handle<_Promise>): Remove
1201 base class. Add constructors, conversions, accessors etc. as
1202 proposed for LWG 3460.
1203 (coroutine_handle<noop_coroutine_promise>): Likewise.
1204 * testsuite/18_support/coroutines/lwg3460.cc: New test.
1206 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
1208 * include/bits/unique_ptr.h (make_unique_for_overwrite): Define
1210 * testsuite/20_util/unique_ptr/creation/array_neg.cc: Remove
1211 unused header. Adjust standard reference.
1212 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: New test.
1213 * testsuite/20_util/unique_ptr/creation/for_overwrite__neg.cc: New test.
1215 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
1217 * include/std/tuple (_Head_base<Idx, Head, true>): Use reserved
1218 form of __no_unique_address__ attribute because
1219 no_unique_address is not reserved prior to C++20.
1221 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
1223 * include/bits/node_handle.h (_Node_handle_common): Replace
1224 std::optional with custom type.
1225 * testsuite/20_util/variant/exception_safety.cc: Add missing
1228 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
1230 * include/precompiled/expc++.h: Removed.
1232 2020-10-17 Ville Voutilainen <ville.voutilainen@gmail.com>
1235 * include/std/variant
1236 (__gen_vtable_impl<>::_S_apply_single_alt):
1237 Diagnose visitor return type mismatches here..
1238 (__gen_vtable_impl</*base case*/>::_S_apply):
1241 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
1243 * include/std/concepts: Fix typos in copyright notice.
1244 * include/std/ranges: Likewise.
1246 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1249 * include/std/sstream (basic_stringbuf::str()): Check for
1250 null egptr() before comparing to non-null pptr().
1252 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1254 * testsuite/21_strings/basic_string/modifiers/assign/char/move_assign_optim.cc:
1255 Do not generate debug info.
1256 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/move_assign_optim.cc:
1259 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1261 * include/bits/basic_string.h (basic_string(const Alloc&))
1262 (basic_string(const basic_string&)
1263 (basic_string(const CharT*, size_type, const Alloc&))
1264 (basic_string(const CharT*, const Alloc&))
1265 (basic_string(size_type, CharT, const Alloc&))
1266 (basic_string(initializer_list<CharT>, const Alloc&))
1267 (basic_string(InputIterator, InputIterator, const Alloc&)):
1268 Define inline in class body.
1269 * include/bits/basic_string.tcc (basic_string(const Alloc&))
1270 (basic_string(const basic_string&)
1271 (basic_string(const CharT*, size_type, const Alloc&))
1272 (basic_string(const CharT*, const Alloc&))
1273 (basic_string(size_type, CharT, const Alloc&))
1274 (basic_string(initializer_list<CharT>, const Alloc&))
1275 (basic_string(InputIterator, InputIterator, const Alloc&)):
1276 Move definitions into class body.
1278 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1280 * testsuite/lib/libstdc++.exp (check_effective_target_cxx11-abi):
1281 Add comments about which test flags get used by the check.
1283 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1285 * testsuite/21_strings/basic_string/allocator/char/copy.cc: Make
1286 comment more precise about what isn't supported by COW strings.
1287 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
1289 * testsuite/21_strings/basic_string/allocator/char/move.cc:
1291 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
1293 * testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
1295 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
1297 * testsuite/21_strings/basic_string/allocator/char/swap.cc:
1299 * testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
1301 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
1303 * testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
1305 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
1307 * testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
1309 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
1311 * testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
1314 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1316 * testsuite/21_strings/basic_string/allocator/char/minimal.cc:
1317 Do not require cxx11-abi effective target.
1318 * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
1320 * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
1322 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
1324 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
1325 (basic_string(const _CharT*, const _Alloc&)): Constrain to
1326 require an allocator-like type to fix CTAD ambiguity (LWG 3706).
1327 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
1329 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
1332 2020-10-13 Nuno Lopes <nuno.lopes@ist.utl.pt>
1334 * include/bits/stl_algo.h (any_of): Fix incorrect description
1337 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
1339 * doc/xml/manual/evolution.xml: Document some API changes
1341 * doc/xml/manual/intro.xml: Document LWG 2499.
1342 * doc/xml/manual/status_cxx2020.xml: Update status.
1343 * doc/html/*: Regenerate.
1345 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
1347 * doc/xml/book.txml: Remove trailing whitespace.
1348 * doc/xml/chapter.txml: Likewise.
1349 * doc/xml/class.txml: Likewise.
1350 * doc/xml/gnu/fdl-1.3.xml: Likewise.
1351 * doc/xml/gnu/gpl-3.0.xml: Likewise.
1352 * doc/xml/manual/abi.xml: Likewise.
1353 * doc/xml/manual/algorithms.xml: Likewise.
1354 * doc/xml/manual/allocator.xml: Likewise.
1355 * doc/xml/manual/appendix_contributing.xml: Likewise.
1356 * doc/xml/manual/appendix_free.xml: Likewise.
1357 * doc/xml/manual/appendix_porting.xml: Likewise.
1358 * doc/xml/manual/atomics.xml: Likewise.
1359 * doc/xml/manual/auto_ptr.xml: Likewise.
1360 * doc/xml/manual/backwards_compatibility.xml: Likewise.
1361 * doc/xml/manual/bitmap_allocator.xml: Likewise.
1362 * doc/xml/manual/build_hacking.xml: Likewise.
1363 * doc/xml/manual/codecvt.xml: Likewise.
1364 * doc/xml/manual/concurrency.xml: Likewise.
1365 * doc/xml/manual/concurrency_extensions.xml: Likewise.
1366 * doc/xml/manual/configure.xml: Likewise.
1367 * doc/xml/manual/containers.xml: Likewise.
1368 * doc/xml/manual/ctype.xml: Likewise.
1369 * doc/xml/manual/debug.xml: Likewise.
1370 * doc/xml/manual/debug_mode.xml: Likewise.
1371 * doc/xml/manual/diagnostics.xml: Likewise.
1372 * doc/xml/manual/documentation_hacking.xml: Likewise.
1373 * doc/xml/manual/evolution.xml: Likewise.
1374 * doc/xml/manual/internals.xml: Likewise.
1375 * doc/xml/manual/intro.xml: Likewise.
1376 * doc/xml/manual/io.xml: Likewise.
1377 * doc/xml/manual/iterators.xml: Likewise.
1378 * doc/xml/manual/locale.xml: Likewise.
1379 * doc/xml/manual/localization.xml: Likewise.
1380 * doc/xml/manual/messages.xml: Likewise.
1381 * doc/xml/manual/mt_allocator.xml: Likewise.
1382 * doc/xml/manual/numerics.xml: Likewise.
1383 * doc/xml/manual/parallel_mode.xml: Likewise.
1384 * doc/xml/manual/policy_data_structures.xml: Likewise.
1385 * doc/xml/manual/prerequisites.xml: Likewise.
1386 * doc/xml/manual/shared_ptr.xml: Likewise.
1387 * doc/xml/manual/spine.xml: Likewise.
1388 * doc/xml/manual/status_cxxtr1.xml: Likewise.
1389 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
1390 * doc/xml/manual/strings.xml: Likewise.
1391 * doc/xml/manual/support.xml: Likewise.
1392 * doc/xml/manual/test.xml: Likewise.
1393 * doc/xml/manual/test_policy_data_structures.xml: Likewise.
1394 * doc/xml/manual/using.xml: Likewise.
1395 * doc/xml/manual/using_exceptions.xml: Likewise.
1396 * doc/xml/manual/utilities.xml: Likewise.
1397 * doc/html/*: Regenerate.
1399 2020-10-12 Patrick Palka <ppalka@redhat.com>
1401 * include/std/ranges (take_while_view::begin): Constrain the
1402 const overload further as per LWG 3450.
1403 (take_while_view::end): Likewise.
1404 * testsuite/std/ranges/adaptors/take_while.cc: Add test for LWG
1407 2020-10-12 Patrick Palka <ppalka@redhat.com>
1410 * include/std/ranges (take_view::_CI): Define this alias
1411 template as per LWG 3449 and remove ...
1412 (take_view::_Sentinel::_CI): ... this type alias.
1413 (take_view::_Sentinel::operator==): Adjust use of _CI
1414 accordingly. Define a second overload that accepts an iterator
1415 of the opposite constness as per LWG 3449.
1416 (take_while_view::_Sentinel::operator==): Likewise.
1417 * testsuite/std/ranges/adaptors/95322.cc: Add tests for LWG 3449.
1419 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
1421 * doc/doxygen/user.cfg.in: Update to Doxygen 1.8.20 format.
1423 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
1425 * doc/doxygen/user.cfg.in (PREDEFINED): Use __cplusplus=201703L
1426 so that C++17 features are documented.
1428 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
1430 * include/bits/stl_algobase.h (copy, move, copy_backward)
1431 (move_backward): Fix documentation for returned iterator.
1433 2020-10-12 Martin Sebor <msebor@redhat.com>
1436 * libsupc++/new (operator new): Add attribute alloc_size and malloc.
1438 2020-10-11 Clement Chigot <clement.chigot@atos.net>
1440 * config/os/aix/t-aix: Add complementary mode object file to
1443 2020-10-10 Jonathan Wakely <jwakely@redhat.com>
1446 * doc/html/manual/source_code_style.html: Regenerate.
1447 * doc/xml/manual/appendix_contributing.xml: Add __deref to
1449 * include/debug/functions.h (_Irreflexive_checker::__deref):
1451 * testsuite/17_intro/badnames.cc: Check __deref.
1453 2020-10-10 Ville Voutilainen <ville.voutilainen@gmail.com>
1455 * include/std/variant (__check_visitor_result):
1456 Use size_t for indexes.
1457 (__check_visitor_results): Likewise.
1459 2020-10-09 Ville Voutilainen <ville.voutilainen@gmail.com>
1462 * include/std/variant (__deduce_visit_result): Add a nested ::type.
1463 (__gen_vtable_impl</*base case*/>::_S_apply):
1464 Check the visitor return type.
1465 (__same_types): New.
1466 (__check_visitor_result): Likewise.
1467 (__check_visitor_results): Likewise.
1468 (visit(_Visitor&&, _Variants&&...)): Use __check_visitor_results
1469 in case we're visiting just one variant.
1470 * testsuite/20_util/variant/visit_neg.cc: Adjust.
1472 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1475 * include/bits/random.tcc (seed_seq::generate): Use uint32_t for
1476 calculations. Also split the first loop into three loops to
1477 avoid branching on k on every iteration, resolving PR 94823.
1478 * testsuite/26_numerics/random/seed_seq/97311.cc: New test.
1479 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-erro
1482 2020-10-09 Daniel Lemire <lemire@gmail.com>
1484 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
1485 New member function implementing Lemire's "nearly divisionless"
1487 (uniform_int_distribution::operator()): Use _S_nd when the range
1488 of the URBG is the full width of the result type.
1490 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1492 * testsuite/Makefile.am: Set and export variable separately.
1493 * testsuite/Makefile.in: Regenerate.
1495 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1497 * scripts/check_performance: Use gnu++11 instead of gnu++0x.
1498 * testsuite/Makefile.am (check-performance): Export CXXFLAGS to
1500 * testsuite/Makefile.in: Regenerate.
1502 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1504 * testsuite/performance/26_numerics/random_dist.cc: New test.
1506 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
1508 * testsuite/util/testsuite_performance.h (report_header): Remove
1511 2020-10-08 Patrick Palka <ppalka@redhat.com>
1514 * include/bits/ranges_uninitialized.h:
1515 (__construct_at_fn::operator()): Rewrite in terms of
1516 std::construct_at. Declare it conditionally noexcept. Qualify
1517 calls to declval in its requires-clause.
1518 * testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
1521 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
1524 * include/bits/random.tcc
1525 (discrete_distribution::param_type::_M_initialize)
1526 (piecewise_constant_distribution::param_type::_M_initialize)
1527 (piecewise_linear_distribution::param_type::_M_initialize):
1528 Add assertions for positive sums..
1529 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
1532 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
1534 * include/bits/ios_base.h (ios_base::failure): Add constructors
1535 takeing error_code argument. Add code() member function.
1536 * testsuite/27_io/ios_base/failure/cxx11.cc: Allow test to
1537 run for the old ABI but do not check for derivation from
1539 * testsuite/27_io/ios_base/failure/error_code.cc: New test.
1541 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
1543 * include/bits/random.h (__detail::_Mod): Revert last change.
1544 (__detail::__mod): Do not use _Mod for a==0 case.
1545 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
1546 Check other cases with a==0. Also check runtime results.
1547 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
1550 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
1552 * include/bits/random.h (__detail::_Mod): Avoid divide by zero.
1553 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
1556 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
1558 * include/bits/random.h (seed_seq(initializer_list<T>)): Rename
1559 parameter to use reserved name.
1560 * include/bits/ranges_algo.h (shift_left, shift_right): Rename
1561 template parameters to use reserved name.
1562 * libsupc++/exception_ptr.h (exception_ptr): Likewise for
1563 parameters and local variables.
1564 * testsuite/17_intro/names.cc: Check "il". Do not check "d" and
1567 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
1570 * config/abi/pre/gnu.ver (CXXABI_1.3.13): New symbol version.
1571 (exception_ptr::_M_addref(), exception_ptr::_M_release()):
1573 * libsupc++/eh_ptr.cc (exception_ptr::exception_ptr()):
1574 Remove out-of-line definition.
1575 (exception_ptr::exception_ptr(const exception_ptr&)):
1577 (exception_ptr::~exception_ptr()): Likewise.
1578 (exception_ptr::operator=(const exception_ptr&)):
1580 (exception_ptr::swap(exception_ptr&)): Likewise.
1581 (exception_ptr::_M_addref()): Add branch prediction.
1582 * libsupc++/exception_ptr.h (exception_ptr::operator bool):
1584 [!_GLIBCXX_EH_PTR_COMPAT] (operator==, operator!=): Define
1585 inline as hidden friends. Remove declarations at namespace
1587 (exception_ptr::exception_ptr()): Define inline.
1588 (exception_ptr::exception_ptr(const exception_ptr&)):
1590 (exception_ptr::~exception_ptr()): Likewise.
1591 (exception_ptr::operator=(const exception_ptr&)):
1593 (exception_ptr::swap(exception_ptr&)): Likewise.
1594 * testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.13.
1595 * testsuite/18_support/exception_ptr/90295.cc: New test.
1597 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
1599 * include/std/ranges (join_view): Remove deduction guide.
1600 (views::join): Add explicit template argument list to prevent
1601 deducing the wrong type.
1602 * testsuite/std/ranges/adaptors/join.cc: Move test for LWG 3474
1604 * testsuite/std/ranges/adaptors/join_lwg3474.cc: Removed.
1606 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
1608 * include/bits/regex.h: Use __int_traits<int> instead of
1609 std::numeric_limits<int>.
1610 * include/bits/uniform_int_dist.h: Use __int_traits<T>::__max
1611 instead of std::numeric_limits<T>::max().
1612 * include/bits/hashtable_policy.h: Use size_t(-1) instead of
1613 std::numeric_limits<size_t>::max().
1614 * include/std/regex: Include <ext/numeric_traits.h>.
1615 * include/std/string_view: Use typedef for __int_traits<int>.
1616 * src/c++11/hashtable_c++0x.cc: Use size_t(-1) instead of
1617 std::numeric_limits<size_t>::max().
1618 * testsuite/std/ranges/iota/96042.cc: Include <limits>.
1619 * testsuite/std/ranges/iota/difference_type.cc: Likewise.
1620 * testsuite/std/ranges/subrange/96042.cc: Likewise.
1622 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
1624 * include/std/numeric: Move all #include directives to the top
1626 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line
1628 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1630 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
1632 * config/abi/pre/gnu.ver: Add new symbol.
1633 * include/bits/functexcept.h (__throw_bad_array_new_length):
1634 Declare new function.
1635 * include/ext/malloc_allocator.h (malloc_allocator::allocate):
1636 Throw bad_array_new_length for impossible sizes (LWG 3190).
1637 * include/ext/new_allocator.h (new_allocator::allocate):
1639 * include/std/memory_resource (polymorphic_allocator::allocate)
1640 (polymorphic_allocator::allocate_object): Use new function,
1641 __throw_bad_array_new_length.
1642 * src/c++11/functexcept.cc (__throw_bad_array_new_length):
1644 * testsuite/20_util/allocator/lwg3190.cc: New test.
1646 2020-10-05 Mike Crowe <mac@mcrowe.com>
1649 * include/bits/atomic_futex.h:
1650 (__atomic_futex_unsigned::_M_load_when_equal_until): Use target
1651 clock duration type when rounding.
1652 * testsuite/30_threads/async/async.cc (test_pr91486_wait_for):
1653 Rename from test_pr91486.
1654 (float_steady_clock): New class for test.
1655 (test_pr91486_wait_until): New test.
1657 2020-10-05 Mike Crowe <mac@mcrowe.com>
1659 * testsuite/20_util/duration_cast/rounding_c++11.cc: Copy
1660 rounding.cc and alter to support compilation for C++11 and to
1661 test std::chrono::__detail::ceil.
1663 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
1665 * testsuite/29_atomics/atomic_float/value_init.cc: Use float
1666 instead of double so that __atomic_load_8 isn't needed.
1668 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
1670 * testsuite/18_support/96817.cc: Use terminate handler that
1673 2020-10-02 Patrick Palka <ppalka@redhat.com>
1675 * include/bits/stl_iterator.h (reverse_iterator::iter_move):
1676 Define for C++20 as per P0896.
1677 (reverse_iterator::iter_swap): Likewise.
1678 (move_iterator::operator*): Apply P0896 changes for C++20.
1679 (move_iterator::operator[]): Likewise.
1680 * testsuite/24_iterators/reverse_iterator/cust.cc: New test.
1682 2020-10-01 Jonathan Wakely <jwakely@redhat.com>
1684 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
1685 Do not try to dereference return value of __atomic_load_n.
1687 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
1689 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
1690 (_GLIBCXX_GUARD_SET_AND_RELEASE): Define for EABI.
1692 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
1694 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_IS_SAME):
1695 Define for GCC 11 or when !__is_identifier(__is_same).
1696 (_GLIBCXX_BUILTIN_IS_SAME_AS): Remove.
1697 * include/std/type_traits (is_same, is_same_v): Replace uses
1698 of _GLIBCXX_BUILTIN_IS_SAME_AS.
1700 2020-09-28 Patrick Palka <ppalka@redhat.com>
1702 * include/std/ranges (filter_view): Declare the data member
1703 _M_base last instead of first, and adjust constructors' member
1704 initializer lists accordingly.
1705 (transform_view): Likewise.
1706 (take_view): Likewise.
1707 (take_while_view): Likewise.
1708 (drop_view): Likewise.
1709 (drop_while_view): Likewise.
1710 (join_view): Likewise.
1711 (split_view): Likewise (and tweak nearby formatting).
1712 (reverse_view): Likewise.
1713 * testsuite/std/ranges/adaptors/sizeof.cc: Update expected
1716 2020-09-28 Patrick Palka <ppalka@redhat.com>
1718 * testsuite/std/ranges/adaptors/sizeof.cc: New test.
1720 2020-09-28 Patrick Palka <ppalka@redhat.com>
1722 * include/bits/ranges_util.h (subrange::_M_end): Give it
1723 [[no_unique_address]].
1724 * testsuite/std/ranges/subrange/sizeof.cc: New test.
1726 2020-09-28 Patrick Palka <ppalka@redhat.com>
1728 * include/std/ranges (iota_view::_M_bound): Give it
1729 [[no_unique_address]].
1730 * testsuite/std/ranges/iota/iota_view.cc: Check that an
1731 unbounded iota_view has minimal size.
1733 2020-09-27 Clement Chigot <clement.chigot@atos.net>
1735 * config/os/aix/t-aix: Use $(AR) without -X32_64.
1737 2020-09-26 Jonathan Wakely <jwakely@redhat.com>
1740 * include/ext/atomicity.h (__gnu_cxx::__is_single_threaded()):
1741 New function wrapping __libc_single_threaded if available.
1742 (__exchange_and_add_dispatch, __atomic_add_dispatch): Use it.
1743 * libsupc++/guard.cc (__cxa_guard_acquire, __cxa_guard_abort)
1744 (__cxa_guard_release): Likewise.
1745 * testsuite/18_support/96817.cc: New test.
1747 2020-09-25 Jonathan Wakely <jwakely@redhat.com>
1749 * libsupc++/Makefile.am: Remove redundant -std=gnu++1z flags.
1750 * libsupc++/Makefile.in: Regenerate.
1752 2020-09-24 Antony Polukhin <antoshkka@gmail.com>
1755 * include/std/type_traits (invoke_result, is_invocable)
1756 (is_invocable_r, is_nothrow_invocable, is_nothrow_invocable_r):
1757 Add static_asserts to make sure that the arguments of the type
1758 traits are not misused with incomplete types.
1759 * testsuite/20_util/invoke_result/incomplete_args_neg.cc: New test.
1760 * testsuite/20_util/is_invocable/incomplete_args_neg.cc: New test.
1761 * testsuite/20_util/is_invocable/incomplete_neg.cc: New test.
1762 * testsuite/20_util/is_nothrow_invocable/incomplete_args_neg.cc:
1764 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: Check
1765 for error on incomplete type usage in trait.
1767 2020-09-24 Patrick Palka <ppalka@redhat.com>
1769 * include/std/ranges (__detail::__boxable): Split out the
1770 associated constraints of __box into here.
1771 (__detail::__box): Use the __boxable concept. Define a leaner
1772 partial specialization for semiregular types.
1773 (single_view::_M_value): Give it [[no_unique_address]].
1774 (filter_view::_M_pred): Likewise.
1775 (transform_view::_M_fun): Likewise.
1776 (take_while_view::_M_pred): Likewise.
1777 (drop_while_view::_M_pred):: Likewise.
1778 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc: New
1781 2020-09-24 Jonathan Wakely <jwakely@redhat.com>
1783 * doc/xml/manual/configure.xml: Correct name of option.
1784 * doc/html/*: Regenerate.
1786 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
1789 * src/c++17/fs_path.cc (path::_Parser::root_path()): Check
1790 for empty string before inspecting the first character.
1791 * testsuite/27_io/filesystem/path/append/source.cc: Append
1792 empty string_view to path.
1794 2020-09-22 Glen Joseph Fernandes <glenjofe@gmail.com>
1796 * include/bits/align.h (align): Fix overflow handling.
1797 * testsuite/20_util/align/3.cc: New test.
1799 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
1801 * include/Makefile.am: Add new headers and adjust for renamed
1803 * include/Makefile.in: Regenerate.
1804 * include/bits/iterator_concepts.h: Adjust for renamed header.
1805 * include/bits/range_access.h (ranges::*): Move to new
1806 <bits/ranges_base.h> header.
1807 * include/bits/ranges_algobase.h: Include new <bits/ranges_base.h>
1808 header instead of <ranges>.
1809 * include/bits/ranges_algo.h: Include new <bits/ranges_util.h>
1811 * include/bits/range_cmp.h: Moved to...
1812 * include/bits/ranges_cmp.h: ...here.
1813 * include/bits/ranges_base.h: New header.
1814 * include/bits/ranges_util.h: New header.
1815 * include/experimental/string_view: Include new
1816 <bits/ranges_base.h> header.
1817 * include/std/functional: Adjust for renamed header.
1818 * include/std/ranges (ranges::view_base, ranges::enable_view)
1819 (ranges::dangling, ranges::borrowed_iterator_t): Move to new
1820 <bits/ranges_base.h> header.
1821 (ranges::view_interface, ranges::subrange)
1822 (ranges::borrowed_subrange_t): Move to new <bits/ranges_util.h>
1824 * include/std/span: Include new <bits/ranges_base.h> header.
1825 * include/std/string_view: Likewise.
1826 * testsuite/24_iterators/back_insert_iterator/pr93884.cc: Add
1827 missing <ranges> header.
1828 * testsuite/24_iterators/front_insert_iterator/pr93884.cc:
1831 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
1835 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
1836 Use correct value category in __use_alloc call.
1837 * testsuite/20_util/tuple/cons/96803.cc: Check with constructors
1838 that require correct value category to be used.
1840 2020-09-22 Patrick Palka <ppalka@redhat.com>
1842 * include/std/span (span::front): Remove static_assert.
1843 (span::back): Likewise.
1844 (span::operator[]): Likewise.
1845 * testsuite/23_containers/span/back_neg.cc: Rewrite to verify
1846 that we check the preconditions of back() only when it's called.
1847 * testsuite/23_containers/span/front_neg.cc: Likewise for
1849 * testsuite/23_containers/span/index_op_neg.cc: Likewise for
1852 2020-09-22 Patrick Palka <ppalka@redhat.com>
1854 * include/bits/stl_algo.h (__sample): Exit early when the
1855 input range is empty.
1856 * testsuite/25_algorithms/sample/3.cc: New test.
1858 2020-09-22 Patrick Palka <ppalka@redhat.com>
1860 * include/bits/stl_algo.h (for_each_n): Mark constexpr for C++20.
1861 (search): Likewise for the overload that takes a searcher.
1862 * testsuite/25_algorithms/for_each/constexpr.cc: Test constexpr
1864 * testsuite/25_algorithms/search/constexpr.cc: Test constexpr
1865 std::search overload that takes a searcher.
1867 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1869 * include/bits/c++config (__replacement_assert): Add noreturn
1871 (__glibcxx_assert_impl): Use __builtin_expect to hint that the
1872 assertion is expected to pass.
1874 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1876 * include/std/ranges (drop_view::begin()): Adjust constraints
1877 to match the correct condition for O(1) ranges::next (LWG 3482).
1878 * testsuite/std/ranges/adaptors/drop.cc: Check that iterator is
1879 cached for non-sized_range.
1881 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1883 * include/std/ranges (transform_view, elements_view): Relax
1884 constraints on operator- for iterators, as per LWG 3483.
1885 * testsuite/std/ranges/adaptors/elements.cc: Check that we
1886 can take the difference of two iterators from a non-random
1888 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
1890 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1893 * include/bits/align.h (align) [!_GLIBCXX_USE_C99_STDINT_TR1]:
1895 (assume_aligned): Do not use __builtin_assume_aligned during
1896 constant evaluation.
1897 * testsuite/20_util/assume_aligned/1.cc: Improve test.
1898 * testsuite/20_util/assume_aligned/97132.cc: New test.
1900 2020-09-20 Jonathan Wakely <jwakely@redhat.com>
1903 * include/std/functional (bind_front): Fix order of parameters
1904 in is_nothrow_constructible_v specialization.
1905 * testsuite/20_util/function_objects/bind_front/97101.cc: New test.
1907 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
1909 * include/std/memory: Move #include <bits/align.h> inside C++11
1910 conditional includes.
1912 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
1914 * include/Makefile.am (bits_headers): Add new header.
1915 * include/Makefile.in: Regenerate.
1916 * include/bits/align.h: New file.
1917 * include/std/memory (align): Move definition to bits/align.h.
1918 (assume_aligned): Likewise.
1920 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
1922 * include/std/chrono [C++17] (chrono::__detail::ceil): Add
1923 using declaration to make chrono::ceil available for internal
1924 use with a consistent name.
1925 (chrono::__detail::__ceil_impl): New function template.
1926 (chrono::__detail::ceil): Use __ceil_impl to compare and
1927 increment the value. Remove SFINAE constraint.
1929 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
1931 * include/bits/regex_error.h (__throw_regex_error): Fix
1932 parameter declaration and use reserved attribute names.
1934 2020-09-11 Mike Crowe <mac@mcrowe.com>
1936 * include/std/condition_variable (condition_variable::wait_until):
1937 Convert delta to steady_clock duration before adding to current
1938 steady_clock time to avoid rounding errors described in PR68519.
1939 (condition_variable::wait_for): Simplify calculation of absolute
1940 time by using chrono::__detail::ceil in both overloads.
1941 * testsuite/30_threads/condition_variable/members/68519.cc:
1942 (test_wait_for): Renamed from test01. Replace unassigned val
1943 variable with constant false. Reduce scope of mx and cv
1944 variables to just test_wait_for function.
1945 (test_wait_until): Add new test case.
1947 2020-09-11 Mike Crowe <mac@mcrowe.com>
1950 * include/bits/atomic_futex.h
1951 (__atomic_futex_unsigned::_M_load_when_equal_for)
1952 (__atomic_futex_unsigned::_M_load_when_equal_until): Use
1953 __detail::ceil to convert delta to the reference clock
1954 duration type to avoid resolution problems.
1955 * include/std/chrono (__detail::ceil): Move implementation
1956 of std::chrono::ceil into private namespace so that it's
1957 available to pre-C++17 code.
1958 * testsuite/30_threads/async/async.cc (test_pr91486):
1959 Test __atomic_futex_unsigned::_M_load_when_equal_for.
1961 2020-09-11 Mike Crowe <mac@mcrowe.com>
1963 * include/bits/atomic_futex.h
1964 (__atomic_futex_unsigned::_M_load_when_equal_until): Add
1965 loop on generic _Clock to check the timeout against _Clock
1966 again after _M_load_when_equal_until returns indicating a
1968 * testsuite/30_threads/async/async.cc: Invent slow_clock
1969 that runs at an eleventh of steady_clock's speed. Use it
1970 to test the user-supplied-clock variant of
1971 __atomic_futex_unsigned::_M_load_when_equal_until works
1972 generally with test03 and loops correctly when the timeout
1973 time hasn't been reached in test04.
1975 2020-09-11 Mike Crowe <mac@mcrowe.com>
1978 * include/bits/atomic_futex.h (__atomic_futex_unsigned): Change
1979 __clock_t typedef to use steady_clock so that unknown clocks are
1980 synced to it rather than system_clock. Change existing __clock_t
1981 overloads of _M_load_and_text_until_impl and
1982 _M_load_when_equal_until to use system_clock explicitly. Remove
1983 comment about DR 887 since these changes address that problem as
1984 best as we currently able.
1986 2020-09-11 Mike Crowe <mac@mcrowe.com>
1989 * config/abi/pre/gnu.ver: Update for addition of
1990 __atomic_futex_unsigned_base::_M_futex_wait_until_steady.
1991 * include/bits/atomic_futex.h (__atomic_futex_unsigned_base):
1992 Add comments to clarify that _M_futex_wait_until and
1993 _M_load_and_test_until use CLOCK_REALTIME.
1994 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady)
1995 (__atomic_futex_unsigned_base::_M_load_and_text_until_steady):
1996 New member functions that use CLOCK_MONOTONIC.
1997 (__atomic_futex_unsigned_base::_M_load_and_test_until_impl)
1998 (__atomic_futex_unsigned_base::_M_load_when_equal_until): Add
1999 overloads that accept a steady_clock time_point and use the
2000 new member functions.
2001 * src/c++11/futex.cc: Include headers required for
2003 (futex_clock_monotonic_flag): New constant to tell futex to
2004 use CLOCK_MONOTONIC to match existing futex_clock_realtime_flag.
2005 (futex_clock_monotonic_unavailable): New global to store the
2006 result of trying to use CLOCK_MONOTONIC.
2007 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady): Add
2008 new variant of _M_futex_wait_until that uses CLOCK_MONOTONIC to
2009 support waiting using steady_clock.
2011 2020-09-11 Mike Crowe <mac@mcrowe.com>
2013 * src/c++11/futex.cc: Add new constants for required futex
2014 flags. Add futex_clock_realtime_unavailable flag to store
2015 result of trying to use FUTEX_CLOCK_REALTIME.
2016 (__atomic_futex_unsigned_base::_M_futex_wait_until): Try to
2017 use FUTEX_WAIT_BITSET with FUTEX_CLOCK_REALTIME and only
2018 fall back to using gettimeofday and FUTEX_WAIT if that's not
2021 2020-09-11 Mike Crowe <mac@mcrowe.com>
2023 * testsuite/30_threads/async/async.cc (test02): Test steady_clock
2024 with std::future::wait_until.
2025 (test03): Add new test templated on clock type waiting for future
2026 associated with async to resolve.
2027 (main): Call test03 to test both system_clock and steady_clock.
2029 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
2030 Christophe Lyon <christophe.lyon@linaro.org>
2032 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
2034 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
2035 Christophe Lyon <christophe.lyon@linaro.org>
2037 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
2039 2020-09-11 Christophe Lyon <christophe.lyon@linaro.org>
2041 * include/bits/regex_error.h: Avoid warning with -fno-exceptions.
2043 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2045 * include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in_all):
2046 Add casts to compare types of the same signedness.
2048 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2050 * include/bits/ranges_algobase.h (__equal_fn): Remove unused
2053 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2055 * include/std/version (__cpp_lib_array_constexpr):
2056 (__cpp_lib_constexpr_char_traits): Only define C++17 value when
2059 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2061 * include/experimental/bits/shared_ptr.h (shared_ptr(auto_ptr&&))
2062 (operator=(auto_ptr&&)): Add diagnostic pragmas to suppress
2063 warnings for uses of std::auto_ptr.
2064 * include/experimental/type_traits (is_literal_type_v):
2065 Likewise, for use of std::is_literal_type.
2066 * include/std/condition_variable (condition_variable_any::_Unlock):
2067 Likewise, for use of std::uncaught_exception.
2069 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2071 * include/bits/fs_path.h (path::_List::type()): Avoid narrowing
2073 * include/std/chrono (operator+(const year&, const years&)):
2076 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2078 * include/bits/codecvt.h (codecvt_byname): Remove names of
2081 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2083 * include/bits/locale_facets_nonio.tcc: Adjust whitespace.
2085 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
2087 * include/c_global/cmath (__lerp): Avoid -Wparentheses warnings.
2089 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
2091 * include/bits/atomic_base.h: Fix -Wunused-variable
2093 * include/ext/new_allocator.h: Fix -Wunused-parameter
2096 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2098 * include/bits/stl_iterator.h (counted_iterator): Add assertions
2099 to check preconditions added by LWG 3472.
2101 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2104 * src/c++17/memory_resource.cc (munge_options): Round
2105 max_blocks_per_chunk to a multiple of four.
2106 (__pool_resource::_M_alloc_pools()): Simplify slightly.
2107 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
2108 Check that valid pointers are returned when small values are
2109 used for max_blocks_per_chunk.
2111 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
2114 * include/std/memory_resource (monotonic_buffer_resource::do_allocate):
2115 Use __builtin_expect when checking if a new buffer needs to be
2116 allocated from the upstream resource, and for checks for edge
2117 cases like zero sized buffers and allocations.
2118 * src/c++17/memory_resource.cc (aligned_size): New class template.
2119 (aligned_ceil): New helper function to round up to a given
2121 (monotonic_buffer_resource::chunk): Replace _M_size and _M_align
2122 with an aligned_size member. Remove _M_canary member. Change _M_next
2123 to pointer instead of unaligned buffer.
2124 (monotonic_buffer_resource::chunk::allocate): Round up to multiple
2125 of 64 instead of to power of two. Check for size overflow. Remove
2126 redundant check for minimum required alignment.
2127 (monotonic_buffer_resource::chunk::release): Adjust for changes
2129 (monotonic_buffer_resource::_M_new_buffer): Use aligned_ceil.
2130 (big_block): Replace _M_size and _M_align with aligned_size
2132 (big_block::big_block): Check for size overflow.
2133 (big_block::size, big_block::align): Adjust to use aligned_size.
2134 (big_block::alloc_size): Use aligned_ceil.
2135 (munge_options): Use aligned_ceil.
2136 (__pool_resource::allocate): Use big_block::align for alignment.
2137 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Check
2138 upstream resource gets expected values for impossible sizes.
2139 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
2140 Likewise. Adjust checks for expected alignment in existing test.
2142 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
2144 * include/std/chrono (duration::_S_gcd): Use invariant that
2145 neither value is zero initially.
2147 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
2149 * include/std/ranges (__box): Simplify constraints as per LWG 3477.
2151 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
2154 * include/std/tuple (_TupleConstraints<true, T...>): Use
2155 alternative is_constructible instead of std::is_constructible.
2156 * testsuite/20_util/tuple/cons/96592.cc: New test.
2158 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
2160 * include/std/chrono (duration::_S_gcd): Use iterative algorithm
2161 for C++14 and later.
2162 * include/std/numeric (__detail::__gcd): Replace recursive
2163 Euclidean algorithm with iterative version of binary GCD algorithm.
2164 * testsuite/26_numerics/gcd/1.cc: Test additional inputs.
2165 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
2166 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
2167 * testsuite/experimental/numeric/gcd.cc: Test additional inputs.
2168 * testsuite/26_numerics/gcd/2.cc: New test.
2170 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
2173 * testsuite/experimental/numeric/92978.cc: Use experimental::lcm
2176 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
2179 * include/bits/cpp_type_traits.h (__is_memcmp_ordered):
2180 New trait that says if memcmp can be used for ordering.
2181 (__is_memcmp_ordered_with): Likewise, for two types.
2182 * include/bits/deque.tcc (__lex_cmp_dit): Use new traits
2183 instead of __is_byte and __numeric_traits.
2184 (__lexicographical_compare_aux1): Likewise.
2185 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
2187 * include/bits/stl_algobase.h (__lexicographical_compare_aux1)
2188 (__is_byte_iter): Likewise.
2189 * include/std/array (operator<=>): Likewise. Only use memcmp
2190 when std::is_constant_evaluated() is false.
2191 * testsuite/23_containers/array/comparison_operators/96851.cc:
2193 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
2194 Adjust dg-error line numbers.
2196 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
2198 * include/bits/stl_iterator.h: Include <bits/exception_defines.h>
2199 for definitions of __try, __catch and __throw_exception_again.
2200 (counted_iterator::operator++(int)): Use __throw_exception_again
2202 * libsupc++/new: Include <bits/exception.h> not <exception>.
2203 * libsupc++/new_opvnt.cc: Include <bits/exception_defines.h>.
2204 * testsuite/18_support/destroying_delete.cc: Include
2205 <type_traits> for std::is_same_v definition.
2206 * testsuite/20_util/variant/index_type.cc: Qualify size_t.
2208 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
2211 * include/bits/c++config (__glibcxx_assert_impl): Remove
2212 do-while so that uses of the macro need to add it.
2213 (__glibcxx_assert): Rename macro for runtime assertions
2214 to __glibcxx_assert_2.
2215 (__glibcxx_assert_1): Define macro for constexpr assertions.
2216 (__glibcxx_assert): Define macro for constexpr and runtime
2218 * include/bits/range_access.h (ranges::advance): Remove
2219 redundant precondition checks during constant evaluation.
2220 * include/parallel/base.h (_GLIBCXX_PARALLEL_ASSERT): Always
2221 use do-while in macro expansion.
2222 * include/std/ranges (iota_view::iota_view(W, B)): Remove
2225 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
2227 * include/std/chrono (duration::_S_gcd(intmax_t, intmax_t)):
2228 New helper function for finding GCD of two positive intmax_t
2230 (duration::__divide): New helper alias for dividing one period
2232 (duration::__is_harmonic): Use __divide not ratio_divide.
2233 (duration(const duration<R2, P2>&)): Require the duration rep
2234 types to be convertible.
2235 * testsuite/20_util/duration/cons/dr2094.cc: New test.
2236 * testsuite/20_util/duration/requirements/reduced_period.cc:
2237 Fix definition of unused member functions in test type.
2238 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
2239 Adjust expected errors.
2241 2020-08-29 Jonathan Wakely <jwakely@redhat.com>
2243 * include/std/numeric (__detail::__absu(bool)): Make deleted
2244 function a function template, so it will be chosen for calls
2245 with an explicit template argument list.
2246 * testsuite/26_numerics/gcd/gcd_neg.cc: Add dg-prune-output.
2247 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
2249 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
2251 * include/std/chrono (common_type): Fix partial specializations
2252 for a single duration type to use the common_type of the rep.
2253 (duration::operator+, duration::operator-): Fix return types
2254 to also use the common_type of the rep.
2255 * testsuite/20_util/duration/requirements/reduced_period.cc:
2256 Check duration using a rep that has common_type specialized.
2258 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
2261 * include/std/numeric (__abs_integral): Replace with ...
2262 (__detail::__absu): New function template that returns an
2263 unsigned type, guaranteeing it can represent the most
2264 negative signed value.
2265 (__detail::__gcd, __detail::__lcm): Require arguments to
2266 be unsigned and therefore already non-negative.
2267 (gcd, lcm): Convert arguments to absolute value as unsigned
2268 type before calling __detail::__gcd or __detail::__lcm.
2269 * include/experimental/numeric (gcd, lcm): Likewise.
2270 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust expected
2272 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
2273 * testsuite/26_numerics/gcd/92978.cc: New test.
2274 * testsuite/26_numerics/lcm/92978.cc: New test.
2275 * testsuite/experimental/numeric/92978.cc: New test.
2277 2020-08-27 Jonathan Wakely <jwakely@redhat.com>
2279 * include/std/chrono (__duration_common_type): Ensure the
2280 reduced ratio is used. Remove unused partial specialization
2281 using __failure_type.
2282 (common_type): Pass reduced ratios to __duration_common_type.
2283 Add partial specializations for simple cases involving a single
2284 duration or time_point type.
2285 (duration::period): Use reduced ratio.
2286 (duration::operator+(), duration::operator-()): Return duration
2287 type using the reduced ratio.
2288 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
2289 Adjust expected errors.
2290 * testsuite/20_util/duration/requirements/reduced_period.cc: New test.
2292 2020-08-27 Patrick Palka <ppalka@redhat.com>
2294 * include/std/chrono (year_month::operator+): Properly handle a
2295 month value of 0 by casting the month value to int before
2296 subtracting 1 from it so that the difference is sign-extended in
2297 the subsequent addition.
2298 * testsuite/std/time/year_month/1.cc: Test adding months to a
2299 year_month whose month component is below or above the
2300 normalized range of [1,12].
2302 2020-08-27 Patrick Palka <ppalka@redhat.com>
2304 * include/std/chrono
2305 (__detail::__months_years_conversion_disambiguator): Define.
2306 (year_month::operator+=): Templatize the 'months'-based overload
2307 so that the 'years'-based overload is selected in case of
2308 equally-ranked implicit conversion sequences to both 'months'
2309 and 'years' from the supplied argument.
2310 (year_month::operator-=): Likewise.
2311 (year_month::operator+): Likewise.
2312 (year_month::operator-): Likewise.
2313 (year_month_day::operator+=): Likewise.
2314 (year_month_day::operator-=): Likewise.
2315 (year_month_day::operator+): Likewise.
2316 (year_month_day::operator-): Likewise.
2317 (year_month_day_last::operator+=): Likewise.
2318 (year_month_day_last::operator-=): Likewise.
2319 (year_month_day_last::operator+): Likewise
2320 (year_month_day_last::operator-): Likewise.
2321 (year_month_day_weekday::operator+=): Likewise
2322 (year_month_day_weekday::operator-=): Likewise.
2323 (year_month_day_weekday::operator+): Likewise.
2324 (year_month_day_weekday::operator-): Likewise.
2325 (year_month_day_weekday_last::operator+=): Likewise
2326 (year_month_day_weekday_last::operator-=): Likewise.
2327 (year_month_day_weekday_last::operator+): Likewise.
2328 (year_month_day_weekday_last::operator-): Likewise.
2329 (testsuite/std/time/year_month/2.cc): New test.
2330 (testsuite/std/time/year_month_day/2.cc): New test.
2331 (testsuite/std/time/year_month_day_last/2.cc): New test.
2332 (testsuite/std/time/year_month_weekday/2.cc): New test.
2333 (testsuite/std/time/year_month_weekday_last/2.cc): New test.
2334 * testsuite/std/time/year_month/2.cc: New file.
2335 * testsuite/std/time/year_month_day/2.cc: New file.
2336 * testsuite/std/time/year_month_day_last/2.cc: New file.
2337 * testsuite/std/time/year_month_weekday/2.cc: New file.
2338 * testsuite/std/time/year_month_weekday_last/2.cc: New file.
2340 2020-08-27 Patrick Palka <ppalka@redhat.com>
2343 * include/std/ranges (transform_view::sentinel::__distance_from):
2344 Give this a deduced return type.
2345 (transform_view::sentinel::operator-): Adjust the return type so
2346 that it's based on the constness of the iterator rather than
2347 that of the sentinel.
2348 * testsuite/std/ranges/adaptors/95322.cc: Refer to LWG 3488.
2350 2020-08-27 Patrick Palka <ppalka@redhat.com>
2352 * include/std/ranges (elements_view::begin): Adjust constraints.
2353 (elements_view::end): Likewise.
2354 (elements_view::_Sentinel::operator==): Templatize to take both
2355 _Iterator<true> and _Iterator<false>.
2356 (elements_view::_Sentinel::operator-): Likewise.
2357 * testsuite/std/ranges/adaptors/elements.cc: Add testcase for
2358 the example from P1994R1.
2359 * testsuite/std/ranges/adaptors/lwg3406.cc: New test.
2361 2020-08-27 Patrick Palka <ppalka@redhat.com>
2363 * include/std/ranges (elements_view::end): Replace these two
2364 overloads with four new overloads.
2365 (elements_view::_Iterator::operator==): Remove.
2366 (elements_view::_Iterator::operator-): Likewise.
2367 (elements_view::_Sentinel): Define.
2369 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2371 * include/std/tuple (_Tuple_impl): Whitespaces changes for
2372 consistent indentation. Also use __enable_if_t alias template.
2374 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2378 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
2379 Replace parameter pack with a type parameter and a pack and pass
2380 the first type to __use_alloc.
2381 * testsuite/20_util/tuple/cons/96803.cc: New test.
2383 2020-08-26 Patrick Palka <ppalka@redhat.com>
2385 * include/std/chrono (year_month_weekday::operator==): Compare
2386 weekday_indexed instead of weekday.
2387 * testsuite/std/time/year_month_weekday/1.cc: Augment testcase.
2389 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2391 * include/bits/hashtable_policy.h (_Hash_code_base): Change
2392 index of _Hashtable_ebo_helper base class.
2393 * testsuite/23_containers/unordered_map/dup_types.cc: New test.
2395 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
2398 * include/experimental/string_view (basic_string_view):
2399 Enable debug assertions.
2400 * include/std/string_view (basic_string_view):
2403 2020-08-26 François Dumont <fdumont@gcc.gnu.org>
2405 * include/bits/hashtable_policy.h (_Hashtable<>): Rename _H1 into _Hash
2406 _H2 into _RangeHash and _Hash into _Unused.
2407 (_Hastable_base<>): Likewise.
2408 (_Map_base<>): Likewise.
2409 (_Insert_base<>): Likewise.
2410 (_Insert<>): Likewise.
2411 (_Rehash_base<>): Likewise.
2412 (_Local_iterator_base<>): Likewise.
2413 (_Hash_code_base<>): Likewise.
2414 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false>):
2416 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>):
2418 (_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHas, _Unused,
2419 bool>): Remove _Hashtable_ebo_helper<2, _RangeHash> base type..
2420 (_Hash_code_base<>::_M_bucket_index(const _Key&, __hash_code, size_t)):
2422 (_Hash_code_base<>::_M_bucket_index(__hash_code, size_t)): ...this.
2423 (_Local_iterator<>): Remove _H1 and _H2 template parameters.
2424 (_Local_const_iterator<>): Likewise.
2425 (_Equality<>): Likewise.
2426 (_Map_base<>::operator[](const key_type&): Adapt.
2427 (_Map_base<>::operator[](key_type&&): Adapt.
2428 (_Identity::operator()): Add noexcept.
2429 (_Select1st::operator()): Likewise.
2430 (_Hash_code_base<>): Remove _Hashtable_ebo_helper<0, _ExtractKey> base
2432 (_Hash_code_base::_M_extract): Remove.
2433 * include/bits/hashtable.h (_Hashtable<>): Remove _H1 and _H2 template
2434 parameters. Remove _ExtractKey from constructors.
2435 (_Hashtable<>::_M_insert_unique_node(const key_type&, size_t,
2436 __hash_code, __node_type*, size_t)): Replace by...
2437 (_Hashtable<>::_M_insert_unique_node(size_t, __hash_code,
2438 __node_type*, size_t)): ...this.
2439 (_Hashtable<>::_M_insert_muti_node(__node_type*, const key_type&,
2440 __hash_code, __node_type*)): Replace by...
2441 (_Hashtable<>::_M_insert_multi_node(__node_type*, __hash_code,
2442 __node_type*)): ...this.
2443 (_Hashtable<>::__key_extract): Remove.
2444 * include/bits/node_handle.h: Adapt.
2446 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
2448 * testsuite/21_strings/debug/iterator_self_move_assign_neg.cc: Removed.
2449 * testsuite/21_strings/debug/self_move_assign_neg.cc: Removed.
2450 * testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc: Removed.
2451 * testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Removed.
2452 * testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc: Removed.
2453 * testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc: Removed.
2454 * testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc: Removed.
2455 * testsuite/23_containers/list/debug/self_move_assign_neg.cc: Removed.
2456 * testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc: Removed.
2457 * testsuite/23_containers/map/debug/self_move_assign_neg.cc: Removed.
2458 * testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc: Removed.
2459 * testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: Removed.
2460 * testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc: Removed.
2461 * testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: Removed.
2462 * testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc: Removed.
2463 * testsuite/23_containers/set/debug/self_move_assign_neg.cc: Removed.
2464 * testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc: Removed.
2465 * testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc: Removed.
2466 * testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc:
2468 * testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc: Removed.
2469 * testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc:
2471 * testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc: Removed.
2472 * testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc: Removed.
2473 * testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc: Removed.
2474 * testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc: Removed.
2475 * testsuite/23_containers/vector/debug/self_move_assign_neg.cc: Removed.
2477 2020-08-25 Patrick Palka <ppalka@redhat.com>
2479 * include/std/chrono (year_month_weekday::ok): Fix assert.
2481 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
2483 * include/std/future (future, shared_future. promise): Add
2484 is_destructible assertion (LWG 3466). Adjust string-literal for
2485 !is_array and !is_function assertions.
2486 * testsuite/30_threads/future/requirements/lwg3458.cc: Check
2487 types with no accessible destructor. Adjust expected errors.
2488 * testsuite/30_threads/promise/requirements/lwg3466.cc:
2490 * testsuite/30_threads/shared_future/requirements/lwg3458.cc:
2493 2020-08-25 Patrick Palka <ppalka@redhat.com>
2494 Ed Smith-Rowland <3dw4rd@verizon.net>
2495 Jonathan Wakely <jwakely@redhat.com>
2497 * include/std/chrono (time_point::operator++)
2498 (time_point::operator--): Define.
2499 (utc_clock, tai_clock, gps_clock): Forward declare.
2500 (utc_time, utc_seconds, tai_time, tai_seconds, gps_time)
2501 (gps_seconds): Define.
2502 (is_clock<utc_clock>, is_clock<tai_clock>, is_clock<gps_clock>)
2503 (is_clock_v<utc_clock>, is_clock_v<tai_clock>)
2504 (is_clock_v<gps_clock>): Define these specializations.
2505 (leap_second_info): Define.
2506 (day, month, year, weekday, weekday_indexed)
2507 (weekday_last, month_day, month_day_last, month_weekday)
2508 (month_weekday_last, year_month, year_month_day)
2509 (year_month_day_last, year_month_weekday, year_month_weekday_last):
2510 Declare and later define.
2511 (last_spec, last, __detail::__days_per_month)
2512 (__detail::__days_per_month, __detail::__last_day): Define.
2513 (January, February, March, April, May, June, July, August)
2514 (September, October, November, December, Sunday, Monday, Tuesday)
2515 (Wednesday, Thursday, Friday, Saturday): Define.
2516 (weekday::operator[]): Define out-of-line.
2517 (year_month_day::_S_from_days, year_month_day::M_days_since_epoch):
2519 (year_month_day::year_month_day, year_month_day::ok): Likewise.
2520 (__detail::__pow10, hh_mm_ss): Define.
2521 (literals::chrono_literals::operator""d)
2522 (literals::chrono_literals::operator""y): Define.
2523 (is_am, is_pm, make12, make24): Define.
2524 * testsuite/20_util/time_point/4.cc: New test.
2525 * testsuite/std/time/day/1.cc: New test.
2526 * testsuite/std/time/hh_mm_ss/1.cc: New test.
2527 * testsuite/std/time/is_am/1.cc: New test.
2528 * testsuite/std/time/is_pm/1.cc: New test.
2529 * testsuite/std/time/make12/1.cc: New test.
2530 * testsuite/std/time/make24/1.cc: New test.
2531 * testsuite/std/time/month/1.cc: New test.
2532 * testsuite/std/time/month_day/1.cc: New test.
2533 * testsuite/std/time/month_day_last/1.cc: New test.
2534 * testsuite/std/time/month_weekday/1.cc: New test.
2535 * testsuite/std/time/month_weekday_last/1.cc: New test.
2536 * testsuite/std/time/weekday/1.cc: New test.
2537 * testsuite/std/time/weekday_indexed/1.cc: New test.
2538 * testsuite/std/time/weekday_last/1.cc: New test.
2539 * testsuite/std/time/year/1.cc: New test.
2540 * testsuite/std/time/year_month/1.cc: New test.
2541 * testsuite/std/time/year_month_day/1.cc: New test.
2542 * testsuite/std/time/year_month_day_last/1.cc: New test.
2543 * testsuite/std/time/year_month_weekday/1.cc: New test.
2544 * testsuite/std/time/year_month_weekday_last/1.cc: New test.
2546 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2548 * include/std/ranges (join_view): Add deduction guide (LWG 3474).
2549 * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test.
2551 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2553 * include/bits/iterator_concepts.h (indirectly_readable): Add
2554 partial specializations to resolve ambiguities (LWG 3446).
2555 * testsuite/24_iterators/associated_types/readable.traits.cc:
2556 Check types with both value_type and element_type.
2558 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2560 * include/std/ranges (ranges::iota_view::size()): Perform all
2561 calculations in the right unsigned types.
2562 * testsuite/std/ranges/iota/size.cc: New test.
2564 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2567 * include/std/variant (_Variant_storage): Replace implicit
2568 conversions from size_t to __index_type with explicit casts.
2570 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
2572 * testsuite/30_threads/packaged_task/cons/alloc.cc: Run for
2573 C++11 and skip for C++17 or later.
2575 2020-08-24 Corentin Gay <gay@adacore.com>
2577 * testsuite/20_util/shared_ptr/atomic/3.cc: Do not require POSIX
2578 threads and add -pthread only on targets supporting them.
2579 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
2581 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
2583 * testsuite/30_threads/async/42819.cc: Likewise.
2584 * testsuite/30_threads/async/49668.cc: Likewise.
2585 * testsuite/30_threads/async/54297.cc: Likewise.
2586 * testsuite/30_threads/async/any.cc: Likewise.
2587 * testsuite/30_threads/async/async.cc: Likewise.
2588 * testsuite/30_threads/async/except.cc: Likewise.
2589 * testsuite/30_threads/async/launch.cc: Likewise.
2590 * testsuite/30_threads/async/lwg2021.cc: Likewise.
2591 * testsuite/30_threads/async/sync.cc: Likewise. : Likewise.
2592 * testsuite/30_threads/call_once/39909.cc: Likewise.
2593 * testsuite/30_threads/call_once/49668.cc: Likewise.
2594 * testsuite/30_threads/call_once/60497.cc: Likewise.
2595 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
2596 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
2597 * testsuite/30_threads/condition_variable/54185.cc: Likewise.
2598 * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
2599 * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
2600 * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
2601 * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
2602 * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
2603 * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
2604 * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
2606 * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
2607 * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
2608 * testsuite/30_threads/condition_variable_any/cond.cc: Likewise.
2609 * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
2610 * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
2611 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
2612 * testsuite/30_threads/future/cons/move.cc: Likewise.
2613 * testsuite/30_threads/future/members/45133.cc: Likewise.
2614 * testsuite/30_threads/future/members/get.cc: Likewise.
2615 * testsuite/30_threads/future/members/get2.cc: Likewise.
2616 * testsuite/30_threads/future/members/share.cc: Likewise.
2617 * testsuite/30_threads/future/members/valid.cc: Likewise.
2618 * testsuite/30_threads/future/members/wait.cc: Likewise.
2619 * testsuite/30_threads/future/members/wait_for.cc: Likewise.
2620 * testsuite/30_threads/future/members/wait_until.cc: Likewise.
2621 * testsuite/30_threads/lock/1.cc: Likewise.
2622 * testsuite/30_threads/lock/2.cc: Likewise.
2623 * testsuite/30_threads/lock/3.cc: Likewise.
2624 * testsuite/30_threads/lock/4.cc: Likewise.
2625 * testsuite/30_threads/mutex/cons/1.cc: Likewise.
2626 * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
2627 * testsuite/30_threads/mutex/lock/1.cc: Likewise.
2628 * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
2629 * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
2630 * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
2631 * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
2632 * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
2633 * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
2634 * testsuite/30_threads/packaged_task/49668.cc: Likewise.
2635 * testsuite/30_threads/packaged_task/60564.cc: Likewise.
2636 * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
2637 * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
2638 * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
2639 * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
2640 * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
2641 * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
2642 * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
2643 * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
2645 * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
2646 * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
2647 * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
2648 * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
2649 * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
2650 * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
2651 * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
2652 * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
2653 * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
2654 * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
2655 * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
2656 * testsuite/30_threads/promise/60966.cc: Likewise.
2657 * testsuite/30_threads/promise/cons/1.cc: Likewise.
2658 * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
2659 * testsuite/30_threads/promise/cons/move.cc: Likewise.
2660 * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
2661 * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
2662 * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
2663 * testsuite/30_threads/promise/members/get_future.cc: Likewise.
2664 * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
2665 * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
2666 * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
2667 * testsuite/30_threads/promise/members/set_value.cc: Likewise.
2668 * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
2669 * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
2670 * testsuite/30_threads/promise/members/swap.cc: Likewise.
2671 * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
2672 * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
2674 * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
2675 * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
2676 * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
2678 * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
2679 * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
2680 * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
2681 * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
2682 * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
2683 * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
2685 * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
2686 * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
2687 * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
2689 * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
2691 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
2692 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
2693 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
2695 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
2697 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
2699 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
2701 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
2703 * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
2704 * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
2705 * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
2706 * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
2707 * testsuite/30_threads/shared_future/members/get.cc: Likewise.
2708 * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
2709 * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
2710 * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
2711 * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
2712 * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
2713 * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
2714 * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
2715 * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
2716 * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
2717 * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
2718 * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
2719 * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
2720 * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
2721 * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
2722 * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
2723 * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
2724 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
2725 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
2726 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
2727 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
2728 * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
2729 * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
2730 * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
2731 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
2732 * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
2733 * testsuite/30_threads/this_thread/1.cc: Likewise.
2734 * testsuite/30_threads/this_thread/sleep_for-mt.cc: Likewise.
2735 * testsuite/30_threads/this_thread/sleep_until-mt.cc: Likewise.
2736 * testsuite/30_threads/thread/cons/1.cc: Likewise.
2737 * testsuite/30_threads/thread/cons/2.cc: Likewise.
2738 * testsuite/30_threads/thread/cons/3.cc: Likewise.
2739 * testsuite/30_threads/thread/cons/4.cc: Likewise.
2740 * testsuite/30_threads/thread/cons/49668.cc: Likewise.
2741 * testsuite/30_threads/thread/cons/5.cc: Likewise.
2742 * testsuite/30_threads/thread/cons/6.cc: Likewise.
2743 * testsuite/30_threads/thread/cons/7.cc: Likewise.
2744 * testsuite/30_threads/thread/cons/8.cc: Likewise.
2745 * testsuite/30_threads/thread/cons/9.cc: Likewise.
2746 * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
2747 * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
2748 * testsuite/30_threads/thread/members/1.cc: Likewise.
2749 * testsuite/30_threads/thread/members/2.cc: Likewise.
2750 * testsuite/30_threads/thread/members/3.cc: Likewise.
2751 * testsuite/30_threads/thread/members/4.cc: Likewise.
2752 * testsuite/30_threads/thread/members/5.cc: Likewise.
2753 * testsuite/30_threads/thread/members/hardware_concurrency.cc:
2755 * testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise.
2756 * testsuite/30_threads/thread/swap/1.cc: Likewise.
2757 * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
2758 * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
2760 * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
2761 * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
2762 * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
2764 * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
2765 * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
2766 * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
2767 * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
2768 * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
2769 * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
2770 * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
2771 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
2772 * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
2773 * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
2774 * testsuite/30_threads/try_lock/1.cc: Likewise.
2775 * testsuite/30_threads/try_lock/2.cc: Likewise.
2776 * testsuite/30_threads/try_lock/3.cc: Likewise.
2777 * testsuite/30_threads/try_lock/4.cc: Likewise.
2778 * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
2779 * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
2780 * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
2781 * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
2782 * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
2783 * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
2784 * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
2785 * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
2786 * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
2787 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
2788 * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
2790 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
2793 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Do not
2794 test "cold" on darwin.
2795 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
2797 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
2799 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
2801 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
2804 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
2807 * testsuite/25_algorithms/pstl/feature_test-2.cc: Require
2808 tbb-backend effective target.
2809 * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
2810 * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
2811 * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
2813 2020-08-20 Jonathan Wakely <jwakely@redhat.com>
2815 * include/bits/iterator_concepts.h [__STRICT_ANSI__]
2816 (incrementable_traits<__int128>): Define specialization.
2817 (incrementable_traits<unsigned __int128>): Likewise.
2818 * testsuite/std/ranges/iota/96042.cc: Test iota_view with
2821 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2822 Patrick Palka <ppalka@redhat.com>
2825 * include/bits/range_access.h (__detail::__to_unsigned_like):
2826 Do not use make_unsigned_t<T> in the return type, as it can
2827 result in an error before the integral<T> constraint is checked.
2828 [__STRICT_ANSI__]: Add overloads for 128-bit integer types.
2829 (__detail::__make_unsigned_like_t): Define as the return type
2830 of __to_unsigned_like.
2831 * testsuite/std/ranges/subrange/96042.cc: New test.
2833 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2835 * include/bits/stl_tree.h (operator!=, operator>, operator<=)
2836 (operator>=): Remove deprecated functions.
2838 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2841 * include/ext/numeric_traits.h (__is_integer_nonstrict): New
2842 trait which is true for 128-bit integers even in strict modes.
2843 (__numeric_traits_integer, __numeric_traits): Use
2844 __is_integer_nonstrict instead of __is_integer.
2845 * include/std/limits [__STRICT_ANSI__ && __SIZEOF_INT128__]
2846 (numeric_limits<__int128>, (numeric_limits<unsigned __int128>):
2848 * testsuite/std/ranges/iota/96042.cc: New test.
2850 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2852 * include/bits/c++config (_GLIBCXX_DEPRECATED_SUGGEST)
2853 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST)
2854 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
2855 Add new macros to comment.
2857 2020-08-19 Patrick Palka <ppalka@redhat.com>
2859 * include/Makefile.am (bits_headers): Add new header
2860 <bits/max_size_type.h>.
2861 * include/Makefile.in: Regenerate.
2862 * include/bits/iterator_concepts.h
2863 (ranges::__detail::__max_diff_type): Remove definition, replace
2864 with forward declaration of class __max_diff_type.
2865 (__detail::__max_size_type): Remove definition, replace with
2866 forward declaration of class __max_size_type.
2867 (__detail::__is_unsigned_int128, __is_signed_int128)
2868 (__is_int128): New concepts.
2869 (__detail::__is_integer_like): Accept __int128 and unsigned
2871 (__detail::__is_signed_integer_like): Accept __int128.
2872 * include/bits/max_size_type.h: New header.
2873 * include/bits/range_access.h: Include <bits/max_size_type.h>.
2874 (__detail::__to_unsigned_like): Two new overloads.
2875 * testsuite/std/ranges/iota/difference_type.cc: New test.
2876 * testsuite/std/ranges/iota/max_size_type.cc: New test.
2878 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2880 * include/bits/c++config (_GLIBCXX_DEPRECATED): Define for all
2882 (_GLIBCXX_DEPRECATED_SUGGEST): New macro for "use 'foo' instead"
2883 message in deprecated warnings.
2884 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST): New
2885 macros for marking features deprecated in C++11.
2886 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
2888 * include/backward/auto_ptr.h (auto_ptr_ref, auto_ptr<void>):
2889 Use _GLIBCXX11_DEPRECATED instead of _GLIBCXX_DEPRECATED.
2890 (auto_ptr): Use _GLIBCXX11_DEPRECATED_SUGGEST.
2891 * include/backward/binders.h (binder1st, binder2nd): Likewise.
2892 * include/bits/ios_base.h (io_state, open_mode, seek_dir)
2893 (streampos, streamoff): Use _GLIBCXX_DEPRECATED_SUGGEST.
2894 * include/std/streambuf (stossc): Replace C++11 attribute
2895 with _GLIBCXX_DEPRECATED_SUGGEST.
2896 * include/std/type_traits (__is_nullptr_t): Use
2897 _GLIBCXX_DEPRECATED_SUGGEST instead of _GLIBCXX_DEPRECATED.
2898 * testsuite/27_io/types/1.cc: Check for deprecated warnings.
2899 Also check for io_state, open_mode and seek_dir typedefs.
2901 2020-08-19 Antony Polukhin <antoshkka@gmail.com>
2904 * include/std/type_traits (invoke_result, is_nothrow_invocable_r)
2905 Add static_asserts to make sure that the argument of the type
2906 trait is not misused with incomplete types.
2907 (is_swappable_with, is_nothrow_swappable_with): Add static_asserts
2908 to make sure that the first and second arguments of the type trait
2909 are not misused with incomplete types.
2910 * testsuite/20_util/invoke_result/incomplete_neg.cc: New test.
2911 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: New test.
2912 * testsuite/20_util/is_nothrow_swappable/incomplete_neg.cc: New test.
2913 * testsuite/20_util/is_nothrow_swappable_with/incomplete_neg.cc: New
2915 * testsuite/20_util/is_swappable_with/incomplete_neg.cc: New test.
2917 2020-08-18 David Edelsohn <dje.gcc@gmail.com>
2918 Clement Chigot <clement.chigot@atos.net>
2920 * config/os/aix/t-aix: Add complementary mode object files to
2923 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
2925 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Check
2926 "cold" isn't used in the library. Also check <cxxabi.h>.
2927 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
2929 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
2931 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
2933 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
2936 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
2939 * include/std/future (__future_base::_S_make_deferred_state)
2940 (__future_base::_S_make_async_state): Remove.
2941 (__future_base::_Deferred_state): Change constructor to accept a
2942 parameter pack of arguments and forward them to the call
2944 (__future_base::_Async_state_impl): Likewise. Replace lambda
2945 expression with a named member function.
2946 (async): Construct state object directly from the arguments,
2947 instead of using thread::__make_invoker, _S_make_deferred_state
2948 and _S_make_async_state. Move shared state into the returned
2950 * include/std/thread (thread::_Call_wrapper): New alias
2951 template for use by constructor and std::async.
2952 (thread::thread(Callable&&, Args&&...)): Create state object
2953 directly instead of using _S_make_state.
2954 (thread::__make_invoker, thread::__decayed_tuple)
2955 (thread::_S_make_state): Remove.
2956 * testsuite/30_threads/async/69724.cc: New test.
2958 2020-08-17 Jonathan Wakely <jwakely@redhat.com>
2963 * include/std/tuple [__has_cpp_attribute(no_unique_address)]
2964 (_Head_base<Idx, Head, true>): New definition of the partial
2965 specialization, using [[no_unique_address]] instead of
2967 * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
2969 * testsuite/20_util/tuple/comparison_operators/93147.cc: New test.
2970 * testsuite/20_util/tuple/creation_functions/55713.cc: New test.
2971 * testsuite/20_util/tuple/element_access/71096.cc: New test.
2973 2020-08-14 Lewis Hyatt <lhyatt@gmail.com>
2975 * testsuite/lib/libstdc++.exp: Use the new option
2976 -fdiagnostics-plain-output.
2978 2020-08-13 Jonathan Wakely <jwakely@redhat.com>
2980 * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Warn if the c_std
2981 option is used and fail unless --enable-cheaders-obsolete is
2983 * configure: Regenerate.
2985 2020-08-12 Jonathan Wakely <jwakely@redhat.com>
2988 * include/bits/basic_string.h (operator=(basic_string&&)): Check
2989 for self-move before copying with char_traits::copy.
2990 * include/bits/hashtable.h (operator=(_Hashtable&&)): Check for
2992 * include/bits/stl_deque.h (_M_move_assign1(deque&&, false_type)):
2993 Check for equal allocators.
2994 * include/bits/stl_list.h (_M_move_assign(list&&, true_type)):
2995 Call clear() instead of _M_clear().
2996 * include/debug/formatter.h (__msg_self_move_assign): Change
2998 * include/debug/macros.h (__glibcxx_check_self_move_assign):
2999 (_GLIBCXX_DEBUG_VERIFY): Remove.
3000 * include/debug/safe_container.h (operator=(_Safe_container&&)):
3001 Remove assertion check for safe move and make it well-defined.
3002 * include/debug/safe_iterator.h (operator=(_Safe_iterator&&)):
3003 Remove assertion check for self-move.
3004 * include/debug/safe_local_iterator.h
3005 (operator=(_Safe_local_iterator&&)): Likewise.
3006 * testsuite/21_strings/basic_string/cons/char/self_move.cc: New test.
3007 * testsuite/23_containers/deque/cons/self_move.cc: New test.
3008 * testsuite/23_containers/forward_list/cons/self_move.cc: New test.
3009 * testsuite/23_containers/list/cons/self_move.cc: New test.
3010 * testsuite/23_containers/set/cons/self_move.cc: New test.
3011 * testsuite/23_containers/unordered_set/cons/self_move.cc: New test.
3012 * testsuite/23_containers/vector/cons/self_move.cc: New test.
3014 2020-08-11 François Dumont <fdumont@gcc.gnu.org>
3017 * include/bits/forward_list.tcc (forward_list<>::remove): Collect nodes
3018 to destroy in an intermediate forward_list.
3019 (forward_list<>::remove_if, forward_list<>::unique): Likewise.
3020 * include/bits/list.tcc (list<>::remove, list<>::unique): Likewise.
3021 (list<>::remove_if): Likewise.
3022 * include/debug/forward_list (forward_list<>::_M_erase_after): Remove.
3023 (forward_list<>::erase_after): Adapt.
3024 (forward_list<>::remove, forward_list<>::remove_if): Collect nodes to
3025 destroy in an intermediate forward_list.
3026 (forward_list<>::unique): Likewise.
3027 * include/debug/list (list<>::remove, list<>::unique): Likewise.
3028 (list<>::remove_if): Likewise.
3029 * testsuite/23_containers/forward_list/operations/91620.cc: New test.
3030 * testsuite/23_containers/list/operations/91620.cc: New test.
3032 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3034 * testsuite/30_threads/thread/cons/84535.cc: Use a custom
3036 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
3038 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3041 * include/experimental/executor [!_GLIBCXX_HAS_GTHREADS]:
3042 (execution_context::mutex_type): Define dummy mutex type.
3043 (system_context): Use execution_context::mutex_type.
3044 (system_context) [!_GLIBCXX_HAS_GTHREADS]: Define dummy
3045 thread and condition variable types.
3046 [!_GLIBCXX_HAS_GTHREADS] (system_context::_M_run()): Do not
3048 (system_context::_M_post) [!_GLIBCXX_HAS_GTHREADS]: Throw
3049 an exception when threads aren't available.
3050 (strand::running_in_this_thread()): Defer to _M_state.
3051 (strand::_State::running_in_this_thread()): New function.
3052 (use_future_t): Do not depend on _GLIBCXX_USE_C99_STDINT_TR1.
3053 * include/experimental/io_context (io_context): Use the
3054 execution_context::mutex_type alias. Replace stack of thread
3056 * testsuite/experimental/net/execution_context/use_service.cc:
3057 Enable test for non-pthread targets.
3059 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3061 * include/experimental/executor (system_context::a__tag): Make
3062 default constructor explicit.
3064 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3066 * include/experimental/executor (system_context::_M_run()):
3068 * testsuite/experimental/net/system_context/1.cc: New test.
3070 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3072 * include/std/stop_token: Check _GLIBCXX_HAS_GTHREADS using
3073 #ifdef instead of #if.
3074 (stop_token::_S_yield()): Check _GLIBCXX_HAS_GTHREADS before
3075 using __gthread_yield.
3077 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
3079 * include/std/thread [!_GLIBCXX_HAS_GTHREADS] (this_thread::yield)
3080 (this_thread::sleep_until): Define.
3081 [!_GLIBCXX_HAS_GTHREADS] (this_thread::sleep_for): Define. Replace
3082 use of __gthread_time_t typedef with timespec.
3083 * src/c++11/thread.cc [!_GLIBCXX_HAS_GTHREADS] (__sleep_for):
3085 * testsuite/30_threads/this_thread/2.cc: Moved to...
3086 * testsuite/30_threads/this_thread/yield.cc: ...here.
3087 * testsuite/30_threads/this_thread/3.cc: Moved to...
3088 * testsuite/30_threads/this_thread/sleep_for-mt.cc: ...here.
3089 * testsuite/30_threads/this_thread/4.cc: Moved to...
3090 * testsuite/30_threads/this_thread/sleep_until-mt.cc: ...here.
3091 * testsuite/30_threads/this_thread/58038.cc: Add
3093 * testsuite/30_threads/this_thread/60421.cc: Likewise.
3094 * testsuite/30_threads/this_thread/sleep_for.cc: New test.
3095 * testsuite/30_threads/this_thread/sleep_until.cc: New test.
3097 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3100 * src/c++17/fs_ops.cc (read_symlink): Use posix::lstat instead
3101 of calling ::lstat directly.
3102 * src/filesystem/ops.cc (read_symlink): Likewise.
3104 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3106 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
3107 Use gdb.Type.strip_typedefs().
3108 * testsuite/libstdc++-prettyprinters/compat.cc: Use a typedef in
3109 the emulated old type.
3111 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3114 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
3115 $enable_libstdcxx_filesystem_ts.
3116 * configure: Regenerate.
3118 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3121 * include/bits/stl_iterator.h (inserter): Do not deduce
3122 iterator type (LWG 561).
3123 * testsuite/24_iterators/insert_iterator/dr561.cc: New test.
3125 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3127 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI=0]
3128 (basic_string::reserve()): Do nothing if exceptions are not
3131 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
3134 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
3135 (stat_type): Change to __stat64.
3136 (stat): Use _wstat64.
3138 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
3141 * include/debug/bitset (bitset::operator==): Call _M_base() on
3143 (bitset::operator!=): Likewise, but don't define it at all when
3144 default comparisons are supported by the compiler.
3145 * testsuite/23_containers/bitset/operations/96303.cc: New test.
3147 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
3149 * testsuite/18_support/comparisons/algorithms/partial_order.cc:
3150 Replace VERIFY with static_assert where the compiler now
3152 * testsuite/18_support/comparisons/algorithms/weak_order.cc:
3155 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
3157 * config/abi/pre/gnu.ver: Fix wildcards for wstring symbols.
3159 2020-08-06 Andrew Luo <andrewluotechnologies@outlook.com>
3160 Jonathan Wakely <jwakely@redhat.com>
3162 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Use less greedy
3163 patterns for basic_string members.
3164 (GLIBCXX_3.4.29): Export new basic_string::reserve symbols.
3165 * doc/xml/manual/status_cxx2020.xml: Update P0966 status.
3166 * include/bits/basic_string.h (shrink_to_fit()): Call reserve().
3167 (reserve(size_type)): Remove default argument.
3168 (reserve()): Declare new overload.
3169 [!_GLIBCXX_USE_CXX11_ABI] (shrink_to_fit, reserve): Likewise.
3170 * include/bits/basic_string.tcc (reserve(size_type)): Remove
3171 support for shrinking capacity.
3172 (reserve()): Perform shrink-to-fit operation.
3173 [!_GLIBCXX_USE_CXX11_ABI] (reserve): Likewise.
3174 * testsuite/21_strings/basic_string/capacity/1.cc: Adjust to
3175 reflect new behavior.
3176 * testsuite/21_strings/basic_string/capacity/char/1.cc:
3178 * testsuite/21_strings/basic_string/capacity/char/18654.cc:
3180 * testsuite/21_strings/basic_string/capacity/char/2.cc:
3182 * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
3184 * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
3186 * testsuite/21_strings/basic_string/capacity/wchar_t/2.cc:
3189 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
3191 * include/bits/basic_string.tcc
3192 (operator>>(basic_istream&, basic_string&)): Do not set eofbit
3193 if extraction stopped after in.width() characters.
3194 * src/c++98/istream-string.cc (operator>>(istream&, string&)):
3196 * include/bits/istream.tcc (__istream_extract): Do not set
3197 eofbit if extraction stopped after n-1 characters.
3198 * src/c++98/istream.cc (__istream_extract): Likewise.
3199 * testsuite/21_strings/basic_string/inserters_extractors/char/13.cc: New test.
3200 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/13.cc: New test.
3201 * testsuite/27_io/basic_istream/extractors_character/char/5.cc: New test.
3202 * testsuite/27_io/basic_istream/extractors_character/wchar_t/5.cc: New test.
3204 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
3207 * src/c++17/fs_ops.cc (fs::read_symlink): Return an error
3208 immediately for non-symlinks.
3209 * src/filesystem/ops.cc (fs::read_symlink): Likewise.
3211 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
3213 * include/std/istream (operator>>(istream&, char*)): Add
3214 attributes to get warnings for pointers that are null or known
3215 to point to the end of a buffer. Request upper bound from
3216 __builtin_object_size check and handle zero-sized buffer case.
3217 (operator>>(istream&, signed char))
3218 (operator>>(istream&, unsigned char*)): Add attributes.
3219 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
3220 Check extracting into the middle of a buffer.
3221 * testsuite/27_io/basic_istream/extractors_character/wchar_t/overflow.cc: New test.
3223 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
3225 * include/std/atomic (atomic<T>::store): Reformat.
3227 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
3229 * doc/xml/manual/status_cxx2017.xml: Replace oneAPI DPC++ link
3230 with LLVM repo for PSTL.
3231 * doc/html/manual/status.html: Regenerate.
3233 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
3235 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Export new symbols.
3236 * include/bits/istream.tcc (__istream_extract): New function
3237 template implementing both of operator>>(istream&, char*) and
3238 operator>>(istream&, char(&)[N]). Add explicit instantiation
3239 declaration for it. Remove explicit instantiation declarations
3240 for old function templates.
3241 * include/std/istream (__istream_extract): Declare.
3242 (operator>>(basic_istream<C,T>&, C*)): Define inline and simply
3243 call __istream_extract.
3244 (operator>>(basic_istream<char,T>&, signed char*)): Likewise.
3245 (operator>>(basic_istream<char,T>&, unsigned char*)): Likewise.
3246 (operator>>(basic_istream<C,T>&, C(7)[N])): Define for LWG 2499.
3247 (operator>>(basic_istream<char,T>&, signed char(&)[N])):
3249 (operator>>(basic_istream<char,T>&, unsigned char(&)[N])):
3251 * include/std/streambuf (basic_streambuf): Declare char overload
3252 of __istream_extract as a friend.
3253 * src/c++11/istream-inst.cc: Add explicit instantiation
3254 definition for wchar_t overload of __istream_extract. Remove
3255 explicit instantiation definitions of old operator>> overloads
3256 for versioned-namespace build.
3257 * src/c++98/istream.cc (operator>>(istream&, char*)): Replace
3258 with __istream_extract(istream&, char*, streamsize).
3259 * testsuite/27_io/basic_istream/extractors_character/char/3.cc:
3260 Do not use variable-length array.
3261 * testsuite/27_io/basic_istream/extractors_character/char/4.cc:
3262 Do not run test for C++20.
3263 * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
3264 Do not test writing to pointers for C++20.
3265 * testsuite/27_io/basic_istream/extractors_character/char/9826.cc:
3266 Use array instead of pointer.
3267 * testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc:
3268 Do not use variable-length array.
3269 * testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
3270 Do not run test for C++20.
3271 * testsuite/27_io/basic_istream/extractors_character/wchar_t/9555-ic.cc:
3272 Do not test writing to pointers for C++20.
3273 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499.cc:
3275 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
3277 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
3279 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
3281 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
3284 2020-08-01 Gerald Pfeifer <gerald@pfeifer.com>
3286 * doc/xml/manual/using_exceptions.xml: Move www.stroustrup.com to
3288 * doc/html/manual/using_exceptions.html: Regenerate.
3290 2020-07-31 Gerald Pfeifer <gerald@pfeifer.com>
3292 * doc/xml/manual/status_cxx2017.xml: ParallelSTL is now part
3293 of oneAPI DPC++ Library on Github.
3294 * doc/html/manual/status.html: Regenerate.
3296 2020-07-31 François Dumont <fdumont@gcc.gnu.org>
3298 * include/bits/stl_bvector.h
3299 [_GLIBCXX_INLINE_VERSION](_Bvector_impl_data::_M_start): Define as
3301 (_Bvector_impl_data(const _Bvector_impl_data&)): Default.
3302 (_Bvector_impl_data(_Bvector_impl_data&&)): Delegate to latter.
3303 (_Bvector_impl_data::operator=(const _Bvector_impl_data&)): Default.
3304 (_Bvector_impl_data::_M_move_data(_Bvector_impl_data&&)): Use latter.
3305 (_Bvector_impl_data::_M_reset()): Likewise.
3306 (_Bvector_impl_data::_M_swap_data): New.
3307 (_Bvector_impl::_Bvector_impl(_Bvector_impl&&)): Implement explicitely.
3308 (_Bvector_impl::_Bvector_impl(_Bit_alloc_type&&, _Bvector_impl&&)): New.
3309 (_Bvector_base::_Bvector_base(_Bvector_base&&, const allocator_type&)):
3311 (vector::vector(vector&&, const allocator_type&, true_type)): New, use
3313 (vector::vector(vector&&, const allocator_type&, false_type)): New.
3314 (vector::vector(vector&&, const allocator_type&)): Use latters.
3315 (vector::vector(const vector&, const allocator_type&)): Adapt.
3316 [__cplusplus >= 201103](vector::vector(_InputIt, _InputIt,
3317 const allocator_type&)): Use _M_initialize_range.
3318 (vector::operator[](size_type)): Use iterator operator[].
3319 (vector::operator[](size_type) const): Use const_iterator operator[].
3320 (vector::swap(vector&)): Add assertions on allocators. Use _M_swap_data.
3321 [__cplusplus >= 201103](vector::insert(const_iterator, _InputIt,
3322 _InputIt)): Use _M_insert_range.
3323 (vector::_M_initialize(size_type)): Adapt.
3324 [__cplusplus >= 201103](vector::_M_initialize_dispatch): Remove.
3325 [__cplusplus >= 201103](vector::_M_insert_dispatch): Remove.
3326 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Stop
3327 using start _M_offset.
3328 (StdVectorPrinter.to_string): Likewise.
3329 * testsuite/23_containers/vector/bool/allocator/swap.cc: Adapt.
3330 * testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc:
3333 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3335 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Use 0
3337 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
3340 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3342 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
3343 Move struct to namespace scope.
3345 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3347 * testsuite/26_numerics/numbers/float128.cc: Check
3348 __STRICT_ANSI__ before using __float128.
3349 * testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc:
3352 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3354 * testsuite/18_support/set_terminate.cc: Require C++11 or
3356 * testsuite/28_regex/simple_c++11.cc: Likewise.
3357 * testsuite/tr1/headers/c++200x/complex.cc: Likewise.
3358 * testsuite/24_iterators/headers/iterator/synopsis.cc:
3359 Require C++14 or lower.
3361 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3363 * testsuite/23_containers/span/back_assert_neg.cc: Split c++2a
3364 effective-target from xfail selector.
3365 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
3366 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
3367 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
3368 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
3369 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
3370 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
3371 * testsuite/23_containers/span/subspan_2_assert_neg.cc:
3373 * testsuite/23_containers/span/subspan_3_assert_neg.cc:
3375 * testsuite/23_containers/span/subspan_4_assert_neg.cc:
3377 * testsuite/23_containers/span/subspan_5_assert_neg.cc:
3379 * testsuite/23_containers/span/subspan_6_assert_neg.cc:
3381 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
3383 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3385 * testsuite/20_util/reference_wrapper/83427.cc: Adjust
3386 effective-target to specific language mode only.
3387 * testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
3389 * testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
3391 * testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
3393 * testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
3395 * testsuite/26_numerics/valarray/69116.cc:
3397 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
3398 Remove whitespace at end of file.
3399 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
3402 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3404 * testsuite/17_intro/headers/c++2017/all_attributes.cc: Add
3405 c++17 effective-target.
3406 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
3408 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: Likewise.
3409 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
3411 * testsuite/17_intro/headers/c++2017/operator_names.cc:
3413 * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
3414 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
3416 * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
3418 * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
3420 * testsuite/20_util/any/assign/1.cc: Likewise.
3421 * testsuite/20_util/any/assign/2.cc: Likewise.
3422 * testsuite/20_util/any/assign/emplace.cc: Likewise.
3423 * testsuite/20_util/any/assign/exception.cc: Likewise.
3424 * testsuite/20_util/any/assign/self.cc: Likewise.
3425 * testsuite/20_util/any/cons/1.cc: Likewise.
3426 * testsuite/20_util/any/cons/2.cc: Likewise.
3427 * testsuite/20_util/any/cons/aligned.cc: Likewise.
3428 * testsuite/20_util/any/cons/explicit.cc: Likewise.
3429 * testsuite/20_util/any/cons/in_place.cc: Likewise.
3430 * testsuite/20_util/any/cons/nontrivial.cc: Likewise.
3431 * testsuite/20_util/any/make_any.cc: Likewise.
3432 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
3433 * testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
3434 * testsuite/20_util/any/misc/swap.cc: Likewise.
3435 * testsuite/20_util/any/modifiers/1.cc: Likewise.
3436 * testsuite/20_util/any/observers/type.cc: Likewise.
3437 * testsuite/20_util/any/requirements.cc: Likewise.
3438 * testsuite/20_util/any/typedefs.cc: Likewise.
3439 * testsuite/20_util/as_const/1.cc: Likewise.
3440 * testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
3441 * testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
3442 * testsuite/20_util/bool_constant/requirements.cc: Likewise.
3443 * testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
3445 * testsuite/20_util/duration_cast/rounding.cc: Likewise.
3446 * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
3448 * testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
3449 * testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
3450 * testsuite/20_util/function_objects/searchers.cc: Likewise.
3451 * testsuite/20_util/in_place/requirements.cc: Likewise.
3452 * testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
3454 * testsuite/20_util/is_invocable/requirements/typedefs.cc:
3456 * testsuite/20_util/is_invocable/value.cc: Likewise.
3457 * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
3459 * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc:
3461 * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
3463 * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
3465 * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
3466 * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
3468 * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
3470 * testsuite/20_util/is_nothrow_swappable_with/value.cc:
3472 * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
3474 * testsuite/20_util/is_swappable/requirements/typedefs.cc:
3476 * testsuite/20_util/is_swappable/value.cc: Likewise.
3477 * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
3479 * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
3481 * testsuite/20_util/is_swappable_with/value.cc: Likewise.
3482 * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
3484 * testsuite/20_util/logical_traits/requirements/typedefs.cc:
3486 * testsuite/20_util/logical_traits/value.cc: Likewise.
3487 * testsuite/20_util/optional/constexpr/make_optional.cc: Likewise.
3488 * testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
3489 * testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
3490 * testsuite/20_util/optional/hash.cc: Likewise.
3491 * testsuite/20_util/pair/swap_cxx17.cc: Likewise.
3492 * testsuite/20_util/ratio/requirements/ratio_equal_v.cc: Likewise.
3493 * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
3495 * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
3497 * testsuite/20_util/tuple/apply/1.cc: Likewise.
3498 * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
3499 * testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
3500 * testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
3501 * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
3503 * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
3505 * testsuite/20_util/variant/any.cc: Likewise.
3506 * testsuite/20_util/variant/compile.cc: Likewise.
3507 * testsuite/20_util/variant/hash.cc: Likewise.
3508 * testsuite/20_util/variant/index_type.cc: Likewise.
3509 * testsuite/20_util/variant/run.cc: Likewise.
3510 * testsuite/20_util/void_t/1.cc: Likewise.
3511 * testsuite/21_strings/basic_string/79162.cc: Likewise.
3512 * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
3513 * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
3514 * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
3515 * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
3516 * testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
3518 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
3520 * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
3522 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
3524 * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
3526 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
3528 * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
3530 * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
3532 * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
3534 * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
3536 * testsuite/21_strings/basic_string/operations/data/char/2.cc:
3538 * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
3540 * testsuite/21_strings/basic_string/operations/find/char/5.cc:
3542 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
3544 * testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
3545 * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
3547 * testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise.
3548 * testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise.
3549 * testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise.
3550 * testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise.
3551 * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
3553 * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
3555 * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
3557 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
3559 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
3561 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
3563 * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
3565 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
3567 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
3569 * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
3571 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
3573 * testsuite/21_strings/basic_string_view/include.cc: Likewise.
3574 * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
3576 * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
3578 * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
3580 * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
3582 * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
3584 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
3586 * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
3588 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
3590 * testsuite/21_strings/basic_string_view/literals/types.cc:
3592 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
3594 * testsuite/21_strings/basic_string_view/literals/values.cc:
3596 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
3598 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
3600 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
3602 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
3604 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
3606 * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
3608 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
3610 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
3612 * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
3614 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
3616 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
3618 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
3620 * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
3622 * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
3624 * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
3626 * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
3628 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
3630 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
3632 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
3634 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
3636 * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
3638 * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
3640 * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
3642 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
3644 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
3646 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
3648 * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
3650 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
3652 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
3654 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
3656 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
3658 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
3660 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
3662 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
3664 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
3666 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
3668 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
3670 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
3672 * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
3673 * testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
3674 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
3676 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
3677 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
3679 * testsuite/23_containers/map/modifiers/merge.cc: Likewise.
3680 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
3681 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
3682 * testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
3683 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
3684 * testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
3685 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
3686 * testsuite/23_containers/set/modifiers/merge.cc: Likewise.
3687 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
3689 * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
3691 * testsuite/23_containers/unordered_map/modifiers/merge.cc:
3693 * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
3695 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
3697 * testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
3699 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
3701 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
3703 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
3705 * testsuite/23_containers/unordered_set/modifiers/merge.cc:
3707 * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
3709 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
3711 * testsuite/25_algorithms/clamp/1.cc: Likewise.
3712 * testsuite/25_algorithms/clamp/2.cc: Likewise.
3713 * testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
3714 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
3716 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
3718 * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
3720 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
3722 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
3724 * testsuite/29_atomics/atomic/is_always_lock_free.cc: Likewise.
3725 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
3727 * testsuite/30_threads/shared_lock/70766.cc: Likewise.
3728 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
3729 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
3731 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc:
3733 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
3735 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
3736 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
3737 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
3739 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3742 * include/bits/stl_iterator.h (reverse_iterator): Friend
3743 declaration should not depend on __cplusplus.
3745 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3747 * testsuite/experimental/filesystem/filesystem_error/cons.cc:
3748 Remove -std=gnu++17 option.
3750 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3752 * testsuite/20_util/is_aggregate/value.cc: Adjust for changes to
3753 definition of aggregates in C++20.
3754 * testsuite/20_util/optional/requirements.cc: Adjust for
3755 defaulted comparisons in C++20.
3757 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3759 * testsuite/20_util/tuple/78939.cc: Suppress warnings about
3760 deprecation of volatile-qualified structured bindings in C++20.
3761 * testsuite/20_util/variable_templates_for_traits.cc: Likewise
3762 for deprecation of is_pod in C++20
3764 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3766 * testsuite/20_util/time_point_cast/rounding.cc: Remove
3767 duplicate dg-do directive and add c++17 effective target.
3769 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
3771 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
3772 LC_ALL_MASK not LC_ALL.
3774 2020-07-31 Richard Biener <rguenther@suse.de>
3777 * testsuite/20_util/assume_aligned/3.cc: Use -g0.
3779 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3781 * include/bits/basic_string.h (size_type, difference_type):
3782 Use allocator_traits to obtain the allocator's size_type and
3785 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3788 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
3790 [!_GLIBCXX_USE_C99_STDLIB]: Use strtod for float and long
3793 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3795 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
3796 Use allocator with the correct value type.
3797 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
3800 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3802 * testsuite/20_util/from_chars/4.cc: Pass non-const iterator
3805 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3807 * include/bits/iterator_concepts.h (__detail::__cv_bool): New
3809 (__detail::__integral_nonbool): Likewise.
3810 (__detail::__is_integer_like): Use __integral_nonbool.
3811 * testsuite/std/ranges/access/lwg3467.cc: New test.
3813 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3815 * testsuite/20_util/from_chars/4.cc: Use dg-add-options ieee.
3816 * testsuite/29_atomics/atomic_float/1.cc: Likewise.
3818 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
3820 * testsuite/23_containers/vector/bool/72847.cc: Use the
3821 exceptions_enabled effective-target keyword instead of
3822 checking for an explicit -fno-exceptions option.
3823 * testsuite/util/testsuite_abi.cc (examine_symbol): Remove
3824 redundant try-catch.
3825 * testsuite/util/testsuite_allocator.h [!__cpp_exceptions]:
3826 Do not define check_allocate_max_size and memory_resource.
3827 * testsuite/util/testsuite_containers.h: Replace comment with
3828 #error if wrong standard dialect used.
3829 * testsuite/util/testsuite_shared.cc: Likewise.
3831 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
3833 * include/bits/hashtable_policy.h (_Node_iterator_base()): New.
3834 (operator==(const _Node_iterator_base&, const _Node_iterator_base&)):
3836 (operator!=(const _Node_iterator_base&, const _Node_iterator_base&)):
3838 (_Local_iterator_base<>): Inherits _Node_iterator_base.
3839 (_Local_iterator_base<>::_M_cur): Remove.
3840 (_Local_iterator_base<>::_M_curr()): Remove.
3841 (operator==(const _Local_iterator_base&, const _Local_iterator_base&)):
3843 (operator!=(const _Local_iterator_base&, const _Local_iterator_base&)):
3845 * include/debug/unordered_map (unordered_map<>::_M_invalidate): Adapt.
3846 (unordered_multimap<>::_M_invalidate): Adapt.
3847 * include/debug/unordered_set (unordered_set<>::_M_invalidate): Adapt.
3848 (unordered_multiset<>::_M_invalidate): Adapt.
3850 2020-07-29 David Edelsohn <dje.gcc@gmail.com>
3851 Jonathan Wakely <jwakely@redhat.com>
3852 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3854 * testsuite/lib/dg-options.exp (add_options_for_libatomic): Add
3855 target powerpc-ibm-aix* and powerpc*-*-darwin*.
3856 * testsuite/29_atomics/atomic_float/value_init.cc: Add options
3859 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
3861 * include/bits/hashtable.h
3862 (_Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type)):
3863 Add noexcept qualification.
3864 (_Hashtable(_Hashtable&&)): Fix noexcept qualification.
3865 (_Hashtable(_Hashtable&&, const allocator_type&)): Add noexcept
3867 * include/bits/unordered_map.h
3868 (unordered_map(unordered_map&&, const allocator_type&)): Add noexcept
3870 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
3872 * include/bits/unordered_set.h
3873 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
3874 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
3876 * include/debug/unordered_map
3877 (unordered_map(unordered_map&&, const allocator_type&)): Likewise.
3878 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
3880 * include/debug/unordered_set
3881 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
3882 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
3884 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
3886 * testsuite/23_containers/unordered_map/cons/noexcept_default_construct.cc:
3888 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
3890 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
3892 * testsuite/23_containers/unordered_multimap/cons/noexcept_default_construct.cc:
3894 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
3896 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
3898 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
3900 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
3902 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
3904 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
3907 2020-07-28 François Dumont <fdumont@gcc.gnu.org>
3909 * include/bits/hashtable.h
3910 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
3911 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
3912 const allocator_type&, true_type)): New.
3913 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
3914 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
3915 const allocator_type&, false_type)): New.
3916 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
3917 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
3918 const allocator_type&)): Delegate to latters.
3919 (operator=(initializer_list<value_type>)): Rehash if too small.
3920 (_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Remove
3921 size_t len parameter.
3922 * include/bits/hashtable_policy.h (_Insert_base<>::_M_insert_range):
3923 Do not try to get input range distance.
3924 * testsuite/23_containers/unordered_set/cons/bucket_hint.cc: New test.
3925 * testsuite/23_containers/unordered_set/modifiers/insert.cc: New test.
3927 2020-07-27 François Dumont <fdumont@gcc.gnu.org>
3929 * include/bits/hashtable_policy.h (_Map_base<>::at): Use
3931 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals):New.
3932 (_Hashtable_base<>::_M_node_equals): New, use latter.
3933 (_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash,
3934 _RehashPolicy, false>::_M_equal): Adapt to use latter.
3935 * include/bits/hashtable.h (_Hashtable<>::_M_update_bbegin): New.
3936 (_Hashtable<>::_M_assign): Use latter.
3937 (_Hashtable<>::_M_move_assign): Likewise.
3938 (_Hashtable<>(_Hashtable<>&&)): Likewise.
3939 (_Hashtable<>(_Hashtable<>&&, const allocator_type&)): Likewise.
3940 (_Hashtable<>::swap): Likewise.
3941 (_Hashtable<>::find): Build iterator directly from _M_find_node result.
3942 (_Hashtable<>::count): Use _Hashtable<>::find.
3943 (_Hashtable<>::equal_range): Likewise.
3944 (_Hashtable<>::_M_erase(false_type, const key_type&)): Use
3947 2020-07-27 Jonathan Wakely <jwakely@redhat.com>
3949 * src/c++17/floating_from_chars.cc (from_chars_impl): Ensure
3950 that FE_NEAREST is used.
3951 * testsuite/20_util/from_chars/4.cc: Do not use if constexpr in
3952 a { target c++14 } test.
3953 [!_GLIBCXX_HAVE_USELOCALE]: Disable all tests.
3954 * testsuite/20_util/from_chars/5.cc [!_GLIBCXX_HAVE_USELOCALE]:
3956 * testsuite/20_util/from_chars/6.cc: New test.
3958 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
3960 * include/std/future (future, shared_future, promise): Add
3961 static assertions to the primary template to reject array and
3963 * testsuite/30_threads/future/requirements/lwg3458.cc: New test.
3964 * testsuite/30_threads/promise/requirements/lwg3466.cc: New test.
3965 * testsuite/30_threads/shared_future/requirements/lwg3458.cc: New test.
3967 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
3969 * include/bits/stl_iterator.h (reverse_iterator): Constrain
3970 converting constructor and converting assignment operator.
3971 Access source iterator's data member directly instead of
3973 (move_iterator): Likewise.
3974 * testsuite/24_iterators/move_iterator/dr3435.cc: New test.
3975 * testsuite/24_iterators/reverse_iterator/dr3435.cc: New test.
3977 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
3979 * acinclude.m4 (libtool_VERSION): Bump version.
3980 * config.h.in: Regenerate.
3981 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.29 version and new
3983 * config/os/gnu-linux/ldbl-extra.ver: Add _GLIBCXX_LDBL_3.4.29
3984 version and new export.
3985 * configure: Regenerate.
3986 * configure.ac: Check for <xlocale.h> and uselocale.
3987 * crossconfig.m4: Add macro or checks for uselocale.
3988 * include/std/charconv (from_chars): Declare overloads for
3989 float, double, and long double.
3990 * src/c++17/Makefile.am: Add new file.
3991 * src/c++17/Makefile.in: Regenerate.
3992 * src/c++17/floating_from_chars.cc: New file.
3993 (from_chars): Define for float, double, and long double.
3994 * testsuite/20_util/from_chars/1_c++20_neg.cc: Prune extra
3995 diagnostics caused by new overloads.
3996 * testsuite/20_util/from_chars/1_neg.cc: Likewise.
3997 * testsuite/20_util/from_chars/2.cc: Check leading '+'.
3998 * testsuite/20_util/from_chars/4.cc: New test.
3999 * testsuite/20_util/from_chars/5.cc: New test.
4000 * testsuite/util/testsuite_abi.cc: Add new symbol versions.
4002 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
4004 * include/bits/istream.tcc
4005 (basic_istream::get(__streambuf_type&, char_type): Use unsigned
4006 long long for counter and check if it would overflow _M_gcount.
4007 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: New test.
4008 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: New test.
4010 2020-07-17 Iain Sandoe <iain@sandoe.co.uk>
4012 * include/std/coroutine: Mark the methods of the
4013 trivial awaitables as constexpr.
4015 2020-07-14 David Edelsohn <dje.gcc@gmail.com>
4017 * config/os/aix/t-aix: Set BITS from compiler cpp macro.
4019 2020-07-13 Jonathan Wakely <jwakely@redhat.com>
4023 * include/bits/istream.tcc (basic_istream::ignore(streamsize))
4024 [n == max]: Check overflow conditions on _M_gcount. Rely on
4025 the fact that either EOF or the delimiter was reached.
4026 [n < max]: Check _M_gcount < n before checking for EOF or
4028 (basic_istream::ignore(streamsize, char_type): Likewise.
4029 * src/c++98/compatibility.cc (istream::ignore(streamsize))
4030 (wistream::ignore(streamsize)): Likewise.
4031 * src/c++98/istream.cc (istream::ignore(streamsize, char_type))
4032 (wistream::ignore(streamsize, char_type)): Likewise.
4033 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Check that
4034 delimiter is discarded if the number of characters ignored
4035 doesn't fit in streamsize.
4036 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
4038 * testsuite/27_io/basic_istream/ignore/char/96161.cc: New test.
4039 * testsuite/27_io/basic_istream/ignore/wchar_t/96161.cc: New test.
4041 2020-07-08 François Dumont <fdumont@gcc.gnu.org>
4043 * include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&)): Add noexcept
4044 qualification based only on _Compare one.
4045 * testsuite/23_containers/map/cons/noexcept_move_construct.cc: Add
4047 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
4049 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
4051 * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
4053 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
4055 * include/std/limits: Whitespace changes.
4057 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
4059 * include/Makefile.am: Remove bits/int_limits.h.
4060 * include/Makefile.in: Regenerate.
4061 * include/bits/int_limits.h: Removed.
4062 * include/bits/parse_numbers.h (_Select_int_base): Replace
4063 __int_limits with __int_traits.
4064 * include/bits/range_access.h (_SSize::operator()): Likewise.
4065 * include/ext/numeric_traits.h (__numeric_traits_integer): Add
4067 (__int_traits): New alias template.
4068 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
4069 (__countr_zero, __countr_one, __popcount, __bit_ceil)
4070 (__bit_floor, __bit_width) Replace __int_limits with
4072 * include/std/charconv (__to_chars_8, __from_chars_binary)
4073 (__from_chars_alpha_to_num, from_chars): Likewise.
4074 * include/std/memory_resource (polymorphic_allocator::allocate)
4075 (polymorphic_allocator::allocate_object): Likewise.
4076 * include/std/string_view (basic_string_view::_S_compare):
4078 * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
4080 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
4082 * include/std/limits: Whitespace changes.
4084 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
4086 * include/std/optional (_Optional_payload_base, _Optional_base)
4087 (optional, __optional_hash_call_base): Adjust whitespace and
4088 other formatting. Remove redundant && tokens on template
4089 arguments to type traits.
4091 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
4093 * include/std/optional (make_optional): Add enable_if
4094 constraints and noexcept-specifier to each overload.
4095 * testsuite/20_util/optional/make_optional-2.cc: New test.
4097 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
4100 * include/std/optional (optional): Add noexcept-specifier to
4101 every constructor, assignment operator, emplace function and
4102 dereference operator.
4103 * testsuite/20_util/optional/assignment/noexcept.cc: New test.
4104 * testsuite/20_util/optional/cons/noexcept.cc: New test.
4106 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
4109 * include/bits/fs_dir.h: Use consistent tag in class-head.
4110 * include/bits/localefwd.h: Likewise.
4111 * include/bits/regex.h: Likewise.
4112 * include/bits/stl_map.h: Likewise.
4113 * include/bits/stl_multimap.h: Likewise.
4114 * include/bits/stl_multiset.h: Likewise.
4115 * include/bits/stl_set.h: Likewise.
4116 * include/std/complex: Likewise.
4117 * include/std/functional: Likewise.
4118 * include/std/future: Likewise.
4119 * include/std/system_error: Likewise.
4120 * include/std/thread: Likewise.
4121 * include/std/tuple: Likewise.
4122 * include/std/type_traits: Likewise.
4123 * include/std/valarray: Likewise.
4125 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
4127 * testsuite/27_io/basic_ios/conv/voidptr.cc: Add c++98_only
4130 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
4132 * testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: Add
4133 c++98_only target selector.
4134 * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc:
4136 * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc:
4138 * testsuite/18_support/headers/new/synopsis_cxx98.cc: Likewise.
4139 * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc:
4141 * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc:
4143 * testsuite/23_containers/headers/array/std_c++0x_neg.cc:
4145 * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc:
4147 * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
4149 * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
4151 * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc:
4153 * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc:
4155 * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++98.cc:
4157 * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc:
4159 * testsuite/26_numerics/headers/random/std_c++0x_neg.cc:
4161 * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Likewise.
4162 * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Likewise.
4163 * testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc:
4165 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
4167 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
4169 * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: Likewise.
4170 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc:
4173 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
4176 * include/std/variant
4177 (_Copy_assign_base::operator=(const _Copy_assign_base&):
4178 Do the move-assignment from a temporary so that the temporary
4179 is constructed with an explicit index.
4180 * testsuite/20_util/variant/91807.cc: New.
4182 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
4186 * testsuite/29_atomics/atomic_float/1.cc: Use different values
4188 * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
4190 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
4193 * include/bits/regex.h (operator==, operator!=): Remove noexcept
4194 equality comparisons for match_results.
4195 * testsuite/28_regex/match_results/94627.cc: New test.
4197 2020-07-01 Martin Sebor <msebor@redhat.com>
4199 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Adjust
4200 text of expected warning.
4201 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Same.
4202 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc: Same.
4203 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc: Same.
4204 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc: Same.
4206 2020-06-29 Ville Voutilainen <ville.voutilainen@gmail.com>
4209 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
4211 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
4212 Add a __nonnull__ attribute.
4213 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
4214 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
4216 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
4218 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
4219 Add a __nonnull__ attribute.
4220 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
4221 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
4223 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
4226 * include/std/type_traits (is_literal_type, is_literal_type_v):
4228 * include/std/variant (_Uninitialized):
4229 Adjust the condition and the comment.
4230 * testsuite/20_util/is_literal_type/deprecated-1z.cc: New.
4231 * testsuite/20_util/is_literal_type/requirements/explicit_instantiation.cc:
4233 * testsuite/20_util/is_literal_type/requirements/typedefs.cc: Likewise.
4234 * testsuite/20_util/is_literal_type/value.cc: Likewise.
4235 * testsuite/20_util/optional/constexpr/nullopt.cc:
4236 Use __is_literal_type directly.
4237 * testsuite/20_util/optional/nullopt.cc: Likewise.
4238 * testsuite/20_util/variable_templates_for_traits.cc: Adjust.
4239 * testsuite/20_util/variant/95915.cc: New.
4240 * testsuite/20_util/variant/compile.cc: Add new test.
4241 * testsuite/experimental/optional/constexpr/nullopt.cc:
4242 Use __is_literal_type directly.
4243 * testsuite/experimental/optional/nullopt.cc: Likewise.
4244 * testsuite/experimental/type_traits/value.cc: Adjust.
4245 * testsuite/util/testsuite_common_types.h:
4246 Use __is_literal_type directly.
4248 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4250 * include/std/charconv (__from_chars_binary): Ignore leading zeros.
4251 * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
4253 * testsuite/20_util/from_chars/3.cc: New test.
4255 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4257 * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
4258 * include/std/charconv (__detail::__to_chars): Avoid
4259 -Wsign-compare warning.
4261 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
4264 * include/std/charconv (__to_chars_i): Check for zero-sized
4265 buffer unconditionally.
4266 * testsuite/20_util/to_chars/95851.cc: New test.
4268 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
4270 * testsuite/20_util/from_chars/1_c++20_neg.cc: Check enumeration
4272 * testsuite/20_util/from_chars/1_neg.cc: Likewise. Move dg-error
4273 directives outside preprocessor condition.
4275 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
4278 * include/std/variant (__detail::__variant::_Build_FUN): Remove
4279 partial specialization to prevent narrowing conversions to bool.
4280 * testsuite/20_util/variant/compile.cc: Test non-narrowing
4281 conversions to bool.
4282 * testsuite/20_util/variant/run.cc: Likewise.
4284 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
4286 * doc/Makefile.in: Regenerate.
4287 * include/Makefile.in: Regenerate.
4288 * libsupc++/Makefile.in: Regenerate.
4289 * po/Makefile.in: Regenerate.
4290 * python/Makefile.in: Regenerate.
4291 * src/Makefile.in: Regenerate.
4292 * src/c++11/Makefile.in: Regenerate.
4293 * src/c++17/Makefile.in: Regenerate.
4294 * src/c++98/Makefile.in: Regenerate.
4295 * src/filesystem/Makefile.in: Regenerate.
4296 * testsuite/Makefile.in: Regenerate.
4298 2020-06-22 David Edelsohn <dje.gcc@gmail.com>
4300 * Makefile.am: Use -include.
4301 * Makefile.in: Regenerate.
4303 2020-06-21 David Edelsohn <dje.gcc@gmail.com>
4305 * Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
4306 * Makefile.in: Regenerate.
4307 * configure.ac (tmake_file): Substitute.
4308 * configure: Regenerate.
4309 * configure.host (aix*): Define tmake_file.
4310 * config/os/aix/t-aix: New file.
4312 2020-06-20 Jason Merrill <jason@redhat.com>
4314 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
4315 Remove greedy_ops tests.
4316 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
4317 Remove greedy_ops tests.
4319 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
4322 * include/bits/stl_algobase.h (__size_to_integer(float))
4323 (__size_to_integer(double), __size_to_integer(long double))
4324 (__size_to_integer(__float128)): Cast return type explicitly.
4325 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
4326 Remove unused typedef.
4328 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
4330 * include/bits/stl_pair.h (_Index_tuple): Remove redundant
4331 namespace qualification.
4332 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
4334 * include/std/tuple (_Head_base, _Tuple_impl, tuple_size)
4335 (tuple_element, __get_helper, get, __make_tuple_impl)
4336 (__make_1st_indices, __tuple_concater)
4337 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
4339 * include/std/utility (tuple_element, __is_tuple_like_impl)
4340 (tuple_size, __pair_get, get): Likewise.
4342 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
4344 * include/bits/std_function.h (function): Define all member
4347 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
4349 * include/bits/stl_algo.h (__includes): Simplify the code.
4351 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
4353 * include/std/optional (optional()): Explicitly define it.
4355 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
4358 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
4359 Construct the first value at *__first instead of on the stack.
4360 (__uninitialized_default_n_1<true>): Likewise.
4361 Improve comments on several of the non-standard algorithms.
4362 * testsuite/20_util/specialized_algorithms/uninitialized_default/94540.cc:
4364 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/94540.cc:
4366 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
4368 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
4370 * testsuite/23_containers/vector/cons/94540.cc: New test.
4372 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
4374 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
4375 Replace Value type with int so trivial code path is used.
4376 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
4379 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
4381 * include/bits/stl_uninitialized.h (uninitialized_fill_n): Only
4382 use std::fill_n when the size is an integral type.
4383 (__uninitialized_default_n): Likewise.
4384 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
4386 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
4388 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
4391 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
4394 * include/bits/atomic_base.h (__atomic_impl::load): Use the _Val
4395 alias instead of deducing _Tp as an unqualified type.
4396 (__atomic_impl::exchange): Use the _Val alias to remove volatile
4397 from the reinterpret_cast result type.
4399 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
4401 * include/std/atomic (atomic): Add static assertions.
4402 * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
4404 2020-06-16 Patrick Palka <ppalka@redhat.com>
4407 * testsuite/20_util/is_constructible/94003.cc: New test.
4409 2020-06-15 Jonathan Wakely <jwakely@redhat.com>
4411 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
4412 Update value for C++20.
4413 * include/std/version (__cpp_lib_constexpr_char_traits): Likewise.
4414 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
4415 Update expected value.
4416 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
4419 2020-06-15 Paul Keir <paul.keir@uws.ac.uk>
4421 * include/bits/char_traits.h (char_traits::move): constexpr move with
4422 overlap was using copy_backward incorrectly.
4423 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
4426 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
4428 * testsuite/29_atomics/atomic_flag/clear/1.cc: Also test clear()
4429 when the value is currently set.
4430 * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc:
4431 Actually check the return value.
4432 * testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc:
4435 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
4437 * include/bits/atomic_base.h (atomic_flag::test): Add missing
4439 * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
4440 dg-options and verify results of test function.
4441 * testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
4443 2020-06-11 Jonathan Wakely <jwakely@redhat.com>
4446 * include/bits/istream.tcc (basic_istream::ignore(streamsize, CharT)):
4447 Only discard an extra character if we didn't already reach the
4449 * src/c++98/istream.cc (istream::ignore(streamsiz, char))
4450 (wistream::ignore(streamsize, wchar_t)): Likewise.
4451 * testsuite/27_io/basic_istream/ignore/char/94749.cc: New test.
4452 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc: New test.
4454 2020-06-10 Patrick Palka <ppalka@redhat.com>
4457 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
4458 Also check that the iterator and sentinel have the same type before
4459 applying the unwrapping optimization for __normal_iterator.
4460 Split the check into two, one for the first iterator/sentinel
4461 pair and another for second iterator/sentinel pair. Remove uses
4462 of __niter_base, and remove uses of std::move on a
4464 * include/bits/ranges_algobase.h (__equal_fn): Likewise.
4465 (__copy_or_move): Likewise. Perform similar adjustments for
4466 the reverse_iterator and move_iterator optimizations. Inline
4467 the checks into the if-constexprs, and use using-declarations to
4468 make them less visually noisy. Remove uses of __niter_wrap.
4469 (__copy_or_move_backward): Likewise.
4470 * testsuite/25_algorithms/copy/95578.cc: New test.
4471 * testsuite/25_algorithms/copy_backward/95578.cc: New test.
4472 * testsuite/25_algorithms/equal/95578.cc: New test.
4473 * testsuite/25_algorithms/lexicographical_compare/95578.cc: New test.
4474 * testsuite/25_algorithms/move/95578.cc: New test.
4475 * testsuite/25_algorithms/move_backward/95578.cc: New test.
4477 2020-06-10 François Dumont <fdumont@gcc.gnu.org>
4478 Jonathan Wakely <jwakely@redhat.com>
4480 * include/bits/deque.tcc (__lex_cmp_dit): New.
4481 (__lexicographical_compare_aux1): Define overloads for deque
4483 * include/bits/stl_algobase.h (__lexicographical_compare::__3way):
4484 New static member function.
4485 (__lexicographical_compare<true>::__3way): Likewise.
4486 (__lexicographical_compare<true>::__lc): Use __3way.
4487 (__lexicographical_compare_aux): Rename to
4488 __lexicographical_compare_aux1 and declare overloads for deque
4490 (__lexicographical_compare_aux): Define new forwarding function
4491 that calls __lexicographical_compare_aux1 and declare new overloads
4493 (lexicographical_compare): Do not use __niter_base on
4495 * include/debug/safe_iterator.tcc
4496 (__lexicographical_compare_aux): Define overloads for safe
4498 * testsuite/25_algorithms/lexicographical_compare/1.cc: Add
4499 checks with random access iterators.
4500 * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
4503 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
4505 * include/bits/stl_iterator.h (move_iterator::operator=): Define.
4506 * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
4508 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
4510 * include/std/optional (bad_optional_access): Define default
4511 constructor and destructor as defaulted.
4512 * testsuite/20_util/optional/bad_access.cc: New test.
4514 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
4516 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
4518 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
4520 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
4522 * include/bits/unique_ptr.h (operator<<): Define for C++20.
4523 * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
4525 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
4527 * include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
4528 (__detail::__cat, __detail::__diff): Move to class scope in the
4529 relevant __iterator_traits specializations.
4530 (__iterator_traits<>): Use nested class templates instead of ones from
4532 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
4533 class scope in iterator_traits<common_iterator<I, S>>.
4534 (iterator_traits<common_iterator<I, S>>): Use nested class template
4535 instead of __detail::__common_iter_ptr.
4537 2020-06-04 François Dumont <fdumont@gcc.gnu.org>
4539 * include/bits/stl_algo.h (__copy_n_a): Move to ...
4540 * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict
4542 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
4544 (__niter_base(const _Safe_iterator<_Ite, _Seq,
4545 random_access_iterator_tag>&)): Declare.
4546 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
4547 _Deque_iterator<>)): Declare.
4548 * include/bits/deque.tcc
4549 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
4550 _Deque_iterator<>)): New.
4551 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
4553 * include/bits/streambuf_iterator.h
4554 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*, bool)): Adapt.
4555 * include/debug/safe_iterator.tcc (__niter_base): New.
4556 * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
4558 * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc:
4560 * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:
4562 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New test.
4563 * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc:
4566 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
4568 * include/bits/ranges_algobase.h (__copy_n_fn): Only call
4569 ranges::copy for positive values.
4570 * include/bits/stl_algo.h (copy_n): Convert Size argument to an
4571 integral type and only call __copy_n for positive values.
4572 * testsuite/util/testsuite_iterators.h
4573 (random_access_iterator_wrapper::operator+=): Fix range check for
4575 (output_container, input_container, forward_container)
4576 (bidirectional_container, random_access_container): New alias
4578 * testsuite/25_algorithms/copy_n/5.cc: New test.
4580 2020-06-02 Jonathan Wakely <jwakely@redhat.com>
4583 * include/debug/deque (deque(const _Base&)): Replace parameter
4584 with a struct that wraps a const _Base&.
4585 * include/debug/forward_list (forward_list(_Base_ref)): New
4587 * include/debug/list (list(const _Base&)): Replace parameter
4588 with a struct that wraps a const _Base&.
4589 * include/debug/map.h (map(const _Base&)): Likewise.
4590 * include/debug/multimap.h (multimap(const _Base&)): Likewise.
4591 * include/debug/multiset.h (multiset(const _Base&)): Likewise.
4592 * include/debug/set.h (set(const _Base&)): Likewise.
4593 * include/debug/unordered_map (unordered_map(const _Base&))
4594 (unordered_multimap(const _Base&)): Likewise.
4595 * include/debug/unordered_set (unordered_set(const _Base&))
4596 (unordered_multiset(const _Base&)): Likewise.
4597 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
4598 Adjust dg-error line number.
4599 * include/debug/vector (vector(const _Base&)): Likewise.
4600 * testsuite/23_containers/deque/debug/90102.cc: New test.
4601 * testsuite/23_containers/forward_list/debug/90102.cc: New test.
4602 * testsuite/23_containers/list/debug/90102.cc: New test.
4603 * testsuite/23_containers/map/debug/90102.cc: New test.
4604 * testsuite/23_containers/multimap/debug/90102.cc: New test.
4605 * testsuite/23_containers/multiset/debug/90102.cc: New test.
4606 * testsuite/23_containers/set/debug/90102.cc: New test.
4607 * testsuite/23_containers/unordered_map/debug/90102.cc: New test.
4608 * testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
4609 * testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
4610 * testsuite/23_containers/unordered_set/debug/90102.cc: New test.
4611 * testsuite/23_containers/vector/debug/90102.cc: New test.
4613 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
4616 * include/bits/fs_path.h (path::_S_to_string): Move to
4617 namespace-scope and rename to ...
4618 (__detail::__string_from_range): ... this.
4619 [WINDOWS] (__detail::__wstr_from_utf8): New function template to
4620 convert a char sequence containing UTF-8 to wstring.
4621 (path::_S_convert(Iter, Iter)): Adjust call to _S_to_string.
4622 (path::_S_convert_loc(Iter, Iter, const locale&)): Likewise.
4623 (u8path(InputIterator, InputIterator)) [WINDOWS]: Use
4624 __string_from_range to obtain a contiguous range and
4625 __wstr_from_utf8 to obtain a wide string.
4626 (u8path(const Source&)) [WINDOWS]: Use __effective_range to
4627 obtain a contiguous range and __wstr_from_utf8 to obtain a wide
4629 (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
4630 Use __wstr_from_utf8.
4632 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
4634 * testsuite/util/testsuite_iterators.h:
4635 (input_iterator_wrapper::operator++(int)): Return proxy object.
4637 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
4639 * doc/xml/manual/evolution.xml: Document deprecation of
4640 __is_nullptr_t and removal of std::allocator members.
4641 * doc/html/manual/api.html: Regenerate.
4643 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
4645 * doc/xml/manual/containers.xml: Replace <xref> with <link>.
4646 * doc/xml/manual/evolution.xml: Likewise.
4647 * doc/html/manual/api.html: Regenerate.
4648 * doc/html/manual/containers.html: Regenerate.
4650 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
4652 * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
4653 * doc/html/faq.html: Regenerate.
4655 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
4657 * doc/xml/manual/policy_data_structures_biblio.xml: Remove
4660 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
4662 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
4663 www.cs.princeton.edu to https.
4664 * doc/html/manual/policy_data_structures.html: Regenerate.
4666 2020-05-31 Douglas B Rupp <douglas.b.rupp@gmail.com>
4668 * crossconfig.m4 (<*-vxworks>): Check for more math decls.
4669 * configure: Rebuild.
4671 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
4674 * configure: Regenerated.
4676 2020-05-29 François Dumont <fdumont@gcc.gnu.org>
4679 * include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
4680 * include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
4681 (unordered_map<>::insert_or_assign): Adapt.
4683 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4686 * include/bits/atomic_base.h (__atomic_impl::load): Add
4687 cv-qualifiers to parameter so that _Tp is deduced as the
4689 * testsuite/29_atomics/atomic_float/95282.cc: New test.
4691 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4694 * include/std/ranges (transform_view::_Sentinel): Allow hidden
4695 friends to work with _Iterator<true> and _Iterator<false>.
4696 (join_view::_Sentinel): Likewise.
4697 * testsuite/std/ranges/adaptors/95322.cc: New test.
4699 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4702 * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
4703 operators to use the correct operations on the underlying
4705 * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
4707 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
4709 * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
4711 2020-05-26 Patrick Palka <ppalka@redhat.com>
4714 * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
4715 Remove and instead define it ...
4716 (common_iterator::_Proxy): ... here.
4717 (common_iterator::operator->): Use it.
4718 * testsuite/24_iterators/common_iterator/2.cc: New test.
4719 * testsuite/std/ranges/adaptors/95322.cc: New test.
4721 2020-05-23 Patrick Palka <ppalka@redhat.com>
4724 * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
4725 dg-additional-options. Avoid unused-but-set-variable warning.
4727 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
4730 * include/debug/helper_functions.h (__get_distance): Only declare
4731 as a constexpr function for C++14 and up.
4732 * testsuite/25_algorithms/copy/debug/95289.cc: New test.
4734 * include/bits/fs_path.h (__detail::_S_range_begin)
4735 (__detail::_S_range_end, path::_S_string_from_iter): Replace with
4736 overloaded function template __detail::__effective_range.
4737 (__detail::__effective_range): New overloaded function template to
4738 create a basic_string or basic_string_view for an effective range.
4739 (__detail::__value_type_is_char): Use __detail::__effective_range.
4740 Do not use remove_const on value type.
4741 (__detail::__value_type_is_char_or_char8_t): Likewise.
4742 (path::path(const Source&, format))
4743 (path::path(const Source&, const locale&))
4744 (path::operator/=(const Source&), path::append(const Source&))
4745 (path::concat(const Source&)): Use __detail::__effective_range.
4746 (path::_S_to_string(InputIterator, InputIterator)): New function
4747 template to create a string view if possible, or string otherwise.
4748 (path::_S_convert): Add overloads that convert a string returned
4749 by __detail::__effective_range. Use if-constexpr to inline conversion
4750 logic from all overloads of _Cvt::_S_convert.
4751 (path::_S_convert_loc): Add overload that converts a string. Use
4752 _S_to_string to avoid allocation when possible.
4753 (path::_Cvt): Remove.
4754 (path::operator+=(CharT)): Remove indirection through path::concat.
4755 * include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
4756 overload for non-const pointers, to avoid constructing a std::string.
4757 * src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
4758 compilation with call to _S_convert.
4760 * include/bits/fs_path.h (__detail::_S_range_begin)
4761 (__detail::_S_range_end): Remove unintentional static specifiers.
4762 * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
4763 (__detail::_S_range_end): Likewise.
4765 * include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
4766 Replace alias template with variable template. Don't remove const.
4767 (filesystem::__detail::__is_path_src): Replace overloaded function
4768 template with variable template and specializations.
4769 (filesystem::__detail::__is_path_iter_src): Replace alias template
4770 with class template.
4771 (filesystem::__detail::_Path): Use __is_path_src. Remove support for
4773 (filesystem::__detail::_Path2): New alias template for checking
4774 InputIterator requirements.
4775 (filesystem::__detail::__constructible_from): Remove.
4776 (filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
4777 * testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
4778 constructor arguments of void and void* types.
4780 2020-05-21 Matthias Kretz <kretz@kde.org>
4782 * testsuite/Makefile.am: Remove dup target_triplet and set tool,
4783 allowing runtest to work without arguments.
4784 * testsuite/Makefile.in: Regenerate.
4786 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
4789 * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
4790 Reorder constraints to avoid recursion when constructors use
4791 iterator_traits (LWG 3420).
4792 * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
4794 * include/experimental/socket (basic_socket::is_open()
4795 (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
4797 * include/experimental/bits/net.h (__endpoint, __protocol)
4798 (__acceptable_protocol, __inet_protocol): New concepts.
4799 (__detail::__is_endpoint): Move trait from <experimental/socket>.
4800 (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
4802 (__endpoint, __protocol, __acceptable_protocol): New variable
4804 * include/experimental/socket (__is_endpoint): Move to net.h header.
4805 (basic_socket, basic_socket_acceptor): Check requirements.
4807 * include/experimental/executor (use_future_t::use_future_t()): Fix
4808 incorrect noexcept-specifier.
4809 * include/experimental/internet (basic_resolver_results): Adjust
4811 * include/experimental/socket (__basic_socket_impl::release): Add
4813 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
4815 (basic_socket::release(), basic_socket::release(error_code&)): Add
4816 missing member functions.
4817 (basic_socket::is_open()): Add nodiscard attribute.
4818 (basic_socket::close(error_code&)): Pass argument to base function.
4819 (basic_socket_acceptor::release())
4820 (basic_socket_acceptor::release(error_code&)): Add missing member
4822 (basic_socket_acceptor::is_open()): Add nodiscard attribute.
4823 (basic_socket_streambuf::error()): Add noexcept.
4824 (basic_socket_iostream::error()): Likewise.
4825 * testsuite/experimental/net/socket/basic_socket.cc: New test.
4827 * include/experimental/buffer: Replace typedefs with
4829 * include/experimental/executor: Likewise.
4830 * include/experimental/internet: Likewise.
4831 * include/experimental/socket: Likewise.
4832 * include/experimental/timer: Likewise.
4834 2020-05-19 Jonathan Wakely <jwakely@redhat.com>
4837 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
4839 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
4841 (random_device::_M_init): Use __x86_rdseed_rdrand when both
4842 instructions are available.
4843 * testsuite/26_numerics/random/random_device/94087.cc: New test.
4845 2020-05-19 Patrick Palka <ppalka@redhat.com>
4848 * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
4850 * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
4852 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
4855 * configure: Regenerated.
4857 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
4859 * configure: Regenerated.
4861 2020-05-13 Alexandre Oliva <oliva@adacore.com>
4864 * include/experimental/memory_resource
4865 (__resource_adaptor_imp::do_allocate): Handle max_align_t on
4866 x86-vxworks as on x86-solaris.
4867 (__resource_adaptor_imp::do_deallocate): Likewise.
4868 * testsuite/experimental/memory_resource/new_delete_resource.cc:
4870 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
4871 (test03): Drop max-align test for char-aligned alloc.
4873 2020-05-08 Ulrich Drepper <drepper@redhat.com>
4875 * include/bits/atomic_base.h (atomic_flag): Implement test member
4877 * include/std/version: Define __cpp_lib_atomic_flag_test.
4878 * testsuite/29_atomics/atomic_flag/test/explicit.cc: New file.
4879 * testsuite/29_atomics/atomic_flag/test/implicit.cc: New file.
4881 2020-05-07 Jonathan Wakely <jwakely@redhat.com>
4883 PR libstdc++/94971 (partial)
4884 * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify
4885 std::sample using macro to work in parallel mode.
4886 (__sort_fn): Likewise for std::sort.
4887 (ranges::__nth_element_fn): Likewise for std::nth_element.
4888 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
4889 Likewise for std::__min_cmp.
4890 * include/parallel/algobase.h (lexicographical_compare_three_way):
4891 Add to namespace std::__parallel.
4894 * include/parallel/multiway_merge.h (_GuardedIterator::operator*)
4895 (_GuardedIterator::operator _RAIter, _UnguardedIterator::operator*)
4896 (_UnguardedIterator::operator _RAIter): Add const qualifier.
4897 (operator<(_GuardedIterator&, _GuardedIterator&)
4898 (operator<=(_GuardedIterator&, _GuardedIterator&)
4899 (operator<(_UnguardedIterator&, _UnguardedIterator&)
4900 (operator<=(_UnguardedIterator&, _UnguardedIterator&): Change
4901 parameters to const references.
4903 2020-05-07 Eric Botcazou <ebotcazou@adacore.com>
4905 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
4906 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
4908 2020-05-06 François Dumont <fdumont@gcc.gnu.org>
4910 * include/bits/stl_algobase.h (struct _Bit_iterator): New declaration.
4911 (std::__fill_a1(_Bit_iterator, _Bit_iterator, const bool&)): Likewise.
4912 * include/bits/stl_bvector.h (__fill_bvector): Move outside
4913 _GLIBCXX_STD_C namespace.
4914 (fill(_Bit_iterator, _Bit_iterator, const bool&)): Likewise and rename
4916 (__fill_a1): ...this.
4917 * testsuite/25_algorithms/fill/bvector/1.cc: New.
4919 2020-05-06 H.J. Lu <hongjiu.lu@intel.com>
4921 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
4923 2020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4925 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
4926 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
4928 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
4929 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
4932 2020-05-06 Martin Liska <mliska@suse.cz>
4935 2020-05-05 Martin Liska <mliska@suse.cz>
4937 * include/parallel/multiway_merge.h:
4938 Use const for _Compare template argument.
4940 2020-05-06 Jonathan Wakely <jwakely@redhat.com>
4942 * doc/xml/manual/abi.xml (abi.versioning.history): Document library
4943 versions for GCC 9.[123] and 10.1 releases.
4944 * doc/html/*: Regenerate.
4946 2020-05-06 Jakub Jelinek <jakub@redhat.com>
4948 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
4949 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
4950 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
4951 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
4952 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
4953 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
4954 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
4956 2020-05-05 Martin Liska <mliska@suse.cz>
4959 * include/parallel/multiway_merge.h:
4960 Use const for _Compare template argument.
4962 2020-05-04 Fangrui Song <maskray@google.com>
4964 * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
4966 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
4968 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
4969 * doc/html/*: Regenerate.
4972 * src/c++17/memory_resource.cc
4973 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
4976 2020-05-04 Nathan Sidwell <nathan@acm.org>
4979 * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
4980 ptrdiff_t before negation, to show intent more clearly.
4982 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
4985 * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
4986 Add comment about single-threaded behaviour.
4987 (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
4988 class member access out of loop.
4989 (synchronized_pool_resource::synchronized_pool_resource())
4990 (synchronized_pool_resource::~synchronized_pool_resource())
4991 (synchronized_pool_resource::release()): Check __gthread_active_p
4992 before creating and/or deleting the thread-specific data key.
4993 (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
4995 (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
4996 path for single-threaded case.
4997 (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
4998 Likewise. Return if unable to find a pool that owns the allocation.
4999 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
5001 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
5003 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
5006 2020-05-03 Jonathan Wakely <jwakely@redhat.com>
5009 * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
5010 usable in constant expressions.
5011 * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
5014 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
5017 * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
5019 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
5020 Patrick Palka <ppalka@redhat.com>
5023 * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
5024 Add trait to determine return type and an alias for it.
5025 (ranges::__cust_imove::_IMove::operator()): Use __result instead of
5026 deduced return type.
5027 (iter_rvalue_reference_t): Use _IMove::__type instead of checking
5028 the result of ranges::iter_move.
5029 (__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
5030 instead of checking the result of ranges::iter_move.
5031 * testsuite/24_iterators/customization_points/92894.cc: New test.
5032 * testsuite/24_iterators/indirect_callable/92894.cc: New test.
5034 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
5037 * include/std/type_traits (__is_complete_or_unbounded): Replace
5038 BADNAME _T with _Tp.
5039 * testsuite/17_intro/badnames.cc: New test.
5041 2020-04-30 Jonathan Wakely <jwakely@redhat.com>
5044 * include/bits/alloc_traits.h (allocator_traits::_S_construct)
5045 (allocator_traits::_S_destroy)
5046 (allocator_traits<allocator<T>>::construct): Use traits in
5047 noexcept-specifiers.
5048 * include/bits/allocator.h (allocator<void>::construct)
5049 (allocator<void>::destroy): Likewise.
5050 * include/ext/malloc_allocator.h (malloc_allocator::construct)
5051 (malloc_allocator::destroy): Likewise.
5052 * include/ext/new_allocator.h (new_allocator::construct)
5053 (new_allocator::destroy): Likewise.
5054 * testsuite/20_util/allocator/89510.cc: New test.
5055 * testsuite/ext/malloc_allocator/89510.cc: New test.
5056 * testsuite/ext/new_allocator/89510.cc: New test.
5058 2020-04-29 Jonathan Wakely <jwakely@redhat.com>
5061 * include/bits/basic_string.tcc: Update comment about explicit
5064 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
5067 * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
5068 Remove non-standard macro.
5069 * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
5070 to indicate P1032R1 support.
5071 * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
5072 * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
5073 * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
5074 * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
5075 (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
5076 (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
5077 * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
5079 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
5080 * testsuite/21_strings/basic_string_view/operations/copy/char/
5081 constexpr.cc: Likewise.
5082 * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
5085 * include/bits/alloc_traits.h (_S_construct): Restore placement
5086 new-expression for C++11/14/17 and call std::construct_at directly
5088 * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
5089 function returning void.
5090 * testsuite/20_util/specialized_algorithms/
5091 uninitialized_value_construct/94831.cc: New test.
5092 * testsuite/23_containers/vector/cons/94831.cc: New test.
5094 2020-04-28 Patrick Palka <ppalka@redhat.com>
5096 LWG 3433 subrange::advance(n) has UB when n < 0
5097 * include/std/ranges (subrange::prev): Fix typo.
5098 (subrange::advance): Handle a negative argument as per the proposed
5099 resolution of LWG 3433.
5100 * testsuite/std/ranges/subrange/lwg3433.cc: New test.
5102 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
5103 Iain Sandoe <iain@sandoe.co.uk>
5106 * include/std/coroutine: Implement handing for non-
5107 class coroutine return types.
5109 2020-04-24 Jonathan Wakely <jwakely@redhat.com>
5111 * include/experimental/executor (service_already_exists): Make default
5112 constructor public (LWG 3414).
5113 * testsuite/experimental/net/execution_context/make_service.cc: Check
5114 the service_already_exists can be default constructed.
5116 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
5117 Jonathan Wakely <jwakely@redhat.com>
5121 * include/std/any (any): Rename template parameters for consistency
5123 (any::_Decay): Rename to _Decay_if_not_any.
5124 (any::any(T&&):: Remove is_constructible from constraints. Remove
5125 non-standard overload.
5126 (any::any(in_place_type_t<T>, Args&&...))
5127 (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
5128 (any::emplace(Args&&...))
5129 (any::emplace(initializer_list<U>, Args&&...)):
5130 Use decay_t instead of _Decay.
5131 * testsuite/20_util/any/cons/90415.cc: New test.
5132 * testsuite/20_util/any/cons/92156.cc: New Test.
5133 * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
5135 * testsuite/20_util/any/modifiers/92156.cc: New test.
5137 2020-04-23 Jonathan Wakely <jwakely@redhat.com>
5139 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
5140 * doc/html/*: Regenerate.
5142 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
5143 value for C++17 to 201803L because P0858R0 is supported for C++17.
5144 * include/std/version (__cpp_lib_array_constexpr): Likewise.
5145 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
5146 Check for value corresponding to P0031R0 features being tested.
5147 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
5148 Check for value corresponding to P0858R0 features being tested.
5150 * include/std/version (__cpp_lib_three_way_comparison): Define for
5151 freestanding builds.
5153 2020-04-23 Thomas Rodgers <rodgert@appliantology.com>
5155 * include/experimental/net/executor (system_context): Mark
5156 system_context::system_context() = delete.
5157 * testsuite/experimental/net/executor/1.cc: Add new
5158 test to check system_context is not default constructible.
5160 2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
5162 * include/std/coroutine: Update the inline namespace to __n4861.
5163 Add the __cpp_lib_coroutine define, set to 201902L.
5164 * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
5166 2020-04-22 Jonathan Wakely <jwakely@redhat.com>
5168 * include/std/execution (__cpp_lib_execution): Define to indicate
5169 support for P0024R2 and P1001R2.
5170 * include/std/version (__cpp_lib_execution): Define.
5171 * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
5172 defined by <algorithm>, move other tests to new tests ...
5173 * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
5174 * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
5175 * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
5176 * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
5178 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
5179 different values for C++17 and C++20, to indicate different feature
5180 sets. Update value for C++20 to indicate P1032R1 support.
5181 * include/std/version (__cpp_lib_array_constexpr): Likewise.
5182 * testsuite/23_containers/array/comparison_operators/constexpr.cc:
5183 Check feature test macro.
5184 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
5186 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
5188 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
5189 in C++17 mode and check feature test macro.
5191 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
5193 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
5194 defined by <utility>.
5196 * include/std/functional (__cpp_lib_concepts): Update macro value to
5197 indicate P1964R2 support.
5198 * include/std/version (__cpp_lib_concepts): Likewise.
5199 * testsuite/std/concepts/1.cc: Adjust expected value.
5200 * testsuite/std/concepts/2.cc: Likewise.
5202 * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
5203 __cpp_lib_constexpr_functional.
5204 * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
5205 * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
5207 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
5208 indicate P1006R1 support.
5209 (__cpp_lib_to_address): Define to indicate P0653R2 support.
5210 * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
5212 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
5214 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
5216 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
5218 * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
5219 Define to indicate P0339R6 support.
5220 * include/std/string_view (__cpp_lib_starts_ends_with): Define to
5221 indicate P0457R2 support.
5222 * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
5223 to indicate P0758R1 support.
5224 (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
5225 (__cpp_lib_type_identity): Define to indicate P0887R1 support.
5226 * include/std/version (__cpp_lib_atomic_float)
5227 (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
5228 (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
5229 (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
5230 (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
5231 (__cpp_lib_to_address): Define.
5232 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
5234 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
5236 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
5238 * include/std/version (__cpp_lib_map_insertion)
5239 (__cpp_lib_unordered_map_insertion): Remove.
5241 * include/std/condition_variable (__cpp_lib_jthread): Remove
5242 redundant definition.
5243 * include/std/stop_token (__cpp_lib_jthread): Update macro value to
5244 indicate P1869R1 support.
5245 * include/std/version (__cpp_lib_jthread): Update value.
5246 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
5247 for updated macro value.
5248 * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
5250 * testsuite/30_threads/jthread/1.cc: Likewise.
5251 * testsuite/30_threads/jthread/2.cc: Likewise.
5252 * testsuite/30_threads/stop_token/1.cc: Likewise.
5253 * testsuite/30_threads/stop_token/2.cc: Likewise.
5255 * testsuite/21_strings/basic_string/erasure.cc: Check for
5256 __cpp_lib_erase_if macro.
5257 * testsuite/23_containers/deque/erasure.cc: Add header name to #error
5259 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
5260 * testsuite/23_containers/list/erasure.cc: Likewise.
5261 * testsuite/23_containers/map/erasure.cc: Likewise.
5262 * testsuite/23_containers/set/erasure.cc: Likewise.
5263 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
5264 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
5265 * testsuite/23_containers/vector/erasure.cc: Likewise.
5267 2020-04-21 Jonathan Wakely <jwakely@redhat.com>
5269 * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
5270 to define operator<=>.
5271 * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
5273 * doc/Makefile.am (xml_sources_manual): Add missing XML files.
5274 * doc/Makefile.in: Regenerate.
5275 * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
5277 * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
5278 to the C++11 status table.
5279 * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
5280 proposals with table matching contents of the C++14 standard.
5281 * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
5283 * doc/html/*: Regenerate.
5286 * include/std/type_traits (__is_nt_constructible_impl): Add partial
5287 specializations for bounded arrays with non-empty initializers.
5288 * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
5290 2020-04-20 Thomas Rodgers <trodgers@redhat.com>
5292 * testsuite/lib/libstdc++.exp: Add additional_flags=
5293 -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
5294 compiling with a newer Thread Building Blocks.
5296 2020-04-20 Jonathan Wakely <jwakely@redhat.com>
5298 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
5300 * testsuite/20_util/is_constructible/51185.cc: Make test class a
5301 non-aggregate so that the test verifies the same thing in all -std
5303 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
5304 results for some types when paren-init for aggregates is supported.
5306 * include/std/version (__cpp_lib_three_way_comparison): Update value.
5307 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
5308 (__detail::__synth3way): Add noexcept-specifier.
5310 * include/bits/stl_map.h (map): Define operator<=> and remove
5311 operator< for C++20.
5312 * include/bits/stl_multimap.h (multimap): Likewise.
5313 * include/bits/stl_multiset.h (multiset): Likewise.
5314 * include/bits/stl_set.h (set): Likewise.
5315 * include/bits/stl_tree.h (_Rb_tree): Likewise.
5316 (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
5317 operator!= for C++20.
5318 * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
5319 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
5320 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
5321 * include/debug/set.h (__gnu_debug::set): Likewise.
5322 * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
5323 * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
5324 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
5325 * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
5327 2020-04-20 Matthias Kretz <kretz@kde.org>
5329 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
5331 2020-04-19 Jonathan Wakely <jwakely@redhat.com>
5333 * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
5334 * include/bits/stl_stack.h (stack): Likewise.
5335 * testsuite/23_containers/queue/cmp_c++20.cc: New test.
5336 * testsuite/23_containers/stack/cmp_c++20.cc: New test.
5338 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
5339 Remove redundant operator!= for C++20.
5340 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
5342 * include/debug/unordered_map (unordered_map, unordered_multimap):
5344 * include/debug/unordered_set (unordered_set, unordered_multiset):
5348 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
5349 redundant assignment in constructor.
5351 2020-04-18 Jonathan Wakely <jwakely@redhat.com>
5353 * include/std/chrono (duration, time_point): Define operator<=> and
5354 remove redundant operator!= for C++20.
5355 * testsuite/20_util/duration/comparison_operators/three_way.cc: New
5357 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
5360 * testsuite/util/native_type/native_priority_queue.hpp: Use
5361 allocator_traits to rebind allocator.
5363 2020-04-17 Jonathan Wakely <jwakely@redhat.com>
5365 * include/bits/forward_list.h (forward_list): Define operator<=> and
5366 remove redundant comparison operators for C++20.
5367 * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
5368 * include/bits/stl_deque.h (deque): Likewise.
5369 * include/bits/stl_iterator.h (__normal_iterator): Likewise.
5370 * include/bits/stl_list.h (list): Likewise.
5371 * include/bits/stl_vector.h (vector): Likewise.
5372 * include/debug/deque (__gnu_debug::deque): Likewise.
5373 * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
5374 * include/debug/list (__gnu_debug::list): Likewise.
5375 * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
5377 * include/debug/vector (__gnu_debug::vector): Likewise.
5378 * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
5379 operator<=> for C++20.
5380 * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
5381 * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
5382 * testsuite/23_containers/list/cmp_c++20.cc: New test.
5383 * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
5384 * testsuite/23_containers/vector/cmp_c++20.cc: New test.
5386 * include/bits/basic_string.h (basic_string): Define operator<=> and
5387 remove redundant comparison operators for C++20.
5388 * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
5389 Add comparison_category members.
5390 (__detail::__char_traits_cmp_cat): New helper to get comparison
5391 category from char traits class.
5392 * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
5394 (sub_match): Define operator<=> and remove redundant comparison
5395 operators for C++20.
5396 (match_results): Remove redundant operator!= for C++20.
5397 * include/std/string_view (basic_string_view): Define operator<=> and
5398 remove redundant comparison operators for C++20.
5399 * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
5401 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
5403 * testsuite/21_strings/basic_string_view/operations/copy/char/
5404 constexpr.cc: Initialize variable.
5405 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
5406 constexpr.cc: Likewise.
5407 * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
5408 dg-do directive and remove comments showing incorrect signatures.
5409 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
5411 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
5413 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
5415 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
5417 2020-04-16 Jonathan Wakely <jwakely@redhat.com>
5419 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
5420 name of unused parameter.
5422 2020-04-15 Jonathan Wakely <jwakely@redhat.com>
5424 * include/bits/fs_dir.h (file_status): Define operator== for C++20.
5425 (directory_entry): Define operator<=> and remove redundant comparison
5426 operators for C++20.
5427 * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
5428 * include/bits/fs_path.h (path): Define operator<=> and remove
5429 redundant comparison operators for C++20.
5430 * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
5431 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
5432 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
5433 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
5435 * include/bits/allocator.h (operator!=): Do not define for C++20.
5436 * include/bits/locale_classes.h (operator!=): Likewise.
5437 * include/bits/std_function.h (operator==(nullptr_t, const function&))
5438 (operator!=(const function&, nullptr_t))
5439 (operator!=(nullptr_t, const function&)): Likewise.
5440 * include/ext/bitmap_allocator.h (operator!=): Likewise.
5441 * include/ext/debug_allocator.h (operator!=): Likewise.
5442 * include/ext/extptr_allocator.h (operator!=): Likewise.
5443 * include/ext/malloc_allocator.h (operator!=): Likewise.
5444 * include/ext/mt_allocator.h (operator!=): Likewise.
5445 * include/ext/new_allocator.h (operator!=): Likewise.
5446 * include/ext/pool_allocator.h (operator!=): Likewise.
5447 * include/ext/throw_allocator.h (operator!=): Likewise.
5448 * include/std/bitset (bitset::operator!=): Likewise.
5449 * include/std/memory_resource (operator!=): Likewise.
5450 * include/std/scoped_allocator (operator!=): Likewise.
5452 * include/std/typeindex (operator<=>): Define for C++20.
5453 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
5455 2020-04-14 Jonathan Wakely <jwakely@redhat.com>
5457 * libsupc++/compare (compare_three_way): Fix constraint so that
5458 BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
5459 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
5463 * include/bits/shared_ptr.h (operator<=>): Define for C++20.
5464 * include/bits/shared_ptr_base.h (operator<=>): Likewise.
5465 * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
5466 * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
5467 * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
5468 std::less<A*> to be used when comparing std::shared_ptr<A> objects in
5472 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
5473 * testsuite/18_support/comparisons/categories/94565.cc: New test.
5475 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
5477 * include/std/coroutine: Update coroutines builtin define,
5480 2020-04-09 Jonathan Wakely <jwakely@redhat.com>
5482 * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
5483 (strong_order, weak_order, partial_order): Replace uses of <=> with
5484 compare_three_way function object (LWG 3324).
5485 * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
5486 equality operator so that X satisfies three_way_comparable.
5487 * testsuite/18_support/comparisons/algorithms/strong_order.cc:
5489 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
5491 * include/bits/unique_ptr.h (operator<=>): Define for C++20.
5492 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
5493 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
5494 * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
5495 * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
5497 2020-04-08 Jonathan Wakely <jwakely@redhat.com>
5499 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
5501 * include/std/complex (operator==(const T&, const complex<T>&))
5502 (operator!=(const complex<T>&, const complex<T>&))
5503 (operator!=(const complex<T>&, const T&))
5504 (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
5505 * testsuite/26_numerics/slice/compare.cc: New test.
5507 * include/std/charconv (to_chars_result, from_chars_result): Add
5508 defaulted equality comparisons for C++20.
5509 * testsuite/20_util/from_chars/compare.cc: New test.
5510 * testsuite/20_util/to_chars/compare.cc: New test.
5512 2020-04-07 Jonathan Wakely <jwakely@redhat.com>
5515 * include/std/charconv (__integer_to_chars_result_type)
5516 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
5518 * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
5519 use of std::string_view with std::string.
5520 * testsuite/20_util/from_chars/2.cc: Likewise.
5521 * testsuite/20_util/to_chars/1.cc: Likewise.
5522 * testsuite/20_util/to_chars/2.cc: Likewise.
5524 2020-04-06 Jonathan Wakely <jwakely@redhat.com>
5527 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
5528 usable in constant expressions for C++20.
5529 (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
5530 _GLIBCXX20_CONSTEXPR.
5531 (std::char_traits<char>, std::char_traits<wchar_t>)
5532 (std::char_traits<char8_t>): Make move, copy and assign usable in
5533 constant expressions for C++20.
5534 (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
5535 and copy usable in constant expressions for C++20.
5536 * include/std/string_view (basic_string_view::copy): Add
5537 _GLIBCXX20_CONSTEXPR.
5538 * testsuite/21_strings/basic_string_view/operations/copy/char/
5539 constexpr.cc: New test.
5540 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
5541 constexpr.cc: New test.
5543 2020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
5545 * doc/xml/manual/appendix_contributing.xml: Refer to Git
5546 documentation instead of Subversion. Switch to https.
5547 * doc/html/manual/appendix_contributing.html: Regenerate.
5549 2020-04-03 Jonathan Wakely <jwakely@redhat.com>
5552 * include/bits/ptr_traits.h (__to_address): Add special case for debug
5553 iterators, to avoid dereferenceable check.
5554 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
5555 * testsuite/20_util/to_address/debug.cc: New test.
5557 2020-04-01 Andrea Corallo <andrea.corallo@arm.com>
5559 * testsuite/experimental/net/execution_context/use_service.cc:
5560 Require pthread and gthreads.
5562 2020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
5564 * doc/xml/manual/appendix_free.xml: Move "free books" list from
5566 * doc/html/manual/appendix_free.html: Regenerate.
5568 2020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
5570 Library-side tests for parenthesized aggregate init
5575 * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
5576 * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
5577 * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
5578 * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
5579 * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
5580 * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
5581 * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
5582 * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
5583 * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
5585 * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
5586 * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
5587 * testsuite/20_util/variant/92878_92947.cc: Likewise.
5588 * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
5590 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
5592 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
5594 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
5596 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
5598 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
5600 * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
5601 * testsuite/23_containers/queue/92878_92947.cc: Likewise.
5602 * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
5604 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
5605 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
5607 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
5609 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
5611 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
5613 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
5616 2020-03-28 Jonathan Wakely <jwakely@redhat.com>
5618 * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
5619 for changes due to parenthesized aggregate-initialization in C++20.
5620 * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
5621 with std::chrono::sys_time in C++20.
5623 * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
5624 to constrain C++20 versions of comparison operators. Fix backwards
5625 logic of relational operators.
5626 (move_iterator): Use requires-clause to constrain comparison operators
5627 in C++20. Do not declare non-standard same-type overloads for C++20.
5628 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
5629 of comparisons and check using greedy_ops type.
5630 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
5631 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
5632 main function from compile-only test.
5633 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
5635 2020-03-27 Jonathan Wakely <jwakely@redhat.com>
5637 * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
5638 * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
5639 C++20 concepts are required.
5640 * include/bits/stl_iterator_base_types.h: Likewise.
5641 * include/std/concepts: Likewise.
5642 * include/std/version: Likewise.
5643 * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
5646 * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
5647 (reverse_iterator::iterator_category): Define for C++20.
5648 (reverse_iterator): Define comparison operators correctly for C++20.
5649 (__normal_iterator): Add constraints to comparison operators for C++20.
5650 (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
5651 overload for input iterators.
5652 (move_iterator): Add constraints to comparison operators for C++20.
5653 Define operator<=> for C++20.
5654 * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
5655 * testsuite/24_iterators/move_iterator/move_only.cc: New test.
5656 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
5657 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
5659 * include/bits/iterator_concepts.h (__detail::__decay_copy)
5660 (__detail::__member_begin, __detail::__adl_begin): Move here from
5661 <bits/range_access.h>.
5662 (__detail::__ranges_begin, __detail::__range_iter_t): Define.
5663 * bits/range_access.h (__cust_access::__decay_copy)
5664 (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
5665 <bits/iterator_concepts.h>.
5666 (ranges::iterator_t): Use __detail::__range_iter_t.
5667 * include/bits/stl_iterator.h (back_insert_iterator): Simplify
5668 conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
5669 (front_insert_iterator): Likewise.
5670 (insert_iterator): Implement changes from P0896R4 for C++20.
5671 * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
5672 * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
5673 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
5674 for inclusion in synopsis_c++20.cc which expects different signatures
5675 for some function templates.
5676 * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
5678 * include/std/type_traits (__is_array_convertible): Move definition
5679 to immediately after is_convertible.
5681 2020-03-26 Jonathan Wakely <jwakely@redhat.com>
5683 * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
5684 (chrono::months, chrono::sys_days, chrono::local_t)
5685 (chrono::local_time, chrono::local_seconds, chrono::local_days):
5687 (chrono::time_point): Add missing static assert.
5688 * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
5689 * testsuite/std/time/clock/file/overview.cc: New test.
5690 * testsuite/std/time/clock/file/members.cc: New test.
5691 * testsuite/std/time/syn_c++20.cc: New test.
5693 2020-03-25 Mike Crowe <mac@mcrowe.com>
5695 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
5697 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
5700 2020-03-25 Jonathan Wakely <jwakely@redhat.com>
5702 * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
5703 * include/std/chrono (filesystem::__file_clock): Here.
5704 (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
5705 Define public member functions for C++20.
5706 (is_clock, is_clock_v): Define traits for C++20.
5707 * include/std/condition_variable (condition_variable::wait_until): Add
5708 check for valid clock.
5709 * include/std/future (_State_baseV2::wait_until): Likewise.
5710 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
5711 * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
5713 * include/std/thread (this_thread::sleep_until): Likewise.
5714 * testsuite/30_threads/condition_variable/members/2.cc: Qualify
5715 slow_clock with new namespace.
5716 * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
5718 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
5720 * testsuite/30_threads/future/members/clock_neg.cc: New test.
5721 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
5722 Qualify slow_clock with new namespace.
5723 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
5724 clock_neg.cc: New test.
5725 * testsuite/30_threads/shared_future/members/clock_neg.cc: New
5727 * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
5728 * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
5730 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
5731 slow_clock with new namespace.
5732 * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
5733 * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
5735 * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
5736 * testsuite/std/time/traits/is_clock.cc: New test.
5737 * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
5740 2020-03-21 Jonathan Wakely <jwakely@redhat.com>
5743 * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
5744 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
5745 Improve test coverage.
5748 * include/bits/fs_path.h (path::_S_str_convert): Replace first
5749 parameter with basic_string_view so that strings with different
5750 allocators can be accepted.
5751 (path::generic_string<C,T,A>()): Use basic_string object that uses the
5752 right allocator type.
5753 * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
5754 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
5757 2020-03-18 Jonathan Wakely <jwakely@redhat.com>
5760 * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
5761 (__is_nt_default_constructible_impl): Remove.
5762 (__is_nothrow_default_constructible_impl): Remove.
5763 (__is_nt_constructible_impl): Add bool template parameter. Adjust
5764 partial specializations.
5765 (__is_nothrow_constructible_impl): Replace class template with alias
5767 (is_nothrow_default_constructible): Derive from alias template
5768 __is_nothrow_constructible_impl instead of
5769 __is_nothrow_default_constructible_impl.
5770 * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
5772 * include/std/stop_token (stop_token::_Stop_state_ref): Define
5773 comparison operators explicitly if the compiler won't synthesize them.
5775 * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
5776 __cpp_lib_concepts before using iter_reference_t.
5777 * include/bits/stream_iterator.h (istream_iterator): Check
5778 __cpp_lib_concepts before using default_sentinel_t.
5779 * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
5782 * include/experimental/executor (executor::executor(Executor)): Call
5783 make_shared directly instead of _M_create. Create _Tgt1 object.
5784 (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
5785 Call allocate_shared directly instead of _M_create. Create _Tgt2
5787 (executor::target_type): Add cast needed for new _Tgt interface.
5788 (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
5789 (executor::_Tgt): Define the same interface whether RTTI is enabled or
5791 (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
5792 std::type_info in the interface.
5793 (executor::_Tgt::_M_func): Add data member.
5794 (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
5795 (executor::_Tgt1::_S_func): Define function to access target without
5797 (executor::_M_create): Remove.
5798 (operator==, operator!=): Simplify comparisons for executor.
5799 * include/experimental/socket (is_error_code_enum<socket_errc>):
5800 Define specialization before use.
5801 * testsuite/experimental/net/executor/1.cc: New test.
5803 2020-03-16 Jonathan Wakely <jwakely@redhat.com>
5806 * include/experimental/executor (service_already_exists): Add default
5807 constructor. Declare make_service to be a friend.
5808 * testsuite/experimental/net/execution_context/make_service.cc: New
5811 2020-03-12 Jonathan Wakely <jwakely@redhat.com>
5813 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
5814 a null pointer to functions with nonnull(1) attribute.
5816 2020-03-11 Patrick Palka <ppalka@redhat.com>
5818 * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
5819 'address' -> 'std::__addressof'.
5820 * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
5821 a non-forward input_range.
5822 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
5823 default constructor protected instead of deleted, like with
5824 input_iterator_wrapper.
5825 (test_range::iterator): Add comment explaining that this type is used
5826 only when the underlying wrapper is input_iterator_wrapper or
5827 output_iterator_wrapper. Remove delegating defaulted constructor so
5828 that the inherited default constructor is used instead.
5830 LWG 3286 ranges::size is not required to be valid after a call to
5831 ranges::begin on an input range
5832 * include/std/ranges (subrange::subrange): Split single-argument
5833 constructor into two, one constrained by _S_store_size and another by
5835 (take_view::begin): Call size() before calling ranges::begin(_M_base).
5836 * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
5837 * testsuite/std/ranges/subrange/lwg3286.cc: New test.
5839 2020-03-10 Jonathan Wakely <jwakely@redhat.com>
5841 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
5842 instead of _M_current.
5843 (split_view::_OuterIter::operator++): Likewise.
5845 * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
5846 (transform_view::_Iterator::operator*): Add noexcept-specifier.
5847 (transform_view::_Iterator::iter_move): Inline __iter_move body here.
5848 (split_view::_OuterIter::__current): Add noexcept.
5849 (split_view::_InnerIter::__iter_swap): Remove.
5850 (split_view::_InnerIter::__iter_move): Remove.
5851 (split_view::_InnerIter::_M_i_current): New accessors.
5852 (split_view::_InnerIter::__at_end): Use _M_i_current().
5853 (split_view::_InnerIter::operator*): Likewise.
5854 (split_view::_InnerIter::operator++): Likewise.
5855 (iter_move(const _InnerIter&)): Likewise.
5856 (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
5857 * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
5858 for iter_move and iter_swap on split_view's inner iterator.
5861 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
5862 Change expression in noexcept-specifier to match function body.
5864 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
5865 comment explaining multiple dg-do directives.
5866 * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
5867 so test is run as well as compiled.
5869 2020-03-09 Jonathan Wakely <jwakely@redhat.com>
5872 * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
5873 handle concatenations that change the type of the first component.
5874 (path::operator+=(basic_string_view<value_type>)): Likewise.
5875 * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
5877 2020-03-06 Patrick Palka <ppalka@redhat.com>
5879 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
5880 join_view::_Sentinel<!_Const>.
5881 * testsuite/std/ranges/adaptors/join.cc: Augment test.
5884 * include/bits/range_access.h (__cust_access::_Empty::operator()):
5885 Declare return type to be bool instead of auto.
5886 * testsuite/std/ranges/adaptors/93978.cc: New test.
5888 2020-03-06 Jonathan Wakely <jwakely@redhat.com>
5891 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
5892 (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
5893 second argument to __glibcxx_rwlock_init.
5894 * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
5897 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
5898 test to not fail due to PR 94063.
5899 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
5900 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
5902 2020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
5904 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
5907 2020-03-05 Jonathan Wakely <jwakely@redhat.com>
5909 * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
5910 * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
5911 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
5912 * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
5913 for return value, and in comparison.
5914 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
5917 * include/std/string_view: Include <bits/ostream_insert.h>.
5918 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
5920 2020-03-04 Jonathan Wakely <jwakely@redhat.com>
5922 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
5924 2020-03-04 Patrick Palka <ppalka@redhat.com>
5927 * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
5928 condition for when to use memset, making sure to additionally check that
5929 the output pointer's value type is a non-volatile byte type. Instead of
5930 requiring that the fill type is a byte type, just require that it's an
5932 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
5934 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
5936 * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
5937 blocked by PR 94017.
5938 * testsuite/25_algorithms/fill/94017.cc: New test.
5939 * testsuite/25_algorithms/fill_n/94017.cc: New test.
5941 LWG 3355 The memory algorithms should support move-only input iterators
5943 * include/bits/ranges_uninitialized.h
5944 (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
5945 to copy __ifirst, which could be a move-only input iterator. Use
5946 operator- instead of ranges::distance to compute distance from a sized
5948 (__uninitialized_copy_n_fn::operator()): Likewise.
5949 (__uninitialized_move_fn::operator()): Likewise.
5950 (__uninitialized_move_n_fn::operator()): Likewise.
5951 (__uninitialized_destroy_fn::operator()): Use std::move to avoid
5952 attempting to copy __first.
5953 (__uninitialized_destroy_n_fn::operator()): Likewise.
5954 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
5956 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
5958 * .../specialized_algorithms/uninitialized_move/constrained.cc:
5961 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
5962 protected instead of private.
5963 (test_sized_range_sized_sent): New.
5965 * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
5966 New testsuite iterator.
5967 * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
5968 * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
5970 * include/bits/ranges_uninitialized.h
5971 (uninitialized_copy_fn::operator()): Pass a reference type as the first
5972 argument to is_nothrow_assignable_v.
5973 (uninitialized_copy_fn::operator()): Likewise.
5974 (uninitialized_move_fn::operator()): Likewise. Return an in_out_result
5975 with the input iterator stripped of its move_iterator.
5976 (uninitialized_move_n_fn::operator()): Likewise.
5977 (uninitialized_fill_fn::operator()): Pass a reference type as the first
5978 argument to is_nothrow_assignable_v.
5979 (uninitialized_fill_n_fn::operator()): Likewise.
5981 2020-03-03 Jonathan Wakely <jwakely@redhat.com>
5984 * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
5985 traits to control when to use memmove and memcmp optimizations.
5986 (__is_nonvolatile_trivially_copyable): New helper trait.
5987 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
5988 use memcmp optimization with volatile data.
5989 * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
5990 (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
5991 * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
5992 (__copy_move_backward_a2): Likewise.
5993 (__equal_aux1): Use __memcmpable.
5994 (__lexicographical_compare_aux): Do not use memcmp optimization with
5996 * testsuite/25_algorithms/copy/94013.cc: New test.
5997 * testsuite/25_algorithms/copy_backward/94013.cc: New test.
5998 * testsuite/25_algorithms/equal/94013.cc: New test.
5999 * testsuite/25_algorithms/fill/94013.cc: New test.
6000 * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
6001 * testsuite/25_algorithms/move/94013.cc: New test.
6002 * testsuite/25_algorithms/move_backward/94013.cc: New test.
6004 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
6005 Avoid redundant iterator comparisons (LWG 3410).
6007 2020-03-02 Jonathan Wakely <jwakely@redhat.com>
6010 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
6012 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
6014 * include/std/ranges (__detail::__maybe_empty_t): Rename to
6016 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
6018 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
6021 2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
6023 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
6025 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
6027 * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
6028 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
6029 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
6030 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
6031 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
6033 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
6034 Add libatomic option.
6035 * testsuite/30_threads/jthread/jthread.cc: Likewise.
6037 2020-02-29 François Dumont <fdumont@gcc.gnu.org>
6039 * include/bits/stl_algo.h
6040 (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
6041 * include/bits/stl_algobase.h: ...here.
6042 * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
6044 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
6046 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
6048 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
6050 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
6051 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
6052 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
6053 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
6054 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
6055 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
6056 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
6060 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
6062 2020-02-28 Patrick Palka <ppalka@redhat.com>
6065 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
6066 Fix condition for when to use memcmp, making it consistent with the
6067 corresponding condition used in std::lexicographical_compare.
6068 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
6070 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
6071 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
6072 existing signatures for C++2a.
6074 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
6076 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
6077 test instead of just compiling it.
6079 2020-02-28 Patrick Palka <ppalka@redhat.com>
6081 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
6082 whenever the underlying range models common_range.
6084 * include/std/ranges (__detail::_CachedPosition): New struct.
6085 (views::filter_view::_S_needs_cached_begin): New member variable.
6086 (views::filter_view::_M_cached_begin): New member variable.
6087 (views::filter_view::begin): Use _M_cached_begin to cache its
6089 (views::drop_view::_S_needs_cached_begin): New static member variable.
6090 (views::drop_view::_M_cached_begin): New member variable.
6091 (views::drop_view::begin): Use _M_cached_begin to cache its result
6092 when _S_needs_cached_begin.
6093 (views::drop_while_view::_M_cached_begin): New member variable.
6094 (views::drop_while_view::begin): Use _M_cached_begin to cache its
6096 (views::reverse_view::_S_needs_cached_begin): New static member
6098 (views::reverse_view::_M_cached_begin): New member variable.
6099 (views::reverse_view::begin): Use _M_cached_begin to cache its result
6100 when _S_needs_cached_begin.
6101 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
6102 drop_view::begin caches its result.
6103 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
6104 that drop_while_view::begin caches its result.
6105 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
6106 filter_view::begin caches its result.
6107 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
6108 reverse_view::begin caches its result.
6110 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
6112 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
6113 filesystems that silently truncate timestamps.
6114 * testsuite/experimental/filesystem/operations/last_write_time.cc:
6117 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
6118 -Wstringop-overflow warnings.
6120 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
6122 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
6123 -fdiagnostics-urls=never to options.
6125 2020-02-27 Patrick Palka <ppalka@redhat.com>
6127 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
6129 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
6130 (take_view::_Sentinel<_Const>): Likewise.
6131 (take_while_view::_Sentinel<_Const>): Likewise.
6132 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
6133 * testsuite/std/ranges/adaptors/split.cc: Augment test.
6134 * testsuite/std/ranges/adaptors/take.cc: Augment test.
6135 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
6136 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
6138 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
6139 base() of a vector<>::iterator is a pointer.
6140 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
6141 * testsuite/25_algorithms/move/constrained.cc: Likewise.
6142 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
6143 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
6145 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
6146 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
6147 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
6148 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
6149 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
6151 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
6153 * include/debug/array (operator<=>): Define for C++20.
6154 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
6155 Adjust dg-error line numbers.
6156 * testsuite/23_containers/array/tuple_interface/
6157 tuple_element_debug_neg.cc: Likewise.
6159 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
6160 defining _GLIBCXX_ASSERTIONS.
6161 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
6162 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
6163 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
6164 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
6165 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
6166 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
6167 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
6168 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
6169 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
6170 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
6171 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
6172 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
6174 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
6175 C++98 where the member function of the base class returns void.
6177 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
6178 equality comparisons that support value-initialized iterators.
6180 * include/bits/boost_concept_check.h (__function_requires): Add
6181 _GLIBCXX14_CONSTEXPR.
6182 * testsuite/25_algorithms/min/concept_checks.cc: New test.
6184 2020-02-26 Patrick Palka <ppalka@redhat.com>
6187 * include/std/ranges (split_view::_InnerIter::operator==): Compare
6188 the operands' _M_i rather than their _M_i.current().
6189 * testsuite/std/ranges/adaptors/split.cc: Augment test.
6191 P1645R1 constexpr for <numeric> algorithms
6192 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
6193 partial_sum, adjacent_difference): Make conditionally constexpr for
6195 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
6197 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
6198 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
6199 constexpr for C++20.
6200 * include/std/version (__cpp_lib_constexpr_numeric): Define.
6201 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
6202 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
6203 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
6204 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
6205 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
6206 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
6207 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
6208 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
6209 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
6210 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
6211 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
6213 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
6215 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
6216 variables in smaller scope and avoid calling ranges::distance when we
6217 know they are pointers. Remove statically-unreachable use of
6218 __builtin_unreachable().
6219 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
6222 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
6224 (__detail::__maybe_const_t): Likewise.
6225 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
6226 (transform_view, take_view, take_while_view, elements_view): Use
6228 (join_view, split_view): Use both.
6230 2020-02-25 Patrick Palka <ppalka@redhat.com>
6232 LWG 3397 basic_istream_view::iterator should not provide
6234 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
6236 (basic_istream_view:_Iterator::iterator_concept): ... this.
6237 * testsuite/std/ranges/istream_view.cc: Augment test.
6239 LWG 3325 Constrain return type of transformation function for
6241 * include/std/ranges (transform_view): Constrain the return type of the
6242 transformation function as per LWG 3325.
6243 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
6245 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
6246 * include/std/ranges (join_view::_Iterator::operator--): Require that
6247 range_reference_t<_Base> models common_range.
6248 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
6250 LWG 3301 transform_view::_Iterator has incorrect iterator_category
6251 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
6252 determination of iterator_category as per LWG 3301.
6253 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
6255 LWG 3292 iota_view is under-constrained
6256 * include/std/ranges (iota_view): Require that _Winc models semiregular
6258 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
6260 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
6262 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
6263 during constant evaluation. Call __builtin_memmove directly instead of
6265 (__copy_or_move_backward): Likewise.
6266 * include/bits/stl_algobase.h (__memmove): Remove.
6267 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
6268 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
6269 Use __builtin_memmove directly instead of __memmove.
6270 (__copy_move_a2): Do not use memmove during constant evaluation.
6271 (__copy_move_backward_a2): Use _IsMove constant to select correct
6272 __copy_move_backward specialization.
6273 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
6274 begin turned into moves during constant evaluation.
6276 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
6280 * include/bits/stl_algobase.h (__memmove): Cast away const before
6281 doing move assignment.
6282 * testsuite/25_algorithms/move/93872.cc: New test.
6283 * testsuite/25_algorithms/move_backward/93872.cc: New test.
6285 2020-02-24 Patrick Palka <ppalka@redhat.com>
6288 * include/bits/ranges_algobase.h (__copy_or_move,
6289 __copy_or_move_backward): Don't inspect the iter_value_t of the output
6290 iterator, instead inspect its iterator_traits directly.
6291 * include/bits/stl_iterator.h (back_insert_iterator::container):
6292 Conditionally initialize.
6293 (back_insert_iterator::difference_type): Conditionally define.
6294 (back_insert_iterator::back_insert_iterator): Conditionally define this
6295 default constructor.
6296 (front_insert_iterator::container): Conditionally initialize.
6297 (front_insert_iterator::difference_type): Conditionally define.
6298 (front_insert_iterator::front_insert_iterator): Conditionally define
6299 this default constructor.
6300 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
6301 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
6303 P0769R2 Add shift to <algorithm>
6304 * include/bits/ranges_algo.h (shift_left, shift_right): New.
6305 * testsuite/25_algorithms/shift_left/1.cc: New test.
6306 * testsuite/25_algorithms/shift_right/1.cc: New test.
6308 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
6310 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
6311 Make noexcept-specifier conditional.
6312 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
6315 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
6317 (operator==(istream_iterator, default_sentinel_t)): Add operator.
6318 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
6319 * include/bits/streambuf_iterator.h
6320 (istreambuf_iterator(default_sentinel_t)): Add constructor.
6321 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
6322 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
6324 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
6325 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
6327 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
6329 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
6330 (ranges::enable_view): Simplify (LWG 3326).
6331 * include/bits/range_access.h (ranges::enable_view): Declare.
6332 * include/bits/regex.h (__enable_view_impl): Remove partial
6334 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
6335 * include/bits/stl_set.h (__enable_view_impl): Likewise.
6336 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
6337 * include/debug/multiset.h (__enable_view_impl): Likewise.
6338 * include/debug/set.h (__enable_view_impl): Likewise.
6339 * include/debug/unordered_set (__enable_view_impl): Likewise.
6340 * include/experimental/string_view (ranges::enable_view): Define
6341 partial specialization.
6342 * include/std/span (ranges::enable_view): Likewise.
6343 * include/std/string_view (ranges::enable_view): Likewise.
6344 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
6346 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
6348 * include/std/optional (operator<=>(optional<T>, optional<U>))
6349 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
6351 * include/std/tuple (__tuple_cmp): New helper function for <=>.
6352 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
6353 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
6354 (operator<=>(monostate, monostate)): Define for C++20.
6355 * testsuite/20_util/optional/relops/three_way.cc: New test.
6356 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
6357 * testsuite/20_util/variant/89851.cc: Move to ...
6358 * testsuite/20_util/variant/relops/89851.cc: ... here.
6359 * testsuite/20_util/variant/90008.cc: Move to ...
6360 * testsuite/20_util/variant/relops/90008.cc: ... here.
6361 * testsuite/20_util/variant/relops/three_way.cc: New test.
6363 2020-02-20 Patrick Palka <ppalka@redhat.com>
6365 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
6367 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
6368 __maybe_refwrap to capture lvalue references by reference, and then use
6369 unwrap_reference_t to forward the by-reference captures as references.
6370 * testsuite/std/ranges/adaptors/split.cc: Augment test.
6371 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
6373 * include/std/ranges (iota_view): Forward declare _Sentinel.
6374 (iota_view::_Iterator): Befriend _Sentinel.
6375 (iota_view::_Sentinel::_M_equal): New member function.
6376 (iota_view::_Sentinel::operator==): Use it.
6377 (views::_Iota::operator()): Forward __f using the correct type.
6378 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
6379 with integers of different signedness, to appease iota_view's deduction
6381 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
6383 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
6385 * include/bits/range_access.h (ranges::begin): Reject array of
6387 (ranges::end, ranges::size): Require arrays to be bounded.
6388 (ranges::data): Require lvalue or borrowed_range.
6389 (ranges::iterator_t): Remove constraint.
6390 * testsuite/std/ranges/access/begin.cc: Do not check array of
6392 * testsuite/std/ranges/access/begin_neg.cc: New test.
6393 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
6394 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
6395 * testsuite/std/ranges/access/ssize.cc: Do not check array of
6398 * include/std/system_error (error_category::operator<=>)
6399 (operator<=>(const error_code&, const error_code&))
6400 (operator<=>(const error_condition&, const error_condition&)): Define
6402 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
6403 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
6405 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
6407 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
6408 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
6410 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
6411 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
6413 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
6414 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
6415 Remove incorrect comment.
6416 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
6419 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
6421 * include/std/thread (thread::id::operator<=>): Define for C++20.
6422 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
6423 functions in namespace std.
6424 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
6426 2020-02-19 Patrick Palka <ppalka@redhat.com>
6428 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
6429 null terminator of the underlying string as part of the test_range.
6430 (main): Call test03.
6432 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
6434 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
6435 requirement (LWG 3385).
6436 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
6437 expected declaration.
6439 * include/std/ranges (take_while_view, drop_view, drop_while_view)
6440 (elements_view:_Iterator): Initialize data members (LWG 3364).
6442 * libsupc++/compare (three_way_comparable): Remove always-false check
6443 that should have been removed with weak_equality (P1959R0).
6444 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
6446 * include/std/concepts (__detail::__partially_ordered_with): Move here
6448 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
6449 to simplify definition (LWG 3331).
6450 * libsupc++/compare (__detail::__partially_ordered_with): Move to
6453 * include/std/concepts (totally_ordered_with): Remove redundant
6454 requirement (LWG 3329).
6456 * include/std/ranges (__detail::__convertible_to_non_slicing): New
6458 (__detail::__pair_like_convertible_to): Remove.
6459 (__detail::__pair_like_convertible_from): Add requirements for
6460 non-slicing conversions.
6461 (subrange): Constrain constructors with __convertible_to_non_slicing.
6462 Remove constructors from pair-like types. Add new deduction guide.
6463 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
6465 * include/bits/iterator_concepts.h (iter_move): Add declaration to
6466 prevent unqualified lookup finding a suitable declaration (LWG 3247).
6468 * include/std/memory_resource (polymorphic_allocator::allocate)
6469 (polymorphic_allocator::allocate_object): Change type of exception to
6470 bad_array_new_length (LWG 3237).
6471 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
6473 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
6474 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
6475 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
6476 * testsuite/20_util/unwrap_reference/3.cc: New test.
6478 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
6479 type during overload resolution, use static assert instead (LWG 3200).
6480 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
6482 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
6484 * include/std/span (span(T (&)[N])): Use non-deduced context to
6485 prevent first parameter from interfering with class template argument
6486 deduction (LWG 3369).
6487 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
6488 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
6491 * include/std/span (span::const_iterator, span::const_reverse_iterator)
6492 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
6494 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
6496 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
6498 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
6499 constrained.cc: Likewise.
6500 * testsuite/20_util/specialized_algorithms/
6501 uninitialized_default_construct/constrained.cc: Likewise.
6502 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
6503 constrained.cc: Likewise.
6504 * testsuite/20_util/specialized_algorithms/uninitialized_move/
6505 constrained.cc: Likewise.
6506 * testsuite/20_util/specialized_algorithms/
6507 uninitialized_value_construct/constrained.cc: Likewise.
6509 * include/bits/range_access.h (range_size_t): Define alias template.
6510 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
6511 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
6513 * include/std/ranges (filter_view, transform_view, take_view)
6514 (join_view, split_view, reverse_view): Remove commented-out converting
6515 constructors (LWG 3280).
6517 * include/std/memory (uninitialized_construct_using_allocator): Use
6518 std::construct_at (LWG 3321).
6520 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
6521 (polymorphic_allocator::allocate_object)
6522 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
6524 LWG 3379. "safe" in several library names is misleading
6525 * include/bits/range_access.h (enable_safe_range): Rename to
6526 enable_borrowed_range.
6527 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
6528 (safe_range): Rename to borrowed_range.
6529 * include/bits/ranges_algo.h: Adjust to use new names.
6530 * include/bits/ranges_algobase.h: Likewise.
6531 * include/bits/ranges_uninitialized.h: Likewise.
6532 * include/std/ranges: Likewise.
6533 (safe_iterator_t): Rename to borrowed_iterator_t.
6534 (safe_subrange_t): Rename to borrowed_subrange_t.
6535 * include/std/span: Adjust to use new names.
6536 * include/std/string_view: Likewise.
6537 * include/experimental/string_view: Likewise.
6538 * testsuite/std/ranges/access/begin.cc: Likewise.
6539 * testsuite/std/ranges/access/cbegin.cc: Likewise.
6540 * testsuite/std/ranges/access/cdata.cc: Likewise.
6541 * testsuite/std/ranges/access/cend.cc: Likewise.
6542 * testsuite/std/ranges/access/crbegin.cc: Likewise.
6543 * testsuite/std/ranges/access/crend.cc: Likewise.
6544 * testsuite/std/ranges/access/data.cc: Likewise.
6545 * testsuite/std/ranges/access/end.cc: Likewise.
6546 * testsuite/std/ranges/access/rbegin.cc: Likewise.
6547 * testsuite/std/ranges/access/rend.cc: Likewise.
6548 * testsuite/std/ranges/safe_range.cc: Likewise.
6549 * testsuite/std/ranges/safe_range_types.cc: Likewise.
6550 * testsuite/util/testsuite_iterators.h: Likewise.
6552 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
6553 (tuple_element<1, const subrange<I, S, K>>): Add partial
6554 specializations (LWG 3398).
6555 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
6557 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
6558 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
6559 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
6561 2020-02-18 Patrick Palka <ppalka@redhat.com>
6563 P1983R0 Wording for GB301, US296, US292, US291, and US283
6564 * include/std/ranges (filter_view::pred): New member function.
6565 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
6566 P1983R0 fixes the highlighted issue in the same way.
6567 (join_view::_Iterator<_Const>): Add friend
6568 join_view::_Iterator<!_Const>.
6569 (join_view::_M_inner): Remove mutable specifier, effectively reverting
6570 the proposed wording changes of P3278.
6571 (join_view::begin): Refine the condition for when to return a const
6573 (split_view::_OuterIter::_OuterIter): Adjust constraints.
6574 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
6577 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
6580 * include/std/ranges (_RangeAdaptor): Add deduction guide.
6581 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
6583 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
6584 (transform_view::_Iterator): Add alias _Base_iter and use in place of
6586 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
6587 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
6588 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
6589 (split_view::_InnerIter::_S_iter_cat()): Likewise.
6591 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
6592 assumption that long is wider than int.
6593 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
6594 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
6595 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
6596 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
6598 P1976R2 Fixed-size span construction from dynamic range
6599 * include/std/span (__cpp_lib_span): Update value.
6600 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
6602 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
6604 (span::first<Count>(), span::last<Count>()): Use explicit type in
6606 (as_bytes, as_writable_bytes): Likewise.
6607 * include/std/version (__cpp_lib_span): Update value.
6608 * testsuite/23_containers/span/1.cc: Check new value.
6609 * testsuite/23_containers/span/2.cc: Check new value.
6610 * testsuite/23_containers/span/explicit.cc: New test.
6612 * include/std/span (span::__is_compatible_array): Simplify alias
6613 template by using requires-clause.
6614 (span::__is_compatible_ref): New alias template for constraining
6616 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
6617 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
6618 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
6619 redundant parentheses.
6620 (span(R&&)): Add missing constraints.
6622 * include/std/span (span): Reorder members and rename template
6623 parameters to match declarations in the C++2a working paper.
6625 P2116R0 Remove tuple-like protocol support from fixed-extent span
6626 * include/std/span (get, tuple_size, tuple_element): Remove.
6627 * testsuite/23_containers/span/everything.cc: Remove checks for
6629 * testsuite/23_containers/span/get_neg.cc: Remove.
6630 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
6631 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
6632 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
6634 2020-02-17 Patrick Palka <ppalka@redhat.com>
6636 P2106R0 Alternative wording for GB315 and GB316
6637 * include/bits/ranges_algo.h (in_fun_result): New.
6638 (for_each_result, for_each_n_result): Change into an alias of
6640 (in_in_result): New.
6641 (mismatch_result): Change into an alias of in_in_result.
6642 (copy_if_result): Change into an alias of in_out_result.
6643 (swap_ranges_result): Change into an alias of in_in_result.
6644 (unary_transform_result): Change into an alias of in_out_result.
6645 (in_in_out_result): New.
6646 (binary_transform_result): Change into an alias of in_in_out_result.
6647 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
6648 remove_copy_result, unique_copy_result, reverse_copy_result,
6649 rotate_copy_result, partial_sort_copy_result): Change into an alias of
6651 (in_out_out_result): New.
6652 (partition_copy_result, merge_result): Change into an alias of
6654 (set_union_result, set_intersection_result): Change into an alias of
6656 (set_difference_result): Change into an alias of in_out_result.
6657 (set_symmetric_difference): Change into an alias of in_in_out_result.
6658 (min_max_result): New.
6659 (minmax_result, minmax_element_result): Change into an alias of
6661 (in_found_result): New.
6662 (next_permutation_result, prev_permutation_result): Change into an alias
6664 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
6665 Adjust following changes to next_permutation_result and
6666 prev_permutation_result.
6667 * include/bits/ranges_algobase.h (in_out_result): New.
6668 (copy_result, move_result, move_backward_result, copy_backward_result,
6669 copy_n_result): Change into an alias of in_out_result.
6670 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
6671 uninitialized_copy_n_result, uninitialized_move_result,
6672 uninitialized_move_n_result): Likewise.
6673 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
6674 structured bindings.
6675 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
6677 P1243R4 Rangify new algorithms
6678 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
6679 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
6680 * testsuite/25_algorithms/clamp/constrained.cc: New test.
6681 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
6682 * testsuite/25_algorithms/sample/constrained.cc: New test.
6684 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
6686 P1964R2 Wording for boolean-testable
6687 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
6688 (__adjacent_find_fn): Cast result of predicate to bool.
6689 * include/std/concepts (__boolean): Remove.
6690 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
6691 new helper concepts.
6692 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
6693 (predicate): Use __boolean_testable instead of boolean.
6694 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
6697 P1970R2 Consistency for size() functions: Add ranges::ssize
6698 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
6699 * testsuite/std/ranges/access/ssize.cc: New test.
6701 P1956R1 On the names of low-level bit manipulation functions
6702 * include/bits/hashtable_policy.h: Update comment.
6703 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
6704 (ispow2, ceil2, floor2, log2p1): Likewise.
6705 (__cpp_lib_int_pow2): Add feature test macro.
6706 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
6707 * include/std/memory (assume_aligned): Adjust use of ispow2.
6708 * include/std/version (__cpp_lib_int_pow2): Add.
6709 * libsupc++/new_opa.cc: Adjust use of __ispow2.
6710 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
6711 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
6712 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
6713 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
6714 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
6715 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
6716 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
6717 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
6718 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
6719 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
6720 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
6721 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
6723 * include/std/charconv: Add comment.
6725 PR libstdc++/92546 (partial)
6726 * include/bits/random.h (uniform_random_bit_generator): Move definition
6727 to <bits/uniform_int_dist.h>.
6728 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
6730 * include/bits/ranges_algobase.h: Do not include <cmath>.
6731 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
6733 * include/std/ranges: Do not include <limits>.
6734 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
6736 PR libstdc++/92546 (partial)
6737 * include/Makefile.am: Add new header.
6738 * include/Makefile.in: Regenerate.
6739 * include/bits/int_limits.h: New header.
6740 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
6741 numeric_limits with __detail::__int_limits.
6742 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
6743 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
6745 * include/std/charconv (__to_chars_8, __from_chars_binary)
6746 (__from_chars_alpha_to_num, from_chars): Likewise.
6747 * include/std/memory_resource (polymorphic_allocator::allocate)
6748 (polymorphic_allocator::allocate_object): Likewise.
6749 * include/std/string_view (basic_string_view::_S_compare): Likewise.
6750 * include/std/utility (in_range): Likewise.
6751 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
6752 extra error about incomplete type __int_limits<bool>.
6753 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
6754 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
6755 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
6756 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
6757 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
6758 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
6759 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
6760 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
6761 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
6762 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
6763 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
6764 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
6766 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
6767 value for partial_ordering::unordered.
6769 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
6770 const-qualified expression variations.
6771 * include/std/concepts (copyable): Likewise.
6773 * include/std/type_traits (__is_standard_integer): New helper trait.
6774 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
6775 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
6776 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
6777 * testsuite/20_util/integer_comparisons/1.cc: New test.
6778 * testsuite/20_util/integer_comparisons/2.cc: New test.
6779 * testsuite/20_util/integer_comparisons/equal.cc: New test.
6780 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
6781 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
6782 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
6783 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
6784 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
6785 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
6786 * testsuite/20_util/integer_comparisons/less.cc: New test.
6787 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
6788 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
6789 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
6790 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
6791 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
6793 2020-02-16 Patrick Palka <ppalka@redhat.com>
6795 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
6796 Move code after an early exit constexpr if to under an else branch.
6797 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
6799 2020-02-15 Patrick Palka <ppalka@redhat.com>
6801 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
6802 * include/bits/ranges_algobase.h: Likewise.
6803 * include/bits/ranges_uninitialized.h: Likewise.
6805 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
6806 binary_search, copy_if, count, count_if, equal_range, find, find_end,
6807 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
6808 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
6809 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
6810 lower_bound, make_heap, max, max_element, merge, min, min_element,
6811 minmax, minmax_element, mismatch, next_permutation, none_of,
6812 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
6813 partition_point, pop_heap, prev_permutation, push_heap, remove,
6814 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
6815 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
6816 search, search_n, set_difference, set_intersection,
6817 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
6818 stable_partition, stable_sort, swap_ranges, transform, unique,
6819 unique_copy, upper_bound): Convert into function objects.
6820 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
6821 fill, move_backward, copy_backward): Likewise.
6822 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
6823 uninitialized_default_construct_n, uninitialized_value_construct,
6824 uninitialized_value_construct_n, uninitialized_copy,
6825 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
6826 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
6827 destroy, destroy_n): Likewise.
6829 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
6830 (ranges::find_end): ... here.
6831 (ranges::__lexicographical_compare): Fold into ...
6832 (ranges::lexicographical_compare): ... here.
6833 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
6834 (ranges::equal): ... here.
6836 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
6838 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
6839 * include/std/deque: Likewise.
6840 * include/std/forward_list: Likewise.
6841 * include/std/list: Likewise.
6842 * include/std/string: Likewise.
6843 * include/std/vector: Likewise.
6844 * include/std/version: Likewise.
6845 * testsuite/23_containers/deque/erasure.cc: Test for new value.
6846 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
6847 * testsuite/23_containers/list/erasure.cc: Likewise.
6848 * testsuite/23_containers/map/erasure.cc: Likewise.
6849 * testsuite/23_containers/set/erasure.cc: Likewise.
6850 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
6851 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
6852 * testsuite/23_containers/vector/erasure.cc: Likewise.
6854 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
6856 * include/bits/random.h (uniform_random_bit_generator): Require min()
6857 and max() to be constant expressions and min() to be less than max().
6858 * testsuite/26_numerics/random/concept.cc: Check additional cases.
6859 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
6861 2020-02-13 Patrick Palka <ppalka@redhat.com>
6863 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
6864 * include/Makefile.in: Regenerate.
6865 * include/bits/ranges_uninitialized.h: New header.
6866 * include/std/memory: Include it.
6867 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
6869 * .../uninitialized_copy/constrained.cc: New test.
6870 * .../uninitialized_default_construct/constrained.cc: New test.
6871 * .../uninitialized_fill/constrained.cc: New test.
6872 * .../uninitialized_move/constrained.cc: New test.
6873 * .../uninitialized_value_construct/constrained.cc: New test.
6875 * include/Makefile.am: Add bits/ranges_algobase.h
6876 * include/Makefile.in: Regenerate.
6877 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
6879 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
6880 __detail::__is_move_iterator, copy_result, move_result,
6881 __equal, equal, copy_result, move_result, move_backward_result,
6882 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
6883 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
6884 fill): Split out into ...
6885 * bits/range_algobase.h: ... this new header.
6887 2020-02-12 Patrick Palka <ppalka@redhat.com>
6889 LWG 3389 and LWG 3390
6890 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
6891 constructing the move_iterator with __i.
6892 (counted_iterator::counted_iterator): Use std::move when initializing
6894 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
6895 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
6897 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
6902 * configure: Regenerated.
6904 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
6906 * include/bits/hashtable.h
6907 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
6908 missing std namespace qualification to forward call.
6910 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
6912 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
6914 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
6916 * include/std/ranges: Fix non-ASCII characters in comment.
6918 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
6919 equality comparison to be valid and return bool.
6920 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
6921 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
6922 type with ambiguous conversion to fundamental types.
6923 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
6925 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
6927 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
6929 (readable_traits): Rename to indirectly_readable_traits.
6930 (readable): Rename to indirectly_readable.
6931 (writable): Rename to indirectly_writable.
6932 (__detail::__iter_exchange_move): Do not use remove_reference_t.
6933 (indirectly_swappable): Adjust requires expression parameter types.
6935 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
6936 (ranges::replace_if, ranges::generate_n, ranges::generate)
6937 (ranges::remove): Use new name for writable.
6938 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
6939 Use new name for readable.
6940 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
6941 new name for readable_traits.
6942 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
6943 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
6944 new definition of indirectly_readable.
6946 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
6947 to take parameters of common_iterator, instead of the common_iterator
6948 type itself. Fix argument for __common_iter_has_arrow constraint.
6949 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
6951 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
6953 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
6955 (basic_istream_view::_Iterator::operator++()): Add missing return.
6957 2020-02-07 Patrick Palka <ppalka@redhat.com>
6959 * include/bits/ranges_algo.h: Remove extraneous &&.
6961 * include/std/ranges (ranges::__detail::__stream_extractable,
6962 ranges::basic_istream_view, ranges::istream_view): Define.
6963 * testsuite/std/ranges/istream_view: New test.
6965 Implement C++20 range adaptors
6966 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
6967 (subrange::_S_store_size): Mark as const instead of constexpr to
6968 avoid what seems to be a bug in GCC.
6969 (__detail::__box): Give it defaulted copy and move constructors.
6970 (ranges::views::_Single::operator()): Mark constexpr.
6971 (ranges::views::_Iota::operator()): Mark constexpr.
6972 (__detail::Empty): Define.
6973 (ranges::views::__closure::_RangeAdaptor,
6974 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
6975 ranges::views::all, ranges::__detail::find_if,
6976 ranges::__detail::find_if_not, ranges::__detail::mismatch,
6977 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
6978 ranges::views::transform, take_view, ranges::views::take,
6979 take_while_view, ranges::views::take_while, drop_view,
6980 ranges::views::drop, join_view, ranges::views::join,
6981 __detail::require_constant, __detail::tiny_range, split_view,
6982 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
6983 common_view, ranges::views::common, reverse_view,
6984 ranges::views::reverse,
6985 ranges::views::__detail::__is_reversible_subrange,
6986 ranges::views::__detail::__is_reverse_view, reverse_view,
6987 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
6988 ranges::views::elements, ranges::views::keys, ranges::views::values):
6990 (views): Alias for ranges::views.
6991 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
6992 tuple_element<1, ranges::subrange>): New partial specializations.
6993 * testsuite/std/ranges/adaptors/all.cc: New test.
6994 * testsuite/std/ranges/adaptors/common.cc: Likewise.
6995 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
6996 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
6997 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
6998 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
6999 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
7000 * testsuite/std/ranges/adaptors/join.cc: Likewise.
7001 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
7002 * testsuite/std/ranges/adaptors/split.cc: Likewise.
7003 * testsuite/std/ranges/adaptors/take.cc: Likewise.
7004 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
7005 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
7007 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
7009 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
7010 type of enumerations and comparison category types.
7011 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
7012 (__cmp_cat::_Ncmp::unordered): Change value to 2.
7013 (partial_ordering::_M_value, weak_ordering::_M_value)
7014 (strong_ordering::_M_value): Change type to __cmp_cat::type.
7015 (partial_ordering::_M_is_ordered): Remove data member.
7016 (partial_ordering): Use second bit of _M_value for unordered. Adjust
7017 comparison operators.
7018 (weak_ordering::operator partial_ordering): Simplify to remove
7020 (operator<=>(unspecified, weak_ordering)): Likewise.
7021 (strong_ordering::operator partial_ordering): Likewise.
7022 (strong_ordering::operator weak_ordering): Likewise.
7023 (operator<=>(unspecified, strong_ordering)): Likewise.
7024 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
7025 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
7026 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
7028 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
7029 __cpp_lib_three_way_comparison macro and use deduced return type for
7031 * testsuite/std/ranges/iota/iterator.cc: New test.
7033 2020-02-07 Patrick Palka <ppalka@redhat.com>
7034 Jonathan Wakely <jwakely@redhat.com>
7036 Implement C++20 constrained algorithms
7037 * include/Makefile.am: Add new header.
7038 * include/Makefile.in: Regenerate.
7039 * include/std/algorithm: Include <bits/ranges_algo.h>.
7040 * include/bits/ranges_algo.h: New file.
7041 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
7042 * testsuite/25_algorithms/all_of/constrained.cc: New test.
7043 * testsuite/25_algorithms/any_of/constrained.cc: New test.
7044 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
7045 * testsuite/25_algorithms/copy/constrained.cc: New test.
7046 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
7047 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
7048 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
7049 * testsuite/25_algorithms/count/constrained.cc: New test.
7050 * testsuite/25_algorithms/count_if/constrained.cc: New test.
7051 * testsuite/25_algorithms/equal/constrained.cc: New test.
7052 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
7053 * testsuite/25_algorithms/fill/constrained.cc: New test.
7054 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
7055 * testsuite/25_algorithms/find/constrained.cc: New test.
7056 * testsuite/25_algorithms/find_end/constrained.cc: New test.
7057 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
7058 * testsuite/25_algorithms/find_if/constrained.cc: New test.
7059 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
7060 * testsuite/25_algorithms/for_each/constrained.cc: New test.
7061 * testsuite/25_algorithms/generate/constrained.cc: New test.
7062 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
7063 * testsuite/25_algorithms/heap/constrained.cc: New test.
7064 * testsuite/25_algorithms/includes/constrained.cc: New test.
7065 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
7066 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
7067 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
7068 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
7069 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
7070 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
7072 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
7073 * testsuite/25_algorithms/max/constrained.cc: New test.
7074 * testsuite/25_algorithms/max_element/constrained.cc: New test.
7075 * testsuite/25_algorithms/merge/constrained.cc: New test.
7076 * testsuite/25_algorithms/min/constrained.cc: New test.
7077 * testsuite/25_algorithms/min_element/constrained.cc: New test.
7078 * testsuite/25_algorithms/minmax/constrained.cc: New test.
7079 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
7080 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
7081 * testsuite/25_algorithms/move/constrained.cc: New test.
7082 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
7083 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
7084 * testsuite/25_algorithms/none_of/constrained.cc: New test.
7085 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
7086 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
7087 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
7088 * testsuite/25_algorithms/partition/constrained.cc: New test.
7089 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
7090 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
7091 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
7092 * testsuite/25_algorithms/remove/constrained.cc: New test.
7093 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
7094 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
7095 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
7096 * testsuite/25_algorithms/replace/constrained.cc: New test.
7097 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
7098 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
7099 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
7100 * testsuite/25_algorithms/reverse/constrained.cc: New test.
7101 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
7102 * testsuite/25_algorithms/rotate/constrained.cc: New test.
7103 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
7104 * testsuite/25_algorithms/search/constrained.cc: New test.
7105 * testsuite/25_algorithms/search_n/constrained.cc: New test.
7106 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
7107 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
7108 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
7110 * testsuite/25_algorithms/set_union/constrained.cc: New test.
7111 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
7112 * testsuite/25_algorithms/sort/constrained.cc: New test.
7113 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
7114 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
7115 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
7116 * testsuite/25_algorithms/transform/constrained.cc: New test.
7117 * testsuite/25_algorithms/unique/constrained.cc: New test.
7118 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
7119 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
7121 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
7123 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
7124 number in comment. Fix indentation.
7126 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
7127 redundant _GLIBCXX20_CONSTEXPR.
7129 * include/std/ranges (viewable_range): Replace decay_t with
7130 remove_cvref_t (LWG 3375).
7132 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
7134 * include/bits/iterator_concepts.h (iter_reference_t)
7135 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
7136 Remove workarounds for PR c++/67704.
7137 * testsuite/24_iterators/aliases.cc: New test.
7139 2020-02-05 Patrick Palka <ppalka@redhat.com>
7141 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
7142 when initializing _M_current.
7143 (move_iterator::base): Split into two overloads differing in
7144 ref-qualifiers as in P1207R4 for C++20.
7146 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
7148 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
7152 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
7153 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
7154 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
7156 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
7158 * configure: Regenerate.
7160 2020-01-31 Patrick Palka <ppalka@redhat.com>
7162 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
7163 test_range::end() returns the same type as test_range::begin().
7164 * testsuite/24_iterators/range_operations/next.cc: Likewise.
7165 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
7166 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
7167 Always return a sentinel<I>.
7169 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
7172 * include/std/stop_token (stop_token::stop_possible()): Call new
7173 _M_stop_possible() function.
7174 (stop_token::stop_requested()): Do not use stop_possible().
7175 (stop_token::binary_semaphore): New class, as temporary stand-in for
7176 std::binary_semaphore.
7177 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
7178 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
7179 New data members for symchronization with stop_callback destruction.
7180 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
7181 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
7183 (stop_token::_Stop_cb::_M_run): New member function.
7184 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
7186 (stop_token::_Stop_state::_M_owners): New data member to track
7187 reference count for ownership.
7188 (stop_token::_Stop_state::_M_value): New data member combining a
7189 spinlock, the stop requested flag, and the reference count for
7190 associated stop_source objects.
7191 (stop_token::_Stop_state::_M_requester): New data member for
7192 synchronization with stop_callback destruction.
7193 (stop_token::_Stop_state::_M_stop_possible()): New member function.
7194 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
7196 (stop_token::_Stop_state::_M_add_owner)
7197 (stop_token::_Stop_state::_M_release_ownership)
7198 (stop_token::_Stop_state::_M_add_ssrc)
7199 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
7200 updating reference counts.
7201 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
7202 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
7203 (stop_token::_Stop_state::_M_try_lock)
7204 (stop_token::_Stop_state::_M_try_lock_and_stop)
7205 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
7207 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
7208 read and update state. Release lock while running callbacks. Use new
7209 data members to synchronize with callback destruction.
7210 (stop_token::_Stop_state::_M_remove_callback): Likewise.
7211 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
7212 to read and update state.
7213 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
7214 replacing shared_ptr.
7215 (stop_source::stop_source(const stop_source&)): Update reference count.
7216 (stop_source::operator=(const stop_source&)): Likewise.
7217 (stop_source::~stop_source()): Likewise.
7218 (stop_source::stop_source(stop_source&&)): Define as defaulted.
7219 (stop_source::operator=(stop_source&&)): Establish postcondition on
7221 (stop_callback): Enforce preconditions on template parameter. Replace
7222 base class with data member of new _Cb_impl type.
7223 (stop_callback::stop_callback(const stop_token&, Cb&&))
7224 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
7225 (stop_callback::_Cb_impl): New type wrapping _Callback member and
7226 defining the _S_execute member function.
7227 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
7229 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
7230 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
7231 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
7233 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
7235 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
7236 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
7237 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
7240 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
7241 three_way_comparable_with.
7242 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
7243 (compare_three_way::operator()): Remove redundant constraint from
7245 (__detail::_Synth3way::operator()): Use three_way_comparable_with
7246 instead of workaround.
7247 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
7248 output due to simplified constraints on compare_three_way::operator().
7251 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
7252 * testsuite/18_support/comparisons/object/93479.cc: New test.
7254 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
7255 returns the same type as test_range::begin(). Add comments.
7256 * testsuite/std/ranges/access/rbegin.cc: Likewise.
7257 * testsuite/std/ranges/access/rend.cc: Likewise.
7258 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
7259 test_range is the same as its iterator type.
7260 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
7261 operator- overloads to satisfy sized_sentinel_for when the iterator
7262 satisfies random_access_iterator.
7264 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
7267 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
7268 static assertion to object types.
7271 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
7272 clock_gettime instead of explicit glibc version check.
7273 * configure: Regenerate.
7275 2020-01-28 Martin Liska <mliska@suse.cz>
7278 * include/std/atomic: Fix typo.
7279 * include/std/optional: Likewise.
7281 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
7283 * configure: Regenerate.
7285 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
7288 * include/std/span (span): Fix deduction guide.
7289 * testsuite/23_containers/span/deduction.cc: New test.
7291 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
7293 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
7294 (__cmp_cat::_Ord::equivalent): Add enumerator.
7295 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
7297 (partial_ordering, weak_ordering, strong_ordering): Remove
7298 constructors taking __cmp_cat::_Eq parameters. Use renamed
7301 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
7303 * acinclude.m4: Handle `--with-toolexeclibdir='.
7304 * Makefile.in: Regenerate.
7305 * aclocal.m4: Regenerate.
7306 * configure: Regenerate.
7307 * doc/Makefile.in: Regenerate.
7308 * include/Makefile.in: Regenerate.
7309 * libsupc++/Makefile.in: Regenerate.
7310 * po/Makefile.in: Regenerate.
7311 * python/Makefile.in: Regenerate.
7312 * src/Makefile.in: Regenerate.
7313 * src/c++11/Makefile.in: Regenerate.
7314 * src/c++17/Makefile.in: Regenerate.
7315 * src/c++98/Makefile.in: Regenerate.
7316 * src/filesystem/Makefile.in: Regenerate.
7317 * testsuite/Makefile.in: Regenerate.
7319 2020-01-23 Alexandre Oliva <oliva@adacore.com>
7321 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
7322 * configure: Rebuild.
7324 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
7326 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
7329 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
7331 * include/Makefile.in: Regenerate.
7333 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
7335 * doc/xml/faq.xml: Fix grammar.
7336 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
7337 * doc/xml/manual/spine.xml: Update copyright years.
7338 * doc/html/*: Regenerate.
7340 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
7342 * doc/xml/faq.xml: Update for SVN -> Git transition.
7343 * doc/xml/manual/appendix_contributing.xml: Likewise.
7344 * doc/xml/manual/status_cxx1998.xml: Likewise.
7345 * doc/xml/manual/status_cxx2011.xml: Likewise.
7346 * doc/xml/manual/status_cxx2014.xml: Likewise.
7347 * doc/xml/manual/status_cxx2017.xml: Likewise.
7348 * doc/xml/manual/status_cxx2020.xml: Likewise.
7349 * doc/xml/manual/status_cxxtr1.xml: Likewise.
7350 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
7352 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
7354 * include/Makefile.am: Add coroutine to the std set.
7355 * include/Makefile.in: Regenerated.
7356 * include/std/coroutine: New file.
7358 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
7361 * include/bits/c++config: Only do PSTL config when the header is
7362 present, to fix freestanding.
7363 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
7364 functions if they were detected by configure.
7366 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
7367 Matthew Bauer <mjbauer95@gmail.com>
7368 Jonathan Wakely <jwakely@redhat.com>
7370 PR bootstrap/64271 (partial)
7371 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
7373 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
7374 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
7375 definitions with NetBSD upstream.
7376 (ctype_base::blank): Use _CTYPE_BL.
7377 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
7379 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
7380 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
7381 parameters to unsigned char.
7382 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
7384 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
7387 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
7388 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
7389 (_Equality_base): Remove.
7390 (_Equality<>::_M_equal): Review implementation. Use
7391 std::is_permutation.
7392 * testsuite/23_containers/unordered_multiset/operators/1.cc
7393 (Hash, Equal, test02, test03): New.
7394 * testsuite/23_containers/unordered_set/operators/1.cc
7395 (Hash, Equal, test02, test03): New.
7397 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
7400 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
7401 Move here from <bits/range_access.h> and define using __int128 when
7403 (__is_integer_like, __is_signed_integer_like): Move here from
7404 <bits/range_access.h>.
7405 (weakly_incrementable): Use __is_signed_integer_like.
7406 * include/bits/range_access.h (__max_diff_type, __max_size_type)
7407 (__is_integer_like, __is_signed_integer_like): Move to
7408 <bits/iterator_concepts.h>.
7409 (__make_unsigned_like_t): Move here from <ranges>.
7410 * include/std/ranges (__make_unsigned_like_t): Move to
7411 <bits/range_access.h>.
7412 (iota_view): Replace using-directive with using-declarations.
7413 * testsuite/std/ranges/iota/93267.cc: New test.
7414 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
7416 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
7419 * include/bits/fs_path.h (path::generic_string<C,A>)
7420 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
7421 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
7422 root-dir is converted to forward slash in generic pathname.
7423 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
7424 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
7427 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
7429 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
7430 (__atomic_float): Add default member initializer for C++20.
7431 * include/std/atomic (atomic): Likewise.
7432 (atomic::atomic()): Remove noexcept-specifier on default constructor.
7433 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
7434 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
7436 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
7437 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
7438 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
7439 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
7440 expected result for is_trivially_default_constructible.
7441 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
7442 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
7443 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
7444 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
7445 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
7446 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
7447 expected results for is_trivially_default_constructible.
7448 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
7451 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
7453 * testsuite/util/testsuite_iterators.h: Improve comment.
7455 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
7456 initialization syntax.
7459 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
7460 of base class independent of __cplusplus value.
7461 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
7462 type defined in the base class
7463 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
7464 * testsuite/24_iterators/istreambuf_iterator/requirements/
7465 base_classes.cc: Adjust expected base class for C++98.
7467 2020-01-09 Olivier Hainque <hainque@adacore.com>
7469 * doc/xml/manual/appendix_contributing.xml: Document _C2
7470 as a reserved identifier, by VxWorks.
7471 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
7472 * include/bits/stl_multimap.h: Likewise.
7474 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
7476 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
7477 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
7478 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
7479 partial specialization to disambiguate the two constrained
7482 * include/experimental/type_traits (experimental::is_pod_v): Disable
7483 -Wdeprecated-declarations warnings around reference to std::is_pod.
7484 * include/std/type_traits (is_pod_v): Likewise.
7485 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
7486 is_standard_layout and is_trivial. Do not check is_pod for C++20.
7487 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
7488 Add -Wno-deprecated for C++20.
7489 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
7490 * testsuite/20_util/is_pod/value.cc: Likewise.
7491 * testsuite/experimental/type_traits/value.cc: Likewise.
7493 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
7495 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
7496 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
7497 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
7499 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
7502 * include/bits/random.h (operator>>): Check stream operation succeeds.
7503 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
7505 (operator>>): Remove redundant __istream_type typedefs. Check stream
7507 (__extract_params): New function to fill a vector from a stream.
7508 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
7511 * config/abi/pre/gnu.ver: Add new exports.
7512 * include/std/memory_resource (memory_resource::~memory_resource()):
7513 Do not define inline.
7514 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
7515 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
7517 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
7518 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
7520 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
7523 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
7525 (_Hashtable<>::__fwd_value_for): New.
7526 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
7528 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
7529 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
7530 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
7532 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
7533 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
7535 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
7537 * testsuite/23_containers/unordered_set/92124.cc: New.
7539 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
7542 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
7543 detailed error reporting for remove_all. Check result of recursive
7544 call before incrementing iterator.
7545 (remove_all(const path&), remove_all(const path&, error_code&)): Use
7547 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
7548 result of recursive call before incrementing iterator.
7549 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
7550 are reported correctly.
7551 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
7553 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
7555 * include/std/condition_variable
7556 (condition_variable_any::wait_on): Rename to match current draft
7558 (condition_variable_any::wait_on_until): Likewise.
7559 (condition_variable_any::wait_on_for): Likewise.
7560 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
7561 Adjust tests to account for renamed methods.
7563 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
7566 * include/bits/stl_tree.h
7567 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
7568 std::move_if_noexcept by std::move.
7569 * testsuite/23_containers/map/92124.cc: New.
7570 * testsuite/23_containers/set/92124.cc: New.
7572 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
7574 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
7575 (stop_source): Likewise (LWG 3362).
7576 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
7579 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
7580 (lexicographical_compare_three_way): Do not depend on
7582 * include/std/version (__cpp_lib_three_way_comparison): Only define
7583 when __cpp_lib_concepts is defined.
7584 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
7586 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
7588 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
7589 Only define four-argument overload when __cpp_lib_concepts is defined.
7591 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
7593 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
7595 2020-01-01 Jakub Jelinek <jakub@redhat.com>
7597 Update copyright years.
7599 Copyright (C) 2020 Free Software Foundation, Inc.
7601 Copying and distribution of this file, with or without modification,
7602 are permitted in any medium without royalty provided the copyright
7603 notice and this notice are preserved.