1 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
3 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Remove duplicate
5 (CXXABI_1.3.13): Restore missing piece.
7 2020-10-28 Thomas Rodgers <trodgers@redhat.com>
9 * acinclude.m4 (glibcxx_SUBDIRS): Add src/c++20.
10 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): New symbols.
11 * configure: Regenerate.
12 * include/std/sstream:
13 (basic_stringbuf::basic_stringbuf(allocator const&)): New constructor.
14 (basic_stringbuf::basic_stringbuf(openmode, allocator const&)): Likewise.
15 (basic_stringbuf::basic_stringbuf(basic_string&&, openmode)): Likewise.
16 (basic_stringbuf::basic_stringbuf(basic_stringbuf&&, allocator const&)):
18 (basic_stringbuf::get_allocator()): New method.
19 (basic_stringbuf::view()): Likewise.
20 (basic_istringstream::basic_istringstream(basic_string&&, openmode)):
22 (basic_istringstream::basic_istringstream(openmode, allocator const&)):
24 (basic_istringstream::view()): New method.
25 (basic_ostringstream::basic_ostringstream(basic_string&&, openmode)):
27 (basic_ostringstream::basic_ostringstream(openmode, allocator const&)):
29 (basic_ostringstream::view()): New method.
30 (basic_stringstream::basic_stringstream(basic_string&&, openmode)):
32 (basic_stringstream::basic_stringstream(openmode, allocator const&)):
34 (basic_stringstream::view()): New method.
35 * src/Makefile.in: Add c++20 directory.
36 * src/Makefile.am: Regenerate.
37 * src/c++20/Makefile.am: Add makefile for new sub-directory.
38 * src/c++20/Makefile.in: Generate.
39 * src/c++20/sstream-inst.cc: New file defining explicit
40 instantiations for basic_stringbuf, basic_istringstream,
41 basic_ostringstream, and basic_stringstream member functions
43 * testsuite/27_io/basic_stringbuf/cons/char/2.cc: New test.
44 * testsuite/27_io/basic_stringbuf/cons/wchar_t/2.cc: Likewise.
45 * testsuite/27_io/basic_stringbuf/view/char/1.cc: Likewise.
46 * testsuite/27_io/basic_stringbuf/view/wchar_t/1.cc: Likewise.
47 * testsuite/27_io/basic_istringstream/cons/char/1.cc: Likewise.
48 * testsuite/27_io/basic_istringstream/cons/wchar_t/1.cc: Likewise.
49 * testsuite/27_io/basic_istringstream/view/char/1.cc: Likewise.
50 * testsuite/27_io/basic_istringstream/view/wchar_t/1.cc: Likewise.
51 * testsuite/27_io/basic_ostringstream/cons/char/1.cc: Likewise.
52 * testsuite/27_io/basic_ostringstream/cons/wchar_t/1.cc: Likewise.
53 * testsuite/27_io/basic_ostringstream/view/char/1.cc: Likewise.
54 * testsuite/27_io/basic_ostringstream/view/wchar_t/1.cc: Likewise.
55 * testsuite/27_io/basic_stringstream/cons/char/1.cc: Likewise.
56 * testsuite/27_io/basic_stringstream/cons/wchar_t/1.cc: Likewise.
57 * testsuite/27_io/basic_stringstream/view/char/1.cc: Likewise.
58 * testsuite/27_io/basic_stringstream/view/wchar_t/1.cc: Likewise.
60 2020-10-28 Patrick Palka <ppalka@redhat.com>
63 * include/std/chrono (year_month_weekday::operator sys_days):
64 Cast the result of index() to int so that the initializer for
65 days{} is sign-extended when it's converted to the underlying
67 * testsuite/std/time/year_month_weekday/3.cc: New test.
69 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
71 * libsupc++/new_opnt.cc (new): Add comment about forced unwind
74 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
77 * config/os/mingw32-w64/os_defines.h (_GLIBCXX_BUFSIZ):
79 * config/os/mingw32/os_defines.h (_GLIBCXX_BUFSIZ):
81 * include/bits/fstream.tcc: Use _GLIBCXX_BUFSIZ instead
83 * include/ext/stdio_filebuf.h: Likewise.
84 * include/std/fstream (_GLIBCXX_BUFSIZ): Define.
86 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
89 * include/bits/valarray_after.h (_DEFINE_EXPR_UNARY_OPERATOR)
90 (_DEFINE_EXPR_BINARY_OPERATOR, _DEFINE_EXPR_BINARY_FUNCTION):
91 Use elaborated-type-specifier and qualified-id to avoid
92 ambiguities with QNX system headers.
93 * testsuite/26_numerics/valarray/95592.cc: New test.
95 2020-10-28 Jonathan Wakely <jwakely@redhat.com>
98 * include/std/span (span): Reorder data members to match common
99 implementations of struct iovec.
100 * testsuite/23_containers/span/layout_compat.cc: New test.
102 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
104 * include/std/functional (std::_Placeholder): Define for C++98
105 as well as later standards.
106 * include/tr1/functional (std::placeholders::_1 etc): Declare
108 (tr1::_Placeholder): Replace with using-declaration for
110 (tr1::placeholders::_1 etc.): Replace with using-directive for
113 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
115 * include/tr1/ell_integral.tcc (__ellint_rf, __ellint_rd)
116 (__ellint_rc, __ellint_rj): Remove unused variables.
117 * include/tr1/modified_bessel_func.tcc (__airy): Likewise.
119 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
121 * include/bits/locale_conv.h (__str_codecvt_out_all):
122 Add cast to compare operands of the same signedness.
123 * include/bits/locale_facets_nonio.tcc
124 (time_get::_M_extract_wday_or_month): Likewise.
125 * include/bits/sstream.tcc (basic_stringbuf::overflow):
127 * include/tr1/legendre_function.tcc (__sph_legendre): Use
128 unsigned for loop variable.
130 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
132 * include/std/charconv (from_chars): Add noexcept to match
133 definitions in src/c++17/floating_from_chars.cc
135 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
137 * src/c++17/fs_dir.cc (fs::directory_iterator::operator*):
138 Add noexcept. Do not throw on precondition violation.
140 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
142 * include/bits/fs_path.h (path::_List::begin, path::_List::end):
143 Add noexcept to match definitions in src/c++17/fs_path.cc.
145 2020-10-27 Jonathan Wakely <jwakely@redhat.com>
147 * testsuite/experimental/memory_resource/new_delete_resource.cc:
148 Add missing <cstdint> header.
149 * testsuite/experimental/memory_resource/resource_adaptor.cc:
152 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
154 * include/experimental/executor (strand::_State): Fix thinko.
156 2020-10-26 Ville Voutilainen <ville.voutilainen@gmail.com>
158 * include/std/type_traits (__is_nt_constructible_impl): Remove.
159 (__is_nothrow_constructible_impl): Adjust.
160 (is_nothrow_default_constructible): Likewise.
161 (__is_nt_assignable_impl): Remove.
162 (__is_nothrow_assignable_impl): Adjust.
164 2020-10-26 Jonathan Wakely <jwakely@redhat.com>
167 * libsupc++/new_opa.cc: Declare size_t in global namespace.
168 Remove unused header.
170 2020-10-26 Stephan Bergmann <sbergman@redhat.com>
172 * include/bits/shared_ptr_base.h
173 (_Sp_counted_base::_M_add_ref_lock_nothrow(): Add noexcept to
174 definitions to match declaration.
175 (__shared_count(const __weak_count&, nothrow_t)): Add noexcept
176 to declaration to match definition.
178 2020-10-23 Patrick Palka <ppalka@redhat.com>
180 * include/std/ranges (single_view::single_view): Mark the
181 in place constructor explicit as per LWG 3428.
182 (take_view): Remove the constraint on the deduction guide's
183 template parameter as per LWG 3447.
185 2020-10-23 Jonathan Wakely <jwakely@redhat.com>
187 * include/experimental/memory_resource: Include <tuple>.
188 (polymorphic_allocator::construct): Qualify forward_as_tuple.
189 * include/std/memory_resource: Likewise.
191 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
193 * testsuite/30_threads/condition_variable/members/68519.cc:
194 Define recent_epoch_float_clock::duration to meet the Cpp17Clock
197 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
199 * include/std/shared_mutex: Only include <condition_variable>
200 when pthread_rwlock_t and POSIX timers are not available.
201 (__cpp_lib_shared_mutex, __cpp_lib_shared_timed_mutex): Change
202 value to be type 'long'.
203 * include/std/version (__cpp_lib_shared_mutex)
204 (__cpp_lib_shared_timed_mutex): Likewise.
206 2020-10-22 Jonathan Wakely <jwakely@redhat.com>
208 * include/Makefile.am: Add new header.
209 * include/Makefile.in: Regenerate.
210 * include/bits/shared_ptr.h: Include <iosfwd>.
211 * include/bits/shared_ptr_base.h: Include required headers here
212 directly, instead of in <memory>.
213 * include/bits/uses_allocator_args.h: New file. Move utility
214 functions for uses-allocator construction from <memory> to here.
215 Only define the utility functions when concepts are available.
216 (__cpp_lib_make_obj_using_allocator): Define non-standard
218 * include/std/condition_variable: Remove unused headers.
219 * include/std/future: Likewise.
220 * include/std/memory: Remove headers that are not needed
221 directly, and are now inclkuded where they're needed. Include
222 new <bits/uses_allocator_args.h> header.
223 * include/std/memory_resource: Include only the necessary
224 headers. Use new feature test macro to detect support for the
226 * include/std/scoped_allocator: Likewise.
227 * include/std/version (__cpp_lib_make_obj_using_allocator):
230 2020-10-22 Olivier Hainque <hainque@adacore.com>
232 * crossconfig.m4: Turn vxworks matcher into vxworks*.
233 * configure.host: Likewise.
234 * configure: Regenerate.
236 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
238 * include/bits/shared_ptr.h (shared_ptr(const weak_ptr&, nothrow_t)):
240 * include/bits/shared_ptr_base.h (_Sp_counted_base::_M_add_ref_lock):
241 Remove specializations and just call _M_add_ref_lock_nothrow.
242 (__shared_count, __shared_ptr): Use nullptr for null pointer
244 (__shared_count(const __weak_count&)): Use _M_add_ref_lock_nothrow
245 instead of _M_add_ref_lock.
246 (__shared_count(const __weak_count&, nothrow_t)): Add noexcept.
247 (__shared_ptr::operator bool()): Add noexcept.
248 (__shared_ptr(const __weak_ptr&, nothrow_t)): Add noexcept.
250 2020-10-21 Jonathan Wakely <jwakely@redhat.com>
253 * include/bits/ranges_util.h (tuple_size<subrange>)
254 (tuple_element<I, cv subrange>): Move here from ...
255 * include/std/ranges: ... here.
256 * testsuite/std/ranges/subrange/97512.cc: New test.
258 2020-10-21 Thomas Rodgers <trodgers@redhat.com>
260 * include/pstl/algorithm_impl.h: Update file.
261 * include/pstl/execution_impl.h: Likewise.
262 * include/pstl/glue_algorithm_impl.h: Likewise.
263 * include/pstl/glue_memory_impl.h: Likewise.
264 * include/pstl/glue_numeric_impl.h: Likewise.
265 * include/pstl/memory_impl.h: Likewise.
266 * include/pstl/numeric_impl.h: Likewise.
267 * include/pstl/parallel_backend.h: Likewise.
268 * include/pstl/parallel_backend_serial.h: Likewise.
269 * include/pstl/parallel_backend_tbb.h: Likewise.
270 * include/pstl/parallel_backend_utils.h: Likewise.
271 * include/pstl/pstl_config.h: Likewise.
272 * include/pstl/unseq_backend_simd.h: Likewise.
274 2020-10-20 François Dumont <fdumont@gcc.gnu.org>
276 * include/bits/hashtable_policy.h
277 (_Hash_node_value_base<>): Remove _Hash_node_base inheritance.
278 (_Hash_node_code_cache<bool _Cache_hash_code>): New.
279 (_Hash_node_value<typename _Value, bool _Cache_hash_code>): New.
280 (_Hash_node<>): Inherits _Hash_node_base<> and _Hash_node_value<>.
281 (_Map_base<>::__node_type): Remove.
282 (_Map_base<>::iterator): Remove.
283 (_Insert_base<>::__hash_cached): New.
284 (_Insert_base<>::__constant_iterators): New.
285 (_Insert_base<>::__hashtable_alloc): New.
286 (_Insert_base<>::__node_type): Remove.
287 (_Insert_base<>::__node_ptr): New.
288 (_Hash_code_base<>): Remove specializations.
289 (_Hash_code_base<>::__node_type): Remove.
290 (_Hash_code_base<>::_M_bucket_index(const __node_type*, size_t)):
292 (_Hash_code_base<>::_M_bucket_index(const _Hash_node_value<>&, size_t)):
294 (_Hash_code_base<>::_M_store_code(__node_type*, __hash_code)):
296 (_Hash_code_base<>::_M_store_code(_Hash_node_code_cache<>&, __hash_code)):
298 (_Hash_code_base<>::_M_copy_code(__node_type*, const __node_type*)):
300 (_Hash_code_base<>::_M_copy_code(_Hash_node_code_cache<>&,
301 const _Hash_node_code_base<>&)): ...this.
302 (_Hashtable_base<>::__constant_iterators): Remove.
303 (_Hashtable_base<>::__unique_keys): Remove.
304 (_Hashtable_base<>::__node_type): Remove.
305 (_Hashtable_base<>::iterator): Remove.
306 (_Hashtable_base<>::const_iterator): Remove.
307 (_Hashtable_base<>::local_iterator): Remove.
308 (_Hashtable_base<>::const_local_iterator): Remove.
309 (_Hashtable_base<>::__ireturn_type): Remove.
310 (_Hashtable_base<>::_Equal_hash_code<>::_S_equals): Replace by...
311 (_Hashtable_base<>::_S_equals(__hash_code, const _Hash_node_code_hash<>&)):
313 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals): Replace by...
314 (_Hashtable_base<>::_S_node_equals(__hash_code,
315 const _Hash_node_code_hash<>&)): ...this.
316 (_Hashtable_base<>::_Equal_hash_code<>): Remove.
317 (_Hashtable_base<>::_M_equals): Adapt.
318 (_Hashtable_baxe<>::_M_node_equals): Adapt.
319 (_Equality<>::_M_equal): Adapt.
320 (_Hashtable_alloc<>::__node_ptr): New.
321 (_Hashtable_alloc<>::__bucket_type): Rename into...
322 (_Hashtable_alloc<>::__node_base_ptr): ...this.
323 (_Hashtable_alloc<>::__bucket_alloc_type): Rename into...
324 (_Hashtable_alloc<>::__buckets_alloc_type): ...this.
325 (_Hashtable_alloc<>::__bucket_alloc_traits): Rename into...
326 (_Hashtable_alloc<>::__buckets_alloc_traits): ...this.
327 (_Hashtable_alloc<>::__buckets_ptr): New.
328 (_Hashtable_alloc<>::_M_allocate_node): Adapt.
329 (_Hashtable_alloc<>::_M_deallocate_node): Adapt.
330 (_Hashtable_alloc<>::_M_deallocate_node_ptr): Adapt.
331 (_Hashtable_alloc<>::_M_deallocate_nodes): Adapt.
332 (_Hashtable_alloc<>::_M_allocate_buckets): Adapt.
333 (_Hashtable_alloc<>::_M_deallocate_buckets): Adapt.
334 * include/bits/hashtable.h (_Hashtable<>): Adapt.
336 2020-10-20 Aldy Hernandez <aldyh@redhat.com>
338 * testsuite/21_strings/basic_string/capacity/1.cc: Pass
339 -Wno-stringop-overflow to test.
341 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
344 * include/std/coroutine (__noop_coro_frame): Replace with
345 noop_coroutine_handle::__frame.
346 (__dummy_resume_destroy): Define inline in __frame.
347 (__noop_coro_fr): Replace with noop_coroutine_handle::_S_fr
348 and define as inline.
349 * testsuite/18_support/coroutines/95917.cc: New test.
351 2020-10-20 Jonathan Wakely <jwakely@redhat.com>
353 * include/std/coroutine (coroutine_handle<_Promise>): Remove
354 base class. Add constructors, conversions, accessors etc. as
355 proposed for LWG 3460.
356 (coroutine_handle<noop_coroutine_promise>): Likewise.
357 * testsuite/18_support/coroutines/lwg3460.cc: New test.
359 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
361 * include/bits/unique_ptr.h (make_unique_for_overwrite): Define
363 * testsuite/20_util/unique_ptr/creation/array_neg.cc: Remove
364 unused header. Adjust standard reference.
365 * testsuite/20_util/unique_ptr/creation/for_overwrite.cc: New test.
366 * testsuite/20_util/unique_ptr/creation/for_overwrite__neg.cc: New test.
368 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
370 * include/std/tuple (_Head_base<Idx, Head, true>): Use reserved
371 form of __no_unique_address__ attribute because
372 no_unique_address is not reserved prior to C++20.
374 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
376 * include/bits/node_handle.h (_Node_handle_common): Replace
377 std::optional with custom type.
378 * testsuite/20_util/variant/exception_safety.cc: Add missing
381 2020-10-19 Jonathan Wakely <jwakely@redhat.com>
383 * include/precompiled/expc++.h: Removed.
385 2020-10-17 Ville Voutilainen <ville.voutilainen@gmail.com>
388 * include/std/variant
389 (__gen_vtable_impl<>::_S_apply_single_alt):
390 Diagnose visitor return type mismatches here..
391 (__gen_vtable_impl</*base case*/>::_S_apply):
394 2020-10-15 Jonathan Wakely <jwakely@redhat.com>
396 * include/std/concepts: Fix typos in copyright notice.
397 * include/std/ranges: Likewise.
399 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
402 * include/std/sstream (basic_stringbuf::str()): Check for
403 null egptr() before comparing to non-null pptr().
405 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
407 * testsuite/21_strings/basic_string/modifiers/assign/char/move_assign_optim.cc:
408 Do not generate debug info.
409 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/move_assign_optim.cc:
412 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
414 * include/bits/basic_string.h (basic_string(const Alloc&))
415 (basic_string(const basic_string&)
416 (basic_string(const CharT*, size_type, const Alloc&))
417 (basic_string(const CharT*, const Alloc&))
418 (basic_string(size_type, CharT, const Alloc&))
419 (basic_string(initializer_list<CharT>, const Alloc&))
420 (basic_string(InputIterator, InputIterator, const Alloc&)):
421 Define inline in class body.
422 * include/bits/basic_string.tcc (basic_string(const Alloc&))
423 (basic_string(const basic_string&)
424 (basic_string(const CharT*, size_type, const Alloc&))
425 (basic_string(const CharT*, const Alloc&))
426 (basic_string(size_type, CharT, const Alloc&))
427 (basic_string(initializer_list<CharT>, const Alloc&))
428 (basic_string(InputIterator, InputIterator, const Alloc&)):
429 Move definitions into class body.
431 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
433 * testsuite/lib/libstdc++.exp (check_effective_target_cxx11-abi):
434 Add comments about which test flags get used by the check.
436 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
438 * testsuite/21_strings/basic_string/allocator/char/copy.cc: Make
439 comment more precise about what isn't supported by COW strings.
440 * testsuite/21_strings/basic_string/allocator/char/copy_assign.cc:
442 * testsuite/21_strings/basic_string/allocator/char/move.cc:
444 * testsuite/21_strings/basic_string/allocator/char/move_assign.cc:
446 * testsuite/21_strings/basic_string/allocator/char/noexcept.cc:
448 * testsuite/21_strings/basic_string/allocator/char/operator_plus.cc:
450 * testsuite/21_strings/basic_string/allocator/char/swap.cc:
452 * testsuite/21_strings/basic_string/allocator/wchar_t/copy.cc:
454 * testsuite/21_strings/basic_string/allocator/wchar_t/copy_assign.cc:
456 * testsuite/21_strings/basic_string/allocator/wchar_t/move.cc:
458 * testsuite/21_strings/basic_string/allocator/wchar_t/move_assign.cc:
460 * testsuite/21_strings/basic_string/allocator/wchar_t/noexcept.cc:
462 * testsuite/21_strings/basic_string/allocator/wchar_t/operator_plus.cc:
464 * testsuite/21_strings/basic_string/allocator/wchar_t/swap.cc:
467 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
469 * testsuite/21_strings/basic_string/allocator/char/minimal.cc:
470 Do not require cxx11-abi effective target.
471 * testsuite/21_strings/basic_string/allocator/wchar_t/minimal.cc:
473 * testsuite/27_io/basic_fstream/cons/base.cc: Likewise.
475 2020-10-14 Jonathan Wakely <jwakely@redhat.com>
477 * include/bits/basic_string.h [!_GLIBCXX_USE_CXX11_ABI]
478 (basic_string(const _CharT*, const _Alloc&)): Constrain to
479 require an allocator-like type to fix CTAD ambiguity (LWG 3706).
480 * testsuite/21_strings/basic_string/cons/char/deduction.cc:
482 * testsuite/21_strings/basic_string/cons/wchar_t/deduction.cc:
485 2020-10-13 Nuno Lopes <nuno.lopes@ist.utl.pt>
487 * include/bits/stl_algo.h (any_of): Fix incorrect description
490 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
492 * doc/xml/manual/evolution.xml: Document some API changes
494 * doc/xml/manual/intro.xml: Document LWG 2499.
495 * doc/xml/manual/status_cxx2020.xml: Update status.
496 * doc/html/*: Regenerate.
498 2020-10-13 Jonathan Wakely <jwakely@redhat.com>
500 * doc/xml/book.txml: Remove trailing whitespace.
501 * doc/xml/chapter.txml: Likewise.
502 * doc/xml/class.txml: Likewise.
503 * doc/xml/gnu/fdl-1.3.xml: Likewise.
504 * doc/xml/gnu/gpl-3.0.xml: Likewise.
505 * doc/xml/manual/abi.xml: Likewise.
506 * doc/xml/manual/algorithms.xml: Likewise.
507 * doc/xml/manual/allocator.xml: Likewise.
508 * doc/xml/manual/appendix_contributing.xml: Likewise.
509 * doc/xml/manual/appendix_free.xml: Likewise.
510 * doc/xml/manual/appendix_porting.xml: Likewise.
511 * doc/xml/manual/atomics.xml: Likewise.
512 * doc/xml/manual/auto_ptr.xml: Likewise.
513 * doc/xml/manual/backwards_compatibility.xml: Likewise.
514 * doc/xml/manual/bitmap_allocator.xml: Likewise.
515 * doc/xml/manual/build_hacking.xml: Likewise.
516 * doc/xml/manual/codecvt.xml: Likewise.
517 * doc/xml/manual/concurrency.xml: Likewise.
518 * doc/xml/manual/concurrency_extensions.xml: Likewise.
519 * doc/xml/manual/configure.xml: Likewise.
520 * doc/xml/manual/containers.xml: Likewise.
521 * doc/xml/manual/ctype.xml: Likewise.
522 * doc/xml/manual/debug.xml: Likewise.
523 * doc/xml/manual/debug_mode.xml: Likewise.
524 * doc/xml/manual/diagnostics.xml: Likewise.
525 * doc/xml/manual/documentation_hacking.xml: Likewise.
526 * doc/xml/manual/evolution.xml: Likewise.
527 * doc/xml/manual/internals.xml: Likewise.
528 * doc/xml/manual/intro.xml: Likewise.
529 * doc/xml/manual/io.xml: Likewise.
530 * doc/xml/manual/iterators.xml: Likewise.
531 * doc/xml/manual/locale.xml: Likewise.
532 * doc/xml/manual/localization.xml: Likewise.
533 * doc/xml/manual/messages.xml: Likewise.
534 * doc/xml/manual/mt_allocator.xml: Likewise.
535 * doc/xml/manual/numerics.xml: Likewise.
536 * doc/xml/manual/parallel_mode.xml: Likewise.
537 * doc/xml/manual/policy_data_structures.xml: Likewise.
538 * doc/xml/manual/prerequisites.xml: Likewise.
539 * doc/xml/manual/shared_ptr.xml: Likewise.
540 * doc/xml/manual/spine.xml: Likewise.
541 * doc/xml/manual/status_cxxtr1.xml: Likewise.
542 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
543 * doc/xml/manual/strings.xml: Likewise.
544 * doc/xml/manual/support.xml: Likewise.
545 * doc/xml/manual/test.xml: Likewise.
546 * doc/xml/manual/test_policy_data_structures.xml: Likewise.
547 * doc/xml/manual/using.xml: Likewise.
548 * doc/xml/manual/using_exceptions.xml: Likewise.
549 * doc/xml/manual/utilities.xml: Likewise.
550 * doc/html/*: Regenerate.
552 2020-10-12 Patrick Palka <ppalka@redhat.com>
554 * include/std/ranges (take_while_view::begin): Constrain the
555 const overload further as per LWG 3450.
556 (take_while_view::end): Likewise.
557 * testsuite/std/ranges/adaptors/take_while.cc: Add test for LWG
560 2020-10-12 Patrick Palka <ppalka@redhat.com>
563 * include/std/ranges (take_view::_CI): Define this alias
564 template as per LWG 3449 and remove ...
565 (take_view::_Sentinel::_CI): ... this type alias.
566 (take_view::_Sentinel::operator==): Adjust use of _CI
567 accordingly. Define a second overload that accepts an iterator
568 of the opposite constness as per LWG 3449.
569 (take_while_view::_Sentinel::operator==): Likewise.
570 * testsuite/std/ranges/adaptors/95322.cc: Add tests for LWG 3449.
572 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
574 * doc/doxygen/user.cfg.in: Update to Doxygen 1.8.20 format.
576 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
578 * doc/doxygen/user.cfg.in (PREDEFINED): Use __cplusplus=201703L
579 so that C++17 features are documented.
581 2020-10-12 Jonathan Wakely <jwakely@redhat.com>
583 * include/bits/stl_algobase.h (copy, move, copy_backward)
584 (move_backward): Fix documentation for returned iterator.
586 2020-10-12 Martin Sebor <msebor@redhat.com>
589 * libsupc++/new (operator new): Add attribute alloc_size and malloc.
591 2020-10-11 Clement Chigot <clement.chigot@atos.net>
593 * config/os/aix/t-aix: Add complementary mode object file to
596 2020-10-10 Jonathan Wakely <jwakely@redhat.com>
599 * doc/html/manual/source_code_style.html: Regenerate.
600 * doc/xml/manual/appendix_contributing.xml: Add __deref to
602 * include/debug/functions.h (_Irreflexive_checker::__deref):
604 * testsuite/17_intro/badnames.cc: Check __deref.
606 2020-10-10 Ville Voutilainen <ville.voutilainen@gmail.com>
608 * include/std/variant (__check_visitor_result):
609 Use size_t for indexes.
610 (__check_visitor_results): Likewise.
612 2020-10-09 Ville Voutilainen <ville.voutilainen@gmail.com>
615 * include/std/variant (__deduce_visit_result): Add a nested ::type.
616 (__gen_vtable_impl</*base case*/>::_S_apply):
617 Check the visitor return type.
619 (__check_visitor_result): Likewise.
620 (__check_visitor_results): Likewise.
621 (visit(_Visitor&&, _Variants&&...)): Use __check_visitor_results
622 in case we're visiting just one variant.
623 * testsuite/20_util/variant/visit_neg.cc: Adjust.
625 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
628 * include/bits/random.tcc (seed_seq::generate): Use uint32_t for
629 calculations. Also split the first loop into three loops to
630 avoid branching on k on every iteration, resolving PR 94823.
631 * testsuite/26_numerics/random/seed_seq/97311.cc: New test.
632 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-erro
635 2020-10-09 Daniel Lemire <lemire@gmail.com>
637 * include/bits/uniform_int_dist.h (uniform_int_distribution::_S_nd):
638 New member function implementing Lemire's "nearly divisionless"
640 (uniform_int_distribution::operator()): Use _S_nd when the range
641 of the URBG is the full width of the result type.
643 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
645 * testsuite/Makefile.am: Set and export variable separately.
646 * testsuite/Makefile.in: Regenerate.
648 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
650 * scripts/check_performance: Use gnu++11 instead of gnu++0x.
651 * testsuite/Makefile.am (check-performance): Export CXXFLAGS to
653 * testsuite/Makefile.in: Regenerate.
655 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
657 * testsuite/performance/26_numerics/random_dist.cc: New test.
659 2020-10-09 Jonathan Wakely <jwakely@redhat.com>
661 * testsuite/util/testsuite_performance.h (report_header): Remove
664 2020-10-08 Patrick Palka <ppalka@redhat.com>
667 * include/bits/ranges_uninitialized.h:
668 (__construct_at_fn::operator()): Rewrite in terms of
669 std::construct_at. Declare it conditionally noexcept. Qualify
670 calls to declval in its requires-clause.
671 * testsuite/20_util/specialized_algorithms/construct_at/95788.cc:
674 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
677 * include/bits/random.tcc
678 (discrete_distribution::param_type::_M_initialize)
679 (piecewise_constant_distribution::param_type::_M_initialize)
680 (piecewise_linear_distribution::param_type::_M_initialize):
681 Add assertions for positive sums..
682 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
685 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
687 * include/bits/ios_base.h (ios_base::failure): Add constructors
688 takeing error_code argument. Add code() member function.
689 * testsuite/27_io/ios_base/failure/cxx11.cc: Allow test to
690 run for the old ABI but do not check for derivation from
692 * testsuite/27_io/ios_base/failure/error_code.cc: New test.
694 2020-10-08 Jonathan Wakely <jwakely@redhat.com>
696 * include/bits/random.h (__detail::_Mod): Revert last change.
697 (__detail::__mod): Do not use _Mod for a==0 case.
698 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
699 Check other cases with a==0. Also check runtime results.
700 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error
703 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
705 * include/bits/random.h (__detail::_Mod): Avoid divide by zero.
706 * testsuite/26_numerics/random/linear_congruential_engine/operators/call.cc:
709 2020-10-07 Jonathan Wakely <jwakely@redhat.com>
711 * include/bits/random.h (seed_seq(initializer_list<T>)): Rename
712 parameter to use reserved name.
713 * include/bits/ranges_algo.h (shift_left, shift_right): Rename
714 template parameters to use reserved name.
715 * libsupc++/exception_ptr.h (exception_ptr): Likewise for
716 parameters and local variables.
717 * testsuite/17_intro/names.cc: Check "il". Do not check "d" and
720 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
723 * config/abi/pre/gnu.ver (CXXABI_1.3.13): New symbol version.
724 (exception_ptr::_M_addref(), exception_ptr::_M_release()):
726 * libsupc++/eh_ptr.cc (exception_ptr::exception_ptr()):
727 Remove out-of-line definition.
728 (exception_ptr::exception_ptr(const exception_ptr&)):
730 (exception_ptr::~exception_ptr()): Likewise.
731 (exception_ptr::operator=(const exception_ptr&)):
733 (exception_ptr::swap(exception_ptr&)): Likewise.
734 (exception_ptr::_M_addref()): Add branch prediction.
735 * libsupc++/exception_ptr.h (exception_ptr::operator bool):
737 [!_GLIBCXX_EH_PTR_COMPAT] (operator==, operator!=): Define
738 inline as hidden friends. Remove declarations at namespace
740 (exception_ptr::exception_ptr()): Define inline.
741 (exception_ptr::exception_ptr(const exception_ptr&)):
743 (exception_ptr::~exception_ptr()): Likewise.
744 (exception_ptr::operator=(const exception_ptr&)):
746 (exception_ptr::swap(exception_ptr&)): Likewise.
747 * testsuite/util/testsuite_abi.cc: Add CXXABI_1.3.13.
748 * testsuite/18_support/exception_ptr/90295.cc: New test.
750 2020-10-06 Jonathan Wakely <jwakely@redhat.com>
752 * include/std/ranges (join_view): Remove deduction guide.
753 (views::join): Add explicit template argument list to prevent
754 deducing the wrong type.
755 * testsuite/std/ranges/adaptors/join.cc: Move test for LWG 3474
757 * testsuite/std/ranges/adaptors/join_lwg3474.cc: Removed.
759 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
761 * include/bits/regex.h: Use __int_traits<int> instead of
762 std::numeric_limits<int>.
763 * include/bits/uniform_int_dist.h: Use __int_traits<T>::__max
764 instead of std::numeric_limits<T>::max().
765 * include/bits/hashtable_policy.h: Use size_t(-1) instead of
766 std::numeric_limits<size_t>::max().
767 * include/std/regex: Include <ext/numeric_traits.h>.
768 * include/std/string_view: Use typedef for __int_traits<int>.
769 * src/c++11/hashtable_c++0x.cc: Use size_t(-1) instead of
770 std::numeric_limits<size_t>::max().
771 * testsuite/std/ranges/iota/96042.cc: Include <limits>.
772 * testsuite/std/ranges/iota/difference_type.cc: Likewise.
773 * testsuite/std/ranges/subrange/96042.cc: Likewise.
775 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
777 * include/std/numeric: Move all #include directives to the top
779 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error line
781 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
783 2020-10-05 Jonathan Wakely <jwakely@redhat.com>
785 * config/abi/pre/gnu.ver: Add new symbol.
786 * include/bits/functexcept.h (__throw_bad_array_new_length):
787 Declare new function.
788 * include/ext/malloc_allocator.h (malloc_allocator::allocate):
789 Throw bad_array_new_length for impossible sizes (LWG 3190).
790 * include/ext/new_allocator.h (new_allocator::allocate):
792 * include/std/memory_resource (polymorphic_allocator::allocate)
793 (polymorphic_allocator::allocate_object): Use new function,
794 __throw_bad_array_new_length.
795 * src/c++11/functexcept.cc (__throw_bad_array_new_length):
797 * testsuite/20_util/allocator/lwg3190.cc: New test.
799 2020-10-05 Mike Crowe <mac@mcrowe.com>
802 * include/bits/atomic_futex.h:
803 (__atomic_futex_unsigned::_M_load_when_equal_until): Use target
804 clock duration type when rounding.
805 * testsuite/30_threads/async/async.cc (test_pr91486_wait_for):
806 Rename from test_pr91486.
807 (float_steady_clock): New class for test.
808 (test_pr91486_wait_until): New test.
810 2020-10-05 Mike Crowe <mac@mcrowe.com>
812 * testsuite/20_util/duration_cast/rounding_c++11.cc: Copy
813 rounding.cc and alter to support compilation for C++11 and to
814 test std::chrono::__detail::ceil.
816 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
818 * testsuite/29_atomics/atomic_float/value_init.cc: Use float
819 instead of double so that __atomic_load_8 isn't needed.
821 2020-10-02 Jonathan Wakely <jwakely@redhat.com>
823 * testsuite/18_support/96817.cc: Use terminate handler that
826 2020-10-02 Patrick Palka <ppalka@redhat.com>
828 * include/bits/stl_iterator.h (reverse_iterator::iter_move):
829 Define for C++20 as per P0896.
830 (reverse_iterator::iter_swap): Likewise.
831 (move_iterator::operator*): Apply P0896 changes for C++20.
832 (move_iterator::operator[]): Likewise.
833 * testsuite/24_iterators/reverse_iterator/cust.cc: New test.
835 2020-10-01 Jonathan Wakely <jwakely@redhat.com>
837 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
838 Do not try to dereference return value of __atomic_load_n.
840 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
842 * config/cpu/arm/cxxabi_tweaks.h (_GLIBCXX_GUARD_TEST_AND_ACQUIRE):
843 (_GLIBCXX_GUARD_SET_AND_RELEASE): Define for EABI.
845 2020-09-30 Jonathan Wakely <jwakely@redhat.com>
847 * include/bits/c++config (_GLIBCXX_HAVE_BUILTIN_IS_SAME):
848 Define for GCC 11 or when !__is_identifier(__is_same).
849 (_GLIBCXX_BUILTIN_IS_SAME_AS): Remove.
850 * include/std/type_traits (is_same, is_same_v): Replace uses
851 of _GLIBCXX_BUILTIN_IS_SAME_AS.
853 2020-09-28 Patrick Palka <ppalka@redhat.com>
855 * include/std/ranges (filter_view): Declare the data member
856 _M_base last instead of first, and adjust constructors' member
857 initializer lists accordingly.
858 (transform_view): Likewise.
859 (take_view): Likewise.
860 (take_while_view): Likewise.
861 (drop_view): Likewise.
862 (drop_while_view): Likewise.
863 (join_view): Likewise.
864 (split_view): Likewise (and tweak nearby formatting).
865 (reverse_view): Likewise.
866 * testsuite/std/ranges/adaptors/sizeof.cc: Update expected
869 2020-09-28 Patrick Palka <ppalka@redhat.com>
871 * testsuite/std/ranges/adaptors/sizeof.cc: New test.
873 2020-09-28 Patrick Palka <ppalka@redhat.com>
875 * include/bits/ranges_util.h (subrange::_M_end): Give it
876 [[no_unique_address]].
877 * testsuite/std/ranges/subrange/sizeof.cc: New test.
879 2020-09-28 Patrick Palka <ppalka@redhat.com>
881 * include/std/ranges (iota_view::_M_bound): Give it
882 [[no_unique_address]].
883 * testsuite/std/ranges/iota/iota_view.cc: Check that an
884 unbounded iota_view has minimal size.
886 2020-09-27 Clement Chigot <clement.chigot@atos.net>
888 * config/os/aix/t-aix: Use $(AR) without -X32_64.
890 2020-09-26 Jonathan Wakely <jwakely@redhat.com>
893 * include/ext/atomicity.h (__gnu_cxx::__is_single_threaded()):
894 New function wrapping __libc_single_threaded if available.
895 (__exchange_and_add_dispatch, __atomic_add_dispatch): Use it.
896 * libsupc++/guard.cc (__cxa_guard_acquire, __cxa_guard_abort)
897 (__cxa_guard_release): Likewise.
898 * testsuite/18_support/96817.cc: New test.
900 2020-09-25 Jonathan Wakely <jwakely@redhat.com>
902 * libsupc++/Makefile.am: Remove redundant -std=gnu++1z flags.
903 * libsupc++/Makefile.in: Regenerate.
905 2020-09-24 Antony Polukhin <antoshkka@gmail.com>
908 * include/std/type_traits (invoke_result, is_invocable)
909 (is_invocable_r, is_nothrow_invocable, is_nothrow_invocable_r):
910 Add static_asserts to make sure that the arguments of the type
911 traits are not misused with incomplete types.
912 * testsuite/20_util/invoke_result/incomplete_args_neg.cc: New test.
913 * testsuite/20_util/is_invocable/incomplete_args_neg.cc: New test.
914 * testsuite/20_util/is_invocable/incomplete_neg.cc: New test.
915 * testsuite/20_util/is_nothrow_invocable/incomplete_args_neg.cc:
917 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: Check
918 for error on incomplete type usage in trait.
920 2020-09-24 Patrick Palka <ppalka@redhat.com>
922 * include/std/ranges (__detail::__boxable): Split out the
923 associated constraints of __box into here.
924 (__detail::__box): Use the __boxable concept. Define a leaner
925 partial specialization for semiregular types.
926 (single_view::_M_value): Give it [[no_unique_address]].
927 (filter_view::_M_pred): Likewise.
928 (transform_view::_M_fun): Likewise.
929 (take_while_view::_M_pred): Likewise.
930 (drop_while_view::_M_pred):: Likewise.
931 * testsuite/std/ranges/adaptors/detail/semiregular_box.cc: New
934 2020-09-24 Jonathan Wakely <jwakely@redhat.com>
936 * doc/xml/manual/configure.xml: Correct name of option.
937 * doc/html/*: Regenerate.
939 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
942 * src/c++17/fs_path.cc (path::_Parser::root_path()): Check
943 for empty string before inspecting the first character.
944 * testsuite/27_io/filesystem/path/append/source.cc: Append
945 empty string_view to path.
947 2020-09-22 Glen Joseph Fernandes <glenjofe@gmail.com>
949 * include/bits/align.h (align): Fix overflow handling.
950 * testsuite/20_util/align/3.cc: New test.
952 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
954 * include/Makefile.am: Add new headers and adjust for renamed
956 * include/Makefile.in: Regenerate.
957 * include/bits/iterator_concepts.h: Adjust for renamed header.
958 * include/bits/range_access.h (ranges::*): Move to new
959 <bits/ranges_base.h> header.
960 * include/bits/ranges_algobase.h: Include new <bits/ranges_base.h>
961 header instead of <ranges>.
962 * include/bits/ranges_algo.h: Include new <bits/ranges_util.h>
964 * include/bits/range_cmp.h: Moved to...
965 * include/bits/ranges_cmp.h: ...here.
966 * include/bits/ranges_base.h: New header.
967 * include/bits/ranges_util.h: New header.
968 * include/experimental/string_view: Include new
969 <bits/ranges_base.h> header.
970 * include/std/functional: Adjust for renamed header.
971 * include/std/ranges (ranges::view_base, ranges::enable_view)
972 (ranges::dangling, ranges::borrowed_iterator_t): Move to new
973 <bits/ranges_base.h> header.
974 (ranges::view_interface, ranges::subrange)
975 (ranges::borrowed_subrange_t): Move to new <bits/ranges_util.h>
977 * include/std/span: Include new <bits/ranges_base.h> header.
978 * include/std/string_view: Likewise.
979 * testsuite/24_iterators/back_insert_iterator/pr93884.cc: Add
980 missing <ranges> header.
981 * testsuite/24_iterators/front_insert_iterator/pr93884.cc:
984 2020-09-22 Jonathan Wakely <jwakely@redhat.com>
988 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
989 Use correct value category in __use_alloc call.
990 * testsuite/20_util/tuple/cons/96803.cc: Check with constructors
991 that require correct value category to be used.
993 2020-09-22 Patrick Palka <ppalka@redhat.com>
995 * include/std/span (span::front): Remove static_assert.
996 (span::back): Likewise.
997 (span::operator[]): Likewise.
998 * testsuite/23_containers/span/back_neg.cc: Rewrite to verify
999 that we check the preconditions of back() only when it's called.
1000 * testsuite/23_containers/span/front_neg.cc: Likewise for
1002 * testsuite/23_containers/span/index_op_neg.cc: Likewise for
1005 2020-09-22 Patrick Palka <ppalka@redhat.com>
1007 * include/bits/stl_algo.h (__sample): Exit early when the
1008 input range is empty.
1009 * testsuite/25_algorithms/sample/3.cc: New test.
1011 2020-09-22 Patrick Palka <ppalka@redhat.com>
1013 * include/bits/stl_algo.h (for_each_n): Mark constexpr for C++20.
1014 (search): Likewise for the overload that takes a searcher.
1015 * testsuite/25_algorithms/for_each/constexpr.cc: Test constexpr
1017 * testsuite/25_algorithms/search/constexpr.cc: Test constexpr
1018 std::search overload that takes a searcher.
1020 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1022 * include/bits/c++config (__replacement_assert): Add noreturn
1024 (__glibcxx_assert_impl): Use __builtin_expect to hint that the
1025 assertion is expected to pass.
1027 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1029 * include/std/ranges (drop_view::begin()): Adjust constraints
1030 to match the correct condition for O(1) ranges::next (LWG 3482).
1031 * testsuite/std/ranges/adaptors/drop.cc: Check that iterator is
1032 cached for non-sized_range.
1034 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1036 * include/std/ranges (transform_view, elements_view): Relax
1037 constraints on operator- for iterators, as per LWG 3483.
1038 * testsuite/std/ranges/adaptors/elements.cc: Check that we
1039 can take the difference of two iterators from a non-random
1041 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
1043 2020-09-21 Jonathan Wakely <jwakely@redhat.com>
1046 * include/bits/align.h (align) [!_GLIBCXX_USE_C99_STDINT_TR1]:
1048 (assume_aligned): Do not use __builtin_assume_aligned during
1049 constant evaluation.
1050 * testsuite/20_util/assume_aligned/1.cc: Improve test.
1051 * testsuite/20_util/assume_aligned/97132.cc: New test.
1053 2020-09-20 Jonathan Wakely <jwakely@redhat.com>
1056 * include/std/functional (bind_front): Fix order of parameters
1057 in is_nothrow_constructible_v specialization.
1058 * testsuite/20_util/function_objects/bind_front/97101.cc: New test.
1060 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
1062 * include/std/memory: Move #include <bits/align.h> inside C++11
1063 conditional includes.
1065 2020-09-11 Thomas Rodgers <trodgers@redhat.com>
1067 * include/Makefile.am (bits_headers): Add new header.
1068 * include/Makefile.in: Regenerate.
1069 * include/bits/align.h: New file.
1070 * include/std/memory (align): Move definition to bits/align.h.
1071 (assume_aligned): Likewise.
1073 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
1075 * include/std/chrono [C++17] (chrono::__detail::ceil): Add
1076 using declaration to make chrono::ceil available for internal
1077 use with a consistent name.
1078 (chrono::__detail::__ceil_impl): New function template.
1079 (chrono::__detail::ceil): Use __ceil_impl to compare and
1080 increment the value. Remove SFINAE constraint.
1082 2020-09-11 Jonathan Wakely <jwakely@redhat.com>
1084 * include/bits/regex_error.h (__throw_regex_error): Fix
1085 parameter declaration and use reserved attribute names.
1087 2020-09-11 Mike Crowe <mac@mcrowe.com>
1089 * include/std/condition_variable (condition_variable::wait_until):
1090 Convert delta to steady_clock duration before adding to current
1091 steady_clock time to avoid rounding errors described in PR68519.
1092 (condition_variable::wait_for): Simplify calculation of absolute
1093 time by using chrono::__detail::ceil in both overloads.
1094 * testsuite/30_threads/condition_variable/members/68519.cc:
1095 (test_wait_for): Renamed from test01. Replace unassigned val
1096 variable with constant false. Reduce scope of mx and cv
1097 variables to just test_wait_for function.
1098 (test_wait_until): Add new test case.
1100 2020-09-11 Mike Crowe <mac@mcrowe.com>
1103 * include/bits/atomic_futex.h
1104 (__atomic_futex_unsigned::_M_load_when_equal_for)
1105 (__atomic_futex_unsigned::_M_load_when_equal_until): Use
1106 __detail::ceil to convert delta to the reference clock
1107 duration type to avoid resolution problems.
1108 * include/std/chrono (__detail::ceil): Move implementation
1109 of std::chrono::ceil into private namespace so that it's
1110 available to pre-C++17 code.
1111 * testsuite/30_threads/async/async.cc (test_pr91486):
1112 Test __atomic_futex_unsigned::_M_load_when_equal_for.
1114 2020-09-11 Mike Crowe <mac@mcrowe.com>
1116 * include/bits/atomic_futex.h
1117 (__atomic_futex_unsigned::_M_load_when_equal_until): Add
1118 loop on generic _Clock to check the timeout against _Clock
1119 again after _M_load_when_equal_until returns indicating a
1121 * testsuite/30_threads/async/async.cc: Invent slow_clock
1122 that runs at an eleventh of steady_clock's speed. Use it
1123 to test the user-supplied-clock variant of
1124 __atomic_futex_unsigned::_M_load_when_equal_until works
1125 generally with test03 and loops correctly when the timeout
1126 time hasn't been reached in test04.
1128 2020-09-11 Mike Crowe <mac@mcrowe.com>
1131 * include/bits/atomic_futex.h (__atomic_futex_unsigned): Change
1132 __clock_t typedef to use steady_clock so that unknown clocks are
1133 synced to it rather than system_clock. Change existing __clock_t
1134 overloads of _M_load_and_text_until_impl and
1135 _M_load_when_equal_until to use system_clock explicitly. Remove
1136 comment about DR 887 since these changes address that problem as
1137 best as we currently able.
1139 2020-09-11 Mike Crowe <mac@mcrowe.com>
1142 * config/abi/pre/gnu.ver: Update for addition of
1143 __atomic_futex_unsigned_base::_M_futex_wait_until_steady.
1144 * include/bits/atomic_futex.h (__atomic_futex_unsigned_base):
1145 Add comments to clarify that _M_futex_wait_until and
1146 _M_load_and_test_until use CLOCK_REALTIME.
1147 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady)
1148 (__atomic_futex_unsigned_base::_M_load_and_text_until_steady):
1149 New member functions that use CLOCK_MONOTONIC.
1150 (__atomic_futex_unsigned_base::_M_load_and_test_until_impl)
1151 (__atomic_futex_unsigned_base::_M_load_when_equal_until): Add
1152 overloads that accept a steady_clock time_point and use the
1153 new member functions.
1154 * src/c++11/futex.cc: Include headers required for
1156 (futex_clock_monotonic_flag): New constant to tell futex to
1157 use CLOCK_MONOTONIC to match existing futex_clock_realtime_flag.
1158 (futex_clock_monotonic_unavailable): New global to store the
1159 result of trying to use CLOCK_MONOTONIC.
1160 (__atomic_futex_unsigned_base::_M_futex_wait_until_steady): Add
1161 new variant of _M_futex_wait_until that uses CLOCK_MONOTONIC to
1162 support waiting using steady_clock.
1164 2020-09-11 Mike Crowe <mac@mcrowe.com>
1166 * src/c++11/futex.cc: Add new constants for required futex
1167 flags. Add futex_clock_realtime_unavailable flag to store
1168 result of trying to use FUTEX_CLOCK_REALTIME.
1169 (__atomic_futex_unsigned_base::_M_futex_wait_until): Try to
1170 use FUTEX_WAIT_BITSET with FUTEX_CLOCK_REALTIME and only
1171 fall back to using gettimeofday and FUTEX_WAIT if that's not
1174 2020-09-11 Mike Crowe <mac@mcrowe.com>
1176 * testsuite/30_threads/async/async.cc (test02): Test steady_clock
1177 with std::future::wait_until.
1178 (test03): Add new test templated on clock type waiting for future
1179 associated with async to resolve.
1180 (main): Call test03 to test both system_clock and steady_clock.
1182 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
1183 Christophe Lyon <christophe.lyon@linaro.org>
1185 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
1187 2020-09-11 Torbjörn SVENSSON <torbjorn.svensson@st.com>
1188 Christophe Lyon <christophe.lyon@linaro.org>
1190 * libsupc++/eh_call.cc: Avoid warning with -fno-exceptions.
1192 2020-09-11 Christophe Lyon <christophe.lyon@linaro.org>
1194 * include/bits/regex_error.h: Avoid warning with -fno-exceptions.
1196 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1198 * include/bits/locale_conv.h (__do_str_codecvt, __str_codecvt_in_all):
1199 Add casts to compare types of the same signedness.
1201 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1203 * include/bits/ranges_algobase.h (__equal_fn): Remove unused
1206 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1208 * include/std/version (__cpp_lib_array_constexpr):
1209 (__cpp_lib_constexpr_char_traits): Only define C++17 value when
1212 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1214 * include/experimental/bits/shared_ptr.h (shared_ptr(auto_ptr&&))
1215 (operator=(auto_ptr&&)): Add diagnostic pragmas to suppress
1216 warnings for uses of std::auto_ptr.
1217 * include/experimental/type_traits (is_literal_type_v):
1218 Likewise, for use of std::is_literal_type.
1219 * include/std/condition_variable (condition_variable_any::_Unlock):
1220 Likewise, for use of std::uncaught_exception.
1222 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1224 * include/bits/fs_path.h (path::_List::type()): Avoid narrowing
1226 * include/std/chrono (operator+(const year&, const years&)):
1229 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1231 * include/bits/codecvt.h (codecvt_byname): Remove names of
1234 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1236 * include/bits/locale_facets_nonio.tcc: Adjust whitespace.
1238 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
1240 * include/c_global/cmath (__lerp): Avoid -Wparentheses warnings.
1242 2020-09-10 Krystian Kuźniarek <krystian.kuzniarek@gmail.com>
1244 * include/bits/atomic_base.h: Fix -Wunused-variable
1246 * include/ext/new_allocator.h: Fix -Wunused-parameter
1249 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1251 * include/bits/stl_iterator.h (counted_iterator): Add assertions
1252 to check preconditions added by LWG 3472.
1254 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1257 * src/c++17/memory_resource.cc (munge_options): Round
1258 max_blocks_per_chunk to a multiple of four.
1259 (__pool_resource::_M_alloc_pools()): Simplify slightly.
1260 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
1261 Check that valid pointers are returned when small values are
1262 used for max_blocks_per_chunk.
1264 2020-09-10 Jonathan Wakely <jwakely@redhat.com>
1267 * include/std/memory_resource (monotonic_buffer_resource::do_allocate):
1268 Use __builtin_expect when checking if a new buffer needs to be
1269 allocated from the upstream resource, and for checks for edge
1270 cases like zero sized buffers and allocations.
1271 * src/c++17/memory_resource.cc (aligned_size): New class template.
1272 (aligned_ceil): New helper function to round up to a given
1274 (monotonic_buffer_resource::chunk): Replace _M_size and _M_align
1275 with an aligned_size member. Remove _M_canary member. Change _M_next
1276 to pointer instead of unaligned buffer.
1277 (monotonic_buffer_resource::chunk::allocate): Round up to multiple
1278 of 64 instead of to power of two. Check for size overflow. Remove
1279 redundant check for minimum required alignment.
1280 (monotonic_buffer_resource::chunk::release): Adjust for changes
1282 (monotonic_buffer_resource::_M_new_buffer): Use aligned_ceil.
1283 (big_block): Replace _M_size and _M_align with aligned_size
1285 (big_block::big_block): Check for size overflow.
1286 (big_block::size, big_block::align): Adjust to use aligned_size.
1287 (big_block::alloc_size): Use aligned_ceil.
1288 (munge_options): Use aligned_ceil.
1289 (__pool_resource::allocate): Use big_block::align for alignment.
1290 * testsuite/20_util/monotonic_buffer_resource/allocate.cc: Check
1291 upstream resource gets expected values for impossible sizes.
1292 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc:
1293 Likewise. Adjust checks for expected alignment in existing test.
1295 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
1297 * include/std/chrono (duration::_S_gcd): Use invariant that
1298 neither value is zero initially.
1300 2020-09-07 Jonathan Wakely <jwakely@redhat.com>
1302 * include/std/ranges (__box): Simplify constraints as per LWG 3477.
1304 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
1307 * include/std/tuple (_TupleConstraints<true, T...>): Use
1308 alternative is_constructible instead of std::is_constructible.
1309 * testsuite/20_util/tuple/cons/96592.cc: New test.
1311 2020-09-03 Jonathan Wakely <jwakely@redhat.com>
1313 * include/std/chrono (duration::_S_gcd): Use iterative algorithm
1314 for C++14 and later.
1315 * include/std/numeric (__detail::__gcd): Replace recursive
1316 Euclidean algorithm with iterative version of binary GCD algorithm.
1317 * testsuite/26_numerics/gcd/1.cc: Test additional inputs.
1318 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust dg-error lines.
1319 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1320 * testsuite/experimental/numeric/gcd.cc: Test additional inputs.
1321 * testsuite/26_numerics/gcd/2.cc: New test.
1323 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
1326 * testsuite/experimental/numeric/92978.cc: Use experimental::lcm
1329 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
1332 * include/bits/cpp_type_traits.h (__is_memcmp_ordered):
1333 New trait that says if memcmp can be used for ordering.
1334 (__is_memcmp_ordered_with): Likewise, for two types.
1335 * include/bits/deque.tcc (__lex_cmp_dit): Use new traits
1336 instead of __is_byte and __numeric_traits.
1337 (__lexicographical_compare_aux1): Likewise.
1338 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
1340 * include/bits/stl_algobase.h (__lexicographical_compare_aux1)
1341 (__is_byte_iter): Likewise.
1342 * include/std/array (operator<=>): Likewise. Only use memcmp
1343 when std::is_constant_evaluated() is false.
1344 * testsuite/23_containers/array/comparison_operators/96851.cc:
1346 * testsuite/23_containers/array/tuple_interface/get_neg.cc:
1347 Adjust dg-error line numbers.
1349 2020-09-02 Jonathan Wakely <jwakely@redhat.com>
1351 * include/bits/stl_iterator.h: Include <bits/exception_defines.h>
1352 for definitions of __try, __catch and __throw_exception_again.
1353 (counted_iterator::operator++(int)): Use __throw_exception_again
1355 * libsupc++/new: Include <bits/exception.h> not <exception>.
1356 * libsupc++/new_opvnt.cc: Include <bits/exception_defines.h>.
1357 * testsuite/18_support/destroying_delete.cc: Include
1358 <type_traits> for std::is_same_v definition.
1359 * testsuite/20_util/variant/index_type.cc: Qualify size_t.
1361 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
1364 * include/bits/c++config (__glibcxx_assert_impl): Remove
1365 do-while so that uses of the macro need to add it.
1366 (__glibcxx_assert): Rename macro for runtime assertions
1367 to __glibcxx_assert_2.
1368 (__glibcxx_assert_1): Define macro for constexpr assertions.
1369 (__glibcxx_assert): Define macro for constexpr and runtime
1371 * include/bits/range_access.h (ranges::advance): Remove
1372 redundant precondition checks during constant evaluation.
1373 * include/parallel/base.h (_GLIBCXX_PARALLEL_ASSERT): Always
1374 use do-while in macro expansion.
1375 * include/std/ranges (iota_view::iota_view(W, B)): Remove
1378 2020-09-01 Jonathan Wakely <jwakely@redhat.com>
1380 * include/std/chrono (duration::_S_gcd(intmax_t, intmax_t)):
1381 New helper function for finding GCD of two positive intmax_t
1383 (duration::__divide): New helper alias for dividing one period
1385 (duration::__is_harmonic): Use __divide not ratio_divide.
1386 (duration(const duration<R2, P2>&)): Require the duration rep
1387 types to be convertible.
1388 * testsuite/20_util/duration/cons/dr2094.cc: New test.
1389 * testsuite/20_util/duration/requirements/reduced_period.cc:
1390 Fix definition of unused member functions in test type.
1391 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
1392 Adjust expected errors.
1394 2020-08-29 Jonathan Wakely <jwakely@redhat.com>
1396 * include/std/numeric (__detail::__absu(bool)): Make deleted
1397 function a function template, so it will be chosen for calls
1398 with an explicit template argument list.
1399 * testsuite/26_numerics/gcd/gcd_neg.cc: Add dg-prune-output.
1400 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1402 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
1404 * include/std/chrono (common_type): Fix partial specializations
1405 for a single duration type to use the common_type of the rep.
1406 (duration::operator+, duration::operator-): Fix return types
1407 to also use the common_type of the rep.
1408 * testsuite/20_util/duration/requirements/reduced_period.cc:
1409 Check duration using a rep that has common_type specialized.
1411 2020-08-28 Jonathan Wakely <jwakely@redhat.com>
1414 * include/std/numeric (__abs_integral): Replace with ...
1415 (__detail::__absu): New function template that returns an
1416 unsigned type, guaranteeing it can represent the most
1417 negative signed value.
1418 (__detail::__gcd, __detail::__lcm): Require arguments to
1419 be unsigned and therefore already non-negative.
1420 (gcd, lcm): Convert arguments to absolute value as unsigned
1421 type before calling __detail::__gcd or __detail::__lcm.
1422 * include/experimental/numeric (gcd, lcm): Likewise.
1423 * testsuite/26_numerics/gcd/gcd_neg.cc: Adjust expected
1425 * testsuite/26_numerics/lcm/lcm_neg.cc: Likewise.
1426 * testsuite/26_numerics/gcd/92978.cc: New test.
1427 * testsuite/26_numerics/lcm/92978.cc: New test.
1428 * testsuite/experimental/numeric/92978.cc: New test.
1430 2020-08-27 Jonathan Wakely <jwakely@redhat.com>
1432 * include/std/chrono (__duration_common_type): Ensure the
1433 reduced ratio is used. Remove unused partial specialization
1434 using __failure_type.
1435 (common_type): Pass reduced ratios to __duration_common_type.
1436 Add partial specializations for simple cases involving a single
1437 duration or time_point type.
1438 (duration::period): Use reduced ratio.
1439 (duration::operator+(), duration::operator-()): Return duration
1440 type using the reduced ratio.
1441 * testsuite/20_util/duration/requirements/typedefs_neg2.cc:
1442 Adjust expected errors.
1443 * testsuite/20_util/duration/requirements/reduced_period.cc: New test.
1445 2020-08-27 Patrick Palka <ppalka@redhat.com>
1447 * include/std/chrono (year_month::operator+): Properly handle a
1448 month value of 0 by casting the month value to int before
1449 subtracting 1 from it so that the difference is sign-extended in
1450 the subsequent addition.
1451 * testsuite/std/time/year_month/1.cc: Test adding months to a
1452 year_month whose month component is below or above the
1453 normalized range of [1,12].
1455 2020-08-27 Patrick Palka <ppalka@redhat.com>
1457 * include/std/chrono
1458 (__detail::__months_years_conversion_disambiguator): Define.
1459 (year_month::operator+=): Templatize the 'months'-based overload
1460 so that the 'years'-based overload is selected in case of
1461 equally-ranked implicit conversion sequences to both 'months'
1462 and 'years' from the supplied argument.
1463 (year_month::operator-=): Likewise.
1464 (year_month::operator+): Likewise.
1465 (year_month::operator-): Likewise.
1466 (year_month_day::operator+=): Likewise.
1467 (year_month_day::operator-=): Likewise.
1468 (year_month_day::operator+): Likewise.
1469 (year_month_day::operator-): Likewise.
1470 (year_month_day_last::operator+=): Likewise.
1471 (year_month_day_last::operator-=): Likewise.
1472 (year_month_day_last::operator+): Likewise
1473 (year_month_day_last::operator-): Likewise.
1474 (year_month_day_weekday::operator+=): Likewise
1475 (year_month_day_weekday::operator-=): Likewise.
1476 (year_month_day_weekday::operator+): Likewise.
1477 (year_month_day_weekday::operator-): Likewise.
1478 (year_month_day_weekday_last::operator+=): Likewise
1479 (year_month_day_weekday_last::operator-=): Likewise.
1480 (year_month_day_weekday_last::operator+): Likewise.
1481 (year_month_day_weekday_last::operator-): Likewise.
1482 (testsuite/std/time/year_month/2.cc): New test.
1483 (testsuite/std/time/year_month_day/2.cc): New test.
1484 (testsuite/std/time/year_month_day_last/2.cc): New test.
1485 (testsuite/std/time/year_month_weekday/2.cc): New test.
1486 (testsuite/std/time/year_month_weekday_last/2.cc): New test.
1487 * testsuite/std/time/year_month/2.cc: New file.
1488 * testsuite/std/time/year_month_day/2.cc: New file.
1489 * testsuite/std/time/year_month_day_last/2.cc: New file.
1490 * testsuite/std/time/year_month_weekday/2.cc: New file.
1491 * testsuite/std/time/year_month_weekday_last/2.cc: New file.
1493 2020-08-27 Patrick Palka <ppalka@redhat.com>
1496 * include/std/ranges (transform_view::sentinel::__distance_from):
1497 Give this a deduced return type.
1498 (transform_view::sentinel::operator-): Adjust the return type so
1499 that it's based on the constness of the iterator rather than
1500 that of the sentinel.
1501 * testsuite/std/ranges/adaptors/95322.cc: Refer to LWG 3488.
1503 2020-08-27 Patrick Palka <ppalka@redhat.com>
1505 * include/std/ranges (elements_view::begin): Adjust constraints.
1506 (elements_view::end): Likewise.
1507 (elements_view::_Sentinel::operator==): Templatize to take both
1508 _Iterator<true> and _Iterator<false>.
1509 (elements_view::_Sentinel::operator-): Likewise.
1510 * testsuite/std/ranges/adaptors/elements.cc: Add testcase for
1511 the example from P1994R1.
1512 * testsuite/std/ranges/adaptors/lwg3406.cc: New test.
1514 2020-08-27 Patrick Palka <ppalka@redhat.com>
1516 * include/std/ranges (elements_view::end): Replace these two
1517 overloads with four new overloads.
1518 (elements_view::_Iterator::operator==): Remove.
1519 (elements_view::_Iterator::operator-): Likewise.
1520 (elements_view::_Sentinel): Define.
1522 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1524 * include/std/tuple (_Tuple_impl): Whitespaces changes for
1525 consistent indentation. Also use __enable_if_t alias template.
1527 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1531 (_Tuple_impl(allocator_arg_t, Alloc, const _Tuple_impl<U...>&)):
1532 Replace parameter pack with a type parameter and a pack and pass
1533 the first type to __use_alloc.
1534 * testsuite/20_util/tuple/cons/96803.cc: New test.
1536 2020-08-26 Patrick Palka <ppalka@redhat.com>
1538 * include/std/chrono (year_month_weekday::operator==): Compare
1539 weekday_indexed instead of weekday.
1540 * testsuite/std/time/year_month_weekday/1.cc: Augment testcase.
1542 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1544 * include/bits/hashtable_policy.h (_Hash_code_base): Change
1545 index of _Hashtable_ebo_helper base class.
1546 * testsuite/23_containers/unordered_map/dup_types.cc: New test.
1548 2020-08-26 Jonathan Wakely <jwakely@redhat.com>
1551 * include/experimental/string_view (basic_string_view):
1552 Enable debug assertions.
1553 * include/std/string_view (basic_string_view):
1556 2020-08-26 François Dumont <fdumont@gcc.gnu.org>
1558 * include/bits/hashtable_policy.h (_Hashtable<>): Rename _H1 into _Hash
1559 _H2 into _RangeHash and _Hash into _Unused.
1560 (_Hastable_base<>): Likewise.
1561 (_Map_base<>): Likewise.
1562 (_Insert_base<>): Likewise.
1563 (_Insert<>): Likewise.
1564 (_Rehash_base<>): Likewise.
1565 (_Local_iterator_base<>): Likewise.
1566 (_Hash_code_base<>): Likewise.
1567 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, false>):
1569 (_Hash_code_base<_Key, _Value, _ExtractKey, _H1, _H2, _Hash, true>):
1571 (_Hash_code_base<_Key, _Value, _ExtractKey, _Hash, _RangeHas, _Unused,
1572 bool>): Remove _Hashtable_ebo_helper<2, _RangeHash> base type..
1573 (_Hash_code_base<>::_M_bucket_index(const _Key&, __hash_code, size_t)):
1575 (_Hash_code_base<>::_M_bucket_index(__hash_code, size_t)): ...this.
1576 (_Local_iterator<>): Remove _H1 and _H2 template parameters.
1577 (_Local_const_iterator<>): Likewise.
1578 (_Equality<>): Likewise.
1579 (_Map_base<>::operator[](const key_type&): Adapt.
1580 (_Map_base<>::operator[](key_type&&): Adapt.
1581 (_Identity::operator()): Add noexcept.
1582 (_Select1st::operator()): Likewise.
1583 (_Hash_code_base<>): Remove _Hashtable_ebo_helper<0, _ExtractKey> base
1585 (_Hash_code_base::_M_extract): Remove.
1586 * include/bits/hashtable.h (_Hashtable<>): Remove _H1 and _H2 template
1587 parameters. Remove _ExtractKey from constructors.
1588 (_Hashtable<>::_M_insert_unique_node(const key_type&, size_t,
1589 __hash_code, __node_type*, size_t)): Replace by...
1590 (_Hashtable<>::_M_insert_unique_node(size_t, __hash_code,
1591 __node_type*, size_t)): ...this.
1592 (_Hashtable<>::_M_insert_muti_node(__node_type*, const key_type&,
1593 __hash_code, __node_type*)): Replace by...
1594 (_Hashtable<>::_M_insert_multi_node(__node_type*, __hash_code,
1595 __node_type*)): ...this.
1596 (_Hashtable<>::__key_extract): Remove.
1597 * include/bits/node_handle.h: Adapt.
1599 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
1601 * testsuite/21_strings/debug/iterator_self_move_assign_neg.cc: Removed.
1602 * testsuite/21_strings/debug/self_move_assign_neg.cc: Removed.
1603 * testsuite/23_containers/deque/debug/iterator_self_move_assign_neg.cc: Removed.
1604 * testsuite/23_containers/deque/debug/self_move_assign_neg.cc: Removed.
1605 * testsuite/23_containers/forward_list/debug/iterator_self_move_assign_neg.cc: Removed.
1606 * testsuite/23_containers/forward_list/debug/self_move_assign_neg.cc: Removed.
1607 * testsuite/23_containers/list/debug/iterator_self_move_assign_neg.cc: Removed.
1608 * testsuite/23_containers/list/debug/self_move_assign_neg.cc: Removed.
1609 * testsuite/23_containers/map/debug/iterator_self_move_assign_neg.cc: Removed.
1610 * testsuite/23_containers/map/debug/self_move_assign_neg.cc: Removed.
1611 * testsuite/23_containers/multimap/debug/iterator_self_move_assign_neg.cc: Removed.
1612 * testsuite/23_containers/multimap/debug/self_move_assign_neg.cc: Removed.
1613 * testsuite/23_containers/multiset/debug/iterator_self_move_assign_neg.cc: Removed.
1614 * testsuite/23_containers/multiset/debug/self_move_assign_neg.cc: Removed.
1615 * testsuite/23_containers/set/debug/iterator_self_move_assign_neg.cc: Removed.
1616 * testsuite/23_containers/set/debug/self_move_assign_neg.cc: Removed.
1617 * testsuite/23_containers/unordered_map/debug/iterator_self_move_assign_neg.cc: Removed.
1618 * testsuite/23_containers/unordered_map/debug/self_move_assign_neg.cc: Removed.
1619 * testsuite/23_containers/unordered_multimap/debug/iterator_self_move_assign_neg.cc:
1621 * testsuite/23_containers/unordered_multimap/debug/self_move_assign_neg.cc: Removed.
1622 * testsuite/23_containers/unordered_multiset/debug/iterator_self_move_assign_neg.cc:
1624 * testsuite/23_containers/unordered_multiset/debug/self_move_assign_neg.cc: Removed.
1625 * testsuite/23_containers/unordered_set/debug/iterator_self_move_assign_neg.cc: Removed.
1626 * testsuite/23_containers/unordered_set/debug/self_move_assign_neg.cc: Removed.
1627 * testsuite/23_containers/vector/debug/iterator_self_move_assign_neg.cc: Removed.
1628 * testsuite/23_containers/vector/debug/self_move_assign_neg.cc: Removed.
1630 2020-08-25 Patrick Palka <ppalka@redhat.com>
1632 * include/std/chrono (year_month_weekday::ok): Fix assert.
1634 2020-08-25 Jonathan Wakely <jwakely@redhat.com>
1636 * include/std/future (future, shared_future. promise): Add
1637 is_destructible assertion (LWG 3466). Adjust string-literal for
1638 !is_array and !is_function assertions.
1639 * testsuite/30_threads/future/requirements/lwg3458.cc: Check
1640 types with no accessible destructor. Adjust expected errors.
1641 * testsuite/30_threads/promise/requirements/lwg3466.cc:
1643 * testsuite/30_threads/shared_future/requirements/lwg3458.cc:
1646 2020-08-25 Patrick Palka <ppalka@redhat.com>
1647 Ed Smith-Rowland <3dw4rd@verizon.net>
1648 Jonathan Wakely <jwakely@redhat.com>
1650 * include/std/chrono (time_point::operator++)
1651 (time_point::operator--): Define.
1652 (utc_clock, tai_clock, gps_clock): Forward declare.
1653 (utc_time, utc_seconds, tai_time, tai_seconds, gps_time)
1654 (gps_seconds): Define.
1655 (is_clock<utc_clock>, is_clock<tai_clock>, is_clock<gps_clock>)
1656 (is_clock_v<utc_clock>, is_clock_v<tai_clock>)
1657 (is_clock_v<gps_clock>): Define these specializations.
1658 (leap_second_info): Define.
1659 (day, month, year, weekday, weekday_indexed)
1660 (weekday_last, month_day, month_day_last, month_weekday)
1661 (month_weekday_last, year_month, year_month_day)
1662 (year_month_day_last, year_month_weekday, year_month_weekday_last):
1663 Declare and later define.
1664 (last_spec, last, __detail::__days_per_month)
1665 (__detail::__days_per_month, __detail::__last_day): Define.
1666 (January, February, March, April, May, June, July, August)
1667 (September, October, November, December, Sunday, Monday, Tuesday)
1668 (Wednesday, Thursday, Friday, Saturday): Define.
1669 (weekday::operator[]): Define out-of-line.
1670 (year_month_day::_S_from_days, year_month_day::M_days_since_epoch):
1672 (year_month_day::year_month_day, year_month_day::ok): Likewise.
1673 (__detail::__pow10, hh_mm_ss): Define.
1674 (literals::chrono_literals::operator""d)
1675 (literals::chrono_literals::operator""y): Define.
1676 (is_am, is_pm, make12, make24): Define.
1677 * testsuite/20_util/time_point/4.cc: New test.
1678 * testsuite/std/time/day/1.cc: New test.
1679 * testsuite/std/time/hh_mm_ss/1.cc: New test.
1680 * testsuite/std/time/is_am/1.cc: New test.
1681 * testsuite/std/time/is_pm/1.cc: New test.
1682 * testsuite/std/time/make12/1.cc: New test.
1683 * testsuite/std/time/make24/1.cc: New test.
1684 * testsuite/std/time/month/1.cc: New test.
1685 * testsuite/std/time/month_day/1.cc: New test.
1686 * testsuite/std/time/month_day_last/1.cc: New test.
1687 * testsuite/std/time/month_weekday/1.cc: New test.
1688 * testsuite/std/time/month_weekday_last/1.cc: New test.
1689 * testsuite/std/time/weekday/1.cc: New test.
1690 * testsuite/std/time/weekday_indexed/1.cc: New test.
1691 * testsuite/std/time/weekday_last/1.cc: New test.
1692 * testsuite/std/time/year/1.cc: New test.
1693 * testsuite/std/time/year_month/1.cc: New test.
1694 * testsuite/std/time/year_month_day/1.cc: New test.
1695 * testsuite/std/time/year_month_day_last/1.cc: New test.
1696 * testsuite/std/time/year_month_weekday/1.cc: New test.
1697 * testsuite/std/time/year_month_weekday_last/1.cc: New test.
1699 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1701 * include/std/ranges (join_view): Add deduction guide (LWG 3474).
1702 * testsuite/std/ranges/adaptors/join_lwg3474.cc: New test.
1704 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1706 * include/bits/iterator_concepts.h (indirectly_readable): Add
1707 partial specializations to resolve ambiguities (LWG 3446).
1708 * testsuite/24_iterators/associated_types/readable.traits.cc:
1709 Check types with both value_type and element_type.
1711 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1713 * include/std/ranges (ranges::iota_view::size()): Perform all
1714 calculations in the right unsigned types.
1715 * testsuite/std/ranges/iota/size.cc: New test.
1717 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1720 * include/std/variant (_Variant_storage): Replace implicit
1721 conversions from size_t to __index_type with explicit casts.
1723 2020-08-24 Jonathan Wakely <jwakely@redhat.com>
1725 * testsuite/30_threads/packaged_task/cons/alloc.cc: Run for
1726 C++11 and skip for C++17 or later.
1728 2020-08-24 Corentin Gay <gay@adacore.com>
1730 * testsuite/20_util/shared_ptr/atomic/3.cc: Do not require POSIX
1731 threads and add -pthread only on targets supporting them.
1732 * testsuite/20_util/shared_ptr/thread/default_weaktoshared.cc:
1734 * testsuite/20_util/shared_ptr/thread/mutex_weaktoshared.cc:
1736 * testsuite/30_threads/async/42819.cc: Likewise.
1737 * testsuite/30_threads/async/49668.cc: Likewise.
1738 * testsuite/30_threads/async/54297.cc: Likewise.
1739 * testsuite/30_threads/async/any.cc: Likewise.
1740 * testsuite/30_threads/async/async.cc: Likewise.
1741 * testsuite/30_threads/async/except.cc: Likewise.
1742 * testsuite/30_threads/async/launch.cc: Likewise.
1743 * testsuite/30_threads/async/lwg2021.cc: Likewise.
1744 * testsuite/30_threads/async/sync.cc: Likewise. : Likewise.
1745 * testsuite/30_threads/call_once/39909.cc: Likewise.
1746 * testsuite/30_threads/call_once/49668.cc: Likewise.
1747 * testsuite/30_threads/call_once/60497.cc: Likewise.
1748 * testsuite/30_threads/call_once/call_once1.cc: Likewise.
1749 * testsuite/30_threads/call_once/dr2442.cc: Likewise.
1750 * testsuite/30_threads/condition_variable/54185.cc: Likewise.
1751 * testsuite/30_threads/condition_variable/cons/1.cc: Likewise.
1752 * testsuite/30_threads/condition_variable/members/1.cc: Likewise.
1753 * testsuite/30_threads/condition_variable/members/2.cc: Likewise.
1754 * testsuite/30_threads/condition_variable/members/3.cc: Likewise.
1755 * testsuite/30_threads/condition_variable/members/53841.cc: Likewise.
1756 * testsuite/30_threads/condition_variable/members/68519.cc: Likewise.
1757 * testsuite/30_threads/condition_variable/native_handle/typesizes.cc:
1759 * testsuite/30_threads/condition_variable_any/50862.cc: Likewise.
1760 * testsuite/30_threads/condition_variable_any/53830.cc: Likewise.
1761 * testsuite/30_threads/condition_variable_any/cond.cc: Likewise.
1762 * testsuite/30_threads/condition_variable_any/cons/1.cc: Likewise.
1763 * testsuite/30_threads/condition_variable_any/members/1.cc: Likewise.
1764 * testsuite/30_threads/condition_variable_any/members/2.cc: Likewise.
1765 * testsuite/30_threads/future/cons/move.cc: Likewise.
1766 * testsuite/30_threads/future/members/45133.cc: Likewise.
1767 * testsuite/30_threads/future/members/get.cc: Likewise.
1768 * testsuite/30_threads/future/members/get2.cc: Likewise.
1769 * testsuite/30_threads/future/members/share.cc: Likewise.
1770 * testsuite/30_threads/future/members/valid.cc: Likewise.
1771 * testsuite/30_threads/future/members/wait.cc: Likewise.
1772 * testsuite/30_threads/future/members/wait_for.cc: Likewise.
1773 * testsuite/30_threads/future/members/wait_until.cc: Likewise.
1774 * testsuite/30_threads/lock/1.cc: Likewise.
1775 * testsuite/30_threads/lock/2.cc: Likewise.
1776 * testsuite/30_threads/lock/3.cc: Likewise.
1777 * testsuite/30_threads/lock/4.cc: Likewise.
1778 * testsuite/30_threads/mutex/cons/1.cc: Likewise.
1779 * testsuite/30_threads/mutex/dest/destructor_locked.cc: Likewise.
1780 * testsuite/30_threads/mutex/lock/1.cc: Likewise.
1781 * testsuite/30_threads/mutex/native_handle/1.cc: Likewise.
1782 * testsuite/30_threads/mutex/native_handle/typesizes.cc: Likewise.
1783 * testsuite/30_threads/mutex/try_lock/1.cc: Likewise.
1784 * testsuite/30_threads/mutex/try_lock/2.cc: Likewise.
1785 * testsuite/30_threads/mutex/unlock/1.cc: Likewise.
1786 * testsuite/30_threads/mutex/unlock/2.cc: Likewise.
1787 * testsuite/30_threads/packaged_task/49668.cc: Likewise.
1788 * testsuite/30_threads/packaged_task/60564.cc: Likewise.
1789 * testsuite/30_threads/packaged_task/cons/1.cc: Likewise.
1790 * testsuite/30_threads/packaged_task/cons/2.cc: Likewise.
1791 * testsuite/30_threads/packaged_task/cons/3.cc: Likewise.
1792 * testsuite/30_threads/packaged_task/cons/56492.cc: Likewise.
1793 * testsuite/30_threads/packaged_task/cons/alloc.cc: Likewise.
1794 * testsuite/30_threads/packaged_task/cons/move.cc: Likewise.
1795 * testsuite/30_threads/packaged_task/cons/move_assign.cc: Likewise.
1796 * testsuite/30_threads/packaged_task/members/at_thread_exit.cc:
1798 * testsuite/30_threads/packaged_task/members/get_future.cc: Likewise.
1799 * testsuite/30_threads/packaged_task/members/get_future2.cc: Likewise.
1800 * testsuite/30_threads/packaged_task/members/invoke.cc: Likewise.
1801 * testsuite/30_threads/packaged_task/members/invoke2.cc: Likewise.
1802 * testsuite/30_threads/packaged_task/members/invoke3.cc: Likewise.
1803 * testsuite/30_threads/packaged_task/members/invoke4.cc: Likewise.
1804 * testsuite/30_threads/packaged_task/members/invoke5.cc: Likewise.
1805 * testsuite/30_threads/packaged_task/members/reset.cc: Likewise.
1806 * testsuite/30_threads/packaged_task/members/reset2.cc: Likewise.
1807 * testsuite/30_threads/packaged_task/members/swap.cc: Likewise.
1808 * testsuite/30_threads/packaged_task/members/valid.cc: Likewise.
1809 * testsuite/30_threads/promise/60966.cc: Likewise.
1810 * testsuite/30_threads/promise/cons/1.cc: Likewise.
1811 * testsuite/30_threads/promise/cons/alloc.cc: Likewise.
1812 * testsuite/30_threads/promise/cons/move.cc: Likewise.
1813 * testsuite/30_threads/promise/cons/move_assign.cc: Likewise.
1814 * testsuite/30_threads/promise/members/at_thread_exit.cc: Likewise.
1815 * testsuite/30_threads/promise/members/at_thread_exit2.cc: Likewise.
1816 * testsuite/30_threads/promise/members/get_future.cc: Likewise.
1817 * testsuite/30_threads/promise/members/get_future2.cc: Likewise.
1818 * testsuite/30_threads/promise/members/set_exception.cc: Likewise.
1819 * testsuite/30_threads/promise/members/set_exception2.cc: Likewise.
1820 * testsuite/30_threads/promise/members/set_value.cc: Likewise.
1821 * testsuite/30_threads/promise/members/set_value2.cc: Likewise.
1822 * testsuite/30_threads/promise/members/set_value3.cc: Likewise.
1823 * testsuite/30_threads/promise/members/swap.cc: Likewise.
1824 * testsuite/30_threads/recursive_mutex/cons/1.cc: Likewise.
1825 * testsuite/30_threads/recursive_mutex/dest/destructor_locked.cc:
1827 * testsuite/30_threads/recursive_mutex/lock/1.cc: Likewise.
1828 * testsuite/30_threads/recursive_mutex/native_handle/1.cc: Likewise.
1829 * testsuite/30_threads/recursive_mutex/native_handle/typesizes.cc:
1831 * testsuite/30_threads/recursive_mutex/try_lock/1.cc: Likewise.
1832 * testsuite/30_threads/recursive_mutex/try_lock/2.cc: Likewise.
1833 * testsuite/30_threads/recursive_mutex/unlock/1.cc: Likewise.
1834 * testsuite/30_threads/recursive_mutex/unlock/2.cc: Likewise.
1835 * testsuite/30_threads/recursive_timed_mutex/cons/1.cc: Likewise.
1836 * testsuite/30_threads/recursive_timed_mutex/dest/destructor_locked.cc:
1838 * testsuite/30_threads/recursive_timed_mutex/lock/1.cc: Likewise.
1839 * testsuite/30_threads/recursive_timed_mutex/lock/2.cc: Likewise.
1840 * testsuite/30_threads/recursive_timed_mutex/native_handle/1.cc:
1842 * testsuite/30_threads/recursive_timed_mutex/native_handle/typesizes.cc:
1844 * testsuite/30_threads/recursive_timed_mutex/try_lock/1.cc: Likewise.
1845 * testsuite/30_threads/recursive_timed_mutex/try_lock/2.cc: Likewise.
1846 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/1.cc:
1848 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/2.cc:
1850 * testsuite/30_threads/recursive_timed_mutex/try_lock_for/3.cc:
1852 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/1.cc:
1854 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/2.cc:
1856 * testsuite/30_threads/recursive_timed_mutex/unlock/1.cc: Likewise.
1857 * testsuite/30_threads/recursive_timed_mutex/unlock/2.cc: Likewise.
1858 * testsuite/30_threads/shared_future/cons/move.cc: Likewise.
1859 * testsuite/30_threads/shared_future/members/45133.cc: Likewise.
1860 * testsuite/30_threads/shared_future/members/get.cc: Likewise.
1861 * testsuite/30_threads/shared_future/members/get2.cc: Likewise.
1862 * testsuite/30_threads/shared_future/members/valid.cc: Likewise.
1863 * testsuite/30_threads/shared_future/members/wait.cc: Likewise.
1864 * testsuite/30_threads/shared_future/members/wait_for.cc: Likewise.
1865 * testsuite/30_threads/shared_future/members/wait_until.cc: Likewise.
1866 * testsuite/30_threads/shared_lock/cons/1.cc: Likewise.
1867 * testsuite/30_threads/shared_lock/cons/2.cc: Likewise.
1868 * testsuite/30_threads/shared_lock/cons/3.cc: Likewise.
1869 * testsuite/30_threads/shared_lock/cons/4.cc: Likewise.
1870 * testsuite/30_threads/shared_lock/cons/5.cc: Likewise.
1871 * testsuite/30_threads/shared_lock/cons/6.cc: Likewise.
1872 * testsuite/30_threads/shared_lock/locking/1.cc: Likewise.
1873 * testsuite/30_threads/shared_lock/locking/2.cc: Likewise.
1874 * testsuite/30_threads/shared_lock/locking/3.cc: Likewise.
1875 * testsuite/30_threads/shared_lock/locking/4.cc: Likewise.
1876 * testsuite/30_threads/shared_lock/modifiers/1.cc: Likewise.
1877 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
1878 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
1879 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
1880 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
1881 * testsuite/30_threads/shared_timed_mutex/cons/1.cc: Likewise.
1882 * testsuite/30_threads/shared_timed_mutex/try_lock/1.cc: Likewise.
1883 * testsuite/30_threads/shared_timed_mutex/try_lock/2.cc: Likewise.
1884 * testsuite/30_threads/shared_timed_mutex/try_lock/3.cc: Likewise.
1885 * testsuite/30_threads/shared_timed_mutex/unlock/1.cc: Likewise.
1886 * testsuite/30_threads/this_thread/1.cc: Likewise.
1887 * testsuite/30_threads/this_thread/sleep_for-mt.cc: Likewise.
1888 * testsuite/30_threads/this_thread/sleep_until-mt.cc: Likewise.
1889 * testsuite/30_threads/thread/cons/1.cc: Likewise.
1890 * testsuite/30_threads/thread/cons/2.cc: Likewise.
1891 * testsuite/30_threads/thread/cons/3.cc: Likewise.
1892 * testsuite/30_threads/thread/cons/4.cc: Likewise.
1893 * testsuite/30_threads/thread/cons/49668.cc: Likewise.
1894 * testsuite/30_threads/thread/cons/5.cc: Likewise.
1895 * testsuite/30_threads/thread/cons/6.cc: Likewise.
1896 * testsuite/30_threads/thread/cons/7.cc: Likewise.
1897 * testsuite/30_threads/thread/cons/8.cc: Likewise.
1898 * testsuite/30_threads/thread/cons/9.cc: Likewise.
1899 * testsuite/30_threads/thread/cons/moveable.cc: Likewise.
1900 * testsuite/30_threads/thread/cons/terminate.cc: Likewise.
1901 * testsuite/30_threads/thread/members/1.cc: Likewise.
1902 * testsuite/30_threads/thread/members/2.cc: Likewise.
1903 * testsuite/30_threads/thread/members/3.cc: Likewise.
1904 * testsuite/30_threads/thread/members/4.cc: Likewise.
1905 * testsuite/30_threads/thread/members/5.cc: Likewise.
1906 * testsuite/30_threads/thread/members/hardware_concurrency.cc:
1908 * testsuite/30_threads/thread/native_handle/typesizes.cc: Likewise.
1909 * testsuite/30_threads/thread/swap/1.cc: Likewise.
1910 * testsuite/30_threads/timed_mutex/cons/1.cc: Likewise.
1911 * testsuite/30_threads/timed_mutex/dest/destructor_locked.cc:
1913 * testsuite/30_threads/timed_mutex/lock/1.cc: Likewise.
1914 * testsuite/30_threads/timed_mutex/native_handle/1.cc: Likewise.
1915 * testsuite/30_threads/timed_mutex/native_handle/typesizes.cc:
1917 * testsuite/30_threads/timed_mutex/try_lock/1.cc: Likewise.
1918 * testsuite/30_threads/timed_mutex/try_lock/2.cc: Likewise.
1919 * testsuite/30_threads/timed_mutex/try_lock_for/1.cc: Likewise.
1920 * testsuite/30_threads/timed_mutex/try_lock_for/2.cc: Likewise.
1921 * testsuite/30_threads/timed_mutex/try_lock_for/3.cc: Likewise.
1922 * testsuite/30_threads/timed_mutex/try_lock_until/1.cc: Likewise.
1923 * testsuite/30_threads/timed_mutex/try_lock_until/2.cc: Likewise.
1924 * testsuite/30_threads/timed_mutex/try_lock_until/57641.cc: Likewise.
1925 * testsuite/30_threads/timed_mutex/unlock/1.cc: Likewise.
1926 * testsuite/30_threads/timed_mutex/unlock/2.cc: Likewise.
1927 * testsuite/30_threads/try_lock/1.cc: Likewise.
1928 * testsuite/30_threads/try_lock/2.cc: Likewise.
1929 * testsuite/30_threads/try_lock/3.cc: Likewise.
1930 * testsuite/30_threads/try_lock/4.cc: Likewise.
1931 * testsuite/30_threads/unique_lock/cons/1.cc: Likewise.
1932 * testsuite/30_threads/unique_lock/cons/2.cc: Likewise.
1933 * testsuite/30_threads/unique_lock/cons/3.cc: Likewise.
1934 * testsuite/30_threads/unique_lock/cons/4.cc: Likewise.
1935 * testsuite/30_threads/unique_lock/cons/5.cc: Likewise.
1936 * testsuite/30_threads/unique_lock/cons/6.cc: Likewise.
1937 * testsuite/30_threads/unique_lock/locking/1.cc: Likewise.
1938 * testsuite/30_threads/unique_lock/locking/2.cc: Likewise.
1939 * testsuite/30_threads/unique_lock/locking/3.cc: Likewise.
1940 * testsuite/30_threads/unique_lock/locking/4.cc: Likewise.
1941 * testsuite/30_threads/unique_lock/modifiers/1.cc: Likewise.
1943 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
1946 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Do not
1947 test "cold" on darwin.
1948 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
1950 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
1952 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
1954 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
1957 2020-08-21 Jonathan Wakely <jwakely@redhat.com>
1960 * testsuite/25_algorithms/pstl/feature_test-2.cc: Require
1961 tbb-backend effective target.
1962 * testsuite/25_algorithms/pstl/feature_test-3.cc: Likewise.
1963 * testsuite/25_algorithms/pstl/feature_test-5.cc: Likewise.
1964 * testsuite/25_algorithms/pstl/feature_test.cc: Likewise.
1966 2020-08-20 Jonathan Wakely <jwakely@redhat.com>
1968 * include/bits/iterator_concepts.h [__STRICT_ANSI__]
1969 (incrementable_traits<__int128>): Define specialization.
1970 (incrementable_traits<unsigned __int128>): Likewise.
1971 * testsuite/std/ranges/iota/96042.cc: Test iota_view with
1974 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
1975 Patrick Palka <ppalka@redhat.com>
1978 * include/bits/range_access.h (__detail::__to_unsigned_like):
1979 Do not use make_unsigned_t<T> in the return type, as it can
1980 result in an error before the integral<T> constraint is checked.
1981 [__STRICT_ANSI__]: Add overloads for 128-bit integer types.
1982 (__detail::__make_unsigned_like_t): Define as the return type
1983 of __to_unsigned_like.
1984 * testsuite/std/ranges/subrange/96042.cc: New test.
1986 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
1988 * include/bits/stl_tree.h (operator!=, operator>, operator<=)
1989 (operator>=): Remove deprecated functions.
1991 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
1994 * include/ext/numeric_traits.h (__is_integer_nonstrict): New
1995 trait which is true for 128-bit integers even in strict modes.
1996 (__numeric_traits_integer, __numeric_traits): Use
1997 __is_integer_nonstrict instead of __is_integer.
1998 * include/std/limits [__STRICT_ANSI__ && __SIZEOF_INT128__]
1999 (numeric_limits<__int128>, (numeric_limits<unsigned __int128>):
2001 * testsuite/std/ranges/iota/96042.cc: New test.
2003 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2005 * include/bits/c++config (_GLIBCXX_DEPRECATED_SUGGEST)
2006 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST)
2007 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
2008 Add new macros to comment.
2010 2020-08-19 Patrick Palka <ppalka@redhat.com>
2012 * include/Makefile.am (bits_headers): Add new header
2013 <bits/max_size_type.h>.
2014 * include/Makefile.in: Regenerate.
2015 * include/bits/iterator_concepts.h
2016 (ranges::__detail::__max_diff_type): Remove definition, replace
2017 with forward declaration of class __max_diff_type.
2018 (__detail::__max_size_type): Remove definition, replace with
2019 forward declaration of class __max_size_type.
2020 (__detail::__is_unsigned_int128, __is_signed_int128)
2021 (__is_int128): New concepts.
2022 (__detail::__is_integer_like): Accept __int128 and unsigned
2024 (__detail::__is_signed_integer_like): Accept __int128.
2025 * include/bits/max_size_type.h: New header.
2026 * include/bits/range_access.h: Include <bits/max_size_type.h>.
2027 (__detail::__to_unsigned_like): Two new overloads.
2028 * testsuite/std/ranges/iota/difference_type.cc: New test.
2029 * testsuite/std/ranges/iota/max_size_type.cc: New test.
2031 2020-08-19 Jonathan Wakely <jwakely@redhat.com>
2033 * include/bits/c++config (_GLIBCXX_DEPRECATED): Define for all
2035 (_GLIBCXX_DEPRECATED_SUGGEST): New macro for "use 'foo' instead"
2036 message in deprecated warnings.
2037 (_GLIBCXX11_DEPRECATED, _GLIBCXX11_DEPRECATED_SUGGEST): New
2038 macros for marking features deprecated in C++11.
2039 (_GLIBCXX17_DEPRECATED_SUGGEST, _GLIBCXX20_DEPRECATED_SUGGEST):
2041 * include/backward/auto_ptr.h (auto_ptr_ref, auto_ptr<void>):
2042 Use _GLIBCXX11_DEPRECATED instead of _GLIBCXX_DEPRECATED.
2043 (auto_ptr): Use _GLIBCXX11_DEPRECATED_SUGGEST.
2044 * include/backward/binders.h (binder1st, binder2nd): Likewise.
2045 * include/bits/ios_base.h (io_state, open_mode, seek_dir)
2046 (streampos, streamoff): Use _GLIBCXX_DEPRECATED_SUGGEST.
2047 * include/std/streambuf (stossc): Replace C++11 attribute
2048 with _GLIBCXX_DEPRECATED_SUGGEST.
2049 * include/std/type_traits (__is_nullptr_t): Use
2050 _GLIBCXX_DEPRECATED_SUGGEST instead of _GLIBCXX_DEPRECATED.
2051 * testsuite/27_io/types/1.cc: Check for deprecated warnings.
2052 Also check for io_state, open_mode and seek_dir typedefs.
2054 2020-08-19 Antony Polukhin <antoshkka@gmail.com>
2057 * include/std/type_traits (invoke_result, is_nothrow_invocable_r)
2058 Add static_asserts to make sure that the argument of the type
2059 trait is not misused with incomplete types.
2060 (is_swappable_with, is_nothrow_swappable_with): Add static_asserts
2061 to make sure that the first and second arguments of the type trait
2062 are not misused with incomplete types.
2063 * testsuite/20_util/invoke_result/incomplete_neg.cc: New test.
2064 * testsuite/20_util/is_nothrow_invocable/incomplete_neg.cc: New test.
2065 * testsuite/20_util/is_nothrow_swappable/incomplete_neg.cc: New test.
2066 * testsuite/20_util/is_nothrow_swappable_with/incomplete_neg.cc: New
2068 * testsuite/20_util/is_swappable_with/incomplete_neg.cc: New test.
2070 2020-08-18 David Edelsohn <dje.gcc@gmail.com>
2071 Clement Chigot <clement.chigot@atos.net>
2073 * config/os/aix/t-aix: Add complementary mode object files to
2076 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
2078 * testsuite/17_intro/headers/c++1998/all_attributes.cc: Check
2079 "cold" isn't used in the library. Also check <cxxabi.h>.
2080 * testsuite/17_intro/headers/c++2011/all_attributes.cc:
2082 * testsuite/17_intro/headers/c++2014/all_attributes.cc:
2084 * testsuite/17_intro/headers/c++2017/all_attributes.cc:
2086 * testsuite/17_intro/headers/c++2020/all_attributes.cc:
2089 2020-08-18 Jonathan Wakely <jwakely@redhat.com>
2092 * include/std/future (__future_base::_S_make_deferred_state)
2093 (__future_base::_S_make_async_state): Remove.
2094 (__future_base::_Deferred_state): Change constructor to accept a
2095 parameter pack of arguments and forward them to the call
2097 (__future_base::_Async_state_impl): Likewise. Replace lambda
2098 expression with a named member function.
2099 (async): Construct state object directly from the arguments,
2100 instead of using thread::__make_invoker, _S_make_deferred_state
2101 and _S_make_async_state. Move shared state into the returned
2103 * include/std/thread (thread::_Call_wrapper): New alias
2104 template for use by constructor and std::async.
2105 (thread::thread(Callable&&, Args&&...)): Create state object
2106 directly instead of using _S_make_state.
2107 (thread::__make_invoker, thread::__decayed_tuple)
2108 (thread::_S_make_state): Remove.
2109 * testsuite/30_threads/async/69724.cc: New test.
2111 2020-08-17 Jonathan Wakely <jwakely@redhat.com>
2116 * include/std/tuple [__has_cpp_attribute(no_unique_address)]
2117 (_Head_base<Idx, Head, true>): New definition of the partial
2118 specialization, using [[no_unique_address]] instead of
2120 * testsuite/libstdc++-prettyprinters/48362.cc: Adjust expected
2122 * testsuite/20_util/tuple/comparison_operators/93147.cc: New test.
2123 * testsuite/20_util/tuple/creation_functions/55713.cc: New test.
2124 * testsuite/20_util/tuple/element_access/71096.cc: New test.
2126 2020-08-14 Lewis Hyatt <lhyatt@gmail.com>
2128 * testsuite/lib/libstdc++.exp: Use the new option
2129 -fdiagnostics-plain-output.
2131 2020-08-13 Jonathan Wakely <jwakely@redhat.com>
2133 * acinclude.m4 (GLIBCXX_ENABLE_CHEADERS): Warn if the c_std
2134 option is used and fail unless --enable-cheaders-obsolete is
2136 * configure: Regenerate.
2138 2020-08-12 Jonathan Wakely <jwakely@redhat.com>
2141 * include/bits/basic_string.h (operator=(basic_string&&)): Check
2142 for self-move before copying with char_traits::copy.
2143 * include/bits/hashtable.h (operator=(_Hashtable&&)): Check for
2145 * include/bits/stl_deque.h (_M_move_assign1(deque&&, false_type)):
2146 Check for equal allocators.
2147 * include/bits/stl_list.h (_M_move_assign(list&&, true_type)):
2148 Call clear() instead of _M_clear().
2149 * include/debug/formatter.h (__msg_self_move_assign): Change
2151 * include/debug/macros.h (__glibcxx_check_self_move_assign):
2152 (_GLIBCXX_DEBUG_VERIFY): Remove.
2153 * include/debug/safe_container.h (operator=(_Safe_container&&)):
2154 Remove assertion check for safe move and make it well-defined.
2155 * include/debug/safe_iterator.h (operator=(_Safe_iterator&&)):
2156 Remove assertion check for self-move.
2157 * include/debug/safe_local_iterator.h
2158 (operator=(_Safe_local_iterator&&)): Likewise.
2159 * testsuite/21_strings/basic_string/cons/char/self_move.cc: New test.
2160 * testsuite/23_containers/deque/cons/self_move.cc: New test.
2161 * testsuite/23_containers/forward_list/cons/self_move.cc: New test.
2162 * testsuite/23_containers/list/cons/self_move.cc: New test.
2163 * testsuite/23_containers/set/cons/self_move.cc: New test.
2164 * testsuite/23_containers/unordered_set/cons/self_move.cc: New test.
2165 * testsuite/23_containers/vector/cons/self_move.cc: New test.
2167 2020-08-11 François Dumont <fdumont@gcc.gnu.org>
2170 * include/bits/forward_list.tcc (forward_list<>::remove): Collect nodes
2171 to destroy in an intermediate forward_list.
2172 (forward_list<>::remove_if, forward_list<>::unique): Likewise.
2173 * include/bits/list.tcc (list<>::remove, list<>::unique): Likewise.
2174 (list<>::remove_if): Likewise.
2175 * include/debug/forward_list (forward_list<>::_M_erase_after): Remove.
2176 (forward_list<>::erase_after): Adapt.
2177 (forward_list<>::remove, forward_list<>::remove_if): Collect nodes to
2178 destroy in an intermediate forward_list.
2179 (forward_list<>::unique): Likewise.
2180 * include/debug/list (list<>::remove, list<>::unique): Likewise.
2181 (list<>::remove_if): Likewise.
2182 * testsuite/23_containers/forward_list/operations/91620.cc: New test.
2183 * testsuite/23_containers/list/operations/91620.cc: New test.
2185 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2187 * testsuite/30_threads/thread/cons/84535.cc: Use a custom
2189 * testsuite/30_threads/thread/cons/lwg2097.cc: Likewise.
2191 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2194 * include/experimental/executor [!_GLIBCXX_HAS_GTHREADS]:
2195 (execution_context::mutex_type): Define dummy mutex type.
2196 (system_context): Use execution_context::mutex_type.
2197 (system_context) [!_GLIBCXX_HAS_GTHREADS]: Define dummy
2198 thread and condition variable types.
2199 [!_GLIBCXX_HAS_GTHREADS] (system_context::_M_run()): Do not
2201 (system_context::_M_post) [!_GLIBCXX_HAS_GTHREADS]: Throw
2202 an exception when threads aren't available.
2203 (strand::running_in_this_thread()): Defer to _M_state.
2204 (strand::_State::running_in_this_thread()): New function.
2205 (use_future_t): Do not depend on _GLIBCXX_USE_C99_STDINT_TR1.
2206 * include/experimental/io_context (io_context): Use the
2207 execution_context::mutex_type alias. Replace stack of thread
2209 * testsuite/experimental/net/execution_context/use_service.cc:
2210 Enable test for non-pthread targets.
2212 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2214 * include/experimental/executor (system_context::a__tag): Make
2215 default constructor explicit.
2217 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2219 * include/experimental/executor (system_context::_M_run()):
2221 * testsuite/experimental/net/system_context/1.cc: New test.
2223 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2225 * include/std/stop_token: Check _GLIBCXX_HAS_GTHREADS using
2226 #ifdef instead of #if.
2227 (stop_token::_S_yield()): Check _GLIBCXX_HAS_GTHREADS before
2228 using __gthread_yield.
2230 2020-08-11 Jonathan Wakely <jwakely@redhat.com>
2232 * include/std/thread [!_GLIBCXX_HAS_GTHREADS] (this_thread::yield)
2233 (this_thread::sleep_until): Define.
2234 [!_GLIBCXX_HAS_GTHREADS] (this_thread::sleep_for): Define. Replace
2235 use of __gthread_time_t typedef with timespec.
2236 * src/c++11/thread.cc [!_GLIBCXX_HAS_GTHREADS] (__sleep_for):
2238 * testsuite/30_threads/this_thread/2.cc: Moved to...
2239 * testsuite/30_threads/this_thread/yield.cc: ...here.
2240 * testsuite/30_threads/this_thread/3.cc: Moved to...
2241 * testsuite/30_threads/this_thread/sleep_for-mt.cc: ...here.
2242 * testsuite/30_threads/this_thread/4.cc: Moved to...
2243 * testsuite/30_threads/this_thread/sleep_until-mt.cc: ...here.
2244 * testsuite/30_threads/this_thread/58038.cc: Add
2246 * testsuite/30_threads/this_thread/60421.cc: Likewise.
2247 * testsuite/30_threads/this_thread/sleep_for.cc: New test.
2248 * testsuite/30_threads/this_thread/sleep_until.cc: New test.
2250 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2253 * src/c++17/fs_ops.cc (read_symlink): Use posix::lstat instead
2254 of calling ::lstat directly.
2255 * src/filesystem/ops.cc (read_symlink): Likewise.
2257 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2259 * python/libstdcxx/v6/printers.py (UniquePointerPrinter.__init__):
2260 Use gdb.Type.strip_typedefs().
2261 * testsuite/libstdc++-prettyprinters/compat.cc: Use a typedef in
2262 the emulated old type.
2264 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2267 * acinclude.m4 (GLIBCXX_CHECK_FILESYSTEM_DEPS): Do not depend on
2268 $enable_libstdcxx_filesystem_ts.
2269 * configure: Regenerate.
2271 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2274 * include/bits/stl_iterator.h (inserter): Do not deduce
2275 iterator type (LWG 561).
2276 * testsuite/24_iterators/insert_iterator/dr561.cc: New test.
2278 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2280 * include/bits/basic_string.tcc [_GLIBCXX_USE_CXX11_ABI=0]
2281 (basic_string::reserve()): Do nothing if exceptions are not
2284 2020-08-10 Jonathan Wakely <jwakely@redhat.com>
2287 * src/filesystem/ops-common.h [_GLIBCXX_FILESYSTEM_IS_WINDOWS]
2288 (stat_type): Change to __stat64.
2289 (stat): Use _wstat64.
2291 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2294 * include/debug/bitset (bitset::operator==): Call _M_base() on
2296 (bitset::operator!=): Likewise, but don't define it at all when
2297 default comparisons are supported by the compiler.
2298 * testsuite/23_containers/bitset/operations/96303.cc: New test.
2300 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2302 * testsuite/18_support/comparisons/algorithms/partial_order.cc:
2303 Replace VERIFY with static_assert where the compiler now
2305 * testsuite/18_support/comparisons/algorithms/weak_order.cc:
2308 2020-08-07 Jonathan Wakely <jwakely@redhat.com>
2310 * config/abi/pre/gnu.ver: Fix wildcards for wstring symbols.
2312 2020-08-06 Andrew Luo <andrewluotechnologies@outlook.com>
2313 Jonathan Wakely <jwakely@redhat.com>
2315 * config/abi/pre/gnu.ver (GLIBCXX_3.4): Use less greedy
2316 patterns for basic_string members.
2317 (GLIBCXX_3.4.29): Export new basic_string::reserve symbols.
2318 * doc/xml/manual/status_cxx2020.xml: Update P0966 status.
2319 * include/bits/basic_string.h (shrink_to_fit()): Call reserve().
2320 (reserve(size_type)): Remove default argument.
2321 (reserve()): Declare new overload.
2322 [!_GLIBCXX_USE_CXX11_ABI] (shrink_to_fit, reserve): Likewise.
2323 * include/bits/basic_string.tcc (reserve(size_type)): Remove
2324 support for shrinking capacity.
2325 (reserve()): Perform shrink-to-fit operation.
2326 [!_GLIBCXX_USE_CXX11_ABI] (reserve): Likewise.
2327 * testsuite/21_strings/basic_string/capacity/1.cc: Adjust to
2328 reflect new behavior.
2329 * testsuite/21_strings/basic_string/capacity/char/1.cc:
2331 * testsuite/21_strings/basic_string/capacity/char/18654.cc:
2333 * testsuite/21_strings/basic_string/capacity/char/2.cc:
2335 * testsuite/21_strings/basic_string/capacity/wchar_t/1.cc:
2337 * testsuite/21_strings/basic_string/capacity/wchar_t/18654.cc:
2339 * testsuite/21_strings/basic_string/capacity/wchar_t/2.cc:
2342 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
2344 * include/bits/basic_string.tcc
2345 (operator>>(basic_istream&, basic_string&)): Do not set eofbit
2346 if extraction stopped after in.width() characters.
2347 * src/c++98/istream-string.cc (operator>>(istream&, string&)):
2349 * include/bits/istream.tcc (__istream_extract): Do not set
2350 eofbit if extraction stopped after n-1 characters.
2351 * src/c++98/istream.cc (__istream_extract): Likewise.
2352 * testsuite/21_strings/basic_string/inserters_extractors/char/13.cc: New test.
2353 * testsuite/21_strings/basic_string/inserters_extractors/wchar_t/13.cc: New test.
2354 * testsuite/27_io/basic_istream/extractors_character/char/5.cc: New test.
2355 * testsuite/27_io/basic_istream/extractors_character/wchar_t/5.cc: New test.
2357 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
2360 * src/c++17/fs_ops.cc (fs::read_symlink): Return an error
2361 immediately for non-symlinks.
2362 * src/filesystem/ops.cc (fs::read_symlink): Likewise.
2364 2020-08-06 Jonathan Wakely <jwakely@redhat.com>
2366 * include/std/istream (operator>>(istream&, char*)): Add
2367 attributes to get warnings for pointers that are null or known
2368 to point to the end of a buffer. Request upper bound from
2369 __builtin_object_size check and handle zero-sized buffer case.
2370 (operator>>(istream&, signed char))
2371 (operator>>(istream&, unsigned char*)): Add attributes.
2372 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
2373 Check extracting into the middle of a buffer.
2374 * testsuite/27_io/basic_istream/extractors_character/wchar_t/overflow.cc: New test.
2376 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
2378 * include/std/atomic (atomic<T>::store): Reformat.
2380 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
2382 * doc/xml/manual/status_cxx2017.xml: Replace oneAPI DPC++ link
2383 with LLVM repo for PSTL.
2384 * doc/html/manual/status.html: Regenerate.
2386 2020-08-05 Jonathan Wakely <jwakely@redhat.com>
2388 * config/abi/pre/gnu.ver (GLIBCXX_3.4.29): Export new symbols.
2389 * include/bits/istream.tcc (__istream_extract): New function
2390 template implementing both of operator>>(istream&, char*) and
2391 operator>>(istream&, char(&)[N]). Add explicit instantiation
2392 declaration for it. Remove explicit instantiation declarations
2393 for old function templates.
2394 * include/std/istream (__istream_extract): Declare.
2395 (operator>>(basic_istream<C,T>&, C*)): Define inline and simply
2396 call __istream_extract.
2397 (operator>>(basic_istream<char,T>&, signed char*)): Likewise.
2398 (operator>>(basic_istream<char,T>&, unsigned char*)): Likewise.
2399 (operator>>(basic_istream<C,T>&, C(7)[N])): Define for LWG 2499.
2400 (operator>>(basic_istream<char,T>&, signed char(&)[N])):
2402 (operator>>(basic_istream<char,T>&, unsigned char(&)[N])):
2404 * include/std/streambuf (basic_streambuf): Declare char overload
2405 of __istream_extract as a friend.
2406 * src/c++11/istream-inst.cc: Add explicit instantiation
2407 definition for wchar_t overload of __istream_extract. Remove
2408 explicit instantiation definitions of old operator>> overloads
2409 for versioned-namespace build.
2410 * src/c++98/istream.cc (operator>>(istream&, char*)): Replace
2411 with __istream_extract(istream&, char*, streamsize).
2412 * testsuite/27_io/basic_istream/extractors_character/char/3.cc:
2413 Do not use variable-length array.
2414 * testsuite/27_io/basic_istream/extractors_character/char/4.cc:
2415 Do not run test for C++20.
2416 * testsuite/27_io/basic_istream/extractors_character/char/9555-ic.cc:
2417 Do not test writing to pointers for C++20.
2418 * testsuite/27_io/basic_istream/extractors_character/char/9826.cc:
2419 Use array instead of pointer.
2420 * testsuite/27_io/basic_istream/extractors_character/wchar_t/3.cc:
2421 Do not use variable-length array.
2422 * testsuite/27_io/basic_istream/extractors_character/wchar_t/4.cc:
2423 Do not run test for C++20.
2424 * testsuite/27_io/basic_istream/extractors_character/wchar_t/9555-ic.cc:
2425 Do not test writing to pointers for C++20.
2426 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499.cc:
2428 * testsuite/27_io/basic_istream/extractors_character/char/lwg2499_neg.cc:
2430 * testsuite/27_io/basic_istream/extractors_character/char/overflow.cc:
2432 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499.cc:
2434 * testsuite/27_io/basic_istream/extractors_character/wchar_t/lwg2499_neg.cc:
2437 2020-08-01 Gerald Pfeifer <gerald@pfeifer.com>
2439 * doc/xml/manual/using_exceptions.xml: Move www.stroustrup.com to
2441 * doc/html/manual/using_exceptions.html: Regenerate.
2443 2020-07-31 Gerald Pfeifer <gerald@pfeifer.com>
2445 * doc/xml/manual/status_cxx2017.xml: ParallelSTL is now part
2446 of oneAPI DPC++ Library on Github.
2447 * doc/html/manual/status.html: Regenerate.
2449 2020-07-31 François Dumont <fdumont@gcc.gnu.org>
2451 * include/bits/stl_bvector.h
2452 [_GLIBCXX_INLINE_VERSION](_Bvector_impl_data::_M_start): Define as
2454 (_Bvector_impl_data(const _Bvector_impl_data&)): Default.
2455 (_Bvector_impl_data(_Bvector_impl_data&&)): Delegate to latter.
2456 (_Bvector_impl_data::operator=(const _Bvector_impl_data&)): Default.
2457 (_Bvector_impl_data::_M_move_data(_Bvector_impl_data&&)): Use latter.
2458 (_Bvector_impl_data::_M_reset()): Likewise.
2459 (_Bvector_impl_data::_M_swap_data): New.
2460 (_Bvector_impl::_Bvector_impl(_Bvector_impl&&)): Implement explicitely.
2461 (_Bvector_impl::_Bvector_impl(_Bit_alloc_type&&, _Bvector_impl&&)): New.
2462 (_Bvector_base::_Bvector_base(_Bvector_base&&, const allocator_type&)):
2464 (vector::vector(vector&&, const allocator_type&, true_type)): New, use
2466 (vector::vector(vector&&, const allocator_type&, false_type)): New.
2467 (vector::vector(vector&&, const allocator_type&)): Use latters.
2468 (vector::vector(const vector&, const allocator_type&)): Adapt.
2469 [__cplusplus >= 201103](vector::vector(_InputIt, _InputIt,
2470 const allocator_type&)): Use _M_initialize_range.
2471 (vector::operator[](size_type)): Use iterator operator[].
2472 (vector::operator[](size_type) const): Use const_iterator operator[].
2473 (vector::swap(vector&)): Add assertions on allocators. Use _M_swap_data.
2474 [__cplusplus >= 201103](vector::insert(const_iterator, _InputIt,
2475 _InputIt)): Use _M_insert_range.
2476 (vector::_M_initialize(size_type)): Adapt.
2477 [__cplusplus >= 201103](vector::_M_initialize_dispatch): Remove.
2478 [__cplusplus >= 201103](vector::_M_insert_dispatch): Remove.
2479 * python/libstdcxx/v6/printers.py (StdVectorPrinter._iterator): Stop
2480 using start _M_offset.
2481 (StdVectorPrinter.to_string): Likewise.
2482 * testsuite/23_containers/vector/bool/allocator/swap.cc: Adapt.
2483 * testsuite/23_containers/vector/bool/cons/noexcept_move_construct.cc:
2486 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2488 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Use 0
2490 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
2493 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2495 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
2496 Move struct to namespace scope.
2498 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2500 * testsuite/26_numerics/numbers/float128.cc: Check
2501 __STRICT_ANSI__ before using __float128.
2502 * testsuite/std/concepts/concepts.lang/concept.arithmetic/floating_point.cc:
2505 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2507 * testsuite/18_support/set_terminate.cc: Require C++11 or
2509 * testsuite/28_regex/simple_c++11.cc: Likewise.
2510 * testsuite/tr1/headers/c++200x/complex.cc: Likewise.
2511 * testsuite/24_iterators/headers/iterator/synopsis.cc:
2512 Require C++14 or lower.
2514 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2516 * testsuite/23_containers/span/back_assert_neg.cc: Split c++2a
2517 effective-target from xfail selector.
2518 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
2519 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
2520 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
2521 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
2522 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
2523 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
2524 * testsuite/23_containers/span/subspan_2_assert_neg.cc:
2526 * testsuite/23_containers/span/subspan_3_assert_neg.cc:
2528 * testsuite/23_containers/span/subspan_4_assert_neg.cc:
2530 * testsuite/23_containers/span/subspan_5_assert_neg.cc:
2532 * testsuite/23_containers/span/subspan_6_assert_neg.cc:
2534 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
2536 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2538 * testsuite/20_util/reference_wrapper/83427.cc: Adjust
2539 effective-target to specific language mode only.
2540 * testsuite/24_iterators/headers/iterator/range_access_c++11.cc:
2542 * testsuite/24_iterators/headers/iterator/range_access_c++14.cc:
2544 * testsuite/24_iterators/headers/iterator/synopsis_c++11.cc:
2546 * testsuite/24_iterators/headers/iterator/synopsis_c++14.cc:
2548 * testsuite/26_numerics/valarray/69116.cc:
2550 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
2551 Remove whitespace at end of file.
2552 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
2555 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2557 * testsuite/17_intro/headers/c++2017/all_attributes.cc: Add
2558 c++17 effective-target.
2559 * testsuite/17_intro/headers/c++2017/all_no_exceptions.cc:
2561 * testsuite/17_intro/headers/c++2017/all_no_rtti.cc: Likewise.
2562 * testsuite/17_intro/headers/c++2017/all_pedantic_errors.cc:
2564 * testsuite/17_intro/headers/c++2017/operator_names.cc:
2566 * testsuite/17_intro/headers/c++2017/stdc++.cc: Likewise.
2567 * testsuite/17_intro/headers/c++2017/stdc++_multiple_inclusion.cc:
2569 * testsuite/18_support/uncaught_exceptions/uncaught_exceptions.cc:
2571 * testsuite/19_diagnostics/error_code/is_error_code_v.cc:
2573 * testsuite/20_util/any/assign/1.cc: Likewise.
2574 * testsuite/20_util/any/assign/2.cc: Likewise.
2575 * testsuite/20_util/any/assign/emplace.cc: Likewise.
2576 * testsuite/20_util/any/assign/exception.cc: Likewise.
2577 * testsuite/20_util/any/assign/self.cc: Likewise.
2578 * testsuite/20_util/any/cons/1.cc: Likewise.
2579 * testsuite/20_util/any/cons/2.cc: Likewise.
2580 * testsuite/20_util/any/cons/aligned.cc: Likewise.
2581 * testsuite/20_util/any/cons/explicit.cc: Likewise.
2582 * testsuite/20_util/any/cons/in_place.cc: Likewise.
2583 * testsuite/20_util/any/cons/nontrivial.cc: Likewise.
2584 * testsuite/20_util/any/make_any.cc: Likewise.
2585 * testsuite/20_util/any/misc/any_cast.cc: Likewise.
2586 * testsuite/20_util/any/misc/any_cast_no_rtti.cc: Likewise.
2587 * testsuite/20_util/any/misc/swap.cc: Likewise.
2588 * testsuite/20_util/any/modifiers/1.cc: Likewise.
2589 * testsuite/20_util/any/observers/type.cc: Likewise.
2590 * testsuite/20_util/any/requirements.cc: Likewise.
2591 * testsuite/20_util/any/typedefs.cc: Likewise.
2592 * testsuite/20_util/as_const/1.cc: Likewise.
2593 * testsuite/20_util/as_const/rvalue_neg.cc: Likewise.
2594 * testsuite/20_util/bind/is_placeholder_v.cc: Likewise.
2595 * testsuite/20_util/bool_constant/requirements.cc: Likewise.
2596 * testsuite/20_util/duration/requirements/treat_as_floating_point_v.cc:
2598 * testsuite/20_util/duration_cast/rounding.cc: Likewise.
2599 * testsuite/20_util/enable_shared_from_this/members/weak_from_this.cc:
2601 * testsuite/20_util/function_objects/invoke/59768.cc: Likewise.
2602 * testsuite/20_util/function_objects/not_fn/1.cc: Likewise.
2603 * testsuite/20_util/function_objects/searchers.cc: Likewise.
2604 * testsuite/20_util/in_place/requirements.cc: Likewise.
2605 * testsuite/20_util/is_invocable/requirements/explicit_instantiation.cc:
2607 * testsuite/20_util/is_invocable/requirements/typedefs.cc:
2609 * testsuite/20_util/is_invocable/value.cc: Likewise.
2610 * testsuite/20_util/is_nothrow_invocable/requirements/explicit_instantiation.cc:
2612 * testsuite/20_util/is_nothrow_invocable/requirements/typedefs.cc:
2614 * testsuite/20_util/is_nothrow_swappable/requirements/explicit_instantiation.cc:
2616 * testsuite/20_util/is_nothrow_swappable/requirements/typedefs.cc:
2618 * testsuite/20_util/is_nothrow_swappable/value.cc: Likewise.
2619 * testsuite/20_util/is_nothrow_swappable_with/requirements/explicit_instantiation.cc:
2621 * testsuite/20_util/is_nothrow_swappable_with/requirements/typedefs.cc:
2623 * testsuite/20_util/is_nothrow_swappable_with/value.cc:
2625 * testsuite/20_util/is_swappable/requirements/explicit_instantiation.cc:
2627 * testsuite/20_util/is_swappable/requirements/typedefs.cc:
2629 * testsuite/20_util/is_swappable/value.cc: Likewise.
2630 * testsuite/20_util/is_swappable_with/requirements/explicit_instantiation.cc:
2632 * testsuite/20_util/is_swappable_with/requirements/typedefs.cc:
2634 * testsuite/20_util/is_swappable_with/value.cc: Likewise.
2635 * testsuite/20_util/logical_traits/requirements/explicit_instantiation.cc:
2637 * testsuite/20_util/logical_traits/requirements/typedefs.cc:
2639 * testsuite/20_util/logical_traits/value.cc: Likewise.
2640 * testsuite/20_util/optional/constexpr/make_optional.cc: Likewise.
2641 * testsuite/20_util/optional/constexpr/observers/2.cc: Likewise.
2642 * testsuite/20_util/optional/constexpr/observers/3.cc: Likewise.
2643 * testsuite/20_util/optional/hash.cc: Likewise.
2644 * testsuite/20_util/pair/swap_cxx17.cc: Likewise.
2645 * testsuite/20_util/ratio/requirements/ratio_equal_v.cc: Likewise.
2646 * testsuite/20_util/shared_ptr/requirements/weak_type.cc:
2648 * testsuite/20_util/specialized_algorithms/memory_management_tools/1.cc:
2650 * testsuite/20_util/tuple/apply/1.cc: Likewise.
2651 * testsuite/20_util/tuple/make_from_tuple/1.cc: Likewise.
2652 * testsuite/20_util/tuple/swap_cxx17.cc: Likewise.
2653 * testsuite/20_util/tuple/tuple_size_v.cc: Likewise.
2654 * testsuite/20_util/unique_ptr/specialized_algorithms/swap_cxx17.cc:
2656 * testsuite/20_util/uses_allocator/requirements/uses_allocator_v.cc:
2658 * testsuite/20_util/variant/any.cc: Likewise.
2659 * testsuite/20_util/variant/compile.cc: Likewise.
2660 * testsuite/20_util/variant/hash.cc: Likewise.
2661 * testsuite/20_util/variant/index_type.cc: Likewise.
2662 * testsuite/20_util/variant/run.cc: Likewise.
2663 * testsuite/20_util/void_t/1.cc: Likewise.
2664 * testsuite/21_strings/basic_string/79162.cc: Likewise.
2665 * testsuite/21_strings/basic_string/cons/char/7.cc: Likewise.
2666 * testsuite/21_strings/basic_string/cons/wchar_t/7.cc: Likewise.
2667 * testsuite/21_strings/basic_string/lwg2758.cc: Likewise.
2668 * testsuite/21_strings/basic_string/lwg2946.cc: Likewise.
2669 * testsuite/21_strings/basic_string/modifiers/append/char/4.cc:
2671 * testsuite/21_strings/basic_string/modifiers/append/wchar_t/4.cc:
2673 * testsuite/21_strings/basic_string/modifiers/assign/char/4.cc:
2675 * testsuite/21_strings/basic_string/modifiers/assign/wchar_t/4.cc:
2677 * testsuite/21_strings/basic_string/modifiers/insert/char/3.cc:
2679 * testsuite/21_strings/basic_string/modifiers/insert/wchar_t/3.cc:
2681 * testsuite/21_strings/basic_string/modifiers/replace/char/7.cc:
2683 * testsuite/21_strings/basic_string/modifiers/replace/wchar_t/7.cc:
2685 * testsuite/21_strings/basic_string/operations/compare/char/2.cc:
2687 * testsuite/21_strings/basic_string/operations/compare/wchar_t/2.cc:
2689 * testsuite/21_strings/basic_string/operations/data/char/2.cc:
2691 * testsuite/21_strings/basic_string/operations/data/wchar_t/2.cc:
2693 * testsuite/21_strings/basic_string/operations/find/char/5.cc:
2695 * testsuite/21_strings/basic_string/operations/find/wchar_t/5.cc:
2697 * testsuite/21_strings/basic_string/operators/char/5.cc: Likewise.
2698 * testsuite/21_strings/basic_string/operators/wchar_t/5.cc:
2700 * testsuite/21_strings/basic_string_view/capacity/1.cc: Likewise.
2701 * testsuite/21_strings/basic_string_view/cons/char/1.cc: Likewise.
2702 * testsuite/21_strings/basic_string_view/cons/char/2.cc: Likewise.
2703 * testsuite/21_strings/basic_string_view/cons/char/3.cc: Likewise.
2704 * testsuite/21_strings/basic_string_view/cons/wchar_t/1.cc:
2706 * testsuite/21_strings/basic_string_view/cons/wchar_t/2.cc:
2708 * testsuite/21_strings/basic_string_view/cons/wchar_t/3.cc:
2710 * testsuite/21_strings/basic_string_view/element_access/char/1.cc:
2712 * testsuite/21_strings/basic_string_view/element_access/char/2.cc:
2714 * testsuite/21_strings/basic_string_view/element_access/char/empty.cc:
2716 * testsuite/21_strings/basic_string_view/element_access/char/front_back.cc:
2718 * testsuite/21_strings/basic_string_view/element_access/wchar_t/1.cc:
2720 * testsuite/21_strings/basic_string_view/element_access/wchar_t/2.cc:
2722 * testsuite/21_strings/basic_string_view/element_access/wchar_t/empty.cc:
2724 * testsuite/21_strings/basic_string_view/element_access/wchar_t/front_back.cc:
2726 * testsuite/21_strings/basic_string_view/include.cc: Likewise.
2727 * testsuite/21_strings/basic_string_view/inserters/char/1.cc:
2729 * testsuite/21_strings/basic_string_view/inserters/char/2.cc:
2731 * testsuite/21_strings/basic_string_view/inserters/char/3.cc:
2733 * testsuite/21_strings/basic_string_view/inserters/pod/10081-out.cc:
2735 * testsuite/21_strings/basic_string_view/inserters/wchar_t/1.cc:
2737 * testsuite/21_strings/basic_string_view/inserters/wchar_t/2.cc:
2739 * testsuite/21_strings/basic_string_view/inserters/wchar_t/3.cc:
2741 * testsuite/21_strings/basic_string_view/literals/types-char8_t.cc:
2743 * testsuite/21_strings/basic_string_view/literals/types.cc:
2745 * testsuite/21_strings/basic_string_view/literals/values-char8_t.cc:
2747 * testsuite/21_strings/basic_string_view/literals/values.cc:
2749 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/char/1.cc:
2751 * testsuite/21_strings/basic_string_view/modifiers/remove_prefix/wchar_t/1.cc:
2753 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/char/1.cc:
2755 * testsuite/21_strings/basic_string_view/modifiers/remove_suffix/wchar_t/1.cc:
2757 * testsuite/21_strings/basic_string_view/operations/compare/char/1.cc:
2759 * testsuite/21_strings/basic_string_view/operations/compare/char/13650.cc:
2761 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/1.cc:
2763 * testsuite/21_strings/basic_string_view/operations/compare/wchar_t/13650.cc:
2765 * testsuite/21_strings/basic_string_view/operations/copy/char/1.cc:
2767 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/1.cc:
2769 * testsuite/21_strings/basic_string_view/operations/data/char/1.cc:
2771 * testsuite/21_strings/basic_string_view/operations/data/wchar_t/1.cc:
2773 * testsuite/21_strings/basic_string_view/operations/find/char/1.cc:
2775 * testsuite/21_strings/basic_string_view/operations/find/char/2.cc:
2777 * testsuite/21_strings/basic_string_view/operations/find/char/3.cc:
2779 * testsuite/21_strings/basic_string_view/operations/find/char/4.cc:
2781 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/1.cc:
2783 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/2.cc:
2785 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/3.cc:
2787 * testsuite/21_strings/basic_string_view/operations/find/wchar_t/4.cc:
2789 * testsuite/21_strings/basic_string_view/operations/rfind/char/1.cc:
2791 * testsuite/21_strings/basic_string_view/operations/rfind/char/2.cc:
2793 * testsuite/21_strings/basic_string_view/operations/rfind/char/3.cc:
2795 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/1.cc:
2797 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/2.cc:
2799 * testsuite/21_strings/basic_string_view/operations/rfind/wchar_t/3.cc:
2801 * testsuite/21_strings/basic_string_view/operations/string_conversion/1.cc:
2803 * testsuite/21_strings/basic_string_view/operations/substr/char/1.cc:
2805 * testsuite/21_strings/basic_string_view/operations/substr/wchar_t/1.cc:
2807 * testsuite/21_strings/basic_string_view/range_access/char/1.cc:
2809 * testsuite/21_strings/basic_string_view/range_access/wchar_t/1.cc:
2811 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/1.cc:
2813 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char/1.cc:
2815 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char16_t/1.cc:
2817 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char32_t/1.cc:
2819 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/char8_t/1.cc:
2821 * testsuite/21_strings/basic_string_view/requirements/explicit_instantiation/wchar_t/1.cc:
2823 * testsuite/21_strings/basic_string_view/requirements/typedefs.cc:
2825 * testsuite/21_strings/basic_string_view/typedefs.cc: Likewise.
2826 * testsuite/21_strings/basic_string_view/types/1.cc: Likewise.
2827 * testsuite/23_containers/array/specialized_algorithms/swap_cxx17.cc:
2829 * testsuite/23_containers/map/modifiers/extract.cc: Likewise.
2830 * testsuite/23_containers/map/modifiers/insert_or_assign/1.cc:
2832 * testsuite/23_containers/map/modifiers/merge.cc: Likewise.
2833 * testsuite/23_containers/map/modifiers/try_emplace/1.cc: Likewise.
2834 * testsuite/23_containers/multimap/modifiers/extract.cc: Likewise.
2835 * testsuite/23_containers/multimap/modifiers/merge.cc: Likewise.
2836 * testsuite/23_containers/multiset/modifiers/extract.cc: Likewise.
2837 * testsuite/23_containers/multiset/modifiers/merge.cc: Likewise.
2838 * testsuite/23_containers/set/modifiers/extract.cc: Likewise.
2839 * testsuite/23_containers/set/modifiers/merge.cc: Likewise.
2840 * testsuite/23_containers/unordered_map/modifiers/extract.cc:
2842 * testsuite/23_containers/unordered_map/modifiers/insert_or_assign.cc:
2844 * testsuite/23_containers/unordered_map/modifiers/merge.cc:
2846 * testsuite/23_containers/unordered_map/modifiers/try_emplace.cc:
2848 * testsuite/23_containers/unordered_multimap/modifiers/extract.cc:
2850 * testsuite/23_containers/unordered_multimap/modifiers/merge.cc:
2852 * testsuite/23_containers/unordered_multiset/modifiers/extract.cc:
2854 * testsuite/23_containers/unordered_multiset/modifiers/merge.cc:
2856 * testsuite/23_containers/unordered_set/modifiers/extract.cc:
2858 * testsuite/23_containers/unordered_set/modifiers/merge.cc:
2860 * testsuite/24_iterators/headers/iterator/range_access_c++17.cc:
2862 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc:
2864 * testsuite/25_algorithms/clamp/1.cc: Likewise.
2865 * testsuite/25_algorithms/clamp/2.cc: Likewise.
2866 * testsuite/25_algorithms/clamp/constexpr.cc: Likewise.
2867 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/1.cc:
2869 * testsuite/25_algorithms/clamp/requirements/explicit_instantiation/pod.cc:
2871 * testsuite/26_numerics/headers/cmath/functions_std_c++17.cc:
2873 * testsuite/26_numerics/headers/cmath/special_functions_global.cc:
2875 * testsuite/27_io/basic_ostream/inserters_other/char/lwg2221.cc:
2877 * testsuite/29_atomics/atomic/is_always_lock_free.cc: Likewise.
2878 * testsuite/29_atomics/atomic_integral/is_always_lock_free.cc:
2880 * testsuite/30_threads/shared_lock/70766.cc: Likewise.
2881 * testsuite/30_threads/shared_mutex/cons/1.cc: Likewise.
2882 * testsuite/30_threads/shared_mutex/cons/assign_neg.cc:
2884 * testsuite/30_threads/shared_mutex/cons/copy_neg.cc:
2886 * testsuite/30_threads/shared_mutex/requirements/standard_layout.cc:
2888 * testsuite/30_threads/shared_mutex/try_lock/1.cc: Likewise.
2889 * testsuite/30_threads/shared_mutex/try_lock/2.cc: Likewise.
2890 * testsuite/30_threads/shared_mutex/unlock/1.cc: Likewise.
2892 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2895 * include/bits/stl_iterator.h (reverse_iterator): Friend
2896 declaration should not depend on __cplusplus.
2898 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2900 * testsuite/experimental/filesystem/filesystem_error/cons.cc:
2901 Remove -std=gnu++17 option.
2903 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2905 * testsuite/20_util/is_aggregate/value.cc: Adjust for changes to
2906 definition of aggregates in C++20.
2907 * testsuite/20_util/optional/requirements.cc: Adjust for
2908 defaulted comparisons in C++20.
2910 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2912 * testsuite/20_util/tuple/78939.cc: Suppress warnings about
2913 deprecation of volatile-qualified structured bindings in C++20.
2914 * testsuite/20_util/variable_templates_for_traits.cc: Likewise
2915 for deprecation of is_pod in C++20
2917 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2919 * testsuite/20_util/time_point_cast/rounding.cc: Remove
2920 duplicate dg-do directive and add c++17 effective target.
2922 2020-07-31 Jonathan Wakely <jwakely@redhat.com>
2924 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
2925 LC_ALL_MASK not LC_ALL.
2927 2020-07-31 Richard Biener <rguenther@suse.de>
2930 * testsuite/20_util/assume_aligned/3.cc: Use -g0.
2932 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2934 * include/bits/basic_string.h (size_type, difference_type):
2935 Use allocator_traits to obtain the allocator's size_type and
2938 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2941 * src/c++17/floating_from_chars.cc (from_chars_impl): Use
2943 [!_GLIBCXX_USE_C99_STDLIB]: Use strtod for float and long
2946 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2948 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
2949 Use allocator with the correct value type.
2950 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
2953 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2955 * testsuite/20_util/from_chars/4.cc: Pass non-const iterator
2958 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2960 * include/bits/iterator_concepts.h (__detail::__cv_bool): New
2962 (__detail::__integral_nonbool): Likewise.
2963 (__detail::__is_integer_like): Use __integral_nonbool.
2964 * testsuite/std/ranges/access/lwg3467.cc: New test.
2966 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2968 * testsuite/20_util/from_chars/4.cc: Use dg-add-options ieee.
2969 * testsuite/29_atomics/atomic_float/1.cc: Likewise.
2971 2020-07-30 Jonathan Wakely <jwakely@redhat.com>
2973 * testsuite/23_containers/vector/bool/72847.cc: Use the
2974 exceptions_enabled effective-target keyword instead of
2975 checking for an explicit -fno-exceptions option.
2976 * testsuite/util/testsuite_abi.cc (examine_symbol): Remove
2977 redundant try-catch.
2978 * testsuite/util/testsuite_allocator.h [!__cpp_exceptions]:
2979 Do not define check_allocate_max_size and memory_resource.
2980 * testsuite/util/testsuite_containers.h: Replace comment with
2981 #error if wrong standard dialect used.
2982 * testsuite/util/testsuite_shared.cc: Likewise.
2984 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
2986 * include/bits/hashtable_policy.h (_Node_iterator_base()): New.
2987 (operator==(const _Node_iterator_base&, const _Node_iterator_base&)):
2989 (operator!=(const _Node_iterator_base&, const _Node_iterator_base&)):
2991 (_Local_iterator_base<>): Inherits _Node_iterator_base.
2992 (_Local_iterator_base<>::_M_cur): Remove.
2993 (_Local_iterator_base<>::_M_curr()): Remove.
2994 (operator==(const _Local_iterator_base&, const _Local_iterator_base&)):
2996 (operator!=(const _Local_iterator_base&, const _Local_iterator_base&)):
2998 * include/debug/unordered_map (unordered_map<>::_M_invalidate): Adapt.
2999 (unordered_multimap<>::_M_invalidate): Adapt.
3000 * include/debug/unordered_set (unordered_set<>::_M_invalidate): Adapt.
3001 (unordered_multiset<>::_M_invalidate): Adapt.
3003 2020-07-29 David Edelsohn <dje.gcc@gmail.com>
3004 Jonathan Wakely <jwakely@redhat.com>
3005 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
3007 * testsuite/lib/dg-options.exp (add_options_for_libatomic): Add
3008 target powerpc-ibm-aix* and powerpc*-*-darwin*.
3009 * testsuite/29_atomics/atomic_float/value_init.cc: Add options
3012 2020-07-29 François Dumont <fdumont@gcc.gnu.org>
3014 * include/bits/hashtable.h
3015 (_Hashtable(_Hashtable&& __ht, __node_alloc_type&& __a, true_type)):
3016 Add noexcept qualification.
3017 (_Hashtable(_Hashtable&&)): Fix noexcept qualification.
3018 (_Hashtable(_Hashtable&&, const allocator_type&)): Add noexcept
3020 * include/bits/unordered_map.h
3021 (unordered_map(unordered_map&&, const allocator_type&)): Add noexcept
3023 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
3025 * include/bits/unordered_set.h
3026 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
3027 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
3029 * include/debug/unordered_map
3030 (unordered_map(unordered_map&&, const allocator_type&)): Likewise.
3031 (unordered_multimap(unordered_multimap&&, const allocator_type&)):
3033 * include/debug/unordered_set
3034 (unordered_set(unordered_set&&, const allocator_type&)): Likewise.
3035 (unordered_multiset(unordered_multiset&&, const allocator_type&)):
3037 * testsuite/23_containers/unordered_map/allocator/default_init.cc:
3039 * testsuite/23_containers/unordered_map/cons/noexcept_default_construct.cc:
3041 * testsuite/23_containers/unordered_map/cons/noexcept_move_construct.cc:
3043 * testsuite/23_containers/unordered_map/modifiers/move_assign.cc:
3045 * testsuite/23_containers/unordered_multimap/cons/noexcept_default_construct.cc:
3047 * testsuite/23_containers/unordered_multimap/cons/noexcept_move_construct.cc:
3049 * testsuite/23_containers/unordered_multiset/cons/noexcept_default_construct.cc:
3051 * testsuite/23_containers/unordered_multiset/cons/noexcept_move_construct.cc:
3053 * testsuite/23_containers/unordered_set/allocator/default_init.cc:
3055 * testsuite/23_containers/unordered_set/cons/noexcept_default_construct.cc:
3057 * testsuite/23_containers/unordered_set/cons/noexcept_move_construct.cc:
3060 2020-07-28 François Dumont <fdumont@gcc.gnu.org>
3062 * include/bits/hashtable.h
3063 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
3064 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
3065 const allocator_type&, true_type)): New.
3066 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
3067 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
3068 const allocator_type&, false_type)): New.
3069 (_Hashtable<>(_InputIterator, _InputIterator, size_t, const _H1&,
3070 const _H2&, const _Hash&, const _Equal&, const _ExtractKey&,
3071 const allocator_type&)): Delegate to latters.
3072 (operator=(initializer_list<value_type>)): Rehash if too small.
3073 (_M_insert(_Arg&&, const _NodeGenerator&, true_type)): Remove
3074 size_t len parameter.
3075 * include/bits/hashtable_policy.h (_Insert_base<>::_M_insert_range):
3076 Do not try to get input range distance.
3077 * testsuite/23_containers/unordered_set/cons/bucket_hint.cc: New test.
3078 * testsuite/23_containers/unordered_set/modifiers/insert.cc: New test.
3080 2020-07-27 François Dumont <fdumont@gcc.gnu.org>
3082 * include/bits/hashtable_policy.h (_Map_base<>::at): Use
3084 (_Hashtable_base<>::_Equal_hash_code<>::_S_node_equals):New.
3085 (_Hashtable_base<>::_M_node_equals): New, use latter.
3086 (_Equality<_Key, _Value, _Alloc, _ExtractKey, _Equal, _H1, _H2, _Hash,
3087 _RehashPolicy, false>::_M_equal): Adapt to use latter.
3088 * include/bits/hashtable.h (_Hashtable<>::_M_update_bbegin): New.
3089 (_Hashtable<>::_M_assign): Use latter.
3090 (_Hashtable<>::_M_move_assign): Likewise.
3091 (_Hashtable<>(_Hashtable<>&&)): Likewise.
3092 (_Hashtable<>(_Hashtable<>&&, const allocator_type&)): Likewise.
3093 (_Hashtable<>::swap): Likewise.
3094 (_Hashtable<>::find): Build iterator directly from _M_find_node result.
3095 (_Hashtable<>::count): Use _Hashtable<>::find.
3096 (_Hashtable<>::equal_range): Likewise.
3097 (_Hashtable<>::_M_erase(false_type, const key_type&)): Use
3100 2020-07-27 Jonathan Wakely <jwakely@redhat.com>
3102 * src/c++17/floating_from_chars.cc (from_chars_impl): Ensure
3103 that FE_NEAREST is used.
3104 * testsuite/20_util/from_chars/4.cc: Do not use if constexpr in
3105 a { target c++14 } test.
3106 [!_GLIBCXX_HAVE_USELOCALE]: Disable all tests.
3107 * testsuite/20_util/from_chars/5.cc [!_GLIBCXX_HAVE_USELOCALE]:
3109 * testsuite/20_util/from_chars/6.cc: New test.
3111 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
3113 * include/std/future (future, shared_future, promise): Add
3114 static assertions to the primary template to reject array and
3116 * testsuite/30_threads/future/requirements/lwg3458.cc: New test.
3117 * testsuite/30_threads/promise/requirements/lwg3466.cc: New test.
3118 * testsuite/30_threads/shared_future/requirements/lwg3458.cc: New test.
3120 2020-07-22 Jonathan Wakely <jwakely@redhat.com>
3122 * include/bits/stl_iterator.h (reverse_iterator): Constrain
3123 converting constructor and converting assignment operator.
3124 Access source iterator's data member directly instead of
3126 (move_iterator): Likewise.
3127 * testsuite/24_iterators/move_iterator/dr3435.cc: New test.
3128 * testsuite/24_iterators/reverse_iterator/dr3435.cc: New test.
3130 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
3132 * acinclude.m4 (libtool_VERSION): Bump version.
3133 * config.h.in: Regenerate.
3134 * config/abi/pre/gnu.ver: Add GLIBCXX_3.4.29 version and new
3136 * config/os/gnu-linux/ldbl-extra.ver: Add _GLIBCXX_LDBL_3.4.29
3137 version and new export.
3138 * configure: Regenerate.
3139 * configure.ac: Check for <xlocale.h> and uselocale.
3140 * crossconfig.m4: Add macro or checks for uselocale.
3141 * include/std/charconv (from_chars): Declare overloads for
3142 float, double, and long double.
3143 * src/c++17/Makefile.am: Add new file.
3144 * src/c++17/Makefile.in: Regenerate.
3145 * src/c++17/floating_from_chars.cc: New file.
3146 (from_chars): Define for float, double, and long double.
3147 * testsuite/20_util/from_chars/1_c++20_neg.cc: Prune extra
3148 diagnostics caused by new overloads.
3149 * testsuite/20_util/from_chars/1_neg.cc: Likewise.
3150 * testsuite/20_util/from_chars/2.cc: Check leading '+'.
3151 * testsuite/20_util/from_chars/4.cc: New test.
3152 * testsuite/20_util/from_chars/5.cc: New test.
3153 * testsuite/util/testsuite_abi.cc: Add new symbol versions.
3155 2020-07-20 Jonathan Wakely <jwakely@redhat.com>
3157 * include/bits/istream.tcc
3158 (basic_istream::get(__streambuf_type&, char_type): Use unsigned
3159 long long for counter and check if it would overflow _M_gcount.
3160 * testsuite/27_io/basic_istream/get/char/lwg3464.cc: New test.
3161 * testsuite/27_io/basic_istream/get/wchar_t/lwg3464.cc: New test.
3163 2020-07-17 Iain Sandoe <iain@sandoe.co.uk>
3165 * include/std/coroutine: Mark the methods of the
3166 trivial awaitables as constexpr.
3168 2020-07-14 David Edelsohn <dje.gcc@gmail.com>
3170 * config/os/aix/t-aix: Set BITS from compiler cpp macro.
3172 2020-07-13 Jonathan Wakely <jwakely@redhat.com>
3176 * include/bits/istream.tcc (basic_istream::ignore(streamsize))
3177 [n == max]: Check overflow conditions on _M_gcount. Rely on
3178 the fact that either EOF or the delimiter was reached.
3179 [n < max]: Check _M_gcount < n before checking for EOF or
3181 (basic_istream::ignore(streamsize, char_type): Likewise.
3182 * src/c++98/compatibility.cc (istream::ignore(streamsize))
3183 (wistream::ignore(streamsize)): Likewise.
3184 * src/c++98/istream.cc (istream::ignore(streamsize, char_type))
3185 (wistream::ignore(streamsize, char_type)): Likewise.
3186 * testsuite/27_io/basic_istream/ignore/char/94749.cc: Check that
3187 delimiter is discarded if the number of characters ignored
3188 doesn't fit in streamsize.
3189 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc:
3191 * testsuite/27_io/basic_istream/ignore/char/96161.cc: New test.
3192 * testsuite/27_io/basic_istream/ignore/wchar_t/96161.cc: New test.
3194 2020-07-08 François Dumont <fdumont@gcc.gnu.org>
3196 * include/bits/stl_tree.h (_Rb_tree_impl(_Rb_tree_impl&&)): Add noexcept
3197 qualification based only on _Compare one.
3198 * testsuite/23_containers/map/cons/noexcept_move_construct.cc: Add
3200 * testsuite/23_containers/multimap/cons/noexcept_move_construct.cc:
3202 * testsuite/23_containers/multiset/cons/noexcept_move_construct.cc:
3204 * testsuite/23_containers/set/cons/noexcept_move_construct.cc: Likewise.
3206 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
3208 * include/std/limits: Whitespace changes.
3210 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
3212 * include/Makefile.am: Remove bits/int_limits.h.
3213 * include/Makefile.in: Regenerate.
3214 * include/bits/int_limits.h: Removed.
3215 * include/bits/parse_numbers.h (_Select_int_base): Replace
3216 __int_limits with __int_traits.
3217 * include/bits/range_access.h (_SSize::operator()): Likewise.
3218 * include/ext/numeric_traits.h (__numeric_traits_integer): Add
3220 (__int_traits): New alias template.
3221 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
3222 (__countr_zero, __countr_one, __popcount, __bit_ceil)
3223 (__bit_floor, __bit_width) Replace __int_limits with
3225 * include/std/charconv (__to_chars_8, __from_chars_binary)
3226 (__from_chars_alpha_to_num, from_chars): Likewise.
3227 * include/std/memory_resource (polymorphic_allocator::allocate)
3228 (polymorphic_allocator::allocate_object): Likewise.
3229 * include/std/string_view (basic_string_view::_S_compare):
3231 * include/std/utility (cmp_equal, cmp_less, in_range): Likewise.
3233 2020-07-07 Jonathan Wakely <jwakely@redhat.com>
3235 * include/std/limits: Whitespace changes.
3237 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3239 * include/std/optional (_Optional_payload_base, _Optional_base)
3240 (optional, __optional_hash_call_base): Adjust whitespace and
3241 other formatting. Remove redundant && tokens on template
3242 arguments to type traits.
3244 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3246 * include/std/optional (make_optional): Add enable_if
3247 constraints and noexcept-specifier to each overload.
3248 * testsuite/20_util/optional/make_optional-2.cc: New test.
3250 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3253 * include/std/optional (optional): Add noexcept-specifier to
3254 every constructor, assignment operator, emplace function and
3255 dereference operator.
3256 * testsuite/20_util/optional/assignment/noexcept.cc: New test.
3257 * testsuite/20_util/optional/cons/noexcept.cc: New test.
3259 2020-07-06 Jonathan Wakely <jwakely@redhat.com>
3262 * include/bits/fs_dir.h: Use consistent tag in class-head.
3263 * include/bits/localefwd.h: Likewise.
3264 * include/bits/regex.h: Likewise.
3265 * include/bits/stl_map.h: Likewise.
3266 * include/bits/stl_multimap.h: Likewise.
3267 * include/bits/stl_multiset.h: Likewise.
3268 * include/bits/stl_set.h: Likewise.
3269 * include/std/complex: Likewise.
3270 * include/std/functional: Likewise.
3271 * include/std/future: Likewise.
3272 * include/std/system_error: Likewise.
3273 * include/std/thread: Likewise.
3274 * include/std/tuple: Likewise.
3275 * include/std/type_traits: Likewise.
3276 * include/std/valarray: Likewise.
3278 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
3280 * testsuite/27_io/basic_ios/conv/voidptr.cc: Add c++98_only
3283 2020-07-02 Jonathan Wakely <jwakely@redhat.com>
3285 * testsuite/18_support/headers/cstdalign/std_c++0x_neg.cc: Add
3286 c++98_only target selector.
3287 * testsuite/18_support/headers/cstdbool/std_c++0x_neg.cc:
3289 * testsuite/18_support/headers/cstdint/std_c++0x_neg.cc:
3291 * testsuite/18_support/headers/new/synopsis_cxx98.cc: Likewise.
3292 * testsuite/19_diagnostics/headers/system_error/std_c++0x_neg.cc:
3294 * testsuite/20_util/headers/type_traits/std_c++0x_neg.cc:
3296 * testsuite/23_containers/headers/array/std_c++0x_neg.cc:
3298 * testsuite/23_containers/headers/tuple/std_c++0x_neg.cc:
3300 * testsuite/23_containers/headers/unordered_map/std_c++0x_neg.cc:
3302 * testsuite/23_containers/headers/unordered_set/std_c++0x_neg.cc:
3304 * testsuite/26_numerics/headers/ccomplex/std_c++0x_neg.cc:
3306 * testsuite/26_numerics/headers/cfenv/std_c++0x_neg.cc:
3308 * testsuite/26_numerics/headers/cmath/c99_classification_macros_c++98.cc:
3310 * testsuite/26_numerics/headers/ctgmath/std_c++0x_neg.cc:
3312 * testsuite/26_numerics/headers/random/std_c++0x_neg.cc:
3314 * testsuite/27_io/headers/cinttypes/std_c++0x_neg.cc: Likewise.
3315 * testsuite/28_regex/headers/regex/std_c++0x_neg.cc: Likewise.
3316 * testsuite/29_atomics/headers/atomic/std_c++0x_neg.cc:
3318 * testsuite/30_threads/headers/condition_variable/std_c++0x_neg.cc:
3320 * testsuite/30_threads/headers/future/std_c++0x_neg.cc:
3322 * testsuite/30_threads/headers/mutex/std_c++0x_neg.cc: Likewise.
3323 * testsuite/30_threads/headers/thread/std_c++0x_neg.cc:
3326 2020-07-02 Ville Voutilainen <ville.voutilainen@gmail.com>
3329 * include/std/variant
3330 (_Copy_assign_base::operator=(const _Copy_assign_base&):
3331 Do the move-assignment from a temporary so that the temporary
3332 is constructed with an explicit index.
3333 * testsuite/20_util/variant/91807.cc: New.
3335 2020-07-02 Jonathan Wakely <jwakely.gcc@gmail.com>
3339 * testsuite/29_atomics/atomic_float/1.cc: Use different values
3341 * testsuite/29_atomics/atomic_ref/float.cc: Likewise.
3343 2020-07-01 Jonathan Wakely <jwakely@redhat.com>
3346 * include/bits/regex.h (operator==, operator!=): Remove noexcept
3347 equality comparisons for match_results.
3348 * testsuite/28_regex/match_results/94627.cc: New test.
3350 2020-07-01 Martin Sebor <msebor@redhat.com>
3352 * testsuite/21_strings/basic_string_view/cons/char/nonnull.cc: Adjust
3353 text of expected warning.
3354 * testsuite/21_strings/basic_string_view/cons/wchar_t/nonnull.cc: Same.
3355 * testsuite/21_strings/basic_string_view/operations/compare/char/nonnull.cc: Same.
3356 * testsuite/21_strings/basic_string_view/operations/find/char/nonnull.cc: Same.
3357 * testsuite/21_strings/basic_string_view/operations/rfind/char/nonnull.cc: Same.
3359 2020-06-29 Ville Voutilainen <ville.voutilainen@gmail.com>
3362 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3364 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
3365 Add a __nonnull__ attribute.
3366 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
3367 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
3369 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3371 * include/bits/basic_string.h (string(_CharT*, const _Alloc&)):
3372 Add a __nonnull__ attribute.
3373 * testsuite/21_strings/basic_string/cons/char/nonnull.cc: New.
3374 * testsuite/21_strings/basic_string/cons/wchar_t/nonnull.cc: Likewise.
3376 2020-06-28 Ville Voutilainen <ville.voutilainen@gmail.com>
3379 * include/std/type_traits (is_literal_type, is_literal_type_v):
3381 * include/std/variant (_Uninitialized):
3382 Adjust the condition and the comment.
3383 * testsuite/20_util/is_literal_type/deprecated-1z.cc: New.
3384 * testsuite/20_util/is_literal_type/requirements/explicit_instantiation.cc:
3386 * testsuite/20_util/is_literal_type/requirements/typedefs.cc: Likewise.
3387 * testsuite/20_util/is_literal_type/value.cc: Likewise.
3388 * testsuite/20_util/optional/constexpr/nullopt.cc:
3389 Use __is_literal_type directly.
3390 * testsuite/20_util/optional/nullopt.cc: Likewise.
3391 * testsuite/20_util/variable_templates_for_traits.cc: Adjust.
3392 * testsuite/20_util/variant/95915.cc: New.
3393 * testsuite/20_util/variant/compile.cc: Add new test.
3394 * testsuite/experimental/optional/constexpr/nullopt.cc:
3395 Use __is_literal_type directly.
3396 * testsuite/experimental/optional/nullopt.cc: Likewise.
3397 * testsuite/experimental/type_traits/value.cc: Adjust.
3398 * testsuite/util/testsuite_common_types.h:
3399 Use __is_literal_type directly.
3401 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
3403 * include/std/charconv (__from_chars_binary): Ignore leading zeros.
3404 * testsuite/20_util/from_chars/1.cc: Check "0x1" for all bases,
3406 * testsuite/20_util/from_chars/3.cc: New test.
3408 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
3410 * include/bits/stl_algobase.h (__find_if): Add FALLTHRU markers.
3411 * include/std/charconv (__detail::__to_chars): Avoid
3412 -Wsign-compare warning.
3414 2020-06-24 Jonathan Wakely <jwakely@redhat.com>
3417 * include/std/charconv (__to_chars_i): Check for zero-sized
3418 buffer unconditionally.
3419 * testsuite/20_util/to_chars/95851.cc: New test.
3421 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
3423 * testsuite/20_util/from_chars/1_c++20_neg.cc: Check enumeration
3425 * testsuite/20_util/from_chars/1_neg.cc: Likewise. Move dg-error
3426 directives outside preprocessor condition.
3428 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
3431 * include/std/variant (__detail::__variant::_Build_FUN): Remove
3432 partial specialization to prevent narrowing conversions to bool.
3433 * testsuite/20_util/variant/compile.cc: Test non-narrowing
3434 conversions to bool.
3435 * testsuite/20_util/variant/run.cc: Likewise.
3437 2020-06-23 Jonathan Wakely <jwakely@redhat.com>
3439 * doc/Makefile.in: Regenerate.
3440 * include/Makefile.in: Regenerate.
3441 * libsupc++/Makefile.in: Regenerate.
3442 * po/Makefile.in: Regenerate.
3443 * python/Makefile.in: Regenerate.
3444 * src/Makefile.in: Regenerate.
3445 * src/c++11/Makefile.in: Regenerate.
3446 * src/c++17/Makefile.in: Regenerate.
3447 * src/c++98/Makefile.in: Regenerate.
3448 * src/filesystem/Makefile.in: Regenerate.
3449 * testsuite/Makefile.in: Regenerate.
3451 2020-06-22 David Edelsohn <dje.gcc@gmail.com>
3453 * Makefile.am: Use -include.
3454 * Makefile.in: Regenerate.
3456 2020-06-21 David Edelsohn <dje.gcc@gmail.com>
3458 * Makefile.am (tmake_file): Build and install AIX-style FAT libraries.
3459 * Makefile.in: Regenerate.
3460 * configure.ac (tmake_file): Substitute.
3461 * configure: Regenerate.
3462 * configure.host (aix*): Define tmake_file.
3463 * config/os/aix/t-aix: New file.
3465 2020-06-20 Jason Merrill <jason@redhat.com>
3467 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc:
3468 Remove greedy_ops tests.
3469 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc:
3470 Remove greedy_ops tests.
3472 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
3475 * include/bits/stl_algobase.h (__size_to_integer(float))
3476 (__size_to_integer(double), __size_to_integer(long double))
3477 (__size_to_integer(__float128)): Cast return type explicitly.
3478 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
3479 Remove unused typedef.
3481 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
3483 * include/bits/stl_pair.h (_Index_tuple): Remove redundant
3484 namespace qualification.
3485 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
3487 * include/std/tuple (_Head_base, _Tuple_impl, tuple_size)
3488 (tuple_element, __get_helper, get, __make_tuple_impl)
3489 (__make_1st_indices, __tuple_concater)
3490 (pair::pair(tuple<>&, tuple<>&, _Index_tuple, _Index_tuple)):
3492 * include/std/utility (tuple_element, __is_tuple_like_impl)
3493 (tuple_size, __pair_get, get): Likewise.
3495 2020-06-19 Jonathan Wakely <jwakely@redhat.com>
3497 * include/bits/std_function.h (function): Define all member
3500 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
3502 * include/bits/stl_algo.h (__includes): Simplify the code.
3504 2020-06-19 Marc Glisse <marc.glisse@inria.fr>
3506 * include/std/optional (optional()): Explicitly define it.
3508 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3511 * include/bits/stl_uninitialized.h (__uninitialized_default_1<true>):
3512 Construct the first value at *__first instead of on the stack.
3513 (__uninitialized_default_n_1<true>): Likewise.
3514 Improve comments on several of the non-standard algorithms.
3515 * testsuite/20_util/specialized_algorithms/uninitialized_default/94540.cc:
3517 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/94540.cc:
3519 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct/94540.cc:
3521 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/94540.cc:
3523 * testsuite/23_containers/vector/cons/94540.cc: New test.
3525 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3527 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
3528 Replace Value type with int so trivial code path is used.
3529 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
3532 2020-06-17 Jonathan Wakely <jwakely@redhat.com>
3534 * include/bits/stl_uninitialized.h (uninitialized_fill_n): Only
3535 use std::fill_n when the size is an integral type.
3536 (__uninitialized_default_n): Likewise.
3537 * testsuite/20_util/specialized_algorithms/uninitialized_default_n/sizes.cc:
3539 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/sizes.cc:
3541 * testsuite/20_util/specialized_algorithms/uninitialized_value_construct_n/sizes.cc:
3544 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
3547 * include/bits/atomic_base.h (__atomic_impl::load): Use the _Val
3548 alias instead of deducing _Tp as an unqualified type.
3549 (__atomic_impl::exchange): Use the _Val alias to remove volatile
3550 from the reinterpret_cast result type.
3552 2020-06-16 Jonathan Wakely <jwakely@redhat.com>
3554 * include/std/atomic (atomic): Add static assertions.
3555 * testsuite/29_atomics/atomic/requirements/types_neg.cc: New test.
3557 2020-06-16 Patrick Palka <ppalka@redhat.com>
3560 * testsuite/20_util/is_constructible/94003.cc: New test.
3562 2020-06-15 Jonathan Wakely <jwakely@redhat.com>
3564 * include/bits/char_traits.h (__cpp_lib_constexpr_char_traits):
3565 Update value for C++20.
3566 * include/std/version (__cpp_lib_constexpr_char_traits): Likewise.
3567 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++17.cc:
3568 Update expected value.
3569 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
3572 2020-06-15 Paul Keir <paul.keir@uws.ac.uk>
3574 * include/bits/char_traits.h (char_traits::move): constexpr move with
3575 overlap was using copy_backward incorrectly.
3576 * testsuite/21_strings/char_traits/requirements/constexpr_functions_c++20.cc:
3579 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
3581 * testsuite/29_atomics/atomic_flag/clear/1.cc: Also test clear()
3582 when the value is currently set.
3583 * testsuite/29_atomics/atomic_flag/test_and_set/explicit.cc:
3584 Actually check the return value.
3585 * testsuite/29_atomics/atomic_flag/test_and_set/implicit.cc:
3588 2020-06-12 Jonathan Wakely <jwakely@redhat.com>
3590 * include/bits/atomic_base.h (atomic_flag::test): Add missing
3592 * testsuite/29_atomics/atomic_flag/test/explicit.cc: Add
3593 dg-options and verify results of test function.
3594 * testsuite/29_atomics/atomic_flag/test/implicit.cc: Likewise.
3596 2020-06-11 Jonathan Wakely <jwakely@redhat.com>
3599 * include/bits/istream.tcc (basic_istream::ignore(streamsize, CharT)):
3600 Only discard an extra character if we didn't already reach the
3602 * src/c++98/istream.cc (istream::ignore(streamsiz, char))
3603 (wistream::ignore(streamsize, wchar_t)): Likewise.
3604 * testsuite/27_io/basic_istream/ignore/char/94749.cc: New test.
3605 * testsuite/27_io/basic_istream/ignore/wchar_t/94749.cc: New test.
3607 2020-06-10 Patrick Palka <ppalka@redhat.com>
3610 * include/bits/ranges_algo.h (__lexicographical_compare_fn):
3611 Also check that the iterator and sentinel have the same type before
3612 applying the unwrapping optimization for __normal_iterator.
3613 Split the check into two, one for the first iterator/sentinel
3614 pair and another for second iterator/sentinel pair. Remove uses
3615 of __niter_base, and remove uses of std::move on a
3617 * include/bits/ranges_algobase.h (__equal_fn): Likewise.
3618 (__copy_or_move): Likewise. Perform similar adjustments for
3619 the reverse_iterator and move_iterator optimizations. Inline
3620 the checks into the if-constexprs, and use using-declarations to
3621 make them less visually noisy. Remove uses of __niter_wrap.
3622 (__copy_or_move_backward): Likewise.
3623 * testsuite/25_algorithms/copy/95578.cc: New test.
3624 * testsuite/25_algorithms/copy_backward/95578.cc: New test.
3625 * testsuite/25_algorithms/equal/95578.cc: New test.
3626 * testsuite/25_algorithms/lexicographical_compare/95578.cc: New test.
3627 * testsuite/25_algorithms/move/95578.cc: New test.
3628 * testsuite/25_algorithms/move_backward/95578.cc: New test.
3630 2020-06-10 François Dumont <fdumont@gcc.gnu.org>
3631 Jonathan Wakely <jwakely@redhat.com>
3633 * include/bits/deque.tcc (__lex_cmp_dit): New.
3634 (__lexicographical_compare_aux1): Define overloads for deque
3636 * include/bits/stl_algobase.h (__lexicographical_compare::__3way):
3637 New static member function.
3638 (__lexicographical_compare<true>::__3way): Likewise.
3639 (__lexicographical_compare<true>::__lc): Use __3way.
3640 (__lexicographical_compare_aux): Rename to
3641 __lexicographical_compare_aux1 and declare overloads for deque
3643 (__lexicographical_compare_aux): Define new forwarding function
3644 that calls __lexicographical_compare_aux1 and declare new overloads
3646 (lexicographical_compare): Do not use __niter_base on
3648 * include/debug/safe_iterator.tcc
3649 (__lexicographical_compare_aux): Define overloads for safe
3651 * testsuite/25_algorithms/lexicographical_compare/1.cc: Add
3652 checks with random access iterators.
3653 * testsuite/25_algorithms/lexicographical_compare/deque_iterators/1.cc:
3656 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
3658 * include/bits/stl_iterator.h (move_iterator::operator=): Define.
3659 * testsuite/24_iterators/move_iterator/dr3265.cc: New test.
3661 2020-06-09 Jonathan Wakely <jwakely@redhat.com>
3663 * include/std/optional (bad_optional_access): Define default
3664 constructor and destructor as defaulted.
3665 * testsuite/20_util/optional/bad_access.cc: New test.
3667 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
3669 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error
3671 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
3673 2020-06-08 Jonathan Wakely <jwakely@redhat.com>
3675 * include/bits/unique_ptr.h (operator<<): Define for C++20.
3676 * testsuite/20_util/unique_ptr/io/lwg2948.cc: New test.
3678 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
3680 * include/bits/iterator_concepts.h (__detail::__ptr, __detail::__ref)
3681 (__detail::__cat, __detail::__diff): Move to class scope in the
3682 relevant __iterator_traits specializations.
3683 (__iterator_traits<>): Use nested class templates instead of ones from
3685 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Move to
3686 class scope in iterator_traits<common_iterator<I, S>>.
3687 (iterator_traits<common_iterator<I, S>>): Use nested class template
3688 instead of __detail::__common_iter_ptr.
3690 2020-06-04 François Dumont <fdumont@gcc.gnu.org>
3692 * include/bits/stl_algo.h (__copy_n_a): Move to ...
3693 * include/bits/stl_algobase.h (__copy_n_a): ...here. Add __strict
3695 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
3697 (__niter_base(const _Safe_iterator<_Ite, _Seq,
3698 random_access_iterator_tag>&)): Declare.
3699 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
3700 _Deque_iterator<>)): Declare.
3701 * include/bits/deque.tcc
3702 (__copy_move_a2(istreambuf_iterator<>, istreambuf_iterator<>,
3703 _Deque_iterator<>)): New.
3704 (__copy_n_a(istreambuf_iterator<>, _Size, _Deque_iterator<>, bool)):
3706 * include/bits/streambuf_iterator.h
3707 (__copy_n_a(istreambuf_iterator<>, _Size, _CharT*, bool)): Adapt.
3708 * include/debug/safe_iterator.tcc (__niter_base): New.
3709 * testsuite/25_algorithms/copy/streambuf_iterators/char/4.cc
3711 * testsuite/25_algorithms/copy/streambuf_iterators/char/debug/deque_neg.cc:
3713 * testsuite/25_algorithms/copy_n/debug/istreambuf_ite_deque_neg.cc:
3715 * testsuite/25_algorithms/copy_n/istreambuf_iterator/2.cc: New test.
3716 * testsuite/25_algorithms/copy_n/istreambuf_iterator/deque.cc:
3719 2020-06-04 Jonathan Wakely <jwakely@redhat.com>
3721 * include/bits/ranges_algobase.h (__copy_n_fn): Only call
3722 ranges::copy for positive values.
3723 * include/bits/stl_algo.h (copy_n): Convert Size argument to an
3724 integral type and only call __copy_n for positive values.
3725 * testsuite/util/testsuite_iterators.h
3726 (random_access_iterator_wrapper::operator+=): Fix range check for
3728 (output_container, input_container, forward_container)
3729 (bidirectional_container, random_access_container): New alias
3731 * testsuite/25_algorithms/copy_n/5.cc: New test.
3733 2020-06-02 Jonathan Wakely <jwakely@redhat.com>
3736 * include/debug/deque (deque(const _Base&)): Replace parameter
3737 with a struct that wraps a const _Base&.
3738 * include/debug/forward_list (forward_list(_Base_ref)): New
3740 * include/debug/list (list(const _Base&)): Replace parameter
3741 with a struct that wraps a const _Base&.
3742 * include/debug/map.h (map(const _Base&)): Likewise.
3743 * include/debug/multimap.h (multimap(const _Base&)): Likewise.
3744 * include/debug/multiset.h (multiset(const _Base&)): Likewise.
3745 * include/debug/set.h (set(const _Base&)): Likewise.
3746 * include/debug/unordered_map (unordered_map(const _Base&))
3747 (unordered_multimap(const _Base&)): Likewise.
3748 * include/debug/unordered_set (unordered_set(const _Base&))
3749 (unordered_multiset(const _Base&)): Likewise.
3750 * testsuite/23_containers/vector/cons/destructible_debug_neg.cc:
3751 Adjust dg-error line number.
3752 * include/debug/vector (vector(const _Base&)): Likewise.
3753 * testsuite/23_containers/deque/debug/90102.cc: New test.
3754 * testsuite/23_containers/forward_list/debug/90102.cc: New test.
3755 * testsuite/23_containers/list/debug/90102.cc: New test.
3756 * testsuite/23_containers/map/debug/90102.cc: New test.
3757 * testsuite/23_containers/multimap/debug/90102.cc: New test.
3758 * testsuite/23_containers/multiset/debug/90102.cc: New test.
3759 * testsuite/23_containers/set/debug/90102.cc: New test.
3760 * testsuite/23_containers/unordered_map/debug/90102.cc: New test.
3761 * testsuite/23_containers/unordered_multimap/debug/90102.cc: New test.
3762 * testsuite/23_containers/unordered_multiset/debug/90102.cc: New test.
3763 * testsuite/23_containers/unordered_set/debug/90102.cc: New test.
3764 * testsuite/23_containers/vector/debug/90102.cc: New test.
3766 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
3769 * include/bits/fs_path.h (path::_S_to_string): Move to
3770 namespace-scope and rename to ...
3771 (__detail::__string_from_range): ... this.
3772 [WINDOWS] (__detail::__wstr_from_utf8): New function template to
3773 convert a char sequence containing UTF-8 to wstring.
3774 (path::_S_convert(Iter, Iter)): Adjust call to _S_to_string.
3775 (path::_S_convert_loc(Iter, Iter, const locale&)): Likewise.
3776 (u8path(InputIterator, InputIterator)) [WINDOWS]: Use
3777 __string_from_range to obtain a contiguous range and
3778 __wstr_from_utf8 to obtain a wide string.
3779 (u8path(const Source&)) [WINDOWS]: Use __effective_range to
3780 obtain a contiguous range and __wstr_from_utf8 to obtain a wide
3782 (path::_S_convert(const _EcharT*, const _EcharT)) [WINDOWS]:
3783 Use __wstr_from_utf8.
3785 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
3787 * testsuite/util/testsuite_iterators.h:
3788 (input_iterator_wrapper::operator++(int)): Return proxy object.
3790 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
3792 * doc/xml/manual/evolution.xml: Document deprecation of
3793 __is_nullptr_t and removal of std::allocator members.
3794 * doc/html/manual/api.html: Regenerate.
3796 2020-06-01 Jonathan Wakely <jwakely@redhat.com>
3798 * doc/xml/manual/containers.xml: Replace <xref> with <link>.
3799 * doc/xml/manual/evolution.xml: Likewise.
3800 * doc/html/manual/api.html: Regenerate.
3801 * doc/html/manual/containers.html: Regenerate.
3803 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
3805 * doc/xml/faq.xml: Adjust Valgrind reference and remove another.
3806 * doc/html/faq.html: Regenerate.
3808 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
3810 * doc/xml/manual/policy_data_structures_biblio.xml: Remove
3813 2020-06-01 Gerald Pfeifer <gerald@pfeifer.com>
3815 * doc/xml/manual/policy_data_structures_biblio.xml: Switch
3816 www.cs.princeton.edu to https.
3817 * doc/html/manual/policy_data_structures.html: Regenerate.
3819 2020-05-31 Douglas B Rupp <douglas.b.rupp@gmail.com>
3821 * crossconfig.m4 (<*-vxworks>): Check for more math decls.
3822 * configure: Rebuild.
3824 2020-05-29 H.J. Lu <hjl.tools@gmail.com>
3827 * configure: Regenerated.
3829 2020-05-29 François Dumont <fdumont@gcc.gnu.org>
3832 * include/bits/hashtable_policy.h (_Insert_base<>::try_emplace): New.
3833 * include/bits/unordered_map.h (unordered_map<>::try_emplace): Adapt.
3834 (unordered_map<>::insert_or_assign): Adapt.
3836 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
3839 * include/bits/atomic_base.h (__atomic_impl::load): Add
3840 cv-qualifiers to parameter so that _Tp is deduced as the
3842 * testsuite/29_atomics/atomic_float/95282.cc: New test.
3844 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
3847 * include/std/ranges (transform_view::_Sentinel): Allow hidden
3848 friends to work with _Iterator<true> and _Iterator<false>.
3849 (join_view::_Sentinel): Likewise.
3850 * testsuite/std/ranges/adaptors/95322.cc: New test.
3852 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
3855 * include/bits/stl_iterator.h (reverse_iterator): Fix comparison
3856 operators to use the correct operations on the underlying
3858 * testsuite/24_iterators/reverse_iterator/rel_ops.cc: New test.
3860 2020-05-27 Jonathan Wakely <jwakely@redhat.com>
3862 * testsuite/18_support/comparisons/categories/zero_neg.cc: New test.
3864 2020-05-26 Patrick Palka <ppalka@redhat.com>
3867 * include/bits/stl_iterator.h (__detail::_Common_iter_proxy):
3868 Remove and instead define it ...
3869 (common_iterator::_Proxy): ... here.
3870 (common_iterator::operator->): Use it.
3871 * testsuite/24_iterators/common_iterator/2.cc: New test.
3872 * testsuite/std/ranges/adaptors/95322.cc: New test.
3874 2020-05-23 Patrick Palka <ppalka@redhat.com>
3877 * testsuite/std/ranges/adaptors/93978.cc: Add -Wall to
3878 dg-additional-options. Avoid unused-but-set-variable warning.
3880 2020-05-23 Jonathan Wakely <jwakely@redhat.com>
3883 * include/debug/helper_functions.h (__get_distance): Only declare
3884 as a constexpr function for C++14 and up.
3885 * testsuite/25_algorithms/copy/debug/95289.cc: New test.
3887 * include/bits/fs_path.h (__detail::_S_range_begin)
3888 (__detail::_S_range_end, path::_S_string_from_iter): Replace with
3889 overloaded function template __detail::__effective_range.
3890 (__detail::__effective_range): New overloaded function template to
3891 create a basic_string or basic_string_view for an effective range.
3892 (__detail::__value_type_is_char): Use __detail::__effective_range.
3893 Do not use remove_const on value type.
3894 (__detail::__value_type_is_char_or_char8_t): Likewise.
3895 (path::path(const Source&, format))
3896 (path::path(const Source&, const locale&))
3897 (path::operator/=(const Source&), path::append(const Source&))
3898 (path::concat(const Source&)): Use __detail::__effective_range.
3899 (path::_S_to_string(InputIterator, InputIterator)): New function
3900 template to create a string view if possible, or string otherwise.
3901 (path::_S_convert): Add overloads that convert a string returned
3902 by __detail::__effective_range. Use if-constexpr to inline conversion
3903 logic from all overloads of _Cvt::_S_convert.
3904 (path::_S_convert_loc): Add overload that converts a string. Use
3905 _S_to_string to avoid allocation when possible.
3906 (path::_Cvt): Remove.
3907 (path::operator+=(CharT)): Remove indirection through path::concat.
3908 * include/experimental/bits/fs_path.h (path::_S_convert_loc): Add
3909 overload for non-const pointers, to avoid constructing a std::string.
3910 * src/c++17/fs_path.cc (path::_S_convert_loc): Replace conditional
3911 compilation with call to _S_convert.
3913 * include/bits/fs_path.h (__detail::_S_range_begin)
3914 (__detail::_S_range_end): Remove unintentional static specifiers.
3915 * include/experimental/bits/fs_path.h (__detail::_S_range_begin)
3916 (__detail::_S_range_end): Likewise.
3918 * include/bits/fs_path.h (filesystem::__detail::__is_encoded_char):
3919 Replace alias template with variable template. Don't remove const.
3920 (filesystem::__detail::__is_path_src): Replace overloaded function
3921 template with variable template and specializations.
3922 (filesystem::__detail::__is_path_iter_src): Replace alias template
3923 with class template.
3924 (filesystem::__detail::_Path): Use __is_path_src. Remove support for
3926 (filesystem::__detail::_Path2): New alias template for checking
3927 InputIterator requirements.
3928 (filesystem::__detail::__constructible_from): Remove.
3929 (filesystem::path): Replace _Path<Iter, Iter> with _Path2<Iter>.
3930 * testsuite/27_io/filesystem/path/construct/80762.cc: Check with two
3931 constructor arguments of void and void* types.
3933 2020-05-21 Matthias Kretz <kretz@kde.org>
3935 * testsuite/Makefile.am: Remove dup target_triplet and set tool,
3936 allowing runtest to work without arguments.
3937 * testsuite/Makefile.in: Regenerate.
3939 2020-05-21 Jonathan Wakely <jwakely@redhat.com>
3942 * include/bits/iterator_concepts.h (__detail::__cpp17_iterator):
3943 Reorder constraints to avoid recursion when constructors use
3944 iterator_traits (LWG 3420).
3945 * testsuite/24_iterators/customization_points/lwg3420.cc: New test.
3947 * include/experimental/socket (basic_socket::is_open()
3948 (basic_socket_acceptor::is_open()): Use _GLIBCXX_NODISCARD macro.
3950 * include/experimental/bits/net.h (__endpoint, __protocol)
3951 (__acceptable_protocol, __inet_protocol): New concepts.
3952 (__detail::__is_endpoint): Move trait from <experimental/socket>.
3953 (__is_protocol, __is_acceptable_protocol, __is_inet_protocol): New
3955 (__endpoint, __protocol, __acceptable_protocol): New variable
3957 * include/experimental/socket (__is_endpoint): Move to net.h header.
3958 (basic_socket, basic_socket_acceptor): Check requirements.
3960 * include/experimental/executor (use_future_t::use_future_t()): Fix
3961 incorrect noexcept-specifier.
3962 * include/experimental/internet (basic_resolver_results): Adjust
3964 * include/experimental/socket (__basic_socket_impl::release): Add
3966 (basic_socket(io_context&, const endpoint_type&)): Fix argument to
3968 (basic_socket::release(), basic_socket::release(error_code&)): Add
3969 missing member functions.
3970 (basic_socket::is_open()): Add nodiscard attribute.
3971 (basic_socket::close(error_code&)): Pass argument to base function.
3972 (basic_socket_acceptor::release())
3973 (basic_socket_acceptor::release(error_code&)): Add missing member
3975 (basic_socket_acceptor::is_open()): Add nodiscard attribute.
3976 (basic_socket_streambuf::error()): Add noexcept.
3977 (basic_socket_iostream::error()): Likewise.
3978 * testsuite/experimental/net/socket/basic_socket.cc: New test.
3980 * include/experimental/buffer: Replace typedefs with
3982 * include/experimental/executor: Likewise.
3983 * include/experimental/internet: Likewise.
3984 * include/experimental/socket: Likewise.
3985 * include/experimental/timer: Likewise.
3987 2020-05-19 Jonathan Wakely <jwakely@redhat.com>
3990 * src/c++11/random.cc (__x86_rdseed): Allow fallback function to be
3992 (__x86_rdseed_rdrand): New function that uses rdseed with rdrand
3994 (random_device::_M_init): Use __x86_rdseed_rdrand when both
3995 instructions are available.
3996 * testsuite/26_numerics/random/random_device/94087.cc: New test.
3998 2020-05-19 Patrick Palka <ppalka@redhat.com>
4001 * testsuite/20_util/pair/astuple/get_neg.cc: Prune "type/value
4003 * testsuite/20_util/tuple/element_access/get_neg.cc: Likewise.
4005 2020-05-15 H.J. Lu <hongjiu.lu@intel.com>
4008 * configure: Regenerated.
4010 2020-05-14 H.J. Lu <hongjiu.lu@intel.com>
4012 * configure: Regenerated.
4014 2020-05-13 Alexandre Oliva <oliva@adacore.com>
4017 * include/experimental/memory_resource
4018 (__resource_adaptor_imp::do_allocate): Handle max_align_t on
4019 x86-vxworks as on x86-solaris.
4020 (__resource_adaptor_imp::do_deallocate): Likewise.
4021 * testsuite/experimental/memory_resource/new_delete_resource.cc:
4023 (BAD_MAX_ALIGN_T): Define on x86-vxworks as on x86-solaris.
4024 (test03): Drop max-align test for char-aligned alloc.
4026 2020-05-08 Ulrich Drepper <drepper@redhat.com>
4028 * include/bits/atomic_base.h (atomic_flag): Implement test member
4030 * include/std/version: Define __cpp_lib_atomic_flag_test.
4031 * testsuite/29_atomics/atomic_flag/test/explicit.cc: New file.
4032 * testsuite/29_atomics/atomic_flag/test/implicit.cc: New file.
4034 2020-05-07 Jonathan Wakely <jwakely@redhat.com>
4036 PR libstdc++/94971 (partial)
4037 * include/bits/ranges_algo.h (ranges::__sample_fn): Qualify
4038 std::sample using macro to work in parallel mode.
4039 (__sort_fn): Likewise for std::sort.
4040 (ranges::__nth_element_fn): Likewise for std::nth_element.
4041 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
4042 Likewise for std::__min_cmp.
4043 * include/parallel/algobase.h (lexicographical_compare_three_way):
4044 Add to namespace std::__parallel.
4047 * include/parallel/multiway_merge.h (_GuardedIterator::operator*)
4048 (_GuardedIterator::operator _RAIter, _UnguardedIterator::operator*)
4049 (_UnguardedIterator::operator _RAIter): Add const qualifier.
4050 (operator<(_GuardedIterator&, _GuardedIterator&)
4051 (operator<=(_GuardedIterator&, _GuardedIterator&)
4052 (operator<(_UnguardedIterator&, _UnguardedIterator&)
4053 (operator<=(_UnguardedIterator&, _UnguardedIterator&): Change
4054 parameters to const references.
4056 2020-05-07 Eric Botcazou <ebotcazou@adacore.com>
4058 * config/abi/post/sparc64-linux-gnu/baseline_symbols.txt: Update.
4059 * config/abi/post/sparc64-linux-gnu/32/baseline_symbols.txt: Likewise.
4061 2020-05-06 François Dumont <fdumont@gcc.gnu.org>
4063 * include/bits/stl_algobase.h (struct _Bit_iterator): New declaration.
4064 (std::__fill_a1(_Bit_iterator, _Bit_iterator, const bool&)): Likewise.
4065 * include/bits/stl_bvector.h (__fill_bvector): Move outside
4066 _GLIBCXX_STD_C namespace.
4067 (fill(_Bit_iterator, _Bit_iterator, const bool&)): Likewise and rename
4069 (__fill_a1): ...this.
4070 * testsuite/25_algorithms/fill/bvector/1.cc: New.
4072 2020-05-06 H.J. Lu <hongjiu.lu@intel.com>
4074 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
4076 2020-05-06 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
4078 * config/abi/post/i386-solaris/baseline_symbols.txt: Regenerate.
4079 * config/abi/post/i386-solaris/amd64/baseline_symbols.txt:
4081 * config/abi/post/sparc-solaris/baseline_symbols.txt: Likewise.
4082 * config/abi/post/sparc-solaris/sparcv9/baseline_symbols.txt:
4085 2020-05-06 Martin Liska <mliska@suse.cz>
4088 2020-05-05 Martin Liska <mliska@suse.cz>
4090 * include/parallel/multiway_merge.h:
4091 Use const for _Compare template argument.
4093 2020-05-06 Jonathan Wakely <jwakely@redhat.com>
4095 * doc/xml/manual/abi.xml (abi.versioning.history): Document library
4096 versions for GCC 9.[123] and 10.1 releases.
4097 * doc/html/*: Regenerate.
4099 2020-05-06 Jakub Jelinek <jakub@redhat.com>
4101 * config/abi/post/x86_64-linux-gnu/baseline_symbols.txt: Update.
4102 * config/abi/post/x86_64-linux-gnu/32/baseline_symbols.txt: Update.
4103 * config/abi/post/i386-linux-gnu/baseline_symbols.txt: Update.
4104 * config/abi/post/i486-linux-gnu/baseline_symbols.txt: Update.
4105 * config/abi/post/aarch64-linux-gnu/baseline_symbols.txt: Update.
4106 * config/abi/post/s390x-linux-gnu/baseline_symbols.txt: Update.
4107 * config/abi/post/powerpc64-linux-gnu/baseline_symbols.txt: Update.
4109 2020-05-05 Martin Liska <mliska@suse.cz>
4112 * include/parallel/multiway_merge.h:
4113 Use const for _Compare template argument.
4115 2020-05-04 Fangrui Song <maskray@google.com>
4117 * libsupc++/cxxabi.h (__cxa_finalize): Fix return type.
4119 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
4121 * doc/xml/faq.xml: Use working link for SGI STL FAQ.
4122 * doc/html/*: Regenerate.
4125 * src/c++17/memory_resource.cc
4126 (monotonic_buffer_resource::_Chunk::release): Use size_t for shift
4129 2020-05-04 Nathan Sidwell <nathan@acm.org>
4132 * libsupc++/dyncast.cc (__dynamic_cast): Cast offsetof to
4133 ptrdiff_t before negation, to show intent more clearly.
4135 2020-05-04 Jonathan Wakely <jwakely@redhat.com>
4138 * src/c++17/memory_resource.cc (synchronized_pool_resource::_TPools):
4139 Add comment about single-threaded behaviour.
4140 (synchronized_pool_resource::_TPools::move_nonempty_chunks()): Hoist
4141 class member access out of loop.
4142 (synchronized_pool_resource::synchronized_pool_resource())
4143 (synchronized_pool_resource::~synchronized_pool_resource())
4144 (synchronized_pool_resource::release()): Check __gthread_active_p
4145 before creating and/or deleting the thread-specific data key.
4146 (synchronized_pool_resource::_M_thread_specific_pools()): Adjust
4148 (synchronized_pool_resource::do_allocate(size_t, size_t)): Add fast
4149 path for single-threaded case.
4150 (synchronized_pool_resource::do_deallocate(void*, size_t, size_t)):
4151 Likewise. Return if unable to find a pool that owns the allocation.
4152 * testsuite/20_util/synchronized_pool_resource/allocate_single.cc:
4154 * testsuite/20_util/synchronized_pool_resource/cons_single.cc: New
4156 * testsuite/20_util/synchronized_pool_resource/release_single.cc: New
4159 2020-05-03 Jonathan Wakely <jwakely@redhat.com>
4162 * include/bits/stl_algobase.h (__fill_a1): Make overload for byte types
4163 usable in constant expressions.
4164 * testsuite/25_algorithms/fill_n/constexpr.cc: Test with bytes and
4167 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
4170 * testsuite/17_intro/badnames.cc: Test values between _E9 and _E24 too.
4172 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
4173 Patrick Palka <ppalka@redhat.com>
4176 * include/bits/iterator_concepts.h (ranges::__cust_imove::_IMove):
4177 Add trait to determine return type and an alias for it.
4178 (ranges::__cust_imove::_IMove::operator()): Use __result instead of
4179 deduced return type.
4180 (iter_rvalue_reference_t): Use _IMove::__type instead of checking
4181 the result of ranges::iter_move.
4182 (__detail::__indirectly_readable_impl): Use iter_rvalue_reference_t
4183 instead of checking the result of ranges::iter_move.
4184 * testsuite/24_iterators/customization_points/92894.cc: New test.
4185 * testsuite/24_iterators/indirect_callable/92894.cc: New test.
4187 2020-05-01 Jonathan Wakely <jwakely@redhat.com>
4190 * include/std/type_traits (__is_complete_or_unbounded): Replace
4191 BADNAME _T with _Tp.
4192 * testsuite/17_intro/badnames.cc: New test.
4194 2020-04-30 Jonathan Wakely <jwakely@redhat.com>
4197 * include/bits/alloc_traits.h (allocator_traits::_S_construct)
4198 (allocator_traits::_S_destroy)
4199 (allocator_traits<allocator<T>>::construct): Use traits in
4200 noexcept-specifiers.
4201 * include/bits/allocator.h (allocator<void>::construct)
4202 (allocator<void>::destroy): Likewise.
4203 * include/ext/malloc_allocator.h (malloc_allocator::construct)
4204 (malloc_allocator::destroy): Likewise.
4205 * include/ext/new_allocator.h (new_allocator::construct)
4206 (new_allocator::destroy): Likewise.
4207 * testsuite/20_util/allocator/89510.cc: New test.
4208 * testsuite/ext/malloc_allocator/89510.cc: New test.
4209 * testsuite/ext/new_allocator/89510.cc: New test.
4211 2020-04-29 Jonathan Wakely <jwakely@redhat.com>
4214 * include/bits/basic_string.tcc: Update comment about explicit
4217 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
4220 * include/bits/allocator.h (__cpp_lib_allocator_is_always_equal):
4221 Remove non-standard macro.
4222 * include/bits/stl_iterator.h (__cpp_lib_constexpr_iterator): Define
4223 to indicate P1032R1 support.
4224 * include/bits/stl_pair.h (__cpp_lib_constexpr_utility): Likewise.
4225 * include/std/string_view (__cpp_lib_constexpr_string_view): Likewise.
4226 * include/std/tuple (__cpp_lib_constexpr_tuple): Likewise.
4227 * include/std/version (__cpp_lib_allocator_is_always_equal): Remove.
4228 (__cpp_lib_constexpr_iterator, __cpp_lib_constexpr_string_view)
4229 (__cpp_lib_constexpr_tuple, __cpp_lib_constexpr_utility): Define.
4230 * testsuite/20_util/function_objects/constexpr_searcher.cc: Check
4232 * testsuite/20_util/tuple/cons/constexpr_allocator_arg_t.cc: Likewise.
4233 * testsuite/21_strings/basic_string_view/operations/copy/char/
4234 constexpr.cc: Likewise.
4235 * testsuite/24_iterators/insert_iterator/constexpr.cc: Likewise.
4238 * include/bits/alloc_traits.h (_S_construct): Restore placement
4239 new-expression for C++11/14/17 and call std::construct_at directly
4241 * include/bits/stl_construct.h (_Construct): Revert to non-constexpr
4242 function returning void.
4243 * testsuite/20_util/specialized_algorithms/
4244 uninitialized_value_construct/94831.cc: New test.
4245 * testsuite/23_containers/vector/cons/94831.cc: New test.
4247 2020-04-28 Patrick Palka <ppalka@redhat.com>
4249 LWG 3433 subrange::advance(n) has UB when n < 0
4250 * include/std/ranges (subrange::prev): Fix typo.
4251 (subrange::advance): Handle a negative argument as per the proposed
4252 resolution of LWG 3433.
4253 * testsuite/std/ranges/subrange/lwg3433.cc: New test.
4255 2020-04-28 Jonathan Wakely <jwakely@redhat.com>
4256 Iain Sandoe <iain@sandoe.co.uk>
4259 * include/std/coroutine: Implement handing for non-
4260 class coroutine return types.
4262 2020-04-24 Jonathan Wakely <jwakely@redhat.com>
4264 * include/experimental/executor (service_already_exists): Make default
4265 constructor public (LWG 3414).
4266 * testsuite/experimental/net/execution_context/make_service.cc: Check
4267 the service_already_exists can be default constructed.
4269 2020-04-24 Kamlesh Kumar <kamleshbhalui@gmail.com>
4270 Jonathan Wakely <jwakely@redhat.com>
4274 * include/std/any (any): Rename template parameters for consistency
4276 (any::_Decay): Rename to _Decay_if_not_any.
4277 (any::any(T&&):: Remove is_constructible from constraints. Remove
4278 non-standard overload.
4279 (any::any(in_place_type_t<T>, Args&&...))
4280 (any::any(in_place_type_t<T>, initializer_list<U>, Args&&...))
4281 (any::emplace(Args&&...))
4282 (any::emplace(initializer_list<U>, Args&&...)):
4283 Use decay_t instead of _Decay.
4284 * testsuite/20_util/any/cons/90415.cc: New test.
4285 * testsuite/20_util/any/cons/92156.cc: New Test.
4286 * testsuite/20_util/any/misc/any_cast_neg.cc: Make dg-error directives
4288 * testsuite/20_util/any/modifiers/92156.cc: New test.
4290 2020-04-23 Jonathan Wakely <jwakely@redhat.com>
4292 * doc/xml/manual/status_cxx2020.xml: Update C++20 status table.
4293 * doc/html/*: Regenerate.
4295 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Revert
4296 value for C++17 to 201803L because P0858R0 is supported for C++17.
4297 * include/std/version (__cpp_lib_array_constexpr): Likewise.
4298 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
4299 Check for value corresponding to P0031R0 features being tested.
4300 * testsuite/23_containers/array/requirements/constexpr_iter.cc:
4301 Check for value corresponding to P0858R0 features being tested.
4303 * include/std/version (__cpp_lib_three_way_comparison): Define for
4304 freestanding builds.
4306 2020-04-23 Thomas Rodgers <rodgert@appliantology.com>
4308 * include/experimental/net/executor (system_context): Mark
4309 system_context::system_context() = delete.
4310 * testsuite/experimental/net/executor/1.cc: Add new
4311 test to check system_context is not default constructible.
4313 2020-04-23 Iain Sandoe <iain@sandoe.co.uk>
4315 * include/std/coroutine: Update the inline namespace to __n4861.
4316 Add the __cpp_lib_coroutine define, set to 201902L.
4317 * include/std/version: Add __cpp_lib_coroutine, set to 201902L.
4319 2020-04-22 Jonathan Wakely <jwakely@redhat.com>
4321 * include/std/execution (__cpp_lib_execution): Define to indicate
4322 support for P0024R2 and P1001R2.
4323 * include/std/version (__cpp_lib_execution): Define.
4324 * testsuite/25_algorithms/pstl/feature_test.cc: Only test macro
4325 defined by <algorithm>, move other tests to new tests ...
4326 * testsuite/25_algorithms/pstl/feature_test-2.cc: New test.
4327 * testsuite/25_algorithms/pstl/feature_test-3.cc: New test.
4328 * testsuite/25_algorithms/pstl/feature_test-4.cc: New test.
4329 * testsuite/25_algorithms/pstl/feature_test-5.cc: New test.
4331 * include/bits/stl_iterator.h (__cpp_lib_array_constexpr): Define
4332 different values for C++17 and C++20, to indicate different feature
4333 sets. Update value for C++20 to indicate P1032R1 support.
4334 * include/std/version (__cpp_lib_array_constexpr): Likewise.
4335 * testsuite/23_containers/array/comparison_operators/constexpr.cc:
4336 Check feature test macro.
4337 * testsuite/23_containers/array/element_access/constexpr_c++17.cc:
4339 * testsuite/23_containers/array/requirements/constexpr_fill.cc: Check
4341 * testsuite/23_containers/array/requirements/constexpr_iter.cc: Test
4342 in C++17 mode and check feature test macro.
4344 * include/std/utility (__cpp_lib_constexpr_algorithms): Do not define
4346 * testsuite/20_util/exchange/constexpr.cc: Do not expect macro to be
4347 defined by <utility>.
4349 * include/std/functional (__cpp_lib_concepts): Update macro value to
4350 indicate P1964R2 support.
4351 * include/std/version (__cpp_lib_concepts): Likewise.
4352 * testsuite/std/concepts/1.cc: Adjust expected value.
4353 * testsuite/std/concepts/2.cc: Likewise.
4355 * include/std/functional (__cpp_lib_constexpr_invoke): Rename to
4356 __cpp_lib_constexpr_functional.
4357 * include/std/version (__cpp_lib_constexpr_invoke): Likewise.
4358 * testsuite/20_util/function_objects/invoke/constexpr.cc: Adjust.
4360 * include/bits/ptr_traits.h (__cpp_lib_constexpr_memory): Define to
4361 indicate P1006R1 support.
4362 (__cpp_lib_to_address): Define to indicate P0653R2 support.
4363 * include/bits/range_access.h (__cpp_lib_ssize): Define to indicate
4365 * include/bits/ranges_algo.h (__cpp_lib_shift): Define to indicate
4367 * include/std/atomic (__cpp_lib_atomic_float): Define to indicate
4369 * include/std/memory (__cpp_lib_assume_aligned): Define to indicate
4371 * include/std/memory_resource (__cpp_lib_polymorphic_allocator):
4372 Define to indicate P0339R6 support.
4373 * include/std/string_view (__cpp_lib_starts_ends_with): Define to
4374 indicate P0457R2 support.
4375 * include/std/type_traits (__cpp_lib_is_nothrow_convertible): Define
4376 to indicate P0758R1 support.
4377 (__cpp_lib_remove_cvref): Define to indicate P0550R2 support.
4378 (__cpp_lib_type_identity): Define to indicate P0887R1 support.
4379 * include/std/version (__cpp_lib_atomic_float)
4380 (__cpp_lib_is_nothrow_convertible, __cpp_lib_remove_cvref)
4381 (__cpp_lib_type_identity, __cpp_lib_assume_aligned)
4382 (__cpp_lib_constexpr_memory, __cpp_lib_polymorphic_allocator)
4383 (__cpp_lib_shift, __cpp_lib_ssize, __cpp_lib_starts_ends_with)
4384 (__cpp_lib_to_address): Define.
4385 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
4387 * include/bits/stl_map.h (__cpp_lib_map_insertion): Remove old
4389 * include/bits/unordered_map.h (__cpp_lib_unordered_map_insertion):
4391 * include/std/version (__cpp_lib_map_insertion)
4392 (__cpp_lib_unordered_map_insertion): Remove.
4394 * include/std/condition_variable (__cpp_lib_jthread): Remove
4395 redundant definition.
4396 * include/std/stop_token (__cpp_lib_jthread): Update macro value to
4397 indicate P1869R1 support.
4398 * include/std/version (__cpp_lib_jthread): Update value.
4399 * testsuite/30_threads/condition_variable_any/stop_token/1.cc: Check
4400 for updated macro value.
4401 * testsuite/30_threads/condition_variable_any/stop_token/2.cc:
4403 * testsuite/30_threads/jthread/1.cc: Likewise.
4404 * testsuite/30_threads/jthread/2.cc: Likewise.
4405 * testsuite/30_threads/stop_token/1.cc: Likewise.
4406 * testsuite/30_threads/stop_token/2.cc: Likewise.
4408 * testsuite/21_strings/basic_string/erasure.cc: Check for
4409 __cpp_lib_erase_if macro.
4410 * testsuite/23_containers/deque/erasure.cc: Add header name to #error
4412 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
4413 * testsuite/23_containers/list/erasure.cc: Likewise.
4414 * testsuite/23_containers/map/erasure.cc: Likewise.
4415 * testsuite/23_containers/set/erasure.cc: Likewise.
4416 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
4417 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
4418 * testsuite/23_containers/vector/erasure.cc: Likewise.
4420 2020-04-21 Jonathan Wakely <jwakely@redhat.com>
4422 * include/bits/stl_iterator.h (__normal_iterator): Use synth-three-way
4423 to define operator<=>.
4424 * testsuite/24_iterators/normal_iterator/cmp_c++20.cc: New test.
4426 * doc/Makefile.am (xml_sources_manual): Add missing XML files.
4427 * doc/Makefile.in: Regenerate.
4428 * doc/xml/manual/status_cxx1998.xml: Refer to "this section" instead
4430 * doc/xml/manual/status_cxx2011.xml: Formatting and other corrections
4431 to the C++11 status table.
4432 * doc/xml/manual/status_cxx2014.xml: Replace list of C++14 feature
4433 proposals with table matching contents of the C++14 standard.
4434 * doc/xml/manual/status_cxx2017.xml: Add table matching contents of
4436 * doc/html/*: Regenerate.
4439 * include/std/type_traits (__is_nt_constructible_impl): Add partial
4440 specializations for bounded arrays with non-empty initializers.
4441 * testsuite/20_util/is_nothrow_constructible/value_c++20.cc: New test.
4443 2020-04-20 Thomas Rodgers <trodgers@redhat.com>
4445 * testsuite/lib/libstdc++.exp: Add additional_flags=
4446 -DTBB_SUPRESS_DEPRECATED_MESSAGES=1 to suppress warnings when
4447 compiling with a newer Thread Building Blocks.
4449 2020-04-20 Jonathan Wakely <jwakely@redhat.com>
4451 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
4453 * testsuite/20_util/is_constructible/51185.cc: Make test class a
4454 non-aggregate so that the test verifies the same thing in all -std
4456 * testsuite/20_util/is_constructible/value-2.cc: Adjust expected
4457 results for some types when paren-init for aggregates is supported.
4459 * include/std/version (__cpp_lib_three_way_comparison): Update value.
4460 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
4461 (__detail::__synth3way): Add noexcept-specifier.
4463 * include/bits/stl_map.h (map): Define operator<=> and remove
4464 operator< for C++20.
4465 * include/bits/stl_multimap.h (multimap): Likewise.
4466 * include/bits/stl_multiset.h (multiset): Likewise.
4467 * include/bits/stl_set.h (set): Likewise.
4468 * include/bits/stl_tree.h (_Rb_tree): Likewise.
4469 (_Rb_tree_iterator, _Rb_tree_const_iterator): Remove redundant
4470 operator!= for C++20.
4471 * include/debug/map.h (__gnu_debug::map): Define operator<=> for C++20.
4472 * include/debug/multimap.h (__gnu_debug::multimap): Likewise.
4473 * include/debug/multiset.h (__gnu_debug::multiset): Likewise.
4474 * include/debug/set.h (__gnu_debug::set): Likewise.
4475 * testsuite/23_containers/map/operators/cmp_c++20.cc: New test.
4476 * testsuite/23_containers/multimap/operators/cmp_c++20.cc: New test.
4477 * testsuite/23_containers/multiset/operators/cmp_c++20.cc: New test.
4478 * testsuite/23_containers/set/operators/cmp_c++20.cc: New test.
4480 2020-04-20 Matthias Kretz <kretz@kde.org>
4482 * testsuite/lib/libstdc++.exp: Avoid illegal argument to verbose.
4484 2020-04-19 Jonathan Wakely <jwakely@redhat.com>
4486 * include/bits/stl_queue.h (queue): Define operator<=> for C++20.
4487 * include/bits/stl_stack.h (stack): Likewise.
4488 * testsuite/23_containers/queue/cmp_c++20.cc: New test.
4489 * testsuite/23_containers/stack/cmp_c++20.cc: New test.
4491 * include/bits/unordered_map.h (unordered_map, unordered_multimap):
4492 Remove redundant operator!= for C++20.
4493 * include/bits/unordered_set.h (unordered_set, unordered_multiset):
4495 * include/debug/unordered_map (unordered_map, unordered_multimap):
4497 * include/debug/unordered_set (unordered_set, unordered_multiset):
4501 * include/debug/formatter.h (_Error_formatter::_Parameter): Fix
4502 redundant assignment in constructor.
4504 2020-04-18 Jonathan Wakely <jwakely@redhat.com>
4506 * include/std/chrono (duration, time_point): Define operator<=> and
4507 remove redundant operator!= for C++20.
4508 * testsuite/20_util/duration/comparison_operators/three_way.cc: New
4510 * testsuite/20_util/time_point/comparison_operators/three_way.cc: New
4513 * testsuite/util/native_type/native_priority_queue.hpp: Use
4514 allocator_traits to rebind allocator.
4516 2020-04-17 Jonathan Wakely <jwakely@redhat.com>
4518 * include/bits/forward_list.h (forward_list): Define operator<=> and
4519 remove redundant comparison operators for C++20.
4520 * include/bits/stl_bvector.h (vector<bool, Alloc>): Likewise.
4521 * include/bits/stl_deque.h (deque): Likewise.
4522 * include/bits/stl_iterator.h (__normal_iterator): Likewise.
4523 * include/bits/stl_list.h (list): Likewise.
4524 * include/bits/stl_vector.h (vector): Likewise.
4525 * include/debug/deque (__gnu_debug::deque): Likewise.
4526 * include/debug/forward_list (__gnu_debug::forward_list): Likewise.
4527 * include/debug/list (__gnu_debug::list): Likewise.
4528 * include/debug/safe_iterator.h (__gnu_debug::_Safe_iterator):
4530 * include/debug/vector (__gnu_debug::vector): Likewise.
4531 * include/ext/pointer.h (__gnu_cxx::_Pointer_adapter): Define
4532 operator<=> for C++20.
4533 * testsuite/23_containers/deque/operators/cmp_c++20.cc: New test.
4534 * testsuite/23_containers/forward_list/cmp_c++20.cc: New test.
4535 * testsuite/23_containers/list/cmp_c++20.cc: New test.
4536 * testsuite/23_containers/vector/bool/cmp_c++20.cc: New test.
4537 * testsuite/23_containers/vector/cmp_c++20.cc: New test.
4539 * include/bits/basic_string.h (basic_string): Define operator<=> and
4540 remove redundant comparison operators for C++20.
4541 * include/bits/char_traits.h (__gnu_cxx::char_traits, char_traits):
4542 Add comparison_category members.
4543 (__detail::__char_traits_cmp_cat): New helper to get comparison
4544 category from char traits class.
4545 * include/bits/regex.h (regex_traits::_RegexMask::operator!=): Do not
4547 (sub_match): Define operator<=> and remove redundant comparison
4548 operators for C++20.
4549 (match_results): Remove redundant operator!= for C++20.
4550 * include/std/string_view (basic_string_view): Define operator<=> and
4551 remove redundant comparison operators for C++20.
4552 * testsuite/21_strings/basic_string/operators/char/cmp_c++20.cc: New
4554 * testsuite/21_strings/basic_string/operators/wchar_t/cmp_c++20.cc:
4556 * testsuite/21_strings/basic_string_view/operations/copy/char/
4557 constexpr.cc: Initialize variable.
4558 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
4559 constexpr.cc: Likewise.
4560 * testsuite/21_strings/basic_string_view/operators/char/2.cc: Add
4561 dg-do directive and remove comments showing incorrect signatures.
4562 * testsuite/21_strings/basic_string_view/operators/wchar_t/2.cc:
4564 * testsuite/21_strings/basic_string_view/operators/char/cmp_c++20.cc:
4566 * testsuite/21_strings/basic_string_view/operators/wchar_t/cmp_c++20.cc:
4568 * testsuite/28_regex/sub_match/compare_c++20.cc: New test.
4570 2020-04-16 Jonathan Wakely <jwakely@redhat.com>
4572 * testsuite/20_util/unsynchronized_pool_resource/allocate.cc: Remove
4573 name of unused parameter.
4575 2020-04-15 Jonathan Wakely <jwakely@redhat.com>
4577 * include/bits/fs_dir.h (file_status): Define operator== for C++20.
4578 (directory_entry): Define operator<=> and remove redundant comparison
4579 operators for C++20.
4580 * include/bits/fs_fwd.h (space_info): Define operator== for C++20.
4581 * include/bits/fs_path.h (path): Define operator<=> and remove
4582 redundant comparison operators for C++20.
4583 * testsuite/27_io/filesystem/path/compare/compare.cc: Fix comment.
4584 * testsuite/27_io/filesystem/path/compare/lwg2936.cc: Likewise.
4585 * testsuite/27_io/filesystem/path/compare/path.cc: Likewise.
4586 * testsuite/27_io/filesystem/path/compare/strings.cc: Likewise.
4588 * include/bits/allocator.h (operator!=): Do not define for C++20.
4589 * include/bits/locale_classes.h (operator!=): Likewise.
4590 * include/bits/std_function.h (operator==(nullptr_t, const function&))
4591 (operator!=(const function&, nullptr_t))
4592 (operator!=(nullptr_t, const function&)): Likewise.
4593 * include/ext/bitmap_allocator.h (operator!=): Likewise.
4594 * include/ext/debug_allocator.h (operator!=): Likewise.
4595 * include/ext/extptr_allocator.h (operator!=): Likewise.
4596 * include/ext/malloc_allocator.h (operator!=): Likewise.
4597 * include/ext/mt_allocator.h (operator!=): Likewise.
4598 * include/ext/new_allocator.h (operator!=): Likewise.
4599 * include/ext/pool_allocator.h (operator!=): Likewise.
4600 * include/ext/throw_allocator.h (operator!=): Likewise.
4601 * include/std/bitset (bitset::operator!=): Likewise.
4602 * include/std/memory_resource (operator!=): Likewise.
4603 * include/std/scoped_allocator (operator!=): Likewise.
4605 * include/std/typeindex (operator<=>): Define for C++20.
4606 * testsuite/20_util/typeindex/comparison_operators_c++20.cc: New test.
4608 2020-04-14 Jonathan Wakely <jwakely@redhat.com>
4610 * libsupc++/compare (compare_three_way): Fix constraint so that
4611 BUILTIN-PTR-THREE-WAY does not require three_way_comparable_with.
4612 * testsuite/18_support/comparisons/object/builtin-ptr-three-way.cc:
4616 * include/bits/shared_ptr.h (operator<=>): Define for C++20.
4617 * include/bits/shared_ptr_base.h (operator<=>): Likewise.
4618 * include/bits/unique_ptr.h (operator<=>): Add inline specifier.
4619 * testsuite/20_util/shared_ptr/comparison/cmp_c++20.cc: New test.
4620 * testsuite/20_util/shared_ptr/comparison/less.cc: Do not expect
4621 std::less<A*> to be used when comparing std::shared_ptr<A> objects in
4625 * libsupc++/compare (__unspec): Add noexcept-specifier to constructor.
4626 * testsuite/18_support/comparisons/categories/94565.cc: New test.
4628 2020-04-13 Iain Sandoe <iain@sandoe.co.uk>
4630 * include/std/coroutine: Update coroutines builtin define,
4633 2020-04-09 Jonathan Wakely <jwakely@redhat.com>
4635 * libsupc++/compare (compare_three_way): Fix noexcept-specifier.
4636 (strong_order, weak_order, partial_order): Replace uses of <=> with
4637 compare_three_way function object (LWG 3324).
4638 * testsuite/18_support/comparisons/algorithms/partial_order.cc: Add
4639 equality operator so that X satisfies three_way_comparable.
4640 * testsuite/18_support/comparisons/algorithms/strong_order.cc:
4642 * testsuite/18_support/comparisons/algorithms/weak_order.cc: Likewise.
4644 * include/bits/unique_ptr.h (operator<=>): Define for C++20.
4645 * testsuite/20_util/default_delete/48631_neg.cc: Adjust dg-error line.
4646 * testsuite/20_util/default_delete/void_neg.cc: Likewise.
4647 * testsuite/20_util/unique_ptr/comparison/compare.cc: New test.
4648 * testsuite/20_util/unique_ptr/comparison/compare_c++20.cc: New test.
4650 2020-04-08 Jonathan Wakely <jwakely@redhat.com>
4652 * include/bits/slice_array.h (operator==(const slice&, const slice&)):
4654 * include/std/complex (operator==(const T&, const complex<T>&))
4655 (operator!=(const complex<T>&, const complex<T>&))
4656 (operator!=(const complex<T>&, const T&))
4657 (operator!=(const T&, const complex<T>&)): Do not declare for C++20.
4658 * testsuite/26_numerics/slice/compare.cc: New test.
4660 * include/std/charconv (to_chars_result, from_chars_result): Add
4661 defaulted equality comparisons for C++20.
4662 * testsuite/20_util/from_chars/compare.cc: New test.
4663 * testsuite/20_util/to_chars/compare.cc: New test.
4665 2020-04-07 Jonathan Wakely <jwakely@redhat.com>
4668 * include/std/charconv (__integer_to_chars_result_type)
4669 (__integer_from_chars_result_type): Use __or_ instead of __or_v_ to
4671 * testsuite/20_util/from_chars/1.cc: Run test as C++14 and replace
4672 use of std::string_view with std::string.
4673 * testsuite/20_util/from_chars/2.cc: Likewise.
4674 * testsuite/20_util/to_chars/1.cc: Likewise.
4675 * testsuite/20_util/to_chars/2.cc: Likewise.
4677 2020-04-06 Jonathan Wakely <jwakely@redhat.com>
4680 * include/bits/char_traits.h (__gnu_cxx::char_traits::move): Make it
4681 usable in constant expressions for C++20.
4682 (__gnu_cxx::char_traits::copy, __gnu_cxx::char_traits::assign): Add
4683 _GLIBCXX20_CONSTEXPR.
4684 (std::char_traits<char>, std::char_traits<wchar_t>)
4685 (std::char_traits<char8_t>): Make move, copy and assign usable in
4686 constant expressions for C++20.
4687 (std::char_traits<char16_t>, std::char_traits<char32_t>): Make move
4688 and copy usable in constant expressions for C++20.
4689 * include/std/string_view (basic_string_view::copy): Add
4690 _GLIBCXX20_CONSTEXPR.
4691 * testsuite/21_strings/basic_string_view/operations/copy/char/
4692 constexpr.cc: New test.
4693 * testsuite/21_strings/basic_string_view/operations/copy/wchar_t/
4694 constexpr.cc: New test.
4696 2020-04-05 Gerald Pfeifer <gerald@pfeifer.com>
4698 * doc/xml/manual/appendix_contributing.xml: Refer to Git
4699 documentation instead of Subversion. Switch to https.
4700 * doc/html/manual/appendix_contributing.html: Regenerate.
4702 2020-04-03 Jonathan Wakely <jwakely@redhat.com>
4705 * include/bits/ptr_traits.h (__to_address): Add special case for debug
4706 iterators, to avoid dereferenceable check.
4707 * testsuite/20_util/to_address/1_neg.cc: Adjust dg-error line number.
4708 * testsuite/20_util/to_address/debug.cc: New test.
4710 2020-04-01 Andrea Corallo <andrea.corallo@arm.com>
4712 * testsuite/experimental/net/execution_context/use_service.cc:
4713 Require pthread and gthreads.
4715 2020-04-01 Gerald Pfeifer <gerald@pfeifer.com>
4717 * doc/xml/manual/appendix_free.xml: Move "free books" list from
4719 * doc/html/manual/appendix_free.html: Regenerate.
4721 2020-03-31 Ville Voutilainen <ville.voutilainen@gmail.com>
4723 Library-side tests for parenthesized aggregate init
4728 * testsuite/20_util/allocator_traits/members/92878_92947.cc: New.
4729 * testsuite/20_util/any/assign/92878_92947.cc: Likewise.
4730 * testsuite/20_util/any/cons/92878_92947.cc: Likewise.
4731 * testsuite/20_util/is_constructible/92878_92947.cc: Likewise.
4732 * testsuite/20_util/optional/assignment/92878_92947.cc: Likewise.
4733 * testsuite/20_util/optional/cons/92878_92947.cc: Likewise.
4734 * testsuite/20_util/pair/cons/92878_92947.cc: Likewise.
4735 * testsuite/20_util/shared_ptr/creation/92878_92947.cc: Likewise.
4736 * testsuite/20_util/specialized_algorithms/construct_at/92878_92947.cc:
4738 * testsuite/20_util/unique_ptr/creation/92878_92947.cc: Likewise.
4739 * testsuite/20_util/uses_allocator/92878_92947.cc: Likewise.
4740 * testsuite/20_util/variant/92878_92947.cc: Likewise.
4741 * testsuite/23_containers/deque/modifiers/emplace/92878_92947.cc:
4743 * testsuite/23_containers/forward_list/modifiers/92878_92947.cc:
4745 * testsuite/23_containers/list/modifiers/emplace/92878_92947.cc:
4747 * testsuite/23_containers/map/modifiers/emplace/92878_92947.cc:
4749 * testsuite/23_containers/multimap/modifiers/emplace/92878_92947.cc:
4751 * testsuite/23_containers/multiset/modifiers/emplace/92878_92947.cc:
4753 * testsuite/23_containers/priority_queue/92878_92947.cc: Likewise.
4754 * testsuite/23_containers/queue/92878_92947.cc: Likewise.
4755 * testsuite/23_containers/set/modifiers/emplace/92878_92947.cc:
4757 * testsuite/23_containers/stack/92878_92947.cc: Likewise.
4758 * testsuite/23_containers/unordered_map/modifiers/92878_92947.cc:
4760 * testsuite/23_containers/unordered_multimap/modifiers/92878_92947.cc:
4762 * testsuite/23_containers/unordered_multiset/modifiers/92878_92947.cc:
4764 * testsuite/23_containers/unordered_set/modifiers/92878_92947.cc:
4766 * testsuite/23_containers/vector/modifiers/emplace/92878_92947.cc:
4769 2020-03-28 Jonathan Wakely <jwakely@redhat.com>
4771 * testsuite/20_util/is_constructible/value-2.cc: Fix test to account
4772 for changes due to parenthesized aggregate-initialization in C++20.
4773 * testsuite/20_util/time_point/cons/81468.cc: Fix test to not clash
4774 with std::chrono::sys_time in C++20.
4776 * include/bits/stl_iterator.h (reverse_iterator): Use requires-clause
4777 to constrain C++20 versions of comparison operators. Fix backwards
4778 logic of relational operators.
4779 (move_iterator): Use requires-clause to constrain comparison operators
4780 in C++20. Do not declare non-standard same-type overloads for C++20.
4781 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: Check result
4782 of comparisons and check using greedy_ops type.
4783 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: Likewise.
4784 * testsuite/24_iterators/move_iterator/greedy_ops.cc: Remove redundant
4785 main function from compile-only test.
4786 * testsuite/24_iterators/reverse_iterator/greedy_ops.cc: Likewise.
4788 2020-03-27 Jonathan Wakely <jwakely@redhat.com>
4790 * include/bits/range_cmp.h (__cpp_lib_ranges): Define.
4791 * include/bits/stl_iterator.h: Check value of __cpp_concepts so that
4792 C++20 concepts are required.
4793 * include/bits/stl_iterator_base_types.h: Likewise.
4794 * include/std/concepts: Likewise.
4795 * include/std/version: Likewise.
4796 * testsuite/std/ranges/headers/ranges/synopsis.cc: Check feature test
4799 * include/bits/stl_iterator.h (reverse_iterator::iterator_concept)
4800 (reverse_iterator::iterator_category): Define for C++20.
4801 (reverse_iterator): Define comparison operators correctly for C++20.
4802 (__normal_iterator): Add constraints to comparison operators for C++20.
4803 (move_iterator::operator++(int)) [__cpp_lib_concepts]: Define new
4804 overload for input iterators.
4805 (move_iterator): Add constraints to comparison operators for C++20.
4806 Define operator<=> for C++20.
4807 * testsuite/24_iterators/move_iterator/input_iterator.cc: New test.
4808 * testsuite/24_iterators/move_iterator/move_only.cc: New test.
4809 * testsuite/24_iterators/move_iterator/rel_ops_c++20.cc: New test.
4810 * testsuite/24_iterators/reverse_iterator/rel_ops_c++20.cc: New test.
4812 * include/bits/iterator_concepts.h (__detail::__decay_copy)
4813 (__detail::__member_begin, __detail::__adl_begin): Move here from
4814 <bits/range_access.h>.
4815 (__detail::__ranges_begin, __detail::__range_iter_t): Define.
4816 * bits/range_access.h (__cust_access::__decay_copy)
4817 (__cust_access::__member_begin, __cust_access::__adl_begin): Move to
4818 <bits/iterator_concepts.h>.
4819 (ranges::iterator_t): Use __detail::__range_iter_t.
4820 * include/bits/stl_iterator.h (back_insert_iterator): Simplify
4821 conditional compilation. Add _GLIBCXX20_CONSTEXPR to all members.
4822 (front_insert_iterator): Likewise.
4823 (insert_iterator): Implement changes from P0896R4 for C++20.
4824 * testsuite/24_iterators/back_insert_iterator/constexpr.cc: New test.
4825 * testsuite/24_iterators/front_insert_iterator/constexpr.cc: New test.
4826 * testsuite/24_iterators/headers/iterator/synopsis_c++17.cc: Adjust
4827 for inclusion in synopsis_c++20.cc which expects different signatures
4828 for some function templates.
4829 * testsuite/24_iterators/insert_iterator/constexpr.cc: New test.
4831 * include/std/type_traits (__is_array_convertible): Move definition
4832 to immediately after is_convertible.
4834 2020-03-26 Jonathan Wakely <jwakely@redhat.com>
4836 * include/std/chrono (chrono::days, chrono::weeks, chrono::years)
4837 (chrono::months, chrono::sys_days, chrono::local_t)
4838 (chrono::local_time, chrono::local_seconds, chrono::local_days):
4840 (chrono::time_point): Add missing static assert.
4841 * testsuite/20_util/time_point/requirements/duration_neg.cc: New test.
4842 * testsuite/std/time/clock/file/overview.cc: New test.
4843 * testsuite/std/time/clock/file/members.cc: New test.
4844 * testsuite/std/time/syn_c++20.cc: New test.
4846 2020-03-25 Mike Crowe <mac@mcrowe.com>
4848 * testsuite/30_threads/shared_timed_mutex/try_lock_until/1.cc: New
4850 * testsuite/30_threads/shared_timed_mutex/try_lock_until/2.cc: New
4853 2020-03-25 Jonathan Wakely <jwakely@redhat.com>
4855 * include/bits/fs_fwd.h (filesystem::__file_clock): Move to ...
4856 * include/std/chrono (filesystem::__file_clock): Here.
4857 (filesystem::__file_clock::from_sys, filesystem::__file_clock::to_sys):
4858 Define public member functions for C++20.
4859 (is_clock, is_clock_v): Define traits for C++20.
4860 * include/std/condition_variable (condition_variable::wait_until): Add
4861 check for valid clock.
4862 * include/std/future (_State_baseV2::wait_until): Likewise.
4863 * include/std/mutex (__timed_mutex_impl::_M_try_lock_until): Likewise.
4864 * include/std/shared_mutex (shared_timed_mutex::try_lock_shared_until):
4866 * include/std/thread (this_thread::sleep_until): Likewise.
4867 * testsuite/30_threads/condition_variable/members/2.cc: Qualify
4868 slow_clock with new namespace.
4869 * testsuite/30_threads/condition_variable/members/clock_neg.cc: New
4871 * testsuite/30_threads/condition_variable_any/members/clock_neg.cc:
4873 * testsuite/30_threads/future/members/clock_neg.cc: New test.
4874 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/3.cc:
4875 Qualify slow_clock with new namespace.
4876 * testsuite/30_threads/recursive_timed_mutex/try_lock_until/
4877 clock_neg.cc: New test.
4878 * testsuite/30_threads/shared_future/members/clock_neg.cc: New
4880 * testsuite/30_threads/shared_lock/locking/clock_neg.cc: New test.
4881 * testsuite/30_threads/shared_timed_mutex/try_lock_until/clock_neg.cc:
4883 * testsuite/30_threads/timed_mutex/try_lock_until/3.cc: Qualify
4884 slow_clock with new namespace.
4885 * testsuite/30_threads/timed_mutex/try_lock_until/4.cc: Likewise.
4886 * testsuite/30_threads/timed_mutex/try_lock_until/clock_neg.cc: New
4888 * testsuite/30_threads/unique_lock/locking/clock_neg.cc: New test.
4889 * testsuite/std/time/traits/is_clock.cc: New test.
4890 * testsuite/util/slow_clock.h (slow_clock): Move to __gnu_test
4893 2020-03-21 Jonathan Wakely <jwakely@redhat.com>
4896 * include/experimental/bits/fs_path.h (path::generic_string<C,T,A>()):
4897 * testsuite/experimental/filesystem/path/generic/generic_string.cc:
4898 Improve test coverage.
4901 * include/bits/fs_path.h (path::_S_str_convert): Replace first
4902 parameter with basic_string_view so that strings with different
4903 allocators can be accepted.
4904 (path::generic_string<C,T,A>()): Use basic_string object that uses the
4905 right allocator type.
4906 * testsuite/27_io/filesystem/path/generic/94242.cc: New test.
4907 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Improve
4910 2020-03-18 Jonathan Wakely <jwakely@redhat.com>
4913 * include/std/type_traits (__is_nt_default_constructible_atom): Remove.
4914 (__is_nt_default_constructible_impl): Remove.
4915 (__is_nothrow_default_constructible_impl): Remove.
4916 (__is_nt_constructible_impl): Add bool template parameter. Adjust
4917 partial specializations.
4918 (__is_nothrow_constructible_impl): Replace class template with alias
4920 (is_nothrow_default_constructible): Derive from alias template
4921 __is_nothrow_constructible_impl instead of
4922 __is_nothrow_default_constructible_impl.
4923 * testsuite/20_util/is_nothrow_constructible/94003.cc: New test.
4925 * include/std/stop_token (stop_token::_Stop_state_ref): Define
4926 comparison operators explicitly if the compiler won't synthesize them.
4928 * include/bits/stl_algobase.h (__lexicographical_compare_aux): Check
4929 __cpp_lib_concepts before using iter_reference_t.
4930 * include/bits/stream_iterator.h (istream_iterator): Check
4931 __cpp_lib_concepts before using default_sentinel_t.
4932 * include/bits/streambuf_iterator.h (istreambuf_iterator): Likewise.
4935 * include/experimental/executor (executor::executor(Executor)): Call
4936 make_shared directly instead of _M_create. Create _Tgt1 object.
4937 (executor::executor(allocator_arg_t, const ProtoAlloc&, Executor)):
4938 Call allocate_shared directly instead of _M_create. Create _Tgt2
4940 (executor::target_type): Add cast needed for new _Tgt interface.
4941 (executor::target): Define when RTTI is disabled. Use _Tgt::_M_func.
4942 (executor::_Tgt): Define the same interface whether RTTI is enabled or
4944 (executor::_Tgt::target_type, executor::_Tgt::target): Do not use
4945 std::type_info in the interface.
4946 (executor::_Tgt::_M_func): Add data member.
4947 (executor::_TgtImpl): Replace with _Tgt1 and _Tgt2 class templates.
4948 (executor::_Tgt1::_S_func): Define function to access target without
4950 (executor::_M_create): Remove.
4951 (operator==, operator!=): Simplify comparisons for executor.
4952 * include/experimental/socket (is_error_code_enum<socket_errc>):
4953 Define specialization before use.
4954 * testsuite/experimental/net/executor/1.cc: New test.
4956 2020-03-16 Jonathan Wakely <jwakely@redhat.com>
4959 * include/experimental/executor (service_already_exists): Add default
4960 constructor. Declare make_service to be a friend.
4961 * testsuite/experimental/net/execution_context/make_service.cc: New
4964 2020-03-12 Jonathan Wakely <jwakely@redhat.com>
4966 * testsuite/tr1/8_c_compatibility/cstdlib/functions.cc: Do not pass
4967 a null pointer to functions with nonnull(1) attribute.
4969 2020-03-11 Patrick Palka <ppalka@redhat.com>
4971 * include/std/ranges (split_view::_OuterIter::_OuterIter): Typo fix,
4972 'address' -> 'std::__addressof'.
4973 * testsuite/std/ranges/adaptors/split.cc: Test taking the split_view of
4974 a non-forward input_range.
4975 * testsuite/util/testsuite_iterators.h (output_iterator_wrapper): Make
4976 default constructor protected instead of deleted, like with
4977 input_iterator_wrapper.
4978 (test_range::iterator): Add comment explaining that this type is used
4979 only when the underlying wrapper is input_iterator_wrapper or
4980 output_iterator_wrapper. Remove delegating defaulted constructor so
4981 that the inherited default constructor is used instead.
4983 LWG 3286 ranges::size is not required to be valid after a call to
4984 ranges::begin on an input range
4985 * include/std/ranges (subrange::subrange): Split single-argument
4986 constructor into two, one constrained by _S_store_size and another by
4988 (take_view::begin): Call size() before calling ranges::begin(_M_base).
4989 * testsuite/std/ranges/adaptors/lwg3286.cc: New test.
4990 * testsuite/std/ranges/subrange/lwg3286.cc: New test.
4992 2020-03-10 Jonathan Wakely <jwakely@redhat.com>
4994 * include/std/ranges (split_view::_OuterIter::__at_end): Use __current
4995 instead of _M_current.
4996 (split_view::_OuterIter::operator++): Likewise.
4998 * include/std/ranges (transform_view::_Iterator::__iter_move): Remove.
4999 (transform_view::_Iterator::operator*): Add noexcept-specifier.
5000 (transform_view::_Iterator::iter_move): Inline __iter_move body here.
5001 (split_view::_OuterIter::__current): Add noexcept.
5002 (split_view::_InnerIter::__iter_swap): Remove.
5003 (split_view::_InnerIter::__iter_move): Remove.
5004 (split_view::_InnerIter::_M_i_current): New accessors.
5005 (split_view::_InnerIter::__at_end): Use _M_i_current().
5006 (split_view::_InnerIter::operator*): Likewise.
5007 (split_view::_InnerIter::operator++): Likewise.
5008 (iter_move(const _InnerIter&)): Likewise.
5009 (iter_swap(const _InnerIter&, const _InnerIter&)): Likewise.
5010 * testsuite/std/ranges/adaptors/split.cc: Check noexcept-specifier
5011 for iter_move and iter_swap on split_view's inner iterator.
5014 * include/std/ranges (ranges::transform_view::_Iterator::iter_move):
5015 Change expression in noexcept-specifier to match function body.
5017 * testsuite/23_containers/unordered_set/allocator/ext_ptr.cc: Add
5018 comment explaining multiple dg-do directives.
5019 * testsuite/24_iterators/ostream_iterator/1.cc: Fix do-do directive
5020 so test is run as well as compiled.
5022 2020-03-09 Jonathan Wakely <jwakely@redhat.com>
5025 * src/c++17/fs_path.cc (path::operator+=(const path&)): Add kluge to
5026 handle concatenations that change the type of the first component.
5027 (path::operator+=(basic_string_view<value_type>)): Likewise.
5028 * testsuite/27_io/filesystem/path/concat/94063.cc: New test.
5030 2020-03-06 Patrick Palka <ppalka@redhat.com>
5032 * include/std/ranges (join_view::_Sentinel<_Const>): Befriend
5033 join_view::_Sentinel<!_Const>.
5034 * testsuite/std/ranges/adaptors/join.cc: Augment test.
5037 * include/bits/range_access.h (__cust_access::_Empty::operator()):
5038 Declare return type to be bool instead of auto.
5039 * testsuite/std/ranges/adaptors/93978.cc: New test.
5041 2020-03-06 Jonathan Wakely <jwakely@redhat.com>
5044 * include/std/shared_mutex [!PTHREAD_RWLOCK_INITIALIZER]
5045 (__shared_mutex_pthread::__shared_mutex_pthread()): Remove incorrect
5046 second argument to __glibcxx_rwlock_init.
5047 * testsuite/30_threads/shared_timed_mutex/94069.cc: New test.
5050 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Adjust
5051 test to not fail due to PR 94063.
5052 * testsuite/27_io/filesystem/path/generic/utf.cc: Likewise.
5053 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: Likewise.
5055 2020-03-06 Andreas Krebbel <krebbel@linux.ibm.com>
5057 * src/c++11/system_error.cc: Omit the ENOTSUP case statement if it
5060 2020-03-05 Jonathan Wakely <jwakely@redhat.com>
5062 * testsuite/27_io/filesystem/operations/all.cc: Mark unused variable.
5063 * testsuite/27_io/filesystem/operations/copy.cc: Fix typo.
5064 * testsuite/experimental/filesystem/operations/copy.cc: Likewise.
5065 * testsuite/27_io/filesystem/operations/file_size.cc: Use correct type
5066 for return value, and in comparison.
5067 * testsuite/experimental/filesystem/operations/file_size.cc: Likewise.
5070 * include/std/string_view: Include <bits/ostream_insert.h>.
5071 * testsuite/21_strings/basic_string_view/inserters/94051.cc: New test.
5073 2020-03-04 Jonathan Wakely <jwakely@redhat.com>
5075 * include/bits/cpp_type_traits.h (__memcpyable): Fix comment.
5077 2020-03-04 Patrick Palka <ppalka@redhat.com>
5080 * include/bits/ranges_algobase.h (__fill_n_fn::operator()): Refine
5081 condition for when to use memset, making sure to additionally check that
5082 the output pointer's value type is a non-volatile byte type. Instead of
5083 requiring that the fill type is a byte type, just require that it's an
5085 * testsuite/20_util/specialized_algorithms/uninitialized_fill/94017.cc:
5087 * testsuite/20_util/specialized_algorithms/uninitialized_fill_n/94017.cc:
5089 * testsuite/25_algorithms/fill/94013.cc: Uncomment part of test that was
5090 blocked by PR 94017.
5091 * testsuite/25_algorithms/fill/94017.cc: New test.
5092 * testsuite/25_algorithms/fill_n/94017.cc: New test.
5094 LWG 3355 The memory algorithms should support move-only input iterators
5096 * include/bits/ranges_uninitialized.h
5097 (__uninitialized_copy_fn::operator()): Use std::move to avoid attempting
5098 to copy __ifirst, which could be a move-only input iterator. Use
5099 operator- instead of ranges::distance to compute distance from a sized
5101 (__uninitialized_copy_n_fn::operator()): Likewise.
5102 (__uninitialized_move_fn::operator()): Likewise.
5103 (__uninitialized_move_n_fn::operator()): Likewise.
5104 (__uninitialized_destroy_fn::operator()): Use std::move to avoid
5105 attempting to copy __first.
5106 (__uninitialized_destroy_n_fn::operator()): Likewise.
5107 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
5109 * .../specialized_algorithms/uninitialized_copy/constrained.cc:
5111 * .../specialized_algorithms/uninitialized_move/constrained.cc:
5114 * testsuite/util/testsuite_iterators.h (test_range::get_iterator): Make
5115 protected instead of private.
5116 (test_sized_range_sized_sent): New.
5118 * testsuite/util/testsuite_iterators.h (input_iterator_wrapper_nocopy):
5119 New testsuite iterator.
5120 * testsuite/24_iterators/counted_iterator/lwg3389.cc: use it.
5121 * testsuite/24_iterators/move_iterator/lwg3390.cc: Likewise.
5123 * include/bits/ranges_uninitialized.h
5124 (uninitialized_copy_fn::operator()): Pass a reference type as the first
5125 argument to is_nothrow_assignable_v.
5126 (uninitialized_copy_fn::operator()): Likewise.
5127 (uninitialized_move_fn::operator()): Likewise. Return an in_out_result
5128 with the input iterator stripped of its move_iterator.
5129 (uninitialized_move_n_fn::operator()): Likewise.
5130 (uninitialized_fill_fn::operator()): Pass a reference type as the first
5131 argument to is_nothrow_assignable_v.
5132 (uninitialized_fill_n_fn::operator()): Likewise.
5134 2020-03-03 Jonathan Wakely <jwakely@redhat.com>
5137 * include/bits/cpp_type_traits.h (__memcpyable, __memcmpable): New
5138 traits to control when to use memmove and memcmp optimizations.
5139 (__is_nonvolatile_trivially_copyable): New helper trait.
5140 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Do not
5141 use memcmp optimization with volatile data.
5142 * include/bits/ranges_algobase.h (__equal_fn): Use __memcmpable.
5143 (__copy_or_move, __copy_or_move_backward): Use __memcpyable.
5144 * include/bits/stl_algobase.h (__copy_move_a2): Use __memcpyable.
5145 (__copy_move_backward_a2): Likewise.
5146 (__equal_aux1): Use __memcmpable.
5147 (__lexicographical_compare_aux): Do not use memcmp optimization with
5149 * testsuite/25_algorithms/copy/94013.cc: New test.
5150 * testsuite/25_algorithms/copy_backward/94013.cc: New test.
5151 * testsuite/25_algorithms/equal/94013.cc: New test.
5152 * testsuite/25_algorithms/fill/94013.cc: New test.
5153 * testsuite/25_algorithms/lexicographical_compare/94013.cc: New test.
5154 * testsuite/25_algorithms/move/94013.cc: New test.
5155 * testsuite/25_algorithms/move_backward/94013.cc: New test.
5157 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
5158 Avoid redundant iterator comparisons (LWG 3410).
5160 2020-03-02 Jonathan Wakely <jwakely@redhat.com>
5163 * include/bits/stl_algobase.h (__memcmp): Allow pointer types to
5165 * testsuite/25_algorithms/lexicographical_compare/uchar.cc: New test.
5167 * include/std/ranges (__detail::__maybe_empty_t): Rename to
5169 (__adaptor::_RangeAdaptor, join_view, split_view): Use new name.
5171 * include/bits/ranges_algo.h (shift_right): Add 'typename' to
5174 2020-03-01 H.J. Lu <hongjiu.lu@intel.com>
5176 * config/abi/post/x86_64-linux-gnu/x32/baseline_symbols.txt: Updated.
5178 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
5180 * testsuite/17_intro/headers/c++1998/charset.cc: Skip on *-*-hpux*.
5181 * testsuite/17_intro/headers/c++2011/charset.cc: Likewise.
5182 * testsuite/17_intro/headers/c++2014/charset.cc: Likewise.
5183 * testsuite/17_intro/headers/c++2017/charset.cc: Likewise.
5184 * testsuite/17_intro/headers/c++2020/charset.cc: Likewise.
5186 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
5187 Add libatomic option.
5188 * testsuite/30_threads/jthread/jthread.cc: Likewise.
5190 2020-02-29 François Dumont <fdumont@gcc.gnu.org>
5192 * include/bits/stl_algo.h
5193 (__find_if, __count_if, __is_permutation, std::is_permutation): Move...
5194 * include/bits/stl_algobase.h: ...here.
5195 * include/bits/hashtable_policy.h: Remove <bits/stl_algo.h> include.
5197 2020-02-29 John David Anglin <danglin@gcc.gnu.org>
5199 * testsuite/30_threads/stop_token/stop_callback.cc: Add libatomic
5201 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc:
5203 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: Likewise.
5204 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: Likewise.
5205 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: Likewise.
5206 * testsuite/30_threads/stop_token/stop_source.cc: Likewise.
5207 * testsuite/30_threads/stop_token/stop_source/assign.cc: Likewise.
5208 * testsuite/30_threads/stop_token/stop_token.cc: Likewise.
5209 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc:
5213 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
5215 2020-02-28 Patrick Palka <ppalka@redhat.com>
5218 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
5219 Fix condition for when to use memcmp, making it consistent with the
5220 corresponding condition used in std::lexicographical_compare.
5221 * testsuite/25_algorithms/lexicographical_compare/93972.cc: New test.
5223 * testsuite/26_numerics/headers/numeric/synopsis.cc: Add signatures for
5224 functions introduced in C++11, C++17 and C++2a. Add 'constexpr' to
5225 existing signatures for C++2a.
5227 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
5229 * testsuite/24_iterators/range_operations/advance_debug_neg.cc: Run
5230 test instead of just compiling it.
5232 2020-02-28 Patrick Palka <ppalka@redhat.com>
5234 * include/std/ranges (reverse_view::_S_needs_cached_begin): Set to false
5235 whenever the underlying range models common_range.
5237 * include/std/ranges (__detail::_CachedPosition): New struct.
5238 (views::filter_view::_S_needs_cached_begin): New member variable.
5239 (views::filter_view::_M_cached_begin): New member variable.
5240 (views::filter_view::begin): Use _M_cached_begin to cache its
5242 (views::drop_view::_S_needs_cached_begin): New static member variable.
5243 (views::drop_view::_M_cached_begin): New member variable.
5244 (views::drop_view::begin): Use _M_cached_begin to cache its result
5245 when _S_needs_cached_begin.
5246 (views::drop_while_view::_M_cached_begin): New member variable.
5247 (views::drop_while_view::begin): Use _M_cached_begin to cache its
5249 (views::reverse_view::_S_needs_cached_begin): New static member
5251 (views::reverse_view::_M_cached_begin): New member variable.
5252 (views::reverse_view::begin): Use _M_cached_begin to cache its result
5253 when _S_needs_cached_begin.
5254 * testsuite/std/ranges/adaptors/drop.cc: Augment test to check that
5255 drop_view::begin caches its result.
5256 * testsuite/std/ranges/adaptors/drop_while.cc: Augment test to check
5257 that drop_while_view::begin caches its result.
5258 * testsuite/std/ranges/adaptors/filter.cc: Augment test to check that
5259 filter_view::begin caches its result.
5260 * testsuite/std/ranges/adaptors/reverse.cc: Augment test to check that
5261 reverse_view::begin caches its result.
5263 2020-02-28 Jonathan Wakely <jwakely@redhat.com>
5265 * testsuite/27_io/filesystem/operations/last_write_time.cc: Fixes for
5266 filesystems that silently truncate timestamps.
5267 * testsuite/experimental/filesystem/operations/last_write_time.cc:
5270 * testsuite/21_strings/basic_string/cons/char/1.cc: Disable
5271 -Wstringop-overflow warnings.
5273 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
5275 * testsuite/lib/libstdc++.exp (v3_target_compile): Add
5276 -fdiagnostics-urls=never to options.
5278 2020-02-27 Patrick Palka <ppalka@redhat.com>
5280 * include/std/ranges (transform_view::_Iterator<_Const>): Befriend
5282 (transform_view::_Sentinel<_Const>): Befriend _Sentinel<!_Const>.
5283 (take_view::_Sentinel<_Const>): Likewise.
5284 (take_while_view::_Sentinel<_Const>): Likewise.
5285 (split_view::_OuterIter<_Const>): Befriend _OuterIter<!_Const>.
5286 * testsuite/std/ranges/adaptors/split.cc: Augment test.
5287 * testsuite/std/ranges/adaptors/take.cc: Augment test.
5288 * testsuite/std/ranges/adaptors/take_while.cc: Augment test.
5289 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
5291 * testsuite/25_algorithms/copy/constrained.cc: Don't assume that the
5292 base() of a vector<>::iterator is a pointer.
5293 * testsuite/25_algorithms/copy_backward/constrained.cc: Likewise.
5294 * testsuite/25_algorithms/move/constrained.cc: Likewise.
5295 * testsuite/25_algorithms/move_backward/constrained.cc: Likewise.
5296 * testsuite/25_algorithms/inplace_merge/constrained.cc: Use foo.data()
5298 * testsuite/25_algorithms/partial_sort/constrained.cc: Likewise.
5299 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: Likewise.
5300 * testsuite/25_algorithms/shuffle/constrained.cc: Likewise.
5301 * testsuite/25_algorithms/sort/constrained.cc: Likewise.
5302 * testsuite/25_algorithms/stable_sort/constrained.cc: Likewise.
5304 2020-02-27 Jonathan Wakely <jwakely@redhat.com>
5306 * include/debug/array (operator<=>): Define for C++20.
5307 * testsuite/23_containers/array/tuple_interface/get_debug_neg.cc:
5308 Adjust dg-error line numbers.
5309 * testsuite/23_containers/array/tuple_interface/
5310 tuple_element_debug_neg.cc: Likewise.
5312 * testsuite/23_containers/span/back_assert_neg.cc: Add #undef before
5313 defining _GLIBCXX_ASSERTIONS.
5314 * testsuite/23_containers/span/first_2_assert_neg.cc: Likewise.
5315 * testsuite/23_containers/span/first_assert_neg.cc: Likewise.
5316 * testsuite/23_containers/span/front_assert_neg.cc: Likewise.
5317 * testsuite/23_containers/span/index_op_assert_neg.cc: Likewise.
5318 * testsuite/23_containers/span/last_2_assert_neg.cc: Likewise.
5319 * testsuite/23_containers/span/last_assert_neg.cc: Likewise.
5320 * testsuite/23_containers/span/subspan_2_assert_neg.cc: Likewise.
5321 * testsuite/23_containers/span/subspan_3_assert_neg.cc: Likewise.
5322 * testsuite/23_containers/span/subspan_4_assert_neg.cc: Likewise.
5323 * testsuite/23_containers/span/subspan_5_assert_neg.cc: Likewise.
5324 * testsuite/23_containers/span/subspan_6_assert_neg.cc: Likewise.
5325 * testsuite/23_containers/span/subspan_assert_neg.cc: Likewise.
5327 * include/debug/string (__gnu_debug::basic_string::insert): Fix for
5328 C++98 where the member function of the base class returns void.
5330 * testsuite/util/testsuite_iterators.h (forward_iterator_wrapper): Add
5331 equality comparisons that support value-initialized iterators.
5333 * include/bits/boost_concept_check.h (__function_requires): Add
5334 _GLIBCXX14_CONSTEXPR.
5335 * testsuite/25_algorithms/min/concept_checks.cc: New test.
5337 2020-02-26 Patrick Palka <ppalka@redhat.com>
5340 * include/std/ranges (split_view::_InnerIter::operator==): Compare
5341 the operands' _M_i rather than their _M_i.current().
5342 * testsuite/std/ranges/adaptors/split.cc: Augment test.
5344 P1645R1 constexpr for <numeric> algorithms
5345 * include/bits/stl_numeric.h (iota, accumulate, inner_product,
5346 partial_sum, adjacent_difference): Make conditionally constexpr for
5348 * include/std/numeric (__cpp_lib_constexpr_numeric): Define this feature
5350 (reduce, transform_reduce, exclusive_scan, inclusive_scan,
5351 transform_exclusive_scan, transform_inclusive_scan): Make conditionally
5352 constexpr for C++20.
5353 * include/std/version (__cpp_lib_constexpr_numeric): Define.
5354 * testsuite/26_numerics/accumulate/constexpr.cc: New test.
5355 * testsuite/26_numerics/adjacent_difference/constexpr.cc: Likewise.
5356 * testsuite/26_numerics/exclusive_scan/constexpr.cc: Likewise.
5357 * testsuite/26_numerics/inclusive_scan/constexpr.cc: Likewise.
5358 * testsuite/26_numerics/inner_product/constexpr.cc: Likewise.
5359 * testsuite/26_numerics/iota/constexpr.cc: Likewise.
5360 * testsuite/26_numerics/partial_sum/constexpr.cc: Likewise.
5361 * testsuite/26_numerics/reduce/constexpr.cc: Likewise.
5362 * testsuite/26_numerics/transform_exclusive_scan/constexpr.cc: Likewise.
5363 * testsuite/26_numerics/transform_inclusive_scan/constexpr.cc: Likewise.
5364 * testsuite/26_numerics/transform_reduce/constexpr.cc: Likewise.
5366 2020-02-26 Jonathan Wakely <jwakely@redhat.com>
5368 * include/bits/ranges_algo.h (__lexicographical_compare_fn): Declare
5369 variables in smaller scope and avoid calling ranges::distance when we
5370 know they are pointers. Remove statically-unreachable use of
5371 __builtin_unreachable().
5372 * include/bits/stl_algobase.h (__lexicographical_compare::__lc):
5375 * include/std/ranges (__detail::__maybe_empty_t): Define new helper
5377 (__detail::__maybe_const_t): Likewise.
5378 (__adaptor::_RangeAdaptor): Use __maybe_empty_t.
5379 (transform_view, take_view, take_while_view, elements_view): Use
5381 (join_view, split_view): Use both.
5383 2020-02-25 Patrick Palka <ppalka@redhat.com>
5385 LWG 3397 basic_istream_view::iterator should not provide
5387 * include/std/ranges (basic_istream_view:_Iterator::iterator_category):
5389 (basic_istream_view:_Iterator::iterator_concept): ... this.
5390 * testsuite/std/ranges/istream_view.cc: Augment test.
5392 LWG 3325 Constrain return type of transformation function for
5394 * include/std/ranges (transform_view): Constrain the return type of the
5395 transformation function as per LWG 3325.
5396 * testsuite/std/ranges/adaptors/lwg3325_neg.cc: New test.
5398 LWG 3313 join_view::_Iterator::operator-- is incorrectly constrained
5399 * include/std/ranges (join_view::_Iterator::operator--): Require that
5400 range_reference_t<_Base> models common_range.
5401 * testsuite/std/ranges/adaptors/lwg3313_neg.cc: New test.
5403 LWG 3301 transform_view::_Iterator has incorrect iterator_category
5404 * include/std/ranges (transform_view::_Iterator::_S_iter_cat): Adjust
5405 determination of iterator_category as per LWG 3301.
5406 * testsuite/std/ranges/adaptors/transform.cc: Augment test.
5408 LWG 3292 iota_view is under-constrained
5409 * include/std/ranges (iota_view): Require that _Winc models semiregular
5411 * testsuite/std/ranges/iota/lwg3292_neg.cc: New test.
5413 2020-02-25 Jonathan Wakely <jwakely@redhat.com>
5415 * include/bits/ranges_algobase.h (__copy_or_move): Do not use memmove
5416 during constant evaluation. Call __builtin_memmove directly instead of
5418 (__copy_or_move_backward): Likewise.
5419 * include/bits/stl_algobase.h (__memmove): Remove.
5420 (__copy_move<M, true, random_access_iterator_tag>::__copy_m)
5421 (__copy_move_backward<M, true, random_access_iterator_tag>::__copy_m):
5422 Use __builtin_memmove directly instead of __memmove.
5423 (__copy_move_a2): Do not use memmove during constant evaluation.
5424 (__copy_move_backward_a2): Use _IsMove constant to select correct
5425 __copy_move_backward specialization.
5426 * testsuite/25_algorithms/copy_backward/constexpr.cc: Check for copies
5427 begin turned into moves during constant evaluation.
5429 * testsuite/25_algorithms/move_backward/93872.cc: Add test left out of
5433 * include/bits/stl_algobase.h (__memmove): Cast away const before
5434 doing move assignment.
5435 * testsuite/25_algorithms/move/93872.cc: New test.
5436 * testsuite/25_algorithms/move_backward/93872.cc: New test.
5438 2020-02-24 Patrick Palka <ppalka@redhat.com>
5441 * include/bits/ranges_algobase.h (__copy_or_move,
5442 __copy_or_move_backward): Don't inspect the iter_value_t of the output
5443 iterator, instead inspect its iterator_traits directly.
5444 * include/bits/stl_iterator.h (back_insert_iterator::container):
5445 Conditionally initialize.
5446 (back_insert_iterator::difference_type): Conditionally define.
5447 (back_insert_iterator::back_insert_iterator): Conditionally define this
5448 default constructor.
5449 (front_insert_iterator::container): Conditionally initialize.
5450 (front_insert_iterator::difference_type): Conditionally define.
5451 (front_insert_iterator::front_insert_iterator): Conditionally define
5452 this default constructor.
5453 * 24_iterators/back_insert_iterator/pr93884.cc: New test.
5454 * 24_iterators/front_insert_iterator/pr93884.cc: New test.
5456 P0769R2 Add shift to <algorithm>
5457 * include/bits/ranges_algo.h (shift_left, shift_right): New.
5458 * testsuite/25_algorithms/shift_left/1.cc: New test.
5459 * testsuite/25_algorithms/shift_right/1.cc: New test.
5461 2020-02-24 Jonathan Wakely <jwakely@redhat.com>
5463 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
5464 Make noexcept-specifier conditional.
5465 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc: Check
5468 * include/bits/stream_iterator.h (istream_iterator(default_sentinel_t)):
5470 (operator==(istream_iterator, default_sentinel_t)): Add operator.
5471 (ostream_iterator::difference_type): Define to ptrdiff_t for C++20.
5472 * include/bits/streambuf_iterator.h
5473 (istreambuf_iterator(default_sentinel_t)): Add constructor.
5474 (operator==(istreambuf_iterator, default_sentinel_t)): Add operator.
5475 * testsuite/24_iterators/istream_iterator/cons/sentinel.cc:
5477 * testsuite/24_iterators/istream_iterator/sentinel.cc: New test.
5478 * testsuite/24_iterators/istreambuf_iterator/cons/sentinel.cc:
5480 * testsuite/24_iterators/istreambuf_iterator/sentinel.cc: New test.
5482 * include/std/ranges (__deep_const_range, __enable_view_impl): Remove.
5483 (ranges::enable_view): Simplify (LWG 3326).
5484 * include/bits/range_access.h (ranges::enable_view): Declare.
5485 * include/bits/regex.h (__enable_view_impl): Remove partial
5487 * include/bits/stl_multiset.h (__enable_view_impl): Likewise.
5488 * include/bits/stl_set.h (__enable_view_impl): Likewise.
5489 * include/bits/unordered_set.h (__enable_view_impl): Likewise.
5490 * include/debug/multiset.h (__enable_view_impl): Likewise.
5491 * include/debug/set.h (__enable_view_impl): Likewise.
5492 * include/debug/unordered_set (__enable_view_impl): Likewise.
5493 * include/experimental/string_view (ranges::enable_view): Define
5494 partial specialization.
5495 * include/std/span (ranges::enable_view): Likewise.
5496 * include/std/string_view (ranges::enable_view): Likewise.
5497 * testsuite/std/ranges/view.cc: Check satisfaction of updated concept.
5499 2020-02-21 Jonathan Wakely <jwakely@redhat.com>
5501 * include/std/optional (operator<=>(optional<T>, optional<U>))
5502 (operator<=>(optional<T>, nullopt), operator<=>(optional<T>, U)):
5504 * include/std/tuple (__tuple_cmp): New helper function for <=>.
5505 (operator<=>(tuple<T...>, tuple<U>...)): Define for C++20.
5506 * include/std/variant (operator<=>(variant<T...>, variant<T...>))
5507 (operator<=>(monostate, monostate)): Define for C++20.
5508 * testsuite/20_util/optional/relops/three_way.cc: New test.
5509 * testsuite/20_util/tuple/comparison_operators/three_way.cc: New test.
5510 * testsuite/20_util/variant/89851.cc: Move to ...
5511 * testsuite/20_util/variant/relops/89851.cc: ... here.
5512 * testsuite/20_util/variant/90008.cc: Move to ...
5513 * testsuite/20_util/variant/relops/90008.cc: ... here.
5514 * testsuite/20_util/variant/relops/three_way.cc: New test.
5516 2020-02-20 Patrick Palka <ppalka@redhat.com>
5518 * include/std/ranges (views::__adaptor::__maybe_refwrap): New utility
5520 (views::__adaptor::_RangeAdaptor::operator()): Add comments. Use
5521 __maybe_refwrap to capture lvalue references by reference, and then use
5522 unwrap_reference_t to forward the by-reference captures as references.
5523 * testsuite/std/ranges/adaptors/split.cc: Augment test.
5524 * testsuite/std/ranges/adaptors/split_neg.cc: New test.
5526 * include/std/ranges (iota_view): Forward declare _Sentinel.
5527 (iota_view::_Iterator): Befriend _Sentinel.
5528 (iota_view::_Sentinel::_M_equal): New member function.
5529 (iota_view::_Sentinel::operator==): Use it.
5530 (views::_Iota::operator()): Forward __f using the correct type.
5531 * testsuite/std/ranges/access/ssize.cc (test06): Don't call views::iota
5532 with integers of different signedness, to appease iota_view's deduction
5534 * testsuite/std/ranges/iota/iota_view.cc: Augment test.
5536 2020-02-20 Jonathan Wakely <jwakely@redhat.com>
5538 * include/bits/range_access.h (ranges::begin): Reject array of
5540 (ranges::end, ranges::size): Require arrays to be bounded.
5541 (ranges::data): Require lvalue or borrowed_range.
5542 (ranges::iterator_t): Remove constraint.
5543 * testsuite/std/ranges/access/begin.cc: Do not check array of
5545 * testsuite/std/ranges/access/begin_neg.cc: New test.
5546 * testsuite/std/ranges/access/end_neg.cc: Adjust expected error.
5547 * testsuite/std/ranges/access/size_neg.cc: Adjust expected error.
5548 * testsuite/std/ranges/access/ssize.cc: Do not check array of
5551 * include/std/system_error (error_category::operator<=>)
5552 (operator<=>(const error_code&, const error_code&))
5553 (operator<=>(const error_condition&, const error_condition&)): Define
5555 * testsuite/19_diagnostics/error_category/operators/less.cc: New test.
5556 * testsuite/19_diagnostics/error_category/operators/three_way.cc: New
5558 * testsuite/19_diagnostics/error_code/operators/equal.cc: Remove
5560 * testsuite/19_diagnostics/error_code/operators/less.cc: New test.
5561 * testsuite/19_diagnostics/error_code/operators/not_equal.cc: Remove
5563 * testsuite/19_diagnostics/error_code/operators/three_way.cc: New test.
5564 * testsuite/19_diagnostics/error_condition/operators/equal.cc: Remove
5566 * testsuite/19_diagnostics/error_condition/operators/less.cc: New test.
5567 * testsuite/19_diagnostics/error_condition/operators/not_equal.cc:
5568 Remove incorrect comment.
5569 * testsuite/19_diagnostics/error_condition/operators/three_way.cc: New
5572 * libsupc++/typeinfo (type_info::operator!=): Remove for C++20.
5574 * include/std/thread (thread::id::operator<=>): Define for C++20.
5575 * testsuite/30_threads/thread/id/70294.cc: Do not take addresses of
5576 functions in namespace std.
5577 * testsuite/30_threads/thread/id/operators_c++20.cc: New test.
5579 2020-02-19 Patrick Palka <ppalka@redhat.com>
5581 * testsuite/std/ranges/adaptors/split.cc (test03): Don't include the
5582 null terminator of the underlying string as part of the test_range.
5583 (main): Call test03.
5585 2020-02-19 Jonathan Wakely <jwakely@redhat.com>
5587 * include/bits/stl_iterator.h (common_iterator): Add copyable<I>
5588 requirement (LWG 3385).
5589 * testsuite/24_iterators/headers/iterator/synopsis_c++20.cc: Adjust
5590 expected declaration.
5592 * include/std/ranges (take_while_view, drop_view, drop_while_view)
5593 (elements_view:_Iterator): Initialize data members (LWG 3364).
5595 * libsupc++/compare (three_way_comparable): Remove always-false check
5596 that should have been removed with weak_equality (P1959R0).
5597 (three_way_comparable_with): Likewise. Reorder requirements (LWG 3360).
5599 * include/std/concepts (__detail::__partially_ordered_with): Move here
5601 (totally_ordered, totally_ordered_with): Use __partially_ordered_with
5602 to simplify definition (LWG 3331).
5603 * libsupc++/compare (__detail::__partially_ordered_with): Move to
5606 * include/std/concepts (totally_ordered_with): Remove redundant
5607 requirement (LWG 3329).
5609 * include/std/ranges (__detail::__convertible_to_non_slicing): New
5611 (__detail::__pair_like_convertible_to): Remove.
5612 (__detail::__pair_like_convertible_from): Add requirements for
5613 non-slicing conversions.
5614 (subrange): Constrain constructors with __convertible_to_non_slicing.
5615 Remove constructors from pair-like types. Add new deduction guide.
5616 * testsuite/std/ranges/subrange/lwg3282_neg.cc: New test.
5618 * include/bits/iterator_concepts.h (iter_move): Add declaration to
5619 prevent unqualified lookup finding a suitable declaration (LWG 3247).
5621 * include/std/memory_resource (polymorphic_allocator::allocate)
5622 (polymorphic_allocator::allocate_object): Change type of exception to
5623 bad_array_new_length (LWG 3237).
5624 * testsuite/20_util/polymorphic_allocator/lwg3237.cc: New test.
5626 * include/std/type_traits (__cpp_lib_unwrap_ref): Define (LWG 3348).
5627 * include/std/version (__cpp_lib_unwrap_ref): Likewise.
5628 * testsuite/20_util/unwrap_reference/1.cc: Check macro.
5629 * testsuite/20_util/unwrap_reference/3.cc: New test.
5631 * include/std/numeric (midpoint(T8, T*)): Do not check for complete
5632 type during overload resolution, use static assert instead (LWG 3200).
5633 * testsuite/26_numerics/midpoint/pointer.cc: Do not test with
5635 * testsuite/26_numerics/midpoint/pointer_neg.cc: New test.
5637 * include/std/span (span(T (&)[N])): Use non-deduced context to
5638 prevent first parameter from interfering with class template argument
5639 deduction (LWG 3369).
5640 * testsuite/23_containers/span/deduction.cc: Add missing 'const'.
5641 * testsuite/23_containers/span/lwg3255.cc: Check for construction from
5644 * include/std/span (span::const_iterator, span::const_reverse_iterator)
5645 (span::cbegin(), span::cend(), span::crbegin(), span::crend()):
5647 * testsuite/23_containers/span/everything.cc: Replace uses of cbegin
5649 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc:
5651 * testsuite/20_util/specialized_algorithms/uninitialized_copy/
5652 constrained.cc: Likewise.
5653 * testsuite/20_util/specialized_algorithms/
5654 uninitialized_default_construct/constrained.cc: Likewise.
5655 * testsuite/20_util/specialized_algorithms/uninitialized_fill/
5656 constrained.cc: Likewise.
5657 * testsuite/20_util/specialized_algorithms/uninitialized_move/
5658 constrained.cc: Likewise.
5659 * testsuite/20_util/specialized_algorithms/
5660 uninitialized_value_construct/constrained.cc: Likewise.
5662 * include/bits/range_access.h (range_size_t): Define alias template.
5663 * include/std/ranges (all_view): Rename to views::all_t (LWG 3335).
5664 * testsuite/std/ranges/adaptors/filter.cc: Adjust to new name.
5666 * include/std/ranges (filter_view, transform_view, take_view)
5667 (join_view, split_view, reverse_view): Remove commented-out converting
5668 constructors (LWG 3280).
5670 * include/std/memory (uninitialized_construct_using_allocator): Use
5671 std::construct_at (LWG 3321).
5673 * include/std/memory_resource (polymorphic_allocator::allocate_bytes)
5674 (polymorphic_allocator::allocate_object)
5675 (polymorphic_allocator::new_object): Add nodiscard attribute (LWG3304).
5677 LWG 3379. "safe" in several library names is misleading
5678 * include/bits/range_access.h (enable_safe_range): Rename to
5679 enable_borrowed_range.
5680 (__detail::__maybe_safe_range): Rename to __maybe_borrowed_range.
5681 (safe_range): Rename to borrowed_range.
5682 * include/bits/ranges_algo.h: Adjust to use new names.
5683 * include/bits/ranges_algobase.h: Likewise.
5684 * include/bits/ranges_uninitialized.h: Likewise.
5685 * include/std/ranges: Likewise.
5686 (safe_iterator_t): Rename to borrowed_iterator_t.
5687 (safe_subrange_t): Rename to borrowed_subrange_t.
5688 * include/std/span: Adjust to use new names.
5689 * include/std/string_view: Likewise.
5690 * include/experimental/string_view: Likewise.
5691 * testsuite/std/ranges/access/begin.cc: Likewise.
5692 * testsuite/std/ranges/access/cbegin.cc: Likewise.
5693 * testsuite/std/ranges/access/cdata.cc: Likewise.
5694 * testsuite/std/ranges/access/cend.cc: Likewise.
5695 * testsuite/std/ranges/access/crbegin.cc: Likewise.
5696 * testsuite/std/ranges/access/crend.cc: Likewise.
5697 * testsuite/std/ranges/access/data.cc: Likewise.
5698 * testsuite/std/ranges/access/end.cc: Likewise.
5699 * testsuite/std/ranges/access/rbegin.cc: Likewise.
5700 * testsuite/std/ranges/access/rend.cc: Likewise.
5701 * testsuite/std/ranges/safe_range.cc: Likewise.
5702 * testsuite/std/ranges/safe_range_types.cc: Likewise.
5703 * testsuite/util/testsuite_iterators.h: Likewise.
5705 * include/std/ranges (tuple_element<0, const subrange<I, S, K>>)
5706 (tuple_element<1, const subrange<I, S, K>>): Add partial
5707 specializations (LWG 3398).
5708 * testsuite/std/ranges/subrange/tuple_like.cc: New test.
5710 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
5711 (__adjacent_find_fn, __remove_if_fn, __remove_copy_if_fn)
5712 (__unique_fn, __unique_copy_fn): Remove redundant conversions to bool.
5714 2020-02-18 Patrick Palka <ppalka@redhat.com>
5716 P1983R0 Wording for GB301, US296, US292, US291, and US283
5717 * include/std/ranges (filter_view::pred): New member function.
5718 (join_view::_Iterator::_Iterator): Remove now-redundant comment since
5719 P1983R0 fixes the highlighted issue in the same way.
5720 (join_view::_Iterator<_Const>): Add friend
5721 join_view::_Iterator<!_Const>.
5722 (join_view::_M_inner): Remove mutable specifier, effectively reverting
5723 the proposed wording changes of P3278.
5724 (join_view::begin): Refine the condition for when to return a const
5726 (split_view::_OuterIter::_OuterIter): Adjust constraints.
5727 * testsuite/std/ranges/adaptors/filter.cc: Test that filter_view::pred
5730 2020-02-18 Jonathan Wakely <jwakely@redhat.com>
5733 * include/std/ranges (_RangeAdaptor): Add deduction guide.
5734 (filter_view::_Iterator): Add alias _Vp_iter and use in place of
5736 (filter_view::_Iterator::_S_iter_cat()): Add 'typename'.
5737 (transform_view::_Iterator): Add alias _Base_iter and use in place of
5739 (transform_view::_Iterator::_S_iter_cat()): Add 'typename'.
5740 (join_view::_Iterator): Add _Outer_iter and _Inner_iter aliases.
5741 (join_view::_Iterator::_S_iter_cat()): Add 'typename'.
5742 (split_view::_InnerIter::_S_iter_cat()): Likewise.
5744 * testsuite/20_util/integer_comparisons/equal.cc: Fix invalid
5745 assumption that long is wider than int.
5746 * testsuite/20_util/integer_comparisons/greater_equal.cc: Likewise.
5747 * testsuite/20_util/integer_comparisons/less.cc: Likewise.
5748 * testsuite/20_util/integer_comparisons/less_equal.cc: Likewise.
5749 * testsuite/20_util/integer_comparisons/not_equal.cc: Likewise.
5751 P1976R2 Fixed-size span construction from dynamic range
5752 * include/std/span (__cpp_lib_span): Update value.
5753 (span(It, size_type), span(It, End)): Make conditionally explicit. Add
5755 (span(R&&), span(const span<OType, OExtent>&)): Likewise and relax
5757 (span::first<Count>(), span::last<Count>()): Use explicit type in
5759 (as_bytes, as_writable_bytes): Likewise.
5760 * include/std/version (__cpp_lib_span): Update value.
5761 * testsuite/23_containers/span/1.cc: Check new value.
5762 * testsuite/23_containers/span/2.cc: Check new value.
5763 * testsuite/23_containers/span/explicit.cc: New test.
5765 * include/std/span (span::__is_compatible_array): Simplify alias
5766 template by using requires-clause.
5767 (span::__is_compatible_ref): New alias template for constraining
5769 (span::__is_compatible_iterator, span::__is_compatible_range): Remove.
5770 (span(It, size_type), span(It, End)): Use __is_compatible_ref.
5771 (span(T(&)[N], span(array<T, N>&), span(const array<T, N>&)): Remove
5772 redundant parentheses.
5773 (span(R&&)): Add missing constraints.
5775 * include/std/span (span): Reorder members and rename template
5776 parameters to match declarations in the C++2a working paper.
5778 P2116R0 Remove tuple-like protocol support from fixed-extent span
5779 * include/std/span (get, tuple_size, tuple_element): Remove.
5780 * testsuite/23_containers/span/everything.cc: Remove checks for
5782 * testsuite/23_containers/span/get_neg.cc: Remove.
5783 * testsuite/23_containers/span/tuple_element_dynamic_neg.cc: Remove.
5784 * testsuite/23_containers/span/tuple_element_oob_neg.cc: Remove.
5785 * testsuite/23_containers/span/tuple_size_neg.cc: Remove.
5787 2020-02-17 Patrick Palka <ppalka@redhat.com>
5789 P2106R0 Alternative wording for GB315 and GB316
5790 * include/bits/ranges_algo.h (in_fun_result): New.
5791 (for_each_result, for_each_n_result): Change into an alias of
5793 (in_in_result): New.
5794 (mismatch_result): Change into an alias of in_in_result.
5795 (copy_if_result): Change into an alias of in_out_result.
5796 (swap_ranges_result): Change into an alias of in_in_result.
5797 (unary_transform_result): Change into an alias of in_out_result.
5798 (in_in_out_result): New.
5799 (binary_transform_result): Change into an alias of in_in_out_result.
5800 (replace_copy_result, replace_copy_if_result, remove_copy_if_result,
5801 remove_copy_result, unique_copy_result, reverse_copy_result,
5802 rotate_copy_result, partial_sort_copy_result): Change into an alias of
5804 (in_out_out_result): New.
5805 (partition_copy_result, merge_result): Change into an alias of
5807 (set_union_result, set_intersection_result): Change into an alias of
5809 (set_difference_result): Change into an alias of in_out_result.
5810 (set_symmetric_difference): Change into an alias of in_in_out_result.
5811 (min_max_result): New.
5812 (minmax_result, minmax_element_result): Change into an alias of
5814 (in_found_result): New.
5815 (next_permutation_result, prev_permutation_result): Change into an alias
5817 (__next_permutation_fn::operator(), __prev_permutation_fn::operator()):
5818 Adjust following changes to next_permutation_result and
5819 prev_permutation_result.
5820 * include/bits/ranges_algobase.h (in_out_result): New.
5821 (copy_result, move_result, move_backward_result, copy_backward_result,
5822 copy_n_result): Change into an alias of in_out_result.
5823 * include/bits/ranges_uninitialized.h (uninitialized_copy_result,
5824 uninitialized_copy_n_result, uninitialized_move_result,
5825 uninitialized_move_n_result): Likewise.
5826 * testsuite/25_algorithms/next_permutation/constrained.cc: Adjust uses of
5827 structured bindings.
5828 * testsuite/25_algorithms/prev_permutation/constrained.cc: Likewise.
5830 P1243R4 Rangify new algorithms
5831 * include/bits/ranges_algo.h (for_each_n_result, __for_each_n_fn,
5832 for_each_n, __sample_fn, sample, __clamp_fn, clamp): New.
5833 * testsuite/25_algorithms/clamp/constrained.cc: New test.
5834 * testsuite/25_algorithms/for_each/constrained.cc: Augment test.
5835 * testsuite/25_algorithms/sample/constrained.cc: New test.
5837 2020-02-17 Jonathan Wakely <jwakely@redhat.com>
5839 P1964R2 Wording for boolean-testable
5840 * include/bits/ranges_algo.h (__find_fn, __find_first_of_fn)
5841 (__adjacent_find_fn): Cast result of predicate to bool.
5842 * include/std/concepts (__boolean): Remove.
5843 (__detail::__boolean_testable_impl, __detail::__boolean_testable): Add
5844 new helper concepts.
5845 (__detail::__weakly_eq_cmp_with, totally_ordered, totally_ordered_with)
5846 (predicate): Use __boolean_testable instead of boolean.
5847 * libsupc++/compare (__detail::__partially_ordered, _Synth3way):
5850 P1970R2 Consistency for size() functions: Add ranges::ssize
5851 * include/bits/range_access.h (_SSize, ssize): Define for C++20.
5852 * testsuite/std/ranges/access/ssize.cc: New test.
5854 P1956R1 On the names of low-level bit manipulation functions
5855 * include/bits/hashtable_policy.h: Update comment.
5856 * include/std/bit (__ispow2, __ceil2, __floor2, __log2p1): Rename.
5857 (ispow2, ceil2, floor2, log2p1): Likewise.
5858 (__cpp_lib_int_pow2): Add feature test macro.
5859 * include/std/charconv (__to_chars_len_2): Adjust use of __log2p1.
5860 * include/std/memory (assume_aligned): Adjust use of ispow2.
5861 * include/std/version (__cpp_lib_int_pow2): Add.
5862 * libsupc++/new_opa.cc: Adjust use of __ispow2.
5863 * src/c++17/memory_resource.cc: Likewise, and for __ceil2 and __log2p1.
5864 * testsuite/17_intro/freestanding.cc: Adjust use of ispow2.
5865 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Rename to ...
5866 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil.cc: ... here.
5867 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Rename to ...
5868 * testsuite/26_numerics/bit/bit.pow.two/bit_ceil_neg.cc: ... here.
5869 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Rename to ...
5870 * testsuite/26_numerics/bit/bit.pow.two/bit_floor.cc: ... here.
5871 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Rename to ...
5872 * testsuite/26_numerics/bit/bit.pow.two/bit_width.cc: ... here.
5873 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Rename to ...
5874 * testsuite/26_numerics/bit/bit.pow.two/has_single_bit.cc: ... here.
5876 * include/std/charconv: Add comment.
5878 PR libstdc++/92546 (partial)
5879 * include/bits/random.h (uniform_random_bit_generator): Move definition
5880 to <bits/uniform_int_dist.h>.
5881 * include/bits/ranges_algo.h: Include <bits/uniform_int_dist.h> instead
5883 * include/bits/ranges_algobase.h: Do not include <cmath>.
5884 * include/bits/uniform_int_dist.h (uniform_random_bit_generator):
5886 * include/std/ranges: Do not include <limits>.
5887 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
5889 PR libstdc++/92546 (partial)
5890 * include/Makefile.am: Add new header.
5891 * include/Makefile.in: Regenerate.
5892 * include/bits/int_limits.h: New header.
5893 * include/bits/parse_numbers.h (__select_int::_Select_int): Replace
5894 numeric_limits with __detail::__int_limits.
5895 * include/std/bit (__rotl, __rotr, __countl_zero, __countl_one)
5896 (__countr_zero, __countr_one, __popcount, __ceil2, __floor2, __log2p1):
5898 * include/std/charconv (__to_chars_8, __from_chars_binary)
5899 (__from_chars_alpha_to_num, from_chars): Likewise.
5900 * include/std/memory_resource (polymorphic_allocator::allocate)
5901 (polymorphic_allocator::allocate_object): Likewise.
5902 * include/std/string_view (basic_string_view::_S_compare): Likewise.
5903 * include/std/utility (in_range): Likewise.
5904 * testsuite/20_util/integer_comparisons/in_range_neg.cc: Adjust for
5905 extra error about incomplete type __int_limits<bool>.
5906 * testsuite/26_numerics/bit/bit.count/countl_one.cc: Include <limits>.
5907 * testsuite/26_numerics/bit/bit.count/countl_zero.cc: Likewise.
5908 * testsuite/26_numerics/bit/bit.count/countr_one.cc: Likewise.
5909 * testsuite/26_numerics/bit/bit.count/countr_zero.cc: Likewise.
5910 * testsuite/26_numerics/bit/bit.count/popcount.cc: Likewise.
5911 * testsuite/26_numerics/bit/bit.pow.two/ceil2_neg.cc: Likewise.
5912 * testsuite/26_numerics/bit/bit.pow.two/ceil2.cc: Likewise.
5913 * testsuite/26_numerics/bit/bit.pow.two/floor2.cc: Likewise.
5914 * testsuite/26_numerics/bit/bit.pow.two/ispow2.cc: Likewise.
5915 * testsuite/26_numerics/bit/bit.pow.two/log2p1.cc: Likewise.
5916 * testsuite/26_numerics/bit/bit.rotate/rotl.cc: Likewise.
5917 * testsuite/26_numerics/bit/bit.rotate/rotr.cc: Likewise.
5919 * python/libstdcxx/v6/printers.py (StdCmpCatPrinter.to_string): Update
5920 value for partial_ordering::unordered.
5922 * include/bits/iterator_concepts.h (indirectly_copyable_storable): Add
5923 const-qualified expression variations.
5924 * include/std/concepts (copyable): Likewise.
5926 * include/std/type_traits (__is_standard_integer): New helper trait.
5927 * include/std/utility (cmp_equal, cmp_not_equal, cmp_less, cmp_greater)
5928 (cmp_less_equal, cmp_greater_equal, in_range): Define for C++20.
5929 * include/std/version (__cpp_lib_integer_comparison_functions): Define.
5930 * testsuite/20_util/integer_comparisons/1.cc: New test.
5931 * testsuite/20_util/integer_comparisons/2.cc: New test.
5932 * testsuite/20_util/integer_comparisons/equal.cc: New test.
5933 * testsuite/20_util/integer_comparisons/equal_neg.cc: New test.
5934 * testsuite/20_util/integer_comparisons/greater_equal.cc: New test.
5935 * testsuite/20_util/integer_comparisons/greater_equal_neg.cc: New test.
5936 * testsuite/20_util/integer_comparisons/greater_neg.cc: New test.
5937 * testsuite/20_util/integer_comparisons/in_range.cc: New test.
5938 * testsuite/20_util/integer_comparisons/in_range_neg.cc: New test.
5939 * testsuite/20_util/integer_comparisons/less.cc: New test.
5940 * testsuite/20_util/integer_comparisons/less_equal.cc: New test.
5941 * testsuite/20_util/integer_comparisons/less_equal_neg.cc: New test.
5942 * testsuite/20_util/integer_comparisons/less_neg.cc: New test.
5943 * testsuite/20_util/integer_comparisons/not_equal.cc: New test.
5944 * testsuite/20_util/integer_comparisons/not_equal_neg.cc: New test.
5946 2020-02-16 Patrick Palka <ppalka@redhat.com>
5948 * include/bits/ranges_algo.h (__lexicographical_compare_fn::operator()):
5949 Move code after an early exit constexpr if to under an else branch.
5950 * include/bits/ranges_algobase.h (__equal_fn::operator()): Likewise.
5952 2020-02-15 Patrick Palka <ppalka@redhat.com>
5954 * include/bits/ranges_algo.h: Adjust whitespace and formatting.
5955 * include/bits/ranges_algobase.h: Likewise.
5956 * include/bits/ranges_uninitialized.h: Likewise.
5958 * include/bits/ranges_algo.h: (adjacent_find, all_of, any_of,
5959 binary_search, copy_if, count, count_if, equal_range, find, find_end,
5960 find_first_of, find_if, find_if_not, for_each, generate, generate_n,
5961 includes, inplace_merge, is_heap, is_heap_until, is_partitioned,
5962 is_permutation, is_sorted, is_sorted_until, lexicographical_compare,
5963 lower_bound, make_heap, max, max_element, merge, min, min_element,
5964 minmax, minmax_element, mismatch, next_permutation, none_of,
5965 nth_element, partial_sort, partial_sort_copy, partition, partition_copy,
5966 partition_point, pop_heap, prev_permutation, push_heap, remove,
5967 remove_copy, remove_copy_if, remove_if, replace, replace_copy,
5968 replace_copy_if, replace_if, reverse, reverse_copy, rotate, rotate_copy,
5969 search, search_n, set_difference, set_intersection,
5970 set_symmetric_difference, set_union, shuffle, sort, sort_heap,
5971 stable_partition, stable_sort, swap_ranges, transform, unique,
5972 unique_copy, upper_bound): Convert into function objects.
5973 * include/bits/ranges_algobase.h: (equal, copy, move, copy_n, fill_n,
5974 fill, move_backward, copy_backward): Likewise.
5975 * include/bits/ranges_uninitialized.h (uninitialized_default_construct,
5976 uninitialized_default_construct_n, uninitialized_value_construct,
5977 uninitialized_value_construct_n, uninitialized_copy,
5978 uninitialized_copy_n, uninitialized_move, uninitialized_move_n,
5979 uninitialized_fill, uninitialized_fill_n, construct_at, destroy_at,
5980 destroy, destroy_n): Likewise.
5982 * include/bits/ranges_algo.h (ranges::__find_end): Fold into ...
5983 (ranges::find_end): ... here.
5984 (ranges::__lexicographical_compare): Fold into ...
5985 (ranges::lexicographical_compare): ... here.
5986 * include/bits/ranges_algobase.h (ranges::__equal): Fold into ...
5987 (ranges::equal): ... here.
5989 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
5991 * include/bits/erase_if.h (__cpp_lib_erase_if): Define to 202002L.
5992 * include/std/deque: Likewise.
5993 * include/std/forward_list: Likewise.
5994 * include/std/list: Likewise.
5995 * include/std/string: Likewise.
5996 * include/std/vector: Likewise.
5997 * include/std/version: Likewise.
5998 * testsuite/23_containers/deque/erasure.cc: Test for new value.
5999 * testsuite/23_containers/forward_list/erasure.cc: Likewise.
6000 * testsuite/23_containers/list/erasure.cc: Likewise.
6001 * testsuite/23_containers/map/erasure.cc: Likewise.
6002 * testsuite/23_containers/set/erasure.cc: Likewise.
6003 * testsuite/23_containers/unordered_map/erasure.cc: Likewise.
6004 * testsuite/23_containers/unordered_set/erasure.cc: Likewise.
6005 * testsuite/23_containers/vector/erasure.cc: Likewise.
6007 2020-02-15 Jonathan Wakely <jwakely@redhat.com>
6009 * include/bits/random.h (uniform_random_bit_generator): Require min()
6010 and max() to be constant expressions and min() to be less than max().
6011 * testsuite/26_numerics/random/concept.cc: Check additional cases.
6012 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error lineno.
6014 2020-02-13 Patrick Palka <ppalka@redhat.com>
6016 * include/Makefile.am: Add <bits/ranges_uninitialized.h>.
6017 * include/Makefile.in: Regenerate.
6018 * include/bits/ranges_uninitialized.h: New header.
6019 * include/std/memory: Include it.
6020 * testsuite/20_util/specialized_algorithms/destroy/constrained.cc: New
6022 * .../uninitialized_copy/constrained.cc: New test.
6023 * .../uninitialized_default_construct/constrained.cc: New test.
6024 * .../uninitialized_fill/constrained.cc: New test.
6025 * .../uninitialized_move/constrained.cc: New test.
6026 * .../uninitialized_value_construct/constrained.cc: New test.
6028 * include/Makefile.am: Add bits/ranges_algobase.h
6029 * include/Makefile.in: Regenerate.
6030 * bits/ranges_algo.h: Include <bits/ranges_algobase.h> and refactor
6032 (__detail::__is_normal_iterator, __detail::is_reverse_iterator,
6033 __detail::__is_move_iterator, copy_result, move_result,
6034 __equal, equal, copy_result, move_result, move_backward_result,
6035 copy_backward_result, __copy_or_move_backward, __copy_or_move, copy,
6036 move, copy_backward, move_backward, copy_n_result, copy_n, fill_n,
6037 fill): Split out into ...
6038 * bits/range_algobase.h: ... this new header.
6040 2020-02-12 Patrick Palka <ppalka@redhat.com>
6042 LWG 3389 and LWG 3390
6043 * include/bits/stl_iterator.h (move_move_iterator): Use std::move when
6044 constructing the move_iterator with __i.
6045 (counted_iterator::counted_iterator): Use std::move when initializing
6047 * testsuite/24_iterators/counted_iterator/lwg3389.cc: New test.
6048 * testsuite/24_iterators/move_iterator/lwg3390.cc: New test.
6050 2020-02-12 Sandra Loosemore <sandra@codesourcery.com>
6055 * configure: Regenerated.
6057 2020-02-12 François Dumont <fdumont@gcc.gnu.org>
6059 * include/bits/hashtable.h
6060 (_Hashtable<>(_Hashtable&&, std::allocator_type&)): Add
6061 missing std namespace qualification to forward call.
6063 2020-02-09 Jonathan Wakely <jwakely@redhat.com>
6065 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Fix
6067 * testsuite/20_util/function_objects/range.cmp/less.ccL Likewise.
6069 * include/std/ranges: Fix non-ASCII characters in comment.
6071 * include/bits/range_cmp.h (__detail::__eq_builtin_ptr_cmp): Require
6072 equality comparison to be valid and return bool.
6073 (__detail::__less_builtin_ptr_cmp): Likewise for less-than comparison.
6074 * testsuite/20_util/function_objects/range.cmp/equal_to.cc: Check
6075 type with ambiguous conversion to fundamental types.
6076 * testsuite/20_util/function_objects/range.cmp/less.cc: Likewise.
6078 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
6080 * include/bits/iterator_concepts.h (iter_difference_t, iter_value_t):
6082 (readable_traits): Rename to indirectly_readable_traits.
6083 (readable): Rename to indirectly_readable.
6084 (writable): Rename to indirectly_writable.
6085 (__detail::__iter_exchange_move): Do not use remove_reference_t.
6086 (indirectly_swappable): Adjust requires expression parameter types.
6088 * include/bits/ranges_algo.h (ranges::transform, ranges::replace)
6089 (ranges::replace_if, ranges::generate_n, ranges::generate)
6090 (ranges::remove): Use new name for writable.
6091 * include/bits/stl_iterator.h (__detail::__common_iter_has_arrow):
6092 Use new name for readable.
6093 * include/ext/pointer.h (readable_traits<_Pointer_adapter<P>>): Use
6094 new name for readable_traits.
6095 * testsuite/24_iterators/associated_types/readable.traits.cc: Likewise.
6096 * testsuite/24_iterators/indirect_callable/projected.cc: Adjust for
6097 new definition of indirectly_readable.
6099 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Change
6100 to take parameters of common_iterator, instead of the common_iterator
6101 type itself. Fix argument for __common_iter_has_arrow constraint.
6102 (iterator_traits<common_iterator<I, S>>::pointer): Adjust.
6104 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
6106 * include/std/ranges (iota_view): Add braces to prevent -Wempty-body
6108 (basic_istream_view::_Iterator::operator++()): Add missing return.
6110 2020-02-07 Patrick Palka <ppalka@redhat.com>
6112 * include/bits/ranges_algo.h: Remove extraneous &&.
6114 * include/std/ranges (ranges::__detail::__stream_extractable,
6115 ranges::basic_istream_view, ranges::istream_view): Define.
6116 * testsuite/std/ranges/istream_view: New test.
6118 Implement C++20 range adaptors
6119 * include/std/ranges: Include <bits/refwrap.h> and <tuple>.
6120 (subrange::_S_store_size): Mark as const instead of constexpr to
6121 avoid what seems to be a bug in GCC.
6122 (__detail::__box): Give it defaulted copy and move constructors.
6123 (ranges::views::_Single::operator()): Mark constexpr.
6124 (ranges::views::_Iota::operator()): Mark constexpr.
6125 (__detail::Empty): Define.
6126 (ranges::views::__closure::_RangeAdaptor,
6127 ranges::views::__closure::_RangeAdaptorClosure, ref_view, all_view,
6128 ranges::views::all, ranges::__detail::find_if,
6129 ranges::__detail::find_if_not, ranges::__detail::mismatch,
6130 ranges::detail::min, filter_view, ranges::views::filter, transform_view,
6131 ranges::views::transform, take_view, ranges::views::take,
6132 take_while_view, ranges::views::take_while, drop_view,
6133 ranges::views::drop, join_view, ranges::views::join,
6134 __detail::require_constant, __detail::tiny_range, split_view,
6135 ranges::views::split, ranges::views::_Counted, ranges::views::counted,
6136 common_view, ranges::views::common, reverse_view,
6137 ranges::views::reverse,
6138 ranges::views::__detail::__is_reversible_subrange,
6139 ranges::views::__detail::__is_reverse_view, reverse_view,
6140 ranges::views::reverse, __detail::__has_tuple_element, elements_view,
6141 ranges::views::elements, ranges::views::keys, ranges::views::values):
6143 (views): Alias for ranges::views.
6144 (tuple_size<ranges::subrange<>>, tuple_element<0, ranges::subrange>,
6145 tuple_element<1, ranges::subrange>): New partial specializations.
6146 * testsuite/std/ranges/adaptors/all.cc: New test.
6147 * testsuite/std/ranges/adaptors/common.cc: Likewise.
6148 * testsuite/std/ranges/adaptors/counted.cc: Likewise.
6149 * testsuite/std/ranges/adaptors/drop.cc: Likewise.
6150 * testsuite/std/ranges/adaptors/drop_while.cc: Likewise.
6151 * testsuite/std/ranges/adaptors/elements.cc: Likewise.
6152 * testsuite/std/ranges/adaptors/filter.cc: Likewise.
6153 * testsuite/std/ranges/adaptors/join.cc: Likewise.
6154 * testsuite/std/ranges/adaptors/reverse.cc: Likewise.
6155 * testsuite/std/ranges/adaptors/split.cc: Likewise.
6156 * testsuite/std/ranges/adaptors/take.cc: Likewise.
6157 * testsuite/std/ranges/adaptors/take_while.cc: Likewise.
6158 * testsuite/std/ranges/adaptors/transform.cc: Likewise.
6160 2020-02-07 Jonathan Wakely <jwakely@redhat.com>
6162 * libsupc++/compare (__cmp_cat::type): Define typedef for underlying
6163 type of enumerations and comparison category types.
6164 (__cmp_cat::_Ord, __cmp_cat::_Ncmp): Add underlying type.
6165 (__cmp_cat::_Ncmp::unordered): Change value to 2.
6166 (partial_ordering::_M_value, weak_ordering::_M_value)
6167 (strong_ordering::_M_value): Change type to __cmp_cat::type.
6168 (partial_ordering::_M_is_ordered): Remove data member.
6169 (partial_ordering): Use second bit of _M_value for unordered. Adjust
6170 comparison operators.
6171 (weak_ordering::operator partial_ordering): Simplify to remove
6173 (operator<=>(unspecified, weak_ordering)): Likewise.
6174 (strong_ordering::operator partial_ordering): Likewise.
6175 (strong_ordering::operator weak_ordering): Likewise.
6176 (operator<=>(unspecified, strong_ordering)): Likewise.
6177 * testsuite/18_support/comparisons/categories/partialord.cc: New test.
6178 * testsuite/18_support/comparisons/categories/strongord.cc: New test.
6179 * testsuite/18_support/comparisons/categories/weakord.cc: New test.
6181 * include/std/ranges (iota_view::_Iterator): Fix typo in name of
6182 __cpp_lib_three_way_comparison macro and use deduced return type for
6184 * testsuite/std/ranges/iota/iterator.cc: New test.
6186 2020-02-07 Patrick Palka <ppalka@redhat.com>
6187 Jonathan Wakely <jwakely@redhat.com>
6189 Implement C++20 constrained algorithms
6190 * include/Makefile.am: Add new header.
6191 * include/Makefile.in: Regenerate.
6192 * include/std/algorithm: Include <bits/ranges_algo.h>.
6193 * include/bits/ranges_algo.h: New file.
6194 * testsuite/25_algorithms/adjacent_find/constrained.cc: New test.
6195 * testsuite/25_algorithms/all_of/constrained.cc: New test.
6196 * testsuite/25_algorithms/any_of/constrained.cc: New test.
6197 * testsuite/25_algorithms/binary_search/constrained.cc: New test.
6198 * testsuite/25_algorithms/copy/constrained.cc: New test.
6199 * testsuite/25_algorithms/copy_backward/constrained.cc: New test.
6200 * testsuite/25_algorithms/copy_if/constrained.cc: New test.
6201 * testsuite/25_algorithms/copy_n/constrained.cc: New test.
6202 * testsuite/25_algorithms/count/constrained.cc: New test.
6203 * testsuite/25_algorithms/count_if/constrained.cc: New test.
6204 * testsuite/25_algorithms/equal/constrained.cc: New test.
6205 * testsuite/25_algorithms/equal_range/constrained.cc: New test.
6206 * testsuite/25_algorithms/fill/constrained.cc: New test.
6207 * testsuite/25_algorithms/fill_n/constrained.cc: New test.
6208 * testsuite/25_algorithms/find/constrained.cc: New test.
6209 * testsuite/25_algorithms/find_end/constrained.cc: New test.
6210 * testsuite/25_algorithms/find_first_of/constrained.cc: New test.
6211 * testsuite/25_algorithms/find_if/constrained.cc: New test.
6212 * testsuite/25_algorithms/find_if_not/constrained.cc: New test.
6213 * testsuite/25_algorithms/for_each/constrained.cc: New test.
6214 * testsuite/25_algorithms/generate/constrained.cc: New test.
6215 * testsuite/25_algorithms/generate_n/constrained.cc: New test.
6216 * testsuite/25_algorithms/heap/constrained.cc: New test.
6217 * testsuite/25_algorithms/includes/constrained.cc: New test.
6218 * testsuite/25_algorithms/inplace_merge/constrained.cc: New test.
6219 * testsuite/25_algorithms/is_partitioned/constrained.cc: New test.
6220 * testsuite/25_algorithms/is_permutation/constrained.cc: New test.
6221 * testsuite/25_algorithms/is_sorted/constrained.cc: New test.
6222 * testsuite/25_algorithms/is_sorted_until/constrained.cc: New test.
6223 * testsuite/25_algorithms/lexicographical_compare/constrained.cc: New
6225 * testsuite/25_algorithms/lower_bound/constrained.cc: New test.
6226 * testsuite/25_algorithms/max/constrained.cc: New test.
6227 * testsuite/25_algorithms/max_element/constrained.cc: New test.
6228 * testsuite/25_algorithms/merge/constrained.cc: New test.
6229 * testsuite/25_algorithms/min/constrained.cc: New test.
6230 * testsuite/25_algorithms/min_element/constrained.cc: New test.
6231 * testsuite/25_algorithms/minmax/constrained.cc: New test.
6232 * testsuite/25_algorithms/minmax_element/constrained.cc: New test.
6233 * testsuite/25_algorithms/mismatch/constrained.cc: New test.
6234 * testsuite/25_algorithms/move/constrained.cc: New test.
6235 * testsuite/25_algorithms/move_backward/constrained.cc: New test.
6236 * testsuite/25_algorithms/next_permutation/constrained.cc: New test.
6237 * testsuite/25_algorithms/none_of/constrained.cc: New test.
6238 * testsuite/25_algorithms/nth_element/constrained.cc: New test.
6239 * testsuite/25_algorithms/partial_sort/constrained.cc: New test.
6240 * testsuite/25_algorithms/partial_sort_copy/constrained.cc: New test.
6241 * testsuite/25_algorithms/partition/constrained.cc: New test.
6242 * testsuite/25_algorithms/partition_copy/constrained.cc: New test.
6243 * testsuite/25_algorithms/partition_point/constrained.cc: New test.
6244 * testsuite/25_algorithms/prev_permutation/constrained.cc: New test.
6245 * testsuite/25_algorithms/remove/constrained.cc: New test.
6246 * testsuite/25_algorithms/remove_copy/constrained.cc: New test.
6247 * testsuite/25_algorithms/remove_copy_if/constrained.cc: New test.
6248 * testsuite/25_algorithms/remove_if/constrained.cc: New test.
6249 * testsuite/25_algorithms/replace/constrained.cc: New test.
6250 * testsuite/25_algorithms/replace_copy/constrained.cc: New test.
6251 * testsuite/25_algorithms/replace_copy_if/constrained.cc: New test.
6252 * testsuite/25_algorithms/replace_if/constrained.cc: New test.
6253 * testsuite/25_algorithms/reverse/constrained.cc: New test.
6254 * testsuite/25_algorithms/reverse_copy/constrained.cc: New test.
6255 * testsuite/25_algorithms/rotate/constrained.cc: New test.
6256 * testsuite/25_algorithms/rotate_copy/constrained.cc: New test.
6257 * testsuite/25_algorithms/search/constrained.cc: New test.
6258 * testsuite/25_algorithms/search_n/constrained.cc: New test.
6259 * testsuite/25_algorithms/set_difference/constrained.cc: New test.
6260 * testsuite/25_algorithms/set_intersection/constrained.cc: New test.
6261 * testsuite/25_algorithms/set_symmetric_difference/constrained.cc: New
6263 * testsuite/25_algorithms/set_union/constrained.cc: New test.
6264 * testsuite/25_algorithms/shuffle/constrained.cc: New test.
6265 * testsuite/25_algorithms/sort/constrained.cc: New test.
6266 * testsuite/25_algorithms/stable_partition/constrained.cc: New test.
6267 * testsuite/25_algorithms/stable_sort/constrained.cc: New test.
6268 * testsuite/25_algorithms/swap_ranges/constrained.cc: New test.
6269 * testsuite/25_algorithms/transform/constrained.cc: New test.
6270 * testsuite/25_algorithms/unique/constrained.cc: New test.
6271 * testsuite/25_algorithms/unique_copy/constrained.cc: New test.
6272 * testsuite/25_algorithms/upper_bound/constrained.cc: New test.
6274 2020-02-06 Jonathan Wakely <jwakely@redhat.com>
6276 * include/bits/stl_iterator.h (__detail::__common_iter_ptr): Fix PR
6277 number in comment. Fix indentation.
6279 * include/bits/stl_algobase.h (__iter_swap, __iter_swap<true>): Remove
6280 redundant _GLIBCXX20_CONSTEXPR.
6282 * include/std/ranges (viewable_range): Replace decay_t with
6283 remove_cvref_t (LWG 3375).
6285 2020-02-05 Jonathan Wakely <jwakely@redhat.com>
6287 * include/bits/iterator_concepts.h (iter_reference_t)
6288 (iter_rvalue_reference_t, iter_common_reference_t, indirect_result_t):
6289 Remove workarounds for PR c++/67704.
6290 * testsuite/24_iterators/aliases.cc: New test.
6292 2020-02-05 Patrick Palka <ppalka@redhat.com>
6294 * include/bits/stl_iterator.h (move_iterator::move_iterator): Move __i
6295 when initializing _M_current.
6296 (move_iterator::base): Split into two overloads differing in
6297 ref-qualifiers as in P1207R4 for C++20.
6299 2020-02-04 Jonathan Wakely <jwakely@redhat.com>
6301 * include/std/functional (_GLIBCXX_NOT_FN_CALL_OP): Un-define after
6305 * include/bits/unique_ptr.h (__uniq_ptr_impl::swap): Define.
6306 (unique_ptr::swap, unique_ptr<T[], D>::swap): Call it.
6307 * testsuite/20_util/unique_ptr/modifiers/93562.cc: New test.
6309 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com>
6311 * configure: Regenerate.
6313 2020-01-31 Patrick Palka <ppalka@redhat.com>
6315 * testsuite/24_iterators/range_operations/distance.cc: Do not assume
6316 test_range::end() returns the same type as test_range::begin().
6317 * testsuite/24_iterators/range_operations/next.cc: Likewise.
6318 * testsuite/24_iterators/range_operations/prev.cc: Likewise.
6319 * testsuite/util/testsuite_iterators.h (__gnu_test::test_range::end):
6320 Always return a sentinel<I>.
6322 2020-01-29 Jonathan Wakely <jwakely@redhat.com>
6325 * include/std/stop_token (stop_token::stop_possible()): Call new
6326 _M_stop_possible() function.
6327 (stop_token::stop_requested()): Do not use stop_possible().
6328 (stop_token::binary_semaphore): New class, as temporary stand-in for
6329 std::binary_semaphore.
6330 (stop_token::_Stop_cb::_M_callback): Add noexcept to type.
6331 (stop_token::_Stop_cb::_M_destroyed, stop_token::_Stop_cb::_M_done):
6332 New data members for symchronization with stop_callback destruction.
6333 (stop_token::_Stop_cb::_Stop_cb): Make non-template.
6334 (stop_token::_Stop_cb::_M_linked, stop_token::_Stop_cb::_S_execute):
6336 (stop_token::_Stop_cb::_M_run): New member function.
6337 (stop_token::_Stop_state::_M_stopped, stop_token::_Stop_state::_M_mtx):
6339 (stop_token::_Stop_state::_M_owners): New data member to track
6340 reference count for ownership.
6341 (stop_token::_Stop_state::_M_value): New data member combining a
6342 spinlock, the stop requested flag, and the reference count for
6343 associated stop_source objects.
6344 (stop_token::_Stop_state::_M_requester): New data member for
6345 synchronization with stop_callback destruction.
6346 (stop_token::_Stop_state::_M_stop_possible()): New member function.
6347 (stop_token::_Stop_state::_M_stop_requested()): Inspect relevant bit
6349 (stop_token::_Stop_state::_M_add_owner)
6350 (stop_token::_Stop_state::_M_release_ownership)
6351 (stop_token::_Stop_state::_M_add_ssrc)
6352 (stop_token::_Stop_state::_M_sub_ssrc): New member functions for
6353 updating reference counts.
6354 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
6355 (stop_token::_Stop_state::_M_lock, stop_token::_Stop_state::_M_unlock)
6356 (stop_token::_Stop_state::_M_try_lock)
6357 (stop_token::_Stop_state::_M_try_lock_and_stop)
6358 (stop_token::_Stop_state::_M_do_try_lock): New member functions for
6360 (stop_token::_Stop_state::_M_request_stop): Use atomic operations to
6361 read and update state. Release lock while running callbacks. Use new
6362 data members to synchronize with callback destruction.
6363 (stop_token::_Stop_state::_M_remove_callback): Likewise.
6364 (stop_token::_Stop_state::_M_register_callback): Use atomic operations
6365 to read and update state.
6366 (stop_token::_Stop_state_ref): Handle type to manage _Stop_state,
6367 replacing shared_ptr.
6368 (stop_source::stop_source(const stop_source&)): Update reference count.
6369 (stop_source::operator=(const stop_source&)): Likewise.
6370 (stop_source::~stop_source()): Likewise.
6371 (stop_source::stop_source(stop_source&&)): Define as defaulted.
6372 (stop_source::operator=(stop_source&&)): Establish postcondition on
6374 (stop_callback): Enforce preconditions on template parameter. Replace
6375 base class with data member of new _Cb_impl type.
6376 (stop_callback::stop_callback(const stop_token&, Cb&&))
6377 (stop_callback::stop_callback(stop_token&&, Cb&&)): Fix TOCTTOU race.
6378 (stop_callback::_Cb_impl): New type wrapping _Callback member and
6379 defining the _S_execute member function.
6380 * testsuite/30_threads/stop_token/stop_callback/deadlock-mt.cc: New
6382 * testsuite/30_threads/stop_token/stop_callback/deadlock.cc: New test.
6383 * testsuite/30_threads/stop_token/stop_callback/destroy.cc: New test.
6384 * testsuite/30_threads/stop_token/stop_callback/destructible_neg.cc:
6386 * testsuite/30_threads/stop_token/stop_callback/invocable_neg.cc: New
6388 * testsuite/30_threads/stop_token/stop_callback/invoke.cc: New test.
6389 * testsuite/30_threads/stop_token/stop_source/assign.cc: New test.
6390 * testsuite/30_threads/stop_token/stop_token/stop_possible.cc: New
6393 * libsupc++/compare (__detail::__3way_builtin_ptr_cmp): Use
6394 three_way_comparable_with.
6395 (__detail::__3way_cmp_with): Remove workaround for fixed bug.
6396 (compare_three_way::operator()): Remove redundant constraint from
6398 (__detail::_Synth3way::operator()): Use three_way_comparable_with
6399 instead of workaround.
6400 * testsuite/18_support/comparisons/object/93479.cc: Prune extra
6401 output due to simplified constraints on compare_three_way::operator().
6404 * libsupc++/compare (__3way_builtin_ptr_cmp): Require <=> to be valid.
6405 * testsuite/18_support/comparisons/object/93479.cc: New test.
6407 * testsuite/std/ranges/access/end.cc: Do not assume test_range::end()
6408 returns the same type as test_range::begin(). Add comments.
6409 * testsuite/std/ranges/access/rbegin.cc: Likewise.
6410 * testsuite/std/ranges/access/rend.cc: Likewise.
6411 * testsuite/std/ranges/range.cc: Do not assume the sentinel for
6412 test_range is the same as its iterator type.
6413 * testsuite/util/testsuite_iterators.h (test_range::sentinel): Add
6414 operator- overloads to satisfy sized_sentinel_for when the iterator
6415 satisfies random_access_iterator.
6417 2020-01-28 Jonathan Wakely <jwakely@redhat.com>
6420 * include/bits/refwrap.h (reference_wrapper::operator()): Restrict
6421 static assertion to object types.
6424 * acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Use AC_SEARCH_LIBS for
6425 clock_gettime instead of explicit glibc version check.
6426 * configure: Regenerate.
6428 2020-01-28 Martin Liska <mliska@suse.cz>
6431 * include/std/atomic: Fix typo.
6432 * include/std/optional: Likewise.
6434 2020-01-27 Andrew Burgess <andrew.burgess@embecosm.com>
6436 * configure: Regenerate.
6438 2020-01-27 Jonathan Wakely <jwakely@redhat.com>
6441 * include/std/span (span): Fix deduction guide.
6442 * testsuite/23_containers/span/deduction.cc: New test.
6444 2020-01-24 Jonathan Wakely <jwakely@redhat.com>
6446 * libsupc++/compare (__cmp_cat::_Eq): Remove enumeration type.
6447 (__cmp_cat::_Ord::equivalent): Add enumerator.
6448 (__cmp_cat::_Ord::_Less, __cmp_cat::_Ord::_Greater): Rename to less
6450 (partial_ordering, weak_ordering, strong_ordering): Remove
6451 constructors taking __cmp_cat::_Eq parameters. Use renamed
6454 2020-01-24 Maciej W. Rozycki <macro@wdc.com>
6456 * acinclude.m4: Handle `--with-toolexeclibdir='.
6457 * Makefile.in: Regenerate.
6458 * aclocal.m4: Regenerate.
6459 * configure: Regenerate.
6460 * doc/Makefile.in: Regenerate.
6461 * include/Makefile.in: Regenerate.
6462 * libsupc++/Makefile.in: Regenerate.
6463 * po/Makefile.in: Regenerate.
6464 * python/Makefile.in: Regenerate.
6465 * src/Makefile.in: Regenerate.
6466 * src/c++11/Makefile.in: Regenerate.
6467 * src/c++17/Makefile.in: Regenerate.
6468 * src/c++98/Makefile.in: Regenerate.
6469 * src/filesystem/Makefile.in: Regenerate.
6470 * testsuite/Makefile.in: Regenerate.
6472 2020-01-23 Alexandre Oliva <oliva@adacore.com>
6474 * crossconfig.m4 (GLIBCXX_CHECK_MATH_DECL): Reject macros.
6475 * configure: Rebuild.
6477 * testsuite/27_io/fpos/mbstate_t/1.cc: Zero-init mbstate_t.
6479 2020-01-23 Jonathan Wakely <jwakely@redhat.com>
6482 * include/Makefile.am (${host_builddir}/largefile-config.h): Simplify
6484 * include/Makefile.in: Regenerate.
6486 2020-01-20 Jonathan Wakely <jwakely@redhat.com>
6488 * doc/xml/faq.xml: Fix grammar.
6489 * doc/xml/manual/appendix_contributing.xml: Improve instructions.
6490 * doc/xml/manual/spine.xml: Update copyright years.
6491 * doc/html/*: Regenerate.
6493 2020-01-19 Eric S. Raymond <esr@thyrsus.com>
6495 * doc/xml/faq.xml: Update for SVN -> Git transition.
6496 * doc/xml/manual/appendix_contributing.xml: Likewise.
6497 * doc/xml/manual/status_cxx1998.xml: Likewise.
6498 * doc/xml/manual/status_cxx2011.xml: Likewise.
6499 * doc/xml/manual/status_cxx2014.xml: Likewise.
6500 * doc/xml/manual/status_cxx2017.xml: Likewise.
6501 * doc/xml/manual/status_cxx2020.xml: Likewise.
6502 * doc/xml/manual/status_cxxtr1.xml: Likewise.
6503 * doc/xml/manual/status_cxxtr24733.xml: Likewise.
6505 2020-01-18 Iain Sandoe <iain@sandoe.co.uk>
6507 * include/Makefile.am: Add coroutine to the std set.
6508 * include/Makefile.in: Regenerated.
6509 * include/std/coroutine: New file.
6511 2020-01-17 Jonathan Wakely <jwakely@redhat.com>
6514 * include/bits/c++config: Only do PSTL config when the header is
6515 present, to fix freestanding.
6516 * libsupc++/new_opa.cc [!_GLIBCXX_HOSTED]: Declare allocation
6517 functions if they were detected by configure.
6519 2020-01-16 Kai-Uwe Eckhardt <kuehro@gmx.de>
6520 Matthew Bauer <mjbauer95@gmail.com>
6521 Jonathan Wakely <jwakely@redhat.com>
6523 PR bootstrap/64271 (partial)
6524 * config/os/bsd/netbsd/ctype_base.h (ctype_base::mask): Change type
6526 (ctype_base::alpha, ctype_base::digit, ctype_base::xdigit)
6527 (ctype_base::print, ctype_base::graph, ctype_base::alnum): Sync
6528 definitions with NetBSD upstream.
6529 (ctype_base::blank): Use _CTYPE_BL.
6530 * config/os/bsd/netbsd/ctype_configure_char.cc (_C_ctype_): Remove
6532 (ctype<char>::classic_table): Use _C_ctype_tab_ instead of _C_ctype_.
6533 (ctype<char>::do_toupper, ctype<char>::do_tolower): Cast char
6534 parameters to unsigned char.
6535 * config/os/bsd/netbsd/ctype_inline.h (ctype<char>::is): Likewise.
6537 2020-01-16 François Dumont <fdumont@gcc.gnu.org>
6540 * include/bits/hashtable.h (_Hashtable<>): Make _Equality<> friend.
6541 * include/bits/hashtable_policy.h: Include <bits/stl_algo.h>.
6542 (_Equality_base): Remove.
6543 (_Equality<>::_M_equal): Review implementation. Use
6544 std::is_permutation.
6545 * testsuite/23_containers/unordered_multiset/operators/1.cc
6546 (Hash, Equal, test02, test03): New.
6547 * testsuite/23_containers/unordered_set/operators/1.cc
6548 (Hash, Equal, test02, test03): New.
6550 2020-01-15 Jonathan Wakely <jwakely@redhat.com>
6553 * include/bits/iterator_concepts.h (__max_diff_type, __max_size_type):
6554 Move here from <bits/range_access.h> and define using __int128 when
6556 (__is_integer_like, __is_signed_integer_like): Move here from
6557 <bits/range_access.h>.
6558 (weakly_incrementable): Use __is_signed_integer_like.
6559 * include/bits/range_access.h (__max_diff_type, __max_size_type)
6560 (__is_integer_like, __is_signed_integer_like): Move to
6561 <bits/iterator_concepts.h>.
6562 (__make_unsigned_like_t): Move here from <ranges>.
6563 * include/std/ranges (__make_unsigned_like_t): Move to
6564 <bits/range_access.h>.
6565 (iota_view): Replace using-directive with using-declarations.
6566 * testsuite/std/ranges/iota/93267.cc: New test.
6567 * testsuite/std/ranges/iota_view.cc: Move to new 'iota' sub-directory.
6569 2020-01-13 Jonathan Wakely <jwakely@redhat.com>
6572 * include/bits/fs_path.h (path::generic_string<C,A>)
6573 [_GLIBCXX_FILESYSTEM_IS_WINDOWS]: Convert root-dir to forward-slash.
6574 * testsuite/27_io/filesystem/path/generic/generic_string.cc: Check
6575 root-dir is converted to forward slash in generic pathname.
6576 * testsuite/27_io/filesystem/path/generic/utf.cc: New test.
6577 * testsuite/27_io/filesystem/path/generic/wchar_t.cc: New test.
6580 * include/bits/atomic_base.h (__cpp_lib_atomic_value_initialization):
6582 (__atomic_flag_base, __atomic_base, __atomic_base<_PTp*>)
6583 (__atomic_float): Add default member initializer for C++20.
6584 * include/std/atomic (atomic): Likewise.
6585 (atomic::atomic()): Remove noexcept-specifier on default constructor.
6586 * include/std/version (__cpp_lib_atomic_value_initialization): Define.
6587 * testsuite/29_atomics/atomic/cons/assign_neg.cc: Adjust dg-error line
6589 * testsuite/29_atomics/atomic/cons/copy_neg.cc: Likewise.
6590 * testsuite/29_atomics/atomic/cons/value_init.cc: New test.
6591 * testsuite/29_atomics/atomic_flag/cons/value_init.cc: New test.
6592 * testsuite/29_atomics/atomic_flag/requirements/trivial.cc: Adjust
6593 expected result for is_trivially_default_constructible.
6594 * testsuite/29_atomics/atomic_float/requirements.cc: Likewise.
6595 * testsuite/29_atomics/atomic_float/value_init.cc: New test.
6596 * testsuite/29_atomics/atomic_integral/cons/assign_neg.cc: Likewise.
6597 * testsuite/29_atomics/atomic_integral/cons/copy_neg.cc: Likewise.
6598 * testsuite/29_atomics/atomic_integral/cons/value_init.cc
6599 * testsuite/29_atomics/atomic_integral/requirements/trivial.cc: Adjust
6600 expected results for is_trivially_default_constructible.
6601 * testsuite/util/testsuite_common_types.h (has_trivial_dtor): Add
6604 2020-01-10 Jonathan Wakely <jwakely@redhat.com>
6606 * testsuite/util/testsuite_iterators.h: Improve comment.
6608 * testsuite/25_algorithms/equal/deque_iterators/1.cc: Don't use C++11
6609 initialization syntax.
6612 * include/bits/streambuf_iterator.h (istreambuf_iterator): Make type
6613 of base class independent of __cplusplus value.
6614 [__cplusplus < 201103L] (istreambuf_iterator::reference): Override the
6615 type defined in the base class
6616 * testsuite/24_iterators/istreambuf_iterator/92285.cc: New test.
6617 * testsuite/24_iterators/istreambuf_iterator/requirements/
6618 base_classes.cc: Adjust expected base class for C++98.
6620 2020-01-09 Olivier Hainque <hainque@adacore.com>
6622 * doc/xml/manual/appendix_contributing.xml: Document _C2
6623 as a reserved identifier, by VxWorks.
6624 * include/bits/stl_map.h: Rename _C2 template typenames as _Cmp2.
6625 * include/bits/stl_multimap.h: Likewise.
6627 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
6629 * include/ext/extptr_allocator.h (_ExtPtr_allocator::operator==)
6630 (_ExtPtr_allocator::operator!=): Add missing const qualifiers.
6631 * include/ext/pointer.h (readable_traits<_Pointer_adapter<S>>): Add
6632 partial specialization to disambiguate the two constrained
6635 * include/experimental/type_traits (experimental::is_pod_v): Disable
6636 -Wdeprecated-declarations warnings around reference to std::is_pod.
6637 * include/std/type_traits (is_pod_v): Likewise.
6638 * testsuite/18_support/max_align_t/requirements/2.cc: Also check
6639 is_standard_layout and is_trivial. Do not check is_pod for C++20.
6640 * testsuite/20_util/is_pod/requirements/explicit_instantiation.cc:
6641 Add -Wno-deprecated for C++20.
6642 * testsuite/20_util/is_pod/requirements/typedefs.cc: Likewise.
6643 * testsuite/20_util/is_pod/value.cc: Likewise.
6644 * testsuite/experimental/type_traits/value.cc: Likewise.
6646 2020-01-09 JeanHeyd "ThePhD" Meneide <phdofthehouse@gmail.com>
6648 * include/bits/c++config (_GLIBCXX20_DEPRECATED): Add new macro.
6649 * include/std/type_traits (is_pod, is_pod_v): Deprecate for C++20.
6650 * testuite/20_util/is_pod/deprecated-2a.cc: New test.
6652 2020-01-09 Jonathan Wakely <jwakely@redhat.com>
6655 * include/bits/random.h (operator>>): Check stream operation succeeds.
6656 * include/bits/random.tcc (operator<<): Remove redundant __ostream_type
6658 (operator>>): Remove redundant __istream_type typedefs. Check stream
6660 (__extract_params): New function to fill a vector from a stream.
6661 * testsuite/26_numerics/random/pr60037-neg.cc: Adjust dg-error line.
6664 * config/abi/pre/gnu.ver: Add new exports.
6665 * include/std/memory_resource (memory_resource::~memory_resource()):
6666 Do not define inline.
6667 (monotonic_buffer_resource::~monotonic_buffer_resource()): Likewise.
6668 * src/c++17/memory_resource.cc (memory_resource::~memory_resource()):
6670 (monotonic_buffer_resource::~monotonic_buffer_resource()): Define.
6671 * testsuite/20_util/monotonic_buffer_resource/93208.cc: New test.
6673 2020-01-09 François Dumont <fdumont@gcc.gnu.org>
6676 * include/bits/hashtable.h (_Hashtable<>::__alloc_node_gen_t): New
6678 (_Hashtable<>::__fwd_value_for): New.
6679 (_Hashtable<>::_M_assign_elements<>): Remove _NodeGenerator template
6681 (_Hashtable<>::_M_assign<>): Add _Ht template parameter.
6682 (_Hashtable<>::operator=(const _Hashtable<>&)): Adapt.
6683 (_Hashtable<>::_M_move_assign): Adapt. Replace std::move_if_noexcept
6685 (_Hashtable<>::_Hashtable(const _Hashtable&)): Adapt.
6686 (_Hashtable<>::_Hashtable(const _Hashtable&, const allocator_type&)):
6688 (_Hashtable<>::_Hashtable(_Hashtable&&, const allocator_type&)):
6690 * testsuite/23_containers/unordered_set/92124.cc: New.
6692 2020-01-08 Jonathan Wakely <jwakely@redhat.com>
6695 * src/c++17/fs_ops.cc (do_remove_all): New function implementing more
6696 detailed error reporting for remove_all. Check result of recursive
6697 call before incrementing iterator.
6698 (remove_all(const path&), remove_all(const path&, error_code&)): Use
6700 * src/filesystem/ops.cc (remove_all(const path&, error_code&)): Check
6701 result of recursive call before incrementing iterator.
6702 * testsuite/27_io/filesystem/operations/remove_all.cc: Check errors
6703 are reported correctly.
6704 * testsuite/experimental/filesystem/operations/remove_all.cc: Likewise.
6706 2020-01-07 Thomas Rodgers <trodgers@redhat.com>
6708 * include/std/condition_variable
6709 (condition_variable_any::wait_on): Rename to match current draft
6711 (condition_variable_any::wait_on_until): Likewise.
6712 (condition_variable_any::wait_on_for): Likewise.
6713 * testsuite/30_threads/condition_variable_any/stop_token/wait_on.cc:
6714 Adjust tests to account for renamed methods.
6716 2020-01-07 François Dumont <fdumont@gcc.gnu.org>
6719 * include/bits/stl_tree.h
6720 (_Rb_tree<>::_M_move_assign(_Rb_tree&, false_type)): Replace
6721 std::move_if_noexcept by std::move.
6722 * testsuite/23_containers/map/92124.cc: New.
6723 * testsuite/23_containers/set/92124.cc: New.
6725 2020-01-06 Jonathan Wakely <jwakely@redhat.com>
6727 * include/std/stop_token (stop_token): Remove operator!= (LWG 3254).
6728 (stop_source): Likewise (LWG 3362).
6729 * testsuite/30_threads/stop_token/stop_source.cc: Test equality
6732 * include/bits/stl_algobase.h (__is_byte_iter, __min_cmp)
6733 (lexicographical_compare_three_way): Do not depend on
6735 * include/std/version (__cpp_lib_three_way_comparison): Only define
6736 when __cpp_lib_concepts is defined.
6737 * libsupc++/compare (__cpp_lib_three_way_comparison): Likewise.
6739 2020-01-03 Jonathan Wakely <jwakely@redhat.com>
6741 * include/bits/stl_algobase.h (lexicographical_compare_three_way):
6742 Only define four-argument overload when __cpp_lib_concepts is defined.
6744 2020-01-01 John David Anglin <danglin@gcc.gnu.org>
6746 * config/abi/post/hppa-linux-gnu/baseline_symbols.txt: Update.
6748 2020-01-01 Jakub Jelinek <jakub@redhat.com>
6750 Update copyright years.
6752 Copyright (C) 2020 Free Software Foundation, Inc.
6754 Copying and distribution of this file, with or without modification,
6755 are permitted in any medium without royalty provided the copyright
6756 notice and this notice are preserved.